S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
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
94
104
114
123
136
150
161
172
182
198 uint16_t nbQnPath,
199 SOPC_QualifiedName* qualifiedNamePathArray,
200 const SOPC_Variant* var);
201
215
224const SOPC_Variant* SOPC_Event_GetVariableFromStrPath(const SOPC_Event* pEvent, const char* qnPath);
225
240 uint16_t nbQnPath,
241 SOPC_QualifiedName* qualifiedNamePathArray,
242 const SOPC_NodeId** outDataType,
243 int32_t* outValueRank);
244
257 const char* qnPath,
258 const SOPC_NodeId** outDataType,
259 int32_t* outValueRank);
260
265typedef void SOPC_Event_ForEachVar_Fct(const char* qnPath,
266 SOPC_Variant* var,
267 const SOPC_NodeId* dataType,
268 int32_t valueRank,
269 uintptr_t user_data);
270
281void SOPC_Event_ForEachVar(SOPC_Event* event, SOPC_Event_ForEachVar_Fct* func, uintptr_t user_data);
282
283#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:160
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 ...
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:265
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_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_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.
Definition sopc_builtintypes.h:234
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:189
Definition sopc_builtintypes.h:228
This structure provides string encapsulation.
Definition sopc_builtintypes.h:148
This structure provides variant encapsulation.
Definition sopc_builtintypes.h:374
Definition sopc_types.h:2133