UA ANSI C Server Professional  1.4.0.285
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
UaServerEvents

Data Structures

struct  _UaServer_SimpleBrowsePath
 Helper struct for browse paths. More...
 
struct  _UaServer_EventField
 Helper struct for event fields. More...
 
struct  _UaServer_Event
 An actual event. More...
 

Functions

OpcUa_StatusCode UaServer_EventField_Initialize (UaServer_EventField *pValue)
 Initialize the passed UaServer_EventField. More...
 
OpcUa_Void UaServer_EventField_Clear (UaServer_EventField *pValue)
 Clear the passed UaServer_EventField. More...
 
OpcUa_StatusCode UaServer_Events_RegisterEventType (OpcUa_NodeId *a_pEventTypeId, OpcUa_NodeId *a_pParentEventTypeId)
 Registers a new event type. More...
 
OpcUa_Int32 UaServer_Events_RegisterEventField (OpcUa_NodeId *a_pEventTypeId, UaServer_EventField *a_pEventField)
 Registers an EventField. More...
 
OpcUa_StatusCode UaServer_Events_UnregisterEventType (OpcUa_NodeId *a_pEventTypeId)
 Unregisters an existing event type. More...
 
UaServer_EventUaServer_Events_CreateEvent (OpcUa_NodeId *a_pEventTypeId)
 Creates a new event structure configured for the given event type. More...
 
OpcUa_Void UaServer_Events_DeleteEvent (UaServer_Event **a_ppEvent)
 Deletes an event structure created with UaServer_Events_CreateEvent. More...
 
OpcUa_StatusCode UaServer_Events_SetEventField (UaServer_Event *a_pEvent, OpcUa_UInt32 a_LocalIndex, OpcUa_Variant *a_pValue)
 Sets an event field value. More...
 
OpcUa_Variant * UaServer_Events_GetEventField (UaServer_Event *a_pEvent, OpcUa_Int a_LocalIndex)
 Gets an event field value. More...
 
OpcUa_StatusCode UaServer_Events_FireEvent (UaServer_Event *a_pEvent)
 FireEvent method used by providers to fire a event. More...
 
OpcUa_StatusCode UaServer_Events_RegisterEventNotifier (OpcUa_NodeId *a_pEventNotifier, OpcUa_NodeId *a_pParentNotifier)
 Registers a new EventNotifier. More...
 
OpcUa_StatusCode UaServer_Events_RegisterEventSource (OpcUa_NodeId *a_pEventSource, OpcUa_NodeId *a_pParentNotifier)
 Registers a new EventSource. More...
 
OpcUa_StatusCode UaServer_Events_UnregisterEventNotifier (OpcUa_NodeId *a_pEventNotifier)
 Unregisters an existing EventNotifier. More...
 
OpcUa_StatusCode UaServer_Events_UnregisterEventSource (OpcUa_NodeId *a_pEventSource)
 Unregisters an existing EventSource. More...
 
OpcUa_ByteString * UaServer_Events_GetEventId (UaServer_Event *a_pEvent)
 Optimized method for returning the EventId. More...
 
OpcUa_NodeId * UaServer_Events_GetEventType (UaServer_Event *a_pEvent)
 Optimized method for returning the EventType. More...
 
OpcUa_NodeId * UaServer_Events_GetSourceNode (UaServer_Event *a_pEvent)
 Optimized method for returning the SourceNode. More...
 
OpcUa_String * UaServer_Events_GetSourceName (UaServer_Event *a_pEvent)
 Optimized method for returning the SourceName. More...
 
OpcUa_DateTime UaServer_Events_GetTime (UaServer_Event *a_pEvent)
 Optimized method for returning the Time. More...
 
OpcUa_DateTime UaServer_Events_GetReceiveTime (UaServer_Event *a_pEvent)
 Optimized method for returning the ReceiveTime. More...
 
OpcUa_DateTime UaServer_Events_GetLocalTime (UaServer_Event *a_pEvent)
 Optimized method for returning the LocalTime. More...
 
OpcUa_LocalizedText * UaServer_Events_GetMessage (UaServer_Event *a_pEvent)
 Optimized method for returning the Message. More...
 
OpcUa_UInt16 UaServer_Events_GetSeverity (UaServer_Event *a_pEvent)
 Optimized method for returning the Severity. More...
 
