Commit Graph

20 Commits

Author SHA1 Message Date
Julius Pfrommer 545625b79f refactor(doc): Remove the realtime publisher tutorials from the generated PDF -- not of common interest 2023-01-18 16:34:36 +01:00
Selva Suba Jenifer Joseph 563b150def doc(pubsub): Add documentation for PubSub
- Tutorial subscribe example
 - Pubsub realtime examples
 - Pubsub nodeset realtime examples

Change-Id: I75b2581f87ccd0179d817c124b3e85c9de9b4d3a
2021-01-22 12:49:23 +01:00
Sameer AL-Qadasi ff87c2876d (feat): First Implementation of Alarms and Conditions (#2083)
* 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_r326857289
https://github.com/open62541/open62541/pull/2083#discussion_r326857373

* fixup after rebase
2019-12-17 20:28:40 +01:00
Julius Pfrommer ca54e72363 Docs: Fix generation for headers that end with _UA_END_DECLS 2019-04-07 14:21:21 +02:00
Ari 81a1ed350e [FEATURE] First implementation of events (#1739)
* 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
2018-05-23 17:42:08 +02:00
Andreas Ebner 79cb8c68b8 Add pubsub publish callback mechanism 2018-04-23 06:47:10 +02:00
Julius Pfrommer 78538baae7 add server-config to the docs 2018-01-24 17:51:03 +01:00
Julius Pfrommer 68402c5ff6 use compilable examples for the tutorials 2017-03-05 15:23:45 +01:00
Julius Pfrommer 94c30b74ca generate tutorial docs from compilable c-files 2017-02-09 22:18:45 +01:00
Julius Pfrommer b86c4e7be5 fix include of c files in documentation; improve handling of toc 2016-09-21 16:29:41 +02:00
Julius Pfrommer 392217167f improve documentation and html/latex generation 2016-09-18 23:10:35 +01:00
Julius Pfrommer a895cf8030 use single-file release in documentation; fold unused tutorial files into the documentation 2016-06-27 07:43:59 +02:00
Markus Graube 7279410a21 Fix typos in documentation 2015-09-08 10:32:44 +02:00
Stasik0 8721538bbf fixing unicode chars in tutorials, toc, to get good pdfs 2015-09-04 21:50:17 +02:00
FlorianPalm 849e4da667 Update tutorials.rst
fixed typo
2015-09-04 14:49:45 +02:00
FlorianPalm 2f5365044c Update tutorials.rst
added link to noderelations tutorial
2015-09-04 14:05:04 +02:00
Stasik0 55eaf1c6c4 adding tutorials for variable nodes and methods 2015-09-04 13:37:10 +02:00
Stasik0 5cbad447af finished client first steps tutorial with reading nodes's values 2015-09-02 22:18:03 +02:00
Stasik0 6f66ea3ab1 started writing tutorial for first steps in client 2015-09-02 17:53:46 +02:00
Stasik0 6c957a5f07 documentation: added a tutorials subsection, added firstSteps tutorial to the index 2015-09-01 17:26:38 +02:00