* Update src/server/ua_subscription_events.c
* Alarms and Conditions First Implementation
implemented facets:
1- A&C Base Condition Server Facet (only mandatory)
2- A&C Enable Server Facet (only mandatory)
3- A&C Alarm Server Facet (only mandatory)
4- A&C Acknowledgeable Alarm Server Facet (complete, with ConfirmedState and Confirm Method)
Notes:
1) Change in ua_subscriptions_monitoreditem.c is related to issue #2114. Without that fix, the server crashes when generating OverflowEvents.
2) The Events: RefreshStart and RefreshEnd are abstract according to the specification. So to make it possible to create instances of them the fix in function "create_event()" is added (change abstract attribute of the EventType to false).
@basysKom-jvoe, I will be glad if you help reviewing the code:)
* some fixes
Update src/server/ua_subscription_alarms_conditions.c
* correcting example name
adding function prototype
* some fixes
1) keep events and A&C disabled and NS0 reduced in main CMakeLists
2) enable A&C in test scripts (Travis and Veyor)
* Update ua_subscription_alarms_conditions.c
fix som error handling
* Update ua_subscription_alarms_conditions.c
* fixing issues from first review
1) calculate size of array
2) correct misspelling
3) correct some comments
* Update ua_subscription_alarms_conditions.c
to retrigger travis test.
14 - subscription_events test fails randomly!
* fix memory leak issues
the function UA_NodeId_copy was used multiple times, however, the memory allocated is not freed because only numeric NodeIds were used in testing. So using nun numeric NodeIds will cause memory leak.
Next commit/version should fix that issue.
* review fixes: comments 1 and 2
1) use new server logger function (PR rebase).
2) use values instead of pointers in A&C API functions for consistency
* Review: reduce indent
reducing indent by using "continue" inside if statements in loops
* Update tutorial_server_alarms_conditions.c
modify includes
* update to upstream master and fix some A&C Module issues
* fix CI test and some review issues
* fix some review issues
the previous commits fix issues mentioned in comments:
- https://github.com/open62541/open62541/pull/2083#discussion_r241070233
- https://github.com/open62541/open62541/pull/2083#discussion_r241072127
- https://github.com/open62541/open62541/pull/2083#discussion_r241076137
- https://github.com/open62541/open62541/pull/2083#discussion_r241076137
- https://github.com/open62541/open62541/pull/2083#discussion_r241079915
- https://github.com/open62541/open62541/pull/2083#discussion_r241082415
- https://github.com/open62541/open62541/pull/2083#discussion_r241083539
- https://github.com/open62541/open62541/pull/2083#discussion_r284586642
- https://github.com/open62541/open62541/pull/2083#discussion_r284587406
- https://github.com/open62541/open62541/pull/2083#discussion_r284589129
not resolved yet, need further discussion:
- https://github.com/open62541/open62541/pull/2083#discussion_r241072659
- https://github.com/open62541/open62541/pull/2083#discussion_r241075205
* some modification after rebase
* remove unused code + some fixes
* some fixes and modifications
changes:
- fix conflicting variable names
- pass FieldNames directly without help variable in
"UA_Server_setConditionField"
- remove unused code
- add some comments
- correct indentation
* fix issues mentioned in review
* enable setting ConditionId when creating Condition Instances
* fix issues based on review
- pass variant instead of void* and type when setting Condition Fields and their Properties.
- Change RefreshEvents IsAbstract attribute to "False" when creating the Condition instead of doing that when generating the event.
- comment issue #2114 fix out (it seems to work fine after recent commits).
- modify A&C example according to changes.
* use A&C public API to set condition fields and properties
* check for Null pointer before comparing NodeIds
Co-Authored-By: andr <aandranikk@gmail.com>
* correct Typo
Co-Authored-By: andr <aandranikk@gmail.com>
* rebase + fix issues from review
some issues need further discussion before fixing them. Please see:
https://github.com/open62541/open62541/pull/2083#discussion_r326857289https://github.com/open62541/open62541/pull/2083#discussion_r326857373
* fixup after rebase
* implement a first version of events
events are briefly stored as nodes, enabling the developer to easily set attributes. Upon triggering the event the filter is immediately applied
* added copyright
* various fixes for events
proper license, full function names in comments and small improvements to comprehension in tutorial_server_events.c. Added a message for when an EventFiler cant be malloc'd. Name improvement for the lists generated by callForEachChild. Events no longer have a name and description. Declared methods only used in subscription_events.c as static.
* further fixes for events
Rename UA_ENABLE_EVENTS to UA_ENABLE_SUBSCRIPTION_EVENTS. Do not #include <queue.h> in ua_plugin_nodestore.h. Ensure either ChangeNotify or EventNotify are being passed to a monitored item. Traded several pointers for their actual objects. Added constness to the public API. Events can only be enabled together with subscriptions and the full ns0
* Fix problems being caused in check_client_subscriptions
* even more fixes for events
removed useless backslashes for the monitoredItemList declaration, moved comment outside of the define for UA_EVENT_ATTRIBUTES, added UA_EXPORT to the declaration of UA_Server_createEvent and UA_Server_triggerEvent, renamed outId to outEventId, fixed up argument definitions for the functions, moved the generation of the overflow event to server_ns0.c, added catches for NULL as return parameters, EventId is returned in createEvent. Fixed up tutorial.
* solve merge conflicts
* fixup api