OpcUa_StatusCode UaServer_Events_SetEventId (UaServer_Event *a_pEvent, OpcUa_ByteString *a_pEventId)
 Optimized method for setting the EventId. More...
 
OpcUa_StatusCode UaServer_Events_SetEventType (UaServer_Event *a_pEvent, OpcUa_NodeId *a_pEventType)
 Optimized method for setting the EventType. More...
 
OpcUa_StatusCode UaServer_Events_SetSourceNode (UaServer_Event *a_pEvent, OpcUa_NodeId *a_pSourceNode)
 Optimized method for setting the SourceNode. More...
 
OpcUa_StatusCode UaServer_Events_SetSourceName (UaServer_Event *a_pEvent, const OpcUa_CharA *a_sourceName)
 Optimized method for setting the SourceName. More...
 
OpcUa_StatusCode UaServer_Events_SetTime (UaServer_Event *a_pEvent, OpcUa_DateTime a_time)
 Optimized method for setting the Time. More...
 
OpcUa_StatusCode UaServer_Events_SetReceiveTime (UaServer_Event *a_pEvent, OpcUa_DateTime a_receiveTime)
 Optimized method for setting the ReceiveTime. More...
 
OpcUa_StatusCode UaServer_Events_SetLocalTime (UaServer_Event *a_pEvent, OpcUa_DateTime a_localTime)
 Optimized method for setting the LocalTime. More...
 
OpcUa_StatusCode UaServer_Events_SetMessage (UaServer_Event *a_pEvent, const OpcUa_CharA *a_locale, const OpcUa_CharA *a_message)
 Optimized method for setting the Message. More...
 
OpcUa_StatusCode UaServer_Events_SetSeverity (UaServer_Event *a_pEvent, OpcUa_UInt16 a_severity)
 Optimized method for setting the Severity. More...
 
OpcUa_StatusCode UaServer_Events_CreateEventId (const OpcUa_ByteString *a_pUserEventId, OpcUa_ByteString *a_pNewEventId)
 Create an unique EventId and include a user specific part if provided. More...
 
OpcUa_StatusCode UaServer_Events_GetUserEventId (const OpcUa_ByteString *a_pEventId, OpcUa_ByteString *a_pUserEventId)
 Gets the user specific part of an EventId that was created by UaServer_Events_CreateEventId. More...
 
UaServer_EventUaServer_Events_GetConditionByNodeId (OpcUa_UInt16 a_providerNsIdx, const OpcUa_NodeId *a_pNodeId)
 Searches for a condition type event of a certain provider with the given condition NodeId. More...
 

Detailed Description

Function Documentation

OpcUa_Void UaServer_EventField_Clear ( UaServer_EventField pValue)

Clear the passed UaServer_EventField.

Parameters
[in]pValueThe UaServer_EventField to clear
OpcUa_StatusCode UaServer_EventField_Initialize ( UaServer_EventField pValue)

Initialize the passed UaServer_EventField.

Parameters
[in]pValueThe UaServer_EventField to initialize
Returns
OpcUa_Good on success
UaServer_Event * UaServer_Events_CreateEvent ( OpcUa_NodeId *  a_pEventTypeId)

Creates a new event structure configured for the given event type.

Parameters
[in]a_pEventTypeIdThe NodeId of the event type
Returns
The newly allocated UaServer_Event
OpcUa_StatusCode UaServer_Events_CreateEventId ( const OpcUa_ByteString *  a_pUserEventId,
OpcUa_ByteString *  a_pNewEventId 
)

Create an unique EventId and include a user specific part if provided.

Parameters
[in]a_pUserEventIdOptional: User specific part that can be retrieved by UaServer_Events_GetUserEventId.
[in]a_pNewEventIdThe new EventId. The caller is responsible for clearing it.
Returns
OpcUa_Good on success.
OpcUa_Void UaServer_Events_DeleteEvent ( UaServer_Event **  a_ppEvent)

Deletes an event structure created with UaServer_Events_CreateEvent.

Parameters
[in,out]a_ppEventThe event to delete
OpcUa_StatusCode UaServer_Events_FireEvent ( UaServer_Event a_pEvent)

FireEvent method used by providers to fire a event.

All subscriptions of all clients get notified.

Note
This function is thread-safe.
Parameters
[in]a_pEventThe event to fire.
Returns
OpcUa_Good on success.
UaServer_Event * UaServer_Events_GetConditionByNodeId ( OpcUa_UInt16  a_providerNsIdx,
const OpcUa_NodeId *  a_pNodeId 
)

