S2OPC OPCUA Toolkit
|
Contains the interface to configure events in the server. This interface is intended to be used by the server frontend wrapper only. More...
Go to the source code of this file.
Typedefs | |
typedef SOPC_Dict | SOPC_Server_Event_Types |
OPC UA server events types configuration. | |
Functions | |
SOPC_ReturnStatus | SOPC_EventManager_CreateEventTypes (SOPC_AddressSpace *addSpace, SOPC_Server_Event_Types **outEventTypes) |
Creates the server event types based on given server address space. The BaseEventType is used to find and create reference event types that will be allowed to be instantiated using SOPC_EventManager_CreateEventInstance. BaseEventTypes and all subtypes of BaseEventTypes are then instantiable. Each event variable of each type are referenced and could be modified using SOPC_Event_SetVariable or SOPC_Event_SetVariableFromStrPath. | |
bool | SOPC_EventManager_HasEventType (const SOPC_Server_Event_Types *eventTypes, const SOPC_NodeId *eventTypeId) |
Checks if the given event type id is configured in the server event types provided. | |
SOPC_ReturnStatus | SOPC_EventManager_HasEventTypeAndBrowsePath (const SOPC_Server_Event_Types *eventTypes, const SOPC_NodeId *eventTypeId, int32_t nbQNamePath, const SOPC_QualifiedName *qNamePath) |
Checks both if the given event type id is configured in the server event types and if the associated browse path is valid for this event type. | |
SOPC_Event * | SOPC_EventManager_CreateEventInstance (const SOPC_Server_Event_Types *eventTypes, const SOPC_NodeId *eventTypeId) |
Creates an event instance based on the given reference event types. The EventId value is set to a unique value by this function prior to returning the new event instance. Caller is responsible for event deallocation. | |
void | SOPC_EventManager_Delete (SOPC_Server_Event_Types **eventTypes) |
Clears the given event types content, the pointed configuration is deallocated and pointer is set to NULL. | |
SOPC_ReturnStatus | SOPC_EventManagerUtil_QnPathToCString (uint16_t nbQnPath, const SOPC_QualifiedName *qNamePath, char **qnPathStr) |
Utility function to generate a C string version of a browse path composed of qualified names and separated by '~': "<SOPC_QualifiedName_ToCString(qNamePath[0])>~<SOPC_QualifiedName_ToCString(qNamePath[1])>~[...]<SOPC_QualifiedName_ToCString(qNamePath[nbQnPath-1])>". | |
SOPC_ReturnStatus | SOPC_EventManagerUtil_cStringPathToQnPath (char qnPathSep, const char *qnPathStr, int32_t *nbQnPath, SOPC_QualifiedName **qNamePath) |
Utility function to parse a C string version of a browse path composed of qualified names and separated by qnPathSep character, e.g. '~': "<SOPC_QualifiedName_ToCString(qNamePath[0])>~<SOPC_QualifiedName_ToCString(qNamePath[1])>~[...]<SOPC_QualifiedName_ToCString(qNamePath[nbQnPath-1])>". | |
Contains the interface to configure events in the server. This interface is intended to be used by the server frontend wrapper only.
typedef SOPC_Dict SOPC_Server_Event_Types |
OPC UA server events types configuration.
SOPC_ReturnStatus SOPC_EventManager_CreateEventTypes | ( | SOPC_AddressSpace * | addSpace, |
SOPC_Server_Event_Types ** | outEventTypes ) |
Creates the server event types based on given server address space. The BaseEventType is used to find and create reference event types that will be allowed to be instantiated using SOPC_EventManager_CreateEventInstance. BaseEventTypes and all subtypes of BaseEventTypes are then instantiable. Each event variable of each type are referenced and could be modified using SOPC_Event_SetVariable or SOPC_Event_SetVariableFromStrPath.
addSpace | The server address space containing the reference event types for events instantiation. | |
[out] | outEventTypes | The reference event types created by this function in case of success. |
bool SOPC_EventManager_HasEventType | ( | const SOPC_Server_Event_Types * | eventTypes, |
const SOPC_NodeId * | eventTypeId ) |
Checks if the given event type id is configured in the server event types provided.
eventTypes | The reference event types that might contain the event type corresponding to the given eventTypeId |
eventTypeId | The NodeId of the event type to instantiate |
eventTypes
contains eventTypeId
, false otherwise (or in case of invalid parameter) SOPC_ReturnStatus SOPC_EventManager_HasEventTypeAndBrowsePath | ( | const SOPC_Server_Event_Types * | eventTypes, |
const SOPC_NodeId * | eventTypeId, | ||
int32_t | nbQNamePath, | ||
const SOPC_QualifiedName * | qNamePath ) |
Checks both if the given event type id is configured in the server event types and if the associated browse path is valid for this event type.
eventTypes | The reference event types that might contain the event type corresponding to the given eventTypeId |
eventTypeId | The NodeId of the event type to instantiate |
nbQNamePath | The number of qualified names in the relative browse path to a node |
qNamePath | The array of nbQNamePath qualified names in the relative browse path to a node |
SOPC_Event * SOPC_EventManager_CreateEventInstance | ( | const SOPC_Server_Event_Types * | eventTypes, |
const SOPC_NodeId * | eventTypeId ) |
Creates an event instance based on the given reference event types. The EventId value is set to a unique value by this function prior to returning the new event instance. Caller is responsible for event deallocation.
eventTypes | The reference event types that shall contain the event type corresponding to the given eventTypeId |
eventTypeId | The NodeId of the event type to instantiate |
void SOPC_EventManager_Delete | ( | SOPC_Server_Event_Types ** | eventTypes | ) |
Clears the given event types content, the pointed configuration is deallocated and pointer is set to NULL.
eventTypes | The event types configuration to delete |
SOPC_ReturnStatus SOPC_EventManagerUtil_QnPathToCString | ( | uint16_t | nbQnPath, |
const SOPC_QualifiedName * | qNamePath, | ||
char ** | qnPathStr ) |
Utility function to generate a C string version of a browse path composed of qualified names and separated by '~': "<SOPC_QualifiedName_ToCString(qNamePath[0])>~<SOPC_QualifiedName_ToCString(qNamePath[1])>~[...]<SOPC_QualifiedName_ToCString(qNamePath[nbQnPath-1])>".
nbQnPath | Number of qualified names in the browse path contained in qNamePath , it shall be > 0. | |
qNamePath | Array of qualified names of length qNamePath representing the browse path | |
[out] | qnPathStr | The resulting C string representing the browse path as a string |
SOPC_ReturnStatus SOPC_EventManagerUtil_cStringPathToQnPath | ( | char | qnPathSep, |
const char * | qnPathStr, | ||
int32_t * | nbQnPath, | ||
SOPC_QualifiedName ** | qNamePath ) |
Utility function to parse a C string version of a browse path composed of qualified names and separated by qnPathSep
character, e.g. '~': "<SOPC_QualifiedName_ToCString(qNamePath[0])>~<SOPC_QualifiedName_ToCString(qNamePath[1])>~[...]<SOPC_QualifiedName_ToCString(qNamePath[nbQnPath-1])>".
qnPathSep | The character to use as separator between path elements in qnPathStr , '\0' is forbidden | |
qnPathStr | The qualified name path separated by qnPathSep separator as a string. It might be empty. E.g. with sep='~' for path qn0=(nsIdx=0,"EnabledState"), qn1=(0,"Id"): "0:EnabledState~0:Id". The escape character '\' might be used to un-specialize separator | |
[out] | nbQnPath | Number of qualified names in the browse path contained in qNamePath |
[out] | qNamePath | Array of qualified names of length qNamePath representing the browse path |