Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rt-UA
open62541
Commits
3af3d9d9
Commit
3af3d9d9
authored
7 years ago
by
Stefan Profanter
Committed by
Stefan Profanter
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Also add client to monitoredEvent callback
parent
65db398d
master
0.3
1.0
fast_addnodes
feature/nodeids_header
fix/warn_fuzz
github-actions
hotfix/empty_value_nodeset
mqtt_demo
opcua_pubsub_plugfest
pack/1.0
pack/master
pubsub_pr4
simplify_architectures
test_dockerized
test_master
0.3-rc2
0.3-rc1
v1.1-dev
v.1.0.1
v1.0.1
v1.0
v1.0-rc5
v1.0-rc4
v1.0-rc3
v1.0-rc2
v1.0-rc1
v1.0-dev
v0.3.1
v0.3.0
v0.3-rc4
v0.3-rc3
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG
+13
-0
CHANGELOG
examples/tutorial_client_events.c
+2
-1
examples/tutorial_client_events.c
include/ua_client_highlevel.h
+2
-1
include/ua_client_highlevel.h
src/client/ua_client_highlevel_subscriptions.c
+1
-1
src/client/ua_client_highlevel_subscriptions.c
with
18 additions
and
3 deletions
+18
-3
CHANGELOG
View file @
3af3d9d9
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
...
...
This diff is collapsed.
Click to expand it.
examples/tutorial_client_events.c
View file @
3af3d9d9
...
...
@@ -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"
);
...
...
This diff is collapsed.
Click to expand it.
include/ua_client_highlevel.h
View file @
3af3d9d9
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/client/ua_client_highlevel_subscriptions.c
View file @
3af3d9d9
...
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help