S2OPC OPCUA Toolkit
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sopc_event.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
38#ifndef SOPC_EVENT_H_
39#define SOPC_EVENT_H_
40
41#include "sopc_types.h"
42
46typedef struct _SOPC_Event SOPC_Event;
47
54
61
71SOPC_Event* SOPC_Event_CreateCopy(const SOPC_Event* pEvent, bool genNewId);
72
81
90
103
113
123
132
141
154
168
179
190
200
216 uint16_t nbQnPath,
217 SOPC_QualifiedName* qualifiedNamePathArray,
218 const SOPC_Variant* var);
219
233
242const SOPC_Variant* SOPC_Event_GetVariableFromStrPath(const SOPC_Event* pEvent, const char* qnPath);
243
258 uint16_t nbQnPath,
259 SOPC_QualifiedName* qualifiedNamePathArray,
260 const SOPC_NodeId** outDataType,
261 int32_t* outValueRank);
262
275 const char* qnPath,
276 const SOPC_NodeId** outDataType,
277 int32_t* outValueRank);
278
294
299typedef void SOPC_Event_ForEachVar_Fct(const char* qnPath,
300 SOPC_Variant* var,
301 const SOPC_NodeId* dataType,
302 int32_t valueRank,
303 uintptr_t user_data);
304
315void SOPC_Event_ForEachVar(SOPC_Event* event, SOPC_Event_ForEachVar_Fct* func, uintptr_t user_data);
316
325
326#endif // SOPC_EVENT_H_
int64_t SOPC_DateTime
OPC UA timestamp format which is 100 nanoseconds from 1601/01/01 00:00:00 UTC.
Definition sopc_builtintypes.h:163
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
SOPC_ReturnStatus SOPC_Event_SetSeverity(SOPC_Event *pEvent, uint16_t severity)
Sets the given Severity for the given event indicating the urgency of the event.
const SOPC_Variant * SOPC_Event_GetVariableAndType(const SOPC_Event *pEvent, uint16_t nbQnPath, SOPC_QualifiedName *qualifiedNamePathArray, const SOPC_NodeId **outDataType, int32_t *outValueRank)
Gets the variable value and type information for the given browse path in the given event.
SOPC_ReturnStatus SOPC_Event_SetTime(SOPC_Event *pEvent, SOPC_DateTime time)
Sets the given Time for the given event indicating the time the event occurred.
SOPC_ReturnStatus SOPC_Event_SetLocalTime(SOPC_Event *pEvent, const OpcUa_TimeZoneDataType *pLocalTime)
Sets the given LocalTime for the given event indicating the Offset and the DaylightSavingInOffset of ...
size_t SOPC_Event_GetNbVariables(SOPC_Event *event)
Returns the number of event variables in the given event.
void SOPC_Event_ForEachVar_Fct(const char *qnPath, SOPC_Variant *var, const SOPC_NodeId *dataType, int32_t valueRank, uintptr_t user_data)
Type of callback functions for SOPC_Event. The value of user_data is set when calling SOPC_Event_ForE...
Definition sopc_event.h:299
SOPC_ReturnStatus SOPC_Event_SetEventId(SOPC_Event *pEvent, const SOPC_ByteString *pEventId)
Sets the given EventId for the given event.
SOPC_Event * SOPC_Event_CreateCopy(const SOPC_Event *pEvent, bool genNewId)
Copies the provided event in a newly created event.
SOPC_NodeId * SOPC_Event_GetSourceNode(SOPC_Event *pEvent)
Gets the SourceNode for the given event.
SOPC_ReturnStatus SOPC_Event_SetMessage(SOPC_Event *pEvent, const SOPC_LocalizedText *pMessage)
Sets the given Message for the given event indicating a human-readable and localizable text descripti...
void SOPC_Event_Delete(SOPC_Event **ppEvent)
Deletes the content of an Event.
SOPC_DateTime SOPC_Event_GetTime(const SOPC_Event *pEvent)
Get the Time for the given event.
SOPC_ReturnStatus SOPC_Event_SetVariable(SOPC_Event *pEvent, uint16_t nbQnPath, SOPC_QualifiedName *qualifiedNamePathArray, const SOPC_Variant *var)
Sets the given variable value for the given browse path in the given event.
SOPC_ReturnStatus SOPC_Event_SetReceiveTime(SOPC_Event *pEvent, SOPC_DateTime receiveTime)
(Internal purpose only) Sets the given ReceiveTime for the given event indicating the time the event ...
SOPC_ReturnStatus SOPC_Event_SetVariableFromStrPath(SOPC_Event *pEvent, const char *qnPath, const SOPC_Variant *var)
Sets the given variable value for the given browse path (as a string) in the given event.
SOPC_ReturnStatus SOPC_Event_SetSourceNode(SOPC_Event *pEvent, const SOPC_NodeId *pSourceNode)
Sets the given SourceNode for the given event indicating the node of the event source.
void SOPC_Event_Clear(SOPC_Event *pEvent)
Clears the content of an Event.
void SOPC_Event_ForEachVar(SOPC_Event *event, SOPC_Event_ForEachVar_Fct *func, uintptr_t user_data)
Iterates over the event variables, calling the given function for each event variable.
const SOPC_Variant * SOPC_Event_GetVariableAndTypeFromStrPath(const SOPC_Event *pEvent, const char *qnPath, const SOPC_NodeId **outDataType, int32_t *outValueRank)
Gets the variable value and type information for the given browse path (as a string) in the given eve...
const SOPC_NodeId * SOPC_Event_GetEventTypeId(const SOPC_Event *pEvent)
Get the EventTypeId for the given event.
struct _SOPC_Event SOPC_Event
The abstract structure type for an OpcUa event instance that might be triggered from nodes.
Definition sopc_event.h:46
SOPC_ReturnStatus SOPC_Event_SetNodeId(SOPC_Event *pEvent, const SOPC_NodeId *nodeId)
Sets the event/node instance NodeId.
SOPC_ReturnStatus SOPC_Event_SetSourceName(SOPC_Event *pEvent, const SOPC_String *pSourceName)
Sets the given SourceName for the given event indicating the name of the event source.
const SOPC_Variant * SOPC_Event_GetVariableFromStrPath(const SOPC_Event *pEvent, const char *qnPath)
Gets the variable value for the given browse path (as a string) in the given event.
const SOPC_ByteString * SOPC_Event_GetEventId(const SOPC_Event *pEvent)
Get the EventId for the given event.
Definition sopc_builtintypes.h:237
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:192
Definition sopc_builtintypes.h:231
This structure provides string encapsulation.
Definition sopc_builtintypes.h:151
This structure provides variant encapsulation.
Definition sopc_builtintypes.h:377
Definition sopc_types.h:2135