Searches for a condition type event of a certain provider with the given condition NodeId.

This function was introduced in version 1.2.1.

Parameters
[in]a_providerNsIdxThe namespace index of the provider the event belongs to.
[in]a_pNodeIdThe condition NodeId of the condition.
Returns
The condition if found, OpcUa_Null otherwise.
OpcUa_Variant * UaServer_Events_GetEventField ( UaServer_Event a_pEvent,
OpcUa_Int  a_LocalIndex 
)

Gets an event field value.

Parameters
[in]a_pEventPointer to event structure.
[in]a_LocalIndexThe local index which identifies the EventField
Returns
The event field value identified by the GlobalIndex
OpcUa_ByteString * UaServer_Events_GetEventId ( UaServer_Event a_pEvent)

Optimized method for returning the EventId.

Parameters
[in]a_pEventPointer to the event.
Returns
The EventId of the event.
OpcUa_NodeId * UaServer_Events_GetEventType ( UaServer_Event a_pEvent)

Optimized method for returning the EventType.

Parameters
[in]a_pEventPointer to the event.
Returns
The EventType of the event.
OpcUa_DateTime UaServer_Events_GetLocalTime ( UaServer_Event a_pEvent)

Optimized method for returning the LocalTime.

Parameters
[in]a_pEventPointer to the event.
Returns
The LocalTime of the event.
OpcUa_LocalizedText * UaServer_Events_GetMessage ( UaServer_Event a_pEvent)

Optimized method for returning the Message.

Parameters
[in]a_pEventPointer to the event.
Returns
The Message of the event.
OpcUa_DateTime UaServer_Events_GetReceiveTime ( UaServer_Event a_pEvent)

Optimized method for returning the ReceiveTime.

Parameters
[in]a_pEventPointer to the event.
Returns
The ReceiveTime of the event.
OpcUa_UInt16 UaServer_Events_GetSeverity ( UaServer_Event a_pEvent)

Optimized method for returning the Severity.

Parameters
[in]a_pEventPointer to the event.
Returns
The Severity of the event.
OpcUa_String * UaServer_Events_GetSourceName ( UaServer_Event a_pEvent)

Optimized method for returning the SourceName.

Parameters
[in]a_pEventPointer to the event.
Returns
The SourceName of the event.
OpcUa_NodeId * UaServer_Events_GetSourceNode ( UaServer_Event a_pEvent)

Optimized method for returning the SourceNode.

Parameters
[in]a_pEventPointer to the event.
Returns
The SourceNode of the event.
OpcUa_DateTime UaServer_Events_GetTime ( UaServer_Event a_pEvent)

Optimized method for returning the Time.

Parameters
[in]a_pEventPointer to the event.
Returns
The Time of the event.
OpcUa_StatusCode UaServer_Events_GetUserEventId ( const OpcUa_ByteString *  a_pEventId,
OpcUa_ByteString *  a_pUserEventId 
)

Gets the user specific part of an EventId that was created by UaServer_Events_CreateEventId.

Parameters
[in]a_pEventIdThe EventId to use.
[in]a_pUserEventIdA copy of the user part of the EventId. The caller is responsible for clearing it.
Returns
OpcUa_Good on success.
OpcUa_Int32 UaServer_Events_RegisterEventField ( OpcUa_NodeId *  a_pEventTypeId,
UaServer_EventField a_pEventField 
)

Registers an EventField.

Parameters
[in]a_pEventTypeIdThe EventType the EventField belongs to.
[in]a_pEventFieldStructure defining the new EventField.
Returns
The local index of the EventField, -1 if an error occured
OpcUa_StatusCode UaServer_Events_RegisterEventNotifier ( OpcUa_NodeId *  a_pEventNotifier,
OpcUa_NodeId *  a_pParentNotifier 
)

Registers a new EventNotifier.

The notifier will be inserted in the internal area tree as a child of a_pParentNotifier.

Parameters
[in]a_pEventNotifierThe NodeId of the new EventNotifier.
[in]a_pParentNotifierThe NodeId of an existing EventNotifier the new notifier will be added to as child.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_RegisterEventSource ( OpcUa_NodeId *  a_pEventSource,
OpcUa_NodeId *  a_pParentNotifier 
)

