Commit Graph

58 Commits

Author SHA1 Message Date
Aadil Jaleel Choudhry edeb1bf16f fix(build): Allow building examples if open62541 is added as submodule to a repo. (#6672) 2024-09-01 19:59:21 +02:00
Julius Pfrommer e907a0ed91 refactor(build): Make UA_ENABLE_AMALGAMATION create the .c/.h pair, but do not build with it 2024-07-04 15:06:17 +02:00
Noel Graf 6375f54f24 fix(examples): Bug fix in the nodeset examples and tests. Added missing header inclusion. 2023-09-22 15:25:49 +02:00
Noel Graf 62caf8b5a6 fix(examples): Bugfix for the evaluation of existing namespaces. (#5903) 2023-09-13 11:43:34 +02:00
Julius Pfrommer 928931ec36 refactor(core): Move architecture-specific definition out of the public headers 2023-07-28 21:42:56 +02:00
Noel Graf 546e0e2c27 feat(nodesetinjector): Integration of the Nodesetinjector into the tests and addition of documentation. 2023-06-01 14:02:58 +02:00
Andreas Ebner 3ca90d0a78 feat(server): New mechanism for automatic nodeset/companion spec injection into the server during the server-init. 2023-06-01 14:02:58 +02:00
basyskom-dege e00fed6c95 feat(CI): Enable alarm conditions example in CI (#5755)
* Enable alarm conditions example. Fix mem leak in testnodeset

* Added timeout in CI to kill a stuck process
2023-05-02 13:19:18 +02:00
Götz Görisch 687adb7c90 fix(refactor): DI/NodeIds file renamed upstream 2023-01-11 17:58:53 +01:00
keba-uso 779e6b7902 feat(plugin): Integration of nodesetLoader functionality within open62541 (#5371) 2022-10-18 21:46:54 +02:00
Jan Murzyn b136af7a6d fix(build): Build examples with open62541 not being a root of the CMake project. (#5359) 2022-10-03 10:26:35 +02:00
Andreas Eckerstorfer 13af9b8688 refactor(core): Remove trailing spaces in code (#5221) 2022-06-24 11:03:25 +02:00
Noel Graf 02f101df73 feat(server) allow UA_NODESET_DIR to be custom defined. (#5138)
This makes it easier for developers to keep all ua-nodesets XML
definitions in a common location.

Signed-off-by: Björn Esser <b.esser@pengutronix.de>

Co-authored-by: Björn Esser <b.esser@pengutronix.de>
2022-06-07 11:04:03 +02:00
Andreas Ebner ea5ae0bf3a feat(ex) add event-type to selected fields 2022-02-16 12:01:50 +01:00
Andreas Ebner 5905d7c56d server(deps) adjusted PLCopen nodeset location 2022-02-15 23:06:44 +01:00
Julius Pfrommer 5de6a2e7c3 Revert "Merge branch 'master' into 1.3"
This reverts commit 2f2b9fea7d, reversing
changes made to 271f3dcb01.
2021-12-18 14:34:34 +01:00
Andreas Ebner 6945f6f093 server(deps) adjusted PLCopen nodeset location 2021-11-17 19:55:58 +01:00
Julius Pfrommer e02855b8d3 fix(build): Adjust the new location of Opc.Ua.Plc.NodeSet2.xml 2021-11-11 07:45:27 +01:00
Götz Görisch 5846a2bd9b fix(deps): rename PLCOpen ref to match new nameing 2021-02-03 20:35:38 +01:00
Silvio Traversaro b34cde0fd5 fix(build): Ensure that open62541_NODESET_DIR is used consistently (#4008) 2020-11-15 17:57:56 +01:00
Stefan Profanter 08acd2d0ab fix(datatype-generator): Cleaning up the NAMESPACE_MAP setting to also inherit it if DEPENDS is used 2020-10-02 17:39:18 +02:00
Stefan Profanter 8103c27992 fix(nodeset-compiler): Use correct namespace mapping to fix ExtensionObject initialization
This also introduces a breaking change as it is now necessary to use the `NAMESPACE_MAP` parameter for the CMake macro, instead of the `NAMESPACE_IDX`.

Up to now, complex extension objects initialized in the nodeset were not correctly set, especially if a data type from an dependent nodeset was used.
2020-10-02 08:36:05 +02:00
andreasebner 3410e045e3 feat(core) Support for structures with optional fields and unions (#3503)
* initial implementation approch for the handling of structures with optional fields and unions

implemented printing structs with optional fields. Tested with optstructs.bsd file.

implemented calculating binary size of structures with optional fields and encoding them. Also implemented printing the right padding for the first member of types with optional fields. Tested with optStructs_test.c

implemented decoding structures with optional fields. Tested with optStructs_test.c

Implemented calculating the binary size of unions. Tested in optStructs_test.c

Implemented encoding and decoding unions. Added returning 4 as binary size, if the SwitchField is too large to avoid later segmentation faults while en-/decoding. Tested with optStructs_test.c

Tested encoding and decoding structs with optional fields and unions with the RtlsLocationResult type from the AutoID nodeset. Works with other clients like UAExpert too now.

Implemented copying and clearing structures with optional fields and unions.

* extended unit testing and examples for unions and optstructs, fixes and cleanups on optstruct and union implementation

* extended custom type example with OPTSTRUCT and UNION

* updated ua-nodeset deps to Tag Errata-1.04.5

* extended nodeset-compiler test with the AutoID companion specification

* reimplemented union representation to match the OPC UA Standard sugestion Part 5 5.2.8 (1.04)

added nodeset compiler support for the new internal union structure

* reimplemented optional struct with internal pointer based representation

added support for the new internal optstruct representation to the nodeset compiler, removed unnecessary type export of union enum field

extended clearStructure function to handle structures with optional fields

* added support for the use of arrays as an optional field

* fixed encoding mask issue, extended read service type-description with the isOptional field and the union type, extended custom types client and server example with arrays, OptStruct and union, removed implementation comments

* added the union datatype to the reduced information model (enables the usage of unions in combination with the reduced information model)

* added UA_ prefix to enum, moved mask copy operation before bail out the funtion

* reduced checks in critical path, added some comments

* fixed horizontal comment alignment

created defined for the binary encoding id for each type

* unify redundant padding logic

Co-authored-by: Grigory Fridman <grigoryfridman@gmail.com>
Co-authored-by: Julius Pfrommer <julius.pfrommer@web.de>
2020-05-02 10:20:10 +02:00
Stefan Profanter ac16287c86 feat(nodeset-compiler): Add support for Structure inside Extension Object 2020-01-21 10:08:11 +01:00
Stefan Profanter 33c93905da fix(cmake): Add IMPORT_BSD option from generate_datatypes to upper generate_ns_and_datatypes 2019-12-09 12:28:20 +01:00
Stefan Profanter addf2adfae fix(ns): Rename Minimal.xml to Reduced.xml to match CMake options
See also #3232
2019-11-08 20:08:09 +01:00
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02:00
Stefan Profanter fcbbf7db7a CMake: Copy missing files to build dir to allow usage of -Dopen62541_DIR 2019-04-05 12:15:36 +00:00
Stefan Profanter 63f3653ff1 Additional header cleanup and consistent name of ns generated files 2019-03-21 20:16:31 +01:00
Stefan Profanter f29e3349bf Examples: Use generated list of sources for nodeset 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
jrcoding 1c13dc59f6 Examples: Support standalone build of examples 2019-02-28 09:07:40 +01:00
Stefan Profanter 7ea5a142ba Examples: Set correct target dependency 2019-02-27 11:43:53 +01:00
matkonnerth 6afa8c0fdf NodesetCompiler: enhancement for extension objects, array initialization
changes to testnodeset.xml
	geändert:       ../examples/nodeset/testnodeset.xml

NodesetCompiler: generate code for array within ExtensionObject

first prototype

generate nested array code

prototype nested array

added array1size

fix nodeset.xml

nodes

get the right type array

fixed datatypes.py

cleanup

cleanup debug comments

remove whitespace

remove trailing whitespaces
2019-02-25 18:26:14 +01:00
Julius Pfrommer e2df239750 CMake: Make the default examples not depend on the ua-nodeset submodule 2019-02-20 17:40:10 +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
Frank Meerkoetter 126a8820e6 Remove misleading/outdated comments 2019-02-05 07:58:15 +01:00
Frank Meerkoetter f94a12cb9a fix copy&paste from plcopen 2019-02-05 07:58:15 +01:00
Frank Meerkoetter ba2616e0f1 Spelling and whitespace fixes 2019-02-05 07:58:15 +01:00
engel b2204508d3 powerlink example 2019-01-31 13:47:40 +01:00
matkonnerth bbafc24568 Provide information for ExtensionObject decoding via DataTypeDictionaryType 2019-01-10 17:24:48 +01:00
matkonnerth b864e0e03c Nodeset-Compiler: Remove binary encoding from namespace generation 2019-01-09 17:52:45 +01:00
Stefan Profanter 36641ad6a5 cmake: Remove UA_NO_AMALGAMATION and use UA_ENABLE_AMALGAMATION instead
Since default build is without amalgamation, we should assume that and only
ifdefs is amalgamation is enabled
2018-12-19 01:59:38 +01:00
Stefan Profanter d715db1057 Stack: Use non-amalgamated headers in all the examples
For consistency we recommend using non-amalgamation install, thus the
examples should also use the non-amalgamated headers.
2018-12-17 22:40:07 +01:00
Stefan Profanter 4b2c73cd54 CMake: Add specific target for nodeid header generator 2018-12-04 14:50:45 +01:00
Stefan Profanter 05d4cd4f45 CMake: Correctly handle generation macros when installed 2018-12-04 14:50:45 +01:00
Stefan Profanter a17733c46c Add ua_generate_nodeset_and_datatypes macro to simplify nodeset generation 2018-11-05 15:40:11 +01:00
Stefan Profanter 7d5be84376 NodesetCompiler: Add ua_generate_nodeset CMake macro
This makes nodeset compilation easier by providing a wrapper macro.
2018-11-05 15:40:11 +01:00
Stefan Profanter 0840848622 NodesetCompiler: Add ua_generate_datatypes CMake macro
This macro simplyfies the usage of the generate_datatypes.py script
2018-11-05 15:40:11 +01:00
Jose Cabral 1605455a74 Fixes #1925 and clean examples 2018-07-25 08:17:51 +02:00