mirror of
https://github.com/open62541/open62541.git
synced 2025-06-03 04:00:21 +00:00
Also add client to monitoredEvent callback
This commit is contained in:
parent
65db398dcb
commit
3af3d9d969
13
CHANGELOG
13
CHANGELOG
@ -1,6 +1,19 @@
|
||||
This changelog reports changes to the public API. Internal refactorings and bug
|
||||
fixes are not reported here.
|
||||
|
||||
2018-02-05 pro <profanter at fortiss.org>
|
||||
|
||||
* Also pass client to monitoredItem/Events callback
|
||||
|
||||
The UA_MonitoredItemHandlingFunction and UA_MonitoredEventHandlingFunction
|
||||
did not include a reference to the corresponding client used for the call of
|
||||
processPublishResponse.
|
||||
This now also allows to get the client context within the monitored item
|
||||
handling function.
|
||||
|
||||
The API changes are detected by the type-matching in the compiler. So there
|
||||
is little risk for bugs due to unaligned implementations.
|
||||
|
||||
2017-09-07 jpfr <julius.pfrommer at web.de>
|
||||
|
||||
* Make Client Highlevel Interface consistent
|
||||
|
@ -14,7 +14,8 @@ static void stopHandler(int sig) {
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
|
||||
static void
|
||||
handler_events(const UA_UInt32 monId, const size_t nEventFields,
|
||||
handler_events(UA_Client *client,
|
||||
const UA_UInt32 monId, const size_t nEventFields,
|
||||
const UA_Variant *eventFields, void *context) {
|
||||
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "Notification");
|
||||
|
||||
|
@ -617,7 +617,8 @@ UA_Client_Subscriptions_addMonitoredItem(UA_Client *client, UA_UInt32 subscripti
|
||||
|
||||
/* Monitored Events have different payloads from DataChanges. So they use a
|
||||
* different callback method signature. */
|
||||
typedef void (*UA_MonitoredEventHandlingFunction)(const UA_UInt32 monId,
|
||||
typedef void (*UA_MonitoredEventHandlingFunction)(UA_Client *client,
|
||||
const UA_UInt32 monId,
|
||||
const size_t nEventFields,
|
||||
const UA_Variant *eventFields,
|
||||
void *context);
|
||||
|
@ -458,7 +458,7 @@ UA_Client_processPublishResponse(UA_Client *client, UA_PublishRequest *request,
|
||||
continue;
|
||||
}
|
||||
|
||||
mon->handler.eventHandler(mon->monitoredItemId, eventFieldList->eventFieldsSize,
|
||||
mon->handler.eventHandler(client, mon->monitoredItemId, eventFieldList->eventFieldsSize,
|
||||
eventFieldList->eventFields, mon->handlerContext);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user