Registers a new EventSource.

The event source will be inserted in the internal area tree as a child of a_pParentNotifier. EventSources need to be registered in order to filter out events in UaServer_Events_IsEventSourceInArea.

Parameters
[in]a_pEventSourceThe NodeId of the new EventSource.
[in]a_pParentNotifierThe NodeId of an existing EventNotifier the new event source will be added to as child.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_RegisterEventType ( OpcUa_NodeId *  a_pEventTypeId,
OpcUa_NodeId *  a_pParentEventTypeId 
)

Registers a new event type.

Parameters
[in]a_pEventTypeIdThe NodeId of the new event type
[in]a_pParentEventTypeIdThe NodeId of the new event's parent type
Returns
OpcUa_Good if the type was successfully registered
OpcUa_StatusCode UaServer_Events_SetEventField ( UaServer_Event a_pEvent,
OpcUa_UInt32  a_LocalIndex,
OpcUa_Variant *  a_pValue 
)

Sets an event field value.

Used by providers to fill events.

Parameters
[in]a_pEventPointer to event structure.
[in]a_LocalIndexIndex which identifies the event field.
[in]a_pValueThe event field value to set
Returns
OpcUa_Good on success
OpcUa_StatusCode UaServer_Events_SetEventId ( UaServer_Event a_pEvent,
OpcUa_ByteString *  a_pEventId 
)

Optimized method for setting the EventId.

To ensure that an unique EventId is used, the EventId should be created with UaServer_Events_CreateEventId.

Parameters
[in]a_pEventPointer to the event.
[in]a_pEventIdThe new EventId to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetEventType ( UaServer_Event a_pEvent,
OpcUa_NodeId *  a_pEventType 
)

Optimized method for setting the EventType.

Parameters
[in]a_pEventPointer to the event.
[in]a_pEventTypeThe new EventType to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetLocalTime ( UaServer_Event a_pEvent,
OpcUa_DateTime  a_localTime 
)

Optimized method for setting the LocalTime.

Parameters
[in]a_pEventPointer to the event.
[in]a_localTimeThe new LocalTime to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetMessage ( UaServer_Event a_pEvent,
const OpcUa_CharA *  a_locale,
const OpcUa_CharA *  a_message 
)

Optimized method for setting the Message.

Parameters
[in]a_pEventPointer to the event.
[in]a_localeThe locale of the new Message.
[in]a_messageThe new Message to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetReceiveTime ( UaServer_Event a_pEvent,
OpcUa_DateTime  a_receiveTime 
)

Optimized method for setting the ReceiveTime.

Parameters
[in]a_pEventPointer to the event.
[in]a_receiveTimeThe new ReceiveTime to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetSeverity ( UaServer_Event a_pEvent,
OpcUa_UInt16  a_severity 
)

Optimized method for setting the Severity.

Parameters
[in]a_pEventPointer to the event.
[in]a_severityThe new Severity to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetSourceName ( UaServer_Event a_pEvent,
const OpcUa_CharA *  a_sourceName 
)

Optimized method for setting the SourceName.

Parameters
[in]a_pEventPointer to the event.
[in]a_sourceNameThe new SourceName to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetSourceNode ( UaServer_Event a_pEvent,
OpcUa_NodeId *  a_pSourceNode 
)

Optimized method for setting the SourceNode.

Parameters
[in]a_pEventPointer to the event.
[in]a_pSourceNodeThe new SourceNode to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_SetTime ( UaServer_Event a_pEvent,
OpcUa_DateTime  a_time 
)

Optimized method for setting the Time.

Parameters
[in]a_pEventPointer to the event.
[in]a_timeThe new Time to set.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_UnregisterEventNotifier ( OpcUa_NodeId *  a_pEventNotifier)

Unregisters an existing EventNotifier.

All child notifiers and sources will be unregistered recursively.

Parameters
[in]a_pEventNotifierThe NodeId of the EventNotifier.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_UnregisterEventSource ( OpcUa_NodeId *  a_pEventSource)

Unregisters an existing EventSource.

Parameters
[in]a_pEventSourceThe NodeId of the EventSource.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_Events_UnregisterEventType ( OpcUa_NodeId *  a_pEventTypeId)

Unregisters an existing event type.

Parameters
[in]a_pEventTypeIdThe NodeId of the event type to unregister
Returns
OpcUa_Good if the event type was successfully unregistered