Commit Graph

38 Commits

Author SHA1 Message Date
Julius Pfrommer 5bf6f0c3e7 refactor(pubsub): Remove the old direct-access API
The public Offset Table API should be used for realtime operations on
the NetworkMessages instead.
2025-01-19 22:33:50 +01:00
Julius Pfrommer 450f8ac8d6 refactor(pubsub): Remove the unused "enabled" parameters in the config 2024-09-09 23:20:32 +02:00
Julius Pfrommer 8370f7a6bb refactor(examples): Simplify the PubSub component state handling in the examples 2024-09-09 23:20:32 +02:00
Julius Pfrommer 705801a55c refactor(examples): Use the NS0ID shorthand in the examples 2024-07-26 08:30:16 +02:00
Julius Pfrommer 2b0d4890e7 refactor(pubsub): Use the same type for the PublisherId everywhere 2024-04-21 13:39:42 +02:00
Vasilij Strassheim 0a67c35dd2 feat(ex): add interface argument usage for udp pubsub
Without defined key value for interface only the default interface will
join the multicast group due to INADDR_ANY address in setsockopt.
The additional argument makes it easier to use other interfaces.

Signed-off-by: Vasilij Strassheim <v.strassheim@linutronix.de>
2023-10-02 20:25:40 +02:00
Julius Pfrommer 3e926f4404 Merge remote-tracking branch 'origin/1.4' into merge_14_master_4 2023-09-26 08:23:04 +02:00
Florian Kauer c68f2a020d fix(ex): add missing headers
In 928931ec36 ("refactor(core): Move architecture-specific definition out of the public headers"),
headers were removed from the core headers, so some examples do no
longer build. Therefore, add them directly.

Fixes: 928931ec36 ("refactor(core): Move architecture-specific definition out of the public headers")
Signed-off-by: Florian Kauer <florian.kauer@linutronix.de>
2023-09-13 19:10:24 +02:00
Gaurav Kumar Singh 5c979cd8c5 feat(pubsub) overhaul pubsub state machine, states, api, tests
* feat(pubsub): Add DSR state to pubsub-reduced namespace

* feat(pubsub) add preoperantiol-state for DataSetReaders

* feat(pubsub) DSR state representation added to information model

* feat(pubsub): Fix test to use pre-operational state

* feat(pubsub): Add state variable for Reader/WriterGroup and DataSetWriter

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* feat(pubsub): Add Pre-Operational state for WG and DSW

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* feat(pubsub) Revise state machine for Reader/WriterGroups based on proposal

- Add enableReader/WriterGroup API
- Add enableDataSetReader/Writer API
- Add automatic transitions from Pre-Operational to Operational
  based on connections and securitytoken configuration

* feat(pubsub) Add test cases for state changes

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* feat(pubsub): Fix for pubsub tests to handle correct state changes

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* feat(pubsub): Update examples to support enable APIs

* feat(pubsub): Update flow for key assignment via SKS

- Remove Operational APIs for Reader/WriterGroup
- Add API to ActivateKeys to channel
- Update SKS tests and Example application to use
the new API

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* feat(pubsub): Add component interaction table for the puusub components

Signed-off-by: Gaurav Kumar Singh <gk.singh@be-services.com>

* fix(eventloop): Release lock before Shutdown
2023-07-28 10:01:14 +02:00
Julius Pfrommer 0841ce9f95 refactor(examples): Remove plugin/pubsub.h API from the examples 2023-06-16 18:52:25 +02:00
Julius Pfrommer 4b8ec01827 refactor(examples): Use UA_Server_runUntilInterrupt in examples 2023-01-15 17:34:17 +01:00
Andreas Eckerstorfer fd76d7faae feat(pubsub): Support all publisherId types
Previously only UINT16 publisherId was fully supported.
Now all PublisherId types are supported except for
string PublisherIds in combination with fast-path.
2022-07-07 14:18:52 +02:00
Julius Pfrommer a73c53cd8a fix(doc): Fix Sphinx doc build warnings 2022-02-01 20:44:02 +01:00
Julius Pfrommer 829f8296c0 refactor(tests): Simplify the configuration of PubSub TransportLayers 2021-03-31 12:53:40 +02:00
Suriya Narayanan Parthasarathi Vimala 61927b5664 refactor(pubsub): Shared libs support to subscriber samples
- External API usage of regist has heen removed
 - Used regist in addReaderGroup API
 - Resolve compile errors in nodeset pubsub realtime samples

Change-Id: I2e9a2b43f5d0be33bbc75b09901b1dc7ca1aa80b
2021-02-17 10:14: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
Suriya Narayanan Parthasarathi Vimala aa39b0fd94 refactor(pubsub): Update removal of ETF in docs
- change from u64 to UA_UInt
 - added writerGroupConfig_clear API
 - modified nodeset examples

Change-Id: I63d09a2e9834a718057671a848b8620b59e050bc
2020-12-11 13:21:57 +01:00
Suriya Narayanan Parthasarathi Vimala a1379274c0 refactor(pubsub): remove direct hardcoding of subscribe interval and socket timeout
- setdefaultconfig for readergroup has been created

