Commit Graph

126 Commits

Author SHA1 Message Date
Julius Pfrommer
17d4a6b908 Stack: Add _clear as a shorter alternative to _deleteMembers
_deleteMembers is so common that we cannot deprecate it. Possibly after
the 0.4 release cycle.
2018-11-17 22:57:25 +01:00
Stefan Profanter
300257c307 Reduce line length of generated datatype code. Fixes #2104 2018-10-30 18:11:26 +01:00
Stefan Profanter
e2d4b0bf03
Merge pull request #2085 from open62541/runtime_custom_types
Custom types at runtime
2018-10-23 10:21:16 +02:00
Stefan Profanter
8f6761686b Correctly handle datatypes with string NodeIds 2018-10-22 17:35:35 +02:00
Julius Pfrommer
49e0a0bb1e Types: Add UA_DataTypeArray as a linked list for client/server 2018-09-28 17:09:22 +02:00
mtenberge
bff2010449 [Review] Fix/cleanup unsafe c names (#2064)
* Escape quotes in (Expanded)NodeIds

(but only if they are not already escaped). Node ID strings are allowed
to contain quotation marks (encoded as " in XML), but they mess up
the generated C strings.

* Strip non-alnum chars from C identifiers

The names of dataTypeNodes may contain unsafe characters, which leads to
invalid C code if they end up in the generated code

* Use C-safe type names for code generation

OPC-UA type names may contain special characters, such as quotes, dots,
spaces etc. They should not end up in the generated code.

* Fix quote-escaping in makeCLiteral and splitStringLiterals

* Re-use makeCLiteral from ..._datatypes

* Separate makeCLiteral and makeCIdentifier
2018-09-19 18:29:49 +02:00
Mark Giraud
12962880f7 deleteMembers now always memsets to 0 2018-08-20 14:46:34 +02:00
zanettea
6d96066155 NodesetGenerator: CharArray is now considered as String (#1974) 2018-08-14 13:54:44 +00:00
Julius Pfrommer
c4217b44e2 Use macro shortcuts for extern "C" declarations in the public API 2018-08-04 16:42:26 +00:00
Julius Pfrommer
a1d520317f Use specific encoding functions for all builtin types
This removes "hacks" for special cases that reduced the binary size a
bit. But this turned out to be problematic when adding JSON encoding.
2018-05-07 22:31:00 +02:00
Julius Pfrommer
426559fa8b simplify generate_datatypes 2018-05-07 22:31:00 +02:00
Julius Pfrommer
bb57e4e5f9 Generated type member descriptions start with upper case 2018-05-07 22:31:00 +02:00
Julius Pfrommer
97a284465a Prepare fine-grained generation of datatype descriptions 2018-04-26 16:02:35 +02:00
Julius Pfrommer
b21808aac1 Always generate opaque types 2018-04-02 01:37:12 +02:00
Julius Pfrommer
12ca35901f simplify the signature for _calcSizeBinary 2018-03-27 06:47:01 +02:00
Stefan Profanter
0568c56d0a
Merge remote-tracking branch 'upstream/0.3' into master_03_merge 2018-03-22 22:56:58 +01:00
Stefan Profanter
fb64f4a9bb Various fixes for doc generation 2018-03-22 17:14:04 +01:00
Julius Pfrommer
0d856f97c1 generate calcSizeBinary for all types 2018-03-22 13:09:02 +01:00
Julius Pfrommer
ef02e88fae simplify generated encoding API 2018-03-22 13:09:02 +01:00
Jose Cabral
9ca5403d47 Add missing ifdef for compiling namespace externally 2018-03-15 09:31:30 +01:00
Jose Cabral
a6b99dc057 Add missing ifdef for compiling namespace externally 2018-03-06 15:48:58 +01:00
StalderT
c586ad73f5 fix nodesetcompiler for cpplint 2018-02-05 22:41:09 +01:00
StalderT
7332a100ee remove unneeded whitespaces (#1552)
* remove unneeded whitespaces

* fix generate_datatypes.py
2018-01-26 14:12:36 +01:00
StalderT
4330edc8f4 be more compliant fix #1362 (fix NS Compiler for opaque type) (#1405)
* be more compliant

* Generates the correct dataType for nodes with an opaque dataType

* don't generate dataType for opaque dataType

* fix UA_TYPES_COUNT

* force valueRank = -1 for scalar VariableNode

* new implementation

* remove iter_opaque_types

* force rebuild
2018-01-17 21:15:15 +01:00
Julius Pfrommer
c4c2c6f316 set executable bit on python scripts 2018-01-06 10:40:42 +01:00
Stefan Profanter
b9346bac3d Fix #1180 ensure enums are 32bit integers
If that's not the case, the error during compile time will be similar to
`error: named bit-field 'static_assertion_failed_enum_must_be_32bit' has zero width`
2017-10-29 16:00:00 +01:00
Johannes Pointner
6cae413bc8 improve help text 2017-10-24 23:31:23 +02:00
Johannes Pointner
46caadc724 remove include for ua_util.h from ua_types_*_generated.c
This include is obsolete since commit 5ec8dd51ec
which moved UA_TYPENAME define to ua_config.h.in
2017-10-24 23:03:20 +02:00
Stefan Profanter
11ec0a4a70
Delay initialization since types may be in list after encoding id 2017-10-12 17:25:07 +02:00
Stefan Profanter
c12c782ff6 Merge pull request #1210 from open62541/hotfix/assert_enums
Fix #1180 ensure enums are 32bit integers
2017-09-17 07:52:41 +02:00
Stefan Profanter
68d9370915
Fix #1180 ensure enums are 32bit integers
If that's not the case, the error during compile time will be similar to
`error: named bit-field 'static_assertion_failed_enum_must_be_32bit' has zero width`
2017-09-16 22:33:20 +02:00
Stefan Profanter
f94a6280f5
Fix compilation with python3 and add python3 to CI
Fix #1213
2017-09-16 22:05:13 +02:00
Stefan Profanter
3ea21ea597
Align CMake and use new parameters for types generator 2017-09-08 20:26:30 +02:00
Thomas Bender
97e741f43a Fixed data type exclusion list in generate_types.py by adding two missing data structures that are already hard-coded present by open62541 C code. This collides on generation of full data type list that is defined by Opc.Ua.Types.bsd (#1086)
* added two missing internal data types to data type exclusion list
collides with generation of full data type list which contains these

* replaced tabs by spaces in python
2017-06-27 10:13:10 +02:00
Julius Pfrommer
6b3186ab5d hide some #ifdefs in a macro 2017-06-02 10:55:54 +02:00
Julius Pfrommer
d1c49761a4 remove offset for encoding 2017-06-01 15:46:26 +02:00
Julius Pfrommer
4f23e1d3bd Merge branch '0.2' 2017-05-03 21:58:09 +02:00
Julius Pfrommer
8133d5e63a simplify generated code 2017-04-24 16:55:51 +02:00
Julius Pfrommer
20b4db46b5 Merge branch '0.2' 2017-02-13 09:55:36 +01:00
FlorianPalm
810db94bca added MPL v2 license to c/h/py files 2017-02-12 08:07:27 +01:00
FlorianPalm
4f3bd82065 Revert "added license note in python files"
This reverts commit 39cb289927.
2017-01-31 18:21:33 +01:00
FlorianPalm
39cb289927 added license note in python files 2017-01-31 17:34:54 +01:00
frax2222
5efd75e5dd Import vs2008 patch from @carljoerger and @frax2222 2017-01-13 12:08:28 +01:00
Julius Pfrommer
e9766c7663 add handling of custom types to the decoding function, client and server 2016-12-23 11:38:43 +01:00
Root-Core
585142f38e Fixed GCC warning suppression (#893)
* Fixed GCC warning suppression

* Fixed pop warning
2016-11-28 16:43:49 +01:00
Stefan Profanter
b42fee2473 DataTypes may have empty members (e.g. DiscoveryConfiguration) (#860)
* DataTypes may have empty members (e.g. DiscoveryConfiguration)

Therefore the members variable has to be defined as NULL instead of empty array

* Simplify PR
2016-10-31 13:39:23 +01:00
Julius Pfrommer
d35b615c8f add documentation of nodes; move generated datatype documentation 2016-09-18 16:00:02 +02:00
Stefan Profanter
99522b216c Fix #769: Wrong NodeIDs offset for BinaryEncoding (#770)
* Fix #769: Wrong NodeIDs offset for BinaryEncoding

* Avoid double loops for finding correct node id

* Remove findDataType

* Disable xmlEncodingId for now
2016-08-26 10:03:28 +02:00
Julius Pfrommer
8799b44ac4 Type handling functions in separate header (#735) 2016-08-01 16:04:53 +02:00
Julius Pfrommer
6258d088db cosmetic: keep lines under 80chars to avoid breaks in the pdf documentation 2016-07-31 21:29:10 +02:00