Change-Id: I7f84cae9af4b9ceb02f690efb130efe6e4119845
2020-12-11 13:21:57 +01:00
Suriya Narayanan Parthasarathi Vimala a90b2cd06c refactor(pubsub): Move TargetVariables to DSR config
- UpdateDSRconfig modified to support DSWId, WGId and TargetVars
 - Test cases for updateDSRconfig added
 - addTargetVariables API has been modified to createDataSetMirror
   and commented in the stack for the future usage of mirror variables

Signed-off-by: Suriya Narayanan Parthasarathi Vimala <suriyanarayanan.pv@kalycito.com>
Change-Id: Ib28fea194897f3e4f1a457ba5dde5f9ff00976d8
2020-09-09 12:22:02 +02:00
Suriya Narayanan Parthasarathi Vimala cde9288165 feat(PubSub): PubSub states for subscriber - RG and DSR
- PubSub states for ReaderGroup and DataSetReader
 - subscriberCallback moved into setReaderGroupOperational API
 - readerGroup has to be in operational to subscribe packets

Change-Id: Ibae6b6a9cf7937917d36ccbdb1e94e2d3c5425a7
2020-05-19 12:34:33 +02:00
Selva Suba Jenifer Joseph 43574aa883 PubSub: DataSetReader parameters check in Subscriber
- Check identifiers to direct DataSetMessage to desired DataSetReader
     - PublisherId
     - WriterGroupId
     - DataSetWriterId

Change-Id: Ibfa48d45833a6629134f89648b675441a32f39b9
2019-08-20 15:50:26 +02:00
Selva Suba Jenifer Joseph 3e3c7221c5 PubSub:Fix Regist fail when adding multiple ReaderGroups
- Add separate function for channel register
 - Call regist function in PubSubConnection and not in addReaderGroup
   to resolve regist fail when adding multiple ReaderGroups
 - Change return type of example API to handle statuscodes

Change-Id: I58ecec6af6cae2a9427b620241e08c7880b10ef7
2019-08-20 15:50:26 +02:00
Thomas Jürges 8268e5bb09 Fix: Correct boolean check on input parameters 2019-08-02 13:32:57 +02:00
Thangavaila Kalyani Thangaraja e1cd691653 [FIX] PubSub: Resolve memory leak in tutorial_pubsub_subscribe.c
- Remove temporary variable to assign the name for DataSetMetaData
   and FieldMetatData

Change-Id: I1b98e5ee46bc0fea82f9163fb18881099eaacd08
2019-08-01 08:04:29 +02:00
Selva Suba Jenifer Joseph f3221a805d [FIX] PubSub: Change Int32 to Int64 in Subscriber MetaData
Change-Id: If75f816e1c731fd31973b8f0d03469a459f43a6b
2019-07-12 19:16:44 +02:00
Diesilva Sagaya James b73d720b09 [FEATURE] Subscriber implementation
- Add ReaderGroup, DataSetReader, TargetVariable functionality
 - Data filtered from DataSetReader gets updated in target variable
   available in information model
 - Mirrortype implementation not handled

Change-Id: I990b4552b979fdcc76c172a07f7b245fee7d03eb
2019-06-06 15:02:08 +02:00
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02:00
Stefan Profanter 63f3653ff1 Additional header cleanup and consistent name of ns generated files 2019-03-21 20:16:31 +01:00
Julius Pfrommer c9c818868f Move header files to a more unix-like structure
This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
2019-03-21 20:16:31 +01:00
Andreas Ebner af8c26f7d1 pubsub improvements
pubsub improvements

pubsub improvements
2019-02-20 11:30:20 +01:00
Frank Meerkoetter 1648fb8aaa Use EXIT_SUCCESS/FAILURE for the examples
Make use of EXIT_SUCCESS and EXIT_FAILURE from stdlib.h.
The previous approach of returning a value from UA_StatusCode
was often broken as an exit code can (portably) only be between 0 and 125.
2019-02-09 09:34:46 +01:00
Julius Pfrommer eb9409b435 Examples: Use _clear instead of _deleteMembers for the examples 2018-12-09 19:40:02 +01:00
Julius Pfrommer 564ad73257 Examples: Limit line length of PubSub tutorials for the HTML docs 2018-10-15 09:48:37 +02:00
Rudolf Hoyler 02e401c4e6 PubSub: Add layer 2 plugin
Signed-off-by: Rudolf Hoyler <rudolf.hoyler@kontron.com>
Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
Signed-off-by: Michael Walle <michael.walle@kontron.com>
2018-10-15 09:48:37 +02:00
andreasebner cf8a55353f Enable PubSub tests and static code analysis (#1833)
* enable PubSub tests and static code analysis

* changed cleanup order
2018-08-31 11:31:58 +02:00
Jose Cabral 1605455a74 Fixes #1925 and clean examples 2018-07-25 08:17:51 +02:00
Julius Pfrommer b040314739 Improve PubSub subscriber example (#1811)
* PubSub: Fix memleaks in subscriber tutorial

* PubSub: Stack-allocate in the subscriber tutorial

* PubSub: In subscriber tutorial, evaluate receive error code; quit early

* PubSub: In subscriber example, use logging API instead of printf

* PubSub: Reduce the max indendation of the subscriber example; Add comments

* PubSub: Use short blocking wait times in subscriber example

* PubSub: Reduce the max line length in the subscriber example
2018-05-28 20:11:01 +02:00
Andreas Ebner 6aeb2fddf6 Added first part of the pubsub information model representation 2018-05-27 18:56:04 +02:00