Check-in [b91165744e]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge with trunk
Timelines: family | ancestors | descendants | both | wtf-8-experiment
Files: files | file ages | folders
SHA1: b91165744e22bbb08eed4bbc9283c229f221a97d
User & Date: chw 2021-02-20 14:21:52.449
Context
2021-02-21
07:11
merge with trunk check-in: 1e77db153a user: chw tags: wtf-8-experiment
2021-02-20
14:21
merge with trunk check-in: b91165744e user: chw tags: wtf-8-experiment
14:19
update open62541 to version 1.2 and topcua to version 0.3 check-in: 8e7590bfe2 user: chw tags: trunk
2021-02-15
15:57
merge with trunk check-in: a347a17f65 user: chw tags: wtf-8-experiment
Changes
Unified Diff Ignore Whitespace Patch
Name change from assets/topcua0.2/pkgIndex.tcl to assets/topcua0.3/pkgIndex.tcl.
1
2
3
4
package ifneeded topcua 0.2 [subst {
    load libtopcua[info sharedlibextension] topcua
    source [list [file join $dir topcua.tcl]]
}]
|



1
2
3
4
package ifneeded topcua 0.3 [subst {
    load libtopcua[info sharedlibextension] topcua
    source [list [file join $dir topcua.tcl]]
}]
Name change from assets/topcua0.2/topcua.tcl to assets/topcua0.3/topcua.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

43
44
45
46
47
48

49
50
51
52
53

54
55
56
57
58
59
60
# topcua.tcl --
#
# Library functions of a proof of concept Tcl binding to the
# open62541 OPC UA library (client and server).
#
# Copyright (c) 2018-20 Christian Werner <chw at ch minus werner dot de>
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

namespace eval ::opcua {

    # Internal tree walker for "tree" and related procs.

    proc _walk {handle nodeid browsename dispname nodeclass
		    refnodeid typenodeid result {level 0} {path {}}} {
	if {$level > 32} return
	if {[lsearch -exact $path $nodeid] >= 0} return
	upvar $result ret
	set path [concat $path $nodeid]
	lappend ret $level $nodeid $browsename $dispname \
	    $nodeclass $refnodeid $typenodeid $path
	if {$nodeclass eq "Variable"} return
	incr level
	foreach {n b d c r t} [lsort -stride 6 -index 1 \
		[browse $handle $nodeid Forward /]] {
	    if {$b eq "FolderType"} continue
	    _walk $handle $n $b $d $c $r $t ret $level $path
	}
    }

    # Return a list of the address space resembling the
    # tree view of UAExpert. List layout adds level column
    # to "opcua::browse ..." list:
    #
    #   level        - 0 is Root, 1 is Objects etc.
    #   nodeid       - the node identifier, e.g. "ns=1;i=99"
    #   browsename   - name of node for browsing
    #   dispname     - name of node for display
    #   nodeclass    - class of node, e.g. "Variable"
    #   refnodeid    - reference node identifer
    #   typenodeid   - type node identifier


    proc tree {handle {root {}}} {
	set ret {}
	set ref [reftype References]
	if {$root eq {}} {
	    set root [root]

	    set org [reftype Organizes]
	    set type [translate $handle $root \
		/ Types / ObjectTypes / BaseObjectType / FolderType]
	} else {
	    set org $ref

	    if {[catch {read $handle $root DataType} type]} {
		switch [read $handle $root NodeClass] {
		    Object {
			set type [translate $handle [root] \
				/ Types / ObjectTypes / BaseObjectType]
		    }
		    DataType {





|









|





|





|














>






>





>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# topcua.tcl --
#
# Library functions of a proof of concept Tcl binding to the
# open62541 OPC UA library (client and server).
#
# Copyright (c) 2018-2020 Christian Werner <chw at ch minus werner dot de>
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

namespace eval ::opcua {

    # Internal tree walker for "tree" and related procs.

    proc _walk {handle nodeid browsename dispname nodeclass
		    refnodeid typenodeid pnodeid result {level 0} {path {}}} {
	if {$level > 32} return
	if {[lsearch -exact $path $nodeid] >= 0} return
	upvar $result ret
	set path [concat $path $nodeid]
	lappend ret $level $nodeid $browsename $dispname \
	    $nodeclass $refnodeid $typenodeid $pnodeid $path
	if {$nodeclass eq "Variable"} return
	incr level
	foreach {n b d c r t} [lsort -stride 6 -index 1 \
		[browse $handle $nodeid Forward /]] {
	    if {$b eq "FolderType"} continue
	    _walk $handle $n $b $d $c $r $t $nodeid ret $level $path
	}
    }

    # Return a list of the address space resembling the
    # tree view of UAExpert. List layout adds level column
    # to "opcua::browse ..." list:
    #
    #   level        - 0 is Root, 1 is Objects etc.
    #   nodeid       - the node identifier, e.g. "ns=1;i=99"
    #   browsename   - name of node for browsing
    #   dispname     - name of node for display
    #   nodeclass    - class of node, e.g. "Variable"
    #   refnodeid    - reference node identifer
    #   typenodeid   - type node identifier
    #   pnodeid      - parent node identifier

    proc tree {handle {root {}}} {
	set ret {}
	set ref [reftype References]
	if {$root eq {}} {
	    set root [root]
	    set pn {}
	    set org [reftype Organizes]
	    set type [translate $handle $root \
		/ Types / ObjectTypes / BaseObjectType / FolderType]
	} else {
	    set org $ref
	    set pn [parent $handle $root]
	    if {[catch {read $handle $root DataType} type]} {
		switch [read $handle $root NodeClass] {
		    Object {
			set type [translate $handle [root] \
				/ Types / ObjectTypes / BaseObjectType]
		    }
		    DataType {
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	# keep only the nodeid
	set type [lindex $type 0]
	# read BrowseName attribute yields QualifiedName
	set bname [read $handle $root BrowseName]
	# read DisplayName attribute yields LocalizedText
	# but we want the text part only here
	set dname [dict get [read $handle $root DisplayName] text]
	_walk $handle $root $bname $dname Object $org $type ret
	# remove duplicates by path
	array set x {}
	set nodup {}
	foreach {l n b d c r t path} $ret {
	    if {[::info exists x($path)]} {
		continue
	    }
	    incr x($path)
	    lappend nodup $l $n $b $d $c $r $t
	}
	return $nodup
    }

    # Similar to tree, but make path like layout as in
    # "browsepath nodeid nodeclasspath refnodeid typenodeid ...", e.g.
    #







|



|




|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
	# keep only the nodeid
	set type [lindex $type 0]
	# read BrowseName attribute yields QualifiedName
	set bname [read $handle $root BrowseName]
	# read DisplayName attribute yields LocalizedText
	# but we want the text part only here
	set dname [dict get [read $handle $root DisplayName] text]
	_walk $handle $root $bname $dname Object $org $type $pn ret
	# remove duplicates by path
	array set x {}
	set nodup {}
	foreach {l n b d c r t pn path} $ret {
	    if {[::info exists x($path)]} {
		continue
	    }
	    incr x($path)
	    lappend nodup $l $n $b $d $c $r $t $pn
	}
	return $nodup
    }

    # Similar to tree, but make path like layout as in
    # "browsepath nodeid nodeclasspath refnodeid typenodeid ...", e.g.
    #
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    proc ptree {handle {root {}}} {
	set ret {}
	set pp {}
	set cc {}
	set last_b {}
	set last_c {}
	set i -1
	foreach {l n b d c r t} [tree $handle $root] {
	    if {$l > $i} {
		set i $l
		lappend pp $last_b
		lappend cc $last_c
	    } elseif {$l < $i} {
		set diff [expr {$i - $l}]
		set i $l
		set pp [lrange $pp 0 end-$diff]
		set cc [lrange $cc 0 end-$diff]
	    }
	    set last_b $b
	    set last_c $c
	    set br $pp
	    lappend br $b
	    set cl $cc
	    lappend cl $c
	    lappend ret [join $br /] $n [join $cl /] $r $t
	}
	return $ret
    }

    # Return a list of child nodes given parent.

    proc children {handle nodeid} {







|
















|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
    proc ptree {handle {root {}}} {
	set ret {}
	set pp {}
	set cc {}
	set last_b {}
	set last_c {}
	set i -1
	foreach {l n b d c r t pn} [tree $handle $root] {
	    if {$l > $i} {
		set i $l
		lappend pp $last_b
		lappend cc $last_c
	    } elseif {$l < $i} {
		set diff [expr {$i - $l}]
		set i $l
		set pp [lrange $pp 0 end-$diff]
		set cc [lrange $cc 0 end-$diff]
	    }
	    set last_b $b
	    set last_c $c
	    set br $pp
	    lappend br $b
	    set cl $cc
	    lappend cl $c
	    lappend ret [join $br /] $n [join $cl /] $r $t $pn
	}
	return $ret
    }

    # Return a list of child nodes given parent.

    proc children {handle nodeid} {
170
171
172
173
174
175
176
177


178







179
180
181
182
183
184
185
186

187
188
189
190
191
192
193
194
    # writes these procs (assuming there are Pump_1 and Pump_2 objects
    # each having a Start and a Stop method with zero input arguments):
    #
    #   proc opcua::Pumps::Pump_1/Start {} ...
    #   proc opcua::Pumps::Pump_1/Stop {} ...
    #   proc opcua::Pumps::Pump_2/Start {} ...
    #   proc opcua::Pumps::Pump_2/Stop {} ...



    proc genstubs {handle {strip {}} {substs {}} args} {







	::namespace eval ::opcua::$handle {}
	set all [expr {[llength $args] == 0}]
	set root [root]
	if {$all && ([string first /Root/Objects $strip] == 0)} {
	    # speed up for common place
	    set strip [string range $strip 5 end]
	    set root [lindex [translate $handle $root / Objects] 0]
	}

	foreach {b n c r t} [ptree $handle $root] {
	    if {$strip ne {} && [string first $strip $b] != 0} {
		continue
	    }
	    if {![string match "*Object/Method" $c]} {
		continue
	    }
	    if {$all} {







|
>
>

>
>
>
>
>
>
>








>
|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
    # writes these procs (assuming there are Pump_1 and Pump_2 objects
    # each having a Start and a Stop method with zero input arguments):
    #
    #   proc opcua::Pumps::Pump_1/Start {} ...
    #   proc opcua::Pumps::Pump_1/Stop {} ...
    #   proc opcua::Pumps::Pump_2/Start {} ...
    #   proc opcua::Pumps::Pump_2/Stop {} ...
    #
    # The result is a list of the proc names which were generated.

    proc genstubs {handle {strip {}} {substs {}} args} {
	set ret [dict get [::info frame -1]]
	if {[dict exists $ret proc] &&
	    [dict get $ret proc] eq "::opcua::xgenstubs"} {
	    set call ::opcua::xcall
	} else {
	    set call ::opcua::call
	}
	::namespace eval ::opcua::$handle {}
	set all [expr {[llength $args] == 0}]
	set root [root]
	if {$all && ([string first /Root/Objects $strip] == 0)} {
	    # speed up for common place
	    set strip [string range $strip 5 end]
	    set root [lindex [translate $handle $root / Objects] 0]
	}
	set ret {}
	foreach {b n c r t pn} [ptree $handle $root] {
	    if {$strip ne {} && [string first $strip $b] != 0} {
		continue
	    }
	    if {![string match "*Object/Method" $c]} {
		continue
	    }
	    if {$all} {
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
		# procname will be method path with prefix stripped ...
		set b [string range $b [string length $strip] end]
		# ... and mangled by substitutions
		set st {}
		foreach {re st} $substs {
		    regsub -all -- $re $b $st b
		}
		# the opcua::call object is the method's parent
		set o [parent $handle $n]
		# parameter list for proc
		set plist {}
		# arguments (type and name pairs) for opcua::call
		set alist {}
		if {![catch {translate $handle $n / InputArguments} ia]} {
		    # only nodeid needed
		    set ia [lindex $ia 0]







|
|







219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
		# procname will be method path with prefix stripped ...
		set b [string range $b [string length $strip] end]
		# ... and mangled by substitutions
		set st {}
		foreach {re st} $substs {
		    regsub -all -- $re $b $st b
		}
		# the opcua::call object is the method's parent from ptree
		set o $pn
		# parameter list for proc
		set plist {}
		# arguments (type and name pairs) for opcua::call
		set alist {}
		if {![catch {translate $handle $n / InputArguments} ia]} {
		    # only nodeid needed
		    set ia [lindex $ia 0]
237
238
239
240
241
242
243






244
245
246
247
248
249

250
251
252
253

254
255

256
257
258
259
260
261
262
		    lappend plist $name
		    if {[string match "ns=*;*" $typeid]} {
			# keep identifier
			set type $typeid
		    } elseif {[catch {read $handle $typeid BrowseName} type]} {
			# can't use string name
			set type $typeid






		    }
		    # caution: due to variable reference, need string here
		    append alist " [list $type] \$[list $name]"
		}
		set o [list $o]		;# beware of semicolon in nodeid
		set n [list $n]		;# beware of semicolon in nodeid

		eval [subst -nocommands {
		    proc ::opcua::${handle}::${b} {$plist} {
			tailcall ::opcua::call $handle $o $n $alist
		    }}]

	    }
	}

    }

    # Read *.bsd string for namespaces, enums, structs
    # returning a dictionary with:
    #
    #   namespaces  { prefix uri ... }
    #   enums       { enumname { bit-width itemname value ... } ... }







>
>
>
>
>
>






>

|
|

>


>







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
		    lappend plist $name
		    if {[string match "ns=*;*" $typeid]} {
			# keep identifier
			set type $typeid
		    } elseif {[catch {read $handle $typeid BrowseName} type]} {
			# can't use string name
			set type $typeid
                    }
		    set vr [dict get $in ValueRank]
		    if {$vr >= 0} {
			set type *${type}
		    } elseif {$vr == -1} {
			set type !${type}
		    }
		    # caution: due to variable reference, need string here
		    append alist " [list $type] \$[list $name]"
		}
		set o [list $o]		;# beware of semicolon in nodeid
		set n [list $n]		;# beware of semicolon in nodeid
		set pr ::opcua::${handle}::${b}
		eval [subst -nocommands {
		    proc [list $pr] {$plist} {
			tailcall $call $handle $o ${n}$alist
		    }}]
		lappend ret $pr
	    }
	}
	return $ret
    }

    # Read *.bsd string for namespaces, enums, structs
    # returning a dictionary with:
    #
    #   namespaces  { prefix uri ... }
    #   enums       { enumname { bit-width itemname value ... } ... }
287
288
289
290
291
292
293

294
295
296
297
298
299
300
301
		set ns($pfx) [$root getAttribute $nsx]
	    }
	}
	dict set out namespaces [array get ns]
	set nsl [array names ns]
	if {("opc" ni $nsl) || ("tns" ni $nsl) || ("ua" ni $nsl)} {
	    # need opc, tns, and ua namespace prefixes

	    return -code error "xmlns:opc, xmlns:tns, or xmlns:ua missing"
	}
	# now deal with /opc:TypeDictionary
	set typedict [lindex [$root selectNodes /opc:TypeDictionary] 0]
	# process structs
	array set st {}
	foreach struct [$typedict selectNodes opc:StructuredType] {
	    if {[$struct hasAttribute BaseType]} {







>
|







309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
		set ns($pfx) [$root getAttribute $nsx]
	    }
	}
	dict set out namespaces [array get ns]
	set nsl [array names ns]
	if {("opc" ni $nsl) || ("tns" ni $nsl) || ("ua" ni $nsl)} {
	    # need opc, tns, and ua namespace prefixes
	    return -code error -errorcode {opcua Internal 0 Good} \
		"xmlns:opc, xmlns:tns, or xmlns:ua missing"
	}
	# now deal with /opc:TypeDictionary
	set typedict [lindex [$root selectNodes /opc:TypeDictionary] 0]
	# process structs
	array set st {}
	foreach struct [$typedict selectNodes opc:StructuredType] {
	    if {[$struct hasAttribute BaseType]} {
546
547
548
549
550
551
552




553
554
555
556
557
558
559
560
561
562
563
564
565

    proc gentypes {handle} {
	if {[info $handle] ne "server"} {
	    tailcall _gentypes $handle
	}
	set msaved [methods $handle]
	set ret [catch {_gentypes $handle} err]




	foreach {m t cb} $msaved {
	    # try to restore method output types
	    catch {methods $handle $m $t}
	}
	if {$ret} {
	    return -code $ret $err
	}
    }

    proc _gentypes {handle} {
	foreach {name nodeid encid bsdname} [_getstructs $handle] {
	    set stn($name) $nodeid
	    set enc($name) $encid







>
>
>
>





|







569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592

    proc gentypes {handle} {
	if {[info $handle] ne "server"} {
	    tailcall _gentypes $handle
	}
	set msaved [methods $handle]
	set ret [catch {_gentypes $handle} err]
	if {$ret} {
	    # remember errorCode
	    set ec $::errorCode
	}
	foreach {m t cb} $msaved {
	    # try to restore method output types
	    catch {methods $handle $m $t}
	}
	if {$ret} {
	    return -code $ret -errorcode $ec $err
	}
    }

    proc _gentypes {handle} {
	foreach {name nodeid encid bsdname} [_getstructs $handle] {
	    set stn($name) $nodeid
	    set enc($name) $encid
720
721
722
723
724
725
726

727
728
729
730
731
732
733
734
    #  struct WithArray {
    #    String name
    #    String *values
    #  }

    proc deftypes {handle nsuri defs} {
	if {[info $handle] ne "server"} {

	    return -code error "server handle required"
	}
	set nsidx [namespace $handle $nsuri]
	set nsname [lindex [split [string trimright $nsuri "/"] "/"] end]
	# get /Root/Types/DataTypes/BaseDataType/Structure
	set TF [lindex [translate $handle [root] \
			    / Types / DataTypes / BaseDataType / Structure] 0]
	# get /Root/Types/ObjectTypes/BaseObjectType/DataTypeEncodingType







>
|







747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
    #  struct WithArray {
    #    String name
    #    String *values
    #  }

    proc deftypes {handle nsuri defs} {
	if {[info $handle] ne "server"} {
	    return -code error -errorcode {opcua Internal 0 Good} \
		"not a server handle"
	}
	set nsidx [namespace $handle $nsuri]
	set nsname [lindex [split [string trimright $nsuri "/"] "/"] end]
	# get /Root/Types/DataTypes/BaseDataType/Structure
	set TF [lindex [translate $handle [root] \
			    / Types / DataTypes / BaseDataType / Structure] 0]
	# get /Root/Types/ObjectTypes/BaseObjectType/DataTypeEncodingType
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
		}
		set lf ""
		if {[string index $field 0] eq "*"} {
		    set field [string range $field 1 end]
		    append bsd "  <opc:Field TypeName=\"opc:Int32\""
		    append bsd " Name=\"NoOf$field\" />\n"
		    set lf " LengthField=\"NoOf$field\""
		} 
		append bsd "  <opc:Field TypeName=\"$type\""
		append bsd "$lf Name=\"$field\" />\n"
	    }
	    append bsd " </opc:StructuredType>\n"
	    # add struct below namespace
	    set att [attrs default VariableAttributes]
	    if {[version] < 1.0} {







|







825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
		}
		set lf ""
		if {[string index $field 0] eq "*"} {
		    set field [string range $field 1 end]
		    append bsd "  <opc:Field TypeName=\"opc:Int32\""
		    append bsd " Name=\"NoOf$field\" />\n"
		    set lf " LengthField=\"NoOf$field\""
		}
		append bsd "  <opc:Field TypeName=\"$type\""
		append bsd "$lf Name=\"$field\" />\n"
	    }
	    append bsd " </opc:StructuredType>\n"
	    # add struct below namespace
	    set att [attrs default VariableAttributes]
	    if {[version] < 1.0} {
1227
1228
1229
1230
1231
1232
1233
1234
1235

1236
1237
1238
1239
1240
1241

1242
1243
1244
1245
1246
1247
1248
1249

    # Load nodeset from XML into a opcua server handle.
    # Optional error reports are written to the caller's variables
    # "evar" (for node information) and "rvar" (for references).
    # Function returns a pairwise list of method names and
    # sublist of nodeids for the respective method name.

    proc loader {xml handle {evar {}} {rvar {}}} {
	if {[info $handle] ne "server"} {

	    return -code error "server handle required"
	}
	if {[catch {
	    package require tdom
	    dom parse -ignorexmlns -- $xml
	} doc]} {

	    return -code error "XML parse failed: $doc"
	}
	set root [$doc documentElement]
	# load XML namespaces
	array set ns {}
	set nscount 1
	foreach nsuri [$root selectNodes /UANodeSet/NamespaceUris/Uri/text()] {
	    set nsuri [$nsuri data]







|

>
|





>
|







1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279

    # Load nodeset from XML into a opcua server handle.
    # Optional error reports are written to the caller's variables
    # "evar" (for node information) and "rvar" (for references).
    # Function returns a pairwise list of method names and
    # sublist of nodeids for the respective method name.

    proc loader {handle xml {evar {}} {rvar {}}} {
	if {[info $handle] ne "server"} {
	    return -code error -errorcode {opcua Internal 0 Good} \
		"not a server handle"
	}
	if {[catch {
	    package require tdom
	    dom parse -ignorexmlns -- $xml
	} doc]} {
	    return -code error -errorcode {opcua Internal 0 Good} \
		"XML parse failed: $doc"
	}
	set root [$doc documentElement]
	# load XML namespaces
	array set ns {}
	set nscount 1
	foreach nsuri [$root selectNodes /UANodeSet/NamespaceUris/Uri/text()] {
	    set nsuri [$nsuri data]
1260
1261
1262
1263
1264
1265
1266

1267
1268
1269
1270
1271
1272
1273
1274
		    break
		}
	    }
	    break
	}
	if {![::info exists ns($mainns)]} {
	    $doc delete

	    return -code error "main XML namespace not found"
	}

	set mainnsuri $ns($mainns)
	# load aliases
	array set alias {}
	foreach node [$root selectNodes /UANodeSet/Aliases/Alias] {
	    set an [$node getAttribute Alias]







>
|







1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
		    break
		}
	    }
	    break
	}
	if {![::info exists ns($mainns)]} {
	    $doc delete
	    return -code error -errorcode {opcua Internal 0 Good} \
		"main XML namespace not found"
	}

	set mainnsuri $ns($mainns)
	# load aliases
	array set alias {}
	foreach node [$root selectNodes /UANodeSet/Aliases/Alias] {
	    set an [$node getAttribute Alias]
1415
1416
1417
1418
1419
1420
1421

1422
1423
1424
1425
1426

1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438

	# create and find out namespaces
	array set sns {}
	foreach {nscount nsuri} [namespace $handle] {
	    set sns($nsuri) $nscount
	}
	if {[::info exists sns($mainnsuri)]} {

	    return -code error "namespace $mainnsuri exists"
	}
	foreach nscount [array names ns] {
	    set nn $ns($nscount)
	    if {$nscount != $mainns && ![::info exists sns($nn)]} {

		return -code error "namespace $nn is not defined"
	    }
	    unset nn
	}
	set mainns [add S Namespace $mainnsuri]

	# fix namespace indices in nodes array
	foreach {nscount nsuri} [namespace $handle] {
	    set sns($nsuri) $nscount
	}
	array set nsmap {}
	foreach nscount [array names ns] {







>
|




>
|



|







1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471

	# create and find out namespaces
	array set sns {}
	foreach {nscount nsuri} [namespace $handle] {
	    set sns($nsuri) $nscount
	}
	if {[::info exists sns($mainnsuri)]} {
	    return -code error -errorcode {opcua Internal 0 Good} \
		"namespace $mainnsuri exists"
	}
	foreach nscount [array names ns] {
	    set nn $ns($nscount)
	    if {$nscount != $mainns && ![::info exists sns($nn)]} {
		return -code error -errorcode {opcua Internal 0 Good} \
		    "namespace $nn is not defined"
	    }
	    unset nn
	}
	set mainns [add $handle Namespace $mainnsuri]

	# fix namespace indices in nodes array
	foreach {nscount nsuri} [namespace $handle] {
	    set sns($nsuri) $nscount
	}
	array set nsmap {}
	foreach nscount [array names ns] {
1641
1642
1643
1644
1645
1646
1647
1648






































































































1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
		}
	    }
	}

	# return method names and nodeids
	return [array get meths]
    }







































































































    # Make some procs visible in opcua ensemble.

    apply [list ns {
	set cmds [::namespace ensemble configure $ns -subcommands]
	lappend cmds tree ptree children parent genstubs gentypes deftypes
	lappend cmds loader
	::namespace ensemble configure $ns -subcommands $cmds
    } [::namespace current]] [::namespace current]

}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|




1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
		}
	    }
	}

	# return method names and nodeids
	return [array get meths]
    }

    # Coroutine aware version of read command.

    proc xread {args} {
	if {[info [lindex $args 0]] ne "server"} {
	    set coro [::info coroutine]
	    if {$coro ne {}} {
		if {[catch {read {*}$args $coro} req]} {
		    return -code error $req
		}
		set ret [::yield]
		set sc [dict get $ret ResponseHeader ServiceResult]
		if {$sc == 0} {
		    set val [lindex [dict get $ret Results] 0]
		    if {[dict exists $val value]} {
			return [dict get $val value]
		    }
		    set sc [dict get $val status]
		}
		return -code error -errorcode \
		    [list opcua ReadAttributeAsync $sc \
		    [opcua sc2str -short $sc]] \
		    [opcua sc2str $sc]
	    }
	}
	tailcall read {*}$args
    }

    # Coroutine aware version of write command.

    proc xwrite {args} {
	if {[info [lindex $args 0]] ne "server"} {
	    set coro [::info coroutine]
	    if {$coro ne {}} {
		if {[catch {write {*}$args $coro} req]} {
		    return -code error $req
		}
		set ret [::yield]
		set sc [dict get $ret ResponseHeader ServiceResult]
		if {$sc == 0} {
		    set sc [lindex [dict get $ret Results] 0]
		    if {$sc == 0} {
			return {}
		    }
		}
		return -code error -errorcode \
		    [list opcua WriteAttributeAsync $sc \
		    [opcua sc2str -short $sc]] \
		    [opcua sc2str $sc]
	    }
	}
	tailcall write {*}$args
    }

    # Coroutine aware version of call command.

    proc xcall {args} {
	if {[info [lindex $args 0]] ne "server"} {
	    set coro [::info coroutine]
	    if {$coro ne {}} {
		if {[catch {call {*}$args -async $coro} req]} {
		    return -code error $req
		}
		set ret [::yield]
		set sc [dict get $ret ResponseHeader ServiceResult]
		if {$sc == 0} {
		    set val [lindex [dict get $ret Results] 0]
		    set sc [dict get $val StatusCode]
		    if {$sc == 0} {
			return [dict get $val OutputArguments]
		    }
		}
		return -code error -errorcode \
		    [list opcua CallAsync $sc [opcua sc2str -short $sc]] \
		    [opcua sc2str $sc]
	    }
	}
	tailcall call {*}$args
    }

    # Coroutine aware sleep in milliseconds, both versions
    # use after with callback to service events.

    proc xsleep {ms} {
	variable sleepvar
	set coro [::info coroutine]
	if {$coro ne {}} {
	    ::after $ms [list $coro]
	    tailcall ::yield
	}
	set nsvar [::namespace current]::sleepvar
	::after $ms [list set $nsvar 1]
	tailcall ::vwait $nsvar
    }

    # Like genstubs, but make coroutine aware stubs
    # using xcall instead of call.

    proc xgenstubs {handle {strip {}} {substs {}} args} {
	# no tailcall, since genstubs wants to see the caller
	return [genstubs $handle $strip $substs {*}$args]
    }

    # Make some procs visible in opcua ensemble.

    apply [list ns {
	set cmds [::namespace ensemble configure $ns -subcommands]
	lappend cmds tree ptree children parent genstubs gentypes deftypes
	lappend cmds loader xread xwrite xcall xsleep xgenstubs
	::namespace ensemble configure $ns -subcommands $cmds
    } [::namespace current]] [::namespace current]

}
Changes to jni/tcl/generic/regc_lex.c.
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
		FAILW(REG_BADBR);
	    }
	    break;
	case CHR('\\'):		/* BRE bound ends with \} */
	    if (INCON(L_BBND) && NEXT1('}')) {
		v->now++;
		INTOCON(L_BRE);
		RET('}');
	    } else {
		FAILW(REG_BADBR);
	    }
	    break;
	default:
	    FAILW(REG_BADBR);
	    break;







|







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
		FAILW(REG_BADBR);
	    }
	    break;
	case CHR('\\'):		/* BRE bound ends with \} */
	    if (INCON(L_BBND) && NEXT1('}')) {
		v->now++;
		INTOCON(L_BRE);
		RETV('}', 1);
	    } else {
		FAILW(REG_BADBR);
	    }
	    break;
	default:
	    FAILW(REG_BADBR);
	    break;
Changes to jni/tcl/tests/assemble.test.
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
	assemble {add excess}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}
}
test assemble-7.2 {add} {
    -body { 
	assemble {
	    push 2
	    push 2
	    add
	} 
    }
    -result {4}
}
test assemble-7.3 {appendArrayStk} {
    -body {
	set a(b) {hello, }
	assemble {







|




|







297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
	assemble {add excess}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}
}
test assemble-7.2 {add} {
    -body {
	assemble {
	    push 2
	    push 2
	    add
	}
    }
    -result {4}
}
test assemble-7.3 {appendArrayStk} {
    -body {
	set a(b) {hello, }
	assemble {
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
	    [assemble {push 0b1100; push 0b1010; bitor}] \
	    [assemble {push 0b1100; push 0b1010; bitxor}]
    }
    -result {8 -13 14 6}
}
test assemble-7.6 {div} {
    -body {
	assemble {push 999999; push 7; div} 
    }
    -result 142857
}
test assemble-7.7 {dup} {
    -body {
	assemble {
	    push 1; dup; dup; add; dup; add; dup; add; add
	}
    }
    -result 9
}	
test assemble-7.8 {eq} {
    -body {
	list \
	    [assemble {push able; push baker; eq}] \
	    [assemble {push able; push able;  eq}]
    }
    -result {0 1}







|










|







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
	    [assemble {push 0b1100; push 0b1010; bitor}] \
	    [assemble {push 0b1100; push 0b1010; bitxor}]
    }
    -result {8 -13 14 6}
}
test assemble-7.6 {div} {
    -body {
	assemble {push 999999; push 7; div}
    }
    -result 142857
}
test assemble-7.7 {dup} {
    -body {
	assemble {
	    push 1; dup; dup; add; dup; add; dup; add; add
	}
    }
    -result 9
}
test assemble-7.8 {eq} {
    -body {
	list \
	    [assemble {push able; push baker; eq}] \
	    [assemble {push able; push able;  eq}]
    }
    -result {0 1}
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
	x
    }
    -result {{a b} {c d} {e i} {g h}}
}
test assemble-7.25 {lshift} {
    -body {
	assemble {push 16; push 4; lshift}
    } 
    -result 256
}
test assemble-7.26 {mod} {
    -body {
	assemble {push 123456; push 1000; mod}
    }
    -result 456







|







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
	x
    }
    -result {{a b} {c d} {e i} {g h}}
}
test assemble-7.25 {lshift} {
    -body {
	assemble {push 16; push 4; lshift}
    }
    -result 256
}
test assemble-7.26 {mod} {
    -body {
	assemble {push 123456; push 1000; mod}
    }
    -result 456
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
	assemble {push this; pop; push that}
    }
    -result that
}
test assemble-7.31 {rshift} {
    -body {
	assemble {push 257; push 4; rshift}
    } 
    -result 16
}
test assemble-7.32 {storeArrayStk} {
    -body {
	proc x {} {
	    assemble {
		push able; push baker; push charlie; storeArrayStk







|







674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
	assemble {push this; pop; push that}
    }
    -result that
}
test assemble-7.31 {rshift} {
    -body {
	assemble {push 257; push 4; rshift}
    }
    -result 16
}
test assemble-7.32 {storeArrayStk} {
    -body {
	proc x {} {
	    assemble {
		push able; push baker; push charlie; storeArrayStk
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
	list [catch {assemble {expr $x}} result] $result $::errorCode
    }
    -result {1 {assembly code may not contain substitutions} {TCL ASSEM NOSUBST}}
}

# assemble-11 - ASSEM_LVT4 (exist, existArray, dictAppend, dictLappend,
#			    nsupvar, variable, upvar)
		
test assemble-11.1 {exist - wrong # args} {
    -body {
	assemble {exist}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}







|







1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
	list [catch {assemble {expr $x}} result] $result $::errorCode
    }
    -result {1 {assembly code may not contain substitutions} {TCL ASSEM NOSUBST}}
}

# assemble-11 - ASSEM_LVT4 (exist, existArray, dictAppend, dictLappend,
#			    nsupvar, variable, upvar)

test assemble-11.1 {exist - wrong # args} {
    -body {
	assemble {exist}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
	x
    }
    -result 123
    -cleanup {namespace delete q; rename x {}}
}

# assemble-12 - ASSEM_LVT1 (incr and incrArray)
		
test assemble-12.1 {incr - wrong # args} {
    -body {
	assemble {incr}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}







|







1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
	x
    }
    -result 123
    -cleanup {namespace delete q; rename x {}}
}

# assemble-12 - ASSEM_LVT1 (incr and incrArray)

test assemble-12.1 {incr - wrong # args} {
    -body {
	assemble {incr}
    }
    -returnCodes error
    -match glob
    -result {wrong # args*}
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
test assemble-17.9 {jump - resolve a label multiple times} {
    -body {
	proc x {} {
	    set case 0
	    set result {}
	    assemble {
		jump common
		
		label zero
		pop		
		incrImm case 1
		pop
		push a
		append result
		pop
		jump common
		
		label one
		pop
		incrImm case 1
		pop
		push b
		append result
		pop
		jump common
		
		label common
		load case
		dup
		push 0
		eq
		jumpTrue zero
		dup
		push 1
		eq
		jumpTrue one
		dup
		push 2
		eq
		jumpTrue two
		dup
		push 3
		eq
		jumpTrue three
		
		label two
		pop
		incrImm case 1
		pop
		push c
		append result
		pop
		jump common
		
		label three
		pop
		incrImm case 1
		pop
		push d
		append result
	    }







|

|






|








|


















|








|







1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
test assemble-17.9 {jump - resolve a label multiple times} {
    -body {
	proc x {} {
	    set case 0
	    set result {}
	    assemble {
		jump common

		label zero
		pop
		incrImm case 1
		pop
		push a
		append result
		pop
		jump common

		label one
		pop
		incrImm case 1
		pop
		push b
		append result
		pop
		jump common

		label common
		load case
		dup
		push 0
		eq
		jumpTrue zero
		dup
		push 1
		eq
		jumpTrue one
		dup
		push 2
		eq
		jumpTrue two
		dup
		push 3
		eq
		jumpTrue three

		label two
		pop
		incrImm case 1
		pop
		push c
		append result
		pop
		jump common

		label three
		pop
		incrImm case 1
		pop
		push d
		append result
	    }
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
		"; push b; concat 2; nop; nop; jump a" \
		[expr {$i+1}] \n
	}
	append body {label c; push -; concat 2; nop; nop; nop; jump d} \n
	append body {label b15; push b; concat 2; nop; nop; jump c} \n
	append body {label d}
	proc x {} [list assemble $body]
    }	
    -body {
	x
    }
    -cleanup {
	catch {unset body}
	catch {rename x {}}
    }







|







1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
		"; push b; concat 2; nop; nop; jump a" \
		[expr {$i+1}] \n
	}
	append body {label c; push -; concat 2; nop; nop; nop; jump d} \n
	append body {label b15; push b; concat 2; nop; nop; jump c} \n
	append body {label d}
	proc x {} [list assemble $body]
    }
    -body {
	x
    }
    -cleanup {
	catch {unset body}
	catch {rename x {}}
    }
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
    }
    -result {1 {operand must be >=2} {TCL ASSEM OPERAND>=2}}
    -cleanup {rename x {}; unset result}
}
test assemble-20.6 {lsetFlat} {
    -body {
	assemble {push b; push a; lsetFlat 2}
    } 
    -result b
}
test assemble-20.7 {lsetFlat} {
    -body {
	assemble {push 1; push d; push {a b c}; lsetFlat 3}
    }
    -result {a d c}







|







2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
    }
    -result {1 {operand must be >=2} {TCL ASSEM OPERAND>=2}}
    -cleanup {rename x {}; unset result}
}
test assemble-20.6 {lsetFlat} {
    -body {
	assemble {push b; push a; lsetFlat 2}
    }
    -result b
}
test assemble-20.7 {lsetFlat} {
    -body {
	assemble {push 1; push d; push {a b c}; lsetFlat 3}
    }
    -result {a d c}
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061

test assemble-40.1 {unbalanced stack} {
    -body {
	list \
	    [catch {
		assemble {
		    push 3
		    dup 
		    mult 
		    push 4
		    dup 
		    mult 
		    pop 
		    expon
		}
	    } result] $result $::errorInfo
    }
    -result {1 {stack underflow} {stack underflow
    in assembly code between lines 1 and end of assembly code*}}
    -match glob







|
|

|
|
|







3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061

test assemble-40.1 {unbalanced stack} {
    -body {
	list \
	    [catch {
		assemble {
		    push 3
		    dup
		    mult
		    push 4
		    dup
		    mult
		    pop
		    expon
		}
	    } result] $result $::errorInfo
    }
    -result {1 {stack underflow} {stack underflow
    in assembly code between lines 1 and end of assembly code*}}
    -match glob
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
test assemble-50.1 {Ulam's 3n+1 problem, TAL implementation} {
    -body {
	proc ulam {n} {
	    assemble {
		load n;		# max
		dup;		# max n
		jump start;     # max n
	    
		label loop;	# max n
		over 1;         # max n max
		over 1;		# max in max n
		ge;             # man n max>=n
		jumpTrue skip;  # max n

		reverse 2;      # n max
		pop;            # n
		dup;            # n n
	    
		label skip;	# max n
		dup;            # max n n
		push 2;         # max n n 2
		mod;            # max n n%2
		jumpTrue odd;   # max n
	    
		push 2;         # max n 2
		div;            # max n/2 -> max n
		jump start;     # max n
	     
		label odd;	# max n
		push 3;         # max n 3
		mult;           # max 3*n
		push 1;         # max 3*n 1
		add;            # max 3*n+1
	    
		label start;	# max n
		dup;		# max n n
		push 1;		# max n n 1
		neq;		# max n n>1
		jumpTrue loop;	# max n
	    
		pop;		# max
	    }
	}
	set result {}
	for {set i 1} {$i < 30} {incr i} {
	    lappend result [ulam $i]
	}







|









|





|



|





|





|







3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
test assemble-50.1 {Ulam's 3n+1 problem, TAL implementation} {
    -body {
	proc ulam {n} {
	    assemble {
		load n;		# max
		dup;		# max n
		jump start;     # max n

		label loop;	# max n
		over 1;         # max n max
		over 1;		# max in max n
		ge;             # man n max>=n
		jumpTrue skip;  # max n

		reverse 2;      # n max
		pop;            # n
		dup;            # n n

		label skip;	# max n
		dup;            # max n n
		push 2;         # max n n 2
		mod;            # max n n%2
		jumpTrue odd;   # max n

		push 2;         # max n 2
		div;            # max n/2 -> max n
		jump start;     # max n

		label odd;	# max n
		push 3;         # max n 3
		mult;           # max 3*n
		push 1;         # max 3*n 1
		add;            # max 3*n+1

		label start;	# max n
		dup;		# max n n
		push 1;		# max n n 1
		neq;		# max n n>1
		jumpTrue loop;	# max n

		pop;		# max
	    }
	}
	set result {}
	for {set i 1} {$i < 30} {incr i} {
	    lappend result [ulam $i]
	}
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
test assemble-51.3 {memory leak testing} memory {
    leaktest {
	apply {{n} {
	    assemble {
		load n;		# max
		dup;		# max n
		jump start;     # max n
	    
		label loop;	# max n
		over 1;         # max n max
		over 1;		# max in max n
		ge;             # man n max>=n
		jumpTrue skip;  # max n

		reverse 2;      # n max
		pop;            # n
		dup;            # n n
	    
		label skip;	# max n
		dup;            # max n n
		push 2;         # max n n 2
		mod;            # max n n%2
		jumpTrue odd;   # max n
	    
		push 2;         # max n 2
		div;            # max n/2 -> max n
		jump start;     # max n
	     
		label odd;	# max n
		push 3;         # max n 3
		mult;           # max 3*n
		push 1;         # max 3*n 1
		add;            # max 3*n+1
	    
		label start;	# max n
		dup;		# max n n
		push 1;		# max n n 1
		neq;		# max n n>1
		jumpTrue loop;	# max n
	    
		pop;		# max
	    }
	}} 1
    }
} 0
test assemble-51.4 {memory leak testing} memory {
    leaktest {







|









|





|



|





|





|







3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
test assemble-51.3 {memory leak testing} memory {
    leaktest {
	apply {{n} {
	    assemble {
		load n;		# max
		dup;		# max n
		jump start;     # max n

		label loop;	# max n
		over 1;         # max n max
		over 1;		# max in max n
		ge;             # man n max>=n
		jumpTrue skip;  # max n

		reverse 2;      # n max
		pop;            # n
		dup;            # n n

		label skip;	# max n
		dup;            # max n n
		push 2;         # max n n 2
		mod;            # max n n%2
		jumpTrue odd;   # max n

		push 2;         # max n 2
		div;            # max n/2 -> max n
		jump start;     # max n

		label odd;	# max n
		push 3;         # max n 3
		mult;           # max 3*n
		push 1;         # max 3*n 1
		add;            # max 3*n+1

		label start;	# max n
		dup;		# max n n
		push 1;		# max n n 1
		neq;		# max n n>1
		jumpTrue loop;	# max n

		pop;		# max
	    }
	}} 1
    }
} 0
test assemble-51.4 {memory leak testing} memory {
    leaktest {
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
	    push 0
	    jump @okLabel
	    label @badLabel
	    push 1;		# should be pushReturnCode
	    label @okLabel
	    endCatch
	    pop
	    
	    beginCatch @badLabel2
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel2
	    label @badLabel2
	    push 1;		# should be pushReturnCode
	    label @okLabel2
	    endCatch
	    pop
	    
	    beginCatch @badLabel3
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel3
	    label @badLabel3
	    push 1;		# should be pushReturnCode
	    label @okLabel3
	    endCatch
	    pop
	    
	    beginCatch @badLabel4
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel4
	    label @badLabel4
	    push 1;		# should be pushReturnCode
	    label @okLabel4
	    endCatch
	    pop
	    
	    beginCatch @badLabel5
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel5
	    label @badLabel5
	    push 1;		# should be pushReturnCode
	    label @okLabel5
	    endCatch
	    pop
	    
	    beginCatch @badLabel6
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel6







|












|












|












|












|







3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
	    push 0
	    jump @okLabel
	    label @badLabel
	    push 1;		# should be pushReturnCode
	    label @okLabel
	    endCatch
	    pop

	    beginCatch @badLabel2
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel2
	    label @badLabel2
	    push 1;		# should be pushReturnCode
	    label @okLabel2
	    endCatch
	    pop

	    beginCatch @badLabel3
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel3
	    label @badLabel3
	    push 1;		# should be pushReturnCode
	    label @okLabel3
	    endCatch
	    pop

	    beginCatch @badLabel4
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel4
	    label @badLabel4
	    push 1;		# should be pushReturnCode
	    label @okLabel4
	    endCatch
	    pop

	    beginCatch @badLabel5
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel5
	    label @badLabel5
	    push 1;		# should be pushReturnCode
	    label @okLabel5
	    endCatch
	    pop

	    beginCatch @badLabel6
	    push error
	    push testing
	    invokeStk 2
	    pop
	    push 0
	    jump @okLabel6
Changes to jni/tcl/tests/env.test.
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    encodingrestore
    envrestore
}

variable keep {
    TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY
    SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
    DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
    __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
    CommonProgramFiles ProgramFiles CommonProgramW6432 ProgramW6432
}

variable printenvScript [makeFile [string map [list @keep@ [list $keep]] {
    encoding system iso8859-1
    proc lrem {listname name} {







|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    encodingrestore
    envrestore
}

variable keep {
    TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY
    SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
    DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING MSYSTEM
    __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
    CommonProgramFiles ProgramFiles CommonProgramW6432 ProgramW6432
}

variable printenvScript [makeFile [string map [list @keep@ [list $keep]] {
    encoding system iso8859-1
    proc lrem {listname name} {
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
    unset env(__DUMMY__)
    return $res
} -result {i'm with dummy}



# cleanup
rename getenv {} 
rename envrestore {} 
rename envprep {}
rename encodingrestore {}
rename encodingswitch {}

removeFile $printenvScript
::tcltest::cleanupTests
return

# Local Variables:
# mode: tcl
# End:







|
|











415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
    unset env(__DUMMY__)
    return $res
} -result {i'm with dummy}



# cleanup
rename getenv {}
rename envrestore {}
rename envprep {}
rename encodingrestore {}
rename encodingswitch {}

removeFile $printenvScript
::tcltest::cleanupTests
return

# Local Variables:
# mode: tcl
# End:
Changes to jni/tcl/tests/expr.test.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    namespace import -force ::tcltest::*
}

::tcltest::loadTestedCommands
catch [list package require -exact Tcltest [info patchlevel]]

testConstraint testmathfunctions [expr {
    ([catch {expr T1()} msg] != 1) || ($msg ne {invalid command name "tcl::mathfunc::T1"})
}]

# Determine if "long int" type is a 32 bit number and if the wide
# type is a 64 bit number on this machine.

testConstraint longIs32bit [expr {int(0x80000000) < 0}]
testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    namespace import -force ::tcltest::*
}

::tcltest::loadTestedCommands
catch [list package require -exact Tcltest [info patchlevel]]

testConstraint testmathfunctions [expr {
    ([catch {expr {T1()}} msg] != 1) || ($msg ne {invalid command name "tcl::mathfunc::T1"})
}]

# Determine if "long int" type is a 32 bit number and if the wide
# type is a 64 bit number on this machine.

testConstraint longIs32bit [expr {int(0x80000000) < 0}]
testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
    global xxx
    set xxx ""
    12days 1 1 1
    set result [string length $xxx]
    unset xxx
    return $result
}

# start of tests

catch {unset a b i x}

test expr-1.1 {TclCompileExprCmd: no expression} {
    list [catch {expr  } msg] $msg
} {1 {wrong # args: should be "expr arg ?arg ...?"}}







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
    global xxx
    set xxx ""
    12days 1 1 1
    set result [string length $xxx]
    unset xxx
    return $result
}

# start of tests

catch {unset a b i x}

test expr-1.1 {TclCompileExprCmd: no expression} {
    list [catch {expr  } msg] $msg
} {1 {wrong # args: should be "expr arg ?arg ...?"}}
6718
6719
6720
6721
6722
6723
6724






6725
6726
6727
6728
6729
6730
6731
} { 	0x0}
test expr-38.12 {abs and -0x0 [Bug 2954959]} {
    ::tcl::mathfunc::abs { 	-0x0}
} 0
test expr-38.13 {abs and 0.0 [Bug 2954959]} {
    ::tcl::mathfunc::abs 1e-324
} 1e-324







testConstraint testexprlongobj   [llength [info commands testexprlongobj]]
testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]]

test expr-39.1 {Check that Tcl_ExprLongObj doesn't modify interpreter result if no error} testexprlongobj {
    testexprlongobj 4+1
} {This is a result: 5}







>
>
>
>
>
>







6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
} { 	0x0}
test expr-38.12 {abs and -0x0 [Bug 2954959]} {
    ::tcl::mathfunc::abs { 	-0x0}
} 0
test expr-38.13 {abs and 0.0 [Bug 2954959]} {
    ::tcl::mathfunc::abs 1e-324
} 1e-324
test expr-38.14 {abs and INT64_MIN special-case} {
    ::tcl::mathfunc::abs -9223372036854775808
} 9223372036854775808
test expr-38.15 {abs and INT128_MIN special-case} {
    ::tcl::mathfunc::abs -170141183460469231731687303715884105728
} 170141183460469231731687303715884105728

testConstraint testexprlongobj   [llength [info commands testexprlongobj]]
testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]]

test expr-39.1 {Check that Tcl_ExprLongObj doesn't modify interpreter result if no error} testexprlongobj {
    testexprlongobj 4+1
} {This is a result: 5}
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
    expr 1e-2147483649
} 0.0
test expr-41.13 {exponent overflow} {
    expr 100e-2147483650
} 0.0
test expr-41.14 {exponent overflow} {
    expr 100e-2147483651
} 0.0 
test expr-41.15 {exponent overflow} {
    expr 1.0e-2147483648
} 0.0 
test expr-41.16 {exponent overflow} {
    expr 1.0e-2147483649
} 0.0 
test expr-41.17 {exponent overflow} {
    expr 1.23e-2147483646
} 0.0
test expr-41.18 {exponent overflow} {
    expr 1.23e-2147483647
} 0.0 

test expr-41.19 {numSigDigs == 0} {
    expr 0e309
} 0.0
test expr-41.20 {numSigDigs == 0} {
    expr 0e310
} 0.0







|


|


|





|







6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
    expr 1e-2147483649
} 0.0
test expr-41.13 {exponent overflow} {
    expr 100e-2147483650
} 0.0
test expr-41.14 {exponent overflow} {
    expr 100e-2147483651
} 0.0
test expr-41.15 {exponent overflow} {
    expr 1.0e-2147483648
} 0.0
test expr-41.16 {exponent overflow} {
    expr 1.0e-2147483649
} 0.0
test expr-41.17 {exponent overflow} {
    expr 1.23e-2147483646
} 0.0
test expr-41.18 {exponent overflow} {
    expr 1.23e-2147483647
} 0.0

test expr-41.19 {numSigDigs == 0} {
    expr 0e309
} 0.0
test expr-41.20 {numSigDigs == 0} {
    expr 0e310
} 0.0
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
test expr-52.1 {
	comparison with empty string does not generate string representation
} {
	set a [list one two three]
	list [expr {$a eq {}}] [expr {$a < {}}] [expr {$a > {}}] [
		string match {*no string representation*} [
		::tcl::unsupported::representation $a]]
} {0 0 1 1} 



# cleanup
if {[info exists a]} {
    unset a
}







|







7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
test expr-52.1 {
	comparison with empty string does not generate string representation
} {
	set a [list one two three]
	list [expr {$a eq {}}] [expr {$a < {}}] [expr {$a > {}}] [
		string match {*no string representation*} [
		::tcl::unsupported::representation $a]]
} {0 0 1 1}



# cleanup
if {[info exists a]} {
    unset a
}
Changes to jni/tcl/tests/history.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Commands covered:  history
#
# This file contains a collection of tests for one or more of the Tcl built-in
# commands.  Sourcing this file into Tcl runs the tests and generates output
# for errors.  No output means no errors were found.
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
  
if {"::tcltest" ni [namespace children]} {
    package require tcltest 2.5
    namespace import -force ::tcltest::*
}

# The history command might be autoloaded...
if {[catch {history}]} {












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Commands covered:  history
#
# This file contains a collection of tests for one or more of the Tcl built-in
# commands.  Sourcing this file into Tcl runs the tests and generates output
# for errors.  No output means no errors were found.
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

if {"::tcltest" ni [namespace children]} {
    package require tcltest 2.5
    namespace import -force ::tcltest::*
}

# The history command might be autoloaded...
if {[catch {history}]} {
Changes to jni/tcl/tests/httpd.
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
		append html </dl>\n
	    }
	    append html </body></html>
	}
    }

    # Catch errors from premature client closes
    
    catch {
	if {$data(proto) == "HEAD"} {
	    puts $sock "HTTP/1.0 200 OK"
	} else {
            # Split the response to test for [Bug 26245326]
	    puts -nonewline $sock "HT"
            flush $sock







|







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
		append html </dl>\n
	    }
	    append html </body></html>
	}
    }

    # Catch errors from premature client closes

    catch {
	if {$data(proto) == "HEAD"} {
	    puts $sock "HTTP/1.0 200 OK"
	} else {
            # Split the response to test for [Bug 26245326]
	    puts -nonewline $sock "HT"
            flush $sock
Changes to jni/tcl/tests/package.test.
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
    set x
} {1.1}
test package-3.54 {Tcl_PkgRequire procedure, coroutine support} -setup {
    package forget t
} -body {
    coroutine coro1 apply {{} {
	package ifneeded t 2.1 {
	    yield 
	    package provide t 2.1
	}
	package require t 2.1
    }}
    list [catch {coro1} msg] $msg
} -match glob -result {0 2.1} 


test package-4.1 {Tcl_PackageCmd procedure} -returnCodes error -body {
    package
} -result {wrong # args: should be "package option ?arg ...?"}
test package-4.2 {Tcl_PackageCmd procedure, "forget" option} {
    package forget {*}[package names]







|





|







609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
    set x
} {1.1}
test package-3.54 {Tcl_PkgRequire procedure, coroutine support} -setup {
    package forget t
} -body {
    coroutine coro1 apply {{} {
	package ifneeded t 2.1 {
	    yield
	    package provide t 2.1
	}
	package require t 2.1
    }}
    list [catch {coro1} msg] $msg
} -match glob -result {0 2.1}


test package-4.1 {Tcl_PackageCmd procedure} -returnCodes error -body {
    package
} -result {wrong # args: should be "package option ?arg ...?"}
test package-4.2 {Tcl_PackageCmd procedure, "forget" option} {
    package forget {*}[package names]
Changes to jni/tcl/tests/reg.test.
1220
1221
1222
1223
1224
1225
1226




1227
1228
1229
1230
1231
1232
1233
    # This is near the limits of the RE engine
    regexp [string repeat x*y*z* 480] x
} 1

test reg-33.30 {Bug 1080042} {
    regexp {(\Y)+} foo
} 1





# cleanup
::tcltest::cleanupTests
return

# Local Variables:
# mode: tcl







>
>
>
>







1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
    # This is near the limits of the RE engine
    regexp [string repeat x*y*z* 480] x
} 1

test reg-33.30 {Bug 1080042} {
    regexp {(\Y)+} foo
} 1
test reg-33.31 {Bug 7c64aa5e1a} {
    regexp -inline {(?b).\{1,10\}} {abcdef}
} abcdef


# cleanup
::tcltest::cleanupTests
return

# Local Variables:
# mode: tcl
Changes to jni/tdom/generic/schema.c.
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572






3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
                Tcl_DStringSetLength (sdata->cdata, 0);
            }
            if (validateDOM (interp, sdata, node) != TCL_OK) return TCL_ERROR;
            break;

        case TEXT_NODE:
        case CDATA_SECTION_NODE:
            if (node == node->parentNode->firstChild
                && node == node->parentNode->lastChild) {
                Tcl_DStringAppend (sdata->cdata,
                                   ((domTextNode *) node)->nodeValue,
                                   ((domTextNode *) node)->valueLength);
                if (tDOM_probeText (interp, sdata,
                               Tcl_DStringValue (sdata->cdata), NULL) != TCL_OK) {
                    Tcl_DStringSetLength (sdata->cdata, 0);
                    return TCL_ERROR;
                }
                Tcl_DStringSetLength (sdata->cdata, 0);
                break;
            }
            Tcl_DStringAppend (sdata->cdata,
                               ((domTextNode *) node)->nodeValue,
                               ((domTextNode *) node)->valueLength);






            break;

        case COMMENT_NODE:
        case PROCESSING_INSTRUCTION_NODE:
            /* They are just ignored by validation. */
            break;

        default:
            SetResult ("Unexpected node type in validateDOM!");
            return TCL_ERROR;
        }
        node = node->nextSibling;
    }
    if (Tcl_DStringLength (sdata->cdata)) {
        if (tDOM_probeText (interp, sdata, Tcl_DStringValue (sdata->cdata),
                            NULL) != TCL_OK) return TCL_ERROR;
        Tcl_DStringSetLength (sdata->cdata, 0);
    }
    if (tDOM_probeElementEnd (interp, sdata) != TCL_OK) return TCL_ERROR;
    sdata->node = savednode;
    sdata->insideNode = savedinsideNode;
    return TCL_OK;
}

static void







<
<
<
<
<
<
<
<
<
<
<
<
<



>
>
>
>
>
>













<
<
<
<
<







3550
3551
3552
3553
3554
3555
3556













3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578





3579
3580
3581
3582
3583
3584
3585
                Tcl_DStringSetLength (sdata->cdata, 0);
            }
            if (validateDOM (interp, sdata, node) != TCL_OK) return TCL_ERROR;
            break;

        case TEXT_NODE:
        case CDATA_SECTION_NODE:













            Tcl_DStringAppend (sdata->cdata,
                               ((domTextNode *) node)->nodeValue,
                               ((domTextNode *) node)->valueLength);
            if (tDOM_probeText (interp, sdata,
                                Tcl_DStringValue (sdata->cdata), NULL) != TCL_OK) {
                Tcl_DStringSetLength (sdata->cdata, 0);
                return TCL_ERROR;
            }
            Tcl_DStringSetLength (sdata->cdata, 0);
            break;

        case COMMENT_NODE:
        case PROCESSING_INSTRUCTION_NODE:
            /* They are just ignored by validation. */
            break;

        default:
            SetResult ("Unexpected node type in validateDOM!");
            return TCL_ERROR;
        }
        node = node->nextSibling;
    }





    if (tDOM_probeElementEnd (interp, sdata) != TCL_OK) return TCL_ERROR;
    sdata->node = savednode;
    sdata->insideNode = savedinsideNode;
    return TCL_OK;
}

static void
Changes to jni/tdom/tests/schema.test.
1283
1284
1285
1286
1287
1288
1289



































1290
1291
1292
1293
1294
1295
1296
    s reportcmd dummycallback
    set result [catch {s event text foo} errMsg]
    lappend result $errMsg
    s delete
    set result
} {1 {No validation started}}




































test schema-5.1 {dom parse -validateCmd} {
    set result [catch {
        [dom parse -validateCmd tdom::schema <doc/>]
    }]
} 1

test schema-5.2 {dom parse -validateCmd} {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
    s reportcmd dummycallback
    set result [catch {s event text foo} errMsg]
    lappend result $errMsg
    s delete
    set result
} {1 {No validation started}}

test schema-4.13 {event - successive text nodes} {
    tdom::schema s
    s define {
        defelement doc {
            text integer
            text {
                oneOf {
                    integer
                    fixed "foo"
                }
            }
            text number
        }
    }
    set result ""
    foreach input {
        {1 2 3}
        {1 foo 3.2}
        {1 2 3 4}
        {foo 2 3}
        {1 foo}
    } {
        lappend result [catch {
            s event start doc
            foreach value $input {
                s event text $value
            }
            s event end
        }]
        s reset
    }
    s delete
    set result
} {0 0 1 1 1}
            
test schema-5.1 {dom parse -validateCmd} {
    set result [catch {
        [dom parse -validateCmd tdom::schema <doc/>]
    }]
} 1

test schema-5.2 {dom parse -validateCmd} {
3947
3948
3949
3950
3951
3952
3953



































3954
3955
3956
3957
3958
3959
3960
    s reportcmd dummycallback
    set doc [dom parse <dos/>]
    set result [s domvalidate $doc]
    s delete
    $doc delete
    set result
} 1




































test schema-13.1 {XML namespaces} {
    tdom::schema create s
    s defelement doc ns1 {
        # Forward defined element inherits child namespace
        element elm1
        element elm2







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
    s reportcmd dummycallback
    set doc [dom parse <dos/>]
    set result [s domvalidate $doc]
    s delete
    $doc delete
    set result
} 1

dom createNodeCmd textNode    t
test schema-12.8 {domvalidate - successive text nodes} {
    tdom::schema s
    s define {
        defelement doc {
            text integer
            text {
                oneOf {
                    integer
                    fixed "foo"
                }
            }
            text number
        }
    }
    set result ""
    foreach input {
        {1 2 3}
        {1 foo 3.2}
        {1 2 3 4}
    } {
        set doc [dom createDocument doc]
        set root [$doc documentElement]
        $root appendFromScript {
            foreach value $input {
                t $value
            }
        }
        lappend result [s domvalidate $doc]
        $doc delete
    }
    s delete
    set result
} {1 1 0}

test schema-13.1 {XML namespaces} {
    tdom::schema create s
    s defelement doc ns1 {
        # Forward defined element inherits child namespace
        element elm1
        element elm2
Changes to jni/topcua/Android.mk.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

LOCAL_SRC_FILES := \
	topcua.c \
	open62541/open62541.c

LOCAL_CFLAGS := $(tcl_cflags) $(tk_cflags) \
	-DPACKAGE_NAME="\"topcua\"" \
	-DPACKAGE_VERSION="\"0.2\"" \
	-fvisibility=hidden -std=c99 \
	-D_THREAD_SAFE=1 \
	-DUA_malloc=Topcua_malloc \
	-DUA_calloc=Topcua_calloc \
	-DUA_realloc=Topcua_realloc \
	-DUA_free=Topcua_free \
	-DUA_ENABLE_ENCRYPTION=1 \
	-DUA_ENABLE_ENCRYPTION_OPENSSL=1 \
	-DUA_ENABLE_DISCOVERY=1 \
	-DUA_ENABLE_DISCOVERY_MULTICAST=1 \
	-DUA_ENABLE_DISCOVERY_SEMAPHORE=1 \
	-O2

LOCAL_SHARED_LIBRARIES := libtcl libcrypto_tls libssl_tls

include $(BUILD_SHARED_LIBRARY)







|








<
<
<





24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39



40
41
42
43
44

LOCAL_SRC_FILES := \
	topcua.c \
	open62541/open62541.c

LOCAL_CFLAGS := $(tcl_cflags) $(tk_cflags) \
	-DPACKAGE_NAME="\"topcua\"" \
	-DPACKAGE_VERSION="\"0.3\"" \
	-fvisibility=hidden -std=c99 \
	-D_THREAD_SAFE=1 \
	-DUA_malloc=Topcua_malloc \
	-DUA_calloc=Topcua_calloc \
	-DUA_realloc=Topcua_realloc \
	-DUA_free=Topcua_free \
	-DUA_ENABLE_ENCRYPTION=1 \
	-DUA_ENABLE_ENCRYPTION_OPENSSL=1 \



	-O2

LOCAL_SHARED_LIBRARIES := libtcl libcrypto_tls libssl_tls

include $(BUILD_SHARED_LIBRARY)
Changes to jni/topcua/configure.
1
2
3
4
5
6
7
8
9
10
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for topcua 0.2.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##


|







1
2
3
4
5
6
7
8
9
10
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for topcua 0.3.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='topcua'
PACKAGE_TARNAME='topcua'
PACKAGE_VERSION='0.2'
PACKAGE_STRING='topcua 0.2'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>







|
|







590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='topcua'
PACKAGE_TARNAME='topcua'
PACKAGE_VERSION='0.3'
PACKAGE_STRING='topcua 0.3'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures topcua 0.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.







|







1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures topcua 0.3 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of topcua 0.2:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]







|







1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of topcua 0.3:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
topcua configure 0.2
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by topcua $as_me 0.2, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{







|













|







1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
topcua configure 0.3
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by topcua $as_me 0.3, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by topcua $as_me 0.2, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@







|







12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by topcua $as_me 0.3, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
$config_files

Report bugs to <bug-autoconf@gnu.org>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
topcua config.status 0.2
configured by $0, generated by GNU Autoconf 2.63,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."








|







12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
$config_files

Report bugs to <bug-autoconf@gnu.org>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
topcua config.status 0.3
configured by $0, generated by GNU Autoconf 2.63,
  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

Changes to jni/topcua/configure.in.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set your package name and version numbers here.
#
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([topcua], [0.2])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------








|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set your package name and version numbers here.
#
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([topcua], [0.3])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------

Changes to jni/topcua/open62541/chw.patch.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
The amalgamation was created from a pack/1.1 github checkout
using this shell script snippet:

  mkdir build
  cd build
  cmake \
    -DOPENSSL_ROOT_DIR=/usr \
    -DUA_ENABLE_AMALGAMATION=ON \
    -DUA_ARCHITECTURE=None \
    -DUA_ENABLE_ENCRYPTION_OPENSSL=ON \
    -DUA_ENABLE_HISTORIZING=ON \
    -DUA_ENABLE_DISCOVERY=ON \
    -DUA_ENABLE_DISCOVERY_MULTICAST=ON \
    -DUA_DEBUG=OFF \
    -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON \
    -DUA_ENABLE_PUBSUB=ON \
    -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON \
    -DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=ON \
    -DUA_MULTITHREADING=100 \
    CMAKE_BUILD_TYPE=Release ../
|











<







1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
The amalgamation was created from a 1.2 github checkout
using this shell script snippet:

  mkdir build
  cd build
  cmake \
    -DOPENSSL_ROOT_DIR=/usr \
    -DUA_ENABLE_AMALGAMATION=ON \
    -DUA_ARCHITECTURE=None \
    -DUA_ENABLE_ENCRYPTION_OPENSSL=ON \
    -DUA_ENABLE_HISTORIZING=ON \
    -DUA_ENABLE_DISCOVERY=ON \

    -DUA_DEBUG=OFF \
    -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON \
    -DUA_ENABLE_PUBSUB=ON \
    -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON \
    -DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=ON \
    -DUA_MULTITHREADING=100 \
    CMAKE_BUILD_TYPE=Release ../
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90


91




















































































92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163



164

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245



246



247







248

















249
250
251
252
253
254
255
256
257
258

259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
libressl plus a structure field to UA_ServerConfig.accessControl
for fine tuning the server's security level. And it adds another
structure field named UA_ServerConfig.userdata which is used for
instrumenting node construction/destruction.

--- open62541.c.orig
+++ open62541.c
@@ -31210,6 +31210,7 @@
         config->logger.clear(config->logger.context);
     config->logger.log = NULL;
     config->logger.clear = NULL;
+    config->userdata = NULL;
 }
 
 void
@@ -47236,10 +47237,15 @@
               UA_VariableNode* node, const UA_DataSource *dataSource) {
     if(node->nodeClass != UA_NODECLASS_VARIABLE)
         return UA_STATUSCODE_BADNODECLASSINVALID;
-    if(node->valueSource == UA_VALUESOURCE_DATA)
-        UA_DataValue_clear(&node->value.data.value);
-    node->value.dataSource = *dataSource;
-    node->valueSource = UA_VALUESOURCE_DATASOURCE;
+    if(dataSource->read != NULL || dataSource->write != NULL) {
+        if(node->valueSource == UA_VALUESOURCE_DATA)
+            UA_DataValue_clear(&node->value.data.value);
+        node->value.dataSource = *dataSource;
+        node->valueSource = UA_VALUESOURCE_DATASOURCE;
+    } else if(node->valueSource != UA_VALUESOURCE_DATA) {
+        node->valueSource = UA_VALUESOURCE_DATA;
+        node->value.dataSource = *dataSource;
+    }
     return UA_STATUSCODE_GOOD;
 }
 
@@ -50546,7 +50552,7 @@
     UA_WriteValue_init(&wValue);
     wValue.nodeId = *nodeId;
     wValue.attributeId = attributeId;
-    if(attributeId == UA_ATTRIBUTEID_VALUE)
+    if(attributeId == UA_ATTRIBUTEID_VALUE && inDataType == &UA_TYPES[UA_TYPES_VARIANT])
         wValue.value.value = *(const UA_Variant*)in;
     else
         /* hack. is never written into. */
@@ -50648,13 +50654,16 @@
     if(attributeId == UA_ATTRIBUTEID_VALUE) {
         memcpy(out, &res->value, sizeof(UA_Variant));
         UA_Variant_init(&res->value);
-    } else if(attributeId == UA_ATTRIBUTEID_NODECLASS) {
+    } else if(attributeId == UA_ATTRIBUTEID_NODECLASS && outDataType != &UA_TYPES[UA_TYPES_VARIANT]) {
         memcpy(out, (UA_NodeClass*)res->value.data, sizeof(UA_NodeClass));
     } else if(UA_Variant_isScalar(&res->value) &&
               res->value.type == outDataType) {
         memcpy(out, res->value.data, res->value.type->memSize);
         UA_free(res->value.data);
         res->value.data = NULL;
+    } else if(UA_Variant_isScalar(&res->value) && outDataType == &UA_TYPES[UA_TYPES_VARIANT]) {
+        memcpy(out, &res->value, sizeof(UA_Variant));
+        UA_Variant_init(&res->value);
     } else {
         retval = UA_STATUSCODE_BADUNEXPECTEDERROR;
     }


@@ -66483,6 +66492,12 @@




















































































                         void **sessionContext) {
     AccessControlContext *context = (AccessControlContext*)ac->context;
 
+    if(ac->securityMode != UA_MESSAGESECURITYMODE_NONE) {
+        if(endpointDescription->securityLevel < ac->securityMode) {
+           return UA_STATUSCODE_BADSECURITYCHECKSFAILED;
+        }
+    }
+
     /* The empty token is interpreted as anonymous */
     if(userIdentityToken->encoding == UA_EXTENSIONOBJECT_ENCODED_NOBODY) {
         if(!context->allowAnonymous)
@@ -66675,6 +66690,9 @@
                          size_t usernamePasswordLoginSize,
                          const UA_UsernamePasswordLogin *usernamePasswordLogin) {
     UA_AccessControl *ac = &config->accessControl;
+
+    ac->securityMode = UA_MESSAGESECURITYMODE_NONE;
+
     ac->clear = clear_default;
     ac->activateSession = activateSession_default;
     ac->closeSession = closeSession_default;
@@ -69618,8 +69636,7 @@
 #include <openssl/aes.h>
 #include <openssl/pem.h>
 
-
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && OPENSSL_VERSION_NUMBER != 0x20000000L
 #define get_pkey_rsa(evp) EVP_PKEY_get0_RSA(evp)
 #else
 #define get_pkey_rsa(evp) ((evp)->pkey.rsa)
@@ -70478,7 +70495,7 @@
                                           &pkData, len);
     } else {
         BIO *bio = NULL;
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
         bio = BIO_new_mem_buf((void *) privateKey->data, (int) privateKey->length);
 #else
         bio = BIO_new_mem_buf((const void *) privateKey->data, (int) privateKey->length);
@@ -70515,7 +70532,7 @@
     X509 * result = NULL;
 
     BIO* bio = NULL;
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
     bio = BIO_new_mem_buf((void *) certificate->data, (int) certificate->length);
 #else
     bio = BIO_new_mem_buf((const void *) certificate->data, (int) certificate->length);
@@ -75434,7 +75451,7 @@
         } else {
             BIO* bio = NULL;
 
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
             bio = BIO_new_mem_buf((void *) certificateRevocationList[i].data,
                                   (int) certificateRevocationList[i].length);
 #else
@@ -75742,7 +75759,7 @@
         X509_STORE_CTX_set0_crls (storeCtx, ctx->skCrls);
     }
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && OPENSSL_VERSION_NUMBER != 0x20000000L
     if (X509_STORE_CTX_get_check_issued (storeCtx) (storeCtx,certificateX509, certificateX509) != 1) {
         X509_STORE_CTX_set_flags (storeCtx, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
     }
@@ -78106,7 +78123,7 @@
     time_t gmt, rawtime = time(NULL);
 
     struct tm ptm;



-    gmtime_s(&ptm, &rawtime);

+    ptm = *gmtime(&rawtime);
     // Request that mktime() looksup dst in timezone database
     ptm.tm_isdst = -1;
     gmt = mktime(&ptm);
@@ -79216,3 +79233,17 @@
 
     return connection;
 }
+
+UA_StatusCode
+UA_Client_setCustomDataTypes(UA_Client *client, const UA_DataTypeArray *types) {
+  client->config.customDataTypes = types;
+
+  return UA_STATUSCODE_GOOD;
+}
+
+UA_StatusCode
+UA_Server_setCustomDataTypes(UA_Server *server, const UA_DataTypeArray *types) {
+  server->config.customDataTypes = types;
+
+  return UA_STATUSCODE_GOOD;
+}
--- open62541.h.orig
+++ open62541.h
@@ -54,7 +54,7 @@
 #define UA_ENABLE_PUBSUB_INFORMATIONMODEL
 #define UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS
 #define UA_ENABLE_DA
-#define UA_ENABLE_ENCRYPTION
+/* #undef UA_ENABLE_ENCRYPTION */
 #define UA_ENABLE_HISTORIZING
 #define UA_ENABLE_PARSING
 /* #undef UA_ENABLE_MICRO_EMB_DEV_PROFILE */
@@ -63,12 +63,14 @@
 /* #undef UA_ENABLE_JSON_ENCODING */
 /* #undef UA_ENABLE_PUBSUB_MQTT */
 /* #undef UA_ENABLE_ENCRYPTION_MBEDTLS */
-#define UA_ENABLE_ENCRYPTION_OPENSSL
+/* #undef UA_ENABLE_ENCRYPTION_OPENSSL */
 /* #undef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */
 
 /* Multithreading */
 /* #undef UA_ENABLE_IMMUTABLE_NODES */
+#ifndef UA_MULTITHREADING
 #define UA_MULTITHREADING 100
+#endif
 #if UA_MULTITHREADING >= 200 && !defined(UA_ENABLE_IMMUTABLE_NODES)
 #error "The multithreading feature requires nodes to be immutable"
 #endif
@@ -78,12 +80,12 @@
 #define UA_ENABLE_TYPEDESCRIPTION
 #define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
 /* #undef UA_ENABLE_DETERMINISTIC_RNG */
-#define UA_ENABLE_DISCOVERY
-#define UA_ENABLE_DISCOVERY_MULTICAST
+/* #undef UA_ENABLE_DISCOVERY */
+/* #undef UA_ENABLE_DISCOVERY_MULTICAST */
 /* #undef UA_ENABLE_WEBSOCKET_SERVER */
 /* #undef UA_ENABLE_QUERY */
 /* #undef UA_ENABLE_MALLOC_SINGLETON */
-#define UA_ENABLE_DISCOVERY_SEMAPHORE
+/* #undef UA_ENABLE_DISCOVERY_SEMAPHORE */
 /* #undef UA_ENABLE_UNIT_TEST_FAILURE_HOOKS */
 /* #undef UA_ENABLE_VALGRIND_INTERACTIVE */
 #define UA_VALGRIND_INTERACTIVE_INTERVAL 1000
@@ -93,7 +95,7 @@
 /* #undef UA_PACK_DEBIAN */
 
 /* Options for Debugging */
-#define UA_DEBUG
+/* #undef UA_DEBUG */
 /* #undef UA_DEBUG_DUMP_PKGS */
 
 /**
@@ -130,7 +132,7 @@
 #endif
 
 // specific architectures can undef this
-#define UA_HAS_GETIFADDR
+/* #undef UA_HAS_GETIFADDR */
 



 



 







@@ -27530,6 +27532,10 @@

















     void *context;
     void (*clear)(UA_AccessControl *ac);
 
+    /* Security mode similar to UA_ClientConfig.securityMode */
+
+    UA_MessageSecurityMode securityMode;
+
     /* Supported login mechanisms. The server endpoints are created from here. */
     size_t userTokenPoliciesSize;
     UA_UserTokenPolicy *userTokenPolicies;

@@ -29793,6 +29799,7 @@
 struct UA_ServerConfig {
     UA_UInt16 nThreads; /* only if multithreading is enabled */
     UA_Logger logger;
+    void *userdata;
 
     /* Server Description:
      * The description must be internally consistent.
@@ -33591,6 +33598,11 @@
 #define UA_fileExists(X) ( UA_access(X, 0) == 0)
 #endif
 
+UA_StatusCode UA_EXPORT
+UA_Client_setCustomDataTypes(UA_Client *client, const UA_DataTypeArray *types);
+
+UA_StatusCode UA_EXPORT
+UA_Server_setCustomDataTypes(UA_Server *server, const UA_DataTypeArray *types);
 
 _UA_END_DECLS
 







|




|
|
|
|
|
|










|






|








|

















>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












|
|
|







<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



>
>
>

>




|
|


















|








|












|
|
|
<




<

|








|








|





|
>
>
>

>
>
>

>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>
|

<





|











28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198



199











































200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256

257
258
259
260

261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
libressl plus a structure field to UA_ServerConfig.accessControl
for fine tuning the server's security level. And it adds another
structure field named UA_ServerConfig.userdata which is used for
instrumenting node construction/destruction.

--- open62541.c.orig
+++ open62541.c
@@ -29332,6 +29332,7 @@
         config->logger.clear(config->logger.context);
     config->logger.log = NULL;
     config->logger.clear = NULL;
+    config->userdata = NULL;
 
 #ifdef UA_ENABLE_PUBSUB
     /* PubSub configuration */
@@ -47506,10 +47507,15 @@
               UA_VariableNode *node, const UA_DataSource *dataSource) {
     if(node->head.nodeClass != UA_NODECLASS_VARIABLE)
         return UA_STATUSCODE_BADNODECLASSINVALID;
-    if(node->valueSource == UA_VALUESOURCE_DATA)
-        UA_DataValue_clear(&node->value.data.value);
-    node->value.dataSource = *dataSource;
-    node->valueSource = UA_VALUESOURCE_DATASOURCE;
+    if(dataSource->read != NULL || dataSource->write != NULL) {
+        if(node->valueSource == UA_VALUESOURCE_DATA)
+            UA_DataValue_clear(&node->value.data.value);
+        node->value.dataSource = *dataSource;
+        node->valueSource = UA_VALUESOURCE_DATASOURCE;
+    } else if (node->valueSource != UA_VALUESOURCE_DATA) {
+        node->valueSource = UA_VALUESOURCE_DATA;
+        node->value.dataSource = *dataSource;
+    }
     return UA_STATUSCODE_GOOD;
 }
 
@@ -50850,7 +50856,7 @@
     UA_WriteValue_init(&wValue);
     wValue.nodeId = *nodeId;
     wValue.attributeId = attributeId;
-    if(attributeId == UA_ATTRIBUTEID_VALUE)
+    if(attributeId == UA_ATTRIBUTEID_VALUE && inDataType == &UA_TYPES[UA_TYPES_VARIANT])
         wValue.value.value = *(const UA_Variant*)in;
     else
         /* hack. is never written into. */
@@ -50952,13 +50958,16 @@
     if(attributeId == UA_ATTRIBUTEID_VALUE) {
         memcpy(out, &res->value, sizeof(UA_Variant));
         UA_Variant_init(&res->value);
-    } else if(attributeId == UA_ATTRIBUTEID_NODECLASS) {
+    } else if(attributeId == UA_ATTRIBUTEID_NODECLASS && outDataType != &UA_TYPES[UA_TYPES_VARIANT]) {
         memcpy(out, (UA_NodeClass*)res->value.data, sizeof(UA_NodeClass));
     } else if(UA_Variant_isScalar(&res->value) &&
               res->value.type == outDataType) {
         memcpy(out, res->value.data, res->value.type->memSize);
         UA_free(res->value.data);
         res->value.data = NULL;
+    } else if(UA_Variant_isScalar(&res->value) && outDataType == &UA_TYPES[UA_TYPES_VARIANT]) {
+        memcpy(out, &res->value, sizeof(UA_Variant));
+        UA_Variant_init(&res->value);
     } else {
         retval = UA_STATUSCODE_BADUNEXPECTEDERROR;
     }
@@ -69759,7 +69768,7 @@
 #include <openssl/pem.h>
 
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && OPENSSL_VERSION_NUMBER != 0x20000000L
 #define get_pkey_rsa(evp) EVP_PKEY_get0_RSA(evp)
 #else
 #define get_pkey_rsa(evp) ((evp)->pkey.rsa)
@@ -70627,7 +70636,7 @@
                                           &pkData, len);
     } else {
         BIO *bio = NULL;
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
         bio = BIO_new_mem_buf((void *) privateKey->data, (int) privateKey->length);
 #else
         bio = BIO_new_mem_buf((const void *) privateKey->data, (int) privateKey->length);
@@ -70664,7 +70673,7 @@
     X509 * result = NULL;
 
     BIO* bio = NULL;
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
     bio = BIO_new_mem_buf((void *) certificate->data, (int) certificate->length);
 #else
     bio = BIO_new_mem_buf((const void *) certificate->data, (int) certificate->length);
@@ -73523,7 +73532,7 @@
         } else {
             BIO* bio = NULL;
 
-#if OPENSSL_VERSION_NUMBER < 0x1000207fL
+#if OPENSSL_VERSION_NUMBER < 0x1000207fL && OPENSSL_VERSION_NUMBER != 0x20000000L
             bio = BIO_new_mem_buf((void *) certificateRevocationList[i].data,
                                   (int) certificateRevocationList[i].length);
 #else
@@ -73839,7 +73848,7 @@
     /* Set flag to check if the certificate has an invalid signature */
     X509_STORE_CTX_set_flags (storeCtx, X509_V_FLAG_CHECK_SS_SIGNATURE);
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && OPENSSL_VERSION_NUMBER != 0x20000000L
     if (X509_STORE_CTX_get_check_issued (storeCtx) (storeCtx,certificateX509, certificateX509) != 1) {
         X509_STORE_CTX_set_flags (storeCtx, X509_V_FLAG_CRL_CHECK);
     }
@@ -73849,6 +73858,7 @@
     }
 #endif
 
+#if OPENSSL_VERSION_NUMBER != 0x20000000L
     /* This condition will check whether the certificate is a User certificate or a CA certificate.
      * If the KU_KEY_CERT_SIGN and KU_CRL_SIGN of key_usage are set, then the certificate shall be
      * condidered as CA Certificate and cannot be used to establish a connection. Refer the test case
@@ -73858,6 +73868,7 @@
        (val & KU_CRL_SIGN)) {
         return UA_STATUSCODE_BADCERTIFICATEUSENOTALLOWED;
     }
+#endif
 
     opensslRet = X509_verify_cert (storeCtx);
     if (opensslRet == 1) {
@@ -73866,7 +73877,7 @@
         /* Check if the not trusted certificate has a CRL file. If there is no CRL file available for the corresponding
          * parent certificate then return status code UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN. Refer the test
          * case CTT/Security/Security Certificate Validation/002.js */
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && OPENSSL_VERSION_NUMBER != 0x20000000L
         if (X509_STORE_CTX_get_check_issued (storeCtx) (storeCtx,certificateX509, certificateX509) != 1) {
 #else
         if (storeCtx->check_issued(storeCtx,certificateX509, certificateX509) != 1) {
@@ -73904,6 +73915,7 @@
     else {
         opensslRet = X509_STORE_CTX_get_error (storeCtx);
 
+#if OPENSSL_VERSION_NUMBER != 0x20000000L
         /* Check the issued certificate of a CA that is not trusted but available */
         if(opensslRet == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN){
             int                     trusted_cert_len = sk_X509_num(ctx->skTrusted);
@@ -73929,6 +73941,7 @@
                 }
             }
         }
+#endif
 
         /* Return expected OPCUA error code */
         ret = UA_X509_Store_CTX_Error_To_UAError (opensslRet);
@@ -78679,6 +78692,12 @@
                         void **sessionContext) {
     AccessControlContext *context = (AccessControlContext*)ac->context;
 
+    if(ac->securityMode != UA_MESSAGESECURITYMODE_NONE) {
+        if(endpointDescription->securityLevel < ac->securityMode) {
+           return UA_STATUSCODE_BADSECURITYCHECKSFAILED;
+        }
+    }
+
     /* The empty token is interpreted as anonymous */
     if(userIdentityToken->encoding == UA_EXTENSIONOBJECT_ENCODED_NOBODY) {
         if(!context->allowAnonymous)
@@ -78891,6 +78910,9 @@
     UA_LOG_WARNING(&config->logger, UA_LOGCATEGORY_SERVER,
                    "AccessControl: Unconfigured AccessControl. Users have all permissions.");
     UA_AccessControl *ac = &config->accessControl;
+
+    ac->securityMode = UA_MESSAGESECURITYMODE_NONE;
+
     ac->clear = clear_default;
     ac->activateSession = activateSession_default;
     ac->closeSession = closeSession_default;



@@ -83244,11 +83266,7 @@











































     time_t gmt, rawtime = time(NULL);
 
     struct tm ptm;
-#ifdef __CODEGEARC__
-    gmtime_s(&rawtime, &ptm);
-#else
-    gmtime_s(&ptm, &rawtime);
-#endif    
+    ptm = *gmtime(&rawtime);
     // Request that mktime() looksup dst in timezone database
     ptm.tm_isdst = -1;
     gmt = mktime(&ptm);
@@ -84188,3 +84206,17 @@
     /* Return connection with state UA_CONNECTIONSTATE_OPENING */
     return connection;
 }
+
+UA_StatusCode
+UA_Client_setCustomDataTypes(UA_Client *client, const UA_DataTypeArray *types) {
+  client->config.customDataTypes = types;
+
+  return UA_STATUSCODE_GOOD;
+}
+
+UA_StatusCode
+UA_Server_setCustomDataTypes(UA_Server *server, const UA_DataTypeArray *types) {
+  server->config.customDataTypes = types;
+
+  return UA_STATUSCODE_GOOD;
+}
--- open62541.h.orig
+++ open62541.h
@@ -55,7 +55,7 @@
 #define UA_ENABLE_PUBSUB_INFORMATIONMODEL
 #define UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS
 #define UA_ENABLE_DA
-#define UA_ENABLE_ENCRYPTION
+/* #undef UA_ENABLE_ENCRYPTION */
 #define UA_ENABLE_HISTORIZING
 #define UA_ENABLE_PARSING
 /* #undef UA_ENABLE_MICRO_EMB_DEV_PROFILE */
@@ -64,24 +64,26 @@
 /* #undef UA_ENABLE_JSON_ENCODING */
 /* #undef UA_ENABLE_PUBSUB_MQTT */
 /* #undef UA_ENABLE_ENCRYPTION_MBEDTLS */
-#define UA_ENABLE_ENCRYPTION_OPENSSL
+/* #undef UA_ENABLE_ENCRYPTION_OPENSSL */
 /* #undef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */
 
 /* Multithreading */
 /* #undef UA_ENABLE_IMMUTABLE_NODES */
+#ifndef UA_MULTITHREADING
 #define UA_MULTITHREADING 100
+#endif
 
 /* Advanced Options */
 #define UA_ENABLE_STATUSCODE_DESCRIPTIONS

 #define UA_ENABLE_TYPEDESCRIPTION
 #define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
 /* #undef UA_ENABLE_DETERMINISTIC_RNG */
-#define UA_ENABLE_DISCOVERY

+/* #undef UA_ENABLE_DISCOVERY */
 /* #undef UA_ENABLE_DISCOVERY_MULTICAST */
 /* #undef UA_ENABLE_WEBSOCKET_SERVER */
 /* #undef UA_ENABLE_QUERY */
 /* #undef UA_ENABLE_MALLOC_SINGLETON */
-#define UA_ENABLE_DISCOVERY_SEMAPHORE
+/* #undef UA_ENABLE_DISCOVERY_SEMAPHORE */
 /* #undef UA_ENABLE_UNIT_TEST_FAILURE_HOOKS */
 /* #undef UA_ENABLE_VALGRIND_INTERACTIVE */
 #define UA_VALGRIND_INTERACTIVE_INTERVAL 1000
@@ -92,7 +94,7 @@
 /* #undef UA_PACK_DEBIAN */
 
 /* Options for Debugging */
-#define UA_DEBUG
+/* #undef UA_DEBUG */
 /* #undef UA_DEBUG_DUMP_PKGS */
 
 /**
@@ -129,9 +131,23 @@
 #endif
 
 // specific architectures can undef this
-#define UA_HAS_GETIFADDR
+/* #undef UA_HAS_GETIFADDR */
+
+#ifdef UA_malloc
+void* UA_malloc(unsigned long size);
+#endif
 
+#ifdef UA_calloc
+void* UA_calloc(unsigned long num, unsigned long size); //allocate memory in the heap with size*num bytes and set the memory to zero
+#endif
 
+#ifdef UA_realloc
+void* UA_realloc(void *ptr, unsigned long new_size);//re-allocate memory in the heap with new_size bytes from previously allocated memory ptr
+#endif
+
+#ifdef UA_free
+void UA_free(void* ptr); //de-allocate memory previously allocated with UA_malloc, UA_calloc or UA_realloc
+#endif
 
 /*********************************** amalgamated original file "/open62541/arch/win32/ua_architecture.h" ***********************************/
 
@@ -262,11 +278,11 @@
 #endif
 
 #ifdef __CODEGEARC__
-#define _snprintf_s(a,b,c,...) snprintf(a,b,__VA_ARGS__)
+#define _snprintf(a,b,...) snprintf(a,b,__VA_ARGS__)
 #endif
 
 /* 3rd Argument is the string */
-#define UA_snprintf(source, size, ...) _snprintf_s(source, size, _TRUNCATE, __VA_ARGS__)
+#define UA_snprintf(source, size, ...) _snprintf(source, size, __VA_ARGS__)
 #define UA_strncasecmp _strnicmp
 
 #define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
@@ -26585,6 +26601,10 @@
     void *context;
     void (*clear)(UA_AccessControl *ac);
 
+    /* Security mode similar to UA_ClientConfig.securityMode */
+
+    UA_MessageSecurityMode securityMode;
+
     /* Supported login mechanisms. The server endpoints are created from here. */
     size_t userTokenPoliciesSize;
     UA_UserTokenPolicy *userTokenPolicies;
@@ -28721,6 +28741,7 @@
 
 struct UA_ServerConfig {

     UA_Logger logger;
+    void *userdata;
 
     /* Server Description:
      * The description must be internally consistent.
@@ -34650,6 +34671,11 @@
 #define UA_fileExists(X) ( UA_access(X, 0) == 0)
 #endif
 
+UA_StatusCode UA_EXPORT
+UA_Client_setCustomDataTypes(UA_Client *client, const UA_DataTypeArray *types);
+
+UA_StatusCode UA_EXPORT
+UA_Server_setCustomDataTypes(UA_Server *server, const UA_DataTypeArray *types);
 
 _UA_END_DECLS
 
Changes to jni/topcua/open62541/open62541.c.

more than 10,000 changes

Changes to jni/topcua/open62541/open62541.h.
1
2
3
4
5
6
7
8
9
10
/* THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCES
 * visit http://open62541.org/ for information about this software
 * Git-Revision: v1.1.5
 */

/*
 * Copyright (C) 2014-2018 the contributors as stated in the AUTHORS file
 *
 * This file is part of open62541. open62541 is free software: you can
 * redistribute it and/or modify it under the terms of the Mozilla Public


|







1
2
3
4
5
6
7
8
9
10
/* THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCES
 * visit http://open62541.org/ for information about this software
 * Git-Revision: v1.2
 */

/*
 * Copyright (C) 2014-2018 the contributors as stated in the AUTHORS file
 *
 * This file is part of open62541. open62541 is free software: you can
 * redistribute it and/or modify it under the terms of the Mozilla Public
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

50
51
52
53
54
55
56
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


/**
 * open62541 Version
 * ----------------- */
#define UA_OPEN62541_VER_MAJOR 1
#define UA_OPEN62541_VER_MINOR 1
#define UA_OPEN62541_VER_PATCH 5
#define UA_OPEN62541_VER_LABEL "" /* Release candidate label, etc. */
#define UA_OPEN62541_VER_COMMIT "v1.1.5"

/**
 * Feature Options
 * ---------------
 * Changing the feature options has no effect on a pre-compiled library. */

#define UA_LOGLEVEL 300
#ifndef UA_ENABLE_AMALGAMATION
#define UA_ENABLE_AMALGAMATION
#endif
#define UA_ENABLE_METHODCALLS
#define UA_ENABLE_NODEMANAGEMENT
#define UA_ENABLE_SUBSCRIPTIONS
#define UA_ENABLE_PUBSUB

/* #undef UA_ENABLE_PUBSUB_ETH_UADP */
/* #undef UA_ENABLE_PUBSUB_ETH_UADP_ETF */
/* #undef UA_ENABLE_PUBSUB_ETH_UADP_XDP */
/* #undef UA_ENABLE_PUBSUB_DELTAFRAMES */
#define UA_ENABLE_PUBSUB_INFORMATIONMODEL
#define UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS
#define UA_ENABLE_DA







|
|

|














>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


/**
 * open62541 Version
 * ----------------- */
#define UA_OPEN62541_VER_MAJOR 1
#define UA_OPEN62541_VER_MINOR 2
#define UA_OPEN62541_VER_PATCH 0
#define UA_OPEN62541_VER_LABEL "" /* Release candidate label, etc. */
#define UA_OPEN62541_VER_COMMIT "v1.2"

/**
 * Feature Options
 * ---------------
 * Changing the feature options has no effect on a pre-compiled library. */

#define UA_LOGLEVEL 300
#ifndef UA_ENABLE_AMALGAMATION
#define UA_ENABLE_AMALGAMATION
#endif
#define UA_ENABLE_METHODCALLS
#define UA_ENABLE_NODEMANAGEMENT
#define UA_ENABLE_SUBSCRIPTIONS
#define UA_ENABLE_PUBSUB
/* #undef UA_ENABLE_PUBSUB_FILE_CONFIG */
/* #undef UA_ENABLE_PUBSUB_ETH_UADP */
/* #undef UA_ENABLE_PUBSUB_ETH_UADP_ETF */
/* #undef UA_ENABLE_PUBSUB_ETH_UADP_XDP */
/* #undef UA_ENABLE_PUBSUB_DELTAFRAMES */
#define UA_ENABLE_PUBSUB_INFORMATIONMODEL
#define UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS
#define UA_ENABLE_DA
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
/* #undef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */

/* Multithreading */
/* #undef UA_ENABLE_IMMUTABLE_NODES */
#ifndef UA_MULTITHREADING
#define UA_MULTITHREADING 100
#endif
#if UA_MULTITHREADING >= 200 && !defined(UA_ENABLE_IMMUTABLE_NODES)
#error "The multithreading feature requires nodes to be immutable"
#endif

/* Advanced Options */
#define UA_ENABLE_STATUSCODE_DESCRIPTIONS
#define UA_ENABLE_TYPEDESCRIPTION
#define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
/* #undef UA_ENABLE_DETERMINISTIC_RNG */
/* #undef UA_ENABLE_DISCOVERY */
/* #undef UA_ENABLE_DISCOVERY_MULTICAST */
/* #undef UA_ENABLE_WEBSOCKET_SERVER */
/* #undef UA_ENABLE_QUERY */
/* #undef UA_ENABLE_MALLOC_SINGLETON */
/* #undef UA_ENABLE_DISCOVERY_SEMAPHORE */
/* #undef UA_ENABLE_UNIT_TEST_FAILURE_HOOKS */
/* #undef UA_ENABLE_VALGRIND_INTERACTIVE */
#define UA_VALGRIND_INTERACTIVE_INTERVAL 1000
#define UA_GENERATED_NAMESPACE_ZERO

/* #undef UA_ENABLE_PUBSUB_CUSTOM_PUBLISH_HANDLING */

/* #undef UA_PACK_DEBIAN */

/* Options for Debugging */
/* #undef UA_DEBUG */
/* #undef UA_DEBUG_DUMP_PKGS */








<
<
<
















>
|







68
69
70
71
72
73
74



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* #undef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */

/* Multithreading */
/* #undef UA_ENABLE_IMMUTABLE_NODES */
#ifndef UA_MULTITHREADING
#define UA_MULTITHREADING 100
#endif




/* Advanced Options */
#define UA_ENABLE_STATUSCODE_DESCRIPTIONS
#define UA_ENABLE_TYPEDESCRIPTION
#define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
/* #undef UA_ENABLE_DETERMINISTIC_RNG */
/* #undef UA_ENABLE_DISCOVERY */
/* #undef UA_ENABLE_DISCOVERY_MULTICAST */
/* #undef UA_ENABLE_WEBSOCKET_SERVER */
/* #undef UA_ENABLE_QUERY */
/* #undef UA_ENABLE_MALLOC_SINGLETON */
/* #undef UA_ENABLE_DISCOVERY_SEMAPHORE */
/* #undef UA_ENABLE_UNIT_TEST_FAILURE_HOOKS */
/* #undef UA_ENABLE_VALGRIND_INTERACTIVE */
#define UA_VALGRIND_INTERACTIVE_INTERVAL 1000
#define UA_GENERATED_NAMESPACE_ZERO
/* #undef UA_GENERATED_NAMESPACE_ZERO_FULL */
/* #undef UA_ENABLE_PUBSUB_MONITORING */

/* #undef UA_PACK_DEBIAN */

/* Options for Debugging */
/* #undef UA_DEBUG */
/* #undef UA_DEBUG_DUMP_PKGS */

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#  define UA_ARCHITECTURE_POSIX
# endif
#endif

// specific architectures can undef this
/* #undef UA_HAS_GETIFADDR */



/*********************************** amalgamated original file "/open62541/include/open62541/architecture_base.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) Stefan Profanter, fortiss GmbH
 */

#ifndef ARCH_UA_ARCHITECTURE_BASE_H
#define ARCH_UA_ARCHITECTURE_BASE_H

/*
 * With the following list of defines, one can define its own UA_sleep_ms using a preprocessor define.
 * E.g. see unit tests.
 */

#ifdef UA_sleep_ms
void UA_sleep_ms(unsigned long ms);
#endif

#ifdef UA_malloc
void* UA_malloc(unsigned long size);
#endif

#ifdef UA_calloc
void* UA_calloc(unsigned long num, unsigned long size); //allocate memory in the heap with size*num bytes and set the memory to zero
#endif

#ifdef UA_realloc
void* UA_realloc(void *ptr, unsigned long new_size);//re-allocate memory in the heap with new_size bytes from previously allocated memory ptr
#endif

#ifdef UA_free
void UA_free(void* ptr); //de-allocate memory previously allocated with UA_malloc, UA_calloc or UA_realloc
#endif

#endif //ARCH_UA_ARCHITECTURE_BASE_H

/*********************************** amalgamated original file "/open62541/arch/win32/ua_architecture.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
 *
 *    Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */

#ifdef UA_ARCHITECTURE_WIN32

#ifndef PLUGINS_ARCH_WIN32_UA_ARCHITECTURE_H_
#define PLUGINS_ARCH_WIN32_UA_ARCHITECTURE_H_


#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif

/* Disable some security warnings on MSVC */
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















<
<













<







129
130
131
132
133
134
135























136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151


152
153
154
155
156
157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
#  define UA_ARCHITECTURE_POSIX
# endif
#endif

// specific architectures can undef this
/* #undef UA_HAS_GETIFADDR */
























#ifdef UA_malloc
void* UA_malloc(unsigned long size);
#endif

#ifdef UA_calloc
void* UA_calloc(unsigned long num, unsigned long size); //allocate memory in the heap with size*num bytes and set the memory to zero
#endif

#ifdef UA_realloc
void* UA_realloc(void *ptr, unsigned long new_size);//re-allocate memory in the heap with new_size bytes from previously allocated memory ptr
#endif

#ifdef UA_free
void UA_free(void* ptr); //de-allocate memory previously allocated with UA_malloc, UA_calloc or UA_realloc
#endif



/*********************************** amalgamated original file "/open62541/arch/win32/ua_architecture.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
 *
 *    Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */

#ifdef UA_ARCHITECTURE_WIN32

#ifndef PLUGINS_ARCH_WIN32_UA_ARCHITECTURE_H_
#define PLUGINS_ARCH_WIN32_UA_ARCHITECTURE_H_


#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif

/* Disable some security warnings on MSVC */
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
228
229
230
231
232
233
234
235


236
237
238
239
240
241
242
#else
# include <unistd.h> //access and tests
# define UA_access access
#endif

#define ssize_t int
#define OPTVAL_TYPE char
#ifndef UA_sleep_ms


# define UA_sleep_ms(X) Sleep(X)
#endif

// Windows does not support ansi colors
// #define UA_ENABLE_LOG_COLORS

#define UA_IPV6 1







|
>
>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#else
# include <unistd.h> //access and tests
# define UA_access access
#endif

#define ssize_t int
#define OPTVAL_TYPE char
#ifdef UA_sleep_ms
void UA_sleep_ms(unsigned long ms);
#else
# define UA_sleep_ms(X) Sleep(X)
#endif

// Windows does not support ansi colors
// #define UA_ENABLE_LOG_COLORS

#define UA_IPV6 1
290
291
292
293
294
295
296

297
298
299
300
301
302
303
304

305
306

307
308
309
310
311

312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# define UA_if_nametoindex if_nametoindex
#endif

#ifdef maxStringLength //defined in mingw64
# undef maxStringLength
#endif


#ifndef UA_free
#define UA_free free
#endif
#ifndef UA_malloc
#define UA_malloc malloc
#endif
#ifndef UA_calloc
#define UA_calloc calloc

#endif
#ifndef UA_realloc

#define UA_realloc realloc
#endif

/* 3rd Argument is the string */
#define UA_snprintf(source, size, ...) _snprintf_s(source, size, _TRUNCATE, __VA_ARGS__)


#define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
    char *errno_str = NULL; \
    FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, \
    NULL, WSAGetLastError(), \
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), \
    (LPSTR)&errno_str, 0, NULL); \
    LOG; \
    LocalFree(errno_str); \
}
#define UA_LOG_SOCKET_ERRNO_GAI_WRAP UA_LOG_SOCKET_ERRNO_WRAP

#if UA_MULTITHREADING >= 100
#define UA_LOCK_TYPE(mutexName) CRITICAL_SECTION mutexName; \
                                int mutexName##Counter;
#define UA_LOCK_INIT(mutexName) InitializeCriticalSection(&mutexName); \
                                mutexName##Counter = 0;;
#define UA_LOCK_DESTROY(mutexName) DeleteCriticalSection(&mutexName);
#define UA_LOCK(mutexName) EnterCriticalSection(&mutexName); \
                           UA_assert(++(mutexName##Counter) == 1);
#define UA_UNLOCK(mutexName) UA_assert(--(mutexName##Counter) == 0); \
                             LeaveCriticalSection(&mutexName);
#define UA_LOCK_ASSERT(mutexName, num) UA_assert(mutexName##Counter == num);
#else







>

|
<
<
|
<
<
|
>

|
>
|



|
>
















|







265
266
267
268
269
270
271
272
273
274


275


276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# define UA_if_nametoindex if_nametoindex
#endif

#ifdef maxStringLength //defined in mingw64
# undef maxStringLength
#endif

/* Use the standard malloc */
#ifndef UA_free
# define UA_free free


# define UA_malloc malloc


# define UA_calloc calloc
# define UA_realloc realloc
#endif

#ifdef __CODEGEARC__
#define _snprintf(a,b,...) snprintf(a,b,__VA_ARGS__)
#endif

/* 3rd Argument is the string */
#define UA_snprintf(source, size, ...) _snprintf(source, size, __VA_ARGS__)
#define UA_strncasecmp _strnicmp

#define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
    char *errno_str = NULL; \
    FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, \
    NULL, WSAGetLastError(), \
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), \
    (LPSTR)&errno_str, 0, NULL); \
    LOG; \
    LocalFree(errno_str); \
}
#define UA_LOG_SOCKET_ERRNO_GAI_WRAP UA_LOG_SOCKET_ERRNO_WRAP

#if UA_MULTITHREADING >= 100
#define UA_LOCK_TYPE(mutexName) CRITICAL_SECTION mutexName; \
                                int mutexName##Counter;
#define UA_LOCK_INIT(mutexName) InitializeCriticalSection(&mutexName); \
                                mutexName##Counter = 0;
#define UA_LOCK_DESTROY(mutexName) DeleteCriticalSection(&mutexName);
#define UA_LOCK(mutexName) EnterCriticalSection(&mutexName); \
                           UA_assert(++(mutexName##Counter) == 1);
#define UA_UNLOCK(mutexName) UA_assert(--(mutexName##Counter) == 0); \
                             LeaveCriticalSection(&mutexName);
#define UA_LOCK_ASSERT(mutexName, num) UA_assert(mutexName##Counter == num);
#else
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379

380
381
382
383
384
385
386
387
388
389


390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
 *    Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */

#ifdef UA_ARCHITECTURE_POSIX



/* Enable POSIX features */
#if !defined(_XOPEN_SOURCE)
# define _XOPEN_SOURCE 600
#endif
#ifndef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
#endif
/* On older systems we need to define _BSD_SOURCE.
 * _DEFAULT_SOURCE is an alias for that. */
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif


#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/types.h>
#include <net/if.h>
#ifndef UA_sleep_ms


# include <unistd.h>
# define UA_sleep_ms(X) usleep(X * 1000)
#endif

#define OPTVAL_TYPE int

#include <fcntl.h>
#include <unistd.h> // read, write, close

#ifdef __QNX__
# include <sys/socket.h>
#endif
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
# include <sys/param.h>
# if defined(BSD)
#  include<sys/socket.h>
# endif
#endif
#if !defined(__CYGWIN__)
# include <netinet/tcp.h>
#endif

/* unsigned int for windows and workaround to a glibc bug */
/* Additionally if GNU_LIBRARY is not defined, it may be using
 * musl libc (e.g. Docker Alpine) */
#if  defined(__OpenBSD__) || \
    (defined(__GNU_LIBRARY__) && (__GNU_LIBRARY__ <= 6) && \
     (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 16) || \







<












>









|
>
>


















|
|
<







335
336
337
338
339
340
341

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386

387
388
389
390
391
392
393
 *    Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */

#ifdef UA_ARCHITECTURE_POSIX



/* Enable POSIX features */
#if !defined(_XOPEN_SOURCE)
# define _XOPEN_SOURCE 600
#endif
#ifndef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
#endif
/* On older systems we need to define _BSD_SOURCE.
 * _DEFAULT_SOURCE is an alias for that. */
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif


#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/types.h>
#include <net/if.h>
#ifdef UA_sleep_ms
void UA_sleep_ms(unsigned long ms);
#else
# include <unistd.h>
# define UA_sleep_ms(X) usleep(X * 1000)
#endif

#define OPTVAL_TYPE int

#include <fcntl.h>
#include <unistd.h> // read, write, close

#ifdef __QNX__
# include <sys/socket.h>
#endif
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
# include <sys/param.h>
# if defined(BSD)
#  include<sys/socket.h>
# endif
#endif

#include <netinet/tcp.h>


/* unsigned int for windows and workaround to a glibc bug */
/* Additionally if GNU_LIBRARY is not defined, it may be using
 * musl libc (e.g. Docker Alpine) */
#if  defined(__OpenBSD__) || \
    (defined(__GNU_LIBRARY__) && (__GNU_LIBRARY__ <= 6) && \
     (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 16) || \
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491

492

493
494
495
496
497
498
499
#define UA_gethostname gethostname
#define UA_getsockname getsockname
#define UA_inet_pton inet_pton
#if UA_IPV6
# define UA_if_nametoindex if_nametoindex
#endif

#ifdef UA_ENABLE_MALLOC_SINGLETON
extern void * (*UA_globalMalloc)(size_t size);
extern void (*UA_globalFree)(void *ptr);
extern void * (*UA_globalCalloc)(size_t nelem, size_t elsize);
extern void * (*UA_globalRealloc)(void *ptr, size_t size);
# define UA_free(ptr) UA_globalFree(ptr)
# define UA_malloc(size) UA_globalMalloc(size)
# define UA_calloc(num, size) UA_globalCalloc(num, size)
# define UA_realloc(ptr, size) UA_globalRealloc(ptr, size)
#endif

#include <stdlib.h>
#ifndef UA_free
# define UA_free free
#endif
#ifndef UA_malloc
# define UA_malloc malloc
#endif
#ifndef UA_calloc
# define UA_calloc calloc
#endif
#ifndef UA_realloc
# define UA_realloc realloc
#endif

#include <stdio.h>

#define UA_snprintf snprintf


#define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
    char *errno_str = strerror(errno); \
    LOG; \
}
#define UA_LOG_SOCKET_ERRNO_GAI_WRAP(LOG) { \
    const char *errno_str = gai_strerror(errno); \







<
<
<
<
<
<
<
<
<
<
|



<
<

<
<

<
<




>

>







435
436
437
438
439
440
441










442
443
444
445


446


447


448
449
450
451
452
453
454
455
456
457
458
459
460
461
#define UA_gethostname gethostname
#define UA_getsockname getsockname
#define UA_inet_pton inet_pton
#if UA_IPV6
# define UA_if_nametoindex if_nametoindex
#endif











/* Use the standard malloc */
#include <stdlib.h>
#ifndef UA_free
# define UA_free free


# define UA_malloc malloc


# define UA_calloc calloc


# define UA_realloc realloc
#endif

#include <stdio.h>
#include <strings.h>
#define UA_snprintf snprintf
#define UA_strncasecmp strncasecmp

#define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
    char *errno_str = strerror(errno); \
    LOG; \
}
#define UA_LOG_SOCKET_ERRNO_GAI_WRAP(LOG) { \
    const char *errno_str = gai_strerror(errno); \
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
#undef CIRCLEQ_INSERT_TAIL
#undef CIRCLEQ_REMOVE
#undef CIRCLEQ_REPLACE

#undef _SYS_QUEUE_H_

#endif /* defined(__APPLE__)  && defined(_SYS_QUEUE_H_) */



#endif /* UA_ARCHITECTURE_POSIX */

/*********************************** amalgamated original file "/open62541/deps/ms_stdint.h" ***********************************/

// ISO C9x  compliant stdint.h for Microsoft Visual Studio







<







594
595
596
597
598
599
600

601
602
603
604
605
606
607
#undef CIRCLEQ_INSERT_TAIL
#undef CIRCLEQ_REMOVE
#undef CIRCLEQ_REPLACE

#undef _SYS_QUEUE_H_

#endif /* defined(__APPLE__)  && defined(_SYS_QUEUE_H_) */



#endif /* UA_ARCHITECTURE_POSIX */

/*********************************** amalgamated original file "/open62541/deps/ms_stdint.h" ***********************************/

// ISO C9x  compliant stdint.h for Microsoft Visual Studio
964
965
966
967
968
969
970












































971
972
973
974
975
976
977
# define PRIi64        __PRI_64_LENGTH_MODIFIER__ "i"
# define PRIo64        __PRI_64_LENGTH_MODIFIER__ "o"
# define PRIu64        __PRI_64_LENGTH_MODIFIER__ "u"
# define PRIx64        __PRI_64_LENGTH_MODIFIER__ "x"
# define PRIX64        __PRI_64_LENGTH_MODIFIER__ "X"
#endif













































/**
 * Assertions
 * ----------
 * The assert macro is disabled by defining NDEBUG. It is often forgotten to
 * include -DNDEBUG in the compiler flags when using the single-file release. So
 * we make assertions dependent on the UA_DEBUG definition handled by CMake. */
#ifdef UA_DEBUG







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
# define PRIi64        __PRI_64_LENGTH_MODIFIER__ "i"
# define PRIo64        __PRI_64_LENGTH_MODIFIER__ "o"
# define PRIu64        __PRI_64_LENGTH_MODIFIER__ "u"
# define PRIx64        __PRI_64_LENGTH_MODIFIER__ "x"
# define PRIX64        __PRI_64_LENGTH_MODIFIER__ "X"
#endif

/**
 * Memory Management
 * -----------------
 *
 * The flag ``UA_ENABLE_MALLOC_SINGLETON`` enables singleton (global) variables
 * with method pointers for memory management (malloc et al.). The method
 * pointers can be switched out at runtime. Use-cases for this are testing of
 * constrained memory conditions and arena-based custom memory management.
 *
 * If the flag is undefined, then ``UA_malloc`` etc. are set to the default
 * malloc, as defined in ``/arch/<architecture>/ua_architecture.h``.
 */

#ifdef UA_ENABLE_MALLOC_SINGLETON
extern void * (*UA_mallocSingleton)(size_t size);
extern void (*UA_freeSingleton)(void *ptr);
extern void * (*UA_callocSingleton)(size_t nelem, size_t elsize);
extern void * (*UA_reallocSingleton)(void *ptr, size_t size);
# define UA_malloc(size) UA_mallocSingleton(size)
# define UA_free(ptr) UA_freeSingleton(ptr)
# define UA_calloc(num, size) UA_callocSingleton(num, size)
# define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
#endif

/* Stack-allocation of memory. Use C99 variable-length arrays if possible.
 * Otherwise revert to alloca. Note that alloca is not supported on some
 * plattforms. */
#ifndef UA_STACKARRAY
# if defined(__GNUC__) || defined(__clang__)
#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
# else
# if defined(__GNUC__) || defined(__clang__)
#  define UA_alloca(size) __builtin_alloca (size)
# elif defined(_WIN32)
#  define UA_alloca(SIZE) _alloca(SIZE)
# else
#  include <alloca.h>
#  define UA_alloca(SIZE) alloca(SIZE)
# endif
#  define UA_STACKARRAY(TYPE, NAME, SIZE) \
    TYPE *(NAME) = (TYPE*)UA_alloca(sizeof(TYPE) * (SIZE))
# endif
#endif

/**
 * Assertions
 * ----------
 * The assert macro is disabled by defining NDEBUG. It is often forgotten to
 * include -DNDEBUG in the compiler flags when using the single-file release. So
 * we make assertions dependent on the UA_DEBUG definition handled by CMake. */
#ifdef UA_DEBUG
1040
1041
1042
1043
1044
1045
1046


1047
1048
1049
1050
1051
1052
1053
/**
 * Non-aliasing pointers
 * -------------------- */
#ifdef _MSC_VER
# define UA_RESTRICT __restrict
#elif defined(__GNUC__)
# define UA_RESTRICT __restrict__


#else
# define UA_RESTRICT restrict
#endif

/**
 * Function attributes
 * ------------------- */







>
>







1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
/**
 * Non-aliasing pointers
 * -------------------- */
#ifdef _MSC_VER
# define UA_RESTRICT __restrict
#elif defined(__GNUC__)
# define UA_RESTRICT __restrict__
#elif defined(__CODEGEARC__)
# define UA_RESTRICT _RESTRICT
#else
# define UA_RESTRICT restrict
#endif

/**
 * Function attributes
 * ------------------- */
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
/* Only if the floating points are litle-endian **and** in IEEE 754 format can
 * we memcpy directly onto the network buffer. */
#if (UA_FLOAT_IEEE754 == 1) && (UA_FLOAT_LITTLE_ENDIAN == 1)
# define UA_BINARY_OVERLAYABLE_FLOAT 1
#else
# define UA_BINARY_OVERLAYABLE_FLOAT 0
#endif


/* Atomic Operations
 * -----------------
 * Atomic operations that synchronize across processor cores (for
 * multithreading). Only the inline-functions defined next are used. Replace
 * with architecture-specific operations if necessary. */
#if UA_MULTITHREADING >= 200







<







1206
1207
1208
1209
1210
1211
1212

1213
1214
1215
1216
1217
1218
1219
/* Only if the floating points are litle-endian **and** in IEEE 754 format can
 * we memcpy directly onto the network buffer. */
#if (UA_FLOAT_IEEE754 == 1) && (UA_FLOAT_LITTLE_ENDIAN == 1)
# define UA_BINARY_OVERLAYABLE_FLOAT 1
#else
# define UA_BINARY_OVERLAYABLE_FLOAT 0
#endif


/* Atomic Operations
 * -----------------
 * Atomic operations that synchronize across processor cores (for
 * multithreading). Only the inline-functions defined next are used. Replace
 * with architecture-specific operations if necessary. */
#if UA_MULTITHREADING >= 200
12811
12812
12813
12814
12815
12816
12817
12818




12819
12820
12821
12822
12823
12824
12825
    UA_ATTRIBUTEID_ARRAYDIMENSIONS         = 16,
    UA_ATTRIBUTEID_ACCESSLEVEL             = 17,
    UA_ATTRIBUTEID_USERACCESSLEVEL         = 18,
    UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL = 19,
    UA_ATTRIBUTEID_HISTORIZING             = 20,
    UA_ATTRIBUTEID_EXECUTABLE              = 21,
    UA_ATTRIBUTEID_USEREXECUTABLE          = 22,
    UA_ATTRIBUTEID_DATATYPEDEFINITION      = 23




} UA_AttributeId;

/**
 * Access Level Masks
 * ------------------
 * The access level to a node is given by the following constants that are ANDed
 * with the overall access level. */







|
>
>
>
>







12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
    UA_ATTRIBUTEID_ARRAYDIMENSIONS         = 16,
    UA_ATTRIBUTEID_ACCESSLEVEL             = 17,
    UA_ATTRIBUTEID_USERACCESSLEVEL         = 18,
    UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL = 19,
    UA_ATTRIBUTEID_HISTORIZING             = 20,
    UA_ATTRIBUTEID_EXECUTABLE              = 21,
    UA_ATTRIBUTEID_USEREXECUTABLE          = 22,
    UA_ATTRIBUTEID_DATATYPEDEFINITION      = 23,
    UA_ATTRIBUTEID_ROLEPERMISSIONS         = 24,
    UA_ATTRIBUTEID_USERROLEPERMISSIONS     = 25,
    UA_ATTRIBUTEID_ACCESSRESTRICTIONS      = 26,
    UA_ATTRIBUTEID_ACCESSLEVELEX           = 27
} UA_AttributeId;

/**
 * Access Level Masks
 * ------------------
 * The access level to a node is given by the following constants that are ANDed
 * with the overall access level. */
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920

12921
12922
12923
12924
12925
12926
12927
} UA_Order;

/**
 * Connection State
 * ---------------- */

typedef enum {
    UA_SECURECHANNELSTATE_CLOSED,
    UA_SECURECHANNELSTATE_HEL_SENT,
    UA_SECURECHANNELSTATE_HEL_RECEIVED,
    UA_SECURECHANNELSTATE_ACK_SENT,
    UA_SECURECHANNELSTATE_ACK_RECEIVED,
    UA_SECURECHANNELSTATE_OPN_SENT,
    UA_SECURECHANNELSTATE_OPEN,
    UA_SECURECHANNELSTATE_CLOSING

} UA_SecureChannelState;

typedef enum {
    UA_SESSIONSTATE_CLOSED,
    UA_SESSIONSTATE_CREATE_REQUESTED,
    UA_SESSIONSTATE_CREATED,
    UA_SESSIONSTATE_ACTIVATE_REQUESTED,







|






|
>







12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
} UA_Order;

/**
 * Connection State
 * ---------------- */

typedef enum {
    UA_SECURECHANNELSTATE_FRESH = 0,
    UA_SECURECHANNELSTATE_HEL_SENT,
    UA_SECURECHANNELSTATE_HEL_RECEIVED,
    UA_SECURECHANNELSTATE_ACK_SENT,
    UA_SECURECHANNELSTATE_ACK_RECEIVED,
    UA_SECURECHANNELSTATE_OPN_SENT,
    UA_SECURECHANNELSTATE_OPEN,
    UA_SECURECHANNELSTATE_CLOSING,
    UA_SECURECHANNELSTATE_CLOSED
} UA_SecureChannelState;

typedef enum {
    UA_SESSIONSTATE_CLOSED,
    UA_SESSIONSTATE_CREATE_REQUESTED,
    UA_SESSIONSTATE_CREATED,
    UA_SESSIONSTATE_ACTIVATE_REQUESTED,
13433
13434
13435
13436
13437
13438
13439



13440
13441
13442
13443
13444
13445
13446
    UA_NodeId nodeId;
    UA_String namespaceUri;
    UA_UInt32 serverIndex;
} UA_ExpandedNodeId;

UA_EXPORT extern const UA_ExpandedNodeId UA_EXPANDEDNODEID_NULL;




#ifdef UA_ENABLE_PARSING
/* Parse the ExpandedNodeId format defined in Part 6, 5.3.1.11:
 *
 *   svr=<serverindex>;ns=<namespaceindex>;<type>=<value>
 *     or
 *   svr=<serverindex>;nsu=<uri>;<type>=<value>
 *







>
>
>







13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
    UA_NodeId nodeId;
    UA_String namespaceUri;
    UA_UInt32 serverIndex;
} UA_ExpandedNodeId;

UA_EXPORT extern const UA_ExpandedNodeId UA_EXPANDEDNODEID_NULL;

UA_StatusCode UA_EXPORT
UA_ExpandedNodeId_print(const UA_ExpandedNodeId *id, UA_String *output);

#ifdef UA_ENABLE_PARSING
/* Parse the ExpandedNodeId format defined in Part 6, 5.3.1.11:
 *
 *   svr=<serverindex>;ns=<namespaceindex>;<type>=<value>
 *     or
 *   svr=<serverindex>;nsu=<uri>;<type>=<value>
 *
13490
13491
13492
13493
13494
13495
13496





13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507


13508
13509
13510
13511
13512
13513
13514

static UA_INLINE UA_ExpandedNodeId
UA_EXPANDEDNODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
    UA_ExpandedNodeId id; id.nodeId = UA_NODEID_BYTESTRING_ALLOC(nsIndex, chars);
    id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
}






/* Total ordering of ExpandedNodeId */
UA_Order UA_EXPORT
UA_ExpandedNodeId_order(const UA_ExpandedNodeId *n1, const UA_ExpandedNodeId *n2);

/* Check for equality */
static UA_INLINE UA_Boolean
UA_ExpandedNodeId_equal(const UA_ExpandedNodeId *n1, const UA_ExpandedNodeId *n2) {
    return (UA_ExpandedNodeId_order(n1, n2) == UA_ORDER_EQ);
}

/* Returns a non-cryptographic hash for ExpandedNodeId */


UA_UInt32 UA_EXPORT UA_ExpandedNodeId_hash(const UA_ExpandedNodeId *n);

/**
 * .. _qualifiedname:
 *
 * QualifiedName
 * ^^^^^^^^^^^^^







>
>
>
>
>










|
>
>







13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535

static UA_INLINE UA_ExpandedNodeId
UA_EXPANDEDNODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
    UA_ExpandedNodeId id; id.nodeId = UA_NODEID_BYTESTRING_ALLOC(nsIndex, chars);
    id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
}

/* Does the ExpandedNodeId point to a local node? That is, are namespaceUri and
 * serverIndex empty? */
UA_Boolean UA_EXPORT
UA_ExpandedNodeId_isLocal(const UA_ExpandedNodeId *n);

/* Total ordering of ExpandedNodeId */
UA_Order UA_EXPORT
UA_ExpandedNodeId_order(const UA_ExpandedNodeId *n1, const UA_ExpandedNodeId *n2);

/* Check for equality */
static UA_INLINE UA_Boolean
UA_ExpandedNodeId_equal(const UA_ExpandedNodeId *n1, const UA_ExpandedNodeId *n2) {
    return (UA_ExpandedNodeId_order(n1, n2) == UA_ORDER_EQ);
}

/* Returns a non-cryptographic hash for ExpandedNodeId. The hash of an
 * ExpandedNodeId is identical to the hash of the embedded (simple) NodeId if
 * the ServerIndex is zero and no NamespaceUri is set. */
UA_UInt32 UA_EXPORT UA_ExpandedNodeId_hash(const UA_ExpandedNodeId *n);

/**
 * .. _qualifiedname:
 *
 * QualifiedName
 * ^^^^^^^^^^^^^
13560
13561
13562
13563
13564
13565
13566






13567
13568
13569
13570
13571
13572
13573

static UA_INLINE UA_LocalizedText
UA_LOCALIZEDTEXT_ALLOC(const char *locale, const char *text) {
    UA_LocalizedText lt; lt.locale = UA_STRING_ALLOC(locale);
    lt.text = UA_STRING_ALLOC(text); return lt;
}







/**
 * .. _numericrange:
 *
 * NumericRange
 * ^^^^^^^^^^^^
 *
 * NumericRanges are used to indicate subsets of a (multidimensional) array.







>
>
>
>
>
>







13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600

static UA_INLINE UA_LocalizedText
UA_LOCALIZEDTEXT_ALLOC(const char *locale, const char *text) {
    UA_LocalizedText lt; lt.locale = UA_STRING_ALLOC(locale);
    lt.text = UA_STRING_ALLOC(text); return lt;
}

/* 
 * Check if the StatusCode is bad.
 * @return Returns UA_TRUE if StatusCode is bad, else UA_FALSE. */
UA_EXPORT UA_Boolean
UA_StatusCode_isBad(const UA_StatusCode code);

/**
 * .. _numericrange:
 *
 * NumericRange
 * ^^^^^^^^^^^^
 *
 * NumericRanges are used to indicate subsets of a (multidimensional) array.
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722

/* Set the variant to a scalar value that is copied from an existing variable.
 * @param v The variant
 * @param p A pointer to the value data
 * @param type The datatype of the value
 * @return Indicates whether the operation succeeded or returns an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setScalarCopy(UA_Variant *v, const void *p,
                         const UA_DataType *type);

/* Set the variant to an array that already resides in memory. The array takes
 * on the lifecycle of the variant and is deleted with it.
 *
 * @param v The variant
 * @param array A pointer to the array data







|







13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749

/* Set the variant to a scalar value that is copied from an existing variable.
 * @param v The variant
 * @param p A pointer to the value data
 * @param type The datatype of the value
 * @return Indicates whether the operation succeeded or returns an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setScalarCopy(UA_Variant *v, const void * UA_RESTRICT p,
                         const UA_DataType *type);

/* Set the variant to an array that already resides in memory. The array takes
 * on the lifecycle of the variant and is deleted with it.
 *
 * @param v The variant
 * @param array A pointer to the array data
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
 *
 * @param v The variant
 * @param array A pointer to the array data
 * @param arraySize The size of the array
 * @param type The datatype of the array
 * @return Indicates whether the operation succeeded or returns an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setArrayCopy(UA_Variant *v, const void *array,
                        size_t arraySize, const UA_DataType *type);

/* Copy the variant, but use only a subset of the (multidimensional) array into
 * a variant. Returns an error code if the variant is not an array or if the
 * indicated range does not fit.
 *
 * @param src The source variant
 * @param dst The target variant
 * @param range The range of the copied data
 * @return Returns UA_STATUSCODE_GOOD or an error code */
UA_StatusCode UA_EXPORT
UA_Variant_copyRange(const UA_Variant *src, UA_Variant *dst,
                     const UA_NumericRange range);

/* Insert a range of data into an existing variant. The data array can't be
 * reused afterwards if it contains types without a fixed size (e.g. strings)
 * since the members are moved into the variant and take on its lifecycle.
 *
 * @param v The variant







|











|







13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
 *
 * @param v The variant
 * @param array A pointer to the array data
 * @param arraySize The size of the array
 * @param type The datatype of the array
 * @return Indicates whether the operation succeeded or returns an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setArrayCopy(UA_Variant *v, const void * UA_RESTRICT array,
                        size_t arraySize, const UA_DataType *type);

/* Copy the variant, but use only a subset of the (multidimensional) array into
 * a variant. Returns an error code if the variant is not an array or if the
 * indicated range does not fit.
 *
 * @param src The source variant
 * @param dst The target variant
 * @param range The range of the copied data
 * @return Returns UA_STATUSCODE_GOOD or an error code */
UA_StatusCode UA_EXPORT
UA_Variant_copyRange(const UA_Variant *src, UA_Variant * UA_RESTRICT dst,
                     const UA_NumericRange range);

/* Insert a range of data into an existing variant. The data array can't be
 * reused afterwards if it contains types without a fixed size (e.g. strings)
 * since the members are moved into the variant and take on its lifecycle.
 *
 * @param v The variant
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
 * @param v The variant
 * @param dataArray The data array. The type must match the variant
 * @param dataArraySize The length of the data array. This is checked to match
 *        the range size.
 * @param range The range of where the new data is inserted
 * @return Returns UA_STATUSCODE_GOOD or an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setRangeCopy(UA_Variant *v, const void *array,
                        size_t arraySize, const UA_NumericRange range);

/**
 * .. _extensionobject:
 *
 * ExtensionObject
 * ^^^^^^^^^^^^^^^







|







13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
 * @param v The variant
 * @param dataArray The data array. The type must match the variant
 * @param dataArraySize The length of the data array. This is checked to match
 *        the range size.
 * @param range The range of where the new data is inserted
 * @return Returns UA_STATUSCODE_GOOD or an error code */
UA_StatusCode UA_EXPORT
UA_Variant_setRangeCopy(UA_Variant *v, const void * UA_RESTRICT array,
                        size_t arraySize, const UA_NumericRange range);

/**
 * .. _extensionobject:
 *
 * ExtensionObject
 * ^^^^^^^^^^^^^^^
13804
13805
13806
13807
13808
13809
13810























13811
13812
13813
13814
13815
13816
13817
        } encoded;
        struct {
            const UA_DataType *type;
            void *data;
        } decoded;
    } content;
} UA_ExtensionObject;
























/**
 * .. _datavalue:
 *
 * DataValue
 * ^^^^^^^^^
 * A data value with an associated status code and timestamps. */







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
        } encoded;
        struct {
            const UA_DataType *type;
            void *data;
        } decoded;
    } content;
} UA_ExtensionObject;

/* Initialize the ExtensionObject and set the "decoded" value to the given
 * pointer. The value will be deleted when the ExtensionObject is cleared. */
void UA_EXPORT
UA_ExtensionObject_setValue(UA_ExtensionObject *eo,
                            void * UA_RESTRICT p,
                            const UA_DataType *type);

/* Initialize the ExtensionObject and set the "decoded" value to the given
 * pointer. The value will *not* be deleted when the ExtensionObject is
 * cleared. */
void UA_EXPORT
UA_ExtensionObject_setValueNoDelete(UA_ExtensionObject *eo,
                                    void * UA_RESTRICT p,
                                    const UA_DataType *type);

/* Initialize the ExtensionObject and set the "decoded" value to a fresh copy of
 * the given value pointer. The value will be deleted when the ExtensionObject
 * is cleared. */
UA_StatusCode UA_EXPORT
UA_ExtensionObject_setValueCopy(UA_ExtensionObject *eo,
                                void * UA_RESTRICT p,
                                const UA_DataType *type);

/**
 * .. _datavalue:
 *
 * DataValue
 * ^^^^^^^^^
 * A data value with an associated status code and timestamps. */
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898



13899
13900
13901
13902
13903
13904
13905
 * - ``void T_delete(T *ptr)``: Delete the content of the data type and the
 *   memory for the data type itself.
 *
 * Specializations, such as ``UA_Int32_new()`` are derived from the generic
 * type operations as static inline functions. */

typedef struct {
#ifdef UA_ENABLE_TYPEDESCRIPTION
    const char *memberName;
#endif
    UA_UInt16 memberTypeIndex;    /* Index of the member in the array of data
                                     types */
    UA_Byte   padding;            /* How much padding is there before this
                                     member element? For arrays this is the
                                     padding before the size_t length member.
                                     (No padding between size_t and the
                                     following ptr.) */
    UA_Boolean namespaceZero : 1; /* The type of the member is defined in
                                     namespace zero. In this implementation,
                                     types from custom namespace may contain
                                     members from the same namespace or
                                     namespace zero only.*/
    UA_Boolean isArray       : 1; /* The member is an array */
    UA_Boolean isOptional    : 1; /* The member is an optional field */



} UA_DataTypeMember;

/* The DataType "kind" is an internal type classification. It is used to
 * dispatch handling to the correct routines. */
#define UA_DATATYPEKINDS 31
typedef enum {
    UA_DATATYPEKIND_BOOLEAN = 0,







<
<
<














>
>
>







13925
13926
13927
13928
13929
13930
13931



13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
 * - ``void T_delete(T *ptr)``: Delete the content of the data type and the
 *   memory for the data type itself.
 *
 * Specializations, such as ``UA_Int32_new()`` are derived from the generic
 * type operations as static inline functions. */

typedef struct {



    UA_UInt16 memberTypeIndex;    /* Index of the member in the array of data
                                     types */
    UA_Byte   padding;            /* How much padding is there before this
                                     member element? For arrays this is the
                                     padding before the size_t length member.
                                     (No padding between size_t and the
                                     following ptr.) */
    UA_Boolean namespaceZero : 1; /* The type of the member is defined in
                                     namespace zero. In this implementation,
                                     types from custom namespace may contain
                                     members from the same namespace or
                                     namespace zero only.*/
    UA_Boolean isArray       : 1; /* The member is an array */
    UA_Boolean isOptional    : 1; /* The member is an optional field */
#ifdef UA_ENABLE_TYPEDESCRIPTION
    const char *memberName;       /* Human-readable member name */
#endif
} UA_DataTypeMember;

/* The DataType "kind" is an internal type classification. It is used to
 * dispatch handling to the correct routines. */
#define UA_DATATYPEKINDS 31
typedef enum {
    UA_DATATYPEKIND_BOOLEAN = 0,
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942


13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953






13954
13955
13956
13957
13958
13959
13960
    UA_DATATYPEKIND_STRUCTURE = 27,
    UA_DATATYPEKIND_OPTSTRUCT = 28, /* struct with optional fields */
    UA_DATATYPEKIND_UNION = 29,
    UA_DATATYPEKIND_BITFIELDCLUSTER = 30 /* bitfields + padding */
} UA_DataTypeKind;

struct UA_DataType {
#ifdef UA_ENABLE_TYPEDESCRIPTION
    const char *typeName;
#endif
    UA_NodeId typeId;                /* The nodeid of the type */


    UA_UInt16 memSize;               /* Size of the struct in memory */
    UA_UInt16 typeIndex;             /* Index of the type in the datatypetable */
    UA_UInt32 typeKind         : 6;  /* Dispatch index for the handling routines */
    UA_UInt32 pointerFree      : 1;  /* The type (and its members) contains no
                                      * pointers that need to be freed */
    UA_UInt32 overlayable      : 1;  /* The type has the identical memory layout
                                      * in memory and on the binary stream. */
    UA_UInt32 membersSize      : 8;  /* How many members does the type have? */
    UA_UInt32 binaryEncodingId;      /* NodeId of datatype when encoded as binary */
    //UA_UInt16  xmlEncodingId;      /* NodeId of datatype when encoded as XML */
    UA_DataTypeMember *members;






};

/* Test if the data type is a numeric builtin data type. This includes Boolean,
 * integers and floating point numbers. Not included are DateTime and
 * StatusCode. */
UA_Boolean
UA_DataType_isNumeric(const UA_DataType *type);







<
<
<

>
>








<
<

>
>
>
>
>
>







13982
13983
13984
13985
13986
13987
13988



13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999


14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
    UA_DATATYPEKIND_STRUCTURE = 27,
    UA_DATATYPEKIND_OPTSTRUCT = 28, /* struct with optional fields */
    UA_DATATYPEKIND_UNION = 29,
    UA_DATATYPEKIND_BITFIELDCLUSTER = 30 /* bitfields + padding */
} UA_DataTypeKind;

struct UA_DataType {



    UA_NodeId typeId;                /* The nodeid of the type */
    UA_NodeId binaryEncodingId;      /* NodeId of datatype when encoded as binary */
    //UA_NodeId xmlEncodingId;       /* NodeId of datatype when encoded as XML */
    UA_UInt16 memSize;               /* Size of the struct in memory */
    UA_UInt16 typeIndex;             /* Index of the type in the datatypetable */
    UA_UInt32 typeKind         : 6;  /* Dispatch index for the handling routines */
    UA_UInt32 pointerFree      : 1;  /* The type (and its members) contains no
                                      * pointers that need to be freed */
    UA_UInt32 overlayable      : 1;  /* The type has the identical memory layout
                                      * in memory and on the binary stream. */
    UA_UInt32 membersSize      : 8;  /* How many members does the type have? */


    UA_DataTypeMember *members;

    /* The typename is only for debugging. Move last so the members pointers
     * stays within the cacheline. */
#ifdef UA_ENABLE_TYPEDESCRIPTION
    const char *typeName;
#endif
};

/* Test if the data type is a numeric builtin data type. This includes Boolean,
 * integers and floating point numbers. Not included are DateTime and
 * StatusCode. */
UA_Boolean
UA_DataType_isNumeric(const UA_DataType *type);
14011
14012
14013
14014
14015
14016
14017











14018
14019
14020
14021
14022
14023
14024

/* Frees a variable and all of its content.
 *
 * @param p The memory location of the variable
 * @param type The datatype description of the variable */
void UA_EXPORT UA_delete(void *p, const UA_DataType *type);












/**
 * .. _array-handling:
 *
 * Array handling
 * --------------
 * In OPC UA, arrays can have a length of zero or more with the usual meaning.
 * In addition, arrays can be undefined. Then, they don't even have a length. In







>
>
>
>
>
>
>
>
>
>
>







14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088

/* Frees a variable and all of its content.
 *
 * @param p The memory location of the variable
 * @param type The datatype description of the variable */
void UA_EXPORT UA_delete(void *p, const UA_DataType *type);

#ifdef UA_ENABLE_TYPEDESCRIPTION
/* Pretty-print the value from the datatype.
 *
 * @param p The memory location of the variable
 * @param type The datatype description of the variable
 * @param output A string that is memory-allocated for the pretty-printed output
 * @return Indicates whether the operation succeeded*/
UA_StatusCode UA_EXPORT
UA_print(const void *p, const UA_DataType *type, UA_String *output);
#endif

/**
 * .. _array-handling:
 *
 * Array handling
 * --------------
 * In OPC UA, arrays can have a length of zero or more with the usual meaning.
 * In addition, arrays can be undefined. Then, they don't even have a length. In
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
 *
 * The following data types were auto-generated from a definition in XML format.
 */

/* The following is used to exclude type names in the definition of UA_DataType
 * structures if the feature is disabled. */
#ifdef UA_ENABLE_TYPEDESCRIPTION
# define UA_TYPENAME(name) name,
#else
# define UA_TYPENAME(name)
#endif

/* Datatype arrays with custom type definitions can be added in a linked list to
 * the client or server configuration. Datatype members can point to types in
 * the same array via the ``memberTypeIndex``. If ``namespaceZero`` is set to







|







14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
 *
 * The following data types were auto-generated from a definition in XML format.
 */

/* The following is used to exclude type names in the definition of UA_DataType
 * structures if the feature is disabled. */
#ifdef UA_ENABLE_TYPEDESCRIPTION
# define UA_TYPENAME(name) , name
#else
# define UA_TYPENAME(name)
#endif

/* Datatype arrays with custom type definitions can be added in a linked list to
 * the client or server configuration. Datatype members can point to types in
 * the same array via the ``memberTypeIndex``. If ``namespaceZero`` is set to
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
 * .. include:: types_generated.rst */

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/build/src_generated/open62541/types_generated.h" ***********************************/

/* Generated from Opc.Ua.Types.bsd with script /open62541/tools/generate_datatypes.py
 * on host leguan by user chw at 2020-12-27 03:27:14 */


#ifdef UA_ENABLE_AMALGAMATION
#else

#endif

_UA_BEGIN_DECLS


/**
 * Every type is assigned an index in an array containing the type descriptions.
 * These descriptions are used during type handling (copying, deletion,
 * binary encoding, ...). */
#define UA_TYPES_COUNT 254
extern UA_EXPORT const UA_DataType UA_TYPES[UA_TYPES_COUNT];

/**
 * Boolean
 * ^^^^^^^
 */
#define UA_TYPES_BOOLEAN 0







|
<














|







14161
14162
14163
14164
14165
14166
14167
14168

14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
 * .. include:: types_generated.rst */

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/build/src_generated/open62541/types_generated.h" ***********************************/

/* Generated from Opc.Ua.Types.bsd with script /open62541/tools/generate_datatypes.py * on host leguan by user chw at 2021-02-20 08:26:44 */



#ifdef UA_ENABLE_AMALGAMATION
#else

#endif

_UA_BEGIN_DECLS


/**
 * Every type is assigned an index in an array containing the type descriptions.
 * These descriptions are used during type handling (copying, deletion,
 * binary encoding, ...). */
#define UA_TYPES_COUNT 267
extern UA_EXPORT const UA_DataType UA_TYPES[UA_TYPES_COUNT];

/**
 * Boolean
 * ^^^^^^^
 */
#define UA_TYPES_BOOLEAN 0
14943
14944
14945
14946
14947
14948
14949



























14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090










15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326












15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358











15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440














15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556











15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844











15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
    UA_DataValue *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_ReadResponse;

#define UA_TYPES_READRESPONSE 73




























/**
 * TimestampsToReturn
 * ^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_TIMESTAMPSTORETURN_SOURCE = 0,
    UA_TIMESTAMPSTORETURN_SERVER = 1,
    UA_TIMESTAMPSTORETURN_BOTH = 2,
    UA_TIMESTAMPSTORETURN_NEITHER = 3,
    UA_TIMESTAMPSTORETURN_INVALID = 4,
    __UA_TIMESTAMPSTORETURN_FORCE32BIT = 0x7fffffff
} UA_TimestampsToReturn;
UA_STATIC_ASSERT(sizeof(UA_TimestampsToReturn) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_TIMESTAMPSTORETURN 74

/**
 * NodeClass
 * ^^^^^^^^^
 * A mask specifying the class of the node. */
typedef enum {
    UA_NODECLASS_UNSPECIFIED = 0,
    UA_NODECLASS_OBJECT = 1,
    UA_NODECLASS_VARIABLE = 2,
    UA_NODECLASS_METHOD = 4,
    UA_NODECLASS_OBJECTTYPE = 8,
    UA_NODECLASS_VARIABLETYPE = 16,
    UA_NODECLASS_REFERENCETYPE = 32,
    UA_NODECLASS_DATATYPE = 64,
    UA_NODECLASS_VIEW = 128,
    __UA_NODECLASS_FORCE32BIT = 0x7fffffff
} UA_NodeClass;
UA_STATIC_ASSERT(sizeof(UA_NodeClass) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_NODECLASS 75

/**
 * HistoryUpdateType
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_HISTORYUPDATETYPE_INSERT = 1,
    UA_HISTORYUPDATETYPE_REPLACE = 2,
    UA_HISTORYUPDATETYPE_UPDATE = 3,
    UA_HISTORYUPDATETYPE_DELETE = 4,
    __UA_HISTORYUPDATETYPE_FORCE32BIT = 0x7fffffff
} UA_HistoryUpdateType;
UA_STATIC_ASSERT(sizeof(UA_HistoryUpdateType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_HISTORYUPDATETYPE 76

/**
 * ObjectTypeAttributes
 * ^^^^^^^^^^^^^^^^^^^^
 * The attributes for an object type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
} UA_ObjectTypeAttributes;

#define UA_TYPES_OBJECTTYPEATTRIBUTES 77

/**
 * SecurityTokenRequestType
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Indicates whether a token if being created or renewed. */
typedef enum {
    UA_SECURITYTOKENREQUESTTYPE_ISSUE = 0,
    UA_SECURITYTOKENREQUESTTYPE_RENEW = 1,
    __UA_SECURITYTOKENREQUESTTYPE_FORCE32BIT = 0x7fffffff
} UA_SecurityTokenRequestType;
UA_STATIC_ASSERT(sizeof(UA_SecurityTokenRequestType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_SECURITYTOKENREQUESTTYPE 78

/**
 * CloseSessionResponse
 * ^^^^^^^^^^^^^^^^^^^^
 * Closes a session with the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_CloseSessionResponse;

#define UA_TYPES_CLOSESESSIONRESPONSE 79

/**
 * SetPublishingModeRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean publishingEnabled;
    size_t subscriptionIdsSize;
    UA_UInt32 *subscriptionIds;
} UA_SetPublishingModeRequest;

#define UA_TYPES_SETPUBLISHINGMODEREQUEST 80

/**
 * IssuedIdentityToken
 * ^^^^^^^^^^^^^^^^^^^
 * A token representing a user identified by a WS-Security XML token. */
typedef struct {
    UA_String policyId;
    UA_ByteString tokenData;
    UA_String encryptionAlgorithm;
} UA_IssuedIdentityToken;

#define UA_TYPES_ISSUEDIDENTITYTOKEN 81

/**
 * ServerOnNetwork
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 recordId;
    UA_String serverName;
    UA_String discoveryUrl;
    size_t serverCapabilitiesSize;
    UA_String *serverCapabilities;
} UA_ServerOnNetwork;

#define UA_TYPES_SERVERONNETWORK 82

/**
 * DeleteMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteMonitoredItemsResponse;

#define UA_TYPES_DELETEMONITOREDITEMSRESPONSE 83











/**
 * ApplicationType
 * ^^^^^^^^^^^^^^^
 * The types of applications. */
typedef enum {
    UA_APPLICATIONTYPE_SERVER = 0,
    UA_APPLICATIONTYPE_CLIENT = 1,
    UA_APPLICATIONTYPE_CLIENTANDSERVER = 2,
    UA_APPLICATIONTYPE_DISCOVERYSERVER = 3,
    __UA_APPLICATIONTYPE_FORCE32BIT = 0x7fffffff
} UA_ApplicationType;
UA_STATIC_ASSERT(sizeof(UA_ApplicationType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_APPLICATIONTYPE 84

/**
 * DiscoveryConfiguration
 * ^^^^^^^^^^^^^^^^^^^^^^
 * A base type for discovery configuration information. */
typedef void * UA_DiscoveryConfiguration;

#define UA_TYPES_DISCOVERYCONFIGURATION 85

/**
 * BrowseNextRequest
 * ^^^^^^^^^^^^^^^^^
 * Continues one or more browse operations. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean releaseContinuationPoints;
    size_t continuationPointsSize;
    UA_ByteString *continuationPoints;
} UA_BrowseNextRequest;

#define UA_TYPES_BROWSENEXTREQUEST 86

/**
 * ModifySubscriptionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_Double requestedPublishingInterval;
    UA_UInt32 requestedLifetimeCount;
    UA_UInt32 requestedMaxKeepAliveCount;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Byte priority;
} UA_ModifySubscriptionRequest;

#define UA_TYPES_MODIFYSUBSCRIPTIONREQUEST 87

/**
 * BrowseDescription
 * ^^^^^^^^^^^^^^^^^
 * A request to browse the the references from a node. */
typedef struct {
    UA_NodeId nodeId;
    UA_BrowseDirection browseDirection;
    UA_NodeId referenceTypeId;
    UA_Boolean includeSubtypes;
    UA_UInt32 nodeClassMask;
    UA_UInt32 resultMask;
} UA_BrowseDescription;

#define UA_TYPES_BROWSEDESCRIPTION 88

/**
 * SignedSoftwareCertificate
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 * A software certificate with a digital signature. */
typedef struct {
    UA_ByteString certificateData;
    UA_ByteString signature;
} UA_SignedSoftwareCertificate;

#define UA_TYPES_SIGNEDSOFTWARECERTIFICATE 89

/**
 * BrowsePathTarget
 * ^^^^^^^^^^^^^^^^
 * The target of the translated path. */
typedef struct {
    UA_ExpandedNodeId targetId;
    UA_UInt32 remainingPathIndex;
} UA_BrowsePathTarget;

#define UA_TYPES_BROWSEPATHTARGET 90

/**
 * WriteResponse
 * ^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_WriteResponse;

#define UA_TYPES_WRITERESPONSE 91

/**
 * AddNodesResult
 * ^^^^^^^^^^^^^^
 * A result of an add node operation. */
typedef struct {
    UA_StatusCode statusCode;
    UA_NodeId addedNodeId;
} UA_AddNodesResult;

#define UA_TYPES_ADDNODESRESULT 92

/**
 * UadpDataSetReaderMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 groupVersion;
    UA_UInt16 networkMessageNumber;
    UA_UInt16 dataSetOffset;
    UA_Guid dataSetClassId;
    UA_UadpNetworkMessageContentMask networkMessageContentMask;
    UA_UadpDataSetMessageContentMask dataSetMessageContentMask;
    UA_Double publishingInterval;
    UA_Double receiveOffset;
    UA_Double processingOffset;
} UA_UadpDataSetReaderMessageDataType;

#define UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE 93

/**
 * RegisterServerResponse
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Registers a server with the discovery server. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_RegisterServerResponse;

#define UA_TYPES_REGISTERSERVERRESPONSE 94

/**
 * AddReferencesItem
 * ^^^^^^^^^^^^^^^^^
 * A request to add a reference to the server address space. */
typedef struct {
    UA_NodeId sourceNodeId;
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_String targetServerUri;
    UA_ExpandedNodeId targetNodeId;
    UA_NodeClass targetNodeClass;
} UA_AddReferencesItem;

#define UA_TYPES_ADDREFERENCESITEM 95

/**
 * RegisterServer2Response
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t configurationResultsSize;
    UA_StatusCode *configurationResults;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_RegisterServer2Response;

#define UA_TYPES_REGISTERSERVER2RESPONSE 96

/**
 * DeleteReferencesResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Delete one or more references from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteReferencesResponse;

#define UA_TYPES_DELETEREFERENCESRESPONSE 97

/**
 * RelativePathElement
 * ^^^^^^^^^^^^^^^^^^^
 * An element in a relative path. */
typedef struct {
    UA_NodeId referenceTypeId;
    UA_Boolean isInverse;
    UA_Boolean includeSubtypes;
    UA_QualifiedName targetName;
} UA_RelativePathElement;

#define UA_TYPES_RELATIVEPATHELEMENT 98

/**
 * SubscriptionAcknowledgement
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 subscriptionId;
    UA_UInt32 sequenceNumber;
} UA_SubscriptionAcknowledgement;

#define UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT 99

/**
 * ConfigurationVersionDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 majorVersion;
    UA_UInt32 minorVersion;
} UA_ConfigurationVersionDataType;

#define UA_TYPES_CONFIGURATIONVERSIONDATATYPE 100

/**
 * DataSetFieldContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_DataSetFieldContentMask;

#define UA_DATASETFIELDCONTENTMASK_NONE 0
#define UA_DATASETFIELDCONTENTMASK_STATUSCODE 1
#define UA_DATASETFIELDCONTENTMASK_SOURCETIMESTAMP 2
#define UA_DATASETFIELDCONTENTMASK_SERVERTIMESTAMP 4
#define UA_DATASETFIELDCONTENTMASK_SOURCEPICOSECONDS 8
#define UA_DATASETFIELDCONTENTMASK_SERVERPICOSECONDS 16
#define UA_DATASETFIELDCONTENTMASK_RAWDATA 32

#define UA_TYPES_DATASETFIELDCONTENTMASK 101













/**
 * PublishedVariableDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId publishedVariable;
    UA_UInt32 attributeId;
    UA_Double samplingIntervalHint;
    UA_UInt32 deadbandType;
    UA_Double deadbandValue;
    UA_String indexRange;
    UA_Variant substituteValue;
    size_t metaDataPropertiesSize;
    UA_QualifiedName *metaDataProperties;
} UA_PublishedVariableDataType;

#define UA_TYPES_PUBLISHEDVARIABLEDATATYPE 102

/**
 * CreateMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_MonitoredItemCreateResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_CreateMonitoredItemsResponse;

#define UA_TYPES_CREATEMONITOREDITEMSRESPONSE 103












/**
 * OverrideValueHandling
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_OVERRIDEVALUEHANDLING_DISABLED = 0,
    UA_OVERRIDEVALUEHANDLING_LASTUSABLEVALUE = 1,
    UA_OVERRIDEVALUEHANDLING_OVERRIDEVALUE = 2,
    __UA_OVERRIDEVALUEHANDLING_FORCE32BIT = 0x7fffffff
} UA_OverrideValueHandling;
UA_STATIC_ASSERT(sizeof(UA_OverrideValueHandling) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_OVERRIDEVALUEHANDLING 104

/**
 * HistoryUpdateResult
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_StatusCode statusCode;
    size_t operationResultsSize;
    UA_StatusCode *operationResults;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryUpdateResult;

#define UA_TYPES_HISTORYUPDATERESULT 105

/**
 * DeleteReferencesItem
 * ^^^^^^^^^^^^^^^^^^^^
 * A request to delete a node from the server address space. */
typedef struct {
    UA_NodeId sourceNodeId;
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_ExpandedNodeId targetNodeId;
    UA_Boolean deleteBidirectional;
} UA_DeleteReferencesItem;

#define UA_TYPES_DELETEREFERENCESITEM 106

/**
 * WriteValue
 * ^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_UInt32 attributeId;
    UA_String indexRange;
    UA_DataValue value;
} UA_WriteValue;

#define UA_TYPES_WRITEVALUE 107

/**
 * ModificationInfo
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime modificationTime;
    UA_HistoryUpdateType updateType;
    UA_String userName;
} UA_ModificationInfo;

#define UA_TYPES_MODIFICATIONINFO 108

/**
 * DataTypeAttributes
 * ^^^^^^^^^^^^^^^^^^
 * The attributes for a data type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
} UA_DataTypeAttributes;

#define UA_TYPES_DATATYPEATTRIBUTES 109















/**
 * HistoryReadRequest
 * ^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ExtensionObject historyReadDetails;
    UA_TimestampsToReturn timestampsToReturn;
    UA_Boolean releaseContinuationPoints;
    size_t nodesToReadSize;
    UA_HistoryReadValueId *nodesToRead;
} UA_HistoryReadRequest;

#define UA_TYPES_HISTORYREADREQUEST 110

/**
 * AddReferencesResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Adds one or more references to the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_AddReferencesResponse;

#define UA_TYPES_ADDREFERENCESRESPONSE 111

/**
 * DeadbandType
 * ^^^^^^^^^^^^
 */
typedef enum {
    UA_DEADBANDTYPE_NONE = 0,
    UA_DEADBANDTYPE_ABSOLUTE = 1,
    UA_DEADBANDTYPE_PERCENT = 2,
    __UA_DEADBANDTYPE_FORCE32BIT = 0x7fffffff
} UA_DeadbandType;
UA_STATIC_ASSERT(sizeof(UA_DeadbandType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DEADBANDTYPE 112

/**
 * DataChangeTrigger
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_DATACHANGETRIGGER_STATUS = 0,
    UA_DATACHANGETRIGGER_STATUSVALUE = 1,
    UA_DATACHANGETRIGGER_STATUSVALUETIMESTAMP = 2,
    __UA_DATACHANGETRIGGER_FORCE32BIT = 0x7fffffff
} UA_DataChangeTrigger;
UA_STATIC_ASSERT(sizeof(UA_DataChangeTrigger) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DATACHANGETRIGGER 113

/**
 * BuildInfo
 * ^^^^^^^^^
 */
typedef struct {
    UA_String productUri;
    UA_String manufacturerName;
    UA_String productName;
    UA_String softwareVersion;
    UA_String buildNumber;
    UA_DateTime buildDate;
} UA_BuildInfo;

#define UA_TYPES_BUILDINFO 114

/**
 * FilterOperand
 * ^^^^^^^^^^^^^
 */
typedef void * UA_FilterOperand;

#define UA_TYPES_FILTEROPERAND 115

/**
 * MonitoringParameters
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 clientHandle;
    UA_Double samplingInterval;
    UA_ExtensionObject filter;
    UA_UInt32 queueSize;
    UA_Boolean discardOldest;
} UA_MonitoringParameters;

#define UA_TYPES_MONITORINGPARAMETERS 116

/**
 * DoubleComplexNumberType
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Double real;
    UA_Double imaginary;
} UA_DoubleComplexNumberType;

#define UA_TYPES_DOUBLECOMPLEXNUMBERTYPE 117

/**
 * DeleteNodesItem
 * ^^^^^^^^^^^^^^^
 * A request to delete a node to the server address space. */
typedef struct {
    UA_NodeId nodeId;
    UA_Boolean deleteTargetReferences;
} UA_DeleteNodesItem;

#define UA_TYPES_DELETENODESITEM 118












/**
 * ReadValueId
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_UInt32 attributeId;
    UA_String indexRange;
    UA_QualifiedName dataEncoding;
} UA_ReadValueId;

#define UA_TYPES_READVALUEID 119

/**
 * CallRequest
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t methodsToCallSize;
    UA_CallMethodRequest *methodsToCall;
} UA_CallRequest;

#define UA_TYPES_CALLREQUEST 120

/**
 * RelativePath
 * ^^^^^^^^^^^^
 * A relative path constructed from reference types and browse names. */
typedef struct {
    size_t elementsSize;
    UA_RelativePathElement *elements;
} UA_RelativePath;

#define UA_TYPES_RELATIVEPATH 121

/**
 * DeleteNodesRequest
 * ^^^^^^^^^^^^^^^^^^
 * Delete one or more nodes from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToDeleteSize;
    UA_DeleteNodesItem *nodesToDelete;
} UA_DeleteNodesRequest;

#define UA_TYPES_DELETENODESREQUEST 122

/**
 * BrokerDataSetWriterTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
    UA_String metaDataQueueName;
    UA_Double metaDataUpdateTime;
} UA_BrokerDataSetWriterTransportDataType;

#define UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE 123

/**
 * MonitoredItemModifyRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 monitoredItemId;
    UA_MonitoringParameters requestedParameters;
} UA_MonitoredItemModifyRequest;

#define UA_TYPES_MONITOREDITEMMODIFYREQUEST 124

/**
 * DeleteRawModifiedDetails
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_Boolean isDeleteModified;
    UA_DateTime startTime;
    UA_DateTime endTime;
} UA_DeleteRawModifiedDetails;

#define UA_TYPES_DELETERAWMODIFIEDDETAILS 125

/**
 * UserTokenType
 * ^^^^^^^^^^^^^
 * The possible user token types. */
typedef enum {
    UA_USERTOKENTYPE_ANONYMOUS = 0,
    UA_USERTOKENTYPE_USERNAME = 1,
    UA_USERTOKENTYPE_CERTIFICATE = 2,
    UA_USERTOKENTYPE_ISSUEDTOKEN = 3,
    __UA_USERTOKENTYPE_FORCE32BIT = 0x7fffffff
} UA_UserTokenType;
UA_STATIC_ASSERT(sizeof(UA_UserTokenType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_USERTOKENTYPE 126

/**
 * AggregateConfiguration
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Boolean useServerCapabilitiesDefaults;
    UA_Boolean treatUncertainAsBad;
    UA_Byte percentDataBad;
    UA_Byte percentDataGood;
    UA_Boolean useSlopedExtrapolation;
} UA_AggregateConfiguration;

#define UA_TYPES_AGGREGATECONFIGURATION 127

/**
 * LocaleId
 * ^^^^^^^^
 * An identifier for a user locale. */
typedef UA_String UA_LocaleId;

#define UA_TYPES_LOCALEID 128

/**
 * UnregisterNodesResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * Unregisters one or more previously registered nodes. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_UnregisterNodesResponse;

#define UA_TYPES_UNREGISTERNODESRESPONSE 129

/**
 * ReadAtTimeDetails
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t reqTimesSize;
    UA_DateTime *reqTimes;
    UA_Boolean useSimpleBounds;
} UA_ReadAtTimeDetails;

#define UA_TYPES_READATTIMEDETAILS 130

/**
 * ContentFilterResult
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t elementResultsSize;
    UA_ContentFilterElementResult *elementResults;
    size_t elementDiagnosticInfosSize;
    UA_DiagnosticInfo *elementDiagnosticInfos;
} UA_ContentFilterResult;

#define UA_TYPES_CONTENTFILTERRESULT 131

/**
 * HistoryReadResponse
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_HistoryReadResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryReadResponse;

#define UA_TYPES_HISTORYREADRESPONSE 132

/**
 * SimpleTypeDescription
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_NodeId baseDataType;
    UA_Byte builtInType;
} UA_SimpleTypeDescription;

#define UA_TYPES_SIMPLETYPEDESCRIPTION 133

/**
 * UserTokenPolicy
 * ^^^^^^^^^^^^^^^
 * Describes a user token that can be used with a server. */
typedef struct {
    UA_String policyId;
    UA_UserTokenType tokenType;
    UA_String issuedTokenType;
    UA_String issuerEndpointUrl;
    UA_String securityPolicyUri;
} UA_UserTokenPolicy;

#define UA_TYPES_USERTOKENPOLICY 134

/**
 * DeleteMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    size_t monitoredItemIdsSize;
    UA_UInt32 *monitoredItemIds;
} UA_DeleteMonitoredItemsRequest;

#define UA_TYPES_DELETEMONITOREDITEMSREQUEST 135

/**
 * SetMonitoringModeRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_MonitoringMode monitoringMode;
    size_t monitoredItemIdsSize;
    UA_UInt32 *monitoredItemIds;
} UA_SetMonitoringModeRequest;

#define UA_TYPES_SETMONITORINGMODEREQUEST 136

/**
 * Duration
 * ^^^^^^^^
 * A period of time measured in milliseconds. */
typedef UA_Double UA_Duration;

#define UA_TYPES_DURATION 137

/**
 * ReferenceTypeAttributes
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * The attributes for a reference type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
    UA_Boolean symmetric;
    UA_LocalizedText inverseName;
} UA_ReferenceTypeAttributes;

#define UA_TYPES_REFERENCETYPEATTRIBUTES 138

/**
 * DataSetFieldFlags
 * ^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt16 UA_DataSetFieldFlags;

#define UA_DATASETFIELDFLAGS_NONE 0
#define UA_DATASETFIELDFLAGS_PROMOTEDFIELD 1

#define UA_TYPES_DATASETFIELDFLAGS 139

/**
 * GetEndpointsRequest
 * ^^^^^^^^^^^^^^^^^^^
 * Gets the endpoints used by the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_String endpointUrl;
    size_t localeIdsSize;
    UA_String *localeIds;
    size_t profileUrisSize;
    UA_String *profileUris;
} UA_GetEndpointsRequest;

#define UA_TYPES_GETENDPOINTSREQUEST 140

/**
 * CloseSecureChannelResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Closes a secure channel. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_CloseSecureChannelResponse;

#define UA_TYPES_CLOSESECURECHANNELRESPONSE 141












/**
 * PubSubState
 * ^^^^^^^^^^^
 */
typedef enum {
    UA_PUBSUBSTATE_DISABLED = 0,
    UA_PUBSUBSTATE_PAUSED = 1,
    UA_PUBSUBSTATE_OPERATIONAL = 2,
    UA_PUBSUBSTATE_ERROR = 3,
    __UA_PUBSUBSTATE_FORCE32BIT = 0x7fffffff
} UA_PubSubState;
UA_STATIC_ASSERT(sizeof(UA_PubSubState) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_PUBSUBSTATE 142

/**
 * ViewDescription
 * ^^^^^^^^^^^^^^^
 * The view to browse. */
typedef struct {
    UA_NodeId viewId;
    UA_DateTime timestamp;
    UA_UInt32 viewVersion;
} UA_ViewDescription;

#define UA_TYPES_VIEWDESCRIPTION 143

/**
 * SetPublishingModeResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_SetPublishingModeResponse;

#define UA_TYPES_SETPUBLISHINGMODERESPONSE 144

/**
 * StatusChangeNotification
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_StatusCode status;
    UA_DiagnosticInfo diagnosticInfo;
} UA_StatusChangeNotification;

#define UA_TYPES_STATUSCHANGENOTIFICATION 145

/**
 * StructureField
 * ^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_LocalizedText description;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_UInt32 maxStringLength;
    UA_Boolean isOptional;
} UA_StructureField;

#define UA_TYPES_STRUCTUREFIELD 146

/**
 * NodeAttributesMask
 * ^^^^^^^^^^^^^^^^^^
 * The bits used to specify default attributes for a new node. */
typedef enum {
    UA_NODEATTRIBUTESMASK_NONE = 0,







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>














|



















|














|














|












|









|












|











|













|













|
>
>
>
>
>
>
>
>
>
>














|







|












|















|














|










|










|













|










|

















|









|














|













|













|












|










|










|















|
>
>
>
>
>
>
>
>
>
>
>
>

















|













|
>
>
>
>
>
>
>
>
>
>
>













|













|













|












|











|














|
>
>
>
>
>
>
>
>
>
>
>
>
>
>














|













|













|













|














|







|













|










|










|
>
>
>
>
>
>
>
>
>
>
>












|











|










|











|














|










|












|














|













|







|









|











|












|













|












|













|












|













|







|
















|










|














|









|
>
>
>
>
>
>
>
>
>
>
>














|











|













|










|
















|







15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
    UA_DataValue *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_ReadResponse;

#define UA_TYPES_READRESPONSE 73

/**
 * PermissionType
 * ^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_PermissionType;

#define UA_PERMISSIONTYPE_NONE 0
#define UA_PERMISSIONTYPE_BROWSE 1
#define UA_PERMISSIONTYPE_READROLEPERMISSIONS 2
#define UA_PERMISSIONTYPE_WRITEATTRIBUTE 4
#define UA_PERMISSIONTYPE_WRITEROLEPERMISSIONS 8
#define UA_PERMISSIONTYPE_WRITEHISTORIZING 16
#define UA_PERMISSIONTYPE_READ 32
#define UA_PERMISSIONTYPE_WRITE 64
#define UA_PERMISSIONTYPE_READHISTORY 128
#define UA_PERMISSIONTYPE_INSERTHISTORY 256
#define UA_PERMISSIONTYPE_MODIFYHISTORY 512
#define UA_PERMISSIONTYPE_DELETEHISTORY 1024
#define UA_PERMISSIONTYPE_RECEIVEEVENTS 2048
#define UA_PERMISSIONTYPE_CALL 4096
#define UA_PERMISSIONTYPE_ADDREFERENCE 8192
#define UA_PERMISSIONTYPE_REMOVEREFERENCE 16384
#define UA_PERMISSIONTYPE_DELETENODE 32768
#define UA_PERMISSIONTYPE_ADDNODE 65536

#define UA_TYPES_PERMISSIONTYPE 74

/**
 * TimestampsToReturn
 * ^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_TIMESTAMPSTORETURN_SOURCE = 0,
    UA_TIMESTAMPSTORETURN_SERVER = 1,
    UA_TIMESTAMPSTORETURN_BOTH = 2,
    UA_TIMESTAMPSTORETURN_NEITHER = 3,
    UA_TIMESTAMPSTORETURN_INVALID = 4,
    __UA_TIMESTAMPSTORETURN_FORCE32BIT = 0x7fffffff
} UA_TimestampsToReturn;
UA_STATIC_ASSERT(sizeof(UA_TimestampsToReturn) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_TIMESTAMPSTORETURN 75

/**
 * NodeClass
 * ^^^^^^^^^
 * A mask specifying the class of the node. */
typedef enum {
    UA_NODECLASS_UNSPECIFIED = 0,
    UA_NODECLASS_OBJECT = 1,
    UA_NODECLASS_VARIABLE = 2,
    UA_NODECLASS_METHOD = 4,
    UA_NODECLASS_OBJECTTYPE = 8,
    UA_NODECLASS_VARIABLETYPE = 16,
    UA_NODECLASS_REFERENCETYPE = 32,
    UA_NODECLASS_DATATYPE = 64,
    UA_NODECLASS_VIEW = 128,
    __UA_NODECLASS_FORCE32BIT = 0x7fffffff
} UA_NodeClass;
UA_STATIC_ASSERT(sizeof(UA_NodeClass) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_NODECLASS 76

/**
 * HistoryUpdateType
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_HISTORYUPDATETYPE_INSERT = 1,
    UA_HISTORYUPDATETYPE_REPLACE = 2,
    UA_HISTORYUPDATETYPE_UPDATE = 3,
    UA_HISTORYUPDATETYPE_DELETE = 4,
    __UA_HISTORYUPDATETYPE_FORCE32BIT = 0x7fffffff
} UA_HistoryUpdateType;
UA_STATIC_ASSERT(sizeof(UA_HistoryUpdateType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_HISTORYUPDATETYPE 77

/**
 * ObjectTypeAttributes
 * ^^^^^^^^^^^^^^^^^^^^
 * The attributes for an object type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
} UA_ObjectTypeAttributes;

#define UA_TYPES_OBJECTTYPEATTRIBUTES 78

/**
 * SecurityTokenRequestType
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Indicates whether a token if being created or renewed. */
typedef enum {
    UA_SECURITYTOKENREQUESTTYPE_ISSUE = 0,
    UA_SECURITYTOKENREQUESTTYPE_RENEW = 1,
    __UA_SECURITYTOKENREQUESTTYPE_FORCE32BIT = 0x7fffffff
} UA_SecurityTokenRequestType;
UA_STATIC_ASSERT(sizeof(UA_SecurityTokenRequestType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_SECURITYTOKENREQUESTTYPE 79

/**
 * CloseSessionResponse
 * ^^^^^^^^^^^^^^^^^^^^
 * Closes a session with the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_CloseSessionResponse;

#define UA_TYPES_CLOSESESSIONRESPONSE 80

/**
 * SetPublishingModeRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean publishingEnabled;
    size_t subscriptionIdsSize;
    UA_UInt32 *subscriptionIds;
} UA_SetPublishingModeRequest;

#define UA_TYPES_SETPUBLISHINGMODEREQUEST 81

/**
 * IssuedIdentityToken
 * ^^^^^^^^^^^^^^^^^^^
 * A token representing a user identified by a WS-Security XML token. */
typedef struct {
    UA_String policyId;
    UA_ByteString tokenData;
    UA_String encryptionAlgorithm;
} UA_IssuedIdentityToken;

#define UA_TYPES_ISSUEDIDENTITYTOKEN 82

/**
 * ServerOnNetwork
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 recordId;
    UA_String serverName;
    UA_String discoveryUrl;
    size_t serverCapabilitiesSize;
    UA_String *serverCapabilities;
} UA_ServerOnNetwork;

#define UA_TYPES_SERVERONNETWORK 83

/**
 * DeleteMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteMonitoredItemsResponse;

#define UA_TYPES_DELETEMONITOREDITEMSRESPONSE 84

/**
 * DatagramConnectionTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ExtensionObject discoveryAddress;
} UA_DatagramConnectionTransportDataType;

#define UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE 85

/**
 * ApplicationType
 * ^^^^^^^^^^^^^^^
 * The types of applications. */
typedef enum {
    UA_APPLICATIONTYPE_SERVER = 0,
    UA_APPLICATIONTYPE_CLIENT = 1,
    UA_APPLICATIONTYPE_CLIENTANDSERVER = 2,
    UA_APPLICATIONTYPE_DISCOVERYSERVER = 3,
    __UA_APPLICATIONTYPE_FORCE32BIT = 0x7fffffff
} UA_ApplicationType;
UA_STATIC_ASSERT(sizeof(UA_ApplicationType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_APPLICATIONTYPE 86

/**
 * DiscoveryConfiguration
 * ^^^^^^^^^^^^^^^^^^^^^^
 * A base type for discovery configuration information. */
typedef void * UA_DiscoveryConfiguration;

#define UA_TYPES_DISCOVERYCONFIGURATION 87

/**
 * BrowseNextRequest
 * ^^^^^^^^^^^^^^^^^
 * Continues one or more browse operations. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean releaseContinuationPoints;
    size_t continuationPointsSize;
    UA_ByteString *continuationPoints;
} UA_BrowseNextRequest;

#define UA_TYPES_BROWSENEXTREQUEST 88

/**
 * ModifySubscriptionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_Double requestedPublishingInterval;
    UA_UInt32 requestedLifetimeCount;
    UA_UInt32 requestedMaxKeepAliveCount;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Byte priority;
} UA_ModifySubscriptionRequest;

#define UA_TYPES_MODIFYSUBSCRIPTIONREQUEST 89

/**
 * BrowseDescription
 * ^^^^^^^^^^^^^^^^^
 * A request to browse the the references from a node. */
typedef struct {
    UA_NodeId nodeId;
    UA_BrowseDirection browseDirection;
    UA_NodeId referenceTypeId;
    UA_Boolean includeSubtypes;
    UA_UInt32 nodeClassMask;
    UA_UInt32 resultMask;
} UA_BrowseDescription;

#define UA_TYPES_BROWSEDESCRIPTION 90

/**
 * SignedSoftwareCertificate
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 * A software certificate with a digital signature. */
typedef struct {
    UA_ByteString certificateData;
    UA_ByteString signature;
} UA_SignedSoftwareCertificate;

#define UA_TYPES_SIGNEDSOFTWARECERTIFICATE 91

/**
 * BrowsePathTarget
 * ^^^^^^^^^^^^^^^^
 * The target of the translated path. */
typedef struct {
    UA_ExpandedNodeId targetId;
    UA_UInt32 remainingPathIndex;
} UA_BrowsePathTarget;

#define UA_TYPES_BROWSEPATHTARGET 92

/**
 * WriteResponse
 * ^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_WriteResponse;

#define UA_TYPES_WRITERESPONSE 93

/**
 * AddNodesResult
 * ^^^^^^^^^^^^^^
 * A result of an add node operation. */
typedef struct {
    UA_StatusCode statusCode;
    UA_NodeId addedNodeId;
} UA_AddNodesResult;

#define UA_TYPES_ADDNODESRESULT 94

/**
 * UadpDataSetReaderMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 groupVersion;
    UA_UInt16 networkMessageNumber;
    UA_UInt16 dataSetOffset;
    UA_Guid dataSetClassId;
    UA_UadpNetworkMessageContentMask networkMessageContentMask;
    UA_UadpDataSetMessageContentMask dataSetMessageContentMask;
    UA_Double publishingInterval;
    UA_Double receiveOffset;
    UA_Double processingOffset;
} UA_UadpDataSetReaderMessageDataType;

#define UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE 95

/**
 * RegisterServerResponse
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Registers a server with the discovery server. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_RegisterServerResponse;

#define UA_TYPES_REGISTERSERVERRESPONSE 96

/**
 * AddReferencesItem
 * ^^^^^^^^^^^^^^^^^
 * A request to add a reference to the server address space. */
typedef struct {
    UA_NodeId sourceNodeId;
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_String targetServerUri;
    UA_ExpandedNodeId targetNodeId;
    UA_NodeClass targetNodeClass;
} UA_AddReferencesItem;

#define UA_TYPES_ADDREFERENCESITEM 97

/**
 * RegisterServer2Response
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t configurationResultsSize;
    UA_StatusCode *configurationResults;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_RegisterServer2Response;

#define UA_TYPES_REGISTERSERVER2RESPONSE 98

/**
 * DeleteReferencesResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Delete one or more references from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteReferencesResponse;

#define UA_TYPES_DELETEREFERENCESRESPONSE 99

/**
 * RelativePathElement
 * ^^^^^^^^^^^^^^^^^^^
 * An element in a relative path. */
typedef struct {
    UA_NodeId referenceTypeId;
    UA_Boolean isInverse;
    UA_Boolean includeSubtypes;
    UA_QualifiedName targetName;
} UA_RelativePathElement;

#define UA_TYPES_RELATIVEPATHELEMENT 100

/**
 * SubscriptionAcknowledgement
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 subscriptionId;
    UA_UInt32 sequenceNumber;
} UA_SubscriptionAcknowledgement;

#define UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT 101

/**
 * ConfigurationVersionDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 majorVersion;
    UA_UInt32 minorVersion;
} UA_ConfigurationVersionDataType;

#define UA_TYPES_CONFIGURATIONVERSIONDATATYPE 102

/**
 * DataSetFieldContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_DataSetFieldContentMask;

#define UA_DATASETFIELDCONTENTMASK_NONE 0
#define UA_DATASETFIELDCONTENTMASK_STATUSCODE 1
#define UA_DATASETFIELDCONTENTMASK_SOURCETIMESTAMP 2
#define UA_DATASETFIELDCONTENTMASK_SERVERTIMESTAMP 4
#define UA_DATASETFIELDCONTENTMASK_SOURCEPICOSECONDS 8
#define UA_DATASETFIELDCONTENTMASK_SERVERPICOSECONDS 16
#define UA_DATASETFIELDCONTENTMASK_RAWDATA 32

#define UA_TYPES_DATASETFIELDCONTENTMASK 103

/**
 * TransferResult
 * ^^^^^^^^^^^^^^
 */
typedef struct {
    UA_StatusCode statusCode;
    size_t availableSequenceNumbersSize;
    UA_UInt32 *availableSequenceNumbers;
} UA_TransferResult;

#define UA_TYPES_TRANSFERRESULT 104

/**
 * PublishedVariableDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId publishedVariable;
    UA_UInt32 attributeId;
    UA_Double samplingIntervalHint;
    UA_UInt32 deadbandType;
    UA_Double deadbandValue;
    UA_String indexRange;
    UA_Variant substituteValue;
    size_t metaDataPropertiesSize;
    UA_QualifiedName *metaDataProperties;
} UA_PublishedVariableDataType;

#define UA_TYPES_PUBLISHEDVARIABLEDATATYPE 105

/**
 * CreateMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_MonitoredItemCreateResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_CreateMonitoredItemsResponse;

#define UA_TYPES_CREATEMONITOREDITEMSRESPONSE 106

/**
 * RolePermissionType
 * ^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId roleId;
    UA_PermissionType permissions;
} UA_RolePermissionType;

#define UA_TYPES_ROLEPERMISSIONTYPE 107

/**
 * OverrideValueHandling
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_OVERRIDEVALUEHANDLING_DISABLED = 0,
    UA_OVERRIDEVALUEHANDLING_LASTUSABLEVALUE = 1,
    UA_OVERRIDEVALUEHANDLING_OVERRIDEVALUE = 2,
    __UA_OVERRIDEVALUEHANDLING_FORCE32BIT = 0x7fffffff
} UA_OverrideValueHandling;
UA_STATIC_ASSERT(sizeof(UA_OverrideValueHandling) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_OVERRIDEVALUEHANDLING 108

/**
 * HistoryUpdateResult
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_StatusCode statusCode;
    size_t operationResultsSize;
    UA_StatusCode *operationResults;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryUpdateResult;

#define UA_TYPES_HISTORYUPDATERESULT 109

/**
 * DeleteReferencesItem
 * ^^^^^^^^^^^^^^^^^^^^
 * A request to delete a node from the server address space. */
typedef struct {
    UA_NodeId sourceNodeId;
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_ExpandedNodeId targetNodeId;
    UA_Boolean deleteBidirectional;
} UA_DeleteReferencesItem;

#define UA_TYPES_DELETEREFERENCESITEM 110

/**
 * WriteValue
 * ^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_UInt32 attributeId;
    UA_String indexRange;
    UA_DataValue value;
} UA_WriteValue;

#define UA_TYPES_WRITEVALUE 111

/**
 * ModificationInfo
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime modificationTime;
    UA_HistoryUpdateType updateType;
    UA_String userName;
} UA_ModificationInfo;

#define UA_TYPES_MODIFICATIONINFO 112

/**
 * DataTypeAttributes
 * ^^^^^^^^^^^^^^^^^^
 * The attributes for a data type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
} UA_DataTypeAttributes;

#define UA_TYPES_DATATYPEATTRIBUTES 113

/**
 * TransferSubscriptionsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_TransferResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_TransferSubscriptionsResponse;

#define UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE 114

/**
 * HistoryReadRequest
 * ^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ExtensionObject historyReadDetails;
    UA_TimestampsToReturn timestampsToReturn;
    UA_Boolean releaseContinuationPoints;
    size_t nodesToReadSize;
    UA_HistoryReadValueId *nodesToRead;
} UA_HistoryReadRequest;

#define UA_TYPES_HISTORYREADREQUEST 115

/**
 * AddReferencesResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Adds one or more references to the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_AddReferencesResponse;

#define UA_TYPES_ADDREFERENCESRESPONSE 116

/**
 * DeadbandType
 * ^^^^^^^^^^^^
 */
typedef enum {
    UA_DEADBANDTYPE_NONE = 0,
    UA_DEADBANDTYPE_ABSOLUTE = 1,
    UA_DEADBANDTYPE_PERCENT = 2,
    __UA_DEADBANDTYPE_FORCE32BIT = 0x7fffffff
} UA_DeadbandType;
UA_STATIC_ASSERT(sizeof(UA_DeadbandType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DEADBANDTYPE 117

/**
 * DataChangeTrigger
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_DATACHANGETRIGGER_STATUS = 0,
    UA_DATACHANGETRIGGER_STATUSVALUE = 1,
    UA_DATACHANGETRIGGER_STATUSVALUETIMESTAMP = 2,
    __UA_DATACHANGETRIGGER_FORCE32BIT = 0x7fffffff
} UA_DataChangeTrigger;
UA_STATIC_ASSERT(sizeof(UA_DataChangeTrigger) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DATACHANGETRIGGER 118

/**
 * BuildInfo
 * ^^^^^^^^^
 */
typedef struct {
    UA_String productUri;
    UA_String manufacturerName;
    UA_String productName;
    UA_String softwareVersion;
    UA_String buildNumber;
    UA_DateTime buildDate;
} UA_BuildInfo;

#define UA_TYPES_BUILDINFO 119

/**
 * FilterOperand
 * ^^^^^^^^^^^^^
 */
typedef void * UA_FilterOperand;

#define UA_TYPES_FILTEROPERAND 120

/**
 * MonitoringParameters
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 clientHandle;
    UA_Double samplingInterval;
    UA_ExtensionObject filter;
    UA_UInt32 queueSize;
    UA_Boolean discardOldest;
} UA_MonitoringParameters;

#define UA_TYPES_MONITORINGPARAMETERS 121

/**
 * DoubleComplexNumberType
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Double real;
    UA_Double imaginary;
} UA_DoubleComplexNumberType;

#define UA_TYPES_DOUBLECOMPLEXNUMBERTYPE 122

/**
 * DeleteNodesItem
 * ^^^^^^^^^^^^^^^
 * A request to delete a node to the server address space. */
typedef struct {
    UA_NodeId nodeId;
    UA_Boolean deleteTargetReferences;
} UA_DeleteNodesItem;

#define UA_TYPES_DELETENODESITEM 123

/**
 * DatagramWriterGroupTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Byte messageRepeatCount;
    UA_Double messageRepeatDelay;
} UA_DatagramWriterGroupTransportDataType;

#define UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE 124

/**
 * ReadValueId
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_UInt32 attributeId;
    UA_String indexRange;
    UA_QualifiedName dataEncoding;
} UA_ReadValueId;

#define UA_TYPES_READVALUEID 125

/**
 * CallRequest
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t methodsToCallSize;
    UA_CallMethodRequest *methodsToCall;
} UA_CallRequest;

#define UA_TYPES_CALLREQUEST 126

/**
 * RelativePath
 * ^^^^^^^^^^^^
 * A relative path constructed from reference types and browse names. */
typedef struct {
    size_t elementsSize;
    UA_RelativePathElement *elements;
} UA_RelativePath;

#define UA_TYPES_RELATIVEPATH 127

/**
 * DeleteNodesRequest
 * ^^^^^^^^^^^^^^^^^^
 * Delete one or more nodes from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToDeleteSize;
    UA_DeleteNodesItem *nodesToDelete;
} UA_DeleteNodesRequest;

#define UA_TYPES_DELETENODESREQUEST 128

/**
 * BrokerDataSetWriterTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
    UA_String metaDataQueueName;
    UA_Double metaDataUpdateTime;
} UA_BrokerDataSetWriterTransportDataType;

#define UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE 129

/**
 * MonitoredItemModifyRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 monitoredItemId;
    UA_MonitoringParameters requestedParameters;
} UA_MonitoredItemModifyRequest;

#define UA_TYPES_MONITOREDITEMMODIFYREQUEST 130

/**
 * DeleteRawModifiedDetails
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_Boolean isDeleteModified;
    UA_DateTime startTime;
    UA_DateTime endTime;
} UA_DeleteRawModifiedDetails;

#define UA_TYPES_DELETERAWMODIFIEDDETAILS 131

/**
 * UserTokenType
 * ^^^^^^^^^^^^^
 * The possible user token types. */
typedef enum {
    UA_USERTOKENTYPE_ANONYMOUS = 0,
    UA_USERTOKENTYPE_USERNAME = 1,
    UA_USERTOKENTYPE_CERTIFICATE = 2,
    UA_USERTOKENTYPE_ISSUEDTOKEN = 3,
    __UA_USERTOKENTYPE_FORCE32BIT = 0x7fffffff
} UA_UserTokenType;
UA_STATIC_ASSERT(sizeof(UA_UserTokenType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_USERTOKENTYPE 132

/**
 * AggregateConfiguration
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Boolean useServerCapabilitiesDefaults;
    UA_Boolean treatUncertainAsBad;
    UA_Byte percentDataBad;
    UA_Byte percentDataGood;
    UA_Boolean useSlopedExtrapolation;
} UA_AggregateConfiguration;

#define UA_TYPES_AGGREGATECONFIGURATION 133

/**
 * LocaleId
 * ^^^^^^^^
 * An identifier for a user locale. */
typedef UA_String UA_LocaleId;

#define UA_TYPES_LOCALEID 134

/**
 * UnregisterNodesResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * Unregisters one or more previously registered nodes. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_UnregisterNodesResponse;

#define UA_TYPES_UNREGISTERNODESRESPONSE 135

/**
 * ReadAtTimeDetails
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t reqTimesSize;
    UA_DateTime *reqTimes;
    UA_Boolean useSimpleBounds;
} UA_ReadAtTimeDetails;

#define UA_TYPES_READATTIMEDETAILS 136

/**
 * ContentFilterResult
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t elementResultsSize;
    UA_ContentFilterElementResult *elementResults;
    size_t elementDiagnosticInfosSize;
    UA_DiagnosticInfo *elementDiagnosticInfos;
} UA_ContentFilterResult;

#define UA_TYPES_CONTENTFILTERRESULT 137

/**
 * HistoryReadResponse
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_HistoryReadResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryReadResponse;

#define UA_TYPES_HISTORYREADRESPONSE 138

/**
 * SimpleTypeDescription
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_NodeId baseDataType;
    UA_Byte builtInType;
} UA_SimpleTypeDescription;

#define UA_TYPES_SIMPLETYPEDESCRIPTION 139

/**
 * UserTokenPolicy
 * ^^^^^^^^^^^^^^^
 * Describes a user token that can be used with a server. */
typedef struct {
    UA_String policyId;
    UA_UserTokenType tokenType;
    UA_String issuedTokenType;
    UA_String issuerEndpointUrl;
    UA_String securityPolicyUri;
} UA_UserTokenPolicy;

#define UA_TYPES_USERTOKENPOLICY 140

/**
 * DeleteMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    size_t monitoredItemIdsSize;
    UA_UInt32 *monitoredItemIds;
} UA_DeleteMonitoredItemsRequest;

#define UA_TYPES_DELETEMONITOREDITEMSREQUEST 141

/**
 * SetMonitoringModeRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_MonitoringMode monitoringMode;
    size_t monitoredItemIdsSize;
    UA_UInt32 *monitoredItemIds;
} UA_SetMonitoringModeRequest;

#define UA_TYPES_SETMONITORINGMODEREQUEST 142

/**
 * Duration
 * ^^^^^^^^
 * A period of time measured in milliseconds. */
typedef UA_Double UA_Duration;

#define UA_TYPES_DURATION 143

/**
 * ReferenceTypeAttributes
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * The attributes for a reference type node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean isAbstract;
    UA_Boolean symmetric;
    UA_LocalizedText inverseName;
} UA_ReferenceTypeAttributes;

#define UA_TYPES_REFERENCETYPEATTRIBUTES 144

/**
 * DataSetFieldFlags
 * ^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt16 UA_DataSetFieldFlags;

#define UA_DATASETFIELDFLAGS_NONE 0
#define UA_DATASETFIELDFLAGS_PROMOTEDFIELD 1

#define UA_TYPES_DATASETFIELDFLAGS 145

/**
 * GetEndpointsRequest
 * ^^^^^^^^^^^^^^^^^^^
 * Gets the endpoints used by the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_String endpointUrl;
    size_t localeIdsSize;
    UA_String *localeIds;
    size_t profileUrisSize;
    UA_String *profileUris;
} UA_GetEndpointsRequest;

#define UA_TYPES_GETENDPOINTSREQUEST 146

/**
 * CloseSecureChannelResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Closes a secure channel. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_CloseSecureChannelResponse;

#define UA_TYPES_CLOSESECURECHANNELRESPONSE 147

/**
 * PublishedDataItemsDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t publishedDataSize;
    UA_PublishedVariableDataType *publishedData;
} UA_PublishedDataItemsDataType;

#define UA_TYPES_PUBLISHEDDATAITEMSDATATYPE 148

/**
 * PubSubState
 * ^^^^^^^^^^^
 */
typedef enum {
    UA_PUBSUBSTATE_DISABLED = 0,
    UA_PUBSUBSTATE_PAUSED = 1,
    UA_PUBSUBSTATE_OPERATIONAL = 2,
    UA_PUBSUBSTATE_ERROR = 3,
    __UA_PUBSUBSTATE_FORCE32BIT = 0x7fffffff
} UA_PubSubState;
UA_STATIC_ASSERT(sizeof(UA_PubSubState) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_PUBSUBSTATE 149

/**
 * ViewDescription
 * ^^^^^^^^^^^^^^^
 * The view to browse. */
typedef struct {
    UA_NodeId viewId;
    UA_DateTime timestamp;
    UA_UInt32 viewVersion;
} UA_ViewDescription;

#define UA_TYPES_VIEWDESCRIPTION 150

/**
 * SetPublishingModeResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_SetPublishingModeResponse;

#define UA_TYPES_SETPUBLISHINGMODERESPONSE 151

/**
 * StatusChangeNotification
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_StatusCode status;
    UA_DiagnosticInfo diagnosticInfo;
} UA_StatusChangeNotification;

#define UA_TYPES_STATUSCHANGENOTIFICATION 152

/**
 * StructureField
 * ^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_LocalizedText description;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_UInt32 maxStringLength;
    UA_Boolean isOptional;
} UA_StructureField;

#define UA_TYPES_STRUCTUREFIELD 153

/**
 * NodeAttributesMask
 * ^^^^^^^^^^^^^^^^^^
 * The bits used to specify default attributes for a new node. */
typedef enum {
    UA_NODEATTRIBUTESMASK_NONE = 0,
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100













16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
    UA_NODEATTRIBUTESMASK_METHOD = 26632548,
    UA_NODEATTRIBUTESMASK_REFERENCETYPE = 26537060,
    UA_NODEATTRIBUTESMASK_VIEW = 26501356,
    __UA_NODEATTRIBUTESMASK_FORCE32BIT = 0x7fffffff
} UA_NodeAttributesMask;
UA_STATIC_ASSERT(sizeof(UA_NodeAttributesMask) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_NODEATTRIBUTESMASK 147

/**
 * HistoryUpdateRequest
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t historyUpdateDetailsSize;
    UA_ExtensionObject *historyUpdateDetails;
} UA_HistoryUpdateRequest;

#define UA_TYPES_HISTORYUPDATEREQUEST 148

/**
 * EventFilterResult
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t selectClauseResultsSize;
    UA_StatusCode *selectClauseResults;
    size_t selectClauseDiagnosticInfosSize;
    UA_DiagnosticInfo *selectClauseDiagnosticInfos;
    UA_ContentFilterResult whereClauseResult;
} UA_EventFilterResult;

#define UA_TYPES_EVENTFILTERRESULT 149

/**
 * BrokerWriterGroupTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
} UA_BrokerWriterGroupTransportDataType;

#define UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE 150

/**
 * KeyValuePair
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_QualifiedName key;
    UA_Variant value;
} UA_KeyValuePair;

#define UA_TYPES_KEYVALUEPAIR 151

/**
 * MonitoredItemCreateRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ReadValueId itemToMonitor;
    UA_MonitoringMode monitoringMode;
    UA_MonitoringParameters requestedParameters;
} UA_MonitoredItemCreateRequest;

#define UA_TYPES_MONITOREDITEMCREATEREQUEST 152

/**
 * ComplexNumberType
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Float real;
    UA_Float imaginary;
} UA_ComplexNumberType;

#define UA_TYPES_COMPLEXNUMBERTYPE 153

/**
 * Range
 * ^^^^^
 */
typedef struct {
    UA_Double low;
    UA_Double high;
} UA_Range;

#define UA_TYPES_RANGE 154

/**
 * HistoryUpdateResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_HistoryUpdateResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryUpdateResponse;

#define UA_TYPES_HISTORYUPDATERESPONSE 155

/**
 * DataChangeNotification
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t monitoredItemsSize;
    UA_MonitoredItemNotification *monitoredItems;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DataChangeNotification;

#define UA_TYPES_DATACHANGENOTIFICATION 156

/**
 * Argument
 * ^^^^^^^^
 * An argument for a method. */
typedef struct {
    UA_String name;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_LocalizedText description;
} UA_Argument;

#define UA_TYPES_ARGUMENT 157

/**
 * JsonDataSetMessageContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_JsonDataSetMessageContentMask;

#define UA_JSONDATASETMESSAGECONTENTMASK_NONE 0
#define UA_JSONDATASETMESSAGECONTENTMASK_DATASETWRITERID 1
#define UA_JSONDATASETMESSAGECONTENTMASK_METADATAVERSION 2
#define UA_JSONDATASETMESSAGECONTENTMASK_SEQUENCENUMBER 4
#define UA_JSONDATASETMESSAGECONTENTMASK_TIMESTAMP 8
#define UA_JSONDATASETMESSAGECONTENTMASK_STATUS 16

#define UA_TYPES_JSONDATASETMESSAGECONTENTMASK 158














/**
 * ChannelSecurityToken
 * ^^^^^^^^^^^^^^^^^^^^
 * The token that identifies a set of keys for an active secure channel. */
typedef struct {
    UA_UInt32 channelId;
    UA_UInt32 tokenId;
    UA_DateTime createdAt;
    UA_UInt32 revisedLifetime;
} UA_ChannelSecurityToken;

#define UA_TYPES_CHANNELSECURITYTOKEN 159

/**
 * ServerState
 * ^^^^^^^^^^^
 */
typedef enum {
    UA_SERVERSTATE_RUNNING = 0,
    UA_SERVERSTATE_FAILED = 1,
    UA_SERVERSTATE_NOCONFIGURATION = 2,
    UA_SERVERSTATE_SUSPENDED = 3,
    UA_SERVERSTATE_SHUTDOWN = 4,
    UA_SERVERSTATE_TEST = 5,
    UA_SERVERSTATE_COMMUNICATIONFAULT = 6,
    UA_SERVERSTATE_UNKNOWN = 7,
    __UA_SERVERSTATE_FORCE32BIT = 0x7fffffff
} UA_ServerState;
UA_STATIC_ASSERT(sizeof(UA_ServerState) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_SERVERSTATE 160

/**
 * EventNotificationList
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t eventsSize;
    UA_EventFieldList *events;
} UA_EventNotificationList;

#define UA_TYPES_EVENTNOTIFICATIONLIST 161

/**
 * HistoryEventFieldList
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t eventFieldsSize;
    UA_Variant *eventFields;
} UA_HistoryEventFieldList;

#define UA_TYPES_HISTORYEVENTFIELDLIST 162

/**
 * AnonymousIdentityToken
 * ^^^^^^^^^^^^^^^^^^^^^^
 * A token representing an anonymous user. */
typedef struct {
    UA_String policyId;
} UA_AnonymousIdentityToken;

#define UA_TYPES_ANONYMOUSIDENTITYTOKEN 163

/**
 * FilterOperator
 * ^^^^^^^^^^^^^^
 */
typedef enum {
    UA_FILTEROPERATOR_EQUALS = 0,







|











|













|












|










|











|










|










|













|












|














|














|
>
>
>
>
>
>
>
>
>
>
>
>
>












|


















|










|










|









|







16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
    UA_NODEATTRIBUTESMASK_METHOD = 26632548,
    UA_NODEATTRIBUTESMASK_REFERENCETYPE = 26537060,
    UA_NODEATTRIBUTESMASK_VIEW = 26501356,
    __UA_NODEATTRIBUTESMASK_FORCE32BIT = 0x7fffffff
} UA_NodeAttributesMask;
UA_STATIC_ASSERT(sizeof(UA_NodeAttributesMask) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_NODEATTRIBUTESMASK 154

/**
 * HistoryUpdateRequest
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t historyUpdateDetailsSize;
    UA_ExtensionObject *historyUpdateDetails;
} UA_HistoryUpdateRequest;

#define UA_TYPES_HISTORYUPDATEREQUEST 155

/**
 * EventFilterResult
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t selectClauseResultsSize;
    UA_StatusCode *selectClauseResults;
    size_t selectClauseDiagnosticInfosSize;
    UA_DiagnosticInfo *selectClauseDiagnosticInfos;
    UA_ContentFilterResult whereClauseResult;
} UA_EventFilterResult;

#define UA_TYPES_EVENTFILTERRESULT 156

/**
 * BrokerWriterGroupTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
} UA_BrokerWriterGroupTransportDataType;

#define UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE 157

/**
 * KeyValuePair
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_QualifiedName key;
    UA_Variant value;
} UA_KeyValuePair;

#define UA_TYPES_KEYVALUEPAIR 158

/**
 * MonitoredItemCreateRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ReadValueId itemToMonitor;
    UA_MonitoringMode monitoringMode;
    UA_MonitoringParameters requestedParameters;
} UA_MonitoredItemCreateRequest;

#define UA_TYPES_MONITOREDITEMCREATEREQUEST 159

/**
 * ComplexNumberType
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Float real;
    UA_Float imaginary;
} UA_ComplexNumberType;

#define UA_TYPES_COMPLEXNUMBERTYPE 160

/**
 * Range
 * ^^^^^
 */
typedef struct {
    UA_Double low;
    UA_Double high;
} UA_Range;

#define UA_TYPES_RANGE 161

/**
 * HistoryUpdateResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_HistoryUpdateResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_HistoryUpdateResponse;

#define UA_TYPES_HISTORYUPDATERESPONSE 162

/**
 * DataChangeNotification
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t monitoredItemsSize;
    UA_MonitoredItemNotification *monitoredItems;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DataChangeNotification;

#define UA_TYPES_DATACHANGENOTIFICATION 163

/**
 * Argument
 * ^^^^^^^^
 * An argument for a method. */
typedef struct {
    UA_String name;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_LocalizedText description;
} UA_Argument;

#define UA_TYPES_ARGUMENT 164

/**
 * JsonDataSetMessageContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_JsonDataSetMessageContentMask;

#define UA_JSONDATASETMESSAGECONTENTMASK_NONE 0
#define UA_JSONDATASETMESSAGECONTENTMASK_DATASETWRITERID 1
#define UA_JSONDATASETMESSAGECONTENTMASK_METADATAVERSION 2
#define UA_JSONDATASETMESSAGECONTENTMASK_SEQUENCENUMBER 4
#define UA_JSONDATASETMESSAGECONTENTMASK_TIMESTAMP 8
#define UA_JSONDATASETMESSAGECONTENTMASK_STATUS 16

#define UA_TYPES_JSONDATASETMESSAGECONTENTMASK 165

/**
 * TransferSubscriptionsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t subscriptionIdsSize;
    UA_UInt32 *subscriptionIds;
    UA_Boolean sendInitialValues;
} UA_TransferSubscriptionsRequest;

#define UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST 166

/**
 * ChannelSecurityToken
 * ^^^^^^^^^^^^^^^^^^^^
 * The token that identifies a set of keys for an active secure channel. */
typedef struct {
    UA_UInt32 channelId;
    UA_UInt32 tokenId;
    UA_DateTime createdAt;
    UA_UInt32 revisedLifetime;
} UA_ChannelSecurityToken;

#define UA_TYPES_CHANNELSECURITYTOKEN 167

/**
 * ServerState
 * ^^^^^^^^^^^
 */
typedef enum {
    UA_SERVERSTATE_RUNNING = 0,
    UA_SERVERSTATE_FAILED = 1,
    UA_SERVERSTATE_NOCONFIGURATION = 2,
    UA_SERVERSTATE_SUSPENDED = 3,
    UA_SERVERSTATE_SHUTDOWN = 4,
    UA_SERVERSTATE_TEST = 5,
    UA_SERVERSTATE_COMMUNICATIONFAULT = 6,
    UA_SERVERSTATE_UNKNOWN = 7,
    __UA_SERVERSTATE_FORCE32BIT = 0x7fffffff
} UA_ServerState;
UA_STATIC_ASSERT(sizeof(UA_ServerState) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_SERVERSTATE 168

/**
 * EventNotificationList
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t eventsSize;
    UA_EventFieldList *events;
} UA_EventNotificationList;

#define UA_TYPES_EVENTNOTIFICATIONLIST 169

/**
 * HistoryEventFieldList
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t eventFieldsSize;
    UA_Variant *eventFields;
} UA_HistoryEventFieldList;

#define UA_TYPES_HISTORYEVENTFIELDLIST 170

/**
 * AnonymousIdentityToken
 * ^^^^^^^^^^^^^^^^^^^^^^
 * A token representing an anonymous user. */
typedef struct {
    UA_String policyId;
} UA_AnonymousIdentityToken;

#define UA_TYPES_ANONYMOUSIDENTITYTOKEN 171

/**
 * FilterOperator
 * ^^^^^^^^^^^^^^
 */
typedef enum {
    UA_FILTEROPERATOR_EQUALS = 0,
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606












16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257





















17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
    UA_FILTEROPERATOR_RELATEDTO = 15,
    UA_FILTEROPERATOR_BITWISEAND = 16,
    UA_FILTEROPERATOR_BITWISEOR = 17,
    __UA_FILTEROPERATOR_FORCE32BIT = 0x7fffffff
} UA_FilterOperator;
UA_STATIC_ASSERT(sizeof(UA_FilterOperator) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_FILTEROPERATOR 164

/**
 * AggregateFilter
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_NodeId aggregateType;
    UA_Double processingInterval;
    UA_AggregateConfiguration aggregateConfiguration;
} UA_AggregateFilter;

#define UA_TYPES_AGGREGATEFILTER 165

/**
 * RepublishResponse
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_NotificationMessage notificationMessage;
} UA_RepublishResponse;

#define UA_TYPES_REPUBLISHRESPONSE 166

/**
 * DeleteSubscriptionsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteSubscriptionsResponse;

#define UA_TYPES_DELETESUBSCRIPTIONSRESPONSE 167

/**
 * RegisterNodesRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Registers one or more nodes for repeated use within a session. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToRegisterSize;
    UA_NodeId *nodesToRegister;
} UA_RegisterNodesRequest;

#define UA_TYPES_REGISTERNODESREQUEST 168

/**
 * StructureDefinition
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId defaultEncodingId;
    UA_NodeId baseDataType;
    UA_StructureType structureType;
    size_t fieldsSize;
    UA_StructureField *fields;
} UA_StructureDefinition;

#define UA_TYPES_STRUCTUREDEFINITION 169

/**
 * MethodAttributes
 * ^^^^^^^^^^^^^^^^
 * The attributes for a method node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean executable;
    UA_Boolean userExecutable;
} UA_MethodAttributes;

#define UA_TYPES_METHODATTRIBUTES 170

/**
 * UserNameIdentityToken
 * ^^^^^^^^^^^^^^^^^^^^^
 * A token representing a user identified by a user name and password. */
typedef struct {
    UA_String policyId;
    UA_String userName;
    UA_ByteString password;
    UA_String encryptionAlgorithm;
} UA_UserNameIdentityToken;

#define UA_TYPES_USERNAMEIDENTITYTOKEN 171

/**
 * TimeZoneDataType
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Int16 offset;
    UA_Boolean daylightSavingInOffset;
} UA_TimeZoneDataType;

#define UA_TYPES_TIMEZONEDATATYPE 172

/**
 * UnregisterNodesRequest
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Unregisters one or more previously registered nodes. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToUnregisterSize;
    UA_NodeId *nodesToUnregister;
} UA_UnregisterNodesRequest;

#define UA_TYPES_UNREGISTERNODESREQUEST 173

/**
 * DataSetOrderingType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_DATASETORDERINGTYPE_UNDEFINED = 0,
    UA_DATASETORDERINGTYPE_ASCENDINGWRITERID = 1,
    UA_DATASETORDERINGTYPE_ASCENDINGWRITERIDSINGLE = 2,
    __UA_DATASETORDERINGTYPE_FORCE32BIT = 0x7fffffff
} UA_DataSetOrderingType;
UA_STATIC_ASSERT(sizeof(UA_DataSetOrderingType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DATASETORDERINGTYPE 174

/**
 * OpenSecureChannelResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 * Creates a secure channel with a server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_UInt32 serverProtocolVersion;
    UA_ChannelSecurityToken securityToken;
    UA_ByteString serverNonce;
} UA_OpenSecureChannelResponse;

#define UA_TYPES_OPENSECURECHANNELRESPONSE 175

/**
 * SetTriggeringResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t addResultsSize;
    UA_StatusCode *addResults;
    size_t addDiagnosticInfosSize;
    UA_DiagnosticInfo *addDiagnosticInfos;
    size_t removeResultsSize;
    UA_StatusCode *removeResults;
    size_t removeDiagnosticInfosSize;
    UA_DiagnosticInfo *removeDiagnosticInfos;
} UA_SetTriggeringResponse;

#define UA_TYPES_SETTRIGGERINGRESPONSE 176

/**
 * SimpleAttributeOperand
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId typeDefinitionId;
    size_t browsePathSize;
    UA_QualifiedName *browsePath;
    UA_UInt32 attributeId;
    UA_String indexRange;
} UA_SimpleAttributeOperand;

#define UA_TYPES_SIMPLEATTRIBUTEOPERAND 177

/**
 * UadpDataSetWriterMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UadpDataSetMessageContentMask dataSetMessageContentMask;
    UA_UInt16 configuredSize;
    UA_UInt16 networkMessageNumber;
    UA_UInt16 dataSetOffset;
} UA_UadpDataSetWriterMessageDataType;

#define UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE 178

/**
 * JsonNetworkMessageContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_JsonNetworkMessageContentMask;

#define UA_JSONNETWORKMESSAGECONTENTMASK_NONE 0
#define UA_JSONNETWORKMESSAGECONTENTMASK_NETWORKMESSAGEHEADER 1
#define UA_JSONNETWORKMESSAGECONTENTMASK_DATASETMESSAGEHEADER 2
#define UA_JSONNETWORKMESSAGECONTENTMASK_SINGLEDATASETMESSAGE 4
#define UA_JSONNETWORKMESSAGECONTENTMASK_PUBLISHERID 8
#define UA_JSONNETWORKMESSAGECONTENTMASK_DATASETCLASSID 16
#define UA_JSONNETWORKMESSAGECONTENTMASK_REPLYTO 32

#define UA_TYPES_JSONNETWORKMESSAGECONTENTMASK 179

/**
 * RepublishRequest
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_UInt32 retransmitSequenceNumber;
} UA_RepublishRequest;

#define UA_TYPES_REPUBLISHREQUEST 180

/**
 * RegisterNodesResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Registers one or more nodes for repeated use within a session. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t registeredNodeIdsSize;
    UA_NodeId *registeredNodeIds;
} UA_RegisterNodesResponse;

#define UA_TYPES_REGISTERNODESRESPONSE 181

/**
 * ModifyMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_MonitoredItemModifyResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_ModifyMonitoredItemsResponse;

#define UA_TYPES_MODIFYMONITOREDITEMSRESPONSE 182

/**
 * FieldTargetDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Guid dataSetFieldId;
    UA_String receiverIndexRange;
    UA_NodeId targetNodeId;
    UA_UInt32 attributeId;
    UA_String writeIndexRange;
    UA_OverrideValueHandling overrideValueHandling;
    UA_Variant overrideValue;
} UA_FieldTargetDataType;

#define UA_TYPES_FIELDTARGETDATATYPE 183

/**
 * DeleteSubscriptionsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t subscriptionIdsSize;
    UA_UInt32 *subscriptionIds;
} UA_DeleteSubscriptionsRequest;

#define UA_TYPES_DELETESUBSCRIPTIONSREQUEST 184

/**
 * RedundancySupport
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_REDUNDANCYSUPPORT_NONE = 0,
    UA_REDUNDANCYSUPPORT_COLD = 1,
    UA_REDUNDANCYSUPPORT_WARM = 2,
    UA_REDUNDANCYSUPPORT_HOT = 3,
    UA_REDUNDANCYSUPPORT_TRANSPARENT = 4,
    UA_REDUNDANCYSUPPORT_HOTANDMIRRORED = 5,
    __UA_REDUNDANCYSUPPORT_FORCE32BIT = 0x7fffffff
} UA_RedundancySupport;
UA_STATIC_ASSERT(sizeof(UA_RedundancySupport) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_REDUNDANCYSUPPORT 185

/**
 * BrowsePath
 * ^^^^^^^^^^
 * A request to translate a path into a node id. */
typedef struct {
    UA_NodeId startingNode;
    UA_RelativePath relativePath;
} UA_BrowsePath;

#define UA_TYPES_BROWSEPATH 186

/**
 * ObjectAttributes
 * ^^^^^^^^^^^^^^^^
 * The attributes for an object node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Byte eventNotifier;
} UA_ObjectAttributes;

#define UA_TYPES_OBJECTATTRIBUTES 187

/**
 * PublishRequest
 * ^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t subscriptionAcknowledgementsSize;
    UA_SubscriptionAcknowledgement *subscriptionAcknowledgements;
} UA_PublishRequest;

#define UA_TYPES_PUBLISHREQUEST 188

/**
 * FindServersRequest
 * ^^^^^^^^^^^^^^^^^^
 * Finds the servers known to the discovery server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_String endpointUrl;
    size_t localeIdsSize;
    UA_String *localeIds;
    size_t serverUrisSize;
    UA_String *serverUris;
} UA_FindServersRequest;

#define UA_TYPES_FINDSERVERSREQUEST 189

/**
 * JsonDataSetWriterMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonDataSetMessageContentMask dataSetMessageContentMask;
} UA_JsonDataSetWriterMessageDataType;

#define UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE 190

/**
 * FindServersOnNetworkResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_DateTime lastCounterResetTime;
    size_t serversSize;
    UA_ServerOnNetwork *servers;
} UA_FindServersOnNetworkResponse;

#define UA_TYPES_FINDSERVERSONNETWORKRESPONSE 191

/**
 * FieldMetaData
 * ^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_LocalizedText description;
    UA_DataSetFieldFlags fieldFlags;
    UA_Byte builtInType;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_UInt32 maxStringLength;
    UA_Guid dataSetFieldId;
    size_t propertiesSize;
    UA_KeyValuePair *properties;
} UA_FieldMetaData;

#define UA_TYPES_FIELDMETADATA 192

/**
 * UpdateDataDetails
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_PerformUpdateType performInsertReplace;
    size_t updateValuesSize;
    UA_DataValue *updateValues;
} UA_UpdateDataDetails;

#define UA_TYPES_UPDATEDATADETAILS 193

/**
 * ReferenceDescription
 * ^^^^^^^^^^^^^^^^^^^^
 * The description of a reference. */
typedef struct {
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_ExpandedNodeId nodeId;
    UA_QualifiedName browseName;
    UA_LocalizedText displayName;
    UA_NodeClass nodeClass;
    UA_ExpandedNodeId typeDefinition;
} UA_ReferenceDescription;

#define UA_TYPES_REFERENCEDESCRIPTION 194













/**
 * TargetVariablesDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t targetVariablesSize;
    UA_FieldTargetDataType *targetVariables;
} UA_TargetVariablesDataType;

#define UA_TYPES_TARGETVARIABLESDATATYPE 195

/**
 * CreateSubscriptionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Double requestedPublishingInterval;
    UA_UInt32 requestedLifetimeCount;
    UA_UInt32 requestedMaxKeepAliveCount;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Boolean publishingEnabled;
    UA_Byte priority;
} UA_CreateSubscriptionRequest;

#define UA_TYPES_CREATESUBSCRIPTIONREQUEST 196

/**
 * FindServersOnNetworkRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 startingRecordId;
    UA_UInt32 maxRecordsToReturn;
    size_t serverCapabilityFilterSize;
    UA_String *serverCapabilityFilter;
} UA_FindServersOnNetworkRequest;

#define UA_TYPES_FINDSERVERSONNETWORKREQUEST 197

/**
 * CallResponse
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_CallMethodResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_CallResponse;

#define UA_TYPES_CALLRESPONSE 198

/**
 * DeleteNodesResponse
 * ^^^^^^^^^^^^^^^^^^^
 * Delete one or more nodes from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteNodesResponse;

#define UA_TYPES_DELETENODESRESPONSE 199

/**
 * BrokerDataSetReaderTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
    UA_String metaDataQueueName;
} UA_BrokerDataSetReaderTransportDataType;

#define UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE 200

/**
 * ModifyMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_TimestampsToReturn timestampsToReturn;
    size_t itemsToModifySize;
    UA_MonitoredItemModifyRequest *itemsToModify;
} UA_ModifyMonitoredItemsRequest;

#define UA_TYPES_MODIFYMONITOREDITEMSREQUEST 201

/**
 * ServiceFault
 * ^^^^^^^^^^^^
 * The response returned by all services when there is a service level error. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_ServiceFault;

#define UA_TYPES_SERVICEFAULT 202

/**
 * PublishResponse
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_UInt32 subscriptionId;
    size_t availableSequenceNumbersSize;
    UA_UInt32 *availableSequenceNumbers;
    UA_Boolean moreNotifications;
    UA_NotificationMessage notificationMessage;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_PublishResponse;

#define UA_TYPES_PUBLISHRESPONSE 203

/**
 * CreateMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_TimestampsToReturn timestampsToReturn;
    size_t itemsToCreateSize;
    UA_MonitoredItemCreateRequest *itemsToCreate;
} UA_CreateMonitoredItemsRequest;

#define UA_TYPES_CREATEMONITOREDITEMSREQUEST 204

/**
 * ReadProcessedDetails
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_DateTime endTime;
    UA_Double processingInterval;
    size_t aggregateTypeSize;
    UA_NodeId *aggregateType;
    UA_AggregateConfiguration aggregateConfiguration;
} UA_ReadProcessedDetails;

#define UA_TYPES_READPROCESSEDDETAILS 205

/**
 * OpenSecureChannelRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Creates a secure channel with a server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 clientProtocolVersion;
    UA_SecurityTokenRequestType requestType;
    UA_MessageSecurityMode securityMode;
    UA_ByteString clientNonce;
    UA_UInt32 requestedLifetime;
} UA_OpenSecureChannelRequest;

#define UA_TYPES_OPENSECURECHANNELREQUEST 206

/**
 * CloseSessionRequest
 * ^^^^^^^^^^^^^^^^^^^
 * Closes a session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean deleteSubscriptions;
} UA_CloseSessionRequest;

#define UA_TYPES_CLOSESESSIONREQUEST 207

/**
 * SetTriggeringRequest
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_UInt32 triggeringItemId;
    size_t linksToAddSize;
    UA_UInt32 *linksToAdd;
    size_t linksToRemoveSize;
    UA_UInt32 *linksToRemove;
} UA_SetTriggeringRequest;

#define UA_TYPES_SETTRIGGERINGREQUEST 208

/**
 * EnumDescription
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_EnumDefinition enumDefinition;
    UA_Byte builtInType;
} UA_EnumDescription;

#define UA_TYPES_ENUMDESCRIPTION 209

/**
 * BrowseResult
 * ^^^^^^^^^^^^
 * The result of a browse operation. */
typedef struct {
    UA_StatusCode statusCode;
    UA_ByteString continuationPoint;
    size_t referencesSize;
    UA_ReferenceDescription *references;
} UA_BrowseResult;

#define UA_TYPES_BROWSERESULT 210

/**
 * AddReferencesRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Adds one or more references to the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t referencesToAddSize;
    UA_AddReferencesItem *referencesToAdd;
} UA_AddReferencesRequest;

#define UA_TYPES_ADDREFERENCESREQUEST 211

/**
 * AddNodesItem
 * ^^^^^^^^^^^^
 * A request to add a node to the server address space. */
typedef struct {
    UA_ExpandedNodeId parentNodeId;
    UA_NodeId referenceTypeId;
    UA_ExpandedNodeId requestedNewNodeId;
    UA_QualifiedName browseName;
    UA_NodeClass nodeClass;
    UA_ExtensionObject nodeAttributes;
    UA_ExpandedNodeId typeDefinition;
} UA_AddNodesItem;

#define UA_TYPES_ADDNODESITEM 212

/**
 * ServerStatusDataType
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_DateTime currentTime;
    UA_ServerState state;
    UA_BuildInfo buildInfo;
    UA_UInt32 secondsTillShutdown;
    UA_LocalizedText shutdownReason;
} UA_ServerStatusDataType;

#define UA_TYPES_SERVERSTATUSDATATYPE 213

/**
 * HistoryModifiedData
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t dataValuesSize;
    UA_DataValue *dataValues;
    size_t modificationInfosSize;
    UA_ModificationInfo *modificationInfos;
} UA_HistoryModifiedData;

#define UA_TYPES_HISTORYMODIFIEDDATA 214

/**
 * BrowseNextResponse
 * ^^^^^^^^^^^^^^^^^^
 * Continues one or more browse operations. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowseResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_BrowseNextResponse;

#define UA_TYPES_BROWSENEXTRESPONSE 215

/**
 * AxisInformation
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_EUInformation engineeringUnits;
    UA_Range eURange;
    UA_LocalizedText title;
    UA_AxisScaleEnumeration axisScaleType;
    size_t axisStepsSize;
    UA_Double *axisSteps;
} UA_AxisInformation;

#define UA_TYPES_AXISINFORMATION 216

/**
 * RegisteredServer
 * ^^^^^^^^^^^^^^^^
 * The information required to register a server with a discovery server. */
typedef struct {
    UA_String serverUri;
    UA_String productUri;
    size_t serverNamesSize;
    UA_LocalizedText *serverNames;
    UA_ApplicationType serverType;
    UA_String gatewayServerUri;
    size_t discoveryUrlsSize;
    UA_String *discoveryUrls;
    UA_String semaphoreFilePath;
    UA_Boolean isOnline;
} UA_RegisteredServer;

#define UA_TYPES_REGISTEREDSERVER 217

/**
 * ApplicationDescription
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Describes an application and how to find it. */
typedef struct {
    UA_String applicationUri;
    UA_String productUri;
    UA_LocalizedText applicationName;
    UA_ApplicationType applicationType;
    UA_String gatewayServerUri;
    UA_String discoveryProfileUri;
    size_t discoveryUrlsSize;
    UA_String *discoveryUrls;
} UA_ApplicationDescription;

#define UA_TYPES_APPLICATIONDESCRIPTION 218

/**
 * StructureDescription
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_StructureDefinition structureDefinition;
} UA_StructureDescription;

#define UA_TYPES_STRUCTUREDESCRIPTION 219

/**
 * ReadRequest
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Double maxAge;
    UA_TimestampsToReturn timestampsToReturn;
    size_t nodesToReadSize;
    UA_ReadValueId *nodesToRead;
} UA_ReadRequest;

#define UA_TYPES_READREQUEST 220

/**
 * DataSetWriterDataType
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_Boolean enabled;
    UA_UInt16 dataSetWriterId;
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_UInt32 keyFrameCount;
    UA_String dataSetName;
    size_t dataSetWriterPropertiesSize;
    UA_KeyValuePair *dataSetWriterProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
} UA_DataSetWriterDataType;

#define UA_TYPES_DATASETWRITERDATATYPE 221

/**
 * ActivateSessionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Activates a session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_SignatureData clientSignature;
    size_t clientSoftwareCertificatesSize;
    UA_SignedSoftwareCertificate *clientSoftwareCertificates;
    size_t localeIdsSize;
    UA_String *localeIds;
    UA_ExtensionObject userIdentityToken;
    UA_SignatureData userTokenSignature;
} UA_ActivateSessionRequest;

#define UA_TYPES_ACTIVATESESSIONREQUEST 222

/**
 * BrowsePathResult
 * ^^^^^^^^^^^^^^^^
 * The result of a translate opearation. */
typedef struct {
    UA_StatusCode statusCode;
    size_t targetsSize;
    UA_BrowsePathTarget *targets;
} UA_BrowsePathResult;

#define UA_TYPES_BROWSEPATHRESULT 223

/**
 * AddNodesRequest
 * ^^^^^^^^^^^^^^^
 * Adds one or more nodes to the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToAddSize;
    UA_AddNodesItem *nodesToAdd;
} UA_AddNodesRequest;

#define UA_TYPES_ADDNODESREQUEST 224

/**
 * BrowseRequest
 * ^^^^^^^^^^^^^
 * Browse the references for one or more nodes from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ViewDescription view;
    UA_UInt32 requestedMaxReferencesPerNode;
    size_t nodesToBrowseSize;
    UA_BrowseDescription *nodesToBrowse;
} UA_BrowseRequest;

#define UA_TYPES_BROWSEREQUEST 225

/**
 * WriteRequest
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToWriteSize;
    UA_WriteValue *nodesToWrite;
} UA_WriteRequest;

#define UA_TYPES_WRITEREQUEST 226

/**
 * AddNodesResponse
 * ^^^^^^^^^^^^^^^^
 * Adds one or more nodes to the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_AddNodesResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_AddNodesResponse;

#define UA_TYPES_ADDNODESRESPONSE 227

/**
 * RegisterServer2Request
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_RegisteredServer server;
    size_t discoveryConfigurationSize;
    UA_ExtensionObject *discoveryConfiguration;
} UA_RegisterServer2Request;

#define UA_TYPES_REGISTERSERVER2REQUEST 228

/**
 * AttributeOperand
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_String alias;
    UA_RelativePath browsePath;
    UA_UInt32 attributeId;
    UA_String indexRange;
} UA_AttributeOperand;

#define UA_TYPES_ATTRIBUTEOPERAND 229

/**
 * DataChangeFilter
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DataChangeTrigger trigger;
    UA_UInt32 deadbandType;
    UA_Double deadbandValue;
} UA_DataChangeFilter;

#define UA_TYPES_DATACHANGEFILTER 230

/**
 * EndpointDescription
 * ^^^^^^^^^^^^^^^^^^^
 * The description of a endpoint that can be used to access a server. */
typedef struct {
    UA_String endpointUrl;
    UA_ApplicationDescription server;
    UA_ByteString serverCertificate;
    UA_MessageSecurityMode securityMode;
    UA_String securityPolicyUri;
    size_t userIdentityTokensSize;
    UA_UserTokenPolicy *userIdentityTokens;
    UA_String transportProfileUri;
    UA_Byte securityLevel;
} UA_EndpointDescription;

#define UA_TYPES_ENDPOINTDESCRIPTION 231

/**
 * DeleteReferencesRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * Delete one or more references from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t referencesToDeleteSize;
    UA_DeleteReferencesItem *referencesToDelete;
} UA_DeleteReferencesRequest;

#define UA_TYPES_DELETEREFERENCESREQUEST 232

/**
 * HistoryEvent
 * ^^^^^^^^^^^^
 */
typedef struct {
    size_t eventsSize;
    UA_HistoryEventFieldList *events;
} UA_HistoryEvent;

#define UA_TYPES_HISTORYEVENT 233

/**
 * JsonWriterGroupMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonNetworkMessageContentMask networkMessageContentMask;
} UA_JsonWriterGroupMessageDataType;

#define UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE 234

/**
 * TranslateBrowsePathsToNodeIdsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Translates one or more paths in the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t browsePathsSize;
    UA_BrowsePath *browsePaths;
} UA_TranslateBrowsePathsToNodeIdsRequest;

#define UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST 235

/**
 * JsonDataSetReaderMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonNetworkMessageContentMask networkMessageContentMask;
    UA_JsonDataSetMessageContentMask dataSetMessageContentMask;
} UA_JsonDataSetReaderMessageDataType;

#define UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE 236

/**
 * FindServersResponse
 * ^^^^^^^^^^^^^^^^^^^
 * Finds the servers known to the discovery server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t serversSize;
    UA_ApplicationDescription *servers;
} UA_FindServersResponse;

#define UA_TYPES_FINDSERVERSRESPONSE 237

/**
 * CreateSessionRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Creates a new session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ApplicationDescription clientDescription;
    UA_String serverUri;
    UA_String endpointUrl;
    UA_String sessionName;
    UA_ByteString clientNonce;
    UA_ByteString clientCertificate;
    UA_Double requestedSessionTimeout;
    UA_UInt32 maxResponseMessageSize;
} UA_CreateSessionRequest;

#define UA_TYPES_CREATESESSIONREQUEST 238

/**
 * ContentFilterElement
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_FilterOperator filterOperator;
    size_t filterOperandsSize;
    UA_ExtensionObject *filterOperands;
} UA_ContentFilterElement;

#define UA_TYPES_CONTENTFILTERELEMENT 239

/**
 * UadpWriterGroupMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 groupVersion;
    UA_DataSetOrderingType dataSetOrdering;
    UA_UadpNetworkMessageContentMask networkMessageContentMask;
    UA_Double samplingOffset;
    size_t publishingOffsetSize;
    UA_Double *publishingOffset;
} UA_UadpWriterGroupMessageDataType;

#define UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE 240

/**
 * RegisterServerRequest
 * ^^^^^^^^^^^^^^^^^^^^^
 * Registers a server with the discovery server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_RegisteredServer server;
} UA_RegisterServerRequest;

#define UA_TYPES_REGISTERSERVERREQUEST 241






















/**
 * TranslateBrowsePathsToNodeIdsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Translates one or more paths in the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowsePathResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_TranslateBrowsePathsToNodeIdsResponse;

#define UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE 242

/**
 * BrowseResponse
 * ^^^^^^^^^^^^^^
 * Browse the references for one or more nodes from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowseResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_BrowseResponse;

#define UA_TYPES_BROWSERESPONSE 243

/**
 * CreateSessionResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Creates a new session with the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_NodeId sessionId;
    UA_NodeId authenticationToken;
    UA_Double revisedSessionTimeout;
    UA_ByteString serverNonce;
    UA_ByteString serverCertificate;
    size_t serverEndpointsSize;
    UA_EndpointDescription *serverEndpoints;
    size_t serverSoftwareCertificatesSize;
    UA_SignedSoftwareCertificate *serverSoftwareCertificates;
    UA_SignatureData serverSignature;
    UA_UInt32 maxRequestMessageSize;
} UA_CreateSessionResponse;

#define UA_TYPES_CREATESESSIONRESPONSE 244

/**
 * DataSetMetaDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t namespacesSize;







|












|










|













|











|













|















|












|










|











|













|












|

















|













|












|















|











|











|













|















|











|
















|










|














|











|














|









|












|




















|












|















|
>
>
>
>
>
>
>
>
>
>
>
>










|















|













|













|













|













|













|









|


















|













|














|














|










|















|












|












|











|















|














|












|













|














|


















|
















|











|













|


















|
















|











|











|













|











|













|












|













|











|

















|











|










|









|











|










|











|

















|











|














|










|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













|













|




















|







16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
    UA_FILTEROPERATOR_RELATEDTO = 15,
    UA_FILTEROPERATOR_BITWISEAND = 16,
    UA_FILTEROPERATOR_BITWISEOR = 17,
    __UA_FILTEROPERATOR_FORCE32BIT = 0x7fffffff
} UA_FilterOperator;
UA_STATIC_ASSERT(sizeof(UA_FilterOperator) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_FILTEROPERATOR 172

/**
 * AggregateFilter
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_NodeId aggregateType;
    UA_Double processingInterval;
    UA_AggregateConfiguration aggregateConfiguration;
} UA_AggregateFilter;

#define UA_TYPES_AGGREGATEFILTER 173

/**
 * RepublishResponse
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_NotificationMessage notificationMessage;
} UA_RepublishResponse;

#define UA_TYPES_REPUBLISHRESPONSE 174

/**
 * DeleteSubscriptionsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteSubscriptionsResponse;

#define UA_TYPES_DELETESUBSCRIPTIONSRESPONSE 175

/**
 * RegisterNodesRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Registers one or more nodes for repeated use within a session. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToRegisterSize;
    UA_NodeId *nodesToRegister;
} UA_RegisterNodesRequest;

#define UA_TYPES_REGISTERNODESREQUEST 176

/**
 * StructureDefinition
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId defaultEncodingId;
    UA_NodeId baseDataType;
    UA_StructureType structureType;
    size_t fieldsSize;
    UA_StructureField *fields;
} UA_StructureDefinition;

#define UA_TYPES_STRUCTUREDEFINITION 177

/**
 * MethodAttributes
 * ^^^^^^^^^^^^^^^^
 * The attributes for a method node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Boolean executable;
    UA_Boolean userExecutable;
} UA_MethodAttributes;

#define UA_TYPES_METHODATTRIBUTES 178

/**
 * UserNameIdentityToken
 * ^^^^^^^^^^^^^^^^^^^^^
 * A token representing a user identified by a user name and password. */
typedef struct {
    UA_String policyId;
    UA_String userName;
    UA_ByteString password;
    UA_String encryptionAlgorithm;
} UA_UserNameIdentityToken;

#define UA_TYPES_USERNAMEIDENTITYTOKEN 179

/**
 * TimeZoneDataType
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Int16 offset;
    UA_Boolean daylightSavingInOffset;
} UA_TimeZoneDataType;

#define UA_TYPES_TIMEZONEDATATYPE 180

/**
 * UnregisterNodesRequest
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Unregisters one or more previously registered nodes. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToUnregisterSize;
    UA_NodeId *nodesToUnregister;
} UA_UnregisterNodesRequest;

#define UA_TYPES_UNREGISTERNODESREQUEST 181

/**
 * DataSetOrderingType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_DATASETORDERINGTYPE_UNDEFINED = 0,
    UA_DATASETORDERINGTYPE_ASCENDINGWRITERID = 1,
    UA_DATASETORDERINGTYPE_ASCENDINGWRITERIDSINGLE = 2,
    __UA_DATASETORDERINGTYPE_FORCE32BIT = 0x7fffffff
} UA_DataSetOrderingType;
UA_STATIC_ASSERT(sizeof(UA_DataSetOrderingType) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_DATASETORDERINGTYPE 182

/**
 * OpenSecureChannelResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 * Creates a secure channel with a server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_UInt32 serverProtocolVersion;
    UA_ChannelSecurityToken securityToken;
    UA_ByteString serverNonce;
} UA_OpenSecureChannelResponse;

#define UA_TYPES_OPENSECURECHANNELRESPONSE 183

/**
 * SetTriggeringResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t addResultsSize;
    UA_StatusCode *addResults;
    size_t addDiagnosticInfosSize;
    UA_DiagnosticInfo *addDiagnosticInfos;
    size_t removeResultsSize;
    UA_StatusCode *removeResults;
    size_t removeDiagnosticInfosSize;
    UA_DiagnosticInfo *removeDiagnosticInfos;
} UA_SetTriggeringResponse;

#define UA_TYPES_SETTRIGGERINGRESPONSE 184

/**
 * SimpleAttributeOperand
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId typeDefinitionId;
    size_t browsePathSize;
    UA_QualifiedName *browsePath;
    UA_UInt32 attributeId;
    UA_String indexRange;
} UA_SimpleAttributeOperand;

#define UA_TYPES_SIMPLEATTRIBUTEOPERAND 185

/**
 * UadpDataSetWriterMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UadpDataSetMessageContentMask dataSetMessageContentMask;
    UA_UInt16 configuredSize;
    UA_UInt16 networkMessageNumber;
    UA_UInt16 dataSetOffset;
} UA_UadpDataSetWriterMessageDataType;

#define UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE 186

/**
 * JsonNetworkMessageContentMask
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef UA_UInt32 UA_JsonNetworkMessageContentMask;

#define UA_JSONNETWORKMESSAGECONTENTMASK_NONE 0
#define UA_JSONNETWORKMESSAGECONTENTMASK_NETWORKMESSAGEHEADER 1
#define UA_JSONNETWORKMESSAGECONTENTMASK_DATASETMESSAGEHEADER 2
#define UA_JSONNETWORKMESSAGECONTENTMASK_SINGLEDATASETMESSAGE 4
#define UA_JSONNETWORKMESSAGECONTENTMASK_PUBLISHERID 8
#define UA_JSONNETWORKMESSAGECONTENTMASK_DATASETCLASSID 16
#define UA_JSONNETWORKMESSAGECONTENTMASK_REPLYTO 32

#define UA_TYPES_JSONNETWORKMESSAGECONTENTMASK 187

/**
 * RepublishRequest
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_UInt32 retransmitSequenceNumber;
} UA_RepublishRequest;

#define UA_TYPES_REPUBLISHREQUEST 188

/**
 * RegisterNodesResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Registers one or more nodes for repeated use within a session. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t registeredNodeIdsSize;
    UA_NodeId *registeredNodeIds;
} UA_RegisterNodesResponse;

#define UA_TYPES_REGISTERNODESRESPONSE 189

/**
 * ModifyMonitoredItemsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_MonitoredItemModifyResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_ModifyMonitoredItemsResponse;

#define UA_TYPES_MODIFYMONITOREDITEMSRESPONSE 190

/**
 * FieldTargetDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_Guid dataSetFieldId;
    UA_String receiverIndexRange;
    UA_NodeId targetNodeId;
    UA_UInt32 attributeId;
    UA_String writeIndexRange;
    UA_OverrideValueHandling overrideValueHandling;
    UA_Variant overrideValue;
} UA_FieldTargetDataType;

#define UA_TYPES_FIELDTARGETDATATYPE 191

/**
 * DeleteSubscriptionsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t subscriptionIdsSize;
    UA_UInt32 *subscriptionIds;
} UA_DeleteSubscriptionsRequest;

#define UA_TYPES_DELETESUBSCRIPTIONSREQUEST 192

/**
 * RedundancySupport
 * ^^^^^^^^^^^^^^^^^
 */
typedef enum {
    UA_REDUNDANCYSUPPORT_NONE = 0,
    UA_REDUNDANCYSUPPORT_COLD = 1,
    UA_REDUNDANCYSUPPORT_WARM = 2,
    UA_REDUNDANCYSUPPORT_HOT = 3,
    UA_REDUNDANCYSUPPORT_TRANSPARENT = 4,
    UA_REDUNDANCYSUPPORT_HOTANDMIRRORED = 5,
    __UA_REDUNDANCYSUPPORT_FORCE32BIT = 0x7fffffff
} UA_RedundancySupport;
UA_STATIC_ASSERT(sizeof(UA_RedundancySupport) == sizeof(UA_Int32), enum_must_be_32bit);

#define UA_TYPES_REDUNDANCYSUPPORT 193

/**
 * BrowsePath
 * ^^^^^^^^^^
 * A request to translate a path into a node id. */
typedef struct {
    UA_NodeId startingNode;
    UA_RelativePath relativePath;
} UA_BrowsePath;

#define UA_TYPES_BROWSEPATH 194

/**
 * ObjectAttributes
 * ^^^^^^^^^^^^^^^^
 * The attributes for an object node. */
typedef struct {
    UA_UInt32 specifiedAttributes;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    UA_UInt32 userWriteMask;
    UA_Byte eventNotifier;
} UA_ObjectAttributes;

#define UA_TYPES_OBJECTATTRIBUTES 195

/**
 * PublishRequest
 * ^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t subscriptionAcknowledgementsSize;
    UA_SubscriptionAcknowledgement *subscriptionAcknowledgements;
} UA_PublishRequest;

#define UA_TYPES_PUBLISHREQUEST 196

/**
 * FindServersRequest
 * ^^^^^^^^^^^^^^^^^^
 * Finds the servers known to the discovery server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_String endpointUrl;
    size_t localeIdsSize;
    UA_String *localeIds;
    size_t serverUrisSize;
    UA_String *serverUris;
} UA_FindServersRequest;

#define UA_TYPES_FINDSERVERSREQUEST 197

/**
 * JsonDataSetWriterMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonDataSetMessageContentMask dataSetMessageContentMask;
} UA_JsonDataSetWriterMessageDataType;

#define UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE 198

/**
 * FindServersOnNetworkResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_DateTime lastCounterResetTime;
    size_t serversSize;
    UA_ServerOnNetwork *servers;
} UA_FindServersOnNetworkResponse;

#define UA_TYPES_FINDSERVERSONNETWORKRESPONSE 199

/**
 * FieldMetaData
 * ^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_LocalizedText description;
    UA_DataSetFieldFlags fieldFlags;
    UA_Byte builtInType;
    UA_NodeId dataType;
    UA_Int32 valueRank;
    size_t arrayDimensionsSize;
    UA_UInt32 *arrayDimensions;
    UA_UInt32 maxStringLength;
    UA_Guid dataSetFieldId;
    size_t propertiesSize;
    UA_KeyValuePair *properties;
} UA_FieldMetaData;

#define UA_TYPES_FIELDMETADATA 200

/**
 * UpdateDataDetails
 * ^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_PerformUpdateType performInsertReplace;
    size_t updateValuesSize;
    UA_DataValue *updateValues;
} UA_UpdateDataDetails;

#define UA_TYPES_UPDATEDATADETAILS 201

/**
 * ReferenceDescription
 * ^^^^^^^^^^^^^^^^^^^^
 * The description of a reference. */
typedef struct {
    UA_NodeId referenceTypeId;
    UA_Boolean isForward;
    UA_ExpandedNodeId nodeId;
    UA_QualifiedName browseName;
    UA_LocalizedText displayName;
    UA_NodeClass nodeClass;
    UA_ExpandedNodeId typeDefinition;
} UA_ReferenceDescription;

#define UA_TYPES_REFERENCEDESCRIPTION 202

/**
 * SubscribedDataSetMirrorDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String parentNodeName;
    size_t rolePermissionsSize;
    UA_RolePermissionType *rolePermissions;
} UA_SubscribedDataSetMirrorDataType;

#define UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE 203

/**
 * TargetVariablesDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t targetVariablesSize;
    UA_FieldTargetDataType *targetVariables;
} UA_TargetVariablesDataType;

#define UA_TYPES_TARGETVARIABLESDATATYPE 204

/**
 * CreateSubscriptionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Double requestedPublishingInterval;
    UA_UInt32 requestedLifetimeCount;
    UA_UInt32 requestedMaxKeepAliveCount;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Boolean publishingEnabled;
    UA_Byte priority;
} UA_CreateSubscriptionRequest;

#define UA_TYPES_CREATESUBSCRIPTIONREQUEST 205

/**
 * FindServersOnNetworkRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 startingRecordId;
    UA_UInt32 maxRecordsToReturn;
    size_t serverCapabilityFilterSize;
    UA_String *serverCapabilityFilter;
} UA_FindServersOnNetworkRequest;

#define UA_TYPES_FINDSERVERSONNETWORKREQUEST 206

/**
 * CallResponse
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_CallMethodResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_CallResponse;

#define UA_TYPES_CALLRESPONSE 207

/**
 * DeleteNodesResponse
 * ^^^^^^^^^^^^^^^^^^^
 * Delete one or more nodes from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_DeleteNodesResponse;

#define UA_TYPES_DELETENODESRESPONSE 208

/**
 * BrokerDataSetReaderTransportDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String queueName;
    UA_String resourceUri;
    UA_String authenticationProfileUri;
    UA_BrokerTransportQualityOfService requestedDeliveryGuarantee;
    UA_String metaDataQueueName;
} UA_BrokerDataSetReaderTransportDataType;

#define UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE 209

/**
 * ModifyMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_TimestampsToReturn timestampsToReturn;
    size_t itemsToModifySize;
    UA_MonitoredItemModifyRequest *itemsToModify;
} UA_ModifyMonitoredItemsRequest;

#define UA_TYPES_MODIFYMONITOREDITEMSREQUEST 210

/**
 * ServiceFault
 * ^^^^^^^^^^^^
 * The response returned by all services when there is a service level error. */
typedef struct {
    UA_ResponseHeader responseHeader;
} UA_ServiceFault;

#define UA_TYPES_SERVICEFAULT 211

/**
 * PublishResponse
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_UInt32 subscriptionId;
    size_t availableSequenceNumbersSize;
    UA_UInt32 *availableSequenceNumbers;
    UA_Boolean moreNotifications;
    UA_NotificationMessage notificationMessage;
    size_t resultsSize;
    UA_StatusCode *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_PublishResponse;

#define UA_TYPES_PUBLISHRESPONSE 212

/**
 * CreateMonitoredItemsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_TimestampsToReturn timestampsToReturn;
    size_t itemsToCreateSize;
    UA_MonitoredItemCreateRequest *itemsToCreate;
} UA_CreateMonitoredItemsRequest;

#define UA_TYPES_CREATEMONITOREDITEMSREQUEST 213

/**
 * ReadProcessedDetails
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_DateTime endTime;
    UA_Double processingInterval;
    size_t aggregateTypeSize;
    UA_NodeId *aggregateType;
    UA_AggregateConfiguration aggregateConfiguration;
} UA_ReadProcessedDetails;

#define UA_TYPES_READPROCESSEDDETAILS 214

/**
 * OpenSecureChannelRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 * Creates a secure channel with a server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 clientProtocolVersion;
    UA_SecurityTokenRequestType requestType;
    UA_MessageSecurityMode securityMode;
    UA_ByteString clientNonce;
    UA_UInt32 requestedLifetime;
} UA_OpenSecureChannelRequest;

#define UA_TYPES_OPENSECURECHANNELREQUEST 215

/**
 * CloseSessionRequest
 * ^^^^^^^^^^^^^^^^^^^
 * Closes a session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Boolean deleteSubscriptions;
} UA_CloseSessionRequest;

#define UA_TYPES_CLOSESESSIONREQUEST 216

/**
 * SetTriggeringRequest
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_UInt32 subscriptionId;
    UA_UInt32 triggeringItemId;
    size_t linksToAddSize;
    UA_UInt32 *linksToAdd;
    size_t linksToRemoveSize;
    UA_UInt32 *linksToRemove;
} UA_SetTriggeringRequest;

#define UA_TYPES_SETTRIGGERINGREQUEST 217

/**
 * EnumDescription
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_EnumDefinition enumDefinition;
    UA_Byte builtInType;
} UA_EnumDescription;

#define UA_TYPES_ENUMDESCRIPTION 218

/**
 * BrowseResult
 * ^^^^^^^^^^^^
 * The result of a browse operation. */
typedef struct {
    UA_StatusCode statusCode;
    UA_ByteString continuationPoint;
    size_t referencesSize;
    UA_ReferenceDescription *references;
} UA_BrowseResult;

#define UA_TYPES_BROWSERESULT 219

/**
 * AddReferencesRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Adds one or more references to the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t referencesToAddSize;
    UA_AddReferencesItem *referencesToAdd;
} UA_AddReferencesRequest;

#define UA_TYPES_ADDREFERENCESREQUEST 220

/**
 * AddNodesItem
 * ^^^^^^^^^^^^
 * A request to add a node to the server address space. */
typedef struct {
    UA_ExpandedNodeId parentNodeId;
    UA_NodeId referenceTypeId;
    UA_ExpandedNodeId requestedNewNodeId;
    UA_QualifiedName browseName;
    UA_NodeClass nodeClass;
    UA_ExtensionObject nodeAttributes;
    UA_ExpandedNodeId typeDefinition;
} UA_AddNodesItem;

#define UA_TYPES_ADDNODESITEM 221

/**
 * ServerStatusDataType
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DateTime startTime;
    UA_DateTime currentTime;
    UA_ServerState state;
    UA_BuildInfo buildInfo;
    UA_UInt32 secondsTillShutdown;
    UA_LocalizedText shutdownReason;
} UA_ServerStatusDataType;

#define UA_TYPES_SERVERSTATUSDATATYPE 222

/**
 * HistoryModifiedData
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t dataValuesSize;
    UA_DataValue *dataValues;
    size_t modificationInfosSize;
    UA_ModificationInfo *modificationInfos;
} UA_HistoryModifiedData;

#define UA_TYPES_HISTORYMODIFIEDDATA 223

/**
 * BrowseNextResponse
 * ^^^^^^^^^^^^^^^^^^
 * Continues one or more browse operations. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowseResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_BrowseNextResponse;

#define UA_TYPES_BROWSENEXTRESPONSE 224

/**
 * AxisInformation
 * ^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_EUInformation engineeringUnits;
    UA_Range eURange;
    UA_LocalizedText title;
    UA_AxisScaleEnumeration axisScaleType;
    size_t axisStepsSize;
    UA_Double *axisSteps;
} UA_AxisInformation;

#define UA_TYPES_AXISINFORMATION 225

/**
 * RegisteredServer
 * ^^^^^^^^^^^^^^^^
 * The information required to register a server with a discovery server. */
typedef struct {
    UA_String serverUri;
    UA_String productUri;
    size_t serverNamesSize;
    UA_LocalizedText *serverNames;
    UA_ApplicationType serverType;
    UA_String gatewayServerUri;
    size_t discoveryUrlsSize;
    UA_String *discoveryUrls;
    UA_String semaphoreFilePath;
    UA_Boolean isOnline;
} UA_RegisteredServer;

#define UA_TYPES_REGISTEREDSERVER 226

/**
 * ApplicationDescription
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Describes an application and how to find it. */
typedef struct {
    UA_String applicationUri;
    UA_String productUri;
    UA_LocalizedText applicationName;
    UA_ApplicationType applicationType;
    UA_String gatewayServerUri;
    UA_String discoveryProfileUri;
    size_t discoveryUrlsSize;
    UA_String *discoveryUrls;
} UA_ApplicationDescription;

#define UA_TYPES_APPLICATIONDESCRIPTION 227

/**
 * StructureDescription
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId dataTypeId;
    UA_QualifiedName name;
    UA_StructureDefinition structureDefinition;
} UA_StructureDescription;

#define UA_TYPES_STRUCTUREDESCRIPTION 228

/**
 * ReadRequest
 * ^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_Double maxAge;
    UA_TimestampsToReturn timestampsToReturn;
    size_t nodesToReadSize;
    UA_ReadValueId *nodesToRead;
} UA_ReadRequest;

#define UA_TYPES_READREQUEST 229

/**
 * DataSetWriterDataType
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_Boolean enabled;
    UA_UInt16 dataSetWriterId;
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_UInt32 keyFrameCount;
    UA_String dataSetName;
    size_t dataSetWriterPropertiesSize;
    UA_KeyValuePair *dataSetWriterProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
} UA_DataSetWriterDataType;

#define UA_TYPES_DATASETWRITERDATATYPE 230

/**
 * ActivateSessionRequest
 * ^^^^^^^^^^^^^^^^^^^^^^
 * Activates a session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_SignatureData clientSignature;
    size_t clientSoftwareCertificatesSize;
    UA_SignedSoftwareCertificate *clientSoftwareCertificates;
    size_t localeIdsSize;
    UA_String *localeIds;
    UA_ExtensionObject userIdentityToken;
    UA_SignatureData userTokenSignature;
} UA_ActivateSessionRequest;

#define UA_TYPES_ACTIVATESESSIONREQUEST 231

/**
 * BrowsePathResult
 * ^^^^^^^^^^^^^^^^
 * The result of a translate opearation. */
typedef struct {
    UA_StatusCode statusCode;
    size_t targetsSize;
    UA_BrowsePathTarget *targets;
} UA_BrowsePathResult;

#define UA_TYPES_BROWSEPATHRESULT 232

/**
 * AddNodesRequest
 * ^^^^^^^^^^^^^^^
 * Adds one or more nodes to the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToAddSize;
    UA_AddNodesItem *nodesToAdd;
} UA_AddNodesRequest;

#define UA_TYPES_ADDNODESREQUEST 233

/**
 * BrowseRequest
 * ^^^^^^^^^^^^^
 * Browse the references for one or more nodes from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ViewDescription view;
    UA_UInt32 requestedMaxReferencesPerNode;
    size_t nodesToBrowseSize;
    UA_BrowseDescription *nodesToBrowse;
} UA_BrowseRequest;

#define UA_TYPES_BROWSEREQUEST 234

/**
 * WriteRequest
 * ^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t nodesToWriteSize;
    UA_WriteValue *nodesToWrite;
} UA_WriteRequest;

#define UA_TYPES_WRITEREQUEST 235

/**
 * AddNodesResponse
 * ^^^^^^^^^^^^^^^^
 * Adds one or more nodes to the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_AddNodesResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_AddNodesResponse;

#define UA_TYPES_ADDNODESRESPONSE 236

/**
 * RegisterServer2Request
 * ^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_RegisteredServer server;
    size_t discoveryConfigurationSize;
    UA_ExtensionObject *discoveryConfiguration;
} UA_RegisterServer2Request;

#define UA_TYPES_REGISTERSERVER2REQUEST 237

/**
 * AttributeOperand
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId nodeId;
    UA_String alias;
    UA_RelativePath browsePath;
    UA_UInt32 attributeId;
    UA_String indexRange;
} UA_AttributeOperand;

#define UA_TYPES_ATTRIBUTEOPERAND 238

/**
 * DataChangeFilter
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_DataChangeTrigger trigger;
    UA_UInt32 deadbandType;
    UA_Double deadbandValue;
} UA_DataChangeFilter;

#define UA_TYPES_DATACHANGEFILTER 239

/**
 * EndpointDescription
 * ^^^^^^^^^^^^^^^^^^^
 * The description of a endpoint that can be used to access a server. */
typedef struct {
    UA_String endpointUrl;
    UA_ApplicationDescription server;
    UA_ByteString serverCertificate;
    UA_MessageSecurityMode securityMode;
    UA_String securityPolicyUri;
    size_t userIdentityTokensSize;
    UA_UserTokenPolicy *userIdentityTokens;
    UA_String transportProfileUri;
    UA_Byte securityLevel;
} UA_EndpointDescription;

#define UA_TYPES_ENDPOINTDESCRIPTION 240

/**
 * DeleteReferencesRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^
 * Delete one or more references from the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t referencesToDeleteSize;
    UA_DeleteReferencesItem *referencesToDelete;
} UA_DeleteReferencesRequest;

#define UA_TYPES_DELETEREFERENCESREQUEST 241

/**
 * HistoryEvent
 * ^^^^^^^^^^^^
 */
typedef struct {
    size_t eventsSize;
    UA_HistoryEventFieldList *events;
} UA_HistoryEvent;

#define UA_TYPES_HISTORYEVENT 242

/**
 * JsonWriterGroupMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonNetworkMessageContentMask networkMessageContentMask;
} UA_JsonWriterGroupMessageDataType;

#define UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE 243

/**
 * TranslateBrowsePathsToNodeIdsRequest
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Translates one or more paths in the server address space. */
typedef struct {
    UA_RequestHeader requestHeader;
    size_t browsePathsSize;
    UA_BrowsePath *browsePaths;
} UA_TranslateBrowsePathsToNodeIdsRequest;

#define UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST 244

/**
 * JsonDataSetReaderMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_JsonNetworkMessageContentMask networkMessageContentMask;
    UA_JsonDataSetMessageContentMask dataSetMessageContentMask;
} UA_JsonDataSetReaderMessageDataType;

#define UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE 245

/**
 * FindServersResponse
 * ^^^^^^^^^^^^^^^^^^^
 * Finds the servers known to the discovery server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t serversSize;
    UA_ApplicationDescription *servers;
} UA_FindServersResponse;

#define UA_TYPES_FINDSERVERSRESPONSE 246

/**
 * CreateSessionRequest
 * ^^^^^^^^^^^^^^^^^^^^
 * Creates a new session with the server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_ApplicationDescription clientDescription;
    UA_String serverUri;
    UA_String endpointUrl;
    UA_String sessionName;
    UA_ByteString clientNonce;
    UA_ByteString clientCertificate;
    UA_Double requestedSessionTimeout;
    UA_UInt32 maxResponseMessageSize;
} UA_CreateSessionRequest;

#define UA_TYPES_CREATESESSIONREQUEST 247

/**
 * ContentFilterElement
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_FilterOperator filterOperator;
    size_t filterOperandsSize;
    UA_ExtensionObject *filterOperands;
} UA_ContentFilterElement;

#define UA_TYPES_CONTENTFILTERELEMENT 248

/**
 * UadpWriterGroupMessageDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 groupVersion;
    UA_DataSetOrderingType dataSetOrdering;
    UA_UadpNetworkMessageContentMask networkMessageContentMask;
    UA_Double samplingOffset;
    size_t publishingOffsetSize;
    UA_Double *publishingOffset;
} UA_UadpWriterGroupMessageDataType;

#define UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE 249

/**
 * RegisterServerRequest
 * ^^^^^^^^^^^^^^^^^^^^^
 * Registers a server with the discovery server. */
typedef struct {
    UA_RequestHeader requestHeader;
    UA_RegisteredServer server;
} UA_RegisterServerRequest;

#define UA_TYPES_REGISTERSERVERREQUEST 250

/**
 * UABinaryFileDataType
 * ^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t namespacesSize;
    UA_String *namespaces;
    size_t structureDataTypesSize;
    UA_StructureDescription *structureDataTypes;
    size_t enumDataTypesSize;
    UA_EnumDescription *enumDataTypes;
    size_t simpleDataTypesSize;
    UA_SimpleTypeDescription *simpleDataTypes;
    UA_String schemaLocation;
    size_t fileHeaderSize;
    UA_KeyValuePair *fileHeader;
    UA_Variant body;
} UA_UABinaryFileDataType;

#define UA_TYPES_UABINARYFILEDATATYPE 251

/**
 * TranslateBrowsePathsToNodeIdsResponse
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * Translates one or more paths in the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowsePathResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_TranslateBrowsePathsToNodeIdsResponse;

#define UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE 252

/**
 * BrowseResponse
 * ^^^^^^^^^^^^^^
 * Browse the references for one or more nodes from the server address space. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t resultsSize;
    UA_BrowseResult *results;
    size_t diagnosticInfosSize;
    UA_DiagnosticInfo *diagnosticInfos;
} UA_BrowseResponse;

#define UA_TYPES_BROWSERESPONSE 253

/**
 * CreateSessionResponse
 * ^^^^^^^^^^^^^^^^^^^^^
 * Creates a new session with the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    UA_NodeId sessionId;
    UA_NodeId authenticationToken;
    UA_Double revisedSessionTimeout;
    UA_ByteString serverNonce;
    UA_ByteString serverCertificate;
    size_t serverEndpointsSize;
    UA_EndpointDescription *serverEndpoints;
    size_t serverSoftwareCertificatesSize;
    UA_SignedSoftwareCertificate *serverSoftwareCertificates;
    UA_SignatureData serverSignature;
    UA_UInt32 maxRequestMessageSize;
} UA_CreateSessionResponse;

#define UA_TYPES_CREATESESSIONRESPONSE 254

/**
 * DataSetMetaDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t namespacesSize;
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
    UA_LocalizedText description;
    size_t fieldsSize;
    UA_FieldMetaData *fields;
    UA_Guid dataSetClassId;
    UA_ConfigurationVersionDataType configurationVersion;
} UA_DataSetMetaDataType;

#define UA_TYPES_DATASETMETADATATYPE 245

/**
 * ContentFilter
 * ^^^^^^^^^^^^^
 */
typedef struct {
    size_t elementsSize;
    UA_ContentFilterElement *elements;
} UA_ContentFilter;

#define UA_TYPES_CONTENTFILTER 246

/**
 * WriterGroupDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;







|










|







17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
    UA_LocalizedText description;
    size_t fieldsSize;
    UA_FieldMetaData *fields;
    UA_Guid dataSetClassId;
    UA_ConfigurationVersionDataType configurationVersion;
} UA_DataSetMetaDataType;

#define UA_TYPES_DATASETMETADATATYPE 255

/**
 * ContentFilter
 * ^^^^^^^^^^^^^
 */
typedef struct {
    size_t elementsSize;
    UA_ContentFilterElement *elements;
} UA_ContentFilter;

#define UA_TYPES_CONTENTFILTER 256

/**
 * WriterGroupDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381













17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
    UA_String headerLayoutUri;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t dataSetWritersSize;
    UA_DataSetWriterDataType *dataSetWriters;
} UA_WriterGroupDataType;

#define UA_TYPES_WRITERGROUPDATATYPE 247

/**
 * GetEndpointsResponse
 * ^^^^^^^^^^^^^^^^^^^^
 * Gets the endpoints used by the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t endpointsSize;
    UA_EndpointDescription *endpoints;
} UA_GetEndpointsResponse;

#define UA_TYPES_GETENDPOINTSRESPONSE 248














/**
 * EventFilter
 * ^^^^^^^^^^^
 */
typedef struct {
    size_t selectClausesSize;
    UA_SimpleAttributeOperand *selectClauses;
    UA_ContentFilter whereClause;
} UA_EventFilter;

#define UA_TYPES_EVENTFILTER 249

/**
 * DataSetReaderDataType
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;







|











|
>
>
>
>
>
>
>
>
>
>
>
>
>











|







17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
    UA_String headerLayoutUri;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t dataSetWritersSize;
    UA_DataSetWriterDataType *dataSetWriters;
} UA_WriterGroupDataType;

#define UA_TYPES_WRITERGROUPDATATYPE 257

/**
 * GetEndpointsResponse
 * ^^^^^^^^^^^^^^^^^^^^
 * Gets the endpoints used by the server. */
typedef struct {
    UA_ResponseHeader responseHeader;
    size_t endpointsSize;
    UA_EndpointDescription *endpoints;
} UA_GetEndpointsResponse;

#define UA_TYPES_GETENDPOINTSRESPONSE 258

/**
 * PublishedEventsDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_NodeId eventNotifier;
    size_t selectedFieldsSize;
    UA_SimpleAttributeOperand *selectedFields;
    UA_ContentFilter filter;
} UA_PublishedEventsDataType;

#define UA_TYPES_PUBLISHEDEVENTSDATATYPE 259

/**
 * EventFilter
 * ^^^^^^^^^^^
 */
typedef struct {
    size_t selectClausesSize;
    UA_SimpleAttributeOperand *selectClauses;
    UA_ContentFilter whereClause;
} UA_EventFilter;

#define UA_TYPES_EVENTFILTER 260

/**
 * DataSetReaderDataType
 * ^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
17414
17415
17416
17417
17418
17419
17420
17421
















17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
    size_t dataSetReaderPropertiesSize;
    UA_KeyValuePair *dataSetReaderProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    UA_ExtensionObject subscribedDataSet;
} UA_DataSetReaderDataType;

#define UA_TYPES_DATASETREADERDATATYPE 250

















/**
 * ReadEventDetails
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 numValuesPerNode;
    UA_DateTime startTime;
    UA_DateTime endTime;
    UA_EventFilter filter;
} UA_ReadEventDetails;

#define UA_TYPES_READEVENTDETAILS 251

/**
 * ReaderGroupDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












|







17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
    size_t dataSetReaderPropertiesSize;
    UA_KeyValuePair *dataSetReaderProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    UA_ExtensionObject subscribedDataSet;
} UA_DataSetReaderDataType;

#define UA_TYPES_DATASETREADERDATATYPE 261

/**
 * PublishedDataSetDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    size_t dataSetFolderSize;
    UA_String *dataSetFolder;
    UA_DataSetMetaDataType dataSetMetaData;
    size_t extensionFieldsSize;
    UA_KeyValuePair *extensionFields;
    UA_ExtensionObject dataSetSource;
} UA_PublishedDataSetDataType;

#define UA_TYPES_PUBLISHEDDATASETDATATYPE 262

/**
 * ReadEventDetails
 * ^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_UInt32 numValuesPerNode;
    UA_DateTime startTime;
    UA_DateTime endTime;
    UA_EventFilter filter;
} UA_ReadEventDetails;

#define UA_TYPES_READEVENTDETAILS 263

/**
 * ReaderGroupDataType
 * ^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477














17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
    UA_KeyValuePair *groupProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t dataSetReadersSize;
    UA_DataSetReaderDataType *dataSetReaders;
} UA_ReaderGroupDataType;

#define UA_TYPES_READERGROUPDATATYPE 252

/**
 * PubSubConnectionDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_Boolean enabled;
    UA_Variant publisherId;
    UA_String transportProfileUri;
    UA_ExtensionObject address;
    size_t connectionPropertiesSize;
    UA_KeyValuePair *connectionProperties;
    UA_ExtensionObject transportSettings;
    size_t writerGroupsSize;
    UA_WriterGroupDataType *writerGroups;
    size_t readerGroupsSize;
    UA_ReaderGroupDataType *readerGroups;
} UA_PubSubConnectionDataType;

#define UA_TYPES_PUBSUBCONNECTIONDATATYPE 253
















_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/build/src_generated/open62541/types_generated_handling.h" ***********************************/

/* Generated from Opc.Ua.Types.bsd with script /open62541/tools/generate_datatypes.py
 * on host leguan by user chw at 2020-12-27 03:27:14 */



_UA_BEGIN_DECLS

#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
# pragma GCC diagnostic push







|




















|
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|







17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
    UA_KeyValuePair *groupProperties;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t dataSetReadersSize;
    UA_DataSetReaderDataType *dataSetReaders;
} UA_ReaderGroupDataType;

#define UA_TYPES_READERGROUPDATATYPE 264

/**
 * PubSubConnectionDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    UA_String name;
    UA_Boolean enabled;
    UA_Variant publisherId;
    UA_String transportProfileUri;
    UA_ExtensionObject address;
    size_t connectionPropertiesSize;
    UA_KeyValuePair *connectionProperties;
    UA_ExtensionObject transportSettings;
    size_t writerGroupsSize;
    UA_WriterGroupDataType *writerGroups;
    size_t readerGroupsSize;
    UA_ReaderGroupDataType *readerGroups;
} UA_PubSubConnectionDataType;

#define UA_TYPES_PUBSUBCONNECTIONDATATYPE 265

/**
 * PubSubConfigurationDataType
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 */
typedef struct {
    size_t publishedDataSetsSize;
    UA_PublishedDataSetDataType *publishedDataSets;
    size_t connectionsSize;
    UA_PubSubConnectionDataType *connections;
    UA_Boolean enabled;
} UA_PubSubConfigurationDataType;

#define UA_TYPES_PUBSUBCONFIGURATIONDATATYPE 266


_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/build/src_generated/open62541/types_generated_handling.h" ***********************************/

/* Generated from Opc.Ua.Types.bsd with script /open62541/tools/generate_datatypes.py
 * on host leguan by user chw at 2021-02-20 08:26:44 */



_UA_BEGIN_DECLS

#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
# pragma GCC diagnostic push
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
}

static UA_INLINE UA_StatusCode
UA_Boolean_copy(const UA_Boolean *src, UA_Boolean *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BOOLEAN]);
}

static UA_INLINE void
UA_Boolean_deleteMembers(UA_Boolean *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BOOLEAN]);
}

static UA_INLINE void
UA_Boolean_clear(UA_Boolean *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BOOLEAN]);







|







17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
}

static UA_INLINE UA_StatusCode
UA_Boolean_copy(const UA_Boolean *src, UA_Boolean *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BOOLEAN]);
}

UA_DEPRECATED static UA_INLINE void
UA_Boolean_deleteMembers(UA_Boolean *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BOOLEAN]);
}

static UA_INLINE void
UA_Boolean_clear(UA_Boolean *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BOOLEAN]);
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
}

static UA_INLINE UA_StatusCode
UA_SByte_copy(const UA_SByte *src, UA_SByte *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SBYTE]);
}

static UA_INLINE void
UA_SByte_deleteMembers(UA_SByte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SBYTE]);
}

static UA_INLINE void
UA_SByte_clear(UA_SByte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SBYTE]);







|







17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
}

static UA_INLINE UA_StatusCode
UA_SByte_copy(const UA_SByte *src, UA_SByte *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SBYTE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SByte_deleteMembers(UA_SByte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SBYTE]);
}

static UA_INLINE void
UA_SByte_clear(UA_SByte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SBYTE]);
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
}

static UA_INLINE UA_StatusCode
UA_Byte_copy(const UA_Byte *src, UA_Byte *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BYTE]);
}

static UA_INLINE void
UA_Byte_deleteMembers(UA_Byte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTE]);
}

static UA_INLINE void
UA_Byte_clear(UA_Byte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTE]);







|







17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
}

static UA_INLINE UA_StatusCode
UA_Byte_copy(const UA_Byte *src, UA_Byte *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BYTE]);
}

UA_DEPRECATED static UA_INLINE void
UA_Byte_deleteMembers(UA_Byte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTE]);
}

static UA_INLINE void
UA_Byte_clear(UA_Byte *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTE]);
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
}

static UA_INLINE UA_StatusCode
UA_Int16_copy(const UA_Int16 *src, UA_Int16 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT16]);
}

static UA_INLINE void
UA_Int16_deleteMembers(UA_Int16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT16]);
}

static UA_INLINE void
UA_Int16_clear(UA_Int16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT16]);







|







17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
}

static UA_INLINE UA_StatusCode
UA_Int16_copy(const UA_Int16 *src, UA_Int16 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT16]);
}

UA_DEPRECATED static UA_INLINE void
UA_Int16_deleteMembers(UA_Int16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT16]);
}

static UA_INLINE void
UA_Int16_clear(UA_Int16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT16]);
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
}

static UA_INLINE UA_StatusCode
UA_UInt16_copy(const UA_UInt16 *src, UA_UInt16 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT16]);
}

static UA_INLINE void
UA_UInt16_deleteMembers(UA_UInt16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT16]);
}

static UA_INLINE void
UA_UInt16_clear(UA_UInt16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT16]);







|







17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
}

static UA_INLINE UA_StatusCode
UA_UInt16_copy(const UA_UInt16 *src, UA_UInt16 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT16]);
}

UA_DEPRECATED static UA_INLINE void
UA_UInt16_deleteMembers(UA_UInt16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT16]);
}

static UA_INLINE void
UA_UInt16_clear(UA_UInt16 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT16]);
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
}

static UA_INLINE UA_StatusCode
UA_Int32_copy(const UA_Int32 *src, UA_Int32 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT32]);
}

static UA_INLINE void
UA_Int32_deleteMembers(UA_Int32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT32]);
}

static UA_INLINE void
UA_Int32_clear(UA_Int32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT32]);







|







17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
}

static UA_INLINE UA_StatusCode
UA_Int32_copy(const UA_Int32 *src, UA_Int32 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT32]);
}

UA_DEPRECATED static UA_INLINE void
UA_Int32_deleteMembers(UA_Int32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT32]);
}

static UA_INLINE void
UA_Int32_clear(UA_Int32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT32]);
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
}

static UA_INLINE UA_StatusCode
UA_UInt32_copy(const UA_UInt32 *src, UA_UInt32 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT32]);
}

static UA_INLINE void
UA_UInt32_deleteMembers(UA_UInt32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT32]);
}

static UA_INLINE void
UA_UInt32_clear(UA_UInt32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT32]);







|







17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
}

static UA_INLINE UA_StatusCode
UA_UInt32_copy(const UA_UInt32 *src, UA_UInt32 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT32]);
}

UA_DEPRECATED static UA_INLINE void
UA_UInt32_deleteMembers(UA_UInt32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT32]);
}

static UA_INLINE void
UA_UInt32_clear(UA_UInt32 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT32]);
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
}

static UA_INLINE UA_StatusCode
UA_Int64_copy(const UA_Int64 *src, UA_Int64 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT64]);
}

static UA_INLINE void
UA_Int64_deleteMembers(UA_Int64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT64]);
}

static UA_INLINE void
UA_Int64_clear(UA_Int64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT64]);







|







17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
}

static UA_INLINE UA_StatusCode
UA_Int64_copy(const UA_Int64 *src, UA_Int64 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_INT64]);
}

UA_DEPRECATED static UA_INLINE void
UA_Int64_deleteMembers(UA_Int64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT64]);
}

static UA_INLINE void
UA_Int64_clear(UA_Int64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_INT64]);
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
}

static UA_INLINE UA_StatusCode
UA_UInt64_copy(const UA_UInt64 *src, UA_UInt64 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT64]);
}

static UA_INLINE void
UA_UInt64_deleteMembers(UA_UInt64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT64]);
}

static UA_INLINE void
UA_UInt64_clear(UA_UInt64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT64]);







|







18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
}

static UA_INLINE UA_StatusCode
UA_UInt64_copy(const UA_UInt64 *src, UA_UInt64 *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UINT64]);
}

UA_DEPRECATED static UA_INLINE void
UA_UInt64_deleteMembers(UA_UInt64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT64]);
}

static UA_INLINE void
UA_UInt64_clear(UA_UInt64 *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UINT64]);
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
}

static UA_INLINE UA_StatusCode
UA_Float_copy(const UA_Float *src, UA_Float *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FLOAT]);
}

static UA_INLINE void
UA_Float_deleteMembers(UA_Float *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FLOAT]);
}

static UA_INLINE void
UA_Float_clear(UA_Float *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FLOAT]);







|







18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
}

static UA_INLINE UA_StatusCode
UA_Float_copy(const UA_Float *src, UA_Float *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FLOAT]);
}

UA_DEPRECATED static UA_INLINE void
UA_Float_deleteMembers(UA_Float *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FLOAT]);
}

static UA_INLINE void
UA_Float_clear(UA_Float *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FLOAT]);
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
}

static UA_INLINE UA_StatusCode
UA_Double_copy(const UA_Double *src, UA_Double *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DOUBLE]);
}

static UA_INLINE void
UA_Double_deleteMembers(UA_Double *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLE]);
}

static UA_INLINE void
UA_Double_clear(UA_Double *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLE]);







|







18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
}

static UA_INLINE UA_StatusCode
UA_Double_copy(const UA_Double *src, UA_Double *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DOUBLE]);
}

UA_DEPRECATED static UA_INLINE void
UA_Double_deleteMembers(UA_Double *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLE]);
}

static UA_INLINE void
UA_Double_clear(UA_Double *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLE]);
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
}

static UA_INLINE UA_StatusCode
UA_String_copy(const UA_String *src, UA_String *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRING]);
}

static UA_INLINE void
UA_String_deleteMembers(UA_String *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRING]);
}

static UA_INLINE void
UA_String_clear(UA_String *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRING]);







|







18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
}

static UA_INLINE UA_StatusCode
UA_String_copy(const UA_String *src, UA_String *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRING]);
}

UA_DEPRECATED static UA_INLINE void
UA_String_deleteMembers(UA_String *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRING]);
}

static UA_INLINE void
UA_String_clear(UA_String *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRING]);
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
}

static UA_INLINE UA_StatusCode
UA_DateTime_copy(const UA_DateTime *src, UA_DateTime *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATETIME]);
}

static UA_INLINE void
UA_DateTime_deleteMembers(UA_DateTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATETIME]);
}

static UA_INLINE void
UA_DateTime_clear(UA_DateTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATETIME]);







|







18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
}

static UA_INLINE UA_StatusCode
UA_DateTime_copy(const UA_DateTime *src, UA_DateTime *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATETIME]);
}

UA_DEPRECATED static UA_INLINE void
UA_DateTime_deleteMembers(UA_DateTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATETIME]);
}

static UA_INLINE void
UA_DateTime_clear(UA_DateTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATETIME]);
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
}

static UA_INLINE UA_StatusCode
UA_Guid_copy(const UA_Guid *src, UA_Guid *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GUID]);
}

static UA_INLINE void
UA_Guid_deleteMembers(UA_Guid *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GUID]);
}

static UA_INLINE void
UA_Guid_clear(UA_Guid *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GUID]);







|







18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
}

static UA_INLINE UA_StatusCode
UA_Guid_copy(const UA_Guid *src, UA_Guid *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GUID]);
}

UA_DEPRECATED static UA_INLINE void
UA_Guid_deleteMembers(UA_Guid *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GUID]);
}

static UA_INLINE void
UA_Guid_clear(UA_Guid *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GUID]);
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
}

static UA_INLINE UA_StatusCode
UA_ByteString_copy(const UA_ByteString *src, UA_ByteString *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BYTESTRING]);
}

static UA_INLINE void
UA_ByteString_deleteMembers(UA_ByteString *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTESTRING]);
}

static UA_INLINE void
UA_ByteString_clear(UA_ByteString *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTESTRING]);







|







18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
}

static UA_INLINE UA_StatusCode
UA_ByteString_copy(const UA_ByteString *src, UA_ByteString *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BYTESTRING]);
}

UA_DEPRECATED static UA_INLINE void
UA_ByteString_deleteMembers(UA_ByteString *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTESTRING]);
}

static UA_INLINE void
UA_ByteString_clear(UA_ByteString *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BYTESTRING]);
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
}

static UA_INLINE UA_StatusCode
UA_XmlElement_copy(const UA_XmlElement *src, UA_XmlElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_XMLELEMENT]);
}

static UA_INLINE void
UA_XmlElement_deleteMembers(UA_XmlElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XMLELEMENT]);
}

static UA_INLINE void
UA_XmlElement_clear(UA_XmlElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XMLELEMENT]);







|







18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
}

static UA_INLINE UA_StatusCode
UA_XmlElement_copy(const UA_XmlElement *src, UA_XmlElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_XMLELEMENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_XmlElement_deleteMembers(UA_XmlElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XMLELEMENT]);
}

static UA_INLINE void
UA_XmlElement_clear(UA_XmlElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XMLELEMENT]);
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
}

static UA_INLINE UA_StatusCode
UA_NodeId_copy(const UA_NodeId *src, UA_NodeId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEID]);
}

static UA_INLINE void
UA_NodeId_deleteMembers(UA_NodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEID]);
}

static UA_INLINE void
UA_NodeId_clear(UA_NodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEID]);







|







18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
}

static UA_INLINE UA_StatusCode
UA_NodeId_copy(const UA_NodeId *src, UA_NodeId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEID]);
}

UA_DEPRECATED static UA_INLINE void
UA_NodeId_deleteMembers(UA_NodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEID]);
}

static UA_INLINE void
UA_NodeId_clear(UA_NodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEID]);
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
}

static UA_INLINE UA_StatusCode
UA_ExpandedNodeId_copy(const UA_ExpandedNodeId *src, UA_ExpandedNodeId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);
}

static UA_INLINE void
UA_ExpandedNodeId_deleteMembers(UA_ExpandedNodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);
}

static UA_INLINE void
UA_ExpandedNodeId_clear(UA_ExpandedNodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);







|







18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
}

static UA_INLINE UA_StatusCode
UA_ExpandedNodeId_copy(const UA_ExpandedNodeId *src, UA_ExpandedNodeId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);
}

UA_DEPRECATED static UA_INLINE void
UA_ExpandedNodeId_deleteMembers(UA_ExpandedNodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);
}

static UA_INLINE void
UA_ExpandedNodeId_clear(UA_ExpandedNodeId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]);
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
}

static UA_INLINE UA_StatusCode
UA_StatusCode_copy(const UA_StatusCode *src, UA_StatusCode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STATUSCODE]);
}

static UA_INLINE void
UA_StatusCode_deleteMembers(UA_StatusCode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCODE]);
}

static UA_INLINE void
UA_StatusCode_clear(UA_StatusCode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCODE]);







|







18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
}

static UA_INLINE UA_StatusCode
UA_StatusCode_copy(const UA_StatusCode *src, UA_StatusCode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STATUSCODE]);
}

UA_DEPRECATED static UA_INLINE void
UA_StatusCode_deleteMembers(UA_StatusCode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCODE]);
}

static UA_INLINE void
UA_StatusCode_clear(UA_StatusCode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCODE]);
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
}

static UA_INLINE UA_StatusCode
UA_QualifiedName_copy(const UA_QualifiedName *src, UA_QualifiedName *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);
}

static UA_INLINE void
UA_QualifiedName_deleteMembers(UA_QualifiedName *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);
}

static UA_INLINE void
UA_QualifiedName_clear(UA_QualifiedName *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);







|







18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
}

static UA_INLINE UA_StatusCode
UA_QualifiedName_copy(const UA_QualifiedName *src, UA_QualifiedName *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);
}

UA_DEPRECATED static UA_INLINE void
UA_QualifiedName_deleteMembers(UA_QualifiedName *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);
}

static UA_INLINE void
UA_QualifiedName_clear(UA_QualifiedName *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]);
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
}

static UA_INLINE UA_StatusCode
UA_LocalizedText_copy(const UA_LocalizedText *src, UA_LocalizedText *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);
}

static UA_INLINE void
UA_LocalizedText_deleteMembers(UA_LocalizedText *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);
}

static UA_INLINE void
UA_LocalizedText_clear(UA_LocalizedText *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);







|







18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
}

static UA_INLINE UA_StatusCode
UA_LocalizedText_copy(const UA_LocalizedText *src, UA_LocalizedText *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);
}

UA_DEPRECATED static UA_INLINE void
UA_LocalizedText_deleteMembers(UA_LocalizedText *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);
}

static UA_INLINE void
UA_LocalizedText_clear(UA_LocalizedText *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]);
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
}

static UA_INLINE UA_StatusCode
UA_ExtensionObject_copy(const UA_ExtensionObject *src, UA_ExtensionObject *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
}

static UA_INLINE void
UA_ExtensionObject_deleteMembers(UA_ExtensionObject *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
}

static UA_INLINE void
UA_ExtensionObject_clear(UA_ExtensionObject *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);







|







18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
}

static UA_INLINE UA_StatusCode
UA_ExtensionObject_copy(const UA_ExtensionObject *src, UA_ExtensionObject *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
}

UA_DEPRECATED static UA_INLINE void
UA_ExtensionObject_deleteMembers(UA_ExtensionObject *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
}

static UA_INLINE void
UA_ExtensionObject_clear(UA_ExtensionObject *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
}

static UA_INLINE UA_StatusCode
UA_DataValue_copy(const UA_DataValue *src, UA_DataValue *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATAVALUE]);
}

static UA_INLINE void
UA_DataValue_deleteMembers(UA_DataValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAVALUE]);
}

static UA_INLINE void
UA_DataValue_clear(UA_DataValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAVALUE]);







|







18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
}

static UA_INLINE UA_StatusCode
UA_DataValue_copy(const UA_DataValue *src, UA_DataValue *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATAVALUE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataValue_deleteMembers(UA_DataValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAVALUE]);
}

static UA_INLINE void
UA_DataValue_clear(UA_DataValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAVALUE]);
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
}

static UA_INLINE UA_StatusCode
UA_Variant_copy(const UA_Variant *src, UA_Variant *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIANT]);
}

static UA_INLINE void
UA_Variant_deleteMembers(UA_Variant *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIANT]);
}

static UA_INLINE void
UA_Variant_clear(UA_Variant *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIANT]);







|







18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
}

static UA_INLINE UA_StatusCode
UA_Variant_copy(const UA_Variant *src, UA_Variant *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIANT]);
}

UA_DEPRECATED static UA_INLINE void
UA_Variant_deleteMembers(UA_Variant *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIANT]);
}

static UA_INLINE void
UA_Variant_clear(UA_Variant *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIANT]);
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
}

static UA_INLINE UA_StatusCode
UA_DiagnosticInfo_copy(const UA_DiagnosticInfo *src, UA_DiagnosticInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
}

static UA_INLINE void
UA_DiagnosticInfo_deleteMembers(UA_DiagnosticInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
}

static UA_INLINE void
UA_DiagnosticInfo_clear(UA_DiagnosticInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);







|







18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
}

static UA_INLINE UA_StatusCode
UA_DiagnosticInfo_copy(const UA_DiagnosticInfo *src, UA_DiagnosticInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
}

UA_DEPRECATED static UA_INLINE void
UA_DiagnosticInfo_deleteMembers(UA_DiagnosticInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
}

static UA_INLINE void
UA_DiagnosticInfo_clear(UA_DiagnosticInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
}

static UA_INLINE UA_StatusCode
UA_ViewAttributes_copy(const UA_ViewAttributes *src, UA_ViewAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);
}

static UA_INLINE void
UA_ViewAttributes_deleteMembers(UA_ViewAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);
}

static UA_INLINE void
UA_ViewAttributes_clear(UA_ViewAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);







|







18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
}

static UA_INLINE UA_StatusCode
UA_ViewAttributes_copy(const UA_ViewAttributes *src, UA_ViewAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_ViewAttributes_deleteMembers(UA_ViewAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);
}

static UA_INLINE void
UA_ViewAttributes_clear(UA_ViewAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]);
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
}

static UA_INLINE UA_StatusCode
UA_UadpNetworkMessageContentMask_copy(const UA_UadpNetworkMessageContentMask *src, UA_UadpNetworkMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpNetworkMessageContentMask_deleteMembers(UA_UadpNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpNetworkMessageContentMask_clear(UA_UadpNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);







|







18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
}

static UA_INLINE UA_StatusCode
UA_UadpNetworkMessageContentMask_copy(const UA_UadpNetworkMessageContentMask *src, UA_UadpNetworkMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_UadpNetworkMessageContentMask_deleteMembers(UA_UadpNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpNetworkMessageContentMask_clear(UA_UadpNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPNETWORKMESSAGECONTENTMASK]);
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
}

static UA_INLINE UA_StatusCode
UA_XVType_copy(const UA_XVType *src, UA_XVType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_XVTYPE]);
}

static UA_INLINE void
UA_XVType_deleteMembers(UA_XVType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XVTYPE]);
}

static UA_INLINE void
UA_XVType_clear(UA_XVType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XVTYPE]);







|







18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
}

static UA_INLINE UA_StatusCode
UA_XVType_copy(const UA_XVType *src, UA_XVType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_XVTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_XVType_deleteMembers(UA_XVType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XVTYPE]);
}

static UA_INLINE void
UA_XVType_clear(UA_XVType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_XVTYPE]);
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
}

static UA_INLINE UA_StatusCode
UA_ElementOperand_copy(const UA_ElementOperand *src, UA_ElementOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);
}

static UA_INLINE void
UA_ElementOperand_deleteMembers(UA_ElementOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);
}

static UA_INLINE void
UA_ElementOperand_clear(UA_ElementOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);







|







18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
}

static UA_INLINE UA_StatusCode
UA_ElementOperand_copy(const UA_ElementOperand *src, UA_ElementOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);
}

UA_DEPRECATED static UA_INLINE void
UA_ElementOperand_deleteMembers(UA_ElementOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);
}

static UA_INLINE void
UA_ElementOperand_clear(UA_ElementOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ELEMENTOPERAND]);
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
}

static UA_INLINE UA_StatusCode
UA_VariableAttributes_copy(const UA_VariableAttributes *src, UA_VariableAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableAttributes_deleteMembers(UA_VariableAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableAttributes_clear(UA_VariableAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);







|







18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
}

static UA_INLINE UA_StatusCode
UA_VariableAttributes_copy(const UA_VariableAttributes *src, UA_VariableAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_VariableAttributes_deleteMembers(UA_VariableAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableAttributes_clear(UA_VariableAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]);
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
}

static UA_INLINE UA_StatusCode
UA_EnumValueType_copy(const UA_EnumValueType *src, UA_EnumValueType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);
}

static UA_INLINE void
UA_EnumValueType_deleteMembers(UA_EnumValueType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);
}

static UA_INLINE void
UA_EnumValueType_clear(UA_EnumValueType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);







|







18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
}

static UA_INLINE UA_StatusCode
UA_EnumValueType_copy(const UA_EnumValueType *src, UA_EnumValueType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_EnumValueType_deleteMembers(UA_EnumValueType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);
}

static UA_INLINE void
UA_EnumValueType_clear(UA_EnumValueType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMVALUETYPE]);
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
}

static UA_INLINE UA_StatusCode
UA_BrokerConnectionTransportDataType_copy(const UA_BrokerConnectionTransportDataType *src, UA_BrokerConnectionTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerConnectionTransportDataType_deleteMembers(UA_BrokerConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerConnectionTransportDataType_clear(UA_BrokerConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);







|







18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
}

static UA_INLINE UA_StatusCode
UA_BrokerConnectionTransportDataType_copy(const UA_BrokerConnectionTransportDataType *src, UA_BrokerConnectionTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrokerConnectionTransportDataType_deleteMembers(UA_BrokerConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerConnectionTransportDataType_clear(UA_BrokerConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERCONNECTIONTRANSPORTDATATYPE]);
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
}

static UA_INLINE UA_StatusCode
UA_EventFieldList_copy(const UA_EventFieldList *src, UA_EventFieldList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);
}

static UA_INLINE void
UA_EventFieldList_deleteMembers(UA_EventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);
}

static UA_INLINE void
UA_EventFieldList_clear(UA_EventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);







|







18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
}

static UA_INLINE UA_StatusCode
UA_EventFieldList_copy(const UA_EventFieldList *src, UA_EventFieldList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);
}

UA_DEPRECATED static UA_INLINE void
UA_EventFieldList_deleteMembers(UA_EventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);
}

static UA_INLINE void
UA_EventFieldList_clear(UA_EventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFIELDLIST]);
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemCreateResult_copy(const UA_MonitoredItemCreateResult *src, UA_MonitoredItemCreateResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);
}

static UA_INLINE void
UA_MonitoredItemCreateResult_deleteMembers(UA_MonitoredItemCreateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);
}

static UA_INLINE void
UA_MonitoredItemCreateResult_clear(UA_MonitoredItemCreateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);







|







18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemCreateResult_copy(const UA_MonitoredItemCreateResult *src, UA_MonitoredItemCreateResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoredItemCreateResult_deleteMembers(UA_MonitoredItemCreateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);
}

static UA_INLINE void
UA_MonitoredItemCreateResult_clear(UA_MonitoredItemCreateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]);
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
}

static UA_INLINE UA_StatusCode
UA_EUInformation_copy(const UA_EUInformation *src, UA_EUInformation *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EUINFORMATION]);
}

static UA_INLINE void
UA_EUInformation_deleteMembers(UA_EUInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EUINFORMATION]);
}

static UA_INLINE void
UA_EUInformation_clear(UA_EUInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EUINFORMATION]);







|







18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
}

static UA_INLINE UA_StatusCode
UA_EUInformation_copy(const UA_EUInformation *src, UA_EUInformation *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EUINFORMATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_EUInformation_deleteMembers(UA_EUInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EUINFORMATION]);
}

static UA_INLINE void
UA_EUInformation_clear(UA_EUInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EUINFORMATION]);
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
}

static UA_INLINE UA_StatusCode
UA_ServerDiagnosticsSummaryDataType_copy(const UA_ServerDiagnosticsSummaryDataType *src, UA_ServerDiagnosticsSummaryDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);
}

static UA_INLINE void
UA_ServerDiagnosticsSummaryDataType_deleteMembers(UA_ServerDiagnosticsSummaryDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);
}

static UA_INLINE void
UA_ServerDiagnosticsSummaryDataType_clear(UA_ServerDiagnosticsSummaryDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);







|







18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
}

static UA_INLINE UA_StatusCode
UA_ServerDiagnosticsSummaryDataType_copy(const UA_ServerDiagnosticsSummaryDataType *src, UA_ServerDiagnosticsSummaryDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ServerDiagnosticsSummaryDataType_deleteMembers(UA_ServerDiagnosticsSummaryDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);
}

static UA_INLINE void
UA_ServerDiagnosticsSummaryDataType_clear(UA_ServerDiagnosticsSummaryDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERDIAGNOSTICSSUMMARYDATATYPE]);
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
}

static UA_INLINE UA_StatusCode
UA_ContentFilterElementResult_copy(const UA_ContentFilterElementResult *src, UA_ContentFilterElementResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);
}

static UA_INLINE void
UA_ContentFilterElementResult_deleteMembers(UA_ContentFilterElementResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);
}

static UA_INLINE void
UA_ContentFilterElementResult_clear(UA_ContentFilterElementResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);







|







18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
}

static UA_INLINE UA_StatusCode
UA_ContentFilterElementResult_copy(const UA_ContentFilterElementResult *src, UA_ContentFilterElementResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_ContentFilterElementResult_deleteMembers(UA_ContentFilterElementResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);
}

static UA_INLINE void
UA_ContentFilterElementResult_clear(UA_ContentFilterElementResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]);
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
}

static UA_INLINE UA_StatusCode
UA_LiteralOperand_copy(const UA_LiteralOperand *src, UA_LiteralOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LITERALOPERAND]);
}

static UA_INLINE void
UA_LiteralOperand_deleteMembers(UA_LiteralOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LITERALOPERAND]);
}

static UA_INLINE void
UA_LiteralOperand_clear(UA_LiteralOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LITERALOPERAND]);







|







18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
}

static UA_INLINE UA_StatusCode
UA_LiteralOperand_copy(const UA_LiteralOperand *src, UA_LiteralOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LITERALOPERAND]);
}

UA_DEPRECATED static UA_INLINE void
UA_LiteralOperand_deleteMembers(UA_LiteralOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LITERALOPERAND]);
}

static UA_INLINE void
UA_LiteralOperand_clear(UA_LiteralOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LITERALOPERAND]);
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetMessageContentMask_copy(const UA_UadpDataSetMessageContentMask *src, UA_UadpDataSetMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpDataSetMessageContentMask_deleteMembers(UA_UadpDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpDataSetMessageContentMask_clear(UA_UadpDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);







|







18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetMessageContentMask_copy(const UA_UadpDataSetMessageContentMask *src, UA_UadpDataSetMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_UadpDataSetMessageContentMask_deleteMembers(UA_UadpDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_UadpDataSetMessageContentMask_clear(UA_UadpDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETMESSAGECONTENTMASK]);
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
}

static UA_INLINE UA_StatusCode
UA_PerformUpdateType_copy(const UA_PerformUpdateType *src, UA_PerformUpdateType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);
}

static UA_INLINE void
UA_PerformUpdateType_deleteMembers(UA_PerformUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);
}

static UA_INLINE void
UA_PerformUpdateType_clear(UA_PerformUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);







|







18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
}

static UA_INLINE UA_StatusCode
UA_PerformUpdateType_copy(const UA_PerformUpdateType *src, UA_PerformUpdateType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PerformUpdateType_deleteMembers(UA_PerformUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);
}

static UA_INLINE void
UA_PerformUpdateType_clear(UA_PerformUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERFORMUPDATETYPE]);
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
}

static UA_INLINE UA_StatusCode
UA_MessageSecurityMode_copy(const UA_MessageSecurityMode *src, UA_MessageSecurityMode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);
}

static UA_INLINE void
UA_MessageSecurityMode_deleteMembers(UA_MessageSecurityMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);
}

static UA_INLINE void
UA_MessageSecurityMode_clear(UA_MessageSecurityMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);







|







18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
}

static UA_INLINE UA_StatusCode
UA_MessageSecurityMode_copy(const UA_MessageSecurityMode *src, UA_MessageSecurityMode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);
}

UA_DEPRECATED static UA_INLINE void
UA_MessageSecurityMode_deleteMembers(UA_MessageSecurityMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);
}

static UA_INLINE void
UA_MessageSecurityMode_clear(UA_MessageSecurityMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]);
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
}

static UA_INLINE UA_StatusCode
UA_UtcTime_copy(const UA_UtcTime *src, UA_UtcTime *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UTCTIME]);
}

static UA_INLINE void
UA_UtcTime_deleteMembers(UA_UtcTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UTCTIME]);
}

static UA_INLINE void
UA_UtcTime_clear(UA_UtcTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UTCTIME]);







|







19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
}

static UA_INLINE UA_StatusCode
UA_UtcTime_copy(const UA_UtcTime *src, UA_UtcTime *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UTCTIME]);
}

UA_DEPRECATED static UA_INLINE void
UA_UtcTime_deleteMembers(UA_UtcTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UTCTIME]);
}

static UA_INLINE void
UA_UtcTime_clear(UA_UtcTime *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UTCTIME]);
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
}

static UA_INLINE UA_StatusCode
UA_UserIdentityToken_copy(const UA_UserIdentityToken *src, UA_UserIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserIdentityToken_deleteMembers(UA_UserIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserIdentityToken_clear(UA_UserIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);







|







19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
}

static UA_INLINE UA_StatusCode
UA_UserIdentityToken_copy(const UA_UserIdentityToken *src, UA_UserIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_UserIdentityToken_deleteMembers(UA_UserIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserIdentityToken_clear(UA_UserIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]);
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
}

static UA_INLINE UA_StatusCode
UA_X509IdentityToken_copy(const UA_X509IdentityToken *src, UA_X509IdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);
}

static UA_INLINE void
UA_X509IdentityToken_deleteMembers(UA_X509IdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);
}

static UA_INLINE void
UA_X509IdentityToken_clear(UA_X509IdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);







|







19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
}

static UA_INLINE UA_StatusCode
UA_X509IdentityToken_copy(const UA_X509IdentityToken *src, UA_X509IdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_X509IdentityToken_deleteMembers(UA_X509IdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);
}

static UA_INLINE void
UA_X509IdentityToken_clear(UA_X509IdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_X509IDENTITYTOKEN]);
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemNotification_copy(const UA_MonitoredItemNotification *src, UA_MonitoredItemNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);
}

static UA_INLINE void
UA_MonitoredItemNotification_deleteMembers(UA_MonitoredItemNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);
}

static UA_INLINE void
UA_MonitoredItemNotification_clear(UA_MonitoredItemNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);







|







19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemNotification_copy(const UA_MonitoredItemNotification *src, UA_MonitoredItemNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoredItemNotification_deleteMembers(UA_MonitoredItemNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);
}

static UA_INLINE void
UA_MonitoredItemNotification_clear(UA_MonitoredItemNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]);
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
}

static UA_INLINE UA_StatusCode
UA_StructureType_copy(const UA_StructureType *src, UA_StructureType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);
}

static UA_INLINE void
UA_StructureType_deleteMembers(UA_StructureType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);
}

static UA_INLINE void
UA_StructureType_clear(UA_StructureType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);







|







19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
}

static UA_INLINE UA_StatusCode
UA_StructureType_copy(const UA_StructureType *src, UA_StructureType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_StructureType_deleteMembers(UA_StructureType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);
}

static UA_INLINE void
UA_StructureType_clear(UA_StructureType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTURETYPE]);
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
}

static UA_INLINE UA_StatusCode
UA_ResponseHeader_copy(const UA_ResponseHeader *src, UA_ResponseHeader *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);
}

static UA_INLINE void
UA_ResponseHeader_deleteMembers(UA_ResponseHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);
}

static UA_INLINE void
UA_ResponseHeader_clear(UA_ResponseHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);







|







19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
}

static UA_INLINE UA_StatusCode
UA_ResponseHeader_copy(const UA_ResponseHeader *src, UA_ResponseHeader *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);
}

UA_DEPRECATED static UA_INLINE void
UA_ResponseHeader_deleteMembers(UA_ResponseHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);
}

static UA_INLINE void
UA_ResponseHeader_clear(UA_ResponseHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RESPONSEHEADER]);
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
}

static UA_INLINE UA_StatusCode
UA_SignatureData_copy(const UA_SignatureData *src, UA_SignatureData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);
}

static UA_INLINE void
UA_SignatureData_deleteMembers(UA_SignatureData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);
}

static UA_INLINE void
UA_SignatureData_clear(UA_SignatureData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);







|







19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
}

static UA_INLINE UA_StatusCode
UA_SignatureData_copy(const UA_SignatureData *src, UA_SignatureData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);
}

UA_DEPRECATED static UA_INLINE void
UA_SignatureData_deleteMembers(UA_SignatureData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);
}

static UA_INLINE void
UA_SignatureData_clear(UA_SignatureData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNATUREDATA]);
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
}

static UA_INLINE UA_StatusCode
UA_NetworkAddressUrlDataType_copy(const UA_NetworkAddressUrlDataType *src, UA_NetworkAddressUrlDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
}

static UA_INLINE void
UA_NetworkAddressUrlDataType_deleteMembers(UA_NetworkAddressUrlDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
}

static UA_INLINE void
UA_NetworkAddressUrlDataType_clear(UA_NetworkAddressUrlDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);







|







19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
}

static UA_INLINE UA_StatusCode
UA_NetworkAddressUrlDataType_copy(const UA_NetworkAddressUrlDataType *src, UA_NetworkAddressUrlDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_NetworkAddressUrlDataType_deleteMembers(UA_NetworkAddressUrlDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
}

static UA_INLINE void
UA_NetworkAddressUrlDataType_clear(UA_NetworkAddressUrlDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
}

static UA_INLINE UA_StatusCode
UA_ModifySubscriptionResponse_copy(const UA_ModifySubscriptionResponse *src, UA_ModifySubscriptionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_ModifySubscriptionResponse_deleteMembers(UA_ModifySubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_ModifySubscriptionResponse_clear(UA_ModifySubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);







|







19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
}

static UA_INLINE UA_StatusCode
UA_ModifySubscriptionResponse_copy(const UA_ModifySubscriptionResponse *src, UA_ModifySubscriptionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ModifySubscriptionResponse_deleteMembers(UA_ModifySubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_ModifySubscriptionResponse_clear(UA_ModifySubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
}

static UA_INLINE UA_StatusCode
UA_ReadRawModifiedDetails_copy(const UA_ReadRawModifiedDetails *src, UA_ReadRawModifiedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_ReadRawModifiedDetails_deleteMembers(UA_ReadRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_ReadRawModifiedDetails_clear(UA_ReadRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);







|







19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
}

static UA_INLINE UA_StatusCode
UA_ReadRawModifiedDetails_copy(const UA_ReadRawModifiedDetails *src, UA_ReadRawModifiedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadRawModifiedDetails_deleteMembers(UA_ReadRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_ReadRawModifiedDetails_clear(UA_ReadRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRAWMODIFIEDDETAILS]);
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
}

static UA_INLINE UA_StatusCode
UA_NodeAttributes_copy(const UA_NodeAttributes *src, UA_NodeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);
}

static UA_INLINE void
UA_NodeAttributes_deleteMembers(UA_NodeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);
}

static UA_INLINE void
UA_NodeAttributes_clear(UA_NodeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);







|







19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
}

static UA_INLINE UA_StatusCode
UA_NodeAttributes_copy(const UA_NodeAttributes *src, UA_NodeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_NodeAttributes_deleteMembers(UA_NodeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);
}

static UA_INLINE void
UA_NodeAttributes_clear(UA_NodeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]);
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
}

static UA_INLINE UA_StatusCode
UA_HistoryData_copy(const UA_HistoryData *src, UA_HistoryData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYDATA]);
}

static UA_INLINE void
UA_HistoryData_deleteMembers(UA_HistoryData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYDATA]);
}

static UA_INLINE void
UA_HistoryData_clear(UA_HistoryData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYDATA]);







|







19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
}

static UA_INLINE UA_StatusCode
UA_HistoryData_copy(const UA_HistoryData *src, UA_HistoryData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYDATA]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryData_deleteMembers(UA_HistoryData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYDATA]);
}

static UA_INLINE void
UA_HistoryData_clear(UA_HistoryData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYDATA]);
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
}

static UA_INLINE UA_StatusCode
UA_ActivateSessionResponse_copy(const UA_ActivateSessionResponse *src, UA_ActivateSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_ActivateSessionResponse_deleteMembers(UA_ActivateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_ActivateSessionResponse_clear(UA_ActivateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);







|







19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
}

static UA_INLINE UA_StatusCode
UA_ActivateSessionResponse_copy(const UA_ActivateSessionResponse *src, UA_ActivateSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ActivateSessionResponse_deleteMembers(UA_ActivateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_ActivateSessionResponse_clear(UA_ActivateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]);
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
}

static UA_INLINE UA_StatusCode
UA_EnumField_copy(const UA_EnumField *src, UA_EnumField *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMFIELD]);
}

static UA_INLINE void
UA_EnumField_deleteMembers(UA_EnumField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMFIELD]);
}

static UA_INLINE void
UA_EnumField_clear(UA_EnumField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMFIELD]);







|







19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
}

static UA_INLINE UA_StatusCode
UA_EnumField_copy(const UA_EnumField *src, UA_EnumField *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMFIELD]);
}

UA_DEPRECATED static UA_INLINE void
UA_EnumField_deleteMembers(UA_EnumField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMFIELD]);
}

static UA_INLINE void
UA_EnumField_clear(UA_EnumField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMFIELD]);
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
}

static UA_INLINE UA_StatusCode
UA_VariableTypeAttributes_copy(const UA_VariableTypeAttributes *src, UA_VariableTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableTypeAttributes_deleteMembers(UA_VariableTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableTypeAttributes_clear(UA_VariableTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);







|







19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
}

static UA_INLINE UA_StatusCode
UA_VariableTypeAttributes_copy(const UA_VariableTypeAttributes *src, UA_VariableTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_VariableTypeAttributes_deleteMembers(UA_VariableTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_VariableTypeAttributes_clear(UA_VariableTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]);
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
}

static UA_INLINE UA_StatusCode
UA_CallMethodResult_copy(const UA_CallMethodResult *src, UA_CallMethodResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);
}

static UA_INLINE void
UA_CallMethodResult_deleteMembers(UA_CallMethodResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);
}

static UA_INLINE void
UA_CallMethodResult_clear(UA_CallMethodResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);







|







19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
}

static UA_INLINE UA_StatusCode
UA_CallMethodResult_copy(const UA_CallMethodResult *src, UA_CallMethodResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_CallMethodResult_deleteMembers(UA_CallMethodResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);
}

static UA_INLINE void
UA_CallMethodResult_clear(UA_CallMethodResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]);
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
}

static UA_INLINE UA_StatusCode
UA_HistoryReadValueId_copy(const UA_HistoryReadValueId *src, UA_HistoryReadValueId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);
}

static UA_INLINE void
UA_HistoryReadValueId_deleteMembers(UA_HistoryReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);
}

static UA_INLINE void
UA_HistoryReadValueId_clear(UA_HistoryReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);







|







19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
}

static UA_INLINE UA_StatusCode
UA_HistoryReadValueId_copy(const UA_HistoryReadValueId *src, UA_HistoryReadValueId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryReadValueId_deleteMembers(UA_HistoryReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);
}

static UA_INLINE void
UA_HistoryReadValueId_clear(UA_HistoryReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADVALUEID]);
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
}

static UA_INLINE UA_StatusCode
UA_MonitoringMode_copy(const UA_MonitoringMode *src, UA_MonitoringMode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITORINGMODE]);
}

static UA_INLINE void
UA_MonitoringMode_deleteMembers(UA_MonitoringMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGMODE]);
}

static UA_INLINE void
UA_MonitoringMode_clear(UA_MonitoringMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGMODE]);







|







19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
}

static UA_INLINE UA_StatusCode
UA_MonitoringMode_copy(const UA_MonitoringMode *src, UA_MonitoringMode *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITORINGMODE]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoringMode_deleteMembers(UA_MonitoringMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGMODE]);
}

static UA_INLINE void
UA_MonitoringMode_clear(UA_MonitoringMode *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGMODE]);
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
}

static UA_INLINE UA_StatusCode
UA_SetMonitoringModeResponse_copy(const UA_SetMonitoringModeResponse *src, UA_SetMonitoringModeResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetMonitoringModeResponse_deleteMembers(UA_SetMonitoringModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetMonitoringModeResponse_clear(UA_SetMonitoringModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);







|







19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
}

static UA_INLINE UA_StatusCode
UA_SetMonitoringModeResponse_copy(const UA_SetMonitoringModeResponse *src, UA_SetMonitoringModeResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetMonitoringModeResponse_deleteMembers(UA_SetMonitoringModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetMonitoringModeResponse_clear(UA_SetMonitoringModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODERESPONSE]);
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
}

static UA_INLINE UA_StatusCode
UA_BrowseResultMask_copy(const UA_BrowseResultMask *src, UA_BrowseResultMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);
}

static UA_INLINE void
UA_BrowseResultMask_deleteMembers(UA_BrowseResultMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);
}

static UA_INLINE void
UA_BrowseResultMask_clear(UA_BrowseResultMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);







|







19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
}

static UA_INLINE UA_StatusCode
UA_BrowseResultMask_copy(const UA_BrowseResultMask *src, UA_BrowseResultMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseResultMask_deleteMembers(UA_BrowseResultMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);
}

static UA_INLINE void
UA_BrowseResultMask_clear(UA_BrowseResultMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]);
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
}

static UA_INLINE UA_StatusCode
UA_RequestHeader_copy(const UA_RequestHeader *src, UA_RequestHeader *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REQUESTHEADER]);
}

static UA_INLINE void
UA_RequestHeader_deleteMembers(UA_RequestHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REQUESTHEADER]);
}

static UA_INLINE void
UA_RequestHeader_clear(UA_RequestHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REQUESTHEADER]);







|







19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
}

static UA_INLINE UA_StatusCode
UA_RequestHeader_copy(const UA_RequestHeader *src, UA_RequestHeader *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REQUESTHEADER]);
}

UA_DEPRECATED static UA_INLINE void
UA_RequestHeader_deleteMembers(UA_RequestHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REQUESTHEADER]);
}

static UA_INLINE void
UA_RequestHeader_clear(UA_RequestHeader *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REQUESTHEADER]);
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemModifyResult_copy(const UA_MonitoredItemModifyResult *src, UA_MonitoredItemModifyResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);
}

static UA_INLINE void
UA_MonitoredItemModifyResult_deleteMembers(UA_MonitoredItemModifyResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);
}

static UA_INLINE void
UA_MonitoredItemModifyResult_clear(UA_MonitoredItemModifyResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);







|







19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemModifyResult_copy(const UA_MonitoredItemModifyResult *src, UA_MonitoredItemModifyResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoredItemModifyResult_deleteMembers(UA_MonitoredItemModifyResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);
}

static UA_INLINE void
UA_MonitoredItemModifyResult_clear(UA_MonitoredItemModifyResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]);
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
}

static UA_INLINE UA_StatusCode
UA_HistoryReadResult_copy(const UA_HistoryReadResult *src, UA_HistoryReadResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);
}

static UA_INLINE void
UA_HistoryReadResult_deleteMembers(UA_HistoryReadResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);
}

static UA_INLINE void
UA_HistoryReadResult_clear(UA_HistoryReadResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);







|







19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
}

static UA_INLINE UA_StatusCode
UA_HistoryReadResult_copy(const UA_HistoryReadResult *src, UA_HistoryReadResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryReadResult_deleteMembers(UA_HistoryReadResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);
}

static UA_INLINE void
UA_HistoryReadResult_clear(UA_HistoryReadResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESULT]);
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
}

static UA_INLINE UA_StatusCode
UA_CloseSecureChannelRequest_copy(const UA_CloseSecureChannelRequest *src, UA_CloseSecureChannelRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_CloseSecureChannelRequest_deleteMembers(UA_CloseSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_CloseSecureChannelRequest_clear(UA_CloseSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);







|







19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
}

static UA_INLINE UA_StatusCode
UA_CloseSecureChannelRequest_copy(const UA_CloseSecureChannelRequest *src, UA_CloseSecureChannelRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CloseSecureChannelRequest_deleteMembers(UA_CloseSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_CloseSecureChannelRequest_clear(UA_CloseSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]);
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
}

static UA_INLINE UA_StatusCode
UA_NotificationMessage_copy(const UA_NotificationMessage *src, UA_NotificationMessage *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);
}

static UA_INLINE void
UA_NotificationMessage_deleteMembers(UA_NotificationMessage *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);
}

static UA_INLINE void
UA_NotificationMessage_clear(UA_NotificationMessage *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);







|







19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
}

static UA_INLINE UA_StatusCode
UA_NotificationMessage_copy(const UA_NotificationMessage *src, UA_NotificationMessage *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);
}

UA_DEPRECATED static UA_INLINE void
UA_NotificationMessage_deleteMembers(UA_NotificationMessage *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);
}

static UA_INLINE void
UA_NotificationMessage_clear(UA_NotificationMessage *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]);
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
}

static UA_INLINE UA_StatusCode
UA_CreateSubscriptionResponse_copy(const UA_CreateSubscriptionResponse *src, UA_CreateSubscriptionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSubscriptionResponse_deleteMembers(UA_CreateSubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSubscriptionResponse_clear(UA_CreateSubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);







|







19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
}

static UA_INLINE UA_StatusCode
UA_CreateSubscriptionResponse_copy(const UA_CreateSubscriptionResponse *src, UA_CreateSubscriptionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateSubscriptionResponse_deleteMembers(UA_CreateSubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSubscriptionResponse_clear(UA_CreateSubscriptionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
}

static UA_INLINE UA_StatusCode
UA_BrokerTransportQualityOfService_copy(const UA_BrokerTransportQualityOfService *src, UA_BrokerTransportQualityOfService *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);
}

static UA_INLINE void
UA_BrokerTransportQualityOfService_deleteMembers(UA_BrokerTransportQualityOfService *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);
}

static UA_INLINE void
UA_BrokerTransportQualityOfService_clear(UA_BrokerTransportQualityOfService *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);







|







19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
}

static UA_INLINE UA_StatusCode
UA_BrokerTransportQualityOfService_copy(const UA_BrokerTransportQualityOfService *src, UA_BrokerTransportQualityOfService *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrokerTransportQualityOfService_deleteMembers(UA_BrokerTransportQualityOfService *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);
}

static UA_INLINE void
UA_BrokerTransportQualityOfService_clear(UA_BrokerTransportQualityOfService *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERTRANSPORTQUALITYOFSERVICE]);
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
}

static UA_INLINE UA_StatusCode
UA_EnumDefinition_copy(const UA_EnumDefinition *src, UA_EnumDefinition *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);
}

static UA_INLINE void
UA_EnumDefinition_deleteMembers(UA_EnumDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);
}

static UA_INLINE void
UA_EnumDefinition_clear(UA_EnumDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);







|







19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
}

static UA_INLINE UA_StatusCode
UA_EnumDefinition_copy(const UA_EnumDefinition *src, UA_EnumDefinition *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);
}

UA_DEPRECATED static UA_INLINE void
UA_EnumDefinition_deleteMembers(UA_EnumDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);
}

static UA_INLINE void
UA_EnumDefinition_clear(UA_EnumDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDEFINITION]);
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
}

static UA_INLINE UA_StatusCode
UA_MdnsDiscoveryConfiguration_copy(const UA_MdnsDiscoveryConfiguration *src, UA_MdnsDiscoveryConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_MdnsDiscoveryConfiguration_deleteMembers(UA_MdnsDiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_MdnsDiscoveryConfiguration_clear(UA_MdnsDiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);







|







19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
}

static UA_INLINE UA_StatusCode
UA_MdnsDiscoveryConfiguration_copy(const UA_MdnsDiscoveryConfiguration *src, UA_MdnsDiscoveryConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_MdnsDiscoveryConfiguration_deleteMembers(UA_MdnsDiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_MdnsDiscoveryConfiguration_clear(UA_MdnsDiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MDNSDISCOVERYCONFIGURATION]);
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
}

static UA_INLINE UA_StatusCode
UA_AxisScaleEnumeration_copy(const UA_AxisScaleEnumeration *src, UA_AxisScaleEnumeration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);
}

static UA_INLINE void
UA_AxisScaleEnumeration_deleteMembers(UA_AxisScaleEnumeration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);
}

static UA_INLINE void
UA_AxisScaleEnumeration_clear(UA_AxisScaleEnumeration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);







|







19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
}

static UA_INLINE UA_StatusCode
UA_AxisScaleEnumeration_copy(const UA_AxisScaleEnumeration *src, UA_AxisScaleEnumeration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_AxisScaleEnumeration_deleteMembers(UA_AxisScaleEnumeration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);
}

static UA_INLINE void
UA_AxisScaleEnumeration_clear(UA_AxisScaleEnumeration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISSCALEENUMERATION]);
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
}

static UA_INLINE UA_StatusCode
UA_BrowseDirection_copy(const UA_BrowseDirection *src, UA_BrowseDirection *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);
}

static UA_INLINE void
UA_BrowseDirection_deleteMembers(UA_BrowseDirection *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);
}

static UA_INLINE void
UA_BrowseDirection_clear(UA_BrowseDirection *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);







|







19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
}

static UA_INLINE UA_StatusCode
UA_BrowseDirection_copy(const UA_BrowseDirection *src, UA_BrowseDirection *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseDirection_deleteMembers(UA_BrowseDirection *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);
}

static UA_INLINE void
UA_BrowseDirection_clear(UA_BrowseDirection *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]);
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
}

static UA_INLINE UA_StatusCode
UA_CallMethodRequest_copy(const UA_CallMethodRequest *src, UA_CallMethodRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);
}

static UA_INLINE void
UA_CallMethodRequest_deleteMembers(UA_CallMethodRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);
}

static UA_INLINE void
UA_CallMethodRequest_clear(UA_CallMethodRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);







|







19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
}

static UA_INLINE UA_StatusCode
UA_CallMethodRequest_copy(const UA_CallMethodRequest *src, UA_CallMethodRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CallMethodRequest_deleteMembers(UA_CallMethodRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);
}

static UA_INLINE void
UA_CallMethodRequest_clear(UA_CallMethodRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]);
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791































19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
}

static UA_INLINE UA_StatusCode
UA_ReadResponse_copy(const UA_ReadResponse *src, UA_ReadResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

static UA_INLINE void
UA_ReadResponse_deleteMembers(UA_ReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

static UA_INLINE void
UA_ReadResponse_clear(UA_ReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

static UA_INLINE void
UA_ReadResponse_delete(UA_ReadResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}
































/* TimestampsToReturn */
static UA_INLINE void
UA_TimestampsToReturn_init(UA_TimestampsToReturn *p) {
    memset(p, 0, sizeof(UA_TimestampsToReturn));
}

static UA_INLINE UA_TimestampsToReturn *
UA_TimestampsToReturn_new(void) {
    return (UA_TimestampsToReturn*)UA_new(&UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

static UA_INLINE UA_StatusCode
UA_TimestampsToReturn_copy(const UA_TimestampsToReturn *src, UA_TimestampsToReturn *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

static UA_INLINE void
UA_TimestampsToReturn_deleteMembers(UA_TimestampsToReturn *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

static UA_INLINE void
UA_TimestampsToReturn_clear(UA_TimestampsToReturn *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
}

static UA_INLINE UA_StatusCode
UA_ReadResponse_copy(const UA_ReadResponse *src, UA_ReadResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadResponse_deleteMembers(UA_ReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

static UA_INLINE void
UA_ReadResponse_clear(UA_ReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

static UA_INLINE void
UA_ReadResponse_delete(UA_ReadResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_READRESPONSE]);
}

/* PermissionType */
static UA_INLINE void
UA_PermissionType_init(UA_PermissionType *p) {
    memset(p, 0, sizeof(UA_PermissionType));
}

static UA_INLINE UA_PermissionType *
UA_PermissionType_new(void) {
    return (UA_PermissionType*)UA_new(&UA_TYPES[UA_TYPES_PERMISSIONTYPE]);
}

static UA_INLINE UA_StatusCode
UA_PermissionType_copy(const UA_PermissionType *src, UA_PermissionType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PERMISSIONTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PermissionType_deleteMembers(UA_PermissionType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERMISSIONTYPE]);
}

static UA_INLINE void
UA_PermissionType_clear(UA_PermissionType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PERMISSIONTYPE]);
}

static UA_INLINE void
UA_PermissionType_delete(UA_PermissionType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PERMISSIONTYPE]);
}

/* TimestampsToReturn */
static UA_INLINE void
UA_TimestampsToReturn_init(UA_TimestampsToReturn *p) {
    memset(p, 0, sizeof(UA_TimestampsToReturn));
}

static UA_INLINE UA_TimestampsToReturn *
UA_TimestampsToReturn_new(void) {
    return (UA_TimestampsToReturn*)UA_new(&UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

static UA_INLINE UA_StatusCode
UA_TimestampsToReturn_copy(const UA_TimestampsToReturn *src, UA_TimestampsToReturn *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

UA_DEPRECATED static UA_INLINE void
UA_TimestampsToReturn_deleteMembers(UA_TimestampsToReturn *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
}

static UA_INLINE void
UA_TimestampsToReturn_clear(UA_TimestampsToReturn *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]);
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
}

static UA_INLINE UA_StatusCode
UA_NodeClass_copy(const UA_NodeClass *src, UA_NodeClass *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODECLASS]);
}

static UA_INLINE void
UA_NodeClass_deleteMembers(UA_NodeClass *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODECLASS]);
}

static UA_INLINE void
UA_NodeClass_clear(UA_NodeClass *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODECLASS]);







|







20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
}

static UA_INLINE UA_StatusCode
UA_NodeClass_copy(const UA_NodeClass *src, UA_NodeClass *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODECLASS]);
}

UA_DEPRECATED static UA_INLINE void
UA_NodeClass_deleteMembers(UA_NodeClass *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODECLASS]);
}

static UA_INLINE void
UA_NodeClass_clear(UA_NodeClass *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODECLASS]);
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateType_copy(const UA_HistoryUpdateType *src, UA_HistoryUpdateType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);
}

static UA_INLINE void
UA_HistoryUpdateType_deleteMembers(UA_HistoryUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);
}

static UA_INLINE void
UA_HistoryUpdateType_clear(UA_HistoryUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);







|







20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateType_copy(const UA_HistoryUpdateType *src, UA_HistoryUpdateType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryUpdateType_deleteMembers(UA_HistoryUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);
}

static UA_INLINE void
UA_HistoryUpdateType_clear(UA_HistoryUpdateType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATETYPE]);
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
}

static UA_INLINE UA_StatusCode
UA_ObjectTypeAttributes_copy(const UA_ObjectTypeAttributes *src, UA_ObjectTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectTypeAttributes_deleteMembers(UA_ObjectTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectTypeAttributes_clear(UA_ObjectTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);







|







20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
}

static UA_INLINE UA_StatusCode
UA_ObjectTypeAttributes_copy(const UA_ObjectTypeAttributes *src, UA_ObjectTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_ObjectTypeAttributes_deleteMembers(UA_ObjectTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectTypeAttributes_clear(UA_ObjectTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]);
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
}

static UA_INLINE UA_StatusCode
UA_SecurityTokenRequestType_copy(const UA_SecurityTokenRequestType *src, UA_SecurityTokenRequestType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);
}

static UA_INLINE void
UA_SecurityTokenRequestType_deleteMembers(UA_SecurityTokenRequestType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);
}

static UA_INLINE void
UA_SecurityTokenRequestType_clear(UA_SecurityTokenRequestType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);







|







20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
}

static UA_INLINE UA_StatusCode
UA_SecurityTokenRequestType_copy(const UA_SecurityTokenRequestType *src, UA_SecurityTokenRequestType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SecurityTokenRequestType_deleteMembers(UA_SecurityTokenRequestType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);
}

static UA_INLINE void
UA_SecurityTokenRequestType_clear(UA_SecurityTokenRequestType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]);
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
}

static UA_INLINE UA_StatusCode
UA_CloseSessionResponse_copy(const UA_CloseSessionResponse *src, UA_CloseSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CloseSessionResponse_deleteMembers(UA_CloseSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CloseSessionResponse_clear(UA_CloseSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);







|







20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
}

static UA_INLINE UA_StatusCode
UA_CloseSessionResponse_copy(const UA_CloseSessionResponse *src, UA_CloseSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CloseSessionResponse_deleteMembers(UA_CloseSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CloseSessionResponse_clear(UA_CloseSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]);
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
}

static UA_INLINE UA_StatusCode
UA_SetPublishingModeRequest_copy(const UA_SetPublishingModeRequest *src, UA_SetPublishingModeRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetPublishingModeRequest_deleteMembers(UA_SetPublishingModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetPublishingModeRequest_clear(UA_SetPublishingModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);







|







20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
}

static UA_INLINE UA_StatusCode
UA_SetPublishingModeRequest_copy(const UA_SetPublishingModeRequest *src, UA_SetPublishingModeRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetPublishingModeRequest_deleteMembers(UA_SetPublishingModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetPublishingModeRequest_clear(UA_SetPublishingModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]);
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
}

static UA_INLINE UA_StatusCode
UA_IssuedIdentityToken_copy(const UA_IssuedIdentityToken *src, UA_IssuedIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);
}

static UA_INLINE void
UA_IssuedIdentityToken_deleteMembers(UA_IssuedIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);
}

static UA_INLINE void
UA_IssuedIdentityToken_clear(UA_IssuedIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);







|







20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
}

static UA_INLINE UA_StatusCode
UA_IssuedIdentityToken_copy(const UA_IssuedIdentityToken *src, UA_IssuedIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_IssuedIdentityToken_deleteMembers(UA_IssuedIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);
}

static UA_INLINE void
UA_IssuedIdentityToken_clear(UA_IssuedIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ISSUEDIDENTITYTOKEN]);
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
}

static UA_INLINE UA_StatusCode
UA_ServerOnNetwork_copy(const UA_ServerOnNetwork *src, UA_ServerOnNetwork *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);
}

static UA_INLINE void
UA_ServerOnNetwork_deleteMembers(UA_ServerOnNetwork *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);
}

static UA_INLINE void
UA_ServerOnNetwork_clear(UA_ServerOnNetwork *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);







|







20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
}

static UA_INLINE UA_StatusCode
UA_ServerOnNetwork_copy(const UA_ServerOnNetwork *src, UA_ServerOnNetwork *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);
}

UA_DEPRECATED static UA_INLINE void
UA_ServerOnNetwork_deleteMembers(UA_ServerOnNetwork *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);
}

static UA_INLINE void
UA_ServerOnNetwork_clear(UA_ServerOnNetwork *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERONNETWORK]);
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101































20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
}

static UA_INLINE UA_StatusCode
UA_DeleteMonitoredItemsResponse_copy(const UA_DeleteMonitoredItemsResponse *src, UA_DeleteMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsResponse_deleteMembers(UA_DeleteMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsResponse_clear(UA_DeleteMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsResponse_delete(UA_DeleteMonitoredItemsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}
































/* ApplicationType */
static UA_INLINE void
UA_ApplicationType_init(UA_ApplicationType *p) {
    memset(p, 0, sizeof(UA_ApplicationType));
}

static UA_INLINE UA_ApplicationType *
UA_ApplicationType_new(void) {
    return (UA_ApplicationType*)UA_new(&UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

static UA_INLINE UA_StatusCode
UA_ApplicationType_copy(const UA_ApplicationType *src, UA_ApplicationType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

static UA_INLINE void
UA_ApplicationType_deleteMembers(UA_ApplicationType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

static UA_INLINE void
UA_ApplicationType_clear(UA_ApplicationType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
}

static UA_INLINE UA_StatusCode
UA_DeleteMonitoredItemsResponse_copy(const UA_DeleteMonitoredItemsResponse *src, UA_DeleteMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteMonitoredItemsResponse_deleteMembers(UA_DeleteMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsResponse_clear(UA_DeleteMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsResponse_delete(UA_DeleteMonitoredItemsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
}

/* DatagramConnectionTransportDataType */
static UA_INLINE void
UA_DatagramConnectionTransportDataType_init(UA_DatagramConnectionTransportDataType *p) {
    memset(p, 0, sizeof(UA_DatagramConnectionTransportDataType));
}

static UA_INLINE UA_DatagramConnectionTransportDataType *
UA_DatagramConnectionTransportDataType_new(void) {
    return (UA_DatagramConnectionTransportDataType*)UA_new(&UA_TYPES[UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_DatagramConnectionTransportDataType_copy(const UA_DatagramConnectionTransportDataType *src, UA_DatagramConnectionTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DatagramConnectionTransportDataType_deleteMembers(UA_DatagramConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_DatagramConnectionTransportDataType_clear(UA_DatagramConnectionTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_DatagramConnectionTransportDataType_delete(UA_DatagramConnectionTransportDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATAGRAMCONNECTIONTRANSPORTDATATYPE]);
}

/* ApplicationType */
static UA_INLINE void
UA_ApplicationType_init(UA_ApplicationType *p) {
    memset(p, 0, sizeof(UA_ApplicationType));
}

static UA_INLINE UA_ApplicationType *
UA_ApplicationType_new(void) {
    return (UA_ApplicationType*)UA_new(&UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

static UA_INLINE UA_StatusCode
UA_ApplicationType_copy(const UA_ApplicationType *src, UA_ApplicationType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ApplicationType_deleteMembers(UA_ApplicationType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
}

static UA_INLINE void
UA_ApplicationType_clear(UA_ApplicationType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]);
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
}

static UA_INLINE UA_StatusCode
UA_DiscoveryConfiguration_copy(const UA_DiscoveryConfiguration *src, UA_DiscoveryConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_DiscoveryConfiguration_deleteMembers(UA_DiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_DiscoveryConfiguration_clear(UA_DiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);







|







20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
}

static UA_INLINE UA_StatusCode
UA_DiscoveryConfiguration_copy(const UA_DiscoveryConfiguration *src, UA_DiscoveryConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_DiscoveryConfiguration_deleteMembers(UA_DiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);
}

static UA_INLINE void
UA_DiscoveryConfiguration_clear(UA_DiscoveryConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DISCOVERYCONFIGURATION]);
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
}

static UA_INLINE UA_StatusCode
UA_BrowseNextRequest_copy(const UA_BrowseNextRequest *src, UA_BrowseNextRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);
}

static UA_INLINE void
UA_BrowseNextRequest_deleteMembers(UA_BrowseNextRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);
}

static UA_INLINE void
UA_BrowseNextRequest_clear(UA_BrowseNextRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);







|







20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
}

static UA_INLINE UA_StatusCode
UA_BrowseNextRequest_copy(const UA_BrowseNextRequest *src, UA_BrowseNextRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseNextRequest_deleteMembers(UA_BrowseNextRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);
}

static UA_INLINE void
UA_BrowseNextRequest_clear(UA_BrowseNextRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]);
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
}

static UA_INLINE UA_StatusCode
UA_ModifySubscriptionRequest_copy(const UA_ModifySubscriptionRequest *src, UA_ModifySubscriptionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_ModifySubscriptionRequest_deleteMembers(UA_ModifySubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_ModifySubscriptionRequest_clear(UA_ModifySubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);







|







20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
}

static UA_INLINE UA_StatusCode
UA_ModifySubscriptionRequest_copy(const UA_ModifySubscriptionRequest *src, UA_ModifySubscriptionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_ModifySubscriptionRequest_deleteMembers(UA_ModifySubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_ModifySubscriptionRequest_clear(UA_ModifySubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]);
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
}

static UA_INLINE UA_StatusCode
UA_BrowseDescription_copy(const UA_BrowseDescription *src, UA_BrowseDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);
}

static UA_INLINE void
UA_BrowseDescription_deleteMembers(UA_BrowseDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);
}

static UA_INLINE void
UA_BrowseDescription_clear(UA_BrowseDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);







|







20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
}

static UA_INLINE UA_StatusCode
UA_BrowseDescription_copy(const UA_BrowseDescription *src, UA_BrowseDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseDescription_deleteMembers(UA_BrowseDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);
}

static UA_INLINE void
UA_BrowseDescription_clear(UA_BrowseDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]);
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
}

static UA_INLINE UA_StatusCode
UA_SignedSoftwareCertificate_copy(const UA_SignedSoftwareCertificate *src, UA_SignedSoftwareCertificate *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);
}

static UA_INLINE void
UA_SignedSoftwareCertificate_deleteMembers(UA_SignedSoftwareCertificate *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);
}

static UA_INLINE void
UA_SignedSoftwareCertificate_clear(UA_SignedSoftwareCertificate *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);







|







20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
}

static UA_INLINE UA_StatusCode
UA_SignedSoftwareCertificate_copy(const UA_SignedSoftwareCertificate *src, UA_SignedSoftwareCertificate *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SignedSoftwareCertificate_deleteMembers(UA_SignedSoftwareCertificate *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);
}

static UA_INLINE void
UA_SignedSoftwareCertificate_clear(UA_SignedSoftwareCertificate *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]);
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
}

static UA_INLINE UA_StatusCode
UA_BrowsePathTarget_copy(const UA_BrowsePathTarget *src, UA_BrowsePathTarget *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);
}

static UA_INLINE void
UA_BrowsePathTarget_deleteMembers(UA_BrowsePathTarget *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);
}

static UA_INLINE void
UA_BrowsePathTarget_clear(UA_BrowsePathTarget *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);







|







20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
}

static UA_INLINE UA_StatusCode
UA_BrowsePathTarget_copy(const UA_BrowsePathTarget *src, UA_BrowsePathTarget *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowsePathTarget_deleteMembers(UA_BrowsePathTarget *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);
}

static UA_INLINE void
UA_BrowsePathTarget_clear(UA_BrowsePathTarget *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]);
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
}

static UA_INLINE UA_StatusCode
UA_WriteResponse_copy(const UA_WriteResponse *src, UA_WriteResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
}

static UA_INLINE void
UA_WriteResponse_deleteMembers(UA_WriteResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
}

static UA_INLINE void
UA_WriteResponse_clear(UA_WriteResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERESPONSE]);







|







20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
}

static UA_INLINE UA_StatusCode
UA_WriteResponse_copy(const UA_WriteResponse *src, UA_WriteResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_WriteResponse_deleteMembers(UA_WriteResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
}

static UA_INLINE void
UA_WriteResponse_clear(UA_WriteResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
}

static UA_INLINE UA_StatusCode
UA_AddNodesResult_copy(const UA_AddNodesResult *src, UA_AddNodesResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);
}

static UA_INLINE void
UA_AddNodesResult_deleteMembers(UA_AddNodesResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);
}

static UA_INLINE void
UA_AddNodesResult_clear(UA_AddNodesResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);







|







20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
}

static UA_INLINE UA_StatusCode
UA_AddNodesResult_copy(const UA_AddNodesResult *src, UA_AddNodesResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddNodesResult_deleteMembers(UA_AddNodesResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);
}

static UA_INLINE void
UA_AddNodesResult_clear(UA_AddNodesResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESULT]);
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetReaderMessageDataType_copy(const UA_UadpDataSetReaderMessageDataType *src, UA_UadpDataSetReaderMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetReaderMessageDataType_deleteMembers(UA_UadpDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetReaderMessageDataType_clear(UA_UadpDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);







|







20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetReaderMessageDataType_copy(const UA_UadpDataSetReaderMessageDataType *src, UA_UadpDataSetReaderMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UadpDataSetReaderMessageDataType_deleteMembers(UA_UadpDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetReaderMessageDataType_clear(UA_UadpDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETREADERMESSAGEDATATYPE]);
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
}

static UA_INLINE UA_StatusCode
UA_RegisterServerResponse_copy(const UA_RegisterServerResponse *src, UA_RegisterServerResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);
}

static UA_INLINE void
UA_RegisterServerResponse_deleteMembers(UA_RegisterServerResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);
}

static UA_INLINE void
UA_RegisterServerResponse_clear(UA_RegisterServerResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);







|







20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
}

static UA_INLINE UA_StatusCode
UA_RegisterServerResponse_copy(const UA_RegisterServerResponse *src, UA_RegisterServerResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterServerResponse_deleteMembers(UA_RegisterServerResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);
}

static UA_INLINE void
UA_RegisterServerResponse_clear(UA_RegisterServerResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERRESPONSE]);
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
}

static UA_INLINE UA_StatusCode
UA_AddReferencesItem_copy(const UA_AddReferencesItem *src, UA_AddReferencesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);
}

static UA_INLINE void
UA_AddReferencesItem_deleteMembers(UA_AddReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);
}

static UA_INLINE void
UA_AddReferencesItem_clear(UA_AddReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);







|







20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
}

static UA_INLINE UA_StatusCode
UA_AddReferencesItem_copy(const UA_AddReferencesItem *src, UA_AddReferencesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddReferencesItem_deleteMembers(UA_AddReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);
}

static UA_INLINE void
UA_AddReferencesItem_clear(UA_AddReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]);
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
}

static UA_INLINE UA_StatusCode
UA_RegisterServer2Response_copy(const UA_RegisterServer2Response *src, UA_RegisterServer2Response *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);
}

static UA_INLINE void
UA_RegisterServer2Response_deleteMembers(UA_RegisterServer2Response *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);
}

static UA_INLINE void
UA_RegisterServer2Response_clear(UA_RegisterServer2Response *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);







|







20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
}

static UA_INLINE UA_StatusCode
UA_RegisterServer2Response_copy(const UA_RegisterServer2Response *src, UA_RegisterServer2Response *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterServer2Response_deleteMembers(UA_RegisterServer2Response *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);
}

static UA_INLINE void
UA_RegisterServer2Response_clear(UA_RegisterServer2Response *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2RESPONSE]);
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesResponse_copy(const UA_DeleteReferencesResponse *src, UA_DeleteReferencesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_DeleteReferencesResponse_deleteMembers(UA_DeleteReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_DeleteReferencesResponse_clear(UA_DeleteReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);







|







20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesResponse_copy(const UA_DeleteReferencesResponse *src, UA_DeleteReferencesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteReferencesResponse_deleteMembers(UA_DeleteReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_DeleteReferencesResponse_clear(UA_DeleteReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]);
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
}

static UA_INLINE UA_StatusCode
UA_RelativePathElement_copy(const UA_RelativePathElement *src, UA_RelativePathElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);
}

static UA_INLINE void
UA_RelativePathElement_deleteMembers(UA_RelativePathElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);
}

static UA_INLINE void
UA_RelativePathElement_clear(UA_RelativePathElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);







|







20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
}

static UA_INLINE UA_StatusCode
UA_RelativePathElement_copy(const UA_RelativePathElement *src, UA_RelativePathElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_RelativePathElement_deleteMembers(UA_RelativePathElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);
}

static UA_INLINE void
UA_RelativePathElement_clear(UA_RelativePathElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]);
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
}

static UA_INLINE UA_StatusCode
UA_SubscriptionAcknowledgement_copy(const UA_SubscriptionAcknowledgement *src, UA_SubscriptionAcknowledgement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);
}

static UA_INLINE void
UA_SubscriptionAcknowledgement_deleteMembers(UA_SubscriptionAcknowledgement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);
}

static UA_INLINE void
UA_SubscriptionAcknowledgement_clear(UA_SubscriptionAcknowledgement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);







|







20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
}

static UA_INLINE UA_StatusCode
UA_SubscriptionAcknowledgement_copy(const UA_SubscriptionAcknowledgement *src, UA_SubscriptionAcknowledgement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_SubscriptionAcknowledgement_deleteMembers(UA_SubscriptionAcknowledgement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);
}

static UA_INLINE void
UA_SubscriptionAcknowledgement_clear(UA_SubscriptionAcknowledgement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]);
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
}

static UA_INLINE UA_StatusCode
UA_ConfigurationVersionDataType_copy(const UA_ConfigurationVersionDataType *src, UA_ConfigurationVersionDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
}

static UA_INLINE void
UA_ConfigurationVersionDataType_deleteMembers(UA_ConfigurationVersionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
}

static UA_INLINE void
UA_ConfigurationVersionDataType_clear(UA_ConfigurationVersionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);







|







20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
}

static UA_INLINE UA_StatusCode
UA_ConfigurationVersionDataType_copy(const UA_ConfigurationVersionDataType *src, UA_ConfigurationVersionDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ConfigurationVersionDataType_deleteMembers(UA_ConfigurationVersionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
}

static UA_INLINE void
UA_ConfigurationVersionDataType_clear(UA_ConfigurationVersionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659































20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
}

static UA_INLINE UA_StatusCode
UA_DataSetFieldContentMask_copy(const UA_DataSetFieldContentMask *src, UA_DataSetFieldContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

static UA_INLINE void
UA_DataSetFieldContentMask_deleteMembers(UA_DataSetFieldContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

static UA_INLINE void
UA_DataSetFieldContentMask_clear(UA_DataSetFieldContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

static UA_INLINE void
UA_DataSetFieldContentMask_delete(UA_DataSetFieldContentMask *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}
































/* PublishedVariableDataType */
static UA_INLINE void
UA_PublishedVariableDataType_init(UA_PublishedVariableDataType *p) {
    memset(p, 0, sizeof(UA_PublishedVariableDataType));
}

static UA_INLINE UA_PublishedVariableDataType *
UA_PublishedVariableDataType_new(void) {
    return (UA_PublishedVariableDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PublishedVariableDataType_copy(const UA_PublishedVariableDataType *src, UA_PublishedVariableDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

static UA_INLINE void
UA_PublishedVariableDataType_deleteMembers(UA_PublishedVariableDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

static UA_INLINE void
UA_PublishedVariableDataType_clear(UA_PublishedVariableDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
}

static UA_INLINE UA_StatusCode
UA_DataSetFieldContentMask_copy(const UA_DataSetFieldContentMask *src, UA_DataSetFieldContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetFieldContentMask_deleteMembers(UA_DataSetFieldContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

static UA_INLINE void
UA_DataSetFieldContentMask_clear(UA_DataSetFieldContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

static UA_INLINE void
UA_DataSetFieldContentMask_delete(UA_DataSetFieldContentMask *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATASETFIELDCONTENTMASK]);
}

/* TransferResult */
static UA_INLINE void
UA_TransferResult_init(UA_TransferResult *p) {
    memset(p, 0, sizeof(UA_TransferResult));
}

static UA_INLINE UA_TransferResult *
UA_TransferResult_new(void) {
    return (UA_TransferResult*)UA_new(&UA_TYPES[UA_TYPES_TRANSFERRESULT]);
}

static UA_INLINE UA_StatusCode
UA_TransferResult_copy(const UA_TransferResult *src, UA_TransferResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSFERRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_TransferResult_deleteMembers(UA_TransferResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERRESULT]);
}

static UA_INLINE void
UA_TransferResult_clear(UA_TransferResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERRESULT]);
}

static UA_INLINE void
UA_TransferResult_delete(UA_TransferResult *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_TRANSFERRESULT]);
}

/* PublishedVariableDataType */
static UA_INLINE void
UA_PublishedVariableDataType_init(UA_PublishedVariableDataType *p) {
    memset(p, 0, sizeof(UA_PublishedVariableDataType));
}

static UA_INLINE UA_PublishedVariableDataType *
UA_PublishedVariableDataType_new(void) {
    return (UA_PublishedVariableDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PublishedVariableDataType_copy(const UA_PublishedVariableDataType *src, UA_PublishedVariableDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishedVariableDataType_deleteMembers(UA_PublishedVariableDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
}

static UA_INLINE void
UA_PublishedVariableDataType_clear(UA_PublishedVariableDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDVARIABLEDATATYPE]);
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721































20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
}

static UA_INLINE UA_StatusCode
UA_CreateMonitoredItemsResponse_copy(const UA_CreateMonitoredItemsResponse *src, UA_CreateMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_CreateMonitoredItemsResponse_deleteMembers(UA_CreateMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_CreateMonitoredItemsResponse_clear(UA_CreateMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_CreateMonitoredItemsResponse_delete(UA_CreateMonitoredItemsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}
































/* OverrideValueHandling */
static UA_INLINE void
UA_OverrideValueHandling_init(UA_OverrideValueHandling *p) {
    memset(p, 0, sizeof(UA_OverrideValueHandling));
}

static UA_INLINE UA_OverrideValueHandling *
UA_OverrideValueHandling_new(void) {
    return (UA_OverrideValueHandling*)UA_new(&UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

static UA_INLINE UA_StatusCode
UA_OverrideValueHandling_copy(const UA_OverrideValueHandling *src, UA_OverrideValueHandling *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

static UA_INLINE void
UA_OverrideValueHandling_deleteMembers(UA_OverrideValueHandling *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

static UA_INLINE void
UA_OverrideValueHandling_clear(UA_OverrideValueHandling *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
}

static UA_INLINE UA_StatusCode
UA_CreateMonitoredItemsResponse_copy(const UA_CreateMonitoredItemsResponse *src, UA_CreateMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateMonitoredItemsResponse_deleteMembers(UA_CreateMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_CreateMonitoredItemsResponse_clear(UA_CreateMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_CreateMonitoredItemsResponse_delete(UA_CreateMonitoredItemsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
}

/* RolePermissionType */
static UA_INLINE void
UA_RolePermissionType_init(UA_RolePermissionType *p) {
    memset(p, 0, sizeof(UA_RolePermissionType));
}

static UA_INLINE UA_RolePermissionType *
UA_RolePermissionType_new(void) {
    return (UA_RolePermissionType*)UA_new(&UA_TYPES[UA_TYPES_ROLEPERMISSIONTYPE]);
}

static UA_INLINE UA_StatusCode
UA_RolePermissionType_copy(const UA_RolePermissionType *src, UA_RolePermissionType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ROLEPERMISSIONTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_RolePermissionType_deleteMembers(UA_RolePermissionType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ROLEPERMISSIONTYPE]);
}

static UA_INLINE void
UA_RolePermissionType_clear(UA_RolePermissionType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ROLEPERMISSIONTYPE]);
}

static UA_INLINE void
UA_RolePermissionType_delete(UA_RolePermissionType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_ROLEPERMISSIONTYPE]);
}

/* OverrideValueHandling */
static UA_INLINE void
UA_OverrideValueHandling_init(UA_OverrideValueHandling *p) {
    memset(p, 0, sizeof(UA_OverrideValueHandling));
}

static UA_INLINE UA_OverrideValueHandling *
UA_OverrideValueHandling_new(void) {
    return (UA_OverrideValueHandling*)UA_new(&UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

static UA_INLINE UA_StatusCode
UA_OverrideValueHandling_copy(const UA_OverrideValueHandling *src, UA_OverrideValueHandling *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

UA_DEPRECATED static UA_INLINE void
UA_OverrideValueHandling_deleteMembers(UA_OverrideValueHandling *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
}

static UA_INLINE void
UA_OverrideValueHandling_clear(UA_OverrideValueHandling *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OVERRIDEVALUEHANDLING]);
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateResult_copy(const UA_HistoryUpdateResult *src, UA_HistoryUpdateResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);
}

static UA_INLINE void
UA_HistoryUpdateResult_deleteMembers(UA_HistoryUpdateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);
}

static UA_INLINE void
UA_HistoryUpdateResult_clear(UA_HistoryUpdateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);







|







21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateResult_copy(const UA_HistoryUpdateResult *src, UA_HistoryUpdateResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryUpdateResult_deleteMembers(UA_HistoryUpdateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);
}

static UA_INLINE void
UA_HistoryUpdateResult_clear(UA_HistoryUpdateResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESULT]);
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesItem_copy(const UA_DeleteReferencesItem *src, UA_DeleteReferencesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);
}

static UA_INLINE void
UA_DeleteReferencesItem_deleteMembers(UA_DeleteReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);
}

static UA_INLINE void
UA_DeleteReferencesItem_clear(UA_DeleteReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);







|







21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesItem_copy(const UA_DeleteReferencesItem *src, UA_DeleteReferencesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteReferencesItem_deleteMembers(UA_DeleteReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);
}

static UA_INLINE void
UA_DeleteReferencesItem_clear(UA_DeleteReferencesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]);
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
}

static UA_INLINE UA_StatusCode
UA_WriteValue_copy(const UA_WriteValue *src, UA_WriteValue *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITEVALUE]);
}

static UA_INLINE void
UA_WriteValue_deleteMembers(UA_WriteValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEVALUE]);
}

static UA_INLINE void
UA_WriteValue_clear(UA_WriteValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEVALUE]);







|







21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
}

static UA_INLINE UA_StatusCode
UA_WriteValue_copy(const UA_WriteValue *src, UA_WriteValue *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITEVALUE]);
}

UA_DEPRECATED static UA_INLINE void
UA_WriteValue_deleteMembers(UA_WriteValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEVALUE]);
}

static UA_INLINE void
UA_WriteValue_clear(UA_WriteValue *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEVALUE]);
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
}

static UA_INLINE UA_StatusCode
UA_ModificationInfo_copy(const UA_ModificationInfo *src, UA_ModificationInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);
}

static UA_INLINE void
UA_ModificationInfo_deleteMembers(UA_ModificationInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);
}

static UA_INLINE void
UA_ModificationInfo_clear(UA_ModificationInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);







|







21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
}

static UA_INLINE UA_StatusCode
UA_ModificationInfo_copy(const UA_ModificationInfo *src, UA_ModificationInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);
}

UA_DEPRECATED static UA_INLINE void
UA_ModificationInfo_deleteMembers(UA_ModificationInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);
}

static UA_INLINE void
UA_ModificationInfo_clear(UA_ModificationInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFICATIONINFO]);
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907































20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
}

static UA_INLINE UA_StatusCode
UA_DataTypeAttributes_copy(const UA_DataTypeAttributes *src, UA_DataTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

static UA_INLINE void
UA_DataTypeAttributes_deleteMembers(UA_DataTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

static UA_INLINE void
UA_DataTypeAttributes_clear(UA_DataTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

static UA_INLINE void
UA_DataTypeAttributes_delete(UA_DataTypeAttributes *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}
































/* HistoryReadRequest */
static UA_INLINE void
UA_HistoryReadRequest_init(UA_HistoryReadRequest *p) {
    memset(p, 0, sizeof(UA_HistoryReadRequest));
}

static UA_INLINE UA_HistoryReadRequest *
UA_HistoryReadRequest_new(void) {
    return (UA_HistoryReadRequest*)UA_new(&UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

static UA_INLINE UA_StatusCode
UA_HistoryReadRequest_copy(const UA_HistoryReadRequest *src, UA_HistoryReadRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

static UA_INLINE void
UA_HistoryReadRequest_deleteMembers(UA_HistoryReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

static UA_INLINE void
UA_HistoryReadRequest_clear(UA_HistoryReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
}

static UA_INLINE UA_StatusCode
UA_DataTypeAttributes_copy(const UA_DataTypeAttributes *src, UA_DataTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataTypeAttributes_deleteMembers(UA_DataTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

static UA_INLINE void
UA_DataTypeAttributes_clear(UA_DataTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

static UA_INLINE void
UA_DataTypeAttributes_delete(UA_DataTypeAttributes *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]);
}

/* TransferSubscriptionsResponse */
static UA_INLINE void
UA_TransferSubscriptionsResponse_init(UA_TransferSubscriptionsResponse *p) {
    memset(p, 0, sizeof(UA_TransferSubscriptionsResponse));
}

static UA_INLINE UA_TransferSubscriptionsResponse *
UA_TransferSubscriptionsResponse_new(void) {
    return (UA_TransferSubscriptionsResponse*)UA_new(&UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE UA_StatusCode
UA_TransferSubscriptionsResponse_copy(const UA_TransferSubscriptionsResponse *src, UA_TransferSubscriptionsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_TransferSubscriptionsResponse_deleteMembers(UA_TransferSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE void
UA_TransferSubscriptionsResponse_clear(UA_TransferSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE void
UA_TransferSubscriptionsResponse_delete(UA_TransferSubscriptionsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSRESPONSE]);
}

/* HistoryReadRequest */
static UA_INLINE void
UA_HistoryReadRequest_init(UA_HistoryReadRequest *p) {
    memset(p, 0, sizeof(UA_HistoryReadRequest));
}

static UA_INLINE UA_HistoryReadRequest *
UA_HistoryReadRequest_new(void) {
    return (UA_HistoryReadRequest*)UA_new(&UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

static UA_INLINE UA_StatusCode
UA_HistoryReadRequest_copy(const UA_HistoryReadRequest *src, UA_HistoryReadRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryReadRequest_deleteMembers(UA_HistoryReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
}

static UA_INLINE void
UA_HistoryReadRequest_clear(UA_HistoryReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADREQUEST]);
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
}

static UA_INLINE UA_StatusCode
UA_AddReferencesResponse_copy(const UA_AddReferencesResponse *src, UA_AddReferencesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_AddReferencesResponse_deleteMembers(UA_AddReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_AddReferencesResponse_clear(UA_AddReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);







|







21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
}

static UA_INLINE UA_StatusCode
UA_AddReferencesResponse_copy(const UA_AddReferencesResponse *src, UA_AddReferencesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddReferencesResponse_deleteMembers(UA_AddReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
}

static UA_INLINE void
UA_AddReferencesResponse_clear(UA_AddReferencesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]);
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
}

static UA_INLINE UA_StatusCode
UA_DeadbandType_copy(const UA_DeadbandType *src, UA_DeadbandType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);
}

static UA_INLINE void
UA_DeadbandType_deleteMembers(UA_DeadbandType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);
}

static UA_INLINE void
UA_DeadbandType_clear(UA_DeadbandType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);







|







21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
}

static UA_INLINE UA_StatusCode
UA_DeadbandType_copy(const UA_DeadbandType *src, UA_DeadbandType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeadbandType_deleteMembers(UA_DeadbandType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);
}

static UA_INLINE void
UA_DeadbandType_clear(UA_DeadbandType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DEADBANDTYPE]);
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
}

static UA_INLINE UA_StatusCode
UA_DataChangeTrigger_copy(const UA_DataChangeTrigger *src, UA_DataChangeTrigger *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);
}

static UA_INLINE void
UA_DataChangeTrigger_deleteMembers(UA_DataChangeTrigger *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);
}

static UA_INLINE void
UA_DataChangeTrigger_clear(UA_DataChangeTrigger *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);







|







21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
}

static UA_INLINE UA_StatusCode
UA_DataChangeTrigger_copy(const UA_DataChangeTrigger *src, UA_DataChangeTrigger *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataChangeTrigger_deleteMembers(UA_DataChangeTrigger *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);
}

static UA_INLINE void
UA_DataChangeTrigger_clear(UA_DataChangeTrigger *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGETRIGGER]);
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
}

static UA_INLINE UA_StatusCode
UA_BuildInfo_copy(const UA_BuildInfo *src, UA_BuildInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BUILDINFO]);
}

static UA_INLINE void
UA_BuildInfo_deleteMembers(UA_BuildInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BUILDINFO]);
}

static UA_INLINE void
UA_BuildInfo_clear(UA_BuildInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BUILDINFO]);







|







21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
}

static UA_INLINE UA_StatusCode
UA_BuildInfo_copy(const UA_BuildInfo *src, UA_BuildInfo *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BUILDINFO]);
}

UA_DEPRECATED static UA_INLINE void
UA_BuildInfo_deleteMembers(UA_BuildInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BUILDINFO]);
}

static UA_INLINE void
UA_BuildInfo_clear(UA_BuildInfo *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BUILDINFO]);
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
}

static UA_INLINE UA_StatusCode
UA_FilterOperand_copy(const UA_FilterOperand *src, UA_FilterOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FILTEROPERAND]);
}

static UA_INLINE void
UA_FilterOperand_deleteMembers(UA_FilterOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERAND]);
}

static UA_INLINE void
UA_FilterOperand_clear(UA_FilterOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERAND]);







|







21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
}

static UA_INLINE UA_StatusCode
UA_FilterOperand_copy(const UA_FilterOperand *src, UA_FilterOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FILTEROPERAND]);
}

UA_DEPRECATED static UA_INLINE void
UA_FilterOperand_deleteMembers(UA_FilterOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERAND]);
}

static UA_INLINE void
UA_FilterOperand_clear(UA_FilterOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERAND]);
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
}

static UA_INLINE UA_StatusCode
UA_MonitoringParameters_copy(const UA_MonitoringParameters *src, UA_MonitoringParameters *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);
}

static UA_INLINE void
UA_MonitoringParameters_deleteMembers(UA_MonitoringParameters *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);
}

static UA_INLINE void
UA_MonitoringParameters_clear(UA_MonitoringParameters *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);







|







21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
}

static UA_INLINE UA_StatusCode
UA_MonitoringParameters_copy(const UA_MonitoringParameters *src, UA_MonitoringParameters *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoringParameters_deleteMembers(UA_MonitoringParameters *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);
}

static UA_INLINE void
UA_MonitoringParameters_clear(UA_MonitoringParameters *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]);
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
}

static UA_INLINE UA_StatusCode
UA_DoubleComplexNumberType_copy(const UA_DoubleComplexNumberType *src, UA_DoubleComplexNumberType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_DoubleComplexNumberType_deleteMembers(UA_DoubleComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_DoubleComplexNumberType_clear(UA_DoubleComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);







|







21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
}

static UA_INLINE UA_StatusCode
UA_DoubleComplexNumberType_copy(const UA_DoubleComplexNumberType *src, UA_DoubleComplexNumberType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DoubleComplexNumberType_deleteMembers(UA_DoubleComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_DoubleComplexNumberType_clear(UA_DoubleComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE]);
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186































21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesItem_copy(const UA_DeleteNodesItem *src, UA_DeleteNodesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

static UA_INLINE void
UA_DeleteNodesItem_deleteMembers(UA_DeleteNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

static UA_INLINE void
UA_DeleteNodesItem_clear(UA_DeleteNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

static UA_INLINE void
UA_DeleteNodesItem_delete(UA_DeleteNodesItem *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}
































/* ReadValueId */
static UA_INLINE void
UA_ReadValueId_init(UA_ReadValueId *p) {
    memset(p, 0, sizeof(UA_ReadValueId));
}

static UA_INLINE UA_ReadValueId *
UA_ReadValueId_new(void) {
    return (UA_ReadValueId*)UA_new(&UA_TYPES[UA_TYPES_READVALUEID]);
}

static UA_INLINE UA_StatusCode
UA_ReadValueId_copy(const UA_ReadValueId *src, UA_ReadValueId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READVALUEID]);
}

static UA_INLINE void
UA_ReadValueId_deleteMembers(UA_ReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READVALUEID]);
}

static UA_INLINE void
UA_ReadValueId_clear(UA_ReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READVALUEID]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesItem_copy(const UA_DeleteNodesItem *src, UA_DeleteNodesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteNodesItem_deleteMembers(UA_DeleteNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

static UA_INLINE void
UA_DeleteNodesItem_clear(UA_DeleteNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

static UA_INLINE void
UA_DeleteNodesItem_delete(UA_DeleteNodesItem *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DELETENODESITEM]);
}

/* DatagramWriterGroupTransportDataType */
static UA_INLINE void
UA_DatagramWriterGroupTransportDataType_init(UA_DatagramWriterGroupTransportDataType *p) {
    memset(p, 0, sizeof(UA_DatagramWriterGroupTransportDataType));
}

static UA_INLINE UA_DatagramWriterGroupTransportDataType *
UA_DatagramWriterGroupTransportDataType_new(void) {
    return (UA_DatagramWriterGroupTransportDataType*)UA_new(&UA_TYPES[UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_DatagramWriterGroupTransportDataType_copy(const UA_DatagramWriterGroupTransportDataType *src, UA_DatagramWriterGroupTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DatagramWriterGroupTransportDataType_deleteMembers(UA_DatagramWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_DatagramWriterGroupTransportDataType_clear(UA_DatagramWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_DatagramWriterGroupTransportDataType_delete(UA_DatagramWriterGroupTransportDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATAGRAMWRITERGROUPTRANSPORTDATATYPE]);
}

/* ReadValueId */
static UA_INLINE void
UA_ReadValueId_init(UA_ReadValueId *p) {
    memset(p, 0, sizeof(UA_ReadValueId));
}

static UA_INLINE UA_ReadValueId *
UA_ReadValueId_new(void) {
    return (UA_ReadValueId*)UA_new(&UA_TYPES[UA_TYPES_READVALUEID]);
}

static UA_INLINE UA_StatusCode
UA_ReadValueId_copy(const UA_ReadValueId *src, UA_ReadValueId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READVALUEID]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadValueId_deleteMembers(UA_ReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READVALUEID]);
}

static UA_INLINE void
UA_ReadValueId_clear(UA_ReadValueId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READVALUEID]);
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
}

static UA_INLINE UA_StatusCode
UA_CallRequest_copy(const UA_CallRequest *src, UA_CallRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLREQUEST]);
}

static UA_INLINE void
UA_CallRequest_deleteMembers(UA_CallRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLREQUEST]);
}

static UA_INLINE void
UA_CallRequest_clear(UA_CallRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLREQUEST]);







|







21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
}

static UA_INLINE UA_StatusCode
UA_CallRequest_copy(const UA_CallRequest *src, UA_CallRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CallRequest_deleteMembers(UA_CallRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLREQUEST]);
}

static UA_INLINE void
UA_CallRequest_clear(UA_CallRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLREQUEST]);
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
}

static UA_INLINE UA_StatusCode
UA_RelativePath_copy(const UA_RelativePath *src, UA_RelativePath *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RELATIVEPATH]);
}

static UA_INLINE void
UA_RelativePath_deleteMembers(UA_RelativePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATH]);
}

static UA_INLINE void
UA_RelativePath_clear(UA_RelativePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATH]);







|







21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
}

static UA_INLINE UA_StatusCode
UA_RelativePath_copy(const UA_RelativePath *src, UA_RelativePath *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RELATIVEPATH]);
}

UA_DEPRECATED static UA_INLINE void
UA_RelativePath_deleteMembers(UA_RelativePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATH]);
}

static UA_INLINE void
UA_RelativePath_clear(UA_RelativePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RELATIVEPATH]);
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesRequest_copy(const UA_DeleteNodesRequest *src, UA_DeleteNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);
}

static UA_INLINE void
UA_DeleteNodesRequest_deleteMembers(UA_DeleteNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);
}

static UA_INLINE void
UA_DeleteNodesRequest_clear(UA_DeleteNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);







|







21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesRequest_copy(const UA_DeleteNodesRequest *src, UA_DeleteNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteNodesRequest_deleteMembers(UA_DeleteNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);
}

static UA_INLINE void
UA_DeleteNodesRequest_clear(UA_DeleteNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]);
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
}

static UA_INLINE UA_StatusCode
UA_BrokerDataSetWriterTransportDataType_copy(const UA_BrokerDataSetWriterTransportDataType *src, UA_BrokerDataSetWriterTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetWriterTransportDataType_deleteMembers(UA_BrokerDataSetWriterTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetWriterTransportDataType_clear(UA_BrokerDataSetWriterTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);







|







21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
}

static UA_INLINE UA_StatusCode
UA_BrokerDataSetWriterTransportDataType_copy(const UA_BrokerDataSetWriterTransportDataType *src, UA_BrokerDataSetWriterTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrokerDataSetWriterTransportDataType_deleteMembers(UA_BrokerDataSetWriterTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetWriterTransportDataType_clear(UA_BrokerDataSetWriterTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETWRITERTRANSPORTDATATYPE]);
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemModifyRequest_copy(const UA_MonitoredItemModifyRequest *src, UA_MonitoredItemModifyRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemModifyRequest_deleteMembers(UA_MonitoredItemModifyRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemModifyRequest_clear(UA_MonitoredItemModifyRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);







|







21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemModifyRequest_copy(const UA_MonitoredItemModifyRequest *src, UA_MonitoredItemModifyRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoredItemModifyRequest_deleteMembers(UA_MonitoredItemModifyRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemModifyRequest_clear(UA_MonitoredItemModifyRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]);
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
}

static UA_INLINE UA_StatusCode
UA_DeleteRawModifiedDetails_copy(const UA_DeleteRawModifiedDetails *src, UA_DeleteRawModifiedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_DeleteRawModifiedDetails_deleteMembers(UA_DeleteRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_DeleteRawModifiedDetails_clear(UA_DeleteRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);







|







21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
}

static UA_INLINE UA_StatusCode
UA_DeleteRawModifiedDetails_copy(const UA_DeleteRawModifiedDetails *src, UA_DeleteRawModifiedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteRawModifiedDetails_deleteMembers(UA_DeleteRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);
}

static UA_INLINE void
UA_DeleteRawModifiedDetails_clear(UA_DeleteRawModifiedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETERAWMODIFIEDDETAILS]);
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
}

static UA_INLINE UA_StatusCode
UA_UserTokenType_copy(const UA_UserTokenType *src, UA_UserTokenType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);
}

static UA_INLINE void
UA_UserTokenType_deleteMembers(UA_UserTokenType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);
}

static UA_INLINE void
UA_UserTokenType_clear(UA_UserTokenType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);







|







21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
}

static UA_INLINE UA_StatusCode
UA_UserTokenType_copy(const UA_UserTokenType *src, UA_UserTokenType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UserTokenType_deleteMembers(UA_UserTokenType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);
}

static UA_INLINE void
UA_UserTokenType_clear(UA_UserTokenType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENTYPE]);
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
}

static UA_INLINE UA_StatusCode
UA_AggregateConfiguration_copy(const UA_AggregateConfiguration *src, UA_AggregateConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);
}

static UA_INLINE void
UA_AggregateConfiguration_deleteMembers(UA_AggregateConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);
}

static UA_INLINE void
UA_AggregateConfiguration_clear(UA_AggregateConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);







|







21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
}

static UA_INLINE UA_StatusCode
UA_AggregateConfiguration_copy(const UA_AggregateConfiguration *src, UA_AggregateConfiguration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_AggregateConfiguration_deleteMembers(UA_AggregateConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);
}

static UA_INLINE void
UA_AggregateConfiguration_clear(UA_AggregateConfiguration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATECONFIGURATION]);
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
}

static UA_INLINE UA_StatusCode
UA_LocaleId_copy(const UA_LocaleId *src, UA_LocaleId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LOCALEID]);
}

static UA_INLINE void
UA_LocaleId_deleteMembers(UA_LocaleId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALEID]);
}

static UA_INLINE void
UA_LocaleId_clear(UA_LocaleId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALEID]);







|







21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
}

static UA_INLINE UA_StatusCode
UA_LocaleId_copy(const UA_LocaleId *src, UA_LocaleId *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_LOCALEID]);
}

UA_DEPRECATED static UA_INLINE void
UA_LocaleId_deleteMembers(UA_LocaleId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALEID]);
}

static UA_INLINE void
UA_LocaleId_clear(UA_LocaleId *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_LOCALEID]);
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
}

static UA_INLINE UA_StatusCode
UA_UnregisterNodesResponse_copy(const UA_UnregisterNodesResponse *src, UA_UnregisterNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_UnregisterNodesResponse_deleteMembers(UA_UnregisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_UnregisterNodesResponse_clear(UA_UnregisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);







|







21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
}

static UA_INLINE UA_StatusCode
UA_UnregisterNodesResponse_copy(const UA_UnregisterNodesResponse *src, UA_UnregisterNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UnregisterNodesResponse_deleteMembers(UA_UnregisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_UnregisterNodesResponse_clear(UA_UnregisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
}

static UA_INLINE UA_StatusCode
UA_ReadAtTimeDetails_copy(const UA_ReadAtTimeDetails *src, UA_ReadAtTimeDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);
}

static UA_INLINE void
UA_ReadAtTimeDetails_deleteMembers(UA_ReadAtTimeDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);
}

static UA_INLINE void
UA_ReadAtTimeDetails_clear(UA_ReadAtTimeDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);







|







21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
}

static UA_INLINE UA_StatusCode
UA_ReadAtTimeDetails_copy(const UA_ReadAtTimeDetails *src, UA_ReadAtTimeDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadAtTimeDetails_deleteMembers(UA_ReadAtTimeDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);
}

static UA_INLINE void
UA_ReadAtTimeDetails_clear(UA_ReadAtTimeDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READATTIMEDETAILS]);
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
}

static UA_INLINE UA_StatusCode
UA_ContentFilterResult_copy(const UA_ContentFilterResult *src, UA_ContentFilterResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);
}

static UA_INLINE void
UA_ContentFilterResult_deleteMembers(UA_ContentFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);
}

static UA_INLINE void
UA_ContentFilterResult_clear(UA_ContentFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);







|







22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
}

static UA_INLINE UA_StatusCode
UA_ContentFilterResult_copy(const UA_ContentFilterResult *src, UA_ContentFilterResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_ContentFilterResult_deleteMembers(UA_ContentFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);
}

static UA_INLINE void
UA_ContentFilterResult_clear(UA_ContentFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]);
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
}

static UA_INLINE UA_StatusCode
UA_HistoryReadResponse_copy(const UA_HistoryReadResponse *src, UA_HistoryReadResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);
}

static UA_INLINE void
UA_HistoryReadResponse_deleteMembers(UA_HistoryReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);
}

static UA_INLINE void
UA_HistoryReadResponse_clear(UA_HistoryReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);







|







22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
}

static UA_INLINE UA_StatusCode
UA_HistoryReadResponse_copy(const UA_HistoryReadResponse *src, UA_HistoryReadResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryReadResponse_deleteMembers(UA_HistoryReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);
}

static UA_INLINE void
UA_HistoryReadResponse_clear(UA_HistoryReadResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYREADRESPONSE]);
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
}

static UA_INLINE UA_StatusCode
UA_SimpleTypeDescription_copy(const UA_SimpleTypeDescription *src, UA_SimpleTypeDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);
}

static UA_INLINE void
UA_SimpleTypeDescription_deleteMembers(UA_SimpleTypeDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);
}

static UA_INLINE void
UA_SimpleTypeDescription_clear(UA_SimpleTypeDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);







|







22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
}

static UA_INLINE UA_StatusCode
UA_SimpleTypeDescription_copy(const UA_SimpleTypeDescription *src, UA_SimpleTypeDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_SimpleTypeDescription_deleteMembers(UA_SimpleTypeDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);
}

static UA_INLINE void
UA_SimpleTypeDescription_clear(UA_SimpleTypeDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLETYPEDESCRIPTION]);
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
}

static UA_INLINE UA_StatusCode
UA_UserTokenPolicy_copy(const UA_UserTokenPolicy *src, UA_UserTokenPolicy *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);
}

static UA_INLINE void
UA_UserTokenPolicy_deleteMembers(UA_UserTokenPolicy *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);
}

static UA_INLINE void
UA_UserTokenPolicy_clear(UA_UserTokenPolicy *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);







|







22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
}

static UA_INLINE UA_StatusCode
UA_UserTokenPolicy_copy(const UA_UserTokenPolicy *src, UA_UserTokenPolicy *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);
}

UA_DEPRECATED static UA_INLINE void
UA_UserTokenPolicy_deleteMembers(UA_UserTokenPolicy *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);
}

static UA_INLINE void
UA_UserTokenPolicy_clear(UA_UserTokenPolicy *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]);
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
}

static UA_INLINE UA_StatusCode
UA_DeleteMonitoredItemsRequest_copy(const UA_DeleteMonitoredItemsRequest *src, UA_DeleteMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsRequest_deleteMembers(UA_DeleteMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsRequest_clear(UA_DeleteMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);







|







22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
}

static UA_INLINE UA_StatusCode
UA_DeleteMonitoredItemsRequest_copy(const UA_DeleteMonitoredItemsRequest *src, UA_DeleteMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteMonitoredItemsRequest_deleteMembers(UA_DeleteMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_DeleteMonitoredItemsRequest_clear(UA_DeleteMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]);
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
}

static UA_INLINE UA_StatusCode
UA_SetMonitoringModeRequest_copy(const UA_SetMonitoringModeRequest *src, UA_SetMonitoringModeRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetMonitoringModeRequest_deleteMembers(UA_SetMonitoringModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetMonitoringModeRequest_clear(UA_SetMonitoringModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);







|







22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
}

static UA_INLINE UA_StatusCode
UA_SetMonitoringModeRequest_copy(const UA_SetMonitoringModeRequest *src, UA_SetMonitoringModeRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetMonitoringModeRequest_deleteMembers(UA_SetMonitoringModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);
}

static UA_INLINE void
UA_SetMonitoringModeRequest_clear(UA_SetMonitoringModeRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETMONITORINGMODEREQUEST]);
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
}

static UA_INLINE UA_StatusCode
UA_Duration_copy(const UA_Duration *src, UA_Duration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DURATION]);
}

static UA_INLINE void
UA_Duration_deleteMembers(UA_Duration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DURATION]);
}

static UA_INLINE void
UA_Duration_clear(UA_Duration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DURATION]);







|







22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
}

static UA_INLINE UA_StatusCode
UA_Duration_copy(const UA_Duration *src, UA_Duration *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DURATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_Duration_deleteMembers(UA_Duration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DURATION]);
}

static UA_INLINE void
UA_Duration_clear(UA_Duration *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DURATION]);
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
}

static UA_INLINE UA_StatusCode
UA_ReferenceTypeAttributes_copy(const UA_ReferenceTypeAttributes *src, UA_ReferenceTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ReferenceTypeAttributes_deleteMembers(UA_ReferenceTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ReferenceTypeAttributes_clear(UA_ReferenceTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);







|







22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
}

static UA_INLINE UA_StatusCode
UA_ReferenceTypeAttributes_copy(const UA_ReferenceTypeAttributes *src, UA_ReferenceTypeAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReferenceTypeAttributes_deleteMembers(UA_ReferenceTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);
}

static UA_INLINE void
UA_ReferenceTypeAttributes_clear(UA_ReferenceTypeAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]);
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
}

static UA_INLINE UA_StatusCode
UA_DataSetFieldFlags_copy(const UA_DataSetFieldFlags *src, UA_DataSetFieldFlags *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);
}

static UA_INLINE void
UA_DataSetFieldFlags_deleteMembers(UA_DataSetFieldFlags *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);
}

static UA_INLINE void
UA_DataSetFieldFlags_clear(UA_DataSetFieldFlags *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);







|







22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
}

static UA_INLINE UA_StatusCode
UA_DataSetFieldFlags_copy(const UA_DataSetFieldFlags *src, UA_DataSetFieldFlags *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetFieldFlags_deleteMembers(UA_DataSetFieldFlags *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);
}

static UA_INLINE void
UA_DataSetFieldFlags_clear(UA_DataSetFieldFlags *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETFIELDFLAGS]);
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
}

static UA_INLINE UA_StatusCode
UA_GetEndpointsRequest_copy(const UA_GetEndpointsRequest *src, UA_GetEndpointsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);
}

static UA_INLINE void
UA_GetEndpointsRequest_deleteMembers(UA_GetEndpointsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);
}

static UA_INLINE void
UA_GetEndpointsRequest_clear(UA_GetEndpointsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);







|







22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
}

static UA_INLINE UA_StatusCode
UA_GetEndpointsRequest_copy(const UA_GetEndpointsRequest *src, UA_GetEndpointsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_GetEndpointsRequest_deleteMembers(UA_GetEndpointsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);
}

static UA_INLINE void
UA_GetEndpointsRequest_clear(UA_GetEndpointsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]);
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899































21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
}

static UA_INLINE UA_StatusCode
UA_CloseSecureChannelResponse_copy(const UA_CloseSecureChannelResponse *src, UA_CloseSecureChannelResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_CloseSecureChannelResponse_deleteMembers(UA_CloseSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_CloseSecureChannelResponse_clear(UA_CloseSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_CloseSecureChannelResponse_delete(UA_CloseSecureChannelResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}
































/* PubSubState */
static UA_INLINE void
UA_PubSubState_init(UA_PubSubState *p) {
    memset(p, 0, sizeof(UA_PubSubState));
}

static UA_INLINE UA_PubSubState *
UA_PubSubState_new(void) {
    return (UA_PubSubState*)UA_new(&UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

static UA_INLINE UA_StatusCode
UA_PubSubState_copy(const UA_PubSubState *src, UA_PubSubState *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

static UA_INLINE void
UA_PubSubState_deleteMembers(UA_PubSubState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

static UA_INLINE void
UA_PubSubState_clear(UA_PubSubState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
}

static UA_INLINE UA_StatusCode
UA_CloseSecureChannelResponse_copy(const UA_CloseSecureChannelResponse *src, UA_CloseSecureChannelResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CloseSecureChannelResponse_deleteMembers(UA_CloseSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_CloseSecureChannelResponse_clear(UA_CloseSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_CloseSecureChannelResponse_delete(UA_CloseSecureChannelResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]);
}

/* PublishedDataItemsDataType */
static UA_INLINE void
UA_PublishedDataItemsDataType_init(UA_PublishedDataItemsDataType *p) {
    memset(p, 0, sizeof(UA_PublishedDataItemsDataType));
}

static UA_INLINE UA_PublishedDataItemsDataType *
UA_PublishedDataItemsDataType_new(void) {
    return (UA_PublishedDataItemsDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBLISHEDDATAITEMSDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PublishedDataItemsDataType_copy(const UA_PublishedDataItemsDataType *src, UA_PublishedDataItemsDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHEDDATAITEMSDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishedDataItemsDataType_deleteMembers(UA_PublishedDataItemsDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATAITEMSDATATYPE]);
}

static UA_INLINE void
UA_PublishedDataItemsDataType_clear(UA_PublishedDataItemsDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATAITEMSDATATYPE]);
}

static UA_INLINE void
UA_PublishedDataItemsDataType_delete(UA_PublishedDataItemsDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATAITEMSDATATYPE]);
}

/* PubSubState */
static UA_INLINE void
UA_PubSubState_init(UA_PubSubState *p) {
    memset(p, 0, sizeof(UA_PubSubState));
}

static UA_INLINE UA_PubSubState *
UA_PubSubState_new(void) {
    return (UA_PubSubState*)UA_new(&UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

static UA_INLINE UA_StatusCode
UA_PubSubState_copy(const UA_PubSubState *src, UA_PubSubState *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PubSubState_deleteMembers(UA_PubSubState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);
}

static UA_INLINE void
UA_PubSubState_clear(UA_PubSubState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBSTATE]);
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
}

static UA_INLINE UA_StatusCode
UA_ViewDescription_copy(const UA_ViewDescription *src, UA_ViewDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);
}

static UA_INLINE void
UA_ViewDescription_deleteMembers(UA_ViewDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);
}

static UA_INLINE void
UA_ViewDescription_clear(UA_ViewDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);







|







22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
}

static UA_INLINE UA_StatusCode
UA_ViewDescription_copy(const UA_ViewDescription *src, UA_ViewDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_ViewDescription_deleteMembers(UA_ViewDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);
}

static UA_INLINE void
UA_ViewDescription_clear(UA_ViewDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]);
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
}

static UA_INLINE UA_StatusCode
UA_SetPublishingModeResponse_copy(const UA_SetPublishingModeResponse *src, UA_SetPublishingModeResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetPublishingModeResponse_deleteMembers(UA_SetPublishingModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetPublishingModeResponse_clear(UA_SetPublishingModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);







|







22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
}

static UA_INLINE UA_StatusCode
UA_SetPublishingModeResponse_copy(const UA_SetPublishingModeResponse *src, UA_SetPublishingModeResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetPublishingModeResponse_deleteMembers(UA_SetPublishingModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);
}

static UA_INLINE void
UA_SetPublishingModeResponse_clear(UA_SetPublishingModeResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]);
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
}

static UA_INLINE UA_StatusCode
UA_StatusChangeNotification_copy(const UA_StatusChangeNotification *src, UA_StatusChangeNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);
}

static UA_INLINE void
UA_StatusChangeNotification_deleteMembers(UA_StatusChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);
}

static UA_INLINE void
UA_StatusChangeNotification_clear(UA_StatusChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);







|







22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
}

static UA_INLINE UA_StatusCode
UA_StatusChangeNotification_copy(const UA_StatusChangeNotification *src, UA_StatusChangeNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_StatusChangeNotification_deleteMembers(UA_StatusChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);
}

static UA_INLINE void
UA_StatusChangeNotification_clear(UA_StatusChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STATUSCHANGENOTIFICATION]);
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
}

static UA_INLINE UA_StatusCode
UA_StructureField_copy(const UA_StructureField *src, UA_StructureField *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);
}

static UA_INLINE void
UA_StructureField_deleteMembers(UA_StructureField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);
}

static UA_INLINE void
UA_StructureField_clear(UA_StructureField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);







|







22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
}

static UA_INLINE UA_StatusCode
UA_StructureField_copy(const UA_StructureField *src, UA_StructureField *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);
}

UA_DEPRECATED static UA_INLINE void
UA_StructureField_deleteMembers(UA_StructureField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);
}

static UA_INLINE void
UA_StructureField_clear(UA_StructureField *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREFIELD]);
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
}

static UA_INLINE UA_StatusCode
UA_NodeAttributesMask_copy(const UA_NodeAttributesMask *src, UA_NodeAttributesMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);
}

static UA_INLINE void
UA_NodeAttributesMask_deleteMembers(UA_NodeAttributesMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);
}

static UA_INLINE void
UA_NodeAttributesMask_clear(UA_NodeAttributesMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);







|







22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
}

static UA_INLINE UA_StatusCode
UA_NodeAttributesMask_copy(const UA_NodeAttributesMask *src, UA_NodeAttributesMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_NodeAttributesMask_deleteMembers(UA_NodeAttributesMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);
}

static UA_INLINE void
UA_NodeAttributesMask_clear(UA_NodeAttributesMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]);
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateRequest_copy(const UA_HistoryUpdateRequest *src, UA_HistoryUpdateRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);
}

static UA_INLINE void
UA_HistoryUpdateRequest_deleteMembers(UA_HistoryUpdateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);
}

static UA_INLINE void
UA_HistoryUpdateRequest_clear(UA_HistoryUpdateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);







|







22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateRequest_copy(const UA_HistoryUpdateRequest *src, UA_HistoryUpdateRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryUpdateRequest_deleteMembers(UA_HistoryUpdateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);
}

static UA_INLINE void
UA_HistoryUpdateRequest_clear(UA_HistoryUpdateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATEREQUEST]);
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
}

static UA_INLINE UA_StatusCode
UA_EventFilterResult_copy(const UA_EventFilterResult *src, UA_EventFilterResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);
}

static UA_INLINE void
UA_EventFilterResult_deleteMembers(UA_EventFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);
}

static UA_INLINE void
UA_EventFilterResult_clear(UA_EventFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);







|







22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
}

static UA_INLINE UA_StatusCode
UA_EventFilterResult_copy(const UA_EventFilterResult *src, UA_EventFilterResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_EventFilterResult_deleteMembers(UA_EventFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);
}

static UA_INLINE void
UA_EventFilterResult_clear(UA_EventFilterResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTERRESULT]);
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
}

static UA_INLINE UA_StatusCode
UA_BrokerWriterGroupTransportDataType_copy(const UA_BrokerWriterGroupTransportDataType *src, UA_BrokerWriterGroupTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerWriterGroupTransportDataType_deleteMembers(UA_BrokerWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerWriterGroupTransportDataType_clear(UA_BrokerWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);







|







22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
}

static UA_INLINE UA_StatusCode
UA_BrokerWriterGroupTransportDataType_copy(const UA_BrokerWriterGroupTransportDataType *src, UA_BrokerWriterGroupTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrokerWriterGroupTransportDataType_deleteMembers(UA_BrokerWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerWriterGroupTransportDataType_clear(UA_BrokerWriterGroupTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERWRITERGROUPTRANSPORTDATATYPE]);
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
}

static UA_INLINE UA_StatusCode
UA_KeyValuePair_copy(const UA_KeyValuePair *src, UA_KeyValuePair *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
}

static UA_INLINE void
UA_KeyValuePair_deleteMembers(UA_KeyValuePair *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
}

static UA_INLINE void
UA_KeyValuePair_clear(UA_KeyValuePair *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);







|







22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
}

static UA_INLINE UA_StatusCode
UA_KeyValuePair_copy(const UA_KeyValuePair *src, UA_KeyValuePair *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
}

UA_DEPRECATED static UA_INLINE void
UA_KeyValuePair_deleteMembers(UA_KeyValuePair *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
}

static UA_INLINE void
UA_KeyValuePair_clear(UA_KeyValuePair *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemCreateRequest_copy(const UA_MonitoredItemCreateRequest *src, UA_MonitoredItemCreateRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemCreateRequest_deleteMembers(UA_MonitoredItemCreateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemCreateRequest_clear(UA_MonitoredItemCreateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);







|







22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
}

static UA_INLINE UA_StatusCode
UA_MonitoredItemCreateRequest_copy(const UA_MonitoredItemCreateRequest *src, UA_MonitoredItemCreateRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_MonitoredItemCreateRequest_deleteMembers(UA_MonitoredItemCreateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);
}

static UA_INLINE void
UA_MonitoredItemCreateRequest_clear(UA_MonitoredItemCreateRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]);
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
}

static UA_INLINE UA_StatusCode
UA_ComplexNumberType_copy(const UA_ComplexNumberType *src, UA_ComplexNumberType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_ComplexNumberType_deleteMembers(UA_ComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_ComplexNumberType_clear(UA_ComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);







|







22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
}

static UA_INLINE UA_StatusCode
UA_ComplexNumberType_copy(const UA_ComplexNumberType *src, UA_ComplexNumberType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ComplexNumberType_deleteMembers(UA_ComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);
}

static UA_INLINE void
UA_ComplexNumberType_clear(UA_ComplexNumberType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE]);
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
}

static UA_INLINE UA_StatusCode
UA_Range_copy(const UA_Range *src, UA_Range *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RANGE]);
}

static UA_INLINE void
UA_Range_deleteMembers(UA_Range *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RANGE]);
}

static UA_INLINE void
UA_Range_clear(UA_Range *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RANGE]);







|







22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
}

static UA_INLINE UA_StatusCode
UA_Range_copy(const UA_Range *src, UA_Range *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_RANGE]);
}

UA_DEPRECATED static UA_INLINE void
UA_Range_deleteMembers(UA_Range *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RANGE]);
}

static UA_INLINE void
UA_Range_clear(UA_Range *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_RANGE]);
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateResponse_copy(const UA_HistoryUpdateResponse *src, UA_HistoryUpdateResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);
}

static UA_INLINE void
UA_HistoryUpdateResponse_deleteMembers(UA_HistoryUpdateResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);
}

static UA_INLINE void
UA_HistoryUpdateResponse_clear(UA_HistoryUpdateResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);







|







22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
}

static UA_INLINE UA_StatusCode
UA_HistoryUpdateResponse_copy(const UA_HistoryUpdateResponse *src, UA_HistoryUpdateResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryUpdateResponse_deleteMembers(UA_HistoryUpdateResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);
}

static UA_INLINE void
UA_HistoryUpdateResponse_clear(UA_HistoryUpdateResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYUPDATERESPONSE]);
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
}

static UA_INLINE UA_StatusCode
UA_DataChangeNotification_copy(const UA_DataChangeNotification *src, UA_DataChangeNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);
}

static UA_INLINE void
UA_DataChangeNotification_deleteMembers(UA_DataChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);
}

static UA_INLINE void
UA_DataChangeNotification_clear(UA_DataChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);







|







22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
}

static UA_INLINE UA_StatusCode
UA_DataChangeNotification_copy(const UA_DataChangeNotification *src, UA_DataChangeNotification *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataChangeNotification_deleteMembers(UA_DataChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);
}

static UA_INLINE void
UA_DataChangeNotification_clear(UA_DataChangeNotification *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]);
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
}

static UA_INLINE UA_StatusCode
UA_Argument_copy(const UA_Argument *src, UA_Argument *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ARGUMENT]);
}

static UA_INLINE void
UA_Argument_deleteMembers(UA_Argument *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ARGUMENT]);
}

static UA_INLINE void
UA_Argument_clear(UA_Argument *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ARGUMENT]);







|







22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
}

static UA_INLINE UA_StatusCode
UA_Argument_copy(const UA_Argument *src, UA_Argument *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ARGUMENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_Argument_deleteMembers(UA_Argument *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ARGUMENT]);
}

static UA_INLINE void
UA_Argument_clear(UA_Argument *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ARGUMENT]);
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426































22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetMessageContentMask_copy(const UA_JsonDataSetMessageContentMask *src, UA_JsonDataSetMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonDataSetMessageContentMask_deleteMembers(UA_JsonDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonDataSetMessageContentMask_clear(UA_JsonDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonDataSetMessageContentMask_delete(UA_JsonDataSetMessageContentMask *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}
































/* ChannelSecurityToken */
static UA_INLINE void
UA_ChannelSecurityToken_init(UA_ChannelSecurityToken *p) {
    memset(p, 0, sizeof(UA_ChannelSecurityToken));
}

static UA_INLINE UA_ChannelSecurityToken *
UA_ChannelSecurityToken_new(void) {
    return (UA_ChannelSecurityToken*)UA_new(&UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

static UA_INLINE UA_StatusCode
UA_ChannelSecurityToken_copy(const UA_ChannelSecurityToken *src, UA_ChannelSecurityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

static UA_INLINE void
UA_ChannelSecurityToken_deleteMembers(UA_ChannelSecurityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

static UA_INLINE void
UA_ChannelSecurityToken_clear(UA_ChannelSecurityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetMessageContentMask_copy(const UA_JsonDataSetMessageContentMask *src, UA_JsonDataSetMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_JsonDataSetMessageContentMask_deleteMembers(UA_JsonDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonDataSetMessageContentMask_clear(UA_JsonDataSetMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonDataSetMessageContentMask_delete(UA_JsonDataSetMessageContentMask *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_JSONDATASETMESSAGECONTENTMASK]);
}

/* TransferSubscriptionsRequest */
static UA_INLINE void
UA_TransferSubscriptionsRequest_init(UA_TransferSubscriptionsRequest *p) {
    memset(p, 0, sizeof(UA_TransferSubscriptionsRequest));
}

static UA_INLINE UA_TransferSubscriptionsRequest *
UA_TransferSubscriptionsRequest_new(void) {
    return (UA_TransferSubscriptionsRequest*)UA_new(&UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST]);
}

static UA_INLINE UA_StatusCode
UA_TransferSubscriptionsRequest_copy(const UA_TransferSubscriptionsRequest *src, UA_TransferSubscriptionsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_TransferSubscriptionsRequest_deleteMembers(UA_TransferSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST]);
}

static UA_INLINE void
UA_TransferSubscriptionsRequest_clear(UA_TransferSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST]);
}

static UA_INLINE void
UA_TransferSubscriptionsRequest_delete(UA_TransferSubscriptionsRequest *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_TRANSFERSUBSCRIPTIONSREQUEST]);
}

/* ChannelSecurityToken */
static UA_INLINE void
UA_ChannelSecurityToken_init(UA_ChannelSecurityToken *p) {
    memset(p, 0, sizeof(UA_ChannelSecurityToken));
}

static UA_INLINE UA_ChannelSecurityToken *
UA_ChannelSecurityToken_new(void) {
    return (UA_ChannelSecurityToken*)UA_new(&UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

static UA_INLINE UA_StatusCode
UA_ChannelSecurityToken_copy(const UA_ChannelSecurityToken *src, UA_ChannelSecurityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_ChannelSecurityToken_deleteMembers(UA_ChannelSecurityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
}

static UA_INLINE void
UA_ChannelSecurityToken_clear(UA_ChannelSecurityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]);
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
}

static UA_INLINE UA_StatusCode
UA_ServerState_copy(const UA_ServerState *src, UA_ServerState *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERSTATE]);
}

static UA_INLINE void
UA_ServerState_deleteMembers(UA_ServerState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATE]);
}

static UA_INLINE void
UA_ServerState_clear(UA_ServerState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATE]);







|







22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
}

static UA_INLINE UA_StatusCode
UA_ServerState_copy(const UA_ServerState *src, UA_ServerState *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERSTATE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ServerState_deleteMembers(UA_ServerState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATE]);
}

static UA_INLINE void
UA_ServerState_clear(UA_ServerState *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATE]);
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
}

static UA_INLINE UA_StatusCode
UA_EventNotificationList_copy(const UA_EventNotificationList *src, UA_EventNotificationList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);
}

static UA_INLINE void
UA_EventNotificationList_deleteMembers(UA_EventNotificationList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);
}

static UA_INLINE void
UA_EventNotificationList_clear(UA_EventNotificationList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);







|







22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
}

static UA_INLINE UA_StatusCode
UA_EventNotificationList_copy(const UA_EventNotificationList *src, UA_EventNotificationList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);
}

UA_DEPRECATED static UA_INLINE void
UA_EventNotificationList_deleteMembers(UA_EventNotificationList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);
}

static UA_INLINE void
UA_EventNotificationList_clear(UA_EventNotificationList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTNOTIFICATIONLIST]);
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
}

static UA_INLINE UA_StatusCode
UA_HistoryEventFieldList_copy(const UA_HistoryEventFieldList *src, UA_HistoryEventFieldList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);
}

static UA_INLINE void
UA_HistoryEventFieldList_deleteMembers(UA_HistoryEventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);
}

static UA_INLINE void
UA_HistoryEventFieldList_clear(UA_HistoryEventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);







|







23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
}

static UA_INLINE UA_StatusCode
UA_HistoryEventFieldList_copy(const UA_HistoryEventFieldList *src, UA_HistoryEventFieldList *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryEventFieldList_deleteMembers(UA_HistoryEventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);
}

static UA_INLINE void
UA_HistoryEventFieldList_clear(UA_HistoryEventFieldList *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENTFIELDLIST]);
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
}

static UA_INLINE UA_StatusCode
UA_AnonymousIdentityToken_copy(const UA_AnonymousIdentityToken *src, UA_AnonymousIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);
}

static UA_INLINE void
UA_AnonymousIdentityToken_deleteMembers(UA_AnonymousIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);
}

static UA_INLINE void
UA_AnonymousIdentityToken_clear(UA_AnonymousIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);







|







23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
}

static UA_INLINE UA_StatusCode
UA_AnonymousIdentityToken_copy(const UA_AnonymousIdentityToken *src, UA_AnonymousIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_AnonymousIdentityToken_deleteMembers(UA_AnonymousIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);
}

static UA_INLINE void
UA_AnonymousIdentityToken_clear(UA_AnonymousIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]);
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
}

static UA_INLINE UA_StatusCode
UA_FilterOperator_copy(const UA_FilterOperator *src, UA_FilterOperator *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);
}

static UA_INLINE void
UA_FilterOperator_deleteMembers(UA_FilterOperator *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);
}

static UA_INLINE void
UA_FilterOperator_clear(UA_FilterOperator *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);







|







23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
}

static UA_INLINE UA_StatusCode
UA_FilterOperator_copy(const UA_FilterOperator *src, UA_FilterOperator *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);
}

UA_DEPRECATED static UA_INLINE void
UA_FilterOperator_deleteMembers(UA_FilterOperator *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);
}

static UA_INLINE void
UA_FilterOperator_clear(UA_FilterOperator *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FILTEROPERATOR]);
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
}

static UA_INLINE UA_StatusCode
UA_AggregateFilter_copy(const UA_AggregateFilter *src, UA_AggregateFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);
}

static UA_INLINE void
UA_AggregateFilter_deleteMembers(UA_AggregateFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);
}

static UA_INLINE void
UA_AggregateFilter_clear(UA_AggregateFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);







|







23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
}

static UA_INLINE UA_StatusCode
UA_AggregateFilter_copy(const UA_AggregateFilter *src, UA_AggregateFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);
}

UA_DEPRECATED static UA_INLINE void
UA_AggregateFilter_deleteMembers(UA_AggregateFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);
}

static UA_INLINE void
UA_AggregateFilter_clear(UA_AggregateFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AGGREGATEFILTER]);
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
}

static UA_INLINE UA_StatusCode
UA_RepublishResponse_copy(const UA_RepublishResponse *src, UA_RepublishResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);
}

static UA_INLINE void
UA_RepublishResponse_deleteMembers(UA_RepublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);
}

static UA_INLINE void
UA_RepublishResponse_clear(UA_RepublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);







|







23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
}

static UA_INLINE UA_StatusCode
UA_RepublishResponse_copy(const UA_RepublishResponse *src, UA_RepublishResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_RepublishResponse_deleteMembers(UA_RepublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);
}

static UA_INLINE void
UA_RepublishResponse_clear(UA_RepublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]);
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
}

static UA_INLINE UA_StatusCode
UA_DeleteSubscriptionsResponse_copy(const UA_DeleteSubscriptionsResponse *src, UA_DeleteSubscriptionsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE void
UA_DeleteSubscriptionsResponse_deleteMembers(UA_DeleteSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE void
UA_DeleteSubscriptionsResponse_clear(UA_DeleteSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);







|







23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
}

static UA_INLINE UA_StatusCode
UA_DeleteSubscriptionsResponse_copy(const UA_DeleteSubscriptionsResponse *src, UA_DeleteSubscriptionsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteSubscriptionsResponse_deleteMembers(UA_DeleteSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
}

static UA_INLINE void
UA_DeleteSubscriptionsResponse_clear(UA_DeleteSubscriptionsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
}

static UA_INLINE UA_StatusCode
UA_RegisterNodesRequest_copy(const UA_RegisterNodesRequest *src, UA_RegisterNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_RegisterNodesRequest_deleteMembers(UA_RegisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_RegisterNodesRequest_clear(UA_RegisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);







|







23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
}

static UA_INLINE UA_StatusCode
UA_RegisterNodesRequest_copy(const UA_RegisterNodesRequest *src, UA_RegisterNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterNodesRequest_deleteMembers(UA_RegisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_RegisterNodesRequest_clear(UA_RegisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]);
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
}

static UA_INLINE UA_StatusCode
UA_StructureDefinition_copy(const UA_StructureDefinition *src, UA_StructureDefinition *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);
}

static UA_INLINE void
UA_StructureDefinition_deleteMembers(UA_StructureDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);
}

static UA_INLINE void
UA_StructureDefinition_clear(UA_StructureDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);







|







23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
}

static UA_INLINE UA_StatusCode
UA_StructureDefinition_copy(const UA_StructureDefinition *src, UA_StructureDefinition *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);
}

UA_DEPRECATED static UA_INLINE void
UA_StructureDefinition_deleteMembers(UA_StructureDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);
}

static UA_INLINE void
UA_StructureDefinition_clear(UA_StructureDefinition *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]);
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
}

static UA_INLINE UA_StatusCode
UA_MethodAttributes_copy(const UA_MethodAttributes *src, UA_MethodAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);
}

static UA_INLINE void
UA_MethodAttributes_deleteMembers(UA_MethodAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);
}

static UA_INLINE void
UA_MethodAttributes_clear(UA_MethodAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);







|







23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
}

static UA_INLINE UA_StatusCode
UA_MethodAttributes_copy(const UA_MethodAttributes *src, UA_MethodAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_MethodAttributes_deleteMembers(UA_MethodAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);
}

static UA_INLINE void
UA_MethodAttributes_clear(UA_MethodAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]);
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
}

static UA_INLINE UA_StatusCode
UA_UserNameIdentityToken_copy(const UA_UserNameIdentityToken *src, UA_UserNameIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserNameIdentityToken_deleteMembers(UA_UserNameIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserNameIdentityToken_clear(UA_UserNameIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);







|







23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
}

static UA_INLINE UA_StatusCode
UA_UserNameIdentityToken_copy(const UA_UserNameIdentityToken *src, UA_UserNameIdentityToken *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);
}

UA_DEPRECATED static UA_INLINE void
UA_UserNameIdentityToken_deleteMembers(UA_UserNameIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);
}

static UA_INLINE void
UA_UserNameIdentityToken_clear(UA_UserNameIdentityToken *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]);
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
}

static UA_INLINE UA_StatusCode
UA_TimeZoneDataType_copy(const UA_TimeZoneDataType *src, UA_TimeZoneDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);
}

static UA_INLINE void
UA_TimeZoneDataType_deleteMembers(UA_TimeZoneDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);
}

static UA_INLINE void
UA_TimeZoneDataType_clear(UA_TimeZoneDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);







|







23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
}

static UA_INLINE UA_StatusCode
UA_TimeZoneDataType_copy(const UA_TimeZoneDataType *src, UA_TimeZoneDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_TimeZoneDataType_deleteMembers(UA_TimeZoneDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);
}

static UA_INLINE void
UA_TimeZoneDataType_clear(UA_TimeZoneDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TIMEZONEDATATYPE]);
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
}

static UA_INLINE UA_StatusCode
UA_UnregisterNodesRequest_copy(const UA_UnregisterNodesRequest *src, UA_UnregisterNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_UnregisterNodesRequest_deleteMembers(UA_UnregisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_UnregisterNodesRequest_clear(UA_UnregisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);







|







23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
}

static UA_INLINE UA_StatusCode
UA_UnregisterNodesRequest_copy(const UA_UnregisterNodesRequest *src, UA_UnregisterNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_UnregisterNodesRequest_deleteMembers(UA_UnregisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);
}

static UA_INLINE void
UA_UnregisterNodesRequest_clear(UA_UnregisterNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]);
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
}

static UA_INLINE UA_StatusCode
UA_DataSetOrderingType_copy(const UA_DataSetOrderingType *src, UA_DataSetOrderingType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);
}

static UA_INLINE void
UA_DataSetOrderingType_deleteMembers(UA_DataSetOrderingType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);
}

static UA_INLINE void
UA_DataSetOrderingType_clear(UA_DataSetOrderingType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);







|







23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
}

static UA_INLINE UA_StatusCode
UA_DataSetOrderingType_copy(const UA_DataSetOrderingType *src, UA_DataSetOrderingType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetOrderingType_deleteMembers(UA_DataSetOrderingType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);
}

static UA_INLINE void
UA_DataSetOrderingType_clear(UA_DataSetOrderingType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETORDERINGTYPE]);
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
}

static UA_INLINE UA_StatusCode
UA_OpenSecureChannelResponse_copy(const UA_OpenSecureChannelResponse *src, UA_OpenSecureChannelResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_OpenSecureChannelResponse_deleteMembers(UA_OpenSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_OpenSecureChannelResponse_clear(UA_OpenSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);







|







23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
}

static UA_INLINE UA_StatusCode
UA_OpenSecureChannelResponse_copy(const UA_OpenSecureChannelResponse *src, UA_OpenSecureChannelResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_OpenSecureChannelResponse_deleteMembers(UA_OpenSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);
}

static UA_INLINE void
UA_OpenSecureChannelResponse_clear(UA_OpenSecureChannelResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]);
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
}

static UA_INLINE UA_StatusCode
UA_SetTriggeringResponse_copy(const UA_SetTriggeringResponse *src, UA_SetTriggeringResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);
}

static UA_INLINE void
UA_SetTriggeringResponse_deleteMembers(UA_SetTriggeringResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);
}

static UA_INLINE void
UA_SetTriggeringResponse_clear(UA_SetTriggeringResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);







|







23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
}

static UA_INLINE UA_StatusCode
UA_SetTriggeringResponse_copy(const UA_SetTriggeringResponse *src, UA_SetTriggeringResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetTriggeringResponse_deleteMembers(UA_SetTriggeringResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);
}

static UA_INLINE void
UA_SetTriggeringResponse_clear(UA_SetTriggeringResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGRESPONSE]);
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
}

static UA_INLINE UA_StatusCode
UA_SimpleAttributeOperand_copy(const UA_SimpleAttributeOperand *src, UA_SimpleAttributeOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_SimpleAttributeOperand_deleteMembers(UA_SimpleAttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_SimpleAttributeOperand_clear(UA_SimpleAttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);







|







23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
}

static UA_INLINE UA_StatusCode
UA_SimpleAttributeOperand_copy(const UA_SimpleAttributeOperand *src, UA_SimpleAttributeOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);
}

UA_DEPRECATED static UA_INLINE void
UA_SimpleAttributeOperand_deleteMembers(UA_SimpleAttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_SimpleAttributeOperand_clear(UA_SimpleAttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SIMPLEATTRIBUTEOPERAND]);
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetWriterMessageDataType_copy(const UA_UadpDataSetWriterMessageDataType *src, UA_UadpDataSetWriterMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetWriterMessageDataType_deleteMembers(UA_UadpDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetWriterMessageDataType_clear(UA_UadpDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);







|







23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
}

static UA_INLINE UA_StatusCode
UA_UadpDataSetWriterMessageDataType_copy(const UA_UadpDataSetWriterMessageDataType *src, UA_UadpDataSetWriterMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UadpDataSetWriterMessageDataType_deleteMembers(UA_UadpDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpDataSetWriterMessageDataType_clear(UA_UadpDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPDATASETWRITERMESSAGEDATATYPE]);
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
}

static UA_INLINE UA_StatusCode
UA_JsonNetworkMessageContentMask_copy(const UA_JsonNetworkMessageContentMask *src, UA_JsonNetworkMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonNetworkMessageContentMask_deleteMembers(UA_JsonNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonNetworkMessageContentMask_clear(UA_JsonNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);







|







23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
}

static UA_INLINE UA_StatusCode
UA_JsonNetworkMessageContentMask_copy(const UA_JsonNetworkMessageContentMask *src, UA_JsonNetworkMessageContentMask *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);
}

UA_DEPRECATED static UA_INLINE void
UA_JsonNetworkMessageContentMask_deleteMembers(UA_JsonNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);
}

static UA_INLINE void
UA_JsonNetworkMessageContentMask_clear(UA_JsonNetworkMessageContentMask *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONNETWORKMESSAGECONTENTMASK]);
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
}

static UA_INLINE UA_StatusCode
UA_RepublishRequest_copy(const UA_RepublishRequest *src, UA_RepublishRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);
}

static UA_INLINE void
UA_RepublishRequest_deleteMembers(UA_RepublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);
}

static UA_INLINE void
UA_RepublishRequest_clear(UA_RepublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);







|







23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
}

static UA_INLINE UA_StatusCode
UA_RepublishRequest_copy(const UA_RepublishRequest *src, UA_RepublishRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_RepublishRequest_deleteMembers(UA_RepublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);
}

static UA_INLINE void
UA_RepublishRequest_clear(UA_RepublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]);
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
}

static UA_INLINE UA_StatusCode
UA_RegisterNodesResponse_copy(const UA_RegisterNodesResponse *src, UA_RegisterNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_RegisterNodesResponse_deleteMembers(UA_RegisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_RegisterNodesResponse_clear(UA_RegisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);







|







23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
}

static UA_INLINE UA_StatusCode
UA_RegisterNodesResponse_copy(const UA_RegisterNodesResponse *src, UA_RegisterNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterNodesResponse_deleteMembers(UA_RegisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
}

static UA_INLINE void
UA_RegisterNodesResponse_clear(UA_RegisterNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
}

static UA_INLINE UA_StatusCode
UA_ModifyMonitoredItemsResponse_copy(const UA_ModifyMonitoredItemsResponse *src, UA_ModifyMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsResponse_deleteMembers(UA_ModifyMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsResponse_clear(UA_ModifyMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);







|







23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
}

static UA_INLINE UA_StatusCode
UA_ModifyMonitoredItemsResponse_copy(const UA_ModifyMonitoredItemsResponse *src, UA_ModifyMonitoredItemsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ModifyMonitoredItemsResponse_deleteMembers(UA_ModifyMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsResponse_clear(UA_ModifyMonitoredItemsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]);
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
}

static UA_INLINE UA_StatusCode
UA_FieldTargetDataType_copy(const UA_FieldTargetDataType *src, UA_FieldTargetDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);
}

static UA_INLINE void
UA_FieldTargetDataType_deleteMembers(UA_FieldTargetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);
}

static UA_INLINE void
UA_FieldTargetDataType_clear(UA_FieldTargetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);







|







23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
}

static UA_INLINE UA_StatusCode
UA_FieldTargetDataType_copy(const UA_FieldTargetDataType *src, UA_FieldTargetDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_FieldTargetDataType_deleteMembers(UA_FieldTargetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);
}

static UA_INLINE void
UA_FieldTargetDataType_clear(UA_FieldTargetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDTARGETDATATYPE]);
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
}

static UA_INLINE UA_StatusCode
UA_DeleteSubscriptionsRequest_copy(const UA_DeleteSubscriptionsRequest *src, UA_DeleteSubscriptionsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);
}

static UA_INLINE void
UA_DeleteSubscriptionsRequest_deleteMembers(UA_DeleteSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);
}

static UA_INLINE void
UA_DeleteSubscriptionsRequest_clear(UA_DeleteSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);







|







23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
}

static UA_INLINE UA_StatusCode
UA_DeleteSubscriptionsRequest_copy(const UA_DeleteSubscriptionsRequest *src, UA_DeleteSubscriptionsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteSubscriptionsRequest_deleteMembers(UA_DeleteSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);
}

static UA_INLINE void
UA_DeleteSubscriptionsRequest_clear(UA_DeleteSubscriptionsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]);
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
}

static UA_INLINE UA_StatusCode
UA_RedundancySupport_copy(const UA_RedundancySupport *src, UA_RedundancySupport *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);
}

static UA_INLINE void
UA_RedundancySupport_deleteMembers(UA_RedundancySupport *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);
}

static UA_INLINE void
UA_RedundancySupport_clear(UA_RedundancySupport *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);







|







23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
}

static UA_INLINE UA_StatusCode
UA_RedundancySupport_copy(const UA_RedundancySupport *src, UA_RedundancySupport *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);
}

UA_DEPRECATED static UA_INLINE void
UA_RedundancySupport_deleteMembers(UA_RedundancySupport *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);
}

static UA_INLINE void
UA_RedundancySupport_clear(UA_RedundancySupport *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REDUNDANCYSUPPORT]);
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
}

static UA_INLINE UA_StatusCode
UA_BrowsePath_copy(const UA_BrowsePath *src, UA_BrowsePath *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATH]);
}

static UA_INLINE void
UA_BrowsePath_deleteMembers(UA_BrowsePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATH]);
}

static UA_INLINE void
UA_BrowsePath_clear(UA_BrowsePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATH]);







|







23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
}

static UA_INLINE UA_StatusCode
UA_BrowsePath_copy(const UA_BrowsePath *src, UA_BrowsePath *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATH]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowsePath_deleteMembers(UA_BrowsePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATH]);
}

static UA_INLINE void
UA_BrowsePath_clear(UA_BrowsePath *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATH]);
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
}

static UA_INLINE UA_StatusCode
UA_ObjectAttributes_copy(const UA_ObjectAttributes *src, UA_ObjectAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectAttributes_deleteMembers(UA_ObjectAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectAttributes_clear(UA_ObjectAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);







|







23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
}

static UA_INLINE UA_StatusCode
UA_ObjectAttributes_copy(const UA_ObjectAttributes *src, UA_ObjectAttributes *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);
}

UA_DEPRECATED static UA_INLINE void
UA_ObjectAttributes_deleteMembers(UA_ObjectAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);
}

static UA_INLINE void
UA_ObjectAttributes_clear(UA_ObjectAttributes *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]);
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
}

static UA_INLINE UA_StatusCode
UA_PublishRequest_copy(const UA_PublishRequest *src, UA_PublishRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);
}

static UA_INLINE void
UA_PublishRequest_deleteMembers(UA_PublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);
}

static UA_INLINE void
UA_PublishRequest_clear(UA_PublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);







|







23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
}

static UA_INLINE UA_StatusCode
UA_PublishRequest_copy(const UA_PublishRequest *src, UA_PublishRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishRequest_deleteMembers(UA_PublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);
}

static UA_INLINE void
UA_PublishRequest_clear(UA_PublishRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]);
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
}

static UA_INLINE UA_StatusCode
UA_FindServersRequest_copy(const UA_FindServersRequest *src, UA_FindServersRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);
}

static UA_INLINE void
UA_FindServersRequest_deleteMembers(UA_FindServersRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);
}

static UA_INLINE void
UA_FindServersRequest_clear(UA_FindServersRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);







|







23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
}

static UA_INLINE UA_StatusCode
UA_FindServersRequest_copy(const UA_FindServersRequest *src, UA_FindServersRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_FindServersRequest_deleteMembers(UA_FindServersRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);
}

static UA_INLINE void
UA_FindServersRequest_clear(UA_FindServersRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]);
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetWriterMessageDataType_copy(const UA_JsonDataSetWriterMessageDataType *src, UA_JsonDataSetWriterMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetWriterMessageDataType_deleteMembers(UA_JsonDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetWriterMessageDataType_clear(UA_JsonDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);







|







23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetWriterMessageDataType_copy(const UA_JsonDataSetWriterMessageDataType *src, UA_JsonDataSetWriterMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_JsonDataSetWriterMessageDataType_deleteMembers(UA_JsonDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetWriterMessageDataType_clear(UA_JsonDataSetWriterMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETWRITERMESSAGEDATATYPE]);
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
}

static UA_INLINE UA_StatusCode
UA_FindServersOnNetworkResponse_copy(const UA_FindServersOnNetworkResponse *src, UA_FindServersOnNetworkResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);
}

static UA_INLINE void
UA_FindServersOnNetworkResponse_deleteMembers(UA_FindServersOnNetworkResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);
}

static UA_INLINE void
UA_FindServersOnNetworkResponse_clear(UA_FindServersOnNetworkResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);







|







23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
}

static UA_INLINE UA_StatusCode
UA_FindServersOnNetworkResponse_copy(const UA_FindServersOnNetworkResponse *src, UA_FindServersOnNetworkResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_FindServersOnNetworkResponse_deleteMembers(UA_FindServersOnNetworkResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);
}

static UA_INLINE void
UA_FindServersOnNetworkResponse_clear(UA_FindServersOnNetworkResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKRESPONSE]);
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
}

static UA_INLINE UA_StatusCode
UA_FieldMetaData_copy(const UA_FieldMetaData *src, UA_FieldMetaData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FIELDMETADATA]);
}

static UA_INLINE void
UA_FieldMetaData_deleteMembers(UA_FieldMetaData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDMETADATA]);
}

static UA_INLINE void
UA_FieldMetaData_clear(UA_FieldMetaData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDMETADATA]);







|







23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
}

static UA_INLINE UA_StatusCode
UA_FieldMetaData_copy(const UA_FieldMetaData *src, UA_FieldMetaData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FIELDMETADATA]);
}

UA_DEPRECATED static UA_INLINE void
UA_FieldMetaData_deleteMembers(UA_FieldMetaData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDMETADATA]);
}

static UA_INLINE void
UA_FieldMetaData_clear(UA_FieldMetaData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FIELDMETADATA]);
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
}

static UA_INLINE UA_StatusCode
UA_UpdateDataDetails_copy(const UA_UpdateDataDetails *src, UA_UpdateDataDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);
}

static UA_INLINE void
UA_UpdateDataDetails_deleteMembers(UA_UpdateDataDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);
}

static UA_INLINE void
UA_UpdateDataDetails_clear(UA_UpdateDataDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);







|







23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
}

static UA_INLINE UA_StatusCode
UA_UpdateDataDetails_copy(const UA_UpdateDataDetails *src, UA_UpdateDataDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_UpdateDataDetails_deleteMembers(UA_UpdateDataDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);
}

static UA_INLINE void
UA_UpdateDataDetails_clear(UA_UpdateDataDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UPDATEDATADETAILS]);
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542































23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
}

static UA_INLINE UA_StatusCode
UA_ReferenceDescription_copy(const UA_ReferenceDescription *src, UA_ReferenceDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

static UA_INLINE void
UA_ReferenceDescription_deleteMembers(UA_ReferenceDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

static UA_INLINE void
UA_ReferenceDescription_clear(UA_ReferenceDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

static UA_INLINE void
UA_ReferenceDescription_delete(UA_ReferenceDescription *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}
































/* TargetVariablesDataType */
static UA_INLINE void
UA_TargetVariablesDataType_init(UA_TargetVariablesDataType *p) {
    memset(p, 0, sizeof(UA_TargetVariablesDataType));
}

static UA_INLINE UA_TargetVariablesDataType *
UA_TargetVariablesDataType_new(void) {
    return (UA_TargetVariablesDataType*)UA_new(&UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_TargetVariablesDataType_copy(const UA_TargetVariablesDataType *src, UA_TargetVariablesDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

static UA_INLINE void
UA_TargetVariablesDataType_deleteMembers(UA_TargetVariablesDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

static UA_INLINE void
UA_TargetVariablesDataType_clear(UA_TargetVariablesDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
}

static UA_INLINE UA_StatusCode
UA_ReferenceDescription_copy(const UA_ReferenceDescription *src, UA_ReferenceDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReferenceDescription_deleteMembers(UA_ReferenceDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

static UA_INLINE void
UA_ReferenceDescription_clear(UA_ReferenceDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

static UA_INLINE void
UA_ReferenceDescription_delete(UA_ReferenceDescription *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]);
}

/* SubscribedDataSetMirrorDataType */
static UA_INLINE void
UA_SubscribedDataSetMirrorDataType_init(UA_SubscribedDataSetMirrorDataType *p) {
    memset(p, 0, sizeof(UA_SubscribedDataSetMirrorDataType));
}

static UA_INLINE UA_SubscribedDataSetMirrorDataType *
UA_SubscribedDataSetMirrorDataType_new(void) {
    return (UA_SubscribedDataSetMirrorDataType*)UA_new(&UA_TYPES[UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_SubscribedDataSetMirrorDataType_copy(const UA_SubscribedDataSetMirrorDataType *src, UA_SubscribedDataSetMirrorDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_SubscribedDataSetMirrorDataType_deleteMembers(UA_SubscribedDataSetMirrorDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE]);
}

static UA_INLINE void
UA_SubscribedDataSetMirrorDataType_clear(UA_SubscribedDataSetMirrorDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE]);
}

static UA_INLINE void
UA_SubscribedDataSetMirrorDataType_delete(UA_SubscribedDataSetMirrorDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_SUBSCRIBEDDATASETMIRRORDATATYPE]);
}

/* TargetVariablesDataType */
static UA_INLINE void
UA_TargetVariablesDataType_init(UA_TargetVariablesDataType *p) {
    memset(p, 0, sizeof(UA_TargetVariablesDataType));
}

static UA_INLINE UA_TargetVariablesDataType *
UA_TargetVariablesDataType_new(void) {
    return (UA_TargetVariablesDataType*)UA_new(&UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_TargetVariablesDataType_copy(const UA_TargetVariablesDataType *src, UA_TargetVariablesDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_TargetVariablesDataType_deleteMembers(UA_TargetVariablesDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
}

static UA_INLINE void
UA_TargetVariablesDataType_clear(UA_TargetVariablesDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]);
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
}

static UA_INLINE UA_StatusCode
UA_CreateSubscriptionRequest_copy(const UA_CreateSubscriptionRequest *src, UA_CreateSubscriptionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_CreateSubscriptionRequest_deleteMembers(UA_CreateSubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_CreateSubscriptionRequest_clear(UA_CreateSubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);







|







24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
}

static UA_INLINE UA_StatusCode
UA_CreateSubscriptionRequest_copy(const UA_CreateSubscriptionRequest *src, UA_CreateSubscriptionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateSubscriptionRequest_deleteMembers(UA_CreateSubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);
}

static UA_INLINE void
UA_CreateSubscriptionRequest_clear(UA_CreateSubscriptionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]);
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
}

static UA_INLINE UA_StatusCode
UA_FindServersOnNetworkRequest_copy(const UA_FindServersOnNetworkRequest *src, UA_FindServersOnNetworkRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);
}

static UA_INLINE void
UA_FindServersOnNetworkRequest_deleteMembers(UA_FindServersOnNetworkRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);
}

static UA_INLINE void
UA_FindServersOnNetworkRequest_clear(UA_FindServersOnNetworkRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);







|







24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
}

static UA_INLINE UA_StatusCode
UA_FindServersOnNetworkRequest_copy(const UA_FindServersOnNetworkRequest *src, UA_FindServersOnNetworkRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_FindServersOnNetworkRequest_deleteMembers(UA_FindServersOnNetworkRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);
}

static UA_INLINE void
UA_FindServersOnNetworkRequest_clear(UA_FindServersOnNetworkRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSONNETWORKREQUEST]);
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
}

static UA_INLINE UA_StatusCode
UA_CallResponse_copy(const UA_CallResponse *src, UA_CallResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
}

static UA_INLINE void
UA_CallResponse_deleteMembers(UA_CallResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
}

static UA_INLINE void
UA_CallResponse_clear(UA_CallResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLRESPONSE]);







|







24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
}

static UA_INLINE UA_StatusCode
UA_CallResponse_copy(const UA_CallResponse *src, UA_CallResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CallResponse_deleteMembers(UA_CallResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
}

static UA_INLINE void
UA_CallResponse_clear(UA_CallResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesResponse_copy(const UA_DeleteNodesResponse *src, UA_DeleteNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
}

static UA_INLINE void
UA_DeleteNodesResponse_deleteMembers(UA_DeleteNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
}

static UA_INLINE void
UA_DeleteNodesResponse_clear(UA_DeleteNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);







|







24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
}

static UA_INLINE UA_StatusCode
UA_DeleteNodesResponse_copy(const UA_DeleteNodesResponse *src, UA_DeleteNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteNodesResponse_deleteMembers(UA_DeleteNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
}

static UA_INLINE void
UA_DeleteNodesResponse_clear(UA_DeleteNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
}

static UA_INLINE UA_StatusCode
UA_BrokerDataSetReaderTransportDataType_copy(const UA_BrokerDataSetReaderTransportDataType *src, UA_BrokerDataSetReaderTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetReaderTransportDataType_deleteMembers(UA_BrokerDataSetReaderTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetReaderTransportDataType_clear(UA_BrokerDataSetReaderTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);







|







24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
}

static UA_INLINE UA_StatusCode
UA_BrokerDataSetReaderTransportDataType_copy(const UA_BrokerDataSetReaderTransportDataType *src, UA_BrokerDataSetReaderTransportDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrokerDataSetReaderTransportDataType_deleteMembers(UA_BrokerDataSetReaderTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);
}

static UA_INLINE void
UA_BrokerDataSetReaderTransportDataType_clear(UA_BrokerDataSetReaderTransportDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]);
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
}

static UA_INLINE UA_StatusCode
UA_ModifyMonitoredItemsRequest_copy(const UA_ModifyMonitoredItemsRequest *src, UA_ModifyMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsRequest_deleteMembers(UA_ModifyMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsRequest_clear(UA_ModifyMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);







|







24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
}

static UA_INLINE UA_StatusCode
UA_ModifyMonitoredItemsRequest_copy(const UA_ModifyMonitoredItemsRequest *src, UA_ModifyMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_ModifyMonitoredItemsRequest_deleteMembers(UA_ModifyMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_ModifyMonitoredItemsRequest_clear(UA_ModifyMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]);
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
}

static UA_INLINE UA_StatusCode
UA_ServiceFault_copy(const UA_ServiceFault *src, UA_ServiceFault *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
}

static UA_INLINE void
UA_ServiceFault_deleteMembers(UA_ServiceFault *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
}

static UA_INLINE void
UA_ServiceFault_clear(UA_ServiceFault *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVICEFAULT]);







|







24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
}

static UA_INLINE UA_StatusCode
UA_ServiceFault_copy(const UA_ServiceFault *src, UA_ServiceFault *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_ServiceFault_deleteMembers(UA_ServiceFault *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
}

static UA_INLINE void
UA_ServiceFault_clear(UA_ServiceFault *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVICEFAULT]);
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
}

static UA_INLINE UA_StatusCode
UA_PublishResponse_copy(const UA_PublishResponse *src, UA_PublishResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
}

static UA_INLINE void
UA_PublishResponse_deleteMembers(UA_PublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
}

static UA_INLINE void
UA_PublishResponse_clear(UA_PublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);







|







24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
}

static UA_INLINE UA_StatusCode
UA_PublishResponse_copy(const UA_PublishResponse *src, UA_PublishResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishResponse_deleteMembers(UA_PublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
}

static UA_INLINE void
UA_PublishResponse_clear(UA_PublishResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
}

static UA_INLINE UA_StatusCode
UA_CreateMonitoredItemsRequest_copy(const UA_CreateMonitoredItemsRequest *src, UA_CreateMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_CreateMonitoredItemsRequest_deleteMembers(UA_CreateMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_CreateMonitoredItemsRequest_clear(UA_CreateMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);







|







24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
}

static UA_INLINE UA_StatusCode
UA_CreateMonitoredItemsRequest_copy(const UA_CreateMonitoredItemsRequest *src, UA_CreateMonitoredItemsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateMonitoredItemsRequest_deleteMembers(UA_CreateMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);
}

static UA_INLINE void
UA_CreateMonitoredItemsRequest_clear(UA_CreateMonitoredItemsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]);
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
}

static UA_INLINE UA_StatusCode
UA_ReadProcessedDetails_copy(const UA_ReadProcessedDetails *src, UA_ReadProcessedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);
}

static UA_INLINE void
UA_ReadProcessedDetails_deleteMembers(UA_ReadProcessedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);
}

static UA_INLINE void
UA_ReadProcessedDetails_clear(UA_ReadProcessedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);







|







24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
}

static UA_INLINE UA_StatusCode
UA_ReadProcessedDetails_copy(const UA_ReadProcessedDetails *src, UA_ReadProcessedDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadProcessedDetails_deleteMembers(UA_ReadProcessedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);
}

static UA_INLINE void
UA_ReadProcessedDetails_clear(UA_ReadProcessedDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READPROCESSEDDETAILS]);
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
}

static UA_INLINE UA_StatusCode
UA_OpenSecureChannelRequest_copy(const UA_OpenSecureChannelRequest *src, UA_OpenSecureChannelRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_OpenSecureChannelRequest_deleteMembers(UA_OpenSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_OpenSecureChannelRequest_clear(UA_OpenSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);







|







24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
}

static UA_INLINE UA_StatusCode
UA_OpenSecureChannelRequest_copy(const UA_OpenSecureChannelRequest *src, UA_OpenSecureChannelRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_OpenSecureChannelRequest_deleteMembers(UA_OpenSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);
}

static UA_INLINE void
UA_OpenSecureChannelRequest_clear(UA_OpenSecureChannelRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]);
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
}

static UA_INLINE UA_StatusCode
UA_CloseSessionRequest_copy(const UA_CloseSessionRequest *src, UA_CloseSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);
}

static UA_INLINE void
UA_CloseSessionRequest_deleteMembers(UA_CloseSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);
}

static UA_INLINE void
UA_CloseSessionRequest_clear(UA_CloseSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);







|







24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
}

static UA_INLINE UA_StatusCode
UA_CloseSessionRequest_copy(const UA_CloseSessionRequest *src, UA_CloseSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CloseSessionRequest_deleteMembers(UA_CloseSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);
}

static UA_INLINE void
UA_CloseSessionRequest_clear(UA_CloseSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]);
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
}

static UA_INLINE UA_StatusCode
UA_SetTriggeringRequest_copy(const UA_SetTriggeringRequest *src, UA_SetTriggeringRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);
}

static UA_INLINE void
UA_SetTriggeringRequest_deleteMembers(UA_SetTriggeringRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);
}

static UA_INLINE void
UA_SetTriggeringRequest_clear(UA_SetTriggeringRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);







|







24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
}

static UA_INLINE UA_StatusCode
UA_SetTriggeringRequest_copy(const UA_SetTriggeringRequest *src, UA_SetTriggeringRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_SetTriggeringRequest_deleteMembers(UA_SetTriggeringRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);
}

static UA_INLINE void
UA_SetTriggeringRequest_clear(UA_SetTriggeringRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SETTRIGGERINGREQUEST]);
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
}

static UA_INLINE UA_StatusCode
UA_EnumDescription_copy(const UA_EnumDescription *src, UA_EnumDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);
}

static UA_INLINE void
UA_EnumDescription_deleteMembers(UA_EnumDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);
}

static UA_INLINE void
UA_EnumDescription_clear(UA_EnumDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);







|







24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
}

static UA_INLINE UA_StatusCode
UA_EnumDescription_copy(const UA_EnumDescription *src, UA_EnumDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_EnumDescription_deleteMembers(UA_EnumDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);
}

static UA_INLINE void
UA_EnumDescription_clear(UA_EnumDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENUMDESCRIPTION]);
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
}

static UA_INLINE UA_StatusCode
UA_BrowseResult_copy(const UA_BrowseResult *src, UA_BrowseResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESULT]);
}

static UA_INLINE void
UA_BrowseResult_deleteMembers(UA_BrowseResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULT]);
}

static UA_INLINE void
UA_BrowseResult_clear(UA_BrowseResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULT]);







|







24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
}

static UA_INLINE UA_StatusCode
UA_BrowseResult_copy(const UA_BrowseResult *src, UA_BrowseResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseResult_deleteMembers(UA_BrowseResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULT]);
}

static UA_INLINE void
UA_BrowseResult_clear(UA_BrowseResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESULT]);
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
}

static UA_INLINE UA_StatusCode
UA_AddReferencesRequest_copy(const UA_AddReferencesRequest *src, UA_AddReferencesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);
}

static UA_INLINE void
UA_AddReferencesRequest_deleteMembers(UA_AddReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);
}

static UA_INLINE void
UA_AddReferencesRequest_clear(UA_AddReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);







|







24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
}

static UA_INLINE UA_StatusCode
UA_AddReferencesRequest_copy(const UA_AddReferencesRequest *src, UA_AddReferencesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddReferencesRequest_deleteMembers(UA_AddReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);
}

static UA_INLINE void
UA_AddReferencesRequest_clear(UA_AddReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]);
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
}

static UA_INLINE UA_StatusCode
UA_AddNodesItem_copy(const UA_AddNodesItem *src, UA_AddNodesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESITEM]);
}

static UA_INLINE void
UA_AddNodesItem_deleteMembers(UA_AddNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESITEM]);
}

static UA_INLINE void
UA_AddNodesItem_clear(UA_AddNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESITEM]);







|







24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
}

static UA_INLINE UA_StatusCode
UA_AddNodesItem_copy(const UA_AddNodesItem *src, UA_AddNodesItem *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESITEM]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddNodesItem_deleteMembers(UA_AddNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESITEM]);
}

static UA_INLINE void
UA_AddNodesItem_clear(UA_AddNodesItem *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESITEM]);
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
}

static UA_INLINE UA_StatusCode
UA_ServerStatusDataType_copy(const UA_ServerStatusDataType *src, UA_ServerStatusDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);
}

static UA_INLINE void
UA_ServerStatusDataType_deleteMembers(UA_ServerStatusDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);
}

static UA_INLINE void
UA_ServerStatusDataType_clear(UA_ServerStatusDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);







|







24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
}

static UA_INLINE UA_StatusCode
UA_ServerStatusDataType_copy(const UA_ServerStatusDataType *src, UA_ServerStatusDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ServerStatusDataType_deleteMembers(UA_ServerStatusDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);
}

static UA_INLINE void
UA_ServerStatusDataType_clear(UA_ServerStatusDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]);
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
}

static UA_INLINE UA_StatusCode
UA_HistoryModifiedData_copy(const UA_HistoryModifiedData *src, UA_HistoryModifiedData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);
}

static UA_INLINE void
UA_HistoryModifiedData_deleteMembers(UA_HistoryModifiedData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);
}

static UA_INLINE void
UA_HistoryModifiedData_clear(UA_HistoryModifiedData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);







|







24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
}

static UA_INLINE UA_StatusCode
UA_HistoryModifiedData_copy(const UA_HistoryModifiedData *src, UA_HistoryModifiedData *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryModifiedData_deleteMembers(UA_HistoryModifiedData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);
}

static UA_INLINE void
UA_HistoryModifiedData_clear(UA_HistoryModifiedData *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYMODIFIEDDATA]);
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
}

static UA_INLINE UA_StatusCode
UA_BrowseNextResponse_copy(const UA_BrowseNextResponse *src, UA_BrowseNextResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
}

static UA_INLINE void
UA_BrowseNextResponse_deleteMembers(UA_BrowseNextResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
}

static UA_INLINE void
UA_BrowseNextResponse_clear(UA_BrowseNextResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);







|







24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
}

static UA_INLINE UA_StatusCode
UA_BrowseNextResponse_copy(const UA_BrowseNextResponse *src, UA_BrowseNextResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseNextResponse_deleteMembers(UA_BrowseNextResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
}

static UA_INLINE void
UA_BrowseNextResponse_clear(UA_BrowseNextResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
}

static UA_INLINE UA_StatusCode
UA_AxisInformation_copy(const UA_AxisInformation *src, UA_AxisInformation *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AXISINFORMATION]);
}

static UA_INLINE void
UA_AxisInformation_deleteMembers(UA_AxisInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISINFORMATION]);
}

static UA_INLINE void
UA_AxisInformation_clear(UA_AxisInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISINFORMATION]);







|







24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
}

static UA_INLINE UA_StatusCode
UA_AxisInformation_copy(const UA_AxisInformation *src, UA_AxisInformation *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_AXISINFORMATION]);
}

UA_DEPRECATED static UA_INLINE void
UA_AxisInformation_deleteMembers(UA_AxisInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISINFORMATION]);
}

static UA_INLINE void
UA_AxisInformation_clear(UA_AxisInformation *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_AXISINFORMATION]);
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
}

static UA_INLINE UA_StatusCode
UA_RegisteredServer_copy(const UA_RegisteredServer *src, UA_RegisteredServer *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);
}

static UA_INLINE void
UA_RegisteredServer_deleteMembers(UA_RegisteredServer *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);
}

static UA_INLINE void
UA_RegisteredServer_clear(UA_RegisteredServer *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);







|







24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
}

static UA_INLINE UA_StatusCode
UA_RegisteredServer_copy(const UA_RegisteredServer *src, UA_RegisteredServer *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisteredServer_deleteMembers(UA_RegisteredServer *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);
}

static UA_INLINE void
UA_RegisteredServer_clear(UA_RegisteredServer *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTEREDSERVER]);
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
}

static UA_INLINE UA_StatusCode
UA_ApplicationDescription_copy(const UA_ApplicationDescription *src, UA_ApplicationDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);
}

static UA_INLINE void
UA_ApplicationDescription_deleteMembers(UA_ApplicationDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);
}

static UA_INLINE void
UA_ApplicationDescription_clear(UA_ApplicationDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);







|







24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
}

static UA_INLINE UA_StatusCode
UA_ApplicationDescription_copy(const UA_ApplicationDescription *src, UA_ApplicationDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_ApplicationDescription_deleteMembers(UA_ApplicationDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);
}

static UA_INLINE void
UA_ApplicationDescription_clear(UA_ApplicationDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]);
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
}

static UA_INLINE UA_StatusCode
UA_StructureDescription_copy(const UA_StructureDescription *src, UA_StructureDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);
}

static UA_INLINE void
UA_StructureDescription_deleteMembers(UA_StructureDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);
}

static UA_INLINE void
UA_StructureDescription_clear(UA_StructureDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);







|







24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
}

static UA_INLINE UA_StatusCode
UA_StructureDescription_copy(const UA_StructureDescription *src, UA_StructureDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_StructureDescription_deleteMembers(UA_StructureDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);
}

static UA_INLINE void
UA_StructureDescription_clear(UA_StructureDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_STRUCTUREDESCRIPTION]);
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
}

static UA_INLINE UA_StatusCode
UA_ReadRequest_copy(const UA_ReadRequest *src, UA_ReadRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READREQUEST]);
}

static UA_INLINE void
UA_ReadRequest_deleteMembers(UA_ReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READREQUEST]);
}

static UA_INLINE void
UA_ReadRequest_clear(UA_ReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READREQUEST]);







|







24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
}

static UA_INLINE UA_StatusCode
UA_ReadRequest_copy(const UA_ReadRequest *src, UA_ReadRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadRequest_deleteMembers(UA_ReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READREQUEST]);
}

static UA_INLINE void
UA_ReadRequest_clear(UA_ReadRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READREQUEST]);
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
}

static UA_INLINE UA_StatusCode
UA_DataSetWriterDataType_copy(const UA_DataSetWriterDataType *src, UA_DataSetWriterDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);
}

static UA_INLINE void
UA_DataSetWriterDataType_deleteMembers(UA_DataSetWriterDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);
}

static UA_INLINE void
UA_DataSetWriterDataType_clear(UA_DataSetWriterDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);







|







24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
}

static UA_INLINE UA_StatusCode
UA_DataSetWriterDataType_copy(const UA_DataSetWriterDataType *src, UA_DataSetWriterDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetWriterDataType_deleteMembers(UA_DataSetWriterDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);
}

static UA_INLINE void
UA_DataSetWriterDataType_clear(UA_DataSetWriterDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETWRITERDATATYPE]);
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
}

static UA_INLINE UA_StatusCode
UA_ActivateSessionRequest_copy(const UA_ActivateSessionRequest *src, UA_ActivateSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);
}

static UA_INLINE void
UA_ActivateSessionRequest_deleteMembers(UA_ActivateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);
}

static UA_INLINE void
UA_ActivateSessionRequest_clear(UA_ActivateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);







|







24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
}

static UA_INLINE UA_StatusCode
UA_ActivateSessionRequest_copy(const UA_ActivateSessionRequest *src, UA_ActivateSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_ActivateSessionRequest_deleteMembers(UA_ActivateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);
}

static UA_INLINE void
UA_ActivateSessionRequest_clear(UA_ActivateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]);
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
}

static UA_INLINE UA_StatusCode
UA_BrowsePathResult_copy(const UA_BrowsePathResult *src, UA_BrowsePathResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);
}

static UA_INLINE void
UA_BrowsePathResult_deleteMembers(UA_BrowsePathResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);
}

static UA_INLINE void
UA_BrowsePathResult_clear(UA_BrowsePathResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);







|







24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
}

static UA_INLINE UA_StatusCode
UA_BrowsePathResult_copy(const UA_BrowsePathResult *src, UA_BrowsePathResult *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowsePathResult_deleteMembers(UA_BrowsePathResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);
}

static UA_INLINE void
UA_BrowsePathResult_clear(UA_BrowsePathResult *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]);
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
}

static UA_INLINE UA_StatusCode
UA_AddNodesRequest_copy(const UA_AddNodesRequest *src, UA_AddNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);
}

static UA_INLINE void
UA_AddNodesRequest_deleteMembers(UA_AddNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);
}

static UA_INLINE void
UA_AddNodesRequest_clear(UA_AddNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);







|







24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
}

static UA_INLINE UA_StatusCode
UA_AddNodesRequest_copy(const UA_AddNodesRequest *src, UA_AddNodesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddNodesRequest_deleteMembers(UA_AddNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);
}

static UA_INLINE void
UA_AddNodesRequest_clear(UA_AddNodesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]);
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
}

static UA_INLINE UA_StatusCode
UA_BrowseRequest_copy(const UA_BrowseRequest *src, UA_BrowseRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);
}

static UA_INLINE void
UA_BrowseRequest_deleteMembers(UA_BrowseRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);
}

static UA_INLINE void
UA_BrowseRequest_clear(UA_BrowseRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);







|







25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
}

static UA_INLINE UA_StatusCode
UA_BrowseRequest_copy(const UA_BrowseRequest *src, UA_BrowseRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseRequest_deleteMembers(UA_BrowseRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);
}

static UA_INLINE void
UA_BrowseRequest_clear(UA_BrowseRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSEREQUEST]);
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
}

static UA_INLINE UA_StatusCode
UA_WriteRequest_copy(const UA_WriteRequest *src, UA_WriteRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITEREQUEST]);
}

static UA_INLINE void
UA_WriteRequest_deleteMembers(UA_WriteRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEREQUEST]);
}

static UA_INLINE void
UA_WriteRequest_clear(UA_WriteRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEREQUEST]);







|







25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
}

static UA_INLINE UA_StatusCode
UA_WriteRequest_copy(const UA_WriteRequest *src, UA_WriteRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITEREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_WriteRequest_deleteMembers(UA_WriteRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEREQUEST]);
}

static UA_INLINE void
UA_WriteRequest_clear(UA_WriteRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITEREQUEST]);
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
}

static UA_INLINE UA_StatusCode
UA_AddNodesResponse_copy(const UA_AddNodesResponse *src, UA_AddNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
}

static UA_INLINE void
UA_AddNodesResponse_deleteMembers(UA_AddNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
}

static UA_INLINE void
UA_AddNodesResponse_clear(UA_AddNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);







|







25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
}

static UA_INLINE UA_StatusCode
UA_AddNodesResponse_copy(const UA_AddNodesResponse *src, UA_AddNodesResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_AddNodesResponse_deleteMembers(UA_AddNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
}

static UA_INLINE void
UA_AddNodesResponse_clear(UA_AddNodesResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
}

static UA_INLINE UA_StatusCode
UA_RegisterServer2Request_copy(const UA_RegisterServer2Request *src, UA_RegisterServer2Request *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);
}

static UA_INLINE void
UA_RegisterServer2Request_deleteMembers(UA_RegisterServer2Request *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);
}

static UA_INLINE void
UA_RegisterServer2Request_clear(UA_RegisterServer2Request *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);







|







25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
}

static UA_INLINE UA_StatusCode
UA_RegisterServer2Request_copy(const UA_RegisterServer2Request *src, UA_RegisterServer2Request *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterServer2Request_deleteMembers(UA_RegisterServer2Request *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);
}

static UA_INLINE void
UA_RegisterServer2Request_clear(UA_RegisterServer2Request *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVER2REQUEST]);
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
}

static UA_INLINE UA_StatusCode
UA_AttributeOperand_copy(const UA_AttributeOperand *src, UA_AttributeOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_AttributeOperand_deleteMembers(UA_AttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_AttributeOperand_clear(UA_AttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);







|







25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
}

static UA_INLINE UA_StatusCode
UA_AttributeOperand_copy(const UA_AttributeOperand *src, UA_AttributeOperand *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);
}

UA_DEPRECATED static UA_INLINE void
UA_AttributeOperand_deleteMembers(UA_AttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);
}

static UA_INLINE void
UA_AttributeOperand_clear(UA_AttributeOperand *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]);
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
}

static UA_INLINE UA_StatusCode
UA_DataChangeFilter_copy(const UA_DataChangeFilter *src, UA_DataChangeFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);
}

static UA_INLINE void
UA_DataChangeFilter_deleteMembers(UA_DataChangeFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);
}

static UA_INLINE void
UA_DataChangeFilter_clear(UA_DataChangeFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);







|







25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
}

static UA_INLINE UA_StatusCode
UA_DataChangeFilter_copy(const UA_DataChangeFilter *src, UA_DataChangeFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataChangeFilter_deleteMembers(UA_DataChangeFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);
}

static UA_INLINE void
UA_DataChangeFilter_clear(UA_DataChangeFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATACHANGEFILTER]);
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
}

static UA_INLINE UA_StatusCode
UA_EndpointDescription_copy(const UA_EndpointDescription *src, UA_EndpointDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
}

static UA_INLINE void
UA_EndpointDescription_deleteMembers(UA_EndpointDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
}

static UA_INLINE void
UA_EndpointDescription_clear(UA_EndpointDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);







|







25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
}

static UA_INLINE UA_StatusCode
UA_EndpointDescription_copy(const UA_EndpointDescription *src, UA_EndpointDescription *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
}

UA_DEPRECATED static UA_INLINE void
UA_EndpointDescription_deleteMembers(UA_EndpointDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
}

static UA_INLINE void
UA_EndpointDescription_clear(UA_EndpointDescription *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesRequest_copy(const UA_DeleteReferencesRequest *src, UA_DeleteReferencesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);
}

static UA_INLINE void
UA_DeleteReferencesRequest_deleteMembers(UA_DeleteReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);
}

static UA_INLINE void
UA_DeleteReferencesRequest_clear(UA_DeleteReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);







|







25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
}

static UA_INLINE UA_StatusCode
UA_DeleteReferencesRequest_copy(const UA_DeleteReferencesRequest *src, UA_DeleteReferencesRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_DeleteReferencesRequest_deleteMembers(UA_DeleteReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);
}

static UA_INLINE void
UA_DeleteReferencesRequest_clear(UA_DeleteReferencesRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]);
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
}

static UA_INLINE UA_StatusCode
UA_HistoryEvent_copy(const UA_HistoryEvent *src, UA_HistoryEvent *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYEVENT]);
}

static UA_INLINE void
UA_HistoryEvent_deleteMembers(UA_HistoryEvent *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENT]);
}

static UA_INLINE void
UA_HistoryEvent_clear(UA_HistoryEvent *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENT]);







|







25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
}

static UA_INLINE UA_StatusCode
UA_HistoryEvent_copy(const UA_HistoryEvent *src, UA_HistoryEvent *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_HISTORYEVENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_HistoryEvent_deleteMembers(UA_HistoryEvent *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENT]);
}

static UA_INLINE void
UA_HistoryEvent_clear(UA_HistoryEvent *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_HISTORYEVENT]);
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
}

static UA_INLINE UA_StatusCode
UA_JsonWriterGroupMessageDataType_copy(const UA_JsonWriterGroupMessageDataType *src, UA_JsonWriterGroupMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonWriterGroupMessageDataType_deleteMembers(UA_JsonWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonWriterGroupMessageDataType_clear(UA_JsonWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);







|







25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
}

static UA_INLINE UA_StatusCode
UA_JsonWriterGroupMessageDataType_copy(const UA_JsonWriterGroupMessageDataType *src, UA_JsonWriterGroupMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_JsonWriterGroupMessageDataType_deleteMembers(UA_JsonWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonWriterGroupMessageDataType_clear(UA_JsonWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONWRITERGROUPMESSAGEDATATYPE]);
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
}

static UA_INLINE UA_StatusCode
UA_TranslateBrowsePathsToNodeIdsRequest_copy(const UA_TranslateBrowsePathsToNodeIdsRequest *src, UA_TranslateBrowsePathsToNodeIdsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsRequest_deleteMembers(UA_TranslateBrowsePathsToNodeIdsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsRequest_clear(UA_TranslateBrowsePathsToNodeIdsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);







|







25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
}

static UA_INLINE UA_StatusCode
UA_TranslateBrowsePathsToNodeIdsRequest_copy(const UA_TranslateBrowsePathsToNodeIdsRequest *src, UA_TranslateBrowsePathsToNodeIdsRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsRequest_deleteMembers(UA_TranslateBrowsePathsToNodeIdsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsRequest_clear(UA_TranslateBrowsePathsToNodeIdsRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]);
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetReaderMessageDataType_copy(const UA_JsonDataSetReaderMessageDataType *src, UA_JsonDataSetReaderMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetReaderMessageDataType_deleteMembers(UA_JsonDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetReaderMessageDataType_clear(UA_JsonDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);







|







25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
}

static UA_INLINE UA_StatusCode
UA_JsonDataSetReaderMessageDataType_copy(const UA_JsonDataSetReaderMessageDataType *src, UA_JsonDataSetReaderMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_JsonDataSetReaderMessageDataType_deleteMembers(UA_JsonDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_JsonDataSetReaderMessageDataType_clear(UA_JsonDataSetReaderMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_JSONDATASETREADERMESSAGEDATATYPE]);
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
}

static UA_INLINE UA_StatusCode
UA_FindServersResponse_copy(const UA_FindServersResponse *src, UA_FindServersResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);
}

static UA_INLINE void
UA_FindServersResponse_deleteMembers(UA_FindServersResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);
}

static UA_INLINE void
UA_FindServersResponse_clear(UA_FindServersResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);







|







25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
}

static UA_INLINE UA_StatusCode
UA_FindServersResponse_copy(const UA_FindServersResponse *src, UA_FindServersResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_FindServersResponse_deleteMembers(UA_FindServersResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);
}

static UA_INLINE void
UA_FindServersResponse_clear(UA_FindServersResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]);
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
}

static UA_INLINE UA_StatusCode
UA_CreateSessionRequest_copy(const UA_CreateSessionRequest *src, UA_CreateSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);
}

static UA_INLINE void
UA_CreateSessionRequest_deleteMembers(UA_CreateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);
}

static UA_INLINE void
UA_CreateSessionRequest_clear(UA_CreateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);







|







25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
}

static UA_INLINE UA_StatusCode
UA_CreateSessionRequest_copy(const UA_CreateSessionRequest *src, UA_CreateSessionRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateSessionRequest_deleteMembers(UA_CreateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);
}

static UA_INLINE void
UA_CreateSessionRequest_clear(UA_CreateSessionRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]);
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
}

static UA_INLINE UA_StatusCode
UA_ContentFilterElement_copy(const UA_ContentFilterElement *src, UA_ContentFilterElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);
}

static UA_INLINE void
UA_ContentFilterElement_deleteMembers(UA_ContentFilterElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);
}

static UA_INLINE void
UA_ContentFilterElement_clear(UA_ContentFilterElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);







|







25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
}

static UA_INLINE UA_StatusCode
UA_ContentFilterElement_copy(const UA_ContentFilterElement *src, UA_ContentFilterElement *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);
}

UA_DEPRECATED static UA_INLINE void
UA_ContentFilterElement_deleteMembers(UA_ContentFilterElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);
}

static UA_INLINE void
UA_ContentFilterElement_clear(UA_ContentFilterElement *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]);
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
}

static UA_INLINE UA_StatusCode
UA_UadpWriterGroupMessageDataType_copy(const UA_UadpWriterGroupMessageDataType *src, UA_UadpWriterGroupMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpWriterGroupMessageDataType_deleteMembers(UA_UadpWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpWriterGroupMessageDataType_clear(UA_UadpWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);







|







25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
}

static UA_INLINE UA_StatusCode
UA_UadpWriterGroupMessageDataType_copy(const UA_UadpWriterGroupMessageDataType *src, UA_UadpWriterGroupMessageDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UadpWriterGroupMessageDataType_deleteMembers(UA_UadpWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);
}

static UA_INLINE void
UA_UadpWriterGroupMessageDataType_clear(UA_UadpWriterGroupMessageDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UADPWRITERGROUPMESSAGEDATATYPE]);
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999































25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
}

static UA_INLINE UA_StatusCode
UA_RegisterServerRequest_copy(const UA_RegisterServerRequest *src, UA_RegisterServerRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

static UA_INLINE void
UA_RegisterServerRequest_deleteMembers(UA_RegisterServerRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

static UA_INLINE void
UA_RegisterServerRequest_clear(UA_RegisterServerRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

static UA_INLINE void
UA_RegisterServerRequest_delete(UA_RegisterServerRequest *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}
































/* TranslateBrowsePathsToNodeIdsResponse */
static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_init(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    memset(p, 0, sizeof(UA_TranslateBrowsePathsToNodeIdsResponse));
}

static UA_INLINE UA_TranslateBrowsePathsToNodeIdsResponse *
UA_TranslateBrowsePathsToNodeIdsResponse_new(void) {
    return (UA_TranslateBrowsePathsToNodeIdsResponse*)UA_new(&UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

static UA_INLINE UA_StatusCode
UA_TranslateBrowsePathsToNodeIdsResponse_copy(const UA_TranslateBrowsePathsToNodeIdsResponse *src, UA_TranslateBrowsePathsToNodeIdsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_deleteMembers(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_clear(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
}

static UA_INLINE UA_StatusCode
UA_RegisterServerRequest_copy(const UA_RegisterServerRequest *src, UA_RegisterServerRequest *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

UA_DEPRECATED static UA_INLINE void
UA_RegisterServerRequest_deleteMembers(UA_RegisterServerRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

static UA_INLINE void
UA_RegisterServerRequest_clear(UA_RegisterServerRequest *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

static UA_INLINE void
UA_RegisterServerRequest_delete(UA_RegisterServerRequest *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_REGISTERSERVERREQUEST]);
}

/* UABinaryFileDataType */
static UA_INLINE void
UA_UABinaryFileDataType_init(UA_UABinaryFileDataType *p) {
    memset(p, 0, sizeof(UA_UABinaryFileDataType));
}

static UA_INLINE UA_UABinaryFileDataType *
UA_UABinaryFileDataType_new(void) {
    return (UA_UABinaryFileDataType*)UA_new(&UA_TYPES[UA_TYPES_UABINARYFILEDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_UABinaryFileDataType_copy(const UA_UABinaryFileDataType *src, UA_UABinaryFileDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_UABINARYFILEDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_UABinaryFileDataType_deleteMembers(UA_UABinaryFileDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UABINARYFILEDATATYPE]);
}

static UA_INLINE void
UA_UABinaryFileDataType_clear(UA_UABinaryFileDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_UABINARYFILEDATATYPE]);
}

static UA_INLINE void
UA_UABinaryFileDataType_delete(UA_UABinaryFileDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_UABINARYFILEDATATYPE]);
}

/* TranslateBrowsePathsToNodeIdsResponse */
static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_init(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    memset(p, 0, sizeof(UA_TranslateBrowsePathsToNodeIdsResponse));
}

static UA_INLINE UA_TranslateBrowsePathsToNodeIdsResponse *
UA_TranslateBrowsePathsToNodeIdsResponse_new(void) {
    return (UA_TranslateBrowsePathsToNodeIdsResponse*)UA_new(&UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

static UA_INLINE UA_StatusCode
UA_TranslateBrowsePathsToNodeIdsResponse_copy(const UA_TranslateBrowsePathsToNodeIdsResponse *src, UA_TranslateBrowsePathsToNodeIdsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_deleteMembers(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
}

static UA_INLINE void
UA_TranslateBrowsePathsToNodeIdsResponse_clear(UA_TranslateBrowsePathsToNodeIdsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
}

static UA_INLINE UA_StatusCode
UA_BrowseResponse_copy(const UA_BrowseResponse *src, UA_BrowseResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
}

static UA_INLINE void
UA_BrowseResponse_deleteMembers(UA_BrowseResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
}

static UA_INLINE void
UA_BrowseResponse_clear(UA_BrowseResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);







|







25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
}

static UA_INLINE UA_StatusCode
UA_BrowseResponse_copy(const UA_BrowseResponse *src, UA_BrowseResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_BrowseResponse_deleteMembers(UA_BrowseResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
}

static UA_INLINE void
UA_BrowseResponse_clear(UA_BrowseResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
}

static UA_INLINE UA_StatusCode
UA_CreateSessionResponse_copy(const UA_CreateSessionResponse *src, UA_CreateSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSessionResponse_deleteMembers(UA_CreateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSessionResponse_clear(UA_CreateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);







|







25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
}

static UA_INLINE UA_StatusCode
UA_CreateSessionResponse_copy(const UA_CreateSessionResponse *src, UA_CreateSessionResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_CreateSessionResponse_deleteMembers(UA_CreateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);
}

static UA_INLINE void
UA_CreateSessionResponse_clear(UA_CreateSessionResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]);
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
}

static UA_INLINE UA_StatusCode
UA_DataSetMetaDataType_copy(const UA_DataSetMetaDataType *src, UA_DataSetMetaDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);
}

static UA_INLINE void
UA_DataSetMetaDataType_deleteMembers(UA_DataSetMetaDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);
}

static UA_INLINE void
UA_DataSetMetaDataType_clear(UA_DataSetMetaDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);







|







25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
}

static UA_INLINE UA_StatusCode
UA_DataSetMetaDataType_copy(const UA_DataSetMetaDataType *src, UA_DataSetMetaDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetMetaDataType_deleteMembers(UA_DataSetMetaDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);
}

static UA_INLINE void
UA_DataSetMetaDataType_clear(UA_DataSetMetaDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETMETADATATYPE]);
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
}

static UA_INLINE UA_StatusCode
UA_ContentFilter_copy(const UA_ContentFilter *src, UA_ContentFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTER]);
}

static UA_INLINE void
UA_ContentFilter_deleteMembers(UA_ContentFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTER]);
}

static UA_INLINE void
UA_ContentFilter_clear(UA_ContentFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTER]);







|







25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
}

static UA_INLINE UA_StatusCode
UA_ContentFilter_copy(const UA_ContentFilter *src, UA_ContentFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_CONTENTFILTER]);
}

UA_DEPRECATED static UA_INLINE void
UA_ContentFilter_deleteMembers(UA_ContentFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTER]);
}

static UA_INLINE void
UA_ContentFilter_clear(UA_ContentFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_CONTENTFILTER]);
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
}

static UA_INLINE UA_StatusCode
UA_WriterGroupDataType_copy(const UA_WriterGroupDataType *src, UA_WriterGroupDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);
}

static UA_INLINE void
UA_WriterGroupDataType_deleteMembers(UA_WriterGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);
}

static UA_INLINE void
UA_WriterGroupDataType_clear(UA_WriterGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);







|







25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
}

static UA_INLINE UA_StatusCode
UA_WriterGroupDataType_copy(const UA_WriterGroupDataType *src, UA_WriterGroupDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_WriterGroupDataType_deleteMembers(UA_WriterGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);
}

static UA_INLINE void
UA_WriterGroupDataType_clear(UA_WriterGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_WRITERGROUPDATATYPE]);
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216































25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
}

static UA_INLINE UA_StatusCode
UA_GetEndpointsResponse_copy(const UA_GetEndpointsResponse *src, UA_GetEndpointsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

static UA_INLINE void
UA_GetEndpointsResponse_deleteMembers(UA_GetEndpointsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

static UA_INLINE void
UA_GetEndpointsResponse_clear(UA_GetEndpointsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

static UA_INLINE void
UA_GetEndpointsResponse_delete(UA_GetEndpointsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}
































/* EventFilter */
static UA_INLINE void
UA_EventFilter_init(UA_EventFilter *p) {
    memset(p, 0, sizeof(UA_EventFilter));
}

static UA_INLINE UA_EventFilter *
UA_EventFilter_new(void) {
    return (UA_EventFilter*)UA_new(&UA_TYPES[UA_TYPES_EVENTFILTER]);
}

static UA_INLINE UA_StatusCode
UA_EventFilter_copy(const UA_EventFilter *src, UA_EventFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFILTER]);
}

static UA_INLINE void
UA_EventFilter_deleteMembers(UA_EventFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTER]);
}

static UA_INLINE void
UA_EventFilter_clear(UA_EventFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTER]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
}

static UA_INLINE UA_StatusCode
UA_GetEndpointsResponse_copy(const UA_GetEndpointsResponse *src, UA_GetEndpointsResponse *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

UA_DEPRECATED static UA_INLINE void
UA_GetEndpointsResponse_deleteMembers(UA_GetEndpointsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

static UA_INLINE void
UA_GetEndpointsResponse_clear(UA_GetEndpointsResponse *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

static UA_INLINE void
UA_GetEndpointsResponse_delete(UA_GetEndpointsResponse *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]);
}

/* PublishedEventsDataType */
static UA_INLINE void
UA_PublishedEventsDataType_init(UA_PublishedEventsDataType *p) {
    memset(p, 0, sizeof(UA_PublishedEventsDataType));
}

static UA_INLINE UA_PublishedEventsDataType *
UA_PublishedEventsDataType_new(void) {
    return (UA_PublishedEventsDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBLISHEDEVENTSDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PublishedEventsDataType_copy(const UA_PublishedEventsDataType *src, UA_PublishedEventsDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHEDEVENTSDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishedEventsDataType_deleteMembers(UA_PublishedEventsDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDEVENTSDATATYPE]);
}

static UA_INLINE void
UA_PublishedEventsDataType_clear(UA_PublishedEventsDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDEVENTSDATATYPE]);
}

static UA_INLINE void
UA_PublishedEventsDataType_delete(UA_PublishedEventsDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBLISHEDEVENTSDATATYPE]);
}

/* EventFilter */
static UA_INLINE void
UA_EventFilter_init(UA_EventFilter *p) {
    memset(p, 0, sizeof(UA_EventFilter));
}

static UA_INLINE UA_EventFilter *
UA_EventFilter_new(void) {
    return (UA_EventFilter*)UA_new(&UA_TYPES[UA_TYPES_EVENTFILTER]);
}

static UA_INLINE UA_StatusCode
UA_EventFilter_copy(const UA_EventFilter *src, UA_EventFilter *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_EVENTFILTER]);
}

UA_DEPRECATED static UA_INLINE void
UA_EventFilter_deleteMembers(UA_EventFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTER]);
}

static UA_INLINE void
UA_EventFilter_clear(UA_EventFilter *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_EVENTFILTER]);
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278































25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
}

static UA_INLINE UA_StatusCode
UA_DataSetReaderDataType_copy(const UA_DataSetReaderDataType *src, UA_DataSetReaderDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

static UA_INLINE void
UA_DataSetReaderDataType_deleteMembers(UA_DataSetReaderDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

static UA_INLINE void
UA_DataSetReaderDataType_clear(UA_DataSetReaderDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

static UA_INLINE void
UA_DataSetReaderDataType_delete(UA_DataSetReaderDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}
































/* ReadEventDetails */
static UA_INLINE void
UA_ReadEventDetails_init(UA_ReadEventDetails *p) {
    memset(p, 0, sizeof(UA_ReadEventDetails));
}

static UA_INLINE UA_ReadEventDetails *
UA_ReadEventDetails_new(void) {
    return (UA_ReadEventDetails*)UA_new(&UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

static UA_INLINE UA_StatusCode
UA_ReadEventDetails_copy(const UA_ReadEventDetails *src, UA_ReadEventDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

static UA_INLINE void
UA_ReadEventDetails_deleteMembers(UA_ReadEventDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

static UA_INLINE void
UA_ReadEventDetails_clear(UA_ReadEventDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);







|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















|







25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
}

static UA_INLINE UA_StatusCode
UA_DataSetReaderDataType_copy(const UA_DataSetReaderDataType *src, UA_DataSetReaderDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_DataSetReaderDataType_deleteMembers(UA_DataSetReaderDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

static UA_INLINE void
UA_DataSetReaderDataType_clear(UA_DataSetReaderDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

static UA_INLINE void
UA_DataSetReaderDataType_delete(UA_DataSetReaderDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_DATASETREADERDATATYPE]);
}

/* PublishedDataSetDataType */
static UA_INLINE void
UA_PublishedDataSetDataType_init(UA_PublishedDataSetDataType *p) {
    memset(p, 0, sizeof(UA_PublishedDataSetDataType));
}

static UA_INLINE UA_PublishedDataSetDataType *
UA_PublishedDataSetDataType_new(void) {
    return (UA_PublishedDataSetDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBLISHEDDATASETDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PublishedDataSetDataType_copy(const UA_PublishedDataSetDataType *src, UA_PublishedDataSetDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBLISHEDDATASETDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PublishedDataSetDataType_deleteMembers(UA_PublishedDataSetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATASETDATATYPE]);
}

static UA_INLINE void
UA_PublishedDataSetDataType_clear(UA_PublishedDataSetDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATASETDATATYPE]);
}

static UA_INLINE void
UA_PublishedDataSetDataType_delete(UA_PublishedDataSetDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBLISHEDDATASETDATATYPE]);
}

/* ReadEventDetails */
static UA_INLINE void
UA_ReadEventDetails_init(UA_ReadEventDetails *p) {
    memset(p, 0, sizeof(UA_ReadEventDetails));
}

static UA_INLINE UA_ReadEventDetails *
UA_ReadEventDetails_new(void) {
    return (UA_ReadEventDetails*)UA_new(&UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

static UA_INLINE UA_StatusCode
UA_ReadEventDetails_copy(const UA_ReadEventDetails *src, UA_ReadEventDetails *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReadEventDetails_deleteMembers(UA_ReadEventDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);
}

static UA_INLINE void
UA_ReadEventDetails_clear(UA_ReadEventDetails *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READEVENTDETAILS]);
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
}

static UA_INLINE UA_StatusCode
UA_ReaderGroupDataType_copy(const UA_ReaderGroupDataType *src, UA_ReaderGroupDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);
}

static UA_INLINE void
UA_ReaderGroupDataType_deleteMembers(UA_ReaderGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);
}

static UA_INLINE void
UA_ReaderGroupDataType_clear(UA_ReaderGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);







|







25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
}

static UA_INLINE UA_StatusCode
UA_ReaderGroupDataType_copy(const UA_ReaderGroupDataType *src, UA_ReaderGroupDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_ReaderGroupDataType_deleteMembers(UA_ReaderGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);
}

static UA_INLINE void
UA_ReaderGroupDataType_clear(UA_ReaderGroupDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_READERGROUPDATATYPE]);
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371































25372
25373
25374
25375
25376
25377
25378
}

static UA_INLINE UA_StatusCode
UA_PubSubConnectionDataType_copy(const UA_PubSubConnectionDataType *src, UA_PubSubConnectionDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConnectionDataType_deleteMembers(UA_PubSubConnectionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConnectionDataType_clear(UA_PubSubConnectionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConnectionDataType_delete(UA_PubSubConnectionDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}
































#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
# pragma GCC diagnostic pop
#endif

_UA_END_DECLS








|













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
}

static UA_INLINE UA_StatusCode
UA_PubSubConnectionDataType_copy(const UA_PubSubConnectionDataType *src, UA_PubSubConnectionDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PubSubConnectionDataType_deleteMembers(UA_PubSubConnectionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConnectionDataType_clear(UA_PubSubConnectionDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConnectionDataType_delete(UA_PubSubConnectionDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBSUBCONNECTIONDATATYPE]);
}

/* PubSubConfigurationDataType */
static UA_INLINE void
UA_PubSubConfigurationDataType_init(UA_PubSubConfigurationDataType *p) {
    memset(p, 0, sizeof(UA_PubSubConfigurationDataType));
}

static UA_INLINE UA_PubSubConfigurationDataType *
UA_PubSubConfigurationDataType_new(void) {
    return (UA_PubSubConfigurationDataType*)UA_new(&UA_TYPES[UA_TYPES_PUBSUBCONFIGURATIONDATATYPE]);
}

static UA_INLINE UA_StatusCode
UA_PubSubConfigurationDataType_copy(const UA_PubSubConfigurationDataType *src, UA_PubSubConfigurationDataType *dst) {
    return UA_copy(src, dst, &UA_TYPES[UA_TYPES_PUBSUBCONFIGURATIONDATATYPE]);
}

UA_DEPRECATED static UA_INLINE void
UA_PubSubConfigurationDataType_deleteMembers(UA_PubSubConfigurationDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONFIGURATIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConfigurationDataType_clear(UA_PubSubConfigurationDataType *p) {
    UA_clear(p, &UA_TYPES[UA_TYPES_PUBSUBCONFIGURATIONDATATYPE]);
}

static UA_INLINE void
UA_PubSubConfigurationDataType_delete(UA_PubSubConfigurationDataType *p) {
    UA_delete(p, &UA_TYPES[UA_TYPES_PUBSUBCONFIGURATIONDATATYPE]);
}

#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
# pragma GCC diagnostic pop
#endif

_UA_END_DECLS

25386
25387
25388
25389
25390
25391
25392














25393
25394
25395
25396
25397
25398
25399
 *    Copyright 2018 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS















/**
 * Endpoint URL Parser
 * -------------------
 * The endpoint URL parser is generally useful for the implementation of network
 * layer plugins. */

/* Split the given endpoint url into hostname, port and path. All arguments must







>
>
>
>
>
>
>
>
>
>
>
>
>
>







26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
 *    Copyright 2018 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

/**
 * Forward Declarations
 * --------------------
 * Opaque oointers used by the plugins. */

struct UA_Server;
typedef struct UA_Server UA_Server;

struct UA_ServerConfig;
typedef struct UA_ServerConfig UA_ServerConfig;

struct UA_Client;
typedef struct UA_Client UA_Client;

/**
 * Endpoint URL Parser
 * -------------------
 * The endpoint URL parser is generally useful for the implementation of network
 * layer plugins. */

/* Split the given endpoint url into hostname, port and path. All arguments must
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457

/* Same as UA_ReadNumber but with a base parameter */
size_t UA_EXPORT
UA_readNumberWithBase(const UA_Byte *buf, size_t buflen,
                      UA_UInt32 *number, UA_Byte base);

#ifndef UA_MIN
#define UA_MIN(A,B) (A > B ? B : A)
#endif

#ifndef UA_MAX
#define UA_MAX(A,B) (A > B ? A : B)
#endif

/**
 * Parse RelativePath Expressions
 * ------------------------------
 *
 * Parse a RelativePath according to the format defined in Part 4, A2. This is







|



|







26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122

/* Same as UA_ReadNumber but with a base parameter */
size_t UA_EXPORT
UA_readNumberWithBase(const UA_Byte *buf, size_t buflen,
                      UA_UInt32 *number, UA_Byte base);

#ifndef UA_MIN
#define UA_MIN(A, B) ((A) > (B) ? (B) : (A))
#endif

#ifndef UA_MAX
#define UA_MAX(A, B) ((A) > (B) ? (A) : (B))
#endif

/**
 * Parse RelativePath Expressions
 * ------------------------------
 *
 * Parse a RelativePath according to the format defined in Part 4, A2. This is
25538
25539
25540
25541
25542
25543
25544
25545


























































































































































25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564






25565

































































































































































































































































































































































































































































































































































































25566

































































































































































































































































































































































































































































































































































































































































































































































































































































































25567












































































































































































































































25568






























25569


























25570























































































































































































































































































































































































25571






































































































































































































25572
25573
25574
25575
25576
25577
25578




















25579


25580






































































































































































































































25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
    }
    return !c;
}

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/server.h" ***********************************/



























































































































































/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2015-2016 (c) Sten Grüner
 *    Copyright 2014-2015, 2017 (c) Florian Palm
 *    Copyright 2015-2016 (c) Chris Iatrou
 *    Copyright 2015-2016 (c) Oleksiy Vasylyev
 *    Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2017-2020 (c) HMS Industrial Networks AB (Author: Jonas Green)
 */



_UA_BEGIN_DECLS

/* Forward declarations */






struct UA_ServerConfig;

































































































































































































































































































































































































































































































































































































typedef struct UA_ServerConfig UA_ServerConfig;














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































struct UA_Server;






























typedef struct UA_Server UA_Server;


















































































































































































































































































































































































































struct UA_Client;







































































































































































































/**
 * .. _server:
 *
 * Server
 * ======
 *




















 * .. include:: server_config.rst


 *






































































































































































































































 * .. _server-lifecycle:
 *
 * Server Lifecycle
 * ---------------- */

/* The method UA_Server_new is defined in server_config_default.h. So default
 * plugins outside of the core library (for logging, etc) are already available
 * during the initialization.
 *
 * UA_Server UA_EXPORT * UA_Server_new(void);
 */

/* Creates a new server. Moves the config into the server with a shallow copy.
 * The config content is cleared together with the server. */
UA_Server UA_EXPORT *
UA_Server_newWithConfig(const UA_ServerConfig *config);

void UA_EXPORT UA_Server_delete(UA_Server *server);

UA_ServerConfig UA_EXPORT *
UA_Server_getConfig(UA_Server *server);

/* Runs the main loop of the server. In each iteration, this calls into the







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|
<
<
<
<
|
<







>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>















|







26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370




26371

26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
    }
    return !c;
}

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/log.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



#include <stdarg.h>

_UA_BEGIN_DECLS

/**
 * Logging Plugin API
 * ==================
 *
 * Servers and clients define a logger in their configuration. The logger is a
 * plugin. A default plugin that logs to ``stdout`` is provided as an example.
 * The logger plugin is stateful and can point to custom data. So it is possible
 * to keep open file handlers in the logger context.
 *
 * Every log-message consists of a log-level, a log-category and a string
 * message content. The timestamp of the log-message is created within the
 * logger. */

typedef enum {
    UA_LOGLEVEL_TRACE = 0,
    UA_LOGLEVEL_DEBUG,
    UA_LOGLEVEL_INFO,
    UA_LOGLEVEL_WARNING,
    UA_LOGLEVEL_ERROR,
    UA_LOGLEVEL_FATAL
} UA_LogLevel;

typedef enum {
    UA_LOGCATEGORY_NETWORK = 0,
    UA_LOGCATEGORY_SECURECHANNEL,
    UA_LOGCATEGORY_SESSION,
    UA_LOGCATEGORY_SERVER,
    UA_LOGCATEGORY_CLIENT,
    UA_LOGCATEGORY_USERLAND,
    UA_LOGCATEGORY_SECURITYPOLICY
} UA_LogCategory;

typedef struct {
    /* Log a message. The message string and following varargs are formatted
     * according to the rules of the printf command. Use the convenience macros
     * below that take the minimum log-level defined in ua_config.h into
     * account. */
    void (*log)(void *logContext, UA_LogLevel level, UA_LogCategory category,
                const char *msg, va_list args);

    void *context; /* Logger state */

    void (*clear)(void *context); /* Clean up the logger plugin */
} UA_Logger;

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_TRACE(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 100
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_TRACE, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_DEBUG(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 200
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_DEBUG, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_INFO(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 300
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_INFO, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_WARNING(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 400
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_WARNING, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_ERROR(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 500
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_ERROR, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_FATAL(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 600
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_FATAL, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/network.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)




 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH

 */



_UA_BEGIN_DECLS

/* Forward declarations */
struct UA_Connection;
typedef struct UA_Connection UA_Connection;

struct UA_SecureChannel;
typedef struct UA_SecureChannel UA_SecureChannel;

struct UA_ServerNetworkLayer;
typedef struct UA_ServerNetworkLayer UA_ServerNetworkLayer;

/**
 * .. _networking:
 *
 * Networking Plugin API
 * =====================
 *
 * Connection
 * ----------
 * Client-server connections are represented by a `UA_Connection`. The
 * connection is stateful and stores partially received messages, and so on. In
 * addition, the connection contains function pointers to the underlying
 * networking implementation. An example for this is the `send` function. So the
 * connection encapsulates all the required networking functionality. This lets
 * users on embedded (or otherwise exotic) systems implement their own
 * networking plugins with a clear interface to the main open62541 library. */

typedef struct {
    UA_UInt32 protocolVersion;
    UA_UInt32 recvBufferSize;
    UA_UInt32 sendBufferSize;
    UA_UInt32 localMaxMessageSize;  /* (0 = unbounded) */
    UA_UInt32 remoteMaxMessageSize; /* (0 = unbounded) */
    UA_UInt32 localMaxChunkCount;   /* (0 = unbounded) */
    UA_UInt32 remoteMaxChunkCount;  /* (0 = unbounded) */
} UA_ConnectionConfig;

typedef enum {
    UA_CONNECTIONSTATE_CLOSED,     /* The socket has been closed and the connection
                                    * will be deleted */
    UA_CONNECTIONSTATE_OPENING,    /* The socket is open, but the HEL/ACK handshake
                                    * is not done */
    UA_CONNECTIONSTATE_ESTABLISHED /* The socket is open and the connection
                                    * configured */
} UA_ConnectionState;

struct UA_Connection {
    UA_ConnectionState state;
    UA_SecureChannel *channel;     /* The securechannel that is attached to
                                    * this connection */
    UA_SOCKET sockfd;              /* Most connectivity solutions run on
                                    * sockets. Having the socket id here
                                    * simplifies the design. */
    UA_DateTime openingDate;       /* The date the connection was created */
    void *handle;                  /* A pointer to internal data */

    /* Get a buffer for sending */
    UA_StatusCode (*getSendBuffer)(UA_Connection *connection, size_t length,
                                   UA_ByteString *buf);

    /* Release the send buffer manually */
    void (*releaseSendBuffer)(UA_Connection *connection, UA_ByteString *buf);

    /* Sends a message over the connection. The message buffer is always freed,
     * even if sending fails.
     *
     * @param connection The connection
     * @param buf The message buffer
     * @return Returns an error code or UA_STATUSCODE_GOOD. */
    UA_StatusCode (*send)(UA_Connection *connection, UA_ByteString *buf);

    /* Receive a message from the remote connection
     *
     * @param connection The connection

     * @param response The response string. If this is empty, it will be
     *        allocated by the connection and needs to be freed with
     *        connection->releaseBuffer. If the response string is non-empty, it
     *        will be used as the receive buffer. If bytes are received, the
     *        length of the buffer is adjusted to match the length of the
     *        received bytes.
     * @param timeout Timeout of the recv operation in milliseconds
     * @return Returns UA_STATUSCODE_BADCOMMUNICATIONERROR if the recv operation
     *         can be repeated, UA_STATUSCODE_GOOD if it succeeded and
     *         UA_STATUSCODE_BADCONNECTIONCLOSED if the connection was
     *         closed. */
    UA_StatusCode (*recv)(UA_Connection *connection, UA_ByteString *response,
                          UA_UInt32 timeout);

    /* Release the buffer of a received message */
    void (*releaseRecvBuffer)(UA_Connection *connection, UA_ByteString *buf);

    /* Close the connection. The network layer closes the socket. This is picked
     * up during the next 'listen' and the connection is freed in the network
     * layer. */
    void (*close)(UA_Connection *connection);

    /* To be called only from within the server (and not the network layer).
     * Frees up the connection's memory. */
    void (*free)(UA_Connection *connection);
};

/**
 * Server Network Layer
 * --------------------
 * The server exposes two functions to interact with remote clients:
 * `processBinaryMessage` and `removeConnection`. These functions are called by
 * the server network layer.
 *
 * It is the job of the server network layer to listen on a TCP socket, to
 * accept new connections, to call the server with received messages and to
 * signal closed connections to the server.
 *
 * The network layer is part of the server config. So users can provide a custom
 * implementation if the provided example does not fit their architecture. The
 * network layer is invoked only from the server's main loop. So the network
 * layer does not need to be thread-safe. If the networklayer receives a
 * positive duration for blocking listening, the server's main loop will block
 * until a message is received or the duration times out. */

/* Process a binary message (TCP packet). The message can contain partial
 * chunks. (TCP is a streaming protocol and packets may be split/merge during
 * transport.) After processing, the message is freed with
 * connection->releaseRecvBuffer. */
void UA_EXPORT
UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection,
                               UA_ByteString *message);

/* The server internally cleans up the connection and then calls
 * connection->free. */
void UA_EXPORT
UA_Server_removeConnection(UA_Server *server, UA_Connection *connection);

struct UA_ServerNetworkLayer {
    void *handle; /* Internal data */

    /* Points to external memory, i.e. handled by server or client */
    UA_NetworkStatistics *statistics;

    UA_String discoveryUrl;

    UA_ConnectionConfig localConnectionConfig;

    /* Start listening on the networklayer.
     *
     * @param nl The network layer
     * @return Returns UA_STATUSCODE_GOOD or an error code. */
    UA_StatusCode (*start)(UA_ServerNetworkLayer *nl, const UA_Logger *logger,
                           const UA_String *customHostname);

    /* Listen for new and closed connections and arriving packets. Calls
     * UA_Server_processBinaryMessage for the arriving packets. Closed
     * connections are picked up here and forwarded to
     * UA_Server_removeConnection where they are cleaned up and freed.
     *
     * @param nl The network layer
     * @param server The server for processing the incoming packets and for
     *               closing connections.
     * @param timeout The timeout during which an event must arrive in
     *                milliseconds
     * @return A statuscode for the status of the network layer. */
    UA_StatusCode (*listen)(UA_ServerNetworkLayer *nl, UA_Server *server,
                            UA_UInt16 timeout);

    /* Close the network socket and all open connections. Afterwards, the
     * network layer can be safely deleted.
     *
     * @param nl The network layer
     * @param server The server that processes the incoming packets and for
     *               closing connections before deleting them.
     * @return A statuscode for the status of the closing operation. */
    void (*stop)(UA_ServerNetworkLayer *nl, UA_Server *server);

    /* Deletes the network layer context. Call only after stopping. */
    void (*clear)(UA_ServerNetworkLayer *nl);
};

/**
 * Client Network Layer
 * --------------------
 * The client has only a single connection used for sending and receiving binary
 * messages. */

/* @param config the connection config for this client
 * @param endpointUrl to where to connect
 * @param timeout in ms until the connection try times out if remote not reachable
 * @param logger the logger to use */
typedef UA_Connection
(*UA_ConnectClientConnection)(UA_ConnectionConfig config, UA_String endpointUrl,
                              UA_UInt32 timeout, const UA_Logger *logger);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/accesscontrol.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

struct UA_AccessControl;
typedef struct UA_AccessControl UA_AccessControl;

/**
 * .. _access-control:
 *
 * Access Control Plugin API
 * =========================
 * The access control callback is used to authenticate sessions and grant access
 * rights accordingly.
 *
 * The ``sessionId`` and ``sessionContext`` can be both NULL. This is the case
 * when, for example, a MonitoredItem (the underlying Subscription) is detached
 * from its Session but continues to run. */

struct UA_AccessControl {
    void *context;
    void (*clear)(UA_AccessControl *ac);

    /* Security mode similar to UA_ClientConfig.securityMode */

    UA_MessageSecurityMode securityMode;

    /* Supported login mechanisms. The server endpoints are created from here. */
    size_t userTokenPoliciesSize;
    UA_UserTokenPolicy *userTokenPolicies;

    /* Authenticate a session. The session context is attached to the session
     * and later passed into the node-based access control callbacks. The new
     * session is rejected if a StatusCode other than UA_STATUSCODE_GOOD is
     * returned. */
    UA_StatusCode (*activateSession)(UA_Server *server, UA_AccessControl *ac,
                                     const UA_EndpointDescription *endpointDescription,
                                     const UA_ByteString *secureChannelRemoteCertificate,
                                     const UA_NodeId *sessionId,
                                     const UA_ExtensionObject *userIdentityToken,
                                     void **sessionContext);

    /* Deauthenticate a session and cleanup */
    void (*closeSession)(UA_Server *server, UA_AccessControl *ac,
                         const UA_NodeId *sessionId, void *sessionContext);

    /* Access control for all nodes*/
    UA_UInt32 (*getUserRightsMask)(UA_Server *server, UA_AccessControl *ac,
                                   const UA_NodeId *sessionId, void *sessionContext,
                                   const UA_NodeId *nodeId, void *nodeContext);

    /* Additional access control for variable nodes */
    UA_Byte (*getUserAccessLevel)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_NodeId *nodeId, void *nodeContext);

    /* Additional access control for method nodes */
    UA_Boolean (*getUserExecutable)(UA_Server *server, UA_AccessControl *ac,
                                    const UA_NodeId *sessionId, void *sessionContext,
                                    const UA_NodeId *methodId, void *methodContext);

    /* Additional access control for calling a method node in the context of a
     * specific object */
    UA_Boolean (*getUserExecutableOnObject)(UA_Server *server, UA_AccessControl *ac,
                                            const UA_NodeId *sessionId, void *sessionContext,
                                            const UA_NodeId *methodId, void *methodContext,
                                            const UA_NodeId *objectId, void *objectContext);

    /* Allow adding a node */
    UA_Boolean (*allowAddNode)(UA_Server *server, UA_AccessControl *ac,
                               const UA_NodeId *sessionId, void *sessionContext,
                               const UA_AddNodesItem *item);

    /* Allow adding a reference */
    UA_Boolean (*allowAddReference)(UA_Server *server, UA_AccessControl *ac,
                                    const UA_NodeId *sessionId, void *sessionContext,
                                    const UA_AddReferencesItem *item);

    /* Allow deleting a node */
    UA_Boolean (*allowDeleteNode)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_DeleteNodesItem *item);

    /* Allow deleting a reference */
    UA_Boolean (*allowDeleteReference)(UA_Server *server, UA_AccessControl *ac,
                                       const UA_NodeId *sessionId, void *sessionContext,
                                       const UA_DeleteReferencesItem *item);

    /* Allow browsing a node */
    UA_Boolean (*allowBrowseNode)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_NodeId *nodeId, void *nodeContext);

#ifdef UA_ENABLE_SUBSCRIPTIONS
    /* Allow transfer of a subscription to another session. The Server shall
     * validate that the Client of that Session is operating on behalf of the
     * same user */
    UA_Boolean (*allowTransferSubscription)(UA_Server *server, UA_AccessControl *ac,
                                            const UA_NodeId *oldSessionId, void *oldSessionContext,
                                            const UA_NodeId *newSessionId, void *newSessionContext);
#endif

#ifdef UA_ENABLE_HISTORIZING
    /* Allow insert,replace,update of historical data */
    UA_Boolean (*allowHistoryUpdateUpdateData)(UA_Server *server, UA_AccessControl *ac,
                                               const UA_NodeId *sessionId, void *sessionContext,
                                               const UA_NodeId *nodeId,
                                               UA_PerformUpdateType performInsertReplace,
                                               const UA_DataValue *value);

    /* Allow delete of historical data */
    UA_Boolean (*allowHistoryUpdateDeleteRawModified)(UA_Server *server, UA_AccessControl *ac,
                                                      const UA_NodeId *sessionId, void *sessionContext,
                                                      const UA_NodeId *nodeId,
                                                      UA_DateTime startTimestamp,
                                                      UA_DateTime endTimestamp,
                                                      bool isDeleteModified);
#endif
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/pki.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
 */



_UA_BEGIN_DECLS

/**
 * Public Key Infrastructure Integration
 * =====================================
 * This file contains interface definitions for integration in a Public Key
 * Infrastructure (PKI). Currently only one plugin interface is defined.
 *
 * Certificate Verification
 * ------------------------
 * This plugin verifies that the origin of the certificate is trusted. It does
 * not assign any access rights/roles to the holder of the certificate.
 *
 * Usually, implementations of the certificate verification plugin provide an
 * initialization method that takes a trust-list and a revocation-list as input.
 * The lifecycle of the plugin is attached to a server or client config. The
 * ``clear`` method is called automatically when the config is destroyed. */

struct UA_CertificateVerification;
typedef struct UA_CertificateVerification UA_CertificateVerification;

struct UA_CertificateVerification {
    void *context;

    /* Verify the certificate against the configured policies and trust chain. */
    UA_StatusCode (*verifyCertificate)(void *verificationContext,
                                       const UA_ByteString *certificate);

    /* Verify that the certificate has the applicationURI in the subject name. */
    UA_StatusCode (*verifyApplicationURI)(void *verificationContext,
                                          const UA_ByteString *certificate,
                                          const UA_String *applicationURI);

    /* Delete the certificate verification context */
    void (*clear)(UA_CertificateVerification *cv);
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/securitypolicy.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017-2018 (c) Mark Giraud, Fraunhofer IOSB
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

extern UA_EXPORT const UA_ByteString UA_SECURITY_POLICY_NONE_URI;

struct UA_SecurityPolicy;
typedef struct UA_SecurityPolicy UA_SecurityPolicy;

/**
 * SecurityPolicy Interface Definition
 * ----------------------------------- */

typedef struct {
    UA_String uri;

    /* Verifies the signature of the message using the provided keys in the context.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the key to verify
     *                       the supplied message with.
     * @param message the message to which the signature is supposed to belong.
     * @param signature the signature of the message, that should be verified. */
    UA_StatusCode (*verify)(const UA_SecurityPolicy *securityPolicy,
                            void *channelContext, const UA_ByteString *message,
                            const UA_ByteString *signature) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Signs the given message using this policys signing algorithm and the
     * provided keys in the context.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the key to sign
     *                       the supplied message with.
     * @param message the message to sign.
     * @param signature an output buffer to which the signature is written. The
     *                  buffer needs to be allocated by the caller. The
     *                  necessary size can be acquired with the signatureSize
     *                  attribute of this module. */
    UA_StatusCode (*sign)(const UA_SecurityPolicy *securityPolicy,
                          void *channelContext, const UA_ByteString *message,
                          UA_ByteString *signature) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Gets the signature size that depends on the local (private) key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the
     *                       certificate/key.
     * @return the size of the local signature. Returns 0 if no local
     *         certificate was set. */
    size_t (*getLocalSignatureSize)(const UA_SecurityPolicy *securityPolicy,
                                    const void *channelContext);

    /* Gets the signature size that depends on the remote (public) key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of the remote signature. Returns 0 if no
     *         remote certificate was set previousely. */
    size_t (*getRemoteSignatureSize)(const UA_SecurityPolicy *securityPolicy,
                                     const void *channelContext);

    /* Gets the local signing key length.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the signing key in bytes. Returns 0 if no length can be found.
     */
    size_t (*getLocalKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Gets the local signing key length.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the signing key in bytes. Returns 0 if no length can be found.
     */
    size_t (*getRemoteKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);
} UA_SecurityPolicySignatureAlgorithm;

typedef struct {
    UA_String uri;

    /* Encrypt the given data in place using an asymmetric algorithm and keys.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext which contains information about
     *                       the keys to encrypt data.
     * @param data the data that is encrypted. The encrypted data will overwrite
     *             the data that was supplied. */
    UA_StatusCode (*encrypt)(const UA_SecurityPolicy *securityPolicy,
                             void *channelContext,
                             UA_ByteString *data) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Decrypts the given ciphertext in place using an asymmetric algorithm and
     * key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext which contains information about
     *                       the keys needed to decrypt the message.
     * @param data the data to decrypt. The decryption is done in place. */
    UA_StatusCode (*decrypt)(const UA_SecurityPolicy *securityPolicy,
                             void *channelContext,
                             UA_ByteString *data) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Returns the length of the key used locally to encrypt messages in bits
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the local key. Returns 0 if no
     *         key length is known. */
    size_t (*getLocalKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Returns the length of the key used remotely to encrypt messages in bits
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the remote key. Returns 0 if no
     *         key length is known. */
    size_t (*getRemoteKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);

    /* Returns the size of encrypted blocks used by the local encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of encrypted blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getLocalBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Returns the size of encrypted blocks used by the remote encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of encrypted blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getRemoteBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);

    /* Returns the size of plaintext blocks used by the local encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of plaintext blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getLocalPlainTextBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                         const void *channelContext);

    /* Returns the size of plaintext blocks used by the remote encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of plaintext blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getRemotePlainTextBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                          const void *channelContext);
} UA_SecurityPolicyEncryptionAlgorithm;

typedef struct {
    /* The algorithm used to sign and verify certificates. */
    UA_SecurityPolicySignatureAlgorithm signatureAlgorithm;

    /* The algorithm used to encrypt and decrypt messages. */
    UA_SecurityPolicyEncryptionAlgorithm encryptionAlgorithm;

} UA_SecurityPolicyCryptoModule;

typedef struct {
    /* Generates a thumbprint for the specified certificate.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param certificate the certificate to make a thumbprint of.
     * @param thumbprint an output buffer for the resulting thumbprint. Always
     *                   has the length specified in the thumbprintLength in the
     *                   asymmetricModule. */
    UA_StatusCode (*makeCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                               const UA_ByteString *certificate,
                                               UA_ByteString *thumbprint)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Compares the supplied certificate with the certificate in the endpoint context.
     *
     * @param securityPolicy the policy data that contains the certificate
     *                       to compare to.
     * @param certificateThumbprint the certificate thumbprint to compare to the
     *                              one stored in the context.
     * @return if the thumbprints match UA_STATUSCODE_GOOD is returned. If they
     *         don't match or an error occurred an error code is returned. */
    UA_StatusCode (*compareCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                                  const UA_ByteString *certificateThumbprint)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    UA_SecurityPolicyCryptoModule cryptoModule;
} UA_SecurityPolicyAsymmetricModule;

typedef struct {
    /* Pseudo random function that is used to generate the symmetric keys.
     *
     * For information on what parameters this function receives in what situation,
     * refer to the OPC UA specification 1.03 Part6 Table 33
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param secret
     * @param seed
     * @param out an output to write the data to. The length defines the maximum
     *            number of output bytes that are produced. */
    UA_StatusCode (*generateKey)(const UA_SecurityPolicy *securityPolicy,
                                 const UA_ByteString *secret,
                                 const UA_ByteString *seed, UA_ByteString *out)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Random generator for generating nonces.
     *
     * @param securityPolicy the securityPolicy this function is invoked on.
     *                       Example: myPolicy->generateNonce(myPolicy,
     *                       &outBuff);
     * @param out pointer to a buffer to store the nonce in. Needs to be
     *            allocated by the caller. The buffer is filled with random
     *            data. */
    UA_StatusCode (*generateNonce)(const UA_SecurityPolicy *securityPolicy,
                                   UA_ByteString *out)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /*
     * The length of the nonce used in the SecureChannel as specified in the standard.
     */
    size_t secureChannelNonceLength;

    UA_SecurityPolicyCryptoModule cryptoModule;
} UA_SecurityPolicySymmetricModule;

typedef struct {
    /* This method creates a new context data object.
     *
     * The caller needs to call delete on the received object to free allocated
     * memory. Memory is only allocated if the function succeeds so there is no
     * need to manually free the memory pointed to by *channelContext or to
     * call delete in case of failure.
     *
     * @param securityPolicy the policy context of the endpoint that is connected
     *                       to. It will be stored in the channelContext for
     *                       further access by the policy.
     * @param remoteCertificate the remote certificate contains the remote
     *                          asymmetric key. The certificate will be verified
     *                          and then stored in the context so that its
     *                          details may be accessed.
     * @param channelContext the initialized channelContext that is passed to
     *                       functions that work on a context. */
    UA_StatusCode (*newContext)(const UA_SecurityPolicy *securityPolicy,
                                const UA_ByteString *remoteCertificate,
                                void **channelContext)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Deletes the the security context. */
    void (*deleteContext)(void *channelContext);

    /* Sets the local encrypting key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the local encrypting key to store in the context. */
    UA_StatusCode (*setLocalSymEncryptingKey)(void *channelContext,
                                              const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the local signing key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the local signing key to store in the context. */
    UA_StatusCode (*setLocalSymSigningKey)(void *channelContext,
                                           const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the local initialization vector in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param iv the local initialization vector to store in the context. */
    UA_StatusCode (*setLocalSymIv)(void *channelContext,
                                   const UA_ByteString *iv)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote encrypting key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the remote encrypting key to store in the context. */
    UA_StatusCode (*setRemoteSymEncryptingKey)(void *channelContext,
                                               const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote signing key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the remote signing key to store in the context. */
    UA_StatusCode (*setRemoteSymSigningKey)(void *channelContext,
                                            const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote initialization vector in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param iv the remote initialization vector to store in the context. */
    UA_StatusCode (*setRemoteSymIv)(void *channelContext,
                                    const UA_ByteString *iv)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Compares the supplied certificate with the certificate in the channel
     * context.
     *
     * @param channelContext the channel context data that contains the
     *                       certificate to compare to.
     * @param certificate the certificate to compare to the one stored in the context.
     * @return if the certificates match UA_STATUSCODE_GOOD is returned. If they
     *         don't match or an errror occurred an error code is returned. */
    UA_StatusCode (*compareCertificate)(const void *channelContext,
                                        const UA_ByteString *certificate)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;
} UA_SecurityPolicyChannelModule;

struct UA_SecurityPolicy {
    /* Additional data */
    void *policyContext;

    /* The policy uri that identifies the implemented algorithms */
    UA_ByteString policyUri;

    /* The local certificate is specific for each SecurityPolicy since it
     * depends on the used key length. */
    UA_ByteString localCertificate;

    /* Function pointers grouped into modules */
    UA_SecurityPolicyAsymmetricModule asymmetricModule;
    UA_SecurityPolicySymmetricModule symmetricModule;
    UA_SecurityPolicySignatureAlgorithm certificateSigningAlgorithm;
    UA_SecurityPolicyChannelModule channelModule;

    const UA_Logger *logger;

    /* Updates the ApplicationInstanceCertificate and the corresponding private
     * key at runtime. */
    UA_StatusCode (*updateCertificateAndPrivateKey)(UA_SecurityPolicy *policy,
                                                    const UA_ByteString newCertificate,
                                                    const UA_ByteString newPrivateKey);

    /* Deletes the dynamic content of the policy */
    void (*clear)(UA_SecurityPolicy *policy);
};

/* Gets the number of bytes that are needed by the encryption function in
 * addition to the length of the plaintext message. This is needed, since
 * most RSA encryption methods have their own padding mechanism included.
 * This makes the encrypted message larger than the plainText, so we need to
 * have enough room in the buffer for the overhead.
 *
 * @param securityPolicy the algorithms to use.
 * @param channelContext the retrieve data from.
 * @param maxEncryptionLength the maximum number of bytes that the data to
 *                            encrypt can be. */
size_t
UA_SecurityPolicy_getRemoteAsymEncryptionBufferLengthOverhead(const UA_SecurityPolicy *securityPolicy,
                                                              const void *channelContext,
                                                              size_t maxEncryptionLength);

/* Gets the a pointer to the context of a security policy supported by the
 * server matched by the security policy uri.
 *
 * @param server the server context.
 * @param securityPolicyUri the security policy to get the context of. */
UA_SecurityPolicy *
UA_SecurityPolicy_getSecurityPolicyByUri(const UA_Server *server,
                                         const UA_ByteString *securityPolicyUri);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/pubsub.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2017-2018 Fraunhofer IOSB (Author: Andreas Ebner)
 */



_UA_BEGIN_DECLS

#ifdef UA_ENABLE_PUBSUB

/**
 * .. _pubsub_connection:
 *
 * PubSub Connection Plugin API
 * ============================
 *
 * The PubSub Connection API is the interface between concrete network
 * implementations and the internal pubsub code.
 *
 * The PubSub specification enables the creation of new connections on runtime.
 * Wording: 'Connection' -> OPC UA standard 'highlevel' perspective, 'Channel'
 * -> open62541 implementation 'lowlevel' perspective. A channel can be assigned
 * with different network implementations like UDP, MQTT, AMQP. The channel
 * provides basis services like send, regist, unregist, receive, close. */

struct UA_PubSubConnectionConfig;
typedef struct UA_PubSubConnectionConfig UA_PubSubConnectionConfig;

struct UA_PubSubChannel;
typedef struct UA_PubSubChannel UA_PubSubChannel;

typedef enum {
    UA_PUBSUB_CHANNEL_RDY,
    UA_PUBSUB_CHANNEL_PUB,
    UA_PUBSUB_CHANNEL_SUB,
    UA_PUBSUB_CHANNEL_PUB_SUB,
    UA_PUBSUB_CHANNEL_ERROR,
    UA_PUBSUB_CHANNEL_CLOSED
} UA_PubSubChannelState;

/* Interface structure between network plugin and internal implementation */
struct UA_PubSubChannel {
    UA_UInt32 publisherId; /* unique identifier */
    UA_PubSubChannelState state;
    UA_PubSubConnectionConfig *connectionConfig; /* link to parent connection config */
    UA_SOCKET sockfd;
    void *handle; /* implementation specific data */
    /*@info for handle: each network implementation should provide an structure
    * UA_PubSubChannelData[ImplementationName] This structure can be used by the
    * network implementation to store network implementation specific data.*/

    /* Sending out the content of the buf parameter */
    UA_StatusCode (*send)(UA_PubSubChannel *channel, UA_ExtensionObject *transportSettings,
                          const UA_ByteString *buf);

    /* Register to an specified message source, e.g. multicast group or topic. Callback is used for mqtt. */
    UA_StatusCode (*regist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings,
        void (*callback)(UA_ByteString *encodedBuffer, UA_ByteString *topic));

    /* Remove subscription to an specified message source, e.g. multicast group or topic */
    UA_StatusCode (*unregist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings);

    /* Receive messages. A regist to the message source is needed before. */
    UA_StatusCode (*receive)(UA_PubSubChannel * channel, UA_ByteString *,
                             UA_ExtensionObject *transportSettings, UA_UInt32 timeout);

    /* Closing the connection and implicit free of the channel structures. */
    UA_StatusCode (*close)(UA_PubSubChannel *channel);

    /* Giving the connection protocoll time to process inbound and outbound traffic. */
    UA_StatusCode (*yield)(UA_PubSubChannel *channel, UA_UInt16 timeout);
};

/**
 * The UA_PubSubTransportLayer is used for the creation of new connections.
 * Whenever on runtime a new connection is request, the internal PubSub
 * implementation call * the 'createPubSubChannel' function. The
 * 'transportProfileUri' contains the standard defined transport profile
 * information and is used to identify the type of connections which can be
 * created by the TransportLayer. The server config contains a list of
 * UA_PubSubTransportLayer. Take a look in the tutorial_pubsub_connection to get
 * informations about the TransportLayer handling. */

typedef struct {
    UA_String transportProfileUri;
    UA_PubSubChannel *(*createPubSubChannel)(UA_PubSubConnectionConfig *connectionConfig);
} UA_PubSubTransportLayer;

#endif /* UA_ENABLE_PUBSUB */

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/deps/ziptree.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
 *
 *    Copyright 2018 (c) Julius Pfrommer
 */


#ifdef __cplusplus
extern "C" {
#endif

/* Reusable zip tree implementation. The style is inspired by the BSD
 * sys/queue.h linked list definition.
 *
 * Zip trees were developed in: Tarjan, R. E., Levy, C. C., and Timmel, S. "Zip
 * Trees." arXiv preprint arXiv:1806.06726 (2018). The original definition was
 * modified so that several elements with the same key can be inserted. However,
 * ZIP_FIND will only return the topmost of these elements in the tree.
 *
 * The ZIP_ENTRY definitions are to be contained in the tree entries themselves.
 * Use ZIP_PROTOTYPE to define the signature of the zip tree and ZIP_IMPL (in a
 * .c compilation unit) for the method implementations.
 *
 * Zip trees are a probabilistic data structure. Entries are assigned a
 * (nonzero) rank k with probability 1/2^{k+1}. This header file does not assume
 * a specific random number generator. So the rank must be given when an entry
 * is inserted. A fast way (with a single call to a pseudo random generator) to
 * compute the rank is with ZIP_FFS32(random()). The ZIP_FFS32 returns the least
 * significant nonzero bit of a 32bit number. */

#define ZIP_HEAD(name, type)                    \
struct name {                                   \
    struct type *zip_root;                      \
}

#define ZIP_INIT(head) do { (head)->zip_root = NULL; } while (0)
#define ZIP_ROOT(head) (head)->zip_root
#define ZIP_EMPTY(head) (ZIP_ROOT(head) == NULL)

#define ZIP_ENTRY(type)                         \
struct {                                        \
    struct type *zip_left;                      \
    struct type *zip_right;                     \
    unsigned char rank;                         \
}

#define ZIP_LEFT(elm, field) (elm)->field.zip_left
#define ZIP_RIGHT(elm, field) (elm)->field.zip_right
#define ZIP_RANK(elm, field) (elm)->field.rank

/* Shortcuts */
#define ZIP_INSERT(name, head, elm, rank) name##_ZIP_INSERT(head, elm, rank)
#define ZIP_REMOVE(name, head, elm) name##_ZIP_REMOVE(head, elm)
#define ZIP_FIND(name, head, key) name##_ZIP_FIND(head, key)
#define ZIP_MIN(name, head) name##_ZIP_MIN(head)
#define ZIP_MAX(name, head) name##_ZIP_MAX(head)
#define ZIP_ITER(name, head, cb, d) name##_ZIP_ITER(head, cb, d)

/* Zip tree method prototypes */
#define ZIP_PROTOTYPE(name, type, keytype)                              \
void name##_ZIP_INSERT(struct name *head, struct type *elm, unsigned char rank); \
void name##_ZIP_REMOVE(struct name *head, struct type *elm);            \
struct type *name##_ZIP_FIND(struct name *head, const keytype *key);    \
struct type *name##_ZIP_MIN(struct name *head);                         \
struct type *name##_ZIP_MAX(struct name *head);                         \
typedef void (*name##_cb)(struct type *elm, void *data);                \
void name##_ZIP_ITER(struct name *head, name##_cb cb, void *data);      \

/* The comparison method "cmp" defined for every zip tree has the signature
 *
 *   enum ZIP_CMP cmpDateTime(const keytype *a, const keytype *b);
 *
 * The entries need an absolute ordering. So ZIP_CMP_EQ must only be returned if
 * a and b point to the same memory. (E.g. assured by unique identifiers.) */
enum ZIP_CMP {
    ZIP_CMP_LESS = -1,
    ZIP_CMP_EQ = 0,
    ZIP_CMP_MORE = 1
};

/* Find the position of the first bit in an unsigned 32bit integer */
#ifdef _MSC_VER
static __inline
#else
static inline
#endif
unsigned char
ZIP_FFS32(unsigned int v) {
    unsigned int t = 1;
    unsigned char r = 1;
    if(v == 0) return 0;
    while((v & t) == 0) {
        t = t << 1; r++;
    }
    return r;
}

/* Zip tree method implementations */
#define ZIP_IMPL(name, type, field, keytype, keyfield, cmp)             \
static struct type *                                                    \
__##name##_ZIP_INSERT(struct type *root, struct type *elm) {            \
    if(!root) {                                                         \
        ZIP_LEFT(elm, field) = NULL;                                    \
        ZIP_RIGHT(elm, field) = NULL;                                   \
        return elm;                                                     \
    }                                                                   \
    if((cmp)(&(elm)->keyfield, &(root)->keyfield) == ZIP_CMP_LESS) {    \
        if(__##name##_ZIP_INSERT(ZIP_LEFT(root, field), elm) == elm) {  \
            if(ZIP_RANK(elm, field) < ZIP_RANK(root, field)) {          \
                ZIP_LEFT(root, field) = elm;                            \
            } else {                                                    \
                ZIP_LEFT(root, field) = ZIP_RIGHT(elm, field);          \
                ZIP_RIGHT(elm, field) = root;                           \
                return elm;                                             \
            }                                                           \
        }                                                               \
    } else {                                                            \
        if(__##name##_ZIP_INSERT(ZIP_RIGHT(root, field), elm) == elm) { \
            if(ZIP_RANK(elm, field) <= ZIP_RANK(root, field)) {         \
                ZIP_RIGHT(root, field) = elm;                           \
            } else {                                                    \
                ZIP_RIGHT(root, field) = ZIP_LEFT(elm, field);          \
                ZIP_LEFT(elm, field) = root;                            \
                return elm;                                             \
            }                                                           \
        }                                                               \
    }                                                                   \
    return root;                                                        \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_INSERT(struct name *head, struct type *elm,                  \
                  unsigned char rank) {                                 \
    ZIP_RANK(elm, field) = rank;                                        \
    ZIP_ROOT(head) = __##name##_ZIP_INSERT(ZIP_ROOT(head), elm);        \
}                                                                       \
                                                                        \
static struct type *                                                    \
__##name##ZIP(struct type *x, struct type *y) {                         \
    if(!x) return y;                                                    \
    if(!y) return x;                                                    \
    if(ZIP_RANK(x, field) < ZIP_RANK(y, field)) {                       \
        ZIP_LEFT(y, field) = __##name##ZIP(x, ZIP_LEFT(y, field));      \
        return y;                                                       \
    }                                                                   \
    ZIP_RIGHT(x, field) = __##name##ZIP(ZIP_RIGHT(x, field), y);        \
    return x;                                                           \
}                                                                       \
                                                                        \
/* Modified from the original algorithm. Allow multiple */              \
/* elements with the same key. */                                       \
static struct type *                                                    \
__##name##_ZIP_REMOVE(struct type *root, struct type *elm) {            \
    if(root == elm)                                                     \
        return __##name##ZIP(ZIP_LEFT(root, field),                     \
                             ZIP_RIGHT(root, field));                   \
    enum ZIP_CMP eq = (cmp)(&(elm)->keyfield, &(root)->keyfield);       \
    struct type *left = ZIP_LEFT(root, field);                          \
    struct type *right = ZIP_RIGHT(root, field);                        \
    if(eq == ZIP_CMP_LESS) {                                            \
        if(elm == left)                                                 \
            ZIP_LEFT(root, field) =                                     \
                __##name##ZIP(ZIP_LEFT(left, field),                    \
                              ZIP_RIGHT(left, field));                  \
        else if(left)                                                   \
            __##name##_ZIP_REMOVE(left, elm);                           \
    } else if(eq == ZIP_CMP_MORE) {                                     \
        if(elm == right)                                                \
            ZIP_RIGHT(root, field) =                                    \
                __##name##ZIP(ZIP_LEFT(right, field),                   \
                              ZIP_RIGHT(right, field));                 \
        else if(right)                                                  \
            __##name##_ZIP_REMOVE(right, elm);                          \
    } else { /* ZIP_CMP_EQ, but root != elm */                          \
        if(right)                                                       \
            ZIP_RIGHT(root, field) = __##name##_ZIP_REMOVE(right, elm); \
        if(left)                                                        \
            ZIP_LEFT(root, field) = __##name##_ZIP_REMOVE(left, elm);   \
    }                                                                   \
    return root;                                                        \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_REMOVE(struct name *head, struct type *elm) {                \
    ZIP_ROOT(head) = __##name##_ZIP_REMOVE(ZIP_ROOT(head), elm);        \
}                                                                       \
                                                                        \
static struct type *                                                    \
__##name##_ZIP_FIND(struct type *root, const keytype *key) {            \
    if(!root)                                                           \
        return NULL;                                                    \
    enum ZIP_CMP eq = (cmp)(key, &(root)->keyfield);                    \
    if(eq == ZIP_CMP_EQ) {                                              \
        return root;                                                    \
    }                                                                   \
    if(eq == ZIP_CMP_LESS) {                                            \
        return __##name##_ZIP_FIND(ZIP_LEFT(root, field), key);         \
    }                                                                   \
    return __##name##_ZIP_FIND(ZIP_RIGHT(root, field), key);            \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_FIND(struct name *head, const keytype *key) {                \
    return __##name##_ZIP_FIND(ZIP_ROOT(head), key);                    \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_MIN(struct name *head) {                                     \
    struct type *cur = ZIP_ROOT(head);                                  \
    if(!cur) return NULL;                                               \
    while(ZIP_LEFT(cur, field)) {                                       \
        cur = ZIP_LEFT(cur, field);                                     \
    }                                                                   \
    return cur;                                                         \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_MAX(struct name *head) {                                     \
    struct type *cur = ZIP_ROOT(head);                                  \
    if(!cur) return NULL;                                               \
    while(ZIP_RIGHT(cur, field)) {                                      \
        cur = ZIP_RIGHT(cur, field);                                    \
    }                                                                   \
    return cur;                                                         \
}                                                                       \
                                                                        \
static void                                                             \
__##name##_ZIP_ITER(struct type *elm, name##_cb cb, void *data) {       \
    if(!elm)                                                            \
        return;                                                         \
    __##name##_ZIP_ITER(ZIP_LEFT(elm, field), cb, data);                \
    __##name##_ZIP_ITER(ZIP_RIGHT(elm, field), cb, data);               \
    cb(elm, data);                                                      \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_ITER(struct name *head, name##_cb cb, void *data) {          \
    __##name##_ZIP_ITER(ZIP_ROOT(head), cb, data);                      \
}

#ifdef __cplusplus
} /* extern "C" */
#endif


/*********************************** amalgamated original file "/open62541/deps/aa_tree.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
 *
 *    Copyright 2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 */


#ifdef __cplusplus
extern "C" {
#endif

enum aa_cmp {
    AA_CMP_LESS = -1,
    AA_CMP_EQ = 0,
    AA_CMP_MORE = 1
};

struct aa_entry {
    struct aa_entry *left;
    struct aa_entry *right;
    unsigned int level;
};

struct aa_head {
    struct aa_entry *root;
    enum aa_cmp (*cmp)(const void* a, const void* b);
    /* Offset from the container element to the aa_entry and the key */
    unsigned int entry_offset;
    unsigned int key_offset;
};

/* The AA-Tree allows duplicate entries. The first matching key is returned in
 * aa_find. */

void aa_init(struct aa_head *head,
             enum aa_cmp (*cmp)(const void*, const void*),
             unsigned int entry_offset, unsigned int key_offset);
void aa_insert(struct aa_head *head, void *elem);
void aa_remove(struct aa_head *head, void *elem);
void * aa_find(const struct aa_head *head, const void *key);
void * aa_min(const struct aa_head *head);
void * aa_max(const struct aa_head *head);
void * aa_next(const struct aa_head *head, const void *elem);
void * aa_prev(const struct aa_head *head, const void *elem);

#ifdef __cplusplus
} /* extern "C" */
#endif


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/nodestore.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Julian Grothoff
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */


/* !!! Warning !!!
 *
 * If you are not developing a nodestore plugin, then you should not work with
 * the definitions from this file directly. The underlying node structures are
 * not meant to be used directly by end users. Please use the public server API
 * / OPC UA services to interact with the information model. */


_UA_BEGIN_DECLS

/* Forward declaration */
#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
struct UA_MonitoredItem;
#endif

/**
 * .. _information-modelling:
 *
 * Information Modelling
 * =====================
 *
 * Information modelling in OPC UA combines concepts from object-orientation and
 * semantic modelling. At the core, an OPC UA information model is a graph made
 * up of
 *
 * - Nodes: There are eight possible Node types (variable, object, method, ...)
 * - References: Typed and directed relations between two nodes
 *
 * Every node is identified by a unique (within the server) :ref:`nodeid`.
 * Reference are triples of the form ``(source-nodeid, referencetype-nodeid,
 * target-nodeid)``. An example reference between nodes is a
 * ``hasTypeDefinition`` reference between a Variable and its VariableType. Some
 * ReferenceTypes are *hierarchic* and must not form *directed loops*. See the
 * section on :ref:`ReferenceTypes <referencetypenode>` for more details on
 * possible references and their semantics.
 *
 * **Warning!!** The structures defined in this section are only relevant for
 * the developers of custom Nodestores. The interaction with the information
 * model is possible only via the OPC UA :ref:`services`. So the following
 * sections are purely informational so that users may have a clear mental
 * model of the underlying representation.
 *
 * .. _node-lifecycle:
 *
 * Node Lifecycle: Constructors, Destructors and Node Contexts
 * -----------------------------------------------------------
 *
 * To finalize the instantiation of a node, a (user-defined) constructor
 * callback is executed. There can be both a global constructor for all nodes
 * and node-type constructor specific to the TypeDefinition of the new node
 * (attached to an ObjectTypeNode or VariableTypeNode).
 *
 * In the hierarchy of ObjectTypes and VariableTypes, only the constructor of
 * the (lowest) type defined for the new node is executed. Note that every
 * Object and Variable can have only one ``isTypeOf`` reference. But type-nodes
 * can technically have several ``hasSubType`` references to implement multiple
 * inheritance. Issues of (multiple) inheritance in the constructor need to be
 * solved by the user.
 *
 * When a node is destroyed, the node-type destructor is called before the
 * global destructor. So the overall node lifecycle is as follows:
 *
 * 1. Global Constructor (set in the server config)
 * 2. Node-Type Constructor (for VariableType or ObjectTypes)
 * 3. (Usage-period of the Node)
 * 4. Node-Type Destructor
 * 5. Global Destructor
 *
 * The constructor and destructor callbacks can be set to ``NULL`` and are not
 * used in that case. If the node-type constructor fails, the global destructor
 * will be called before removing the node. The destructors are assumed to never
 * fail.
 *
 * Every node carries a user-context and a constructor-context pointer. The
 * user-context is used to attach custom data to a node. But the (user-defined)
 * constructors and destructors may replace the user-context pointer if they
 * wish to do so. The initial value for the constructor-context is ``NULL``.
 * When the ``AddNodes`` service is used over the network, the user-context
 * pointer of the new node is also initially set to ``NULL``.
 *
 * Global Node Lifecycle
 * ~~~~~~~~~~~~~~~~~~~~~~
 * Global constructor and destructor callbacks used for every node type.
 * To be set in the server config.
 */

typedef struct {
    /* Can be NULL. May replace the nodeContext */
    UA_StatusCode (*constructor)(UA_Server *server,
                                 const UA_NodeId *sessionId, void *sessionContext,
                                 const UA_NodeId *nodeId, void **nodeContext);

    /* Can be NULL. The context cannot be replaced since the node is destroyed
     * immediately afterwards anyway. */
    void (*destructor)(UA_Server *server,
                       const UA_NodeId *sessionId, void *sessionContext,
                       const UA_NodeId *nodeId, void *nodeContext);

    /* Can be NULL. Called during recursive node instantiation. While mandatory
     * child nodes are automatically created if not already present, optional child
     * nodes are not. This callback can be used to define whether an optional child
     * node should be created.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param sourceNodeId Source node from the type definition. If the new node
     *        shall be created, it will be a copy of this node.
     * @param targetParentNodeId Parent of the potential new child node
     * @param referenceTypeId Identifies the reference type which that the parent
     *        node has to the new node.
     * @return Return UA_TRUE if the child node shall be instantiated,
     *         UA_FALSE otherwise. */
    UA_Boolean (*createOptionalChild)(UA_Server *server,
                                      const UA_NodeId *sessionId,
                                      void *sessionContext,
                                      const UA_NodeId *sourceNodeId,
                                      const UA_NodeId *targetParentNodeId,
                                      const UA_NodeId *referenceTypeId);

    /* Can be NULL. Called when a node is to be copied during recursive
     * node instantiation. Allows definition of the NodeId for the new node.
     * If the callback is set to NULL or the resulting NodeId is UA_NODEID_NUMERIC(X,0)
     * an unused nodeid in namespace X will be used. E.g. passing UA_NODEID_NULL will
     * result in a NodeId in namespace 0.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param sourceNodeId Source node of the copy operation
     * @param targetParentNodeId Parent node of the new node
     * @param referenceTypeId Identifies the reference type which that the parent
     *        node has to the new node. */
    UA_StatusCode (*generateChildNodeId)(UA_Server *server,
                                         const UA_NodeId *sessionId, void *sessionContext,
                                         const UA_NodeId *sourceNodeId,
                                         const UA_NodeId *targetParentNodeId,
                                         const UA_NodeId *referenceTypeId,
                                         UA_NodeId *targetNodeId);
} UA_GlobalNodeLifecycle;

/**
 * Node Type Lifecycle
 * ~~~~~~~~~~~~~~~~~~~
 * Constructor and destructors for specific object and variable types. */
typedef struct {
    /* Can be NULL. May replace the nodeContext */
    UA_StatusCode (*constructor)(UA_Server *server,
                                 const UA_NodeId *sessionId, void *sessionContext,
                                 const UA_NodeId *typeNodeId, void *typeNodeContext,
                                 const UA_NodeId *nodeId, void **nodeContext);

    /* Can be NULL. May replace the nodeContext. */
    void (*destructor)(UA_Server *server,
                       const UA_NodeId *sessionId, void *sessionContext,
                       const UA_NodeId *typeNodeId, void *typeNodeContext,
                       const UA_NodeId *nodeId, void **nodeContext);
} UA_NodeTypeLifecycle;

/**
 * ReferenceType Bitfield Representation
 * -------------------------------------
 * ReferenceTypes have an alternative represention as an index into a bitfield
 * for fast comparison. The index is generated when the corresponding
 * ReferenceTypeNode is added. By bounding the number of ReferenceTypes that can
 * exist in the server, the bitfield can represent a set of an combination of
 * ReferenceTypes.
 *
 * Every ReferenceTypeNode contains a bitfield with the set of all its subtypes.
 * This speeds up the Browse services substantially.
 *
 * The following ReferenceTypes have a fixed index. The NS0 bootstrapping
 * creates these ReferenceTypes in-order. */
#define UA_REFERENCETYPEINDEX_REFERENCES 0
#define UA_REFERENCETYPEINDEX_HASSUBTYPE 1
#define UA_REFERENCETYPEINDEX_AGGREGATES 2
#define UA_REFERENCETYPEINDEX_HIERARCHICALREFERENCES 3
#define UA_REFERENCETYPEINDEX_NONHIERARCHICALREFERENCES 4
#define UA_REFERENCETYPEINDEX_HASCHILD 5
#define UA_REFERENCETYPEINDEX_ORGANIZES 6
#define UA_REFERENCETYPEINDEX_HASEVENTSOURCE 7
#define UA_REFERENCETYPEINDEX_HASMODELLINGRULE 8
#define UA_REFERENCETYPEINDEX_HASENCODING 9
#define UA_REFERENCETYPEINDEX_HASDESCRIPTION 10
#define UA_REFERENCETYPEINDEX_HASTYPEDEFINITION 11
#define UA_REFERENCETYPEINDEX_GENERATESEVENT 12
#define UA_REFERENCETYPEINDEX_HASPROPERTY 13
#define UA_REFERENCETYPEINDEX_HASCOMPONENT 14
#define UA_REFERENCETYPEINDEX_HASNOTIFIER 15
#define UA_REFERENCETYPEINDEX_HASORDEREDCOMPONENT 16
#define UA_REFERENCETYPEINDEX_HASINTERFACE 17

/* The maximum number of ReferrenceTypes. Must be a multiple of 32. */
#define UA_REFERENCETYPESET_MAX 128
typedef struct { UA_UInt32 bits[UA_REFERENCETYPESET_MAX / 32]; } UA_ReferenceTypeSet;

static UA_INLINE void
UA_ReferenceTypeSet_init(UA_ReferenceTypeSet *set) {
    memset(set, 0, sizeof(UA_ReferenceTypeSet));
}

static UA_INLINE void
UA_ReferenceTypeSet_any(UA_ReferenceTypeSet *set) {
    memset(set, -1, sizeof(UA_ReferenceTypeSet));
}

static UA_INLINE UA_ReferenceTypeSet
UA_REFTYPESET(UA_Byte index) {
    UA_Byte i = index / 32, j = index % 32;
    UA_ReferenceTypeSet set;
    UA_ReferenceTypeSet_init(&set);
    set.bits[i] |= ((UA_UInt32)1) << j;
    return set;
}

static UA_INLINE UA_ReferenceTypeSet
UA_ReferenceTypeSet_union(const UA_ReferenceTypeSet setA,
                          const UA_ReferenceTypeSet setB) {
    UA_ReferenceTypeSet set;
    for(size_t i = 0; i < UA_REFERENCETYPESET_MAX / 32; i++)
        set.bits[i] = setA.bits[i] | setB.bits[i];
    return set;
}

static UA_INLINE UA_Boolean
UA_ReferenceTypeSet_contains(const UA_ReferenceTypeSet *set, UA_Byte index) {
    UA_Byte i = index / 32, j = index % 32;
    return !!(set->bits[i] & (((UA_UInt32)1) << j));
}

/**
 * Base Node Attributes
 * --------------------
 *
 * Nodes contain attributes according to their node type. The base node
 * attributes are common to all node types. In the OPC UA :ref:`services`,
 * attributes are referred to via the :ref:`nodeid` of the containing node and
 * an integer :ref:`attribute-id`.
 *
 * Internally, open62541 uses ``UA_Node`` in places where the exact node type is
 * not known or not important. The ``nodeClass`` attribute is used to ensure the
 * correctness of casting from ``UA_Node`` to a specific node type. */

/* Ordered tree structure for fast member check */
typedef struct UA_ReferenceTarget {
    /* Binary-Tree for fast lookup */
    struct aa_entry idTreeEntry;
    struct aa_entry nameTreeEntry;
    UA_UInt32 targetIdHash;   /* Hash of the target's NodeId */
    UA_UInt32 targetNameHash; /* Hash of the target's BrowseName */

    /* Emulate the queue.h structure so we don't have to include it in the
     * public API */
    struct {
        struct UA_ReferenceTarget *tqe_next;
        struct UA_ReferenceTarget **tqe_prev;
    } queuePointers;

    UA_ExpandedNodeId targetId;
} UA_ReferenceTarget;

/* List of reference targets with the same reference type and direction */
typedef struct {
    UA_Byte referenceTypeIndex;
    UA_Boolean isInverse;

    /* Emulate the queue.h structure so we don't have to include it in the
     * public API */
    struct {
        struct UA_ReferenceTarget *tqh_first;
        struct UA_ReferenceTarget **tqh_last;
    } queueHead;
    struct aa_entry *idTreeRoot;   /* Fast lookup based on the target id */
    struct aa_entry *nameTreeRoot; /* Fast lookup based on the target browseName*/
} UA_NodeReferenceKind;

/* Every Node starts with these attributes */
typedef struct {
    UA_NodeId nodeId;
    UA_NodeClass nodeClass;
    UA_QualifiedName browseName;
    UA_LocalizedText displayName;
    UA_LocalizedText description;
    UA_UInt32 writeMask;
    size_t referencesSize;
    UA_NodeReferenceKind *references;

    /* Members specific to open62541 */
    void *context;
    UA_Boolean constructed; /* Constructors were called */
} UA_NodeHead;

/**
 * VariableNode
 * ------------
 *
 * Variables store values in a :ref:`datavalue` together with
 * metadata for introspection. Most notably, the attributes data type, value
 * rank and array dimensions constrain the possible values the variable can take
 * on.
 *
 * Variables come in two flavours: properties and datavariables. Properties are
 * related to a parent with a ``hasProperty`` reference and may not have child
 * nodes themselves. Datavariables may contain properties (``hasProperty``) and
 * also datavariables (``hasComponents``).
 *
 * All variables are instances of some :ref:`variabletypenode` in return
 * constraining the possible data type, value rank and array dimensions
 * attributes.
 *
 * Data Type
 * ^^^^^^^^^
 *
 * The (scalar) data type of the variable is constrained to be of a specific
 * type or one of its children in the type hierarchy. The data type is given as
 * a NodeId pointing to a :ref:`datatypenode` in the type hierarchy. See the
 * Section :ref:`datatypenode` for more details.
 *
 * If the data type attribute points to ``UInt32``, then the value attribute
 * must be of that exact type since ``UInt32`` does not have children in the
 * type hierarchy. If the data type attribute points ``Number``, then the type
 * of the value attribute may still be ``UInt32``, but also ``Float`` or
 * ``Byte``.
 *
 * Consistency between the data type attribute in the variable and its
 * :ref:`VariableTypeNode` is ensured.
 *
 * Value Rank
 * ^^^^^^^^^^
 *
 * This attribute indicates whether the value attribute of the variable is an
 * array and how many dimensions the array has. It may have the following
 * values:
 *
 * - ``n >= 1``: the value is an array with the specified number of dimensions
 * - ``n =  0``: the value is an array with one or more dimensions
 * - ``n = -1``: the value is a scalar
 * - ``n = -2``: the value can be a scalar or an array with any number of dimensions
 * - ``n = -3``: the value can be a scalar or a one dimensional array
 *
 * Consistency between the value rank attribute in the variable and its
 * :ref:`variabletypenode` is ensured.
 *
 * Array Dimensions
 * ^^^^^^^^^^^^^^^^
 *
 * If the value rank permits the value to be a (multi-dimensional) array, the
 * exact length in each dimensions can be further constrained with this
 * attribute.
 *
 * - For positive lengths, the variable value is guaranteed to be of the same
 *   length in this dimension.
 * - The dimension length zero is a wildcard and the actual value may have any
 *   length in this dimension.
 *
 * Consistency between the array dimensions attribute in the variable and its
 * :ref:`variabletypenode` is ensured. */

/* Indicates whether a variable contains data inline or whether it points to an
 * external data source */
typedef enum {
    UA_VALUESOURCE_DATA,
    UA_VALUESOURCE_DATASOURCE
} UA_ValueSource;

typedef struct {
    /* Called before the value attribute is read. It is possible to write into the
     * value attribute during onRead (using the write service). The node is
     * re-opened afterwards so that changes are considered in the following read
     * operation.
     *
     * @param handle Points to user-provided data for the callback.
     * @param nodeid The identifier of the node.
     * @param data Points to the current node value.
     * @param range Points to the numeric range the client wants to read from
     *        (or NULL). */
    void (*onRead)(UA_Server *server, const UA_NodeId *sessionId,
                   void *sessionContext, const UA_NodeId *nodeid,
                   void *nodeContext, const UA_NumericRange *range,
                   const UA_DataValue *value);

    /* Called after writing the value attribute. The node is re-opened after
     * writing so that the new value is visible in the callback.
     *
     * @param server The server executing the callback
     * @sessionId The identifier of the session
     * @sessionContext Additional data attached to the session
     *                 in the access control layer
     * @param nodeid The identifier of the node.
     * @param nodeUserContext Additional data attached to the node by
     *        the user.
     * @param nodeConstructorContext Additional data attached to the node
     *        by the type constructor(s).
     * @param range Points to the numeric range the client wants to write to (or
     *        NULL). */
    void (*onWrite)(UA_Server *server, const UA_NodeId *sessionId,
                    void *sessionContext, const UA_NodeId *nodeId,
                    void *nodeContext, const UA_NumericRange *range,
                    const UA_DataValue *data);
} UA_ValueCallback;

typedef struct {
    /* Copies the data from the source into the provided value.
     *
     * !! ZERO-COPY OPERATIONS POSSIBLE !!
     * It is not required to return a copy of the actual content data. You can
     * return a pointer to memory owned by the user. Memory can be reused
     * between read callbacks of a DataSource, as the result is already encoded
     * on the network buffer between each read operation.
     *
     * To use zero-copy reads, set the value of the `value->value` Variant
     * without copying, e.g. with `UA_Variant_setScalar`. Then, also set
     * `value->value.storageType` to `UA_VARIANT_DATA_NODELETE` to prevent the
     * memory being cleaned up. Don't forget to also set `value->hasValue` to
     * true to indicate the presence of a value.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param nodeId The identifier of the node being read from
     * @param nodeContext Additional data attached to the node by the user
     * @param includeSourceTimeStamp If true, then the datasource is expected to
     *        set the source timestamp in the returned value
     * @param range If not null, then the datasource shall return only a
     *        selection of the (nonscalar) data. Set
     *        UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
     *        apply
     * @param value The (non-null) DataValue that is returned to the client. The
     *        data source sets the read data, the result status and optionally a
     *        sourcetimestamp.
     * @return Returns a status code for logging. Error codes intended for the
     *         original caller are set in the value. If an error is returned,
     *         then no releasing of the value is done
     */
    UA_StatusCode (*read)(UA_Server *server, const UA_NodeId *sessionId,
                          void *sessionContext, const UA_NodeId *nodeId,
                          void *nodeContext, UA_Boolean includeSourceTimeStamp,
                          const UA_NumericRange *range, UA_DataValue *value);

    /* Write into a data source. This method pointer can be NULL if the
     * operation is unsupported.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param nodeId The identifier of the node being written to
     * @param nodeContext Additional data attached to the node by the user
     * @param range If not NULL, then the datasource shall return only a
     *        selection of the (nonscalar) data. Set
     *        UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
     *        apply
     * @param value The (non-NULL) DataValue that has been written by the client.
     *        The data source contains the written data, the result status and
     *        optionally a sourcetimestamp
     * @return Returns a status code for logging. Error codes intended for the
     *         original caller are set in the value. If an error is returned,
     *         then no releasing of the value is done
     */
    UA_StatusCode (*write)(UA_Server *server, const UA_NodeId *sessionId,
                           void *sessionContext, const UA_NodeId *nodeId,
                           void *nodeContext, const UA_NumericRange *range,
                           const UA_DataValue *value);
} UA_DataSource;

/**
 * .. _value-callback:
 *
 * Value Callback
 * ^^^^^^^^^^^^^^
 * Value Callbacks can be attached to variable and variable type nodes. If
 * not ``NULL``, they are called before reading and after writing respectively. */
typedef struct {
    /* Called before the value attribute is read. The external value source can be
     * be updated and/or locked during this notification call. After this function returns
     * to the core, the external value source is readed immediately.
    */
    UA_StatusCode (*notificationRead)(UA_Server *server, const UA_NodeId *sessionId,
                                      void *sessionContext, const UA_NodeId *nodeid,
                                      void *nodeContext, const UA_NumericRange *range);

    /* Called after writing the value attribute. The node is re-opened after
     * writing so that the new value is visible in the callback.
     *
     * @param server The server executing the callback
     * @sessionId The identifier of the session
     * @sessionContext Additional data attached to the session
     *                 in the access control layer
     * @param nodeid The identifier of the node.
     * @param nodeUserContext Additional data attached to the node by
     *        the user.
     * @param nodeConstructorContext Additional data attached to the node
     *        by the type constructor(s).
     * @param range Points to the numeric range the client wants to write to (or
     *        NULL). */
    UA_StatusCode (*userWrite)(UA_Server *server, const UA_NodeId *sessionId,
                               void *sessionContext, const UA_NodeId *nodeId,
                               void *nodeContext, const UA_NumericRange *range,
                               const UA_DataValue *data);
} UA_ExternalValueCallback;

typedef enum {
    UA_VALUEBACKENDTYPE_NONE,
    UA_VALUEBACKENDTYPE_INTERNAL,
    UA_VALUEBACKENDTYPE_DATA_SOURCE_CALLBACK,
    UA_VALUEBACKENDTYPE_EXTERNAL
} UA_ValueBackendType;

typedef struct {
    UA_ValueBackendType backendType;
    union {
        struct {
            UA_DataValue value;
            UA_ValueCallback callback;
        } internal;
        UA_DataSource dataSource;
        struct {
            UA_DataValue **value;
            UA_ExternalValueCallback callback;
        } external;
    } backend;
} UA_ValueBackend;

#define UA_NODE_VARIABLEATTRIBUTES                                      \
    /* Constraints on possible values */                                \
    UA_NodeId dataType;                                                 \
    UA_Int32 valueRank;                                                 \
    size_t arrayDimensionsSize;                                         \
    UA_UInt32 *arrayDimensions;                                         \
                                                                        \
    UA_ValueBackend valueBackend;                                       \
                                                                        \
    /* The current value */                                             \
    UA_ValueSource valueSource;                                         \
    union {                                                             \
        struct {                                                        \
            UA_DataValue value;                                         \
            UA_ValueCallback callback;                                  \
        } data;                                                         \
        UA_DataSource dataSource;                                       \
    } value;

typedef struct {
    UA_NodeHead head;
    UA_NODE_VARIABLEATTRIBUTES
    UA_Byte accessLevel;
    UA_Double minimumSamplingInterval;
    UA_Boolean historizing;

    /* Members specific to open62541 */
    UA_Boolean isDynamic; /* Some variables are "static" in the sense that they
                           * are not attached to a dynamic process in the
                           * background. Only dynamic variables conserve source
                           * and server timestamp for the value attribute.
                           * Static variables have timestamps of "now". */
} UA_VariableNode;

/**
 * .. _variabletypenode:
 *
 * VariableTypeNode
 * ----------------
 *
 * VariableTypes are used to provide type definitions for variables.
 * VariableTypes constrain the data type, value rank and array dimensions
 * attributes of variable instances. Furthermore, instantiating from a specific
 * variable type may provide semantic information. For example, an instance from
 * ``MotorTemperatureVariableType`` is more meaningful than a float variable
 * instantiated from ``BaseDataVariable``. */

typedef struct {
    UA_NodeHead head;
    UA_NODE_VARIABLEATTRIBUTES
    UA_Boolean isAbstract;

    /* Members specific to open62541 */
    UA_NodeTypeLifecycle lifecycle;
} UA_VariableTypeNode;

/**
 * .. _methodnode:
 *
 * MethodNode
 * ----------
 *
 * Methods define callable functions and are invoked using the :ref:`Call
 * <method-services>` service. MethodNodes may have special properties (variable
 * children with a ``hasProperty`` reference) with the :ref:`qualifiedname` ``(0,
 * "InputArguments")`` and ``(0, "OutputArguments")``. The input and output
 * arguments are both described via an array of ``UA_Argument``. While the Call
 * service uses a generic array of :ref:`variant` for input and output, the
 * actual argument values are checked to match the signature of the MethodNode.
 *
 * Note that the same MethodNode may be referenced from several objects (and
 * object types). For this, the NodeId of the method *and of the object
 * providing context* is part of a Call request message. */

typedef UA_StatusCode
(*UA_MethodCallback)(UA_Server *server, const UA_NodeId *sessionId,
                     void *sessionContext, const UA_NodeId *methodId,
                     void *methodContext, const UA_NodeId *objectId,
                     void *objectContext, size_t inputSize,
                     const UA_Variant *input, size_t outputSize,
                     UA_Variant *output);

typedef struct {
    UA_NodeHead head;
    UA_Boolean executable;

    /* Members specific to open62541 */
    UA_MethodCallback method;
#if UA_MULTITHREADING >= 100
    UA_Boolean async; /* Indicates an async method call */
#endif
} UA_MethodNode;

/**
 * ObjectNode
 * ----------
 *
 * Objects are used to represent systems, system components, real-world objects
 * and software objects. Objects are instances of an :ref:`object
 * type<objecttypenode>` and may contain variables, methods and further
 * objects. */

typedef struct {
    UA_NodeHead head;
#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
    struct UA_MonitoredItem *monitoredItemQueue;
#endif
    UA_Byte eventNotifier;
} UA_ObjectNode;

/**
 * .. _objecttypenode:
 *
 * ObjectTypeNode
 * --------------
 *
 * ObjectTypes provide definitions for Objects. Abstract objects cannot be
 * instantiated. See :ref:`node-lifecycle` for the use of constructor and
 * destructor callbacks. */

typedef struct {
    UA_NodeHead head;
    UA_Boolean isAbstract;

    /* Members specific to open62541 */
    UA_NodeTypeLifecycle lifecycle;
} UA_ObjectTypeNode;

/**
 * .. _referencetypenode:
 *
 * ReferenceTypeNode
 * -----------------
 *
 * Each reference between two nodes is typed with a ReferenceType that gives
 * meaning to the relation. The OPC UA standard defines a set of ReferenceTypes
 * as a mandatory part of OPC UA information models.
 *
 * - Abstract ReferenceTypes cannot be used in actual references and are only
 *   used to structure the ReferenceTypes hierarchy
 * - Symmetric references have the same meaning from the perspective of the
 *   source and target node
 *
 * The figure below shows the hierarchy of the standard ReferenceTypes (arrows
 * indicate a ``hasSubType`` relation). Refer to Part 3 of the OPC UA
 * specification for the full semantics of each ReferenceType.
 *
 * .. graphviz::
 *
 *    digraph tree {
 *
 *    node [height=0, shape=box, fillcolor="#E5E5E5", concentrate=true]
 *
 *    references [label="References\n(Abstract, Symmetric)"]
 *    hierarchical_references [label="HierarchicalReferences\n(Abstract)"]
 *    references -> hierarchical_references
 *
 *    nonhierarchical_references [label="NonHierarchicalReferences\n(Abstract, Symmetric)"]
 *    references -> nonhierarchical_references
 *
 *    haschild [label="HasChild\n(Abstract)"]
 *    hierarchical_references -> haschild
 *
 *    aggregates [label="Aggregates\n(Abstract)"]
 *    haschild -> aggregates
 *
 *    organizes [label="Organizes"]
 *    hierarchical_references -> organizes
 *
 *    hascomponent [label="HasComponent"]
 *    aggregates -> hascomponent
 *
 *    hasorderedcomponent [label="HasOrderedComponent"]
 *    hascomponent -> hasorderedcomponent
 *
 *    hasproperty [label="HasProperty"]
 *    aggregates -> hasproperty
 *
 *    hassubtype [label="HasSubtype"]
 *    haschild -> hassubtype
 *
 *    hasmodellingrule [label="HasModellingRule"]
 *    nonhierarchical_references -> hasmodellingrule
 *
 *    hastypedefinition [label="HasTypeDefinition"]
 *    nonhierarchical_references -> hastypedefinition
 *
 *    hasencoding [label="HasEncoding"]
 *    nonhierarchical_references -> hasencoding
 *
 *    hasdescription [label="HasDescription"]
 *    nonhierarchical_references -> hasdescription
 *
 *    haseventsource [label="HasEventSource"]
 *    hierarchical_references -> haseventsource
 *
 *    hasnotifier [label="HasNotifier"]
 *    hierarchical_references -> hasnotifier
 *
 *    generatesevent [label="GeneratesEvent"]
 *    nonhierarchical_references -> generatesevent
 *
 *    alwaysgeneratesevent [label="AlwaysGeneratesEvent"]
 *    generatesevent -> alwaysgeneratesevent
 *
 *    {rank=same hierarchical_references nonhierarchical_references}
 *    {rank=same generatesevent haseventsource hasmodellingrule
 *               hasencoding hassubtype}
 *    {rank=same alwaysgeneratesevent hasproperty}
 *
 *    }
 *
 * The ReferenceType hierarchy can be extended with user-defined ReferenceTypes.
 * Many Companion Specifications for OPC UA define new ReferenceTypes to be used
 * in their domain of interest.
 *
 * For the following example of custom ReferenceTypes, we attempt to model the
 * structure of a technical system. For this, we introduce two custom
 * ReferenceTypes. First, the hierarchical ``contains`` ReferenceType indicates
 * that a system (represented by an OPC UA object) contains a component (or
 * subsystem). This gives rise to a tree-structure of containment relations. For
 * example, the motor (object) is contained in the car and the crankshaft is
 * contained in the motor. Second, the symmetric ``connectedTo`` ReferenceType
 * indicates that two components are connected. For example, the motor's
 * crankshaft is connected to the gear box. Connections are independent of the
 * containment hierarchy and can induce a general graph-structure. Further
 * subtypes of ``connectedTo`` could be used to differentiate between physical,
 * electrical and information related connections. A client can then learn the
 * layout of a (physical) system represented in an OPC UA information model
 * based on a common understanding of just two custom reference types. */

typedef struct {
    UA_NodeHead head;
    UA_Boolean isAbstract;
    UA_Boolean symmetric;
    UA_LocalizedText inverseName;

    /* Members specific to open62541 */
    UA_Byte referenceTypeIndex;
    UA_ReferenceTypeSet subTypes; /* contains the type itself as well */
} UA_ReferenceTypeNode;

/**
 * .. _datatypenode:
 *
 * DataTypeNode
 * ------------
 *
 * DataTypes represent simple and structured data types. DataTypes may contain
 * arrays. But they always describe the structure of a single instance. In
 * open62541, DataTypeNodes in the information model hierarchy are matched to
 * ``UA_DataType`` type descriptions for :ref:`generic-types` via their NodeId.
 *
 * Abstract DataTypes (e.g. ``Number``) cannot be the type of actual values.
 * They are used to constrain values to possible child DataTypes (e.g.
 * ``UInt32``). */

typedef struct {
    UA_NodeHead head;
    UA_Boolean isAbstract;
} UA_DataTypeNode;

/**
 * ViewNode
 * --------
 *
 * Each View defines a subset of the Nodes in the AddressSpace. Views can be
 * used when browsing an information model to focus on a subset of nodes and
 * references only. ViewNodes can be created and be interacted with. But their
 * use in the :ref:`Browse<view-services>` service is currently unsupported in
 * open62541. */

typedef struct {
    UA_NodeHead head;
    UA_Byte eventNotifier;
    UA_Boolean containsNoLoops;
} UA_ViewNode;

/**
 * Node Union
 * ----------
 *
 * A union that represents any kind of node. The node head can always be used.
 * Check the NodeClass before accessing specific content.
 */

typedef union {
    UA_NodeHead head;
    UA_VariableNode variableNode;
    UA_VariableTypeNode variableTypeNode;
    UA_MethodNode methodNode;
    UA_ObjectNode objectNode;
    UA_ObjectTypeNode objectTypeNode;
    UA_ReferenceTypeNode referenceTypeNode;
    UA_DataTypeNode dataTypeNode;
    UA_ViewNode viewNode;
} UA_Node;

/**
 * Nodestore Plugin API
 * --------------------
 *
 * The following definitions are used for implementing custom node storage
 * backends. **Most users will want to use the default nodestore and don't need
 * to work with the nodestore API**.
 *
 * Outside of custom nodestore implementations, users should not manually edit
 * nodes. Please use the OPC UA services for that. Otherwise, all consistency
 * checks are omitted. This can crash the application eventually. */

typedef void (*UA_NodestoreVisitor)(void *visitorCtx, const UA_Node *node);

typedef struct {
    /* Nodestore context and lifecycle */
    void *context;
    void (*clear)(void *nsCtx);

    /* The following definitions are used to create empty nodes of the different
     * node types. The memory is managed by the nodestore. Therefore, the node
     * has to be removed via a special deleteNode function. (If the new node is
     * not added to the nodestore.) */
    UA_Node * (*newNode)(void *nsCtx, UA_NodeClass nodeClass);

    void (*deleteNode)(void *nsCtx, UA_Node *node);

    /* ``Get`` returns a pointer to an immutable node. ``Release`` indicates
     * that the pointer is no longer accessed afterwards. */
    const UA_Node * (*getNode)(void *nsCtx, const UA_NodeId *nodeId);

    void (*releaseNode)(void *nsCtx, const UA_Node *node);

    /* Returns an editable copy of a node (needs to be deleted with the
     * deleteNode function or inserted / replaced into the nodestore). */
    UA_StatusCode (*getNodeCopy)(void *nsCtx, const UA_NodeId *nodeId,
                                 UA_Node **outNode);

    /* Inserts a new node into the nodestore. If the NodeId is zero, then a
     * fresh numeric NodeId is assigned. If insertion fails, the node is
     * deleted. */
    UA_StatusCode (*insertNode)(void *nsCtx, UA_Node *node,
                                UA_NodeId *addedNodeId);

    /* To replace a node, get an editable copy of the node, edit and replace
     * with this function. If the node was already replaced since the copy was
     * made, UA_STATUSCODE_BADINTERNALERROR is returned. If the NodeId is not
     * found, UA_STATUSCODE_BADNODEIDUNKNOWN is returned. In both error cases,
     * the editable node is deleted. */
    UA_StatusCode (*replaceNode)(void *nsCtx, UA_Node *node);

    /* Removes a node from the nodestore. */
    UA_StatusCode (*removeNode)(void *nsCtx, const UA_NodeId *nodeId);

    /* Maps the ReferenceTypeIndex used for the references to the NodeId of the
     * ReferenceType. The returned pointer is stable until the Nodestore is
     * deleted. */
    const UA_NodeId * (*getReferenceTypeId)(void *nsCtx, UA_Byte refTypeIndex);

    /* Execute a callback for every node in the nodestore. */
    void (*iterate)(void *nsCtx, UA_NodestoreVisitor visitor,
                    void *visitorCtx);
} UA_Nodestore;

/* Attributes must be of a matching type (VariableAttributes, ObjectAttributes,
 * and so on). The attributes are copied. Note that the attributes structs do
 * not contain NodeId, NodeClass and BrowseName. The NodeClass of the node needs
 * to be correctly set before calling this method. UA_Node_clear is called on
 * the node when an error occurs internally. */
UA_StatusCode UA_EXPORT
UA_Node_setAttributes(UA_Node *node, const void *attributes,
                      const UA_DataType *attributeType);

/* Reset the destination node and copy the content of the source */
UA_StatusCode UA_EXPORT
UA_Node_copy(const UA_Node *src, UA_Node *dst);

/* Allocate new node and copy the values from src */
UA_EXPORT UA_Node *
UA_Node_copy_alloc(const UA_Node *src);

/* Add a single reference to the node */
UA_StatusCode UA_EXPORT
UA_Node_addReference(UA_Node *node, UA_Byte refTypeIndex, UA_Boolean isForward,
                     const UA_ExpandedNodeId *targetNodeId,
                     UA_UInt32 targetBrowseNameHash);

/* Delete a single reference from the node */
UA_StatusCode UA_EXPORT
UA_Node_deleteReference(UA_Node *node, UA_Byte refTypeIndex, UA_Boolean isForward,
                        const UA_ExpandedNodeId *targetNodeId);

/* Deletes references from the node which are not matching any type in the given
 * array. Could be used to e.g. delete all the references, except
 * 'HASMODELINGRULE' */
void UA_EXPORT
UA_Node_deleteReferencesSubset(UA_Node *node, const UA_ReferenceTypeSet *keepSet);

/* Delete all references of the node */
void UA_EXPORT
UA_Node_deleteReferences(UA_Node *node);

/* Remove all malloc'ed members of the node and reset */
void UA_EXPORT
UA_Node_clear(UA_Node *node);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/historydatabase.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
 */



_UA_BEGIN_DECLS

typedef struct UA_HistoryDatabase UA_HistoryDatabase;

struct UA_HistoryDatabase {
    void *context;

    void (*clear)(UA_HistoryDatabase *hdb);

    /* This function will be called when a nodes value is set.
     * Use this to insert data into your database(s) if polling is not suitable
     * and you need to get all data changes.
     * Set it to NULL if you do not need it.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * sessionId and sessionContext identify the session which set this value.
     * nodeId is the node id for which data was set.
     * historizing is the nodes boolean flag for historizing
     * value is the new value. */
    void
    (*setValue)(UA_Server *server,
                void *hdbContext,
                const UA_NodeId *sessionId,
                void *sessionContext,
                const UA_NodeId *nodeId,
                UA_Boolean historizing,
                const UA_DataValue *value);

    /* This function will be called when an event is triggered.
     * Use it to insert data into your event database.
     * No default implementation is provided by UA_HistoryDatabase_default.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * originId is the node id of the event's origin.
     * emitterId is the node id of the event emitter.
     * historicalEventFilter is the value of the HistoricalEventFilter property of
     *                       the emitter (OPC UA Part 11, 5.3.2), it is NULL if
     *                       the property does not exist or is not set.
     * fieldList is the event field list returned after application of
     *           historicalEventFilter to the event node. */
    void
    (*setEvent)(UA_Server *server,
                void *hdbContext,
                const UA_NodeId *originId,
                const UA_NodeId *emitterId,
                const UA_EventFilter *historicalEventFilter,
                UA_EventFieldList *fieldList);

    /* This function is called if a history read is requested with
     * isRawReadModified set to false. Setting it to NULL will result in a
     * response with statuscode UA_STATUSCODE_BADHISTORYOPERATIONUNSUPPORTED.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * sessionId and sessionContext identify the session which set this value.
     * requestHeader, historyReadDetails, timestampsToReturn, releaseContinuationPoints
     * nodesToReadSize and nodesToRead is the requested data from the client. It
     *                 is from the request object.
     * response the response to fill for the client. If the request is ok, there
     *          is no need to use it. Use this to set status codes other than
     *          "Good" or other data. You find an already allocated
     *          UA_HistoryReadResult array with an UA_HistoryData object in the
     *          extension object in the size of nodesToReadSize. If you are not
     *          willing to return data, you have to delete the results array,
     *          set it to NULL and set the resultsSize to 0. Do not access
     *          historyData after that.
     * historyData is a proper typed pointer array pointing in the
     *             UA_HistoryReadResult extension object. use this to provide
     *             result data to the client. Index in the array is the same as
     *             in nodesToRead and the UA_HistoryReadResult array. */
    void
    (*readRaw)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadRawModifiedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readModified)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadRawModifiedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryModifiedData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readEvent)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadEventDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryEvent * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readProcessed)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadProcessedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readAtTime)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadAtTimeDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    void
    (*updateData)(UA_Server *server,
                  void *hdbContext,
                  const UA_NodeId *sessionId,
                  void *sessionContext,
                  const UA_RequestHeader *requestHeader,
                  const UA_UpdateDataDetails *details,
                  UA_HistoryUpdateResult *result);

    void
    (*deleteRawModified)(UA_Server *server,
                         void *hdbContext,
                         const UA_NodeId *sessionId,
                         void *sessionContext,
                         const UA_RequestHeader *requestHeader,
                         const UA_DeleteRawModifiedDetails *details,
                         UA_HistoryUpdateResult *result);

    /* Add more function pointer here.
     * For example for read_event, read_annotation, update_details */
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/server.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2014-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2015-2016 (c) Sten Grüner
 *    Copyright 2014-2015, 2017 (c) Florian Palm
 *    Copyright 2015-2016 (c) Chris Iatrou
 *    Copyright 2015-2016 (c) Oleksiy Vasylyev
 *    Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2017 (c) Henrik Norrman
 *    Copyright 2018 (c) Fabian Arndt, Root-Core
 *    Copyright 2017-2020 (c) HMS Industrial Networks AB (Author: Jonas Green)
 *    Copyright 2020 (c) Christian von Arnim, ISW University of Stuttgart  (for VDW and umati)
 */




#ifdef UA_ENABLE_PUBSUB
#endif

#ifdef UA_ENABLE_HISTORIZING
#endif

_UA_BEGIN_DECLS

/**
 * .. _server:
 *
 * Server
 * ======
 *
 * .. _server-configuration:
 *
 * Server Configuration
 * --------------------
 *
 * The configuration structure is passed to the server during initialization.
 * The server expects that the configuration is not modified during runtime.
 * Currently, only one server can use a configuration at a time. During
 * shutdown, the server will clean up the parts of the configuration that are
 * modified at runtime through the provided API.
 *
 * Examples for configurations are provided in the ``/plugins`` folder.
 * The usual usage is as follows:
 *
 * 1. Create a server configuration with default settings as a starting point
 * 2. Modifiy the configuration, e.g. by adding a server certificate
 * 3. Instantiate a server with it
 * 4. After shutdown of the server, clean up the configuration (free memory)
 *
 * The :ref:`tutorials` provide a good starting point for this. */

struct UA_PubSubConfiguration;
typedef struct UA_PubSubConfiguration UA_PubSubConfiguration;

typedef struct {
    UA_UInt32 min;
    UA_UInt32 max;
} UA_UInt32Range;

typedef struct {
    UA_Duration min;
    UA_Duration max;
} UA_DurationRange;

typedef void (*UA_Server_AsyncOperationNotifyCallback)(UA_Server *server);

struct UA_ServerConfig {
    UA_Logger logger;
    void *userdata;

    /* Server Description:
     * The description must be internally consistent.
     * - The ApplicationUri set in the ApplicationDescription must match the
     *   URI set in the server certificate */
    UA_BuildInfo buildInfo;
    UA_ApplicationDescription applicationDescription;
    UA_ByteString serverCertificate;

    UA_Double shutdownDelay; /* Delay in ms from the shutdown signal (ctrl-c)
                                until the actual shutdown. Clients need to be
                                able to get a notification ahead of time. */

    /* Rule Handling */
    UA_RuleHandling verifyRequestTimestamp; /* Verify that the server sends a
                                             * timestamp in the request header */
    UA_RuleHandling allowEmptyVariables; /* Variables (that don't have a
                                          * DataType of BaseDataType) must not
                                          * have an empty variant value. The
                                          * default behaviour is to auto-create
                                          * a matching zeroed-out value for
                                          * empty VariableNodes when they are
                                          * added. */

    /* Custom DataTypes. Attention! Custom datatypes are not cleaned up together
     * with the configuration. So it is possible to allocate them on ROM. */
    const UA_DataTypeArray *customDataTypes;

    /**
     * .. note:: See the section on :ref:`generic-types`. Examples for working
     *    with custom data types are provided in
     *    ``/examples/custom_datatype/``. */

    /* Networking */
    size_t networkLayersSize;
    UA_ServerNetworkLayer *networkLayers;
    UA_String customHostname;

#ifdef UA_ENABLE_PUBSUB
    /*PubSub network layer */
    size_t pubsubTransportLayersSize;
    UA_PubSubTransportLayer *pubsubTransportLayers;
    UA_PubSubConfiguration *pubsubConfiguration;
#endif /* UA_ENABLE_PUBSUB */

    /* Available security policies */
    size_t securityPoliciesSize;
    UA_SecurityPolicy* securityPolicies;

    /* Available endpoints */
    size_t endpointsSize;
    UA_EndpointDescription *endpoints;

    /* Only allow the following discovery services to be executed on a
     * SecureChannel with SecurityPolicyNone: GetEndpointsRequest,
     * FindServersRequest and FindServersOnNetworkRequest.
     *
     * Only enable this option if there is no endpoint with SecurityPolicy#None
     * in the endpoints list. The SecurityPolicy#None must be present in the
     * securityPolicies list. */
    UA_Boolean securityPolicyNoneDiscoveryOnly;

    /* Node Lifecycle callbacks */
    UA_GlobalNodeLifecycle nodeLifecycle;

    /**
     * .. note:: See the section for :ref:`node lifecycle
     *    handling<node-lifecycle>`. */

    /* Access Control */
    UA_AccessControl accessControl;

    /**
     * .. note:: See the section for :ref:`access-control
     *    handling<access-control>`. */

    /* Async Operations */
#if UA_MULTITHREADING >= 100
    UA_Double asyncOperationTimeout; /* in ms, 0 => unlimited */
    size_t maxAsyncOperationQueueSize; /* 0 => unlimited */
    /* Notify workers when an async operation was enqueued */
    UA_Server_AsyncOperationNotifyCallback asyncOperationNotifyCallback;
#endif

    /**
     * .. note:: See the section for :ref:`async
     *    operations<async-operations>`. */

    /* Nodestore */
    UA_Nodestore nodestore;

    /* Certificate Verification */
    UA_CertificateVerification certificateVerification;

    /* Limits for SecureChannels */
    UA_UInt16 maxSecureChannels;
    UA_UInt32 maxSecurityTokenLifetime; /* in ms */

    /* Limits for Sessions */
    UA_UInt16 maxSessions;
    UA_Double maxSessionTimeout; /* in ms */

    /* Operation limits */
    UA_UInt32 maxNodesPerRead;
    UA_UInt32 maxNodesPerWrite;
    UA_UInt32 maxNodesPerMethodCall;
    UA_UInt32 maxNodesPerBrowse;
    UA_UInt32 maxNodesPerRegisterNodes;
    UA_UInt32 maxNodesPerTranslateBrowsePathsToNodeIds;
    UA_UInt32 maxNodesPerNodeManagement;
    UA_UInt32 maxMonitoredItemsPerCall;

    /* Limits for Requests */
    UA_UInt32 maxReferencesPerNode;

    /* Discovery */
#ifdef UA_ENABLE_DISCOVERY
    /* Timeout in seconds when to automatically remove a registered server from
     * the list, if it doesn't re-register within the given time frame. A value
     * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
     * bigger than 10 seconds, because cleanup is only triggered approximately
     * every 10 seconds. The server will still be removed depending on the
     * state of the semaphore file. */
    UA_UInt32 discoveryCleanupTimeout;

# ifdef UA_ENABLE_DISCOVERY_MULTICAST
    UA_Boolean mdnsEnabled;
    UA_MdnsDiscoveryConfiguration mdnsConfig;
    UA_String mdnsInterfaceIP;
#  if !defined(UA_HAS_GETIFADDR)
    size_t mdnsIpAddressListSize;
    UA_UInt32 *mdnsIpAddressList;
#  endif
# endif
#endif

    /* Subscriptions */
#ifdef UA_ENABLE_SUBSCRIPTIONS
    /* Limits for Subscriptions */
    UA_UInt32 maxSubscriptions;
    UA_UInt32 maxSubscriptionsPerSession;
    UA_DurationRange publishingIntervalLimits; /* in ms (must not be less than 5) */
    UA_UInt32Range lifeTimeCountLimits;
    UA_UInt32Range keepAliveCountLimits;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Boolean enableRetransmissionQueue;
    UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
# ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
    UA_UInt32 maxEventsPerNode; /* 0 -> unlimited size */
# endif

    /* Limits for MonitoredItems */
    UA_UInt32 maxMonitoredItems;
    UA_UInt32 maxMonitoredItemsPerSubscription;
    UA_DurationRange samplingIntervalLimits; /* in ms (must not be less than 5) */
    UA_UInt32Range queueSizeLimits; /* Negotiated with the client */

    /* Limits for PublishRequests */
    UA_UInt32 maxPublishReqPerSession;

    /* Register MonitoredItem in Userland
     *
     * @param server Allows the access to the server object
     * @param sessionId The session id, represented as an node id
     * @param sessionContext An optional pointer to user-defined data for the specific data source
     * @param nodeid Id of the node in question
     * @param nodeidContext An optional pointer to user-defined data, associated
     *        with the node in the nodestore. Note that, if the node has already been removed,
     *        this value contains a NULL pointer.
     * @param attributeId Identifies which attribute (value, data type etc.) is monitored
     * @param removed Determines if the MonitoredItem was removed or created. */
    void (*monitoredItemRegisterCallback)(UA_Server *server,
                                          const UA_NodeId *sessionId, void *sessionContext,
                                          const UA_NodeId *nodeId, void *nodeContext,
                                          UA_UInt32 attibuteId, UA_Boolean removed);
#endif

    /* Historical Access */
#ifdef UA_ENABLE_HISTORIZING
    UA_HistoryDatabase historyDatabase;

    UA_Boolean accessHistoryDataCapability;
    UA_UInt32  maxReturnDataValues; /* 0 -> unlimited size */

    UA_Boolean accessHistoryEventsCapability;
    UA_UInt32  maxReturnEventValues; /* 0 -> unlimited size */

    UA_Boolean insertDataCapability;
    UA_Boolean insertEventCapability;
    UA_Boolean insertAnnotationsCapability;

    UA_Boolean replaceDataCapability;
    UA_Boolean replaceEventCapability;

    UA_Boolean updateDataCapability;
    UA_Boolean updateEventCapability;

    UA_Boolean deleteRawCapability;
    UA_Boolean deleteEventCapability;
    UA_Boolean deleteAtTimeDataCapability;
#endif
};

void UA_EXPORT
UA_ServerConfig_clean(UA_ServerConfig *config);

/* Set a custom hostname in server configuration */
UA_DEPRECATED static UA_INLINE void 
UA_ServerConfig_setCustomHostname(UA_ServerConfig *config,
                                  const UA_String customHostname) {
    UA_String_clear(&config->customHostname);
    UA_String_copy(&customHostname, &config->customHostname);
}

/**
 * .. _server-lifecycle:
 *
 * Server Lifecycle
 * ---------------- */

/* The method UA_Server_new is defined in server_config_default.h. So default
 * plugins outside of the core library (for logging, etc) are already available
 * during the initialization.
 *
 * UA_Server UA_EXPORT * UA_Server_new(void);
 */

/* Creates a new server. Moves the config into the server with a shallow copy.
 * The config content is cleared together with the server. */
UA_Server UA_EXPORT *
UA_Server_newWithConfig(UA_ServerConfig *config);

void UA_EXPORT UA_Server_delete(UA_Server *server);

UA_ServerConfig UA_EXPORT *
UA_Server_getConfig(UA_Server *server);

/* Runs the main loop of the server. In each iteration, this calls into the
26021
26022
26023
26024
26025
26026
26027
26028

26029
26030






26031
26032
26033
26034
26035
26036
26037
UA_Server_browse(UA_Server *server, UA_UInt32 maxReferences,
                 const UA_BrowseDescription *bd);

UA_BrowseResult UA_EXPORT UA_THREADSAFE
UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
                     const UA_ByteString *continuationPoint);

/* Nonstandard version of the browse service that recurses into child nodes.

 * Possible loops (that can occur for non-hierarchical references) are handled
 * by adding every target node at most once to the results array. */






UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_browseRecursive(UA_Server *server, const UA_BrowseDescription *bd,
                          size_t *resultsSize, UA_ExpandedNodeId **results);

UA_BrowsePathResult UA_EXPORT UA_THREADSAFE
UA_Server_translateBrowsePathToNodeIds(UA_Server *server,
                                       const UA_BrowsePath *browsePath);







|
>

|
>
>
>
>
>
>







29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
UA_Server_browse(UA_Server *server, UA_UInt32 maxReferences,
                 const UA_BrowseDescription *bd);

UA_BrowseResult UA_EXPORT UA_THREADSAFE
UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
                     const UA_ByteString *continuationPoint);

/* Non-standard version of the Browse service that recurses into child nodes.
 *
 * Possible loops (that can occur for non-hierarchical references) are handled
 * internally. Every node is added at most once to the results array.
 *
 * Nodes are only added if they match the NodeClassMask in the
 * BrowseDescription. However, child nodes are still recursed into if the
 * NodeClass does not match. So it is possible, for example, to get all
 * VariableNodes below a certain ObjectNode, with additional objects in the
 * hierarchy below. */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_browseRecursive(UA_Server *server, const UA_BrowseDescription *bd,
                          size_t *resultsSize, UA_ExpandedNodeId **results);

UA_BrowsePathResult UA_EXPORT UA_THREADSAFE
UA_Server_translateBrowsePathToNodeIds(UA_Server *server,
                                       const UA_BrowsePath *browsePath);
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097

26098
26099
26100
26101

26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114

26115
26116
26117
26118
26119
26120
26121
 * This should only be called when the server is shutting down.
 * @param server
 * @param client the client which is used to call the RegisterServer. It must
 *        already be connected to the correct endpoint */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_unregister_discovery(UA_Server *server, struct UA_Client *client);

 /* Adds a periodic callback to register the server with the LDS (local discovery server)
  * periodically. The interval between each register call is given as second parameter.
  * It should be 10 minutes by default (= 10*60*1000).

  *
  * The delayFirstRegisterMs parameter indicates the delay for the first register call.
  * If it is 0, the first register call will be after intervalMs milliseconds,
  * otherwise the server's first register will be after delayFirstRegisterMs.

  *
  * When you manually unregister the server, you also need to cancel the
  * periodic callback, otherwise it will be automatically be registered again.
  *
  * If you call this method multiple times for the same discoveryServerUrl, the older
  * periodic callback will be removed.
  *
  * @param server
  * @param client the client which is used to call the RegisterServer.
  *         It must not yet be connected and will be connected for every register call
  *         to the given discoveryServerUrl.
  * @param discoveryServerUrl where this server should register itself.
  *        The string will be copied internally. Therefore you can free it after calling this method.

  * @param intervalMs
  * @param delayFirstRegisterMs
  * @param periodicCallbackId */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_addPeriodicServerRegisterCallback(UA_Server *server, struct UA_Client *client,
                                            const char* discoveryServerUrl,
                                            UA_Double intervalMs,







|
|
|
>

|
|
|
>




|
|


|
|

|
|
>







29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
 * This should only be called when the server is shutting down.
 * @param server
 * @param client the client which is used to call the RegisterServer. It must
 *        already be connected to the correct endpoint */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_unregister_discovery(UA_Server *server, struct UA_Client *client);

 /* Adds a periodic callback to register the server with the LDS (local
  * discovery server) periodically. The interval between each register call is
  * given as second parameter. It should be 10 minutes by default (=
  * 10*60*1000).
  *
  * The delayFirstRegisterMs parameter indicates the delay for the first
  * register call. If it is 0, the first register call will be after intervalMs
  * milliseconds, otherwise the server's first register will be after
  * delayFirstRegisterMs.
  *
  * When you manually unregister the server, you also need to cancel the
  * periodic callback, otherwise it will be automatically be registered again.
  *
  * If you call this method multiple times for the same discoveryServerUrl, the
  * older periodic callback will be removed.
  *
  * @param server
  * @param client the client which is used to call the RegisterServer. It must
  *         not yet be connected and will be connected for every register call
  *         to the given discoveryServerUrl.
  * @param discoveryServerUrl where this server should register itself. The
  *        string will be copied internally. Therefore you can free it after
  *        calling this method.
  * @param intervalMs
  * @param delayFirstRegisterMs
  * @param periodicCallbackId */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_addPeriodicServerRegisterCallback(UA_Server *server, struct UA_Client *client,
                                            const char* discoveryServerUrl,
                                            UA_Double intervalMs,
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
 *
 * There are three places where a callback from an information model to
 * user-defined code can happen.
 *
 * - Custom node constructors and destructors
 * - Linking VariableNodes with an external data source
 * - MethodNode callbacks
 *
 * .. _node-lifecycle:
 *
 * Node Lifecycle: Constructors, Destructors and Node Contexts
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 *
 * To finalize the instantiation of a node, a (user-defined) constructor
 * callback is executed. There can be both a global constructor for all nodes
 * and node-type constructor specific to the TypeDefinition of the new node
 * (attached to an ObjectTypeNode or VariableTypeNode).
 *
 * In the hierarchy of ObjectTypes and VariableTypes, only the constructor of
 * the (lowest) type defined for the new node is executed. Note that every
 * Object and Variable can have only one ``isTypeOf`` reference. But type-nodes
 * can technically have several ``hasSubType`` references to implement multiple
 * inheritance. Issues of (multiple) inheritance in the constructor need to be
 * solved by the user.
 *
 * When a node is destroyed, the node-type destructor is called before the
 * global destructor. So the overall node lifecycle is as follows:
 *
 * 1. Global Constructor (set in the server config)
 * 2. Node-Type Constructor (for VariableType or ObjectTypes)
 * 3. (Usage-period of the Node)
 * 4. Node-Type Destructor
 * 5. Global Destructor
 *
 * The constructor and destructor callbacks can be set to ``NULL`` and are not
 * used in that case. If the node-type constructor fails, the global destructor
 * will be called before removing the node. The destructors are assumed to never
 * fail.
 *
 * Every node carries a user-context and a constructor-context pointer. The
 * user-context is used to attach custom data to a node. But the (user-defined)
 * constructors and destructors may replace the user-context pointer if they
 * wish to do so. The initial value for the constructor-context is ``NULL``.
 * When the ``AddNodes`` service is used over the network, the user-context
 * pointer of the new node is also initially set to ``NULL``. */

/* To be set in the server config. */
typedef struct {
    /* Can be NULL. May replace the nodeContext */
    UA_StatusCode (*constructor)(UA_Server *server,
                                 const UA_NodeId *sessionId, void *sessionContext,
                                 const UA_NodeId *nodeId, void **nodeContext);

    /* Can be NULL. The context cannot be replaced since the node is destroyed
     * immediately afterwards anyway. */
    void (*destructor)(UA_Server *server,
                       const UA_NodeId *sessionId, void *sessionContext,
                       const UA_NodeId *nodeId, void *nodeContext);

    /* Can be NULL. Called during recursive node instantiation. While mandatory
     * child nodes are automatically created if not already present, optional child
     * nodes are not. This callback can be used to define whether an optional child
     * node should be created.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param sourceNodeId Source node from the type definition. If the new node
     *        shall be created, it will be a copy of this node.
     * @param targetParentNodeId Parent of the potential new child node
     * @param referenceTypeId Identifies the reference type which that the parent
     *        node has to the new node. 
     * @return Return UA_TRUE if the child node shall be instantiatet, 
     *         UA_FALSE otherwise. */
    UA_Boolean (*createOptionalChild)(UA_Server *server,
                                      const UA_NodeId *sessionId,
                                      void *sessionContext,
                                      const UA_NodeId *sourceNodeId,
                                      const UA_NodeId *targetParentNodeId,
                                      const UA_NodeId *referenceTypeId);

    /* Can be NULL. Called when a node is to be copied during recursive
     * node instantiation. Allows definition of the NodeId for the new node.
     * If the callback is set to NULL or the resulting NodeId is UA_NODEID_NULL,
     * then a random NodeId will be generated.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param sourceNodeId Source node of the copy operation
     * @param targetParentNodeId Parent node of the new node
     * @param referenceTypeId Identifies the reference type which that the parent
     *        node has to the new node. */
    UA_StatusCode (*generateChildNodeId)(UA_Server *server,
                                         const UA_NodeId *sessionId, void *sessionContext,
                                         const UA_NodeId *sourceNodeId,
                                         const UA_NodeId *targetParentNodeId,
                                         const UA_NodeId *referenceTypeId,
                                         UA_NodeId *targetNodeId);
    } UA_GlobalNodeLifecycle;

typedef struct {
    /* Can be NULL. May replace the nodeContext */
    UA_StatusCode (*constructor)(UA_Server *server,
                                 const UA_NodeId *sessionId, void *sessionContext,
                                 const UA_NodeId *typeNodeId, void *typeNodeContext,
                                 const UA_NodeId *nodeId, void **nodeContext);

    /* Can be NULL. May replace the nodeContext. */
    void (*destructor)(UA_Server *server,
                       const UA_NodeId *sessionId, void *sessionContext,
                       const UA_NodeId *typeNodeId, void *typeNodeContext,
                       const UA_NodeId *nodeId, void **nodeContext);
} UA_NodeTypeLifecycle;

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setNodeTypeLifecycle(UA_Server *server, UA_NodeId nodeId,
                               UA_NodeTypeLifecycle lifecycle);

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_getNodeContext(UA_Server *server, UA_NodeId nodeId,







|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







29567
29568
29569
29570
29571
29572
29573
29574

29575



































29576









29577


29578

























































29579
29580
29581
29582
29583
29584
29585
 *
 * There are three places where a callback from an information model to
 * user-defined code can happen.
 *
 * - Custom node constructors and destructors
 * - Linking VariableNodes with an external data source
 * - MethodNode callbacks
 */





































void UA_EXPORT









UA_Server_setAdminSessionContext(UA_Server *server,


                                 void *context);


























































UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setNodeTypeLifecycle(UA_Server *server, UA_NodeId nodeId,
                               UA_NodeTypeLifecycle lifecycle);

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_getNodeContext(UA_Server *server, UA_NodeId nodeId,
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438





26439
26440
26441
26442
26443
26444
26445
 * of storing a variant attached to the variable node, the node can point to a
 * function with a local data provider. Whenever the value attribute is read,
 * the function will be called and asked to provide a UA_DataValue return value
 * that contains the value content and additional timestamps.
 *
 * It is expected that the read callback is implemented. The write callback can
 * be set to a null-pointer. */
typedef struct {
    /* Copies the data from the source into the provided value.
     *
     * !! ZERO-COPY OPERATIONS POSSIBLE !!
     * It is not required to return a copy of the actual content data. You can
     * return a pointer to memory owned by the user. Memory can be reused
     * between read callbacks of a DataSource, as the result is already encoded
     * on the network buffer between each read operation.
     *
     * To use zero-copy reads, set the value of the `value->value` Variant
     * without copying, e.g. with `UA_Variant_setScalar`. Then, also set
     * `value->value.storageType` to `UA_VARIANT_DATA_NODELETE` to prevent the
     * memory being cleaned up. Don't forget to also set `value->hasValue` to
     * true to indicate the presence of a value.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param nodeId The identifier of the node being read from
     * @param nodeContext Additional data attached to the node by the user
     * @param includeSourceTimeStamp If true, then the datasource is expected to
     *        set the source timestamp in the returned value
     * @param range If not null, then the datasource shall return only a
     *        selection of the (nonscalar) data. Set
     *        UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
     *        apply
     * @param value The (non-null) DataValue that is returned to the client. The
     *        data source sets the read data, the result status and optionally a
     *        sourcetimestamp.
     * @return Returns a status code for logging. Error codes intended for the
     *         original caller are set in the value. If an error is returned,
     *         then no releasing of the value is done
     */
    UA_StatusCode (*read)(UA_Server *server, const UA_NodeId *sessionId,
                          void *sessionContext, const UA_NodeId *nodeId,
                          void *nodeContext, UA_Boolean includeSourceTimeStamp,
                          const UA_NumericRange *range, UA_DataValue *value);

    /* Write into a data source. This method pointer can be NULL if the
     * operation is unsupported.
     *
     * @param server The server executing the callback
     * @param sessionId The identifier of the session
     * @param sessionContext Additional data attached to the session in the
     *        access control layer
     * @param nodeId The identifier of the node being written to
     * @param nodeContext Additional data attached to the node by the user
     * @param range If not NULL, then the datasource shall return only a
     *        selection of the (nonscalar) data. Set
     *        UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
     *        apply
     * @param value The (non-NULL) DataValue that has been written by the client.
     *        The data source contains the written data, the result status and
     *        optionally a sourcetimestamp
     * @return Returns a status code for logging. Error codes intended for the
     *         original caller are set in the value. If an error is returned,
     *         then no releasing of the value is done
     */
    UA_StatusCode (*write)(UA_Server *server, const UA_NodeId *sessionId,
                           void *sessionContext, const UA_NodeId *nodeId,
                           void *nodeContext, const UA_NumericRange *range,
                           const UA_DataValue *value);
} UA_DataSource;

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setVariableNode_dataSource(UA_Server *server, const UA_NodeId nodeId,
                                     const UA_DataSource dataSource);

/**
 * .. _value-callback:
 *
 * Value Callback
 * ^^^^^^^^^^^^^^
 * Value Callbacks can be attached to variable and variable type nodes. If
 * not ``NULL``, they are called before reading and after writing respectively. */
typedef struct {
    /* Called before the value attribute is read. It is possible to write into the
     * value attribute during onRead (using the write service). The node is
     * re-opened afterwards so that changes are considered in the following read
     * operation.
     *
     * @param handle Points to user-provided data for the callback.
     * @param nodeid The identifier of the node.
     * @param data Points to the current node value.
     * @param range Points to the numeric range the client wants to read from
     *        (or NULL). */
    void (*onRead)(UA_Server *server, const UA_NodeId *sessionId,
                   void *sessionContext, const UA_NodeId *nodeid,
                   void *nodeContext, const UA_NumericRange *range,
                   const UA_DataValue *value);

    /* Called after writing the value attribute. The node is re-opened after
     * writing so that the new value is visible in the callback.
     *
     * @param server The server executing the callback
     * @sessionId The identifier of the session
     * @sessionContext Additional data attached to the session
     *                 in the access control layer
     * @param nodeid The identifier of the node.
     * @param nodeUserContext Additional data attached to the node by
     *        the user.
     * @param nodeConstructorContext Additional data attached to the node
     *        by the type constructor(s).
     * @param range Points to the numeric range the client wants to write to (or
     *        NULL). */
    void (*onWrite)(UA_Server *server, const UA_NodeId *sessionId,
                    void *sessionContext, const UA_NodeId *nodeId,
                    void *nodeContext, const UA_NumericRange *range,
                    const UA_DataValue *data);
} UA_ValueCallback;

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setVariableNode_valueCallback(UA_Server *server,
                                        const UA_NodeId nodeId,
                                        const UA_ValueCallback callback);






/**
 * .. _local-monitoreditems:
 *
 * Local MonitoredItems
 * ^^^^^^^^^^^^^^^^^^^^
 *
 * MonitoredItems are used with the Subscription mechanism of OPC UA to







<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>
>
>







29600
29601
29602
29603
29604
29605
29606


29607






























































29608
29609
29610
29611











































29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
 * of storing a variant attached to the variable node, the node can point to a
 * function with a local data provider. Whenever the value attribute is read,
 * the function will be called and asked to provide a UA_DataValue return value
 * that contains the value content and additional timestamps.
 *
 * It is expected that the read callback is implemented. The write callback can
 * be set to a null-pointer. */

































































UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setVariableNode_dataSource(UA_Server *server, const UA_NodeId nodeId,
                                     const UA_DataSource dataSource);












































UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setVariableNode_valueCallback(UA_Server *server,
                                        const UA_NodeId nodeId,
                                        const UA_ValueCallback callback);

UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setVariableNode_valueBackend(UA_Server *server,
                                       const UA_NodeId nodeId,
                                       const UA_ValueBackend valueBackend);

/**
 * .. _local-monitoreditems:
 *
 * Local MonitoredItems
 * ^^^^^^^^^^^^^^^^^^^^
 *
 * MonitoredItems are used with the Subscription mechanism of OPC UA to
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
 * ^^^^^^^^^^^^^^^^
 * Method callbacks are set to `NULL` (not executable) when a method node is
 * added over the network. In theory, it is possible to add a callback via
 * ``UA_Server_setMethodNode_callback`` within the global constructor when
 * adding methods over the network is really wanted. See the Section
 * :ref:`object-interaction` for calling methods on an object. */

typedef UA_StatusCode
(*UA_MethodCallback)(UA_Server *server, const UA_NodeId *sessionId,
                     void *sessionContext, const UA_NodeId *methodId,
                     void *methodContext, const UA_NodeId *objectId,
                     void *objectContext, size_t inputSize,
                     const UA_Variant *input, size_t outputSize,
                     UA_Variant *output);

#ifdef UA_ENABLE_METHODCALLS
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setMethodNode_callback(UA_Server *server,
                                 const UA_NodeId methodNodeId,
                                 UA_MethodCallback methodCallback);
#endif








<
<
<
<
<
<
<
<







29679
29680
29681
29682
29683
29684
29685








29686
29687
29688
29689
29690
29691
29692
 * ^^^^^^^^^^^^^^^^
 * Method callbacks are set to `NULL` (not executable) when a method node is
 * added over the network. In theory, it is possible to add a callback via
 * ``UA_Server_setMethodNode_callback`` within the global constructor when
 * adding methods over the network is really wanted. See the Section
 * :ref:`object-interaction` for calling methods on an object. */









#ifdef UA_ENABLE_METHODCALLS
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_setMethodNode_callback(UA_Server *server,
                                 const UA_NodeId methodNodeId,
                                 UA_MethodCallback methodCallback);
#endif

26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
 * Not that this is only allowed for object nodes.
 *
 * The _finish method:
 *  - copies mandatory children
 *  - calls the node constructor(s) at the end
 *  - may remove the node if it encounters an error.
 *
 * The special UA_Server_addMethodNode_finish method needs to be used for
 * method nodes, since there you need to explicitly specifiy the input
 * and output arguments which are added in the finish step (if not yet already there)
 **/

/* The ``attr`` argument must have a type according to the NodeClass.
 * ``VariableAttributes`` for variables, ``ObjectAttributes`` for objects, and
 * so on. Missing attributes are taken from the TypeDefinition node if
 * applicable. */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_addNode_begin(UA_Server *server, const UA_NodeClass nodeClass,







|
|
|
<







29962
29963
29964
29965
29966
29967
29968
29969
29970
29971

29972
29973
29974
29975
29976
29977
29978
 * Not that this is only allowed for object nodes.
 *
 * The _finish method:
 *  - copies mandatory children
 *  - calls the node constructor(s) at the end
 *  - may remove the node if it encounters an error.
 *
 * The special UA_Server_addMethodNode_finish method needs to be used for method
 * nodes, since there you need to explicitly specifiy the input and output
 * arguments which are added in the finish step (if not yet already there) **/


/* The ``attr`` argument must have a type according to the NodeClass.
 * ``VariableAttributes`` for variables, ``ObjectAttributes`` for objects, and
 * so on. Missing attributes are taken from the TypeDefinition node if
 * applicable. */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_addNode_begin(UA_Server *server, const UA_NodeClass nodeClass,
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852

26853
26854
26855
26856
26857
26858

26859
26860

26861
26862

26863
26864

26865
26866
26867
26868
26869
26870
26871
                          UA_Boolean deleteBidirectional);

/**
 * .. _events:
 *
 * Events
 * ------
 * The method ``UA_Server_createEvent`` creates an event and represents it as node. The node receives a unique `EventId`
 * which is automatically added to the node.
 * The method returns a `NodeId` to the object node which represents the event through ``outNodeId``. The `NodeId` can

 * be used to set the attributes of the event. The generated `NodeId` is always numeric. ``outNodeId`` cannot be
 * ``NULL``.
 *
 * Note: In order to see an event in UAExpert, the field `Time` must be given a value!
 *
 * The method ``UA_Server_triggerEvent`` "triggers" an event by adding it to all monitored items of the specified

 * origin node and those of all its parents. Any filters specified by the monitored items are automatically applied.
 * Using this method deletes the node generated by ``UA_Server_createEvent``. The `EventId` for the new event is

 * generated automatically and is returned through ``outEventId``. ``NULL`` can be passed if the `EventId` is not
 * needed. ``deleteEventNode`` specifies whether the node representation of the event should be deleted after invoking

 * the method. This can be useful if events with the similar attributes are triggered frequently. ``UA_TRUE`` would
 * cause the node to be deleted. */

#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS

/* The EventQueueOverflowEventType is defined as abstract, therefore we can not
 * create an instance of that type directly, but need to create a subtype. The
 * following is an arbitrary number which shall refer to our internal overflow
 * type. This is already posted on the OPC Foundation bug tracker under the
 * following link for clarification:







|
|
|
>
|
|



|
>
|
|
>
|
|
>
|
|
>







30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
                          UA_Boolean deleteBidirectional);

/**
 * .. _events:
 *
 * Events
 * ------
 * The method ``UA_Server_createEvent`` creates an event and represents it as
 * node. The node receives a unique `EventId` which is automatically added to
 * the node. The method returns a `NodeId` to the object node which represents
 * the event through ``outNodeId``. The `NodeId` can be used to set the
 * attributes of the event. The generated `NodeId` is always numeric.
 * ``outNodeId`` cannot be ``NULL``.
 *
 * Note: In order to see an event in UAExpert, the field `Time` must be given a value!
 *
 * The method ``UA_Server_triggerEvent`` "triggers" an event by adding it to all
 * monitored items of the specified origin node and those of all its parents.
 * Any filters specified by the monitored items are automatically applied. Using
 * this method deletes the node generated by ``UA_Server_createEvent``. The
 * `EventId` for the new event is generated automatically and is returned
 * through ``outEventId``. ``NULL`` can be passed if the `EventId` is not
 * needed. ``deleteEventNode`` specifies whether the node representation of the
 * event should be deleted after invoking the method. This can be useful if
 * events with the similar attributes are triggered frequently. ``UA_TRUE``
 * would cause the node to be deleted. */

#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS

/* The EventQueueOverflowEventType is defined as abstract, therefore we can not
 * create an instance of that type directly, but need to create a subtype. The
 * following is an arbitrary number which shall refer to our internal overflow
 * type. This is already posted on the OPC Foundation bug tracker under the
 * following link for clarification:
26879
26880
26881
26882
26883
26884
26885
26886

26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914

26915
26916
26917
26918

26919
26920



26921
26922
26923
26924

26925
26926
26927
26928
26929
26930
26931
26932
26933
26934

26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947

26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963

26964
26965
26966
26967
26968
26969
26970
26971

26972
26973
26974
26975

26976
26977
26978
26979
26980
26981
26982
26983
26984
26985

26986
26987
26988
26989
26990
26991
26992

26993
26994
26995
26996
26997
26998
26999
27000
27001
27002

27003
27004
27005











27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018






27019

27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
 * @param outNodeId The NodeId of the newly created node for the event
 * @return The StatusCode of the UA_Server_createEvent method */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_createEvent(UA_Server *server, const UA_NodeId eventType,
                      UA_NodeId *outNodeId);

/* Triggers a node representation of an event by applying EventFilters and
   adding the event to the appropriate queues.

 * @param server The server object
 * @param eventNodeId The NodeId of the node representation of the event which should be triggered
 * @param outEvent the EventId of the new event
 * @param deleteEventNode Specifies whether the node representation of the event should be deleted
 * @return The StatusCode of the UA_Server_triggerEvent method */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_triggerEvent(UA_Server *server, const UA_NodeId eventNodeId, const UA_NodeId originId,
                       UA_ByteString *outEventId, const UA_Boolean deleteEventNode);

#endif /* UA_ENABLE_SUBSCRIPTIONS_EVENTS */

#ifdef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS
typedef enum UA_TwoStateVariableCallbackType {
  UA_ENTERING_ENABLEDSTATE,
  UA_ENTERING_ACKEDSTATE,
  UA_ENTERING_CONFIRMEDSTATE,
  UA_ENTERING_ACTIVESTATE
} UA_TwoStateVariableCallbackType;

/**
 * callback prototype to set user specific callbacks
 */
typedef UA_StatusCode
(*UA_TwoStateVariableChangeCallback)(UA_Server *server, const UA_NodeId *condition);

/**
 * create condition instance. The function checks first whether the passed conditionType
 * is a subType of ConditionType. Then checks whether the condition source has HasEventSource

 * reference to its parent. If not, a HasEventSource reference will be created between condition
 * source and server object. To expose the condition in address space, a hierarchical ReferenceType
 * should be passed to create the reference to condition source. Otherwise, UA_NODEID_NULL should be
 * passed to make the condition not exposed.

 * @param server The server object
 * @param conditionId The NodeId of the requested Condition Object. UA_NODEID_NULL for random Id with NS Idx = 0.



 * @param conditionType The NodeId of the node representation of the ConditionType
 * @param conditionName The name of the condition to be created
 * @param conditionSource The NodeId of the Condition Source (Parent of the Condition)
 * @param hierarchialReferenceType The NodeId of Hierarchical ReferenceType between Condition and its source

 * @param outConditionId The NodeId of the created Condition
 * @return The StatusCode of the UA_Server_createCondition method */
UA_StatusCode UA_EXPORT
UA_Server_createCondition(UA_Server *server,
                          const UA_NodeId conditionId, const UA_NodeId conditionType,
                          UA_QualifiedName conditionName, const UA_NodeId conditionSource,
                          const UA_NodeId hierarchialReferenceType, UA_NodeId *outConditionId);

/**
 * set the value of condition field.

 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param value Variant Value to be written to the Field
 * @param fieldName Name of the Field in which the value should be written
 * @return The StatusCode of the UA_Server_setConditionField method*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionField(UA_Server *server,
                            const UA_NodeId condition,
                            const UA_Variant* value,
                            const UA_QualifiedName fieldName);

/**
 * set the value of property of condition field.

 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param value Variant Value to be written to the Field
 * @param variableFieldName Name of the Field which has a property
 * @param variablePropertyName Name of the Field Property in which the value should be written
 * @return The StatusCode of the UA_Server_setConditionVariableFieldProperty*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionVariableFieldProperty(UA_Server *server,
                                            const UA_NodeId condition,
                                            const UA_Variant* value,
                                            const UA_QualifiedName variableFieldName,
                                            const UA_QualifiedName variablePropertyName);

/**
 * triggers an event only for an enabled condition. The condition list is updated then with the
 * last generated EventId.

 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionSource The NodeId of the node representation of the Condition Source
 * @param outEventId last generated EventId
 * @return The StatusCode of the UA_Server_triggerConditionEvent method*/
UA_StatusCode UA_EXPORT
UA_Server_triggerConditionEvent(UA_Server *server, const UA_NodeId condition,
                                const UA_NodeId conditionSource, UA_ByteString *outEventId);


/**
 * add an optional condition field using its name. (TODO Adding optional methods
 * is not implemented yet)

 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionType The NodeId of the node representation of the Condition Type
 * from which the optional field comes
 * @param fieldName Name of the optional field
 * @param outOptionalVariable The NodeId of the created field (Variable Node)
 * @return The StatusCode of the UA_Server_addConditionOptionalField method*/
UA_StatusCode UA_EXPORT
UA_Server_addConditionOptionalField(UA_Server *server, const UA_NodeId condition,
                                    const UA_NodeId conditionType, const UA_QualifiedName fieldName,

                                    UA_NodeId *outOptionalVariable);

/**
 * Function used to set a user specific callback to TwoStateVariable Fields of
 * a condition. The callbacks will be called before triggering the events when
 * transition to true State of EnabledState/Id, AckedState/Id, ConfirmedState/Id
 * and ActiveState/Id occurs.

 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionSource The NodeId of the node representation of the Condition Source
 * @param removeBranch (Not Implemented yet)
 * @param callback User specific callback function
 * @param callbackType Callback function type, indicates where it should be called
 * @return The StatusCode of the UA_Server_setConditionTwoStateVariableCallback method*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionTwoStateVariableCallback(UA_Server *server, const UA_NodeId condition,
                                               const UA_NodeId conditionSource, UA_Boolean removeBranch,

                                               UA_TwoStateVariableChangeCallback callback,
                                               UA_TwoStateVariableCallbackType callbackType);












#endif//UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS

UA_StatusCode UA_EXPORT
UA_Server_updateCertificate(UA_Server *server,
                            const UA_ByteString *oldCertificate,
                            const UA_ByteString *newCertificate,
                            const UA_ByteString *newPrivateKey,
                            UA_Boolean closeSessions,
                            UA_Boolean closeSecureChannels);

/**
 * Utility Functions
 * ----------------- */






/* Add a new namespace to the server. Returns the index of the new namespace */

UA_UInt16 UA_EXPORT UA_THREADSAFE UA_Server_addNamespace(UA_Server *server, const char* name);

/* Get namespace by name from the server. */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_getNamespaceByName(UA_Server *server, const UA_String namespaceUri,
                             size_t* foundIndex);

#ifdef UA_ENABLE_HISTORIZING
UA_Boolean UA_EXPORT UA_THREADSAFE
UA_Server_AccessControl_allowHistoryUpdateUpdateData(UA_Server *server,
                                                     const UA_NodeId *sessionId, void *sessionContext,
                                                     const UA_NodeId *nodeId,
                                                     UA_PerformUpdateType performInsertReplace,
                                                     const UA_DataValue *value);

UA_Boolean UA_EXPORT UA_THREADSAFE
UA_Server_AccessControl_allowHistoryUpdateDeleteRawModified(UA_Server *server,
                                                            const UA_NodeId *sessionId, void *sessionContext,
                                                            const UA_NodeId *nodeId,
                                                            UA_DateTime startTimestamp,
                                                            UA_DateTime endTimestamp,
                                                            bool isDeleteModified);
#endif // UA_ENABLE_HISTORIZING

/**
* .. _async-operations:
*
* Async Operations
* ----------------
* Some operations (such as reading out a sensor that needs to warm up) can take
* quite some time. In order not to block the server during such an operation, it







|
>



















<
|
<



<
|
|
>
|
|
|
|
>

|
>
>
>



|
>








<
|
>











<
|
>













<
|
|
>







|
>

<
|

>









|
>


<
|
|


>









|
>



>
>
>
>
>
>
>
>
>
>
>
|












>
>
>
>
>
>

>
|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085

30086

30087
30088
30089

30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115

30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128

30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143

30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156

30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172

30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230

















30231
30232
30233
30234
30235
30236
30237
 * @param outNodeId The NodeId of the newly created node for the event
 * @return The StatusCode of the UA_Server_createEvent method */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_createEvent(UA_Server *server, const UA_NodeId eventType,
                      UA_NodeId *outNodeId);

/* Triggers a node representation of an event by applying EventFilters and
 * adding the event to the appropriate queues.
 *
 * @param server The server object
 * @param eventNodeId The NodeId of the node representation of the event which should be triggered
 * @param outEvent the EventId of the new event
 * @param deleteEventNode Specifies whether the node representation of the event should be deleted
 * @return The StatusCode of the UA_Server_triggerEvent method */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_triggerEvent(UA_Server *server, const UA_NodeId eventNodeId, const UA_NodeId originId,
                       UA_ByteString *outEventId, const UA_Boolean deleteEventNode);

#endif /* UA_ENABLE_SUBSCRIPTIONS_EVENTS */

#ifdef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS
typedef enum UA_TwoStateVariableCallbackType {
  UA_ENTERING_ENABLEDSTATE,
  UA_ENTERING_ACKEDSTATE,
  UA_ENTERING_CONFIRMEDSTATE,
  UA_ENTERING_ACTIVESTATE
} UA_TwoStateVariableCallbackType;


/* Callback prototype to set user specific callbacks */

typedef UA_StatusCode
(*UA_TwoStateVariableChangeCallback)(UA_Server *server, const UA_NodeId *condition);


/* Create condition instance. The function checks first whether the passed
 * conditionType is a subType of ConditionType. Then checks whether the
 * condition source has HasEventSource reference to its parent. If not, a
 * HasEventSource reference will be created between condition source and server
 * object. To expose the condition in address space, a hierarchical
 * ReferenceType should be passed to create the reference to condition source.
 * Otherwise, UA_NODEID_NULL should be passed to make the condition not exposed.
 *
 * @param server The server object
 * @param conditionId The NodeId of the requested Condition Object. When passing
 *                    UA_NODEID_NUMERIC(X,0) an unused nodeid in namespace X
 *                    will be used. E.g. passing UA_NODEID_NULL will result in a
 *                    NodeId in namespace 0.
 * @param conditionType The NodeId of the node representation of the ConditionType
 * @param conditionName The name of the condition to be created
 * @param conditionSource The NodeId of the Condition Source (Parent of the Condition)
 * @param hierarchialReferenceType The NodeId of Hierarchical ReferenceType
 *                                 between Condition and its source
 * @param outConditionId The NodeId of the created Condition
 * @return The StatusCode of the UA_Server_createCondition method */
UA_StatusCode UA_EXPORT
UA_Server_createCondition(UA_Server *server,
                          const UA_NodeId conditionId, const UA_NodeId conditionType,
                          UA_QualifiedName conditionName, const UA_NodeId conditionSource,
                          const UA_NodeId hierarchialReferenceType, UA_NodeId *outConditionId);


/* Set the value of condition field.
 *
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param value Variant Value to be written to the Field
 * @param fieldName Name of the Field in which the value should be written
 * @return The StatusCode of the UA_Server_setConditionField method*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionField(UA_Server *server,
                            const UA_NodeId condition,
                            const UA_Variant* value,
                            const UA_QualifiedName fieldName);


/* Set the value of property of condition field.
 *
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param value Variant Value to be written to the Field
 * @param variableFieldName Name of the Field which has a property
 * @param variablePropertyName Name of the Field Property in which the value should be written
 * @return The StatusCode of the UA_Server_setConditionVariableFieldProperty*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionVariableFieldProperty(UA_Server *server,
                                            const UA_NodeId condition,
                                            const UA_Variant* value,
                                            const UA_QualifiedName variableFieldName,
                                            const UA_QualifiedName variablePropertyName);


/* Triggers an event only for an enabled condition. The condition list is
 * updated then with the last generated EventId.
 *
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionSource The NodeId of the node representation of the Condition Source
 * @param outEventId last generated EventId
 * @return The StatusCode of the UA_Server_triggerConditionEvent method*/
UA_StatusCode UA_EXPORT
UA_Server_triggerConditionEvent(UA_Server *server, const UA_NodeId condition,
                                const UA_NodeId conditionSource,
                                UA_ByteString *outEventId);


/* Add an optional condition field using its name. (TODO Adding optional methods
 * is not implemented yet)
 *
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionType The NodeId of the node representation of the Condition Type
 * from which the optional field comes
 * @param fieldName Name of the optional field
 * @param outOptionalVariable The NodeId of the created field (Variable Node)
 * @return The StatusCode of the UA_Server_addConditionOptionalField method*/
UA_StatusCode UA_EXPORT
UA_Server_addConditionOptionalField(UA_Server *server, const UA_NodeId condition,
                                    const UA_NodeId conditionType,
                                    const UA_QualifiedName fieldName,
                                    UA_NodeId *outOptionalVariable);


/* Function used to set a user specific callback to TwoStateVariable Fields of a
 * condition. The callbacks will be called before triggering the events when
 * transition to true State of EnabledState/Id, AckedState/Id, ConfirmedState/Id
 * and ActiveState/Id occurs.
 *
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionSource The NodeId of the node representation of the Condition Source
 * @param removeBranch (Not Implemented yet)
 * @param callback User specific callback function
 * @param callbackType Callback function type, indicates where it should be called
 * @return The StatusCode of the UA_Server_setConditionTwoStateVariableCallback method*/
UA_StatusCode UA_EXPORT
UA_Server_setConditionTwoStateVariableCallback(UA_Server *server, const UA_NodeId condition,
                                               const UA_NodeId conditionSource,
                                               UA_Boolean removeBranch,
                                               UA_TwoStateVariableChangeCallback callback,
                                               UA_TwoStateVariableCallbackType callbackType);

/* Delete a condition from the address space and the internal lists.
 * 
 * @param server The server object
 * @param condition The NodeId of the node representation of the Condition Instance
 * @param conditionSource The NodeId of the node representation of the Condition Source
 * @return UA_STATUSCODE_GOOD on success
 */
UA_StatusCode UA_EXPORT
UA_Server_deleteCondition(UA_Server *server, const UA_NodeId condition,
                          const UA_NodeId conditionSource);

#endif /* UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS */

UA_StatusCode UA_EXPORT
UA_Server_updateCertificate(UA_Server *server,
                            const UA_ByteString *oldCertificate,
                            const UA_ByteString *newCertificate,
                            const UA_ByteString *newPrivateKey,
                            UA_Boolean closeSessions,
                            UA_Boolean closeSecureChannels);

/**
 * Utility Functions
 * ----------------- */

/* Lookup a datatype by its NodeId. Takes the custom types in the server
 * configuration into account. Return NULL if none found. */
UA_EXPORT const UA_DataType *
UA_Server_findDataType(UA_Server *server, const UA_NodeId *typeId);

/* Add a new namespace to the server. Returns the index of the new namespace */
UA_UInt16 UA_EXPORT UA_THREADSAFE
UA_Server_addNamespace(UA_Server *server, const char* name);

/* Get namespace by name from the server. */
UA_StatusCode UA_EXPORT UA_THREADSAFE
UA_Server_getNamespaceByName(UA_Server *server, const UA_String namespaceUri,
                             size_t* foundIndex);


















/**
* .. _async-operations:
*
* Async Operations
* ----------------
* Some operations (such as reading out a sensor that needs to warm up) can take
* quite some time. In order not to block the server during such an operation, it
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074

28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088

28089












28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
















28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143


28144
28145














28146
28147
28148
28149
28150
28151
28152
} UA_ServerStatistics;

UA_ServerStatistics UA_EXPORT
UA_Server_getStatistics(UA_Server *server);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/log.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



#include <stdarg.h>

_UA_BEGIN_DECLS

/**
 * Logging Plugin API
 * ==================
 *
 * Servers and clients define a logger in their configuration. The logger is a
 * plugin. A default plugin that logs to ``stdout`` is provided as an example.
 * The logger plugin is stateful and can point to custom data. So it is possible
 * to keep open file handlers in the logger context.
 *
 * Every log-message consists of a log-level, a log-category and a string
 * message content. The timestamp of the log-message is created within the
 * logger. */

typedef enum {
    UA_LOGLEVEL_TRACE,
    UA_LOGLEVEL_DEBUG,
    UA_LOGLEVEL_INFO,
    UA_LOGLEVEL_WARNING,
    UA_LOGLEVEL_ERROR,
    UA_LOGLEVEL_FATAL
} UA_LogLevel;

typedef enum {
    UA_LOGCATEGORY_NETWORK,
    UA_LOGCATEGORY_SECURECHANNEL,
    UA_LOGCATEGORY_SESSION,
    UA_LOGCATEGORY_SERVER,
    UA_LOGCATEGORY_CLIENT,
    UA_LOGCATEGORY_USERLAND,
    UA_LOGCATEGORY_SECURITYPOLICY
} UA_LogCategory;

typedef struct {
    /* Log a message. The message string and following varargs are formatted
     * according to the rules of the printf command. Use the convenience macros
     * below that take the minimum log-level defined in ua_config.h into
     * account. */
    void (*log)(void *logContext, UA_LogLevel level, UA_LogCategory category,
                const char *msg, va_list args);

    void *context; /* Logger state */

    void (*clear)(void *context); /* Clean up the logger plugin */
} UA_Logger;

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_TRACE(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 100
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_TRACE, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_DEBUG(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 200
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_DEBUG, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_INFO(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 300
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_INFO, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_WARNING(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 400
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_WARNING, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_ERROR(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 500
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_ERROR, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

static UA_INLINE UA_FORMAT(3,4) void
UA_LOG_FATAL(const UA_Logger *logger, UA_LogCategory category, const char *msg, ...) {
#if UA_LOGLEVEL <= 600
    if(!logger || !logger->log)
        return;
    va_list args; va_start(args, msg);
    logger->log(logger->context, UA_LOGLEVEL_FATAL, category, msg, args);
    va_end(args);
#else
    (void) logger;
    (void) category;
    (void) msg;
#endif
}

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/network.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

/* Forward declarations */
struct UA_Connection;
typedef struct UA_Connection UA_Connection;

struct UA_SecureChannel;
typedef struct UA_SecureChannel UA_SecureChannel;

struct UA_ServerNetworkLayer;
typedef struct UA_ServerNetworkLayer UA_ServerNetworkLayer;

/**
 * .. _networking:
 *
 * Networking Plugin API
 * =====================
 *
 * Connection
 * ----------
 * Client-server connections are represented by a `UA_Connection`. The
 * connection is stateful and stores partially received messages, and so on. In
 * addition, the connection contains function pointers to the underlying
 * networking implementation. An example for this is the `send` function. So the
 * connection encapsulates all the required networking functionality. This lets
 * users on embedded (or otherwise exotic) systems implement their own
 * networking plugins with a clear interface to the main open62541 library. */

typedef struct {
    UA_UInt32 protocolVersion;
    UA_UInt32 recvBufferSize;
    UA_UInt32 sendBufferSize;
    UA_UInt32 localMaxMessageSize;  /* (0 = unbounded) */
    UA_UInt32 remoteMaxMessageSize; /* (0 = unbounded) */
    UA_UInt32 localMaxChunkCount;   /* (0 = unbounded) */
    UA_UInt32 remoteMaxChunkCount;  /* (0 = unbounded) */
} UA_ConnectionConfig;

typedef enum {
    UA_CONNECTIONSTATE_CLOSED,     /* The socket has been closed and the connection
                                    * will be deleted */
    UA_CONNECTIONSTATE_OPENING,    /* The socket is open, but the HEL/ACK handshake
                                    * is not done */
    UA_CONNECTIONSTATE_ESTABLISHED /* The socket is open and the connection
                                    * configured */
} UA_ConnectionState;

struct UA_Connection {
    UA_ConnectionState state;
    UA_SecureChannel *channel;     /* The securechannel that is attached to
                                    * this connection */
    UA_SOCKET sockfd;              /* Most connectivity solutions run on
                                    * sockets. Having the socket id here
                                    * simplifies the design. */
    UA_DateTime openingDate;       /* The date the connection was created */
    void *handle;                  /* A pointer to internal data */

    /* Get a buffer for sending */
    UA_StatusCode (*getSendBuffer)(UA_Connection *connection, size_t length,
                                   UA_ByteString *buf);

    /* Release the send buffer manually */
    void (*releaseSendBuffer)(UA_Connection *connection, UA_ByteString *buf);

    /* Sends a message over the connection. The message buffer is always freed,
     * even if sending fails.
     *
     * @param connection The connection
     * @param buf The message buffer
     * @return Returns an error code or UA_STATUSCODE_GOOD. */
    UA_StatusCode (*send)(UA_Connection *connection, UA_ByteString *buf);

    /* Receive a message from the remote connection
     *
     * @param connection The connection

     * @param response The response string. If this is empty, it will be
     *        allocated by the connection and needs to be freed with
     *        connection->releaseBuffer. If the response string is non-empty, it
     *        will be used as the receive buffer. If bytes are received, the
     *        length of the buffer is adjusted to match the length of the
     *        received bytes.
     * @param timeout Timeout of the recv operation in milliseconds
     * @return Returns UA_STATUSCODE_BADCOMMUNICATIONERROR if the recv operation
     *         can be repeated, UA_STATUSCODE_GOOD if it succeeded and
     *         UA_STATUSCODE_BADCONNECTIONCLOSED if the connection was
     *         closed. */
    UA_StatusCode (*recv)(UA_Connection *connection, UA_ByteString *response,
                          UA_UInt32 timeout);

    /* Release the buffer of a received message */
    void (*releaseRecvBuffer)(UA_Connection *connection, UA_ByteString *buf);

    /* Close the connection. The network layer closes the socket. This is picked
     * up during the next 'listen' and the connection is freed in the network
     * layer. */
    void (*close)(UA_Connection *connection);

    /* To be called only from within the server (and not the network layer).
     * Frees up the connection's memory. */
    void (*free)(UA_Connection *connection);
};

/**
 * Server Network Layer
 * --------------------
 * The server exposes two functions to interact with remote clients:
 * `processBinaryMessage` and `removeConnection`. These functions are called by
 * the server network layer.
 *
 * It is the job of the server network layer to listen on a TCP socket, to
 * accept new connections, to call the server with received messages and to
 * signal closed connections to the server.
 *
 * The network layer is part of the server config. So users can provide a custom
 * implementation if the provided example does not fit their architecture. The
 * network layer is invoked only from the server's main loop. So the network
 * layer does not need to be thread-safe. If the networklayer receives a
 * positive duration for blocking listening, the server's main loop will block
 * until a message is received or the duration times out. */

/* Process a binary message (TCP packet). The message can contain partial
 * chunks. (TCP is a streaming protocol and packets may be split/merge during
 * transport.) After processing, the message is freed with
 * connection->releaseRecvBuffer. */
void UA_EXPORT
UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection,
                               UA_ByteString *message);

/* The server internally cleans up the connection and then calls
 * connection->free. */
void UA_EXPORT
UA_Server_removeConnection(UA_Server *server, UA_Connection *connection);

struct UA_ServerNetworkLayer {
    void *handle; /* Internal data */

    /* Points to external memory, i.e. handled by server or client */
    UA_NetworkStatistics *statistics;

    UA_String discoveryUrl;

    UA_ConnectionConfig localConnectionConfig;

    /* Start listening on the networklayer.
     *
     * @param nl The network layer
     * @return Returns UA_STATUSCODE_GOOD or an error code. */
    UA_StatusCode (*start)(UA_ServerNetworkLayer *nl, const UA_String *customHostname);

    /* Listen for new and closed connections and arriving packets. Calls
     * UA_Server_processBinaryMessage for the arriving packets. Closed
     * connections are picked up here and forwarded to
     * UA_Server_removeConnection where they are cleaned up and freed.
     *
     * @param nl The network layer
     * @param server The server for processing the incoming packets and for
     *               closing connections.
     * @param timeout The timeout during which an event must arrive in
     *                milliseconds
     * @return A statuscode for the status of the network layer. */
    UA_StatusCode (*listen)(UA_ServerNetworkLayer *nl, UA_Server *server,
                            UA_UInt16 timeout);

    /* Close the network socket and all open connections. Afterwards, the
     * network layer can be safely deleted.
     *
     * @param nl The network layer
     * @param server The server that processes the incoming packets and for
     *               closing connections before deleting them.
     * @return A statuscode for the status of the closing operation. */
    void (*stop)(UA_ServerNetworkLayer *nl, UA_Server *server);

    /* Deletes the network layer context. Call only after stopping. */
    void (*clear)(UA_ServerNetworkLayer *nl);
};

/**
 * Client Network Layer
 * --------------------
 * The client has only a single connection used for sending and receiving binary
 * messages. */

/* @param config the connection config for this client
 * @param endpointUrl to where to connect
 * @param timeout in ms until the connection try times out if remote not reachable
 * @param logger the logger to use */
typedef UA_Connection
(*UA_ConnectClientConnection)(UA_ConnectionConfig config, UA_String endpointUrl,
                              UA_UInt32 timeout, UA_Logger *logger);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/accesscontrol.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

struct UA_AccessControl;
typedef struct UA_AccessControl UA_AccessControl;

/**
 * .. _access-control:
 *
 * Access Control Plugin API
 * =========================
 * The access control callback is used to authenticate sessions and grant access
 * rights accordingly. */

struct UA_AccessControl {
    void *context;
    void (*clear)(UA_AccessControl *ac);

    /* Security mode similar to UA_ClientConfig.securityMode */

    UA_MessageSecurityMode securityMode;

    /* Supported login mechanisms. The server endpoints are created from here. */
    size_t userTokenPoliciesSize;
    UA_UserTokenPolicy *userTokenPolicies;

    /* Authenticate a session. The session context is attached to the session
     * and later passed into the node-based access control callbacks. The new
     * session is rejected if a StatusCode other than UA_STATUSCODE_GOOD is
     * returned. */
    UA_StatusCode (*activateSession)(UA_Server *server, UA_AccessControl *ac,
                                     const UA_EndpointDescription *endpointDescription,
                                     const UA_ByteString *secureChannelRemoteCertificate,
                                     const UA_NodeId *sessionId,
                                     const UA_ExtensionObject *userIdentityToken,
                                     void **sessionContext);

    /* Deauthenticate a session and cleanup */
    void (*closeSession)(UA_Server *server, UA_AccessControl *ac,
                         const UA_NodeId *sessionId, void *sessionContext);

    /* Access control for all nodes*/
    UA_UInt32 (*getUserRightsMask)(UA_Server *server, UA_AccessControl *ac,
                                   const UA_NodeId *sessionId, void *sessionContext,
                                   const UA_NodeId *nodeId, void *nodeContext);

    /* Additional access control for variable nodes */
    UA_Byte (*getUserAccessLevel)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_NodeId *nodeId, void *nodeContext);

    /* Additional access control for method nodes */
    UA_Boolean (*getUserExecutable)(UA_Server *server, UA_AccessControl *ac,
                                    const UA_NodeId *sessionId, void *sessionContext,
                                    const UA_NodeId *methodId, void *methodContext);

    /* Additional access control for calling a method node in the context of a
     * specific object */
    UA_Boolean (*getUserExecutableOnObject)(UA_Server *server, UA_AccessControl *ac,
                                            const UA_NodeId *sessionId, void *sessionContext,
                                            const UA_NodeId *methodId, void *methodContext,
                                            const UA_NodeId *objectId, void *objectContext);

    /* Allow adding a node */
    UA_Boolean (*allowAddNode)(UA_Server *server, UA_AccessControl *ac,
                               const UA_NodeId *sessionId, void *sessionContext,
                               const UA_AddNodesItem *item);

    /* Allow adding a reference */
    UA_Boolean (*allowAddReference)(UA_Server *server, UA_AccessControl *ac,
                                    const UA_NodeId *sessionId, void *sessionContext,
                                    const UA_AddReferencesItem *item);

    /* Allow deleting a node */
    UA_Boolean (*allowDeleteNode)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_DeleteNodesItem *item);

    /* Allow deleting a reference */
    UA_Boolean (*allowDeleteReference)(UA_Server *server, UA_AccessControl *ac,
                                       const UA_NodeId *sessionId, void *sessionContext,
                                       const UA_DeleteReferencesItem *item);

    /* Allow browsing a node */
    UA_Boolean (*allowBrowseNode)(UA_Server *server, UA_AccessControl *ac,
                                  const UA_NodeId *sessionId, void *sessionContext,
                                  const UA_NodeId *nodeId, void *nodeContext);
#ifdef UA_ENABLE_HISTORIZING
    /* Allow insert,replace,update of historical data */
    UA_Boolean (*allowHistoryUpdateUpdateData)(UA_Server *server, UA_AccessControl *ac,
                                               const UA_NodeId *sessionId, void *sessionContext,
                                               const UA_NodeId *nodeId,
                                               UA_PerformUpdateType performInsertReplace,
                                               const UA_DataValue *value);

    /* Allow delete of historical data */
    UA_Boolean (*allowHistoryUpdateDeleteRawModified)(UA_Server *server, UA_AccessControl *ac,
                                                      const UA_NodeId *sessionId, void *sessionContext,
                                                      const UA_NodeId *nodeId,
                                                      UA_DateTime startTimestamp,
                                                      UA_DateTime endTimestamp,
                                                      bool isDeleteModified);
#endif
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/pki.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
 */



_UA_BEGIN_DECLS

/**
 * Public Key Infrastructure Integration
 * =====================================
 * This file contains interface definitions for integration in a Public Key
 * Infrastructure (PKI). Currently only one plugin interface is defined.
 *
 * Certificate Verification
 * ------------------------
 * This plugin verifies that the origin of the certificate is trusted. It does
 * not assign any access rights/roles to the holder of the certificate.
 *
 * Usually, implementations of the certificate verification plugin provide an
 * initialization method that takes a trust-list and a revocation-list as input.
 * The lifecycle of the plugin is attached to a server or client config. The
 * ``clear`` method is called automatically when the config is destroyed. */

struct UA_CertificateVerification;
typedef struct UA_CertificateVerification UA_CertificateVerification;

struct UA_CertificateVerification {
    void *context;

    /* Verify the certificate against the configured policies and trust chain. */
    UA_StatusCode (*verifyCertificate)(void *verificationContext,
                                       const UA_ByteString *certificate);

    /* Verify that the certificate has the applicationURI in the subject name. */
    UA_StatusCode (*verifyApplicationURI)(void *verificationContext,
                                          const UA_ByteString *certificate,
                                          const UA_String *applicationURI);

    /* Delete the certificate verification context */
    void (*clear)(UA_CertificateVerification *cv);
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/securitypolicy.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017-2018 (c) Mark Giraud, Fraunhofer IOSB
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */



_UA_BEGIN_DECLS

extern UA_EXPORT const UA_ByteString UA_SECURITY_POLICY_NONE_URI;

struct UA_SecurityPolicy;
typedef struct UA_SecurityPolicy UA_SecurityPolicy;

/**
 * SecurityPolicy Interface Definition
 * ----------------------------------- */

typedef struct {
    UA_String uri;

    /* Verifies the signature of the message using the provided keys in the context.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the key to verify
     *                       the supplied message with.
     * @param message the message to which the signature is supposed to belong.
     * @param signature the signature of the message, that should be verified. */
    UA_StatusCode (*verify)(const UA_SecurityPolicy *securityPolicy,
                            void *channelContext, const UA_ByteString *message,
                            const UA_ByteString *signature) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Signs the given message using this policys signing algorithm and the
     * provided keys in the context.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the key to sign
     *                       the supplied message with.
     * @param message the message to sign.
     * @param signature an output buffer to which the signature is written. The
     *                  buffer needs to be allocated by the caller. The
     *                  necessary size can be acquired with the signatureSize
     *                  attribute of this module. */
    UA_StatusCode (*sign)(const UA_SecurityPolicy *securityPolicy,
                          void *channelContext, const UA_ByteString *message,
                          UA_ByteString *signature) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Gets the signature size that depends on the local (private) key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext that contains the
     *                       certificate/key.
     * @return the size of the local signature. Returns 0 if no local
     *         certificate was set. */
    size_t (*getLocalSignatureSize)(const UA_SecurityPolicy *securityPolicy,
                                    const void *channelContext);

    /* Gets the signature size that depends on the remote (public) key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of the remote signature. Returns 0 if no
     *         remote certificate was set previousely. */
    size_t (*getRemoteSignatureSize)(const UA_SecurityPolicy *securityPolicy,
                                     const void *channelContext);

    /* Gets the local signing key length.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the signing key in bytes. Returns 0 if no length can be found.
     */
    size_t (*getLocalKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Gets the local signing key length.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the signing key in bytes. Returns 0 if no length can be found.
     */
    size_t (*getRemoteKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);
} UA_SecurityPolicySignatureAlgorithm;

typedef struct {
    UA_String uri;

    /* Encrypt the given data in place using an asymmetric algorithm and keys.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext which contains information about
     *                       the keys to encrypt data.
     * @param data the data that is encrypted. The encrypted data will overwrite
     *             the data that was supplied. */
    UA_StatusCode (*encrypt)(const UA_SecurityPolicy *securityPolicy,
                             void *channelContext,
                             UA_ByteString *data) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Decrypts the given ciphertext in place using an asymmetric algorithm and
     * key.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the channelContext which contains information about
     *                       the keys needed to decrypt the message.
     * @param data the data to decrypt. The decryption is done in place. */
    UA_StatusCode (*decrypt)(const UA_SecurityPolicy *securityPolicy,
                             void *channelContext,
                             UA_ByteString *data) UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Returns the length of the key used locally to encrypt messages in bits
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the local key. Returns 0 if no
     *         key length is known. */
    size_t (*getLocalKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Returns the length of the key used remotely to encrypt messages in bits
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the length of the remote key. Returns 0 if no
     *         key length is known. */
    size_t (*getRemoteKeyLength)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);

    /* Returns the size of encrypted blocks used by the local encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of encrypted blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getLocalBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                const void *channelContext);

    /* Returns the size of encrypted blocks used by the remote encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of encrypted blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getRemoteBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                 const void *channelContext);

    /* Returns the size of plaintext blocks used by the local encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of plaintext blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getLocalPlainTextBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                         const void *channelContext);

    /* Returns the size of plaintext blocks used by the remote encryption algorithm.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param channelContext the context to retrieve data from.
     * @return the size of plaintext blocks in bytes. Returns 0 if no key length is known.
     */
    size_t (*getRemotePlainTextBlockSize)(const UA_SecurityPolicy *securityPolicy,
                                          const void *channelContext);
} UA_SecurityPolicyEncryptionAlgorithm;

typedef struct {
    /* The algorithm used to sign and verify certificates. */
    UA_SecurityPolicySignatureAlgorithm signatureAlgorithm;

    /* The algorithm used to encrypt and decrypt messages. */
    UA_SecurityPolicyEncryptionAlgorithm encryptionAlgorithm;

} UA_SecurityPolicyCryptoModule;

typedef struct {
    /* Generates a thumbprint for the specified certificate.
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param certificate the certificate to make a thumbprint of.
     * @param thumbprint an output buffer for the resulting thumbprint. Always
     *                   has the length specified in the thumbprintLength in the
     *                   asymmetricModule. */
    UA_StatusCode (*makeCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                               const UA_ByteString *certificate,
                                               UA_ByteString *thumbprint)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Compares the supplied certificate with the certificate in the endpoit context.
     *
     * @param securityPolicy the policy data that contains the certificate
     *                       to compare to.
     * @param certificateThumbprint the certificate thumbprint to compare to the
     *                              one stored in the context.
     * @return if the thumbprints match UA_STATUSCODE_GOOD is returned. If they
     *         don't match or an error occurred an error code is returned. */
    UA_StatusCode (*compareCertificateThumbprint)(const UA_SecurityPolicy *securityPolicy,
                                                  const UA_ByteString *certificateThumbprint)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    UA_SecurityPolicyCryptoModule cryptoModule;
} UA_SecurityPolicyAsymmetricModule;

typedef struct {
    /* Pseudo random function that is used to generate the symmetric keys.
     *
     * For information on what parameters this function receives in what situation,
     * refer to the OPC UA specification 1.03 Part6 Table 33
     *
     * @param securityPolicy the securityPolicy the function is invoked on.
     * @param secret
     * @param seed
     * @param out an output to write the data to. The length defines the maximum
     *            number of output bytes that are produced. */
    UA_StatusCode (*generateKey)(const UA_SecurityPolicy *securityPolicy,
                                 const UA_ByteString *secret,
                                 const UA_ByteString *seed, UA_ByteString *out)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Random generator for generating nonces.
     *
     * @param securityPolicy the securityPolicy this function is invoked on.
     *                       Example: myPolicy->generateNonce(myPolicy,
     *                       &outBuff);
     * @param out pointer to a buffer to store the nonce in. Needs to be
     *            allocated by the caller. The buffer is filled with random
     *            data. */
    UA_StatusCode (*generateNonce)(const UA_SecurityPolicy *securityPolicy,
                                   UA_ByteString *out)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /*
     * The length of the nonce used in the SecureChannel as specified in the standard.
     */
    size_t secureChannelNonceLength;

    UA_SecurityPolicyCryptoModule cryptoModule;
} UA_SecurityPolicySymmetricModule;

typedef struct {
    /* This method creates a new context data object.
     *
     * The caller needs to call delete on the received object to free allocated
     * memory. Memory is only allocated if the function succeeds so there is no
     * need to manually free the memory pointed to by *channelContext or to
     * call delete in case of failure.
     *
     * @param securityPolicy the policy context of the endpoint that is connected
     *                       to. It will be stored in the channelContext for
     *                       further access by the policy.
     * @param remoteCertificate the remote certificate contains the remote
     *                          asymmetric key. The certificate will be verified
     *                          and then stored in the context so that its
     *                          details may be accessed.
     * @param channelContext the initialized channelContext that is passed to
     *                       functions that work on a context. */
    UA_StatusCode (*newContext)(const UA_SecurityPolicy *securityPolicy,
                                const UA_ByteString *remoteCertificate,
                                void **channelContext)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Deletes the the security context. */
    void (*deleteContext)(void *channelContext);

    /* Sets the local encrypting key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the local encrypting key to store in the context. */
    UA_StatusCode (*setLocalSymEncryptingKey)(void *channelContext,
                                              const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the local signing key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the local signing key to store in the context. */
    UA_StatusCode (*setLocalSymSigningKey)(void *channelContext,
                                           const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the local initialization vector in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param iv the local initialization vector to store in the context. */
    UA_StatusCode (*setLocalSymIv)(void *channelContext,
                                   const UA_ByteString *iv)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote encrypting key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the remote encrypting key to store in the context. */
    UA_StatusCode (*setRemoteSymEncryptingKey)(void *channelContext,
                                               const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote signing key in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param key the remote signing key to store in the context. */
    UA_StatusCode (*setRemoteSymSigningKey)(void *channelContext,
                                            const UA_ByteString *key)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Sets the remote initialization vector in the supplied context.
     *
     * @param channelContext the context to work on.
     * @param iv the remote initialization vector to store in the context. */
    UA_StatusCode (*setRemoteSymIv)(void *channelContext,
                                    const UA_ByteString *iv)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;

    /* Compares the supplied certificate with the certificate in the channel
     * context.
     *
     * @param channelContext the channel context data that contains the
     *                       certificate to compare to.
     * @param certificate the certificate to compare to the one stored in the context.
     * @return if the certificates match UA_STATUSCODE_GOOD is returned. If they
     *         don't match or an errror occurred an error code is returned. */
    UA_StatusCode (*compareCertificate)(const void *channelContext,
                                        const UA_ByteString *certificate)
    UA_FUNC_ATTR_WARN_UNUSED_RESULT;
} UA_SecurityPolicyChannelModule;

struct UA_SecurityPolicy {
    /* Additional data */
    void *policyContext;

    /* The policy uri that identifies the implemented algorithms */
    UA_ByteString policyUri;

    /* The local certificate is specific for each SecurityPolicy since it
     * depends on the used key length. */
    UA_ByteString localCertificate;

    /* Function pointers grouped into modules */
    UA_SecurityPolicyAsymmetricModule asymmetricModule;
    UA_SecurityPolicySymmetricModule symmetricModule;
    UA_SecurityPolicySignatureAlgorithm certificateSigningAlgorithm;
    UA_SecurityPolicyChannelModule channelModule;

    const UA_Logger *logger;

    /* Updates the ApplicationInstanceCertificate and the corresponding private
     * key at runtime. */
    UA_StatusCode (*updateCertificateAndPrivateKey)(UA_SecurityPolicy *policy,
                                                    const UA_ByteString newCertificate,
                                                    const UA_ByteString newPrivateKey);

    /* Deletes the dynamic content of the policy */
    void (*clear)(UA_SecurityPolicy *policy);
};

/* Gets the number of bytes that are needed by the encryption function in
 * addition to the length of the plaintext message. This is needed, since
 * most RSA encryption methods have their own padding mechanism included.
 * This makes the encrypted message larger than the plainText, so we need to
 * have enough room in the buffer for the overhead.
 *
 * @param securityPolicy the algorithms to use.
 * @param channelContext the retrieve data from.
 * @param maxEncryptionLength the maximum number of bytes that the data to
 *                            encrypt can be. */
size_t
UA_SecurityPolicy_getRemoteAsymEncryptionBufferLengthOverhead(const UA_SecurityPolicy *securityPolicy,
                                                              const void *channelContext,
                                                              size_t maxEncryptionLength);

/* Gets the a pointer to the context of a security policy supported by the
 * server matched by the security policy uri.
 *
 * @param server the server context.
 * @param securityPolicyUri the security policy to get the context of. */
UA_SecurityPolicy *
UA_SecurityPolicy_getSecurityPolicyByUri(const UA_Server *server,
                                         const UA_ByteString *securityPolicyUri);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/server_pubsub.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2017-2018 Fraunhofer IOSB (Author: Andreas Ebner)
 * Copyright (c) 2019 Kalycito Infotech Private Limited
 */

#ifndef UA_SERVER_PUBSUB_H
#define UA_SERVER_PUBSUB_H



_UA_BEGIN_DECLS

#ifdef UA_ENABLE_PUBSUB

/**
 * .. _pubsub:
 *
 * Publish/Subscribe
 * =================
 *
 * Work in progress!
 * This part will be a new chapter later.
 *

 * TODO: write general PubSub introduction












 *
 * The Publish/Subscribe (PubSub) extension for OPC UA enables fast and efficient
 * 1:m communication. The PubSub extension is protocol agnostic and can be used
 * with broker based protocols like MQTT and AMQP or brokerless implementations like UDP-Multicasting.
 *
 * The PubSub API uses the following scheme:
 *
 * 1. Create a configuration for the needed PubSub element.
 *
 * 2. Call the add[element] function and pass in the configuration.
 *
 * 3. The add[element] function returns the unique nodeId of the internally created element.
 *
 * Take a look on the PubSub Tutorials for mor details about the API usage.::
 *
 *  +-----------+
 *  | UA_Server |
 *  +-----------+
 *   |    |
 *   |    |
 *   |    |
 *   |    |  +----------------------+
 *   |    +--> UA_PubSubConnection  |  UA_Server_addPubSubConnection
 *   |       +----------------------+
 *   |        |    |
 *   |        |    |    +----------------+
 *   |        |    +----> UA_WriterGroup |  UA_PubSubConnection_addWriterGroup
 *   |        |         +----------------+
 *   |        |              |
 *   |        |              |    +------------------+
 *   |        |              +----> UA_DataSetWriter |  UA_WriterGroup_addDataSetWriter  +-+
 *   |        |                   +------------------+                                     |
 *   |        |                                                                            |
 *   |        |         +----------------+                                                 | r
 *   |        +---------> UA_ReaderGroup |                                                 | e
 *   |                  +----------------+                                                 | f
















 *   |                                                                                     |
 *   |       +---------------------------+                                                 |
 *   +-------> UA_PubSubPublishedDataSet |  UA_Server_addPublishedDataSet                <-+
 *           +---------------------------+
 *                 |
 *                 |    +-----------------+
 *                 +----> UA_DataSetField |  UA_PublishedDataSet_addDataSetField
 *                      +-----------------+
 *
 * PubSub compile flags
 * --------------------
 *
 * **UA_ENABLE_PUBSUB**
 *  Enable the experimental OPC UA PubSub support. The option will include the PubSub UDP multicast plugin. Disabled by default.
 * **UA_ENABLE_PUBSUB_DELTAFRAMES**
 *  The PubSub messages differentiate between keyframe (all published values contained) and deltaframe (only changed values contained) messages.
 *  Deltaframe messages creation consumes some additional ressources and can be disabled with this flag. Disabled by default.
 *  Compile the human-readable name of the StatusCodes into the binary. Disabled by default.


 * **UA_ENABLE_PUBSUB_INFORMATIONMODEL**
 *  Enable the information model representation of the PubSub configuration. For more details take a look at the following section `PubSub Information Model Representation`. Disabled by default.














 *
 * PubSub Information Model Representation
 * ---------------------------------------
 * .. _pubsub_informationmodel:
 *
 * The complete PubSub configuration is available inside the information model.
 * The entry point is the node 'PublishSubscribe, located under the Server node.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<















>














>
|
>
>
>
>
>
>
>
>
>
>
>
>













|
















|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|















>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>







30325
30326
30327
30328
30329
30330
30331











































































































































































































































































































































































































































































30332














30333
























































































































































































































































































































































































































































30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
} UA_ServerStatistics;

UA_ServerStatistics UA_EXPORT
UA_Server_getStatistics(UA_Server *server);

_UA_END_DECLS












































































































































































































































































































































































































































































#ifdef UA_ENABLE_PUBSUB














#endif


























































































































































































































































































































































































































































/*********************************** amalgamated original file "/open62541/include/open62541/server_pubsub.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2017-2018 Fraunhofer IOSB (Author: Andreas Ebner)
 * Copyright (c) 2019 Kalycito Infotech Private Limited
 */

#ifndef UA_SERVER_PUBSUB_H
#define UA_SERVER_PUBSUB_H



_UA_BEGIN_DECLS

#ifdef UA_ENABLE_PUBSUB

/**
 * .. _pubsub:
 *
 * Publish/Subscribe
 * =================
 *
 * Work in progress!
 * This part will be a new chapter later.
 *
 * In PubSub the participating OPC UA Applications take their roles as Publishers and Subscribers. Publishers are the
 * sources of data, while Subscribers consume that data. Communication in PubSub is message-based.
 * Publishers send messages to a Message Oriented Middleware, without knowledge of what, if any, Subscribers there may be.
 * Similarly, Subscribers express interest in specific types of data, and process messages that contain this data,
 * without knowledge of what Publishers there are.
 *
 * Message Oriented Middleware is software or hardware infrastructure that supports sending and receiving messages between distributed systems.
 * OPC UA PubSub supports two different Message Oriented Middleware variants, namely the broker-less form and broker-based form.
 * A broker-less form is where the Message Oriented Middleware is the network infrastructure that is able to route datagram-based messages.
 * Subscribers and Publishers use datagram protocols like UDP. In a broker-based form, the core component of the Message Oriented Middleware
 * is a message Broker. Subscribers and Publishers use standard messaging protocols like AMQP or MQTT to communicate with the Broker.
 *
 * This makes PubSub suitable for applications where location independence and/or scalability are required.
 *
 *
 * The Publish/Subscribe (PubSub) extension for OPC UA enables fast and efficient
 * 1:m communication. The PubSub extension is protocol agnostic and can be used
 * with broker based protocols like MQTT and AMQP or brokerless implementations like UDP-Multicasting.
 *
 * The PubSub API uses the following scheme:
 *
 * 1. Create a configuration for the needed PubSub element.
 *
 * 2. Call the add[element] function and pass in the configuration.
 *
 * 3. The add[element] function returns the unique nodeId of the internally created element.
 *
 * Take a look on the PubSub Tutorials for more details about the API usage.::
 *
 *  +-----------+
 *  | UA_Server |
 *  +-----------+
 *   |    |
 *   |    |
 *   |    |
 *   |    |  +----------------------+
 *   |    +--> UA_PubSubConnection  |  UA_Server_addPubSubConnection
 *   |       +----------------------+
 *   |        |    |
 *   |        |    |    +----------------+
 *   |        |    +----> UA_WriterGroup |  UA_PubSubConnection_addWriterGroup
 *   |        |         +----------------+
 *   |        |              |
 *   |        |              |    +------------------+
 *   |        |              +----> UA_DataSetWriter |  UA_WriterGroup_addDataSetWriter     +-+
 *   |        |                   +------------------+                                        |
 *   |        |                                                                               |
 *   |        |         +----------------+                                                    | r
 *   |        +---------> UA_ReaderGroup |    UA_PubSubConnection_addReaderGroup              | e
 *   |                  +----------------+                                                    | f
 *   |                       |                                                                |
 *   |                       |    +------------------+                                        |
 *   |                       +----> UA_DataSetReader |  UA_ReaderGroup_addDataSetReader       |
 *   |                            +------------------+                                        |
 *   |                                 |                                                      |
 *   |                                 |    +----------------------+                          |
 *   |                                 +----> UA_SubscribedDataSet |                          |
 *   |                                      +----------------------+                          |
 *   |                                           |                                            |
 *   |                                           |    +----------------------------+          |
 *   |                                           +----> UA_TargetVariablesDataType |          |
 *   |                                           |    +----------------------------+          |
 *   |                                           |                                            |
 *   |                                           |    +------------------------------------+  |
 *   |                                           +----> UA_SubscribedDataSetMirrorDataType |  |
 *   |                                                +------------------------------------+  |
 *   |                                                                                        |
 *   |       +---------------------------+                                                    |
 *   +-------> UA_PubSubPublishedDataSet |  UA_Server_addPublishedDataSet                   <-+
 *           +---------------------------+
 *                 |
 *                 |    +-----------------+
 *                 +----> UA_DataSetField |  UA_PublishedDataSet_addDataSetField
 *                      +-----------------+
 *
 * PubSub compile flags
 * --------------------
 *
 * **UA_ENABLE_PUBSUB**
 *  Enable the experimental OPC UA PubSub support. The option will include the PubSub UDP multicast plugin. Disabled by default.
 * **UA_ENABLE_PUBSUB_DELTAFRAMES**
 *  The PubSub messages differentiate between keyframe (all published values contained) and deltaframe (only changed values contained) messages.
 *  Deltaframe messages creation consumes some additional ressources and can be disabled with this flag. Disabled by default.
 *  Compile the human-readable name of the StatusCodes into the binary. Disabled by default.
 * **UA_ENABLE_PUBSUB_FILE_CONFIG**
 *  Enable loading OPC UA PubSub configuration from File/ByteString. Enabling PubSub informationmodel methods also will add a method to the Publish/Subscribe object which allows configuring PubSub at runtime.
 * **UA_ENABLE_PUBSUB_INFORMATIONMODEL**
 *  Enable the information model representation of the PubSub configuration. For more details take a look at the following section `PubSub Information Model Representation`. Disabled by default.
 * **UA_ENABLE_PUBSUB_MONITORING**
 *  Enable the experimental PubSub monitoring. This feature provides a basic framework to implement monitoring/timeout checks for PubSub components. 
 *  Initially the MessageReceiveTimeout check of a DataSetReader is provided. It uses the internal server callback implementation.
 *  The monitoring backend can be changed by the application to satisfy realtime requirements.
 *  Disabled by default.
 * **UA_ENABLE_PUBSUB_ETH_UADP**
 *  Enable the OPC UA Ethernet PubSub support to transport UADP NetworkMessages as payload of Ethernet II frame without IP or UDP headers. This option will include Publish and Subscribe based on
 *  EtherType B62C. Disabled by default.
 * **UA_ENABLE_PUBSUB_ETH_UADP_ETF**
 *  Enable ETF feature to allow the user to transmit packets at calculated transmission time with nanosecond precision, in addition to the PubSub support to transport UADP NetworkMessages as payload of Ethernet II frame.
 *  Disabled by default.
 * **UA_ENABLE_PUBSUB_ETH_UADP_XDP**
 *  Enable XDP feature to allow the user to receive packets using the eXpress Data Path (XDP), which bypasses TCP/IP layers and transfers the frames from hardware/netdev to user application thereby reducing the receiving time,
 *  in addition to the PubSub support to transport UADP NetworkMessages as payload of Ethernet II frame. Disabled by default.
 *
 * PubSub Information Model Representation
 * ---------------------------------------
 * .. _pubsub_informationmodel:
 *
 * The complete PubSub configuration is available inside the information model.
 * The entry point is the node 'PublishSubscribe, located under the Server node.
28160
28161
28162
28163
28164
28165
28166








28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194





28195

28196





















28197

28198







28199



28200
28201









28202


28203
28204
28205
28206
28207
28208
28209
28210
 * The PubSub connections are the abstraction between the concrete transport protocol
 * and the PubSub functionality. It is possible to create multiple connections with
 * different transport protocols at runtime.
 *
 * Take a look on the PubSub Tutorials for mor details about the API usage.
 */









typedef enum {
    UA_PUBSUB_PUBLISHERID_NUMERIC,
    UA_PUBSUB_PUBLISHERID_STRING
} UA_PublisherIdType;

#ifdef UA_ENABLE_PUBSUB_ETH_UADP_ETF
typedef struct {
    UA_Int32 socketPriority;
    UA_Boolean sotxtimeEnabled;
    /* SO_TXTIME-specific additional socket config */
    UA_Int32 sotxtimeDeadlinemode;
    UA_Int32 sotxtimeReceiveerrors;
} UA_ETFConfiguration;
#endif

typedef struct {
    UA_String name;
    UA_Boolean enabled;
    UA_PublisherIdType publisherIdType;
    union { /* std: valid types UInt or String */
        UA_UInt32 numeric;
        UA_String string;
    } publisherId;
    UA_String transportProfileUri;
    UA_Variant address;
    size_t connectionPropertiesSize;
    UA_KeyValuePair *connectionProperties;
    UA_Variant connectionTransportSettings;







    /* This flag is 'read only' and is set internally based on the PubSub state. */





















    UA_Boolean configurationFrozen;









#ifdef UA_ENABLE_PUBSUB_ETH_UADP_ETF



    /* ETF related connection configuration - Not in PubSub specfication */
    UA_ETFConfiguration etfConfiguration;









#endif


} UA_PubSubConnectionConfig;

UA_StatusCode UA_EXPORT
UA_Server_addPubSubConnection(UA_Server *server,
                              const UA_PubSubConnectionConfig *connectionConfig,
                              UA_NodeId *connectionIdentifier);

/* Returns a deep copy of the config */







>
>
>
>
>
>
>
>















|












>
>
>
>
>

>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>

>
>
>
>
>
>
>
|
>
>
>
|
|
>
>
>
>
>
>
>
>
>
|
>
>
|







30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
 * The PubSub connections are the abstraction between the concrete transport protocol
 * and the PubSub functionality. It is possible to create multiple connections with
 * different transport protocols at runtime.
 *
 * Take a look on the PubSub Tutorials for mor details about the API usage.
 */

typedef enum  {
    UA_PUBSUB_COMPONENT_CONNECTION,
    UA_PUBSUB_COMPONENT_WRITERGROUP,
    UA_PUBSUB_COMPONENT_DATASETWRITER,
    UA_PUBSUB_COMPONENT_READERGROUP,
    UA_PUBSUB_COMPONENT_DATASETREADER
} UA_PubSubComponentEnumType;

typedef enum {
    UA_PUBSUB_PUBLISHERID_NUMERIC,
    UA_PUBSUB_PUBLISHERID_STRING
} UA_PublisherIdType;

#ifdef UA_ENABLE_PUBSUB_ETH_UADP_ETF
typedef struct {
    UA_Int32 socketPriority;
    UA_Boolean sotxtimeEnabled;
    /* SO_TXTIME-specific additional socket config */
    UA_Int32 sotxtimeDeadlinemode;
    UA_Int32 sotxtimeReceiveerrors;
} UA_ETFConfiguration;
#endif

struct UA_PubSubConnectionConfig {
    UA_String name;
    UA_Boolean enabled;
    UA_PublisherIdType publisherIdType;
    union { /* std: valid types UInt or String */
        UA_UInt32 numeric;
        UA_String string;
    } publisherId;
    UA_String transportProfileUri;
    UA_Variant address;
    size_t connectionPropertiesSize;
    UA_KeyValuePair *connectionProperties;
    UA_Variant connectionTransportSettings;
#ifdef UA_ENABLE_PUBSUB_ETH_UADP_ETF
    /* ETF related connection configuration - Not in PubSub specfication */
    UA_ETFConfiguration etfConfiguration;
#endif
};

#ifdef UA_ENABLE_PUBSUB_MONITORING

typedef enum {
    UA_PUBSUB_MONITORING_MESSAGE_RECEIVE_TIMEOUT
    // extend as needed
} UA_PubSubMonitoringType;

/* PubSub monitoring interface */
typedef struct {
    UA_StatusCode (*createMonitoring)(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, 
                                      UA_PubSubMonitoringType eMonitoringType, void *data, UA_ServerCallback callback);
    UA_StatusCode (*startMonitoring)(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, 
                                     UA_PubSubMonitoringType eMonitoringType, void *data);
    UA_StatusCode (*stopMonitoring)(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, 
                                    UA_PubSubMonitoringType eMonitoringType, void *data);
    UA_StatusCode (*updateMonitoringInterval)(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, 
                                              UA_PubSubMonitoringType eMonitoringType, void *data);
    UA_StatusCode (*deleteMonitoring)(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, 
                                      UA_PubSubMonitoringType eMonitoringType, void *data);
} UA_PubSubMonitoringInterface;

#endif /* UA_ENABLE_PUBSUB_MONITORING */

/* General PubSub configuration */
struct UA_PubSubConfiguration {

    /* Callback for PubSub component state changes:
    If provided this callback informs the application about PubSub component state changes. 
    E.g. state change from operational to error in case of a DataSetReader MessageReceiveTimeout.
    The status code provides additional information. */
    void (*pubsubStateChangeCallback)(UA_NodeId *Id,
                                      UA_PubSubState state,
                                      UA_StatusCode status);// TODO: maybe status code provides not enough information about the state change
#ifdef UA_ENABLE_PUBSUB_MONITORING
    UA_PubSubMonitoringInterface monitoringInterface;
#endif /* UA_ENABLE_PUBSUB_MONITORING */
};


/**
 * The UA_ServerConfig_addPubSubTransportLayer is used to add a transport layer
 * to the server configuration. The list memory is allocated and will be freed
 * with UA_PubSubManager_delete.
 *
 * .. note:: If the UA_String transportProfileUri was dynamically allocated
 *           the memory has to be freed when no longer required.
 *
 * .. note:: This has to be done before the server is started with UA_Server_run. */

UA_StatusCode UA_EXPORT
UA_ServerConfig_addPubSubTransportLayer(UA_ServerConfig *config,
                                        UA_PubSubTransportLayer *pubsubTransportLayer);

UA_StatusCode UA_EXPORT
UA_Server_addPubSubConnection(UA_Server *server,
                              const UA_PubSubConnectionConfig *connectionConfig,
                              UA_NodeId *connectionIdentifier);

/* Returns a deep copy of the config */
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
    union {
        /* The UA_PUBSUB_DATASET_PUBLISHEDITEMS has currently no additional members
         * and thus no dedicated config structure.*/
        UA_PublishedDataItemsTemplateConfig itemsTemplate;
        UA_PublishedEventConfig event;
        UA_PublishedEventTemplateConfig eventTemplate;
    } config;
    /* This flag is 'read only' and is set internally based on the PubSub state. */
    UA_Boolean configurationFrozen;
} UA_PublishedDataSetConfig;

void UA_EXPORT
UA_PublishedDataSetConfig_clear(UA_PublishedDataSetConfig *pdsConfig);

typedef struct {
    UA_StatusCode addResult;







<
<







30641
30642
30643
30644
30645
30646
30647


30648
30649
30650
30651
30652
30653
30654
    union {
        /* The UA_PUBSUB_DATASET_PUBLISHEDITEMS has currently no additional members
         * and thus no dedicated config structure.*/
        UA_PublishedDataItemsTemplateConfig itemsTemplate;
        UA_PublishedEventConfig event;
        UA_PublishedEventTemplateConfig eventTemplate;
    } config;


} UA_PublishedDataSetConfig;

void UA_EXPORT
UA_PublishedDataSetConfig_clear(UA_PublishedDataSetConfig *pdsConfig);

typedef struct {
    UA_StatusCode addResult;
28312
28313
28314
28315
28316
28317
28318

28319







28320
28321


28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
 * handling process. */

typedef struct{
    UA_ConfigurationVersionDataType configurationVersion;
    UA_String fieldNameAlias;
    UA_Boolean promotedField;
    UA_PublishedVariableDataType publishParameters;

    /* non std. field */







    UA_Boolean staticValueSourceEnabled;
    UA_DataValue staticValueSource;


} UA_DataSetVariableConfig;

typedef enum {
    UA_PUBSUB_DATASETFIELD_VARIABLE,
    UA_PUBSUB_DATASETFIELD_EVENT
} UA_DataSetFieldType;

typedef struct {
    UA_DataSetFieldType dataSetFieldType;
    union {
        /* events need other config later */
        UA_DataSetVariableConfig variable;
    } field;
    /* This flag is 'read only' and is set internally based on the PubSub state. */
    UA_Boolean configurationFrozen;
} UA_DataSetFieldConfig;

void UA_EXPORT
UA_DataSetFieldConfig_clear(UA_DataSetFieldConfig *dataSetFieldConfig);

typedef struct {
    UA_StatusCode result;







>

>
>
>
>
>
>
>
|
|
>
>













<
<







30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719


30720
30721
30722
30723
30724
30725
30726
 * handling process. */

typedef struct{
    UA_ConfigurationVersionDataType configurationVersion;
    UA_String fieldNameAlias;
    UA_Boolean promotedField;
    UA_PublishedVariableDataType publishParameters;

    /* non std. field */
    struct {
        UA_Boolean rtFieldSourceEnabled;
        /* If the rtInformationModelNode is set, the nodeid in publishParameter must point
         * to a node with external data source backend defined
         * */
        UA_Boolean rtInformationModelNode;
        //TODO -> decide if suppress C++ warnings and use 'UA_DataValue * * const staticValueSource;'
        UA_DataValue ** staticValueSource;
    } rtValueSource;


} UA_DataSetVariableConfig;

typedef enum {
    UA_PUBSUB_DATASETFIELD_VARIABLE,
    UA_PUBSUB_DATASETFIELD_EVENT
} UA_DataSetFieldType;

typedef struct {
    UA_DataSetFieldType dataSetFieldType;
    union {
        /* events need other config later */
        UA_DataSetVariableConfig variable;
    } field;


} UA_DataSetFieldConfig;

void UA_EXPORT
UA_DataSetFieldConfig_clear(UA_DataSetFieldConfig *dataSetFieldConfig);

typedef struct {
    UA_StatusCode result;
28354
28355
28356
28357
28358
28359
28360



















28361
28362
28363
28364
28365
28366
28367
UA_StatusCode UA_EXPORT
UA_Server_getDataSetFieldConfig(UA_Server *server, const UA_NodeId dsf,
                                UA_DataSetFieldConfig *config);

UA_DataSetFieldResult UA_EXPORT
UA_Server_removeDataSetField(UA_Server *server, const UA_NodeId dsf);




















/**
 * WriterGroup
 * -----------
 * All WriterGroups are created within a PubSubConnection and automatically
 * deleted if the connection is removed. The WriterGroup is primary used as
 * container for :ref:`dsw` and network message settings. The WriterGroup can be
 * imagined as producer of the network messages. The creation of network







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
UA_StatusCode UA_EXPORT
UA_Server_getDataSetFieldConfig(UA_Server *server, const UA_NodeId dsf,
                                UA_DataSetFieldConfig *config);

UA_DataSetFieldResult UA_EXPORT
UA_Server_removeDataSetField(UA_Server *server, const UA_NodeId dsf);

/**
 * Custom Callback Implementation
 * ----------------------------
 * The user can use his own callback implementation for publishing
 * and subscribing. The user must take care of the callback to call for
 * every publishing or subscibing interval */

typedef struct {
    UA_StatusCode (*addCustomCallback)(UA_Server *server, UA_NodeId identifier,
                                       UA_ServerCallback callback,
                                       void *data, UA_Double interval_ms, UA_UInt64 *callbackId);

    UA_StatusCode (*changeCustomCallbackInterval)(UA_Server *server, UA_NodeId identifier,
                                                  UA_UInt64 callbackId, UA_Double interval_ms);

    void (*removeCustomCallback)(UA_Server *server, UA_NodeId identifier, UA_UInt64 callbackId);

} UA_PubSub_CallbackLifecycle;

/**
 * WriterGroup
 * -----------
 * All WriterGroups are created within a PubSubConnection and automatically
 * deleted if the connection is removed. The WriterGroup is primary used as
 * container for :ref:`dsw` and network message settings. The WriterGroup can be
 * imagined as producer of the network messages. The creation of network
28418
28419
28420
28421
28422
28423
28424
28425

28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
    UA_Byte priority;
    UA_MessageSecurityMode securityMode;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t groupPropertiesSize;
    UA_KeyValuePair *groupProperties;
    UA_PubSubEncodingType encodingMimeType;


    /* non std. config parameter. maximum count of embedded DataSetMessage in
     * one NetworkMessage */
    UA_UInt16 maxEncapsulatedDataSetMessageCount;
    /* This flag is 'read only' and is set internally based on the PubSub state. */
    UA_Boolean configurationFrozen;
    /* non std. field */
    UA_PubSubRTLevel rtLevel;
} UA_WriterGroupConfig;

void UA_EXPORT
UA_WriterGroupConfig_clear(UA_WriterGroupConfig *writerGroupConfig);








|
>



<
<







30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831


30832
30833
30834
30835
30836
30837
30838
    UA_Byte priority;
    UA_MessageSecurityMode securityMode;
    UA_ExtensionObject transportSettings;
    UA_ExtensionObject messageSettings;
    size_t groupPropertiesSize;
    UA_KeyValuePair *groupProperties;
    UA_PubSubEncodingType encodingMimeType;
    /* PubSub Manager Callback */
    UA_PubSub_CallbackLifecycle pubsubManagerCallback;
    /* non std. config parameter. maximum count of embedded DataSetMessage in
     * one NetworkMessage */
    UA_UInt16 maxEncapsulatedDataSetMessageCount;


    /* non std. field */
    UA_PubSubRTLevel rtLevel;
} UA_WriterGroupConfig;

void UA_EXPORT
UA_WriterGroupConfig_clear(UA_WriterGroupConfig *writerGroupConfig);

28446
28447
28448
28449
28450
28451
28452





28453
28454
28455
28456
28457
28458
28459
UA_Server_getWriterGroupConfig(UA_Server *server, const UA_NodeId writerGroup,
                               UA_WriterGroupConfig *config);

UA_StatusCode UA_EXPORT
UA_Server_updateWriterGroupConfig(UA_Server *server, UA_NodeId writerGroupIdentifier,
                                  const UA_WriterGroupConfig *config);






UA_StatusCode UA_EXPORT
UA_Server_removeWriterGroup(UA_Server *server, const UA_NodeId writerGroup);

UA_StatusCode UA_EXPORT
UA_Server_freezeWriterGroupConfiguration(UA_Server *server, const UA_NodeId writerGroup);

UA_StatusCode UA_EXPORT







>
>
>
>
>







30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
UA_Server_getWriterGroupConfig(UA_Server *server, const UA_NodeId writerGroup,
                               UA_WriterGroupConfig *config);

UA_StatusCode UA_EXPORT
UA_Server_updateWriterGroupConfig(UA_Server *server, UA_NodeId writerGroupIdentifier,
                                  const UA_WriterGroupConfig *config);

/* Get state of WriterGroup */
UA_StatusCode UA_EXPORT
UA_Server_WriterGroup_getState(UA_Server *server, UA_NodeId writerGroupIdentifier,
                               UA_PubSubState *state);

UA_StatusCode UA_EXPORT
UA_Server_removeWriterGroup(UA_Server *server, const UA_NodeId writerGroup);

UA_StatusCode UA_EXPORT
UA_Server_freezeWriterGroupConfiguration(UA_Server *server, const UA_NodeId writerGroup);

UA_StatusCode UA_EXPORT
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_UInt32 keyFrameCount;
    UA_ExtensionObject messageSettings;
    UA_ExtensionObject transportSettings;
    UA_String dataSetName;
    size_t dataSetWriterPropertiesSize;
    UA_KeyValuePair *dataSetWriterProperties;
    /* This flag is 'read only' and is set internally based on the PubSub state. */
    UA_Boolean configurationFrozen;
} UA_DataSetWriterConfig;

void UA_EXPORT
UA_DataSetWriterConfig_clear(UA_DataSetWriterConfig *pdsConfig);

/* Add a new DataSetWriter to a existing WriterGroup. The DataSetWriter must be
 * coupled with a PublishedDataSet on creation.







<
<







30888
30889
30890
30891
30892
30893
30894


30895
30896
30897
30898
30899
30900
30901
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_UInt32 keyFrameCount;
    UA_ExtensionObject messageSettings;
    UA_ExtensionObject transportSettings;
    UA_String dataSetName;
    size_t dataSetWriterPropertiesSize;
    UA_KeyValuePair *dataSetWriterProperties;


} UA_DataSetWriterConfig;

void UA_EXPORT
UA_DataSetWriterConfig_clear(UA_DataSetWriterConfig *pdsConfig);

/* Add a new DataSetWriter to a existing WriterGroup. The DataSetWriter must be
 * coupled with a PublishedDataSet on creation.
28506
28507
28508
28509
28510
28511
28512

28513




28514
28515
28516





















































28517
28518
28519
28520
28521
28522

28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543



28544


28545
28546
28547
28548
28549
28550

28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571

28572
28573







28574
28575
28576
28577
28578




28579
28580
28581
28582
28583
28584
28585
                           UA_NodeId *writerIdentifier);

/* Returns a deep copy of the config */
UA_StatusCode UA_EXPORT
UA_Server_getDataSetWriterConfig(UA_Server *server, const UA_NodeId dsw,
                                 UA_DataSetWriterConfig *config);


UA_StatusCode UA_EXPORT




UA_Server_removeDataSetWriter(UA_Server *server, const UA_NodeId dsw);

/**





















































 * DataSetReader
 * -------------
 * DataSetReader can receive NetworkMessages with the DataSet
 * of interest sent by the Publisher. DataSetReaders represent
 * the configuration necessary to receive and process DataSetMessages
 * on the Subscriber side */


/* Parameters for PubSubSecurity */
typedef struct {
    UA_Int32 securityMode;          /* placeholder datatype 'MessageSecurityMode' */
    UA_String securityGroupId;
    size_t keyServersSize;
    UA_Int32 *keyServers;
} UA_PubSubSecurityParameters;

/* Parameters for PubSub DataSetReader Configuration */
typedef struct {
    UA_String name;
    UA_Variant publisherId;
    UA_UInt16 writerGroupId;
    UA_UInt16 dataSetWriterId;
    UA_DataSetMetaDataType dataSetMetaData;
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_Double messageReceiveTimeout;
    UA_PubSubSecurityParameters securityParameters;
    UA_UadpDataSetReaderMessageDataType messageSettings;
    UA_ExtensionObject transportSettings;



    UA_TargetVariablesDataType subscribedDataSetTarget;


} UA_DataSetReaderConfig;

/* Update configuration to the dataSetReader */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_updateConfig(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
                                   UA_NodeId readerGroupIdentifier, const UA_DataSetReaderConfig *config);


/* Get configuration of the dataSetReader */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_getConfig(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
                                 UA_DataSetReaderConfig *config);

/* Return Status Code after creating TargetVariables in Subscriber AddressSpace
 * TargetVariables define a list of variable mappings between received DataSet fields
 * and the TargetVariables in the Subscriber AddressSpace */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_createTargetVariables(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
                                             UA_TargetVariablesDataType* targetVariables);

/* To Do:Implementation of SubscribedDataSetMirrorType
 * UA_StatusCode
 * A_PubSubDataSetReader_createDataSetMirror(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
 * UA_SubscribedDataSetMirrorDataType* mirror) */

/**
 * ReaderGroup
 * -----------

 * All ReaderGroups are created within a PubSubConnection and automatically
 * deleted if the connection is removed. */








/* ReaderGroup configuration */
typedef struct {
    UA_String name;
    UA_PubSubSecurityParameters securityParameters;




} UA_ReaderGroupConfig;

/* Add DataSetReader to the ReaderGroup */
UA_StatusCode UA_EXPORT
UA_Server_addDataSetReader(UA_Server *server, UA_NodeId readerGroupIdentifier,
                                      const UA_DataSetReaderConfig *dataSetReaderConfig,
                                      UA_NodeId *readerIdentifier);







>

>
>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|


|
>



















|

>
>
>
|
>
>





|
>




|

<
|
<

|
<
|
<
<
<
<




>
|
|
>
>
>
>
>
>
>





>
>
>
>







30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025

31026

31027
31028

31029




31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
                           UA_NodeId *writerIdentifier);

/* Returns a deep copy of the config */
UA_StatusCode UA_EXPORT
UA_Server_getDataSetWriterConfig(UA_Server *server, const UA_NodeId dsw,
                                 UA_DataSetWriterConfig *config);

/* Get state of DataSetWriter */
UA_StatusCode UA_EXPORT
UA_Server_DataSetWriter_getState(UA_Server *server, UA_NodeId dataSetWriterIdentifier,
                               UA_PubSubState *state);

UA_StatusCode UA_EXPORT
UA_Server_removeDataSetWriter(UA_Server *server, const UA_NodeId dsw);

/**
 * SubscribedDataSet
 * -----------------
 * SubscribedDataSet describes the processing of the received DataSet. SubscribedDataSet defines which field
 * in the DataSet is mapped to which Variable in the OPC UA Application. SubscribedDataSet has two sub-types
 * called the TargetVariablesType and SubscribedDataSetMirrorType.
 * SubscribedDataSetMirrorType is currently not supported. SubscribedDataSet is set to TargetVariablesType
 * and then the list of target Variables are created in the Subscriber AddressSpace.
 * TargetVariables are a list of variables that are to be added in the Subscriber AddressSpace.
 * It defines a list of Variable mappings between received DataSet fields and added Variables
 * in the Subscriber AddressSpace. */

/* SubscribedDataSetDataType Definition */
typedef enum {
    UA_PUBSUB_SDS_TARGET,
    UA_PUBSUB_SDS_MIRROR
} UA_SubscribedDataSetEnumType;

typedef struct {
    /* Standard-defined FieldTargetDataType */
    UA_FieldTargetDataType targetVariable;

    /* If realtime-handling is required, set this pointer non-NULL and it will be used
     * to memcpy the value instead of using the Write service.
     * If the afterWrite method pointer is set, it will be called after a memcpy update
     * to the value. */
    UA_DataValue **externalDataValue;
    void *targetVariableContext; /* user-defined pointer */
    void (*afterWrite)(UA_Server *server,
                       const UA_NodeId *readerIdentifier,
                       const UA_NodeId *readerGroupIdentifier,
                       const UA_NodeId *targetVariableIdentifier,
                       void *targetVariableContext,
                       UA_DataValue **externalDataValue);
} UA_FieldTargetVariable;

typedef struct {
    size_t targetVariablesSize;
    UA_FieldTargetVariable *targetVariables;
} UA_TargetVariables;

/* Return Status Code after creating TargetVariables in Subscriber AddressSpace */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_createTargetVariables(UA_Server *server,
                                              UA_NodeId dataSetReaderIdentifier,
                                              size_t targetVariablesSize,
                                              const UA_FieldTargetVariable *targetVariables);

/* To Do:Implementation of SubscribedDataSetMirrorType
 * UA_StatusCode
 * A_PubSubDataSetReader_createDataSetMirror(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
 * UA_SubscribedDataSetMirrorDataType* mirror) */

/**
 * DataSetReader
 * -------------
 * DataSetReader can receive NetworkMessages with the DataSetMessage
 * of interest sent by the Publisher. DataSetReaders represent
 * the configuration necessary to receive and process DataSetMessages
 * on the Subscriber side. DataSetReader must be linked with a
 * SubscribedDataSet and be contained within a ReaderGroup. */

/* Parameters for PubSubSecurity */
typedef struct {
    UA_Int32 securityMode;          /* placeholder datatype 'MessageSecurityMode' */
    UA_String securityGroupId;
    size_t keyServersSize;
    UA_Int32 *keyServers;
} UA_PubSubSecurityParameters;

/* Parameters for PubSub DataSetReader Configuration */
typedef struct {
    UA_String name;
    UA_Variant publisherId;
    UA_UInt16 writerGroupId;
    UA_UInt16 dataSetWriterId;
    UA_DataSetMetaDataType dataSetMetaData;
    UA_DataSetFieldContentMask dataSetFieldContentMask;
    UA_Double messageReceiveTimeout;
    UA_PubSubSecurityParameters securityParameters;
    UA_ExtensionObject messageSettings;
    UA_ExtensionObject transportSettings;
    UA_SubscribedDataSetEnumType subscribedDataSetType;
    /* TODO UA_SubscribedDataSetMirrorDataType subscribedDataSetMirror */
    union {
        UA_TargetVariables subscribedDataSetTarget;
        // UA_SubscribedDataSetMirrorDataType subscribedDataSetMirror;
    } subscribedDataSet;
} UA_DataSetReaderConfig;

/* Update configuration to the dataSetReader */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_updateConfig(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
                                     UA_NodeId readerGroupIdentifier,
                                     const UA_DataSetReaderConfig *config);

/* Get configuration of the dataSetReader */
UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_getConfig(UA_Server *server, UA_NodeId dataSetReaderIdentifier,
                                  UA_DataSetReaderConfig *config);


/* Get state of DataSetReader */

UA_StatusCode UA_EXPORT
UA_Server_DataSetReader_getState(UA_Server *server, UA_NodeId dataSetReaderIdentifier,

                               UA_PubSubState *state);





/**
 * ReaderGroup
 * -----------
 * ReaderGroup is used to group a list of DataSetReaders. All ReaderGroups are
 * created within a PubSubConnection and automatically deleted if the connection
 * is removed. All network message related filters are only available in the DataSetReader.
 *
 * The RT-levels go along with different requirements. The below listed levels can be configured
 * for a ReaderGroup.
 * UA_PUBSUB_RT_NONE --> No RT applied to this level
 * PUBSUB_CONFIG_FASTPATH_FIXED_OFFSETS --> Extends PubSub RT functionality and implements fast path
 * message decoding in the Subscriber. Uses a buffered network message and only decodes the necessary
 * offsets stored in an offset buffer. */

/* ReaderGroup configuration */
typedef struct {
    UA_String name;
    UA_PubSubSecurityParameters securityParameters;
    /* PubSub Manager Callback */
    UA_PubSub_CallbackLifecycle pubsubManagerCallback;
    /* non std. field */
    UA_PubSubRTLevel rtLevel;
} UA_ReaderGroupConfig;

/* Add DataSetReader to the ReaderGroup */
UA_StatusCode UA_EXPORT
UA_Server_addDataSetReader(UA_Server *server, UA_NodeId readerGroupIdentifier,
                                      const UA_DataSetReaderConfig *dataSetReaderConfig,
                                      UA_NodeId *readerIdentifier);
28595
28596
28597
28598
28599
28600
28601





28602
28603
28604
28605
28606
28607
28608
28609
28610
28611












28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624









28625

28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
 */

/* Get configuraiton of ReaderGroup */
UA_StatusCode UA_EXPORT
UA_Server_ReaderGroup_getConfig(UA_Server *server, UA_NodeId readerGroupIdentifier,
                               UA_ReaderGroupConfig *config);






/* Add ReaderGroup to the created connection */
UA_StatusCode UA_EXPORT
UA_Server_addReaderGroup(UA_Server *server, UA_NodeId connectionIdentifier,
                                   const UA_ReaderGroupConfig *readerGroupConfig,
                                   UA_NodeId *readerGroupIdentifier);

/* Remove ReaderGroup from connection */
UA_StatusCode UA_EXPORT
UA_Server_removeReaderGroup(UA_Server *server, UA_NodeId groupIdentifier);













#endif /* UA_ENABLE_PUBSUB */

_UA_END_DECLS

#endif /* UA_SERVER_PUBSUB_H */

/*********************************** amalgamated original file "/open62541/include/open62541/plugin/pubsub.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2017-2018 Fraunhofer IOSB (Author: Andreas Ebner)









 */




_UA_BEGIN_DECLS

#ifdef UA_ENABLE_PUBSUB

/**
 * .. _pubsub_connection:
 *
 * PubSub Connection Plugin API
 * ============================
 *
 * The PubSub Connection API is the interface between concrete network
 * implementations and the internal pubsub code.
 *
 * The PubSub specification enables the creation of new connections on runtime.
 * Wording: 'Connection' -> OPC UA standard 'highlevel' perspective, 'Channel'
 * -> open62541 implementation 'lowlevel' perspective. A channel can be assigned
 * with different network implementations like UDP, MQTT, AMQP. The channel
 * provides basis services like send, regist, unregist, receive, close. */

typedef enum {
    UA_PUBSUB_CHANNEL_RDY,
    UA_PUBSUB_CHANNEL_PUB,
    UA_PUBSUB_CHANNEL_SUB,
    UA_PUBSUB_CHANNEL_PUB_SUB,
    UA_PUBSUB_CHANNEL_ERROR,
    UA_PUBSUB_CHANNEL_CLOSED
} UA_PubSubChannelState;

struct UA_PubSubChannel;
typedef struct UA_PubSubChannel UA_PubSubChannel;

/* Interface structure between network plugin and internal implementation */
struct UA_PubSubChannel {
    UA_UInt32 publisherId; /* unique identifier */
    UA_PubSubChannelState state;
    UA_PubSubConnectionConfig *connectionConfig; /* link to parent connection config */
    UA_SOCKET sockfd;
    void *handle; /* implementation specific data */
    /*@info for handle: each network implementation should provide an structure
    * UA_PubSubChannelData[ImplementationName] This structure can be used by the
    * network implementation to store network implementation specific data.*/

    /* Sending out the content of the buf parameter */
    UA_StatusCode (*send)(UA_PubSubChannel *channel, UA_ExtensionObject *transportSettings,
                          const UA_ByteString *buf);

    /* Register to an specified message source, e.g. multicast group or topic. Callback is used for mqtt. */
    UA_StatusCode (*regist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings,
        void (*callback)(UA_ByteString *encodedBuffer, UA_ByteString *topic));

    /* Remove subscription to an specified message source, e.g. multicast group or topic */
    UA_StatusCode (*unregist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings);

    /* Receive messages. A regist to the message source is needed before. */
    UA_StatusCode (*receive)(UA_PubSubChannel * channel, UA_ByteString *,
                             UA_ExtensionObject *transportSettings, UA_UInt32 timeout);

    /* Closing the connection and implicit free of the channel structures. */
    UA_StatusCode (*close)(UA_PubSubChannel *channel);

    /* Giving the connection protocoll time to process inbound and outbound traffic. */
    UA_StatusCode (*yield)(UA_PubSubChannel *channel, UA_UInt16 timeout);
};

/**
 * The UA_PubSubTransportLayer is used for the creation of new connections.
 * Whenever on runtime a new connection is request, the internal PubSub
 * implementation call * the 'createPubSubChannel' function. The
 * 'transportProfileUri' contains the standard defined transport profile
 * information and is used to identify the type of connections which can be
 * created by the TransportLayer. The server config contains a list of
 * UA_PubSubTransportLayer. Take a look in the tutorial_pubsub_connection to get
 * informations about the TransportLayer handling. */

typedef struct {
    UA_String transportProfileUri;
    UA_PubSubChannel *(*createPubSubChannel)(UA_PubSubConnectionConfig *connectionConfig);
} UA_PubSubTransportLayer;

/**
 * The UA_ServerConfig_addPubSubTransportLayer is used to add a transport layer
 * to the server configuration. The list memory is allocated and will be freed
 * with UA_PubSubManager_delete.
 *
 * .. note:: If the UA_String transportProfileUri was dynamically allocated
 *           the memory has to be freed when no longer required.
 *
 * .. note:: This has to be done before the server is started with UA_Server_run. */
UA_StatusCode UA_EXPORT
UA_ServerConfig_addPubSubTransportLayer(UA_ServerConfig *config,
                                        UA_PubSubTransportLayer *pubsubTransportLayer);

#endif /* UA_ENABLE_PUBSUB */

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/deps/ziptree.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
 *
 *    Copyright 2018 (c) Julius Pfrommer
 */


#ifdef __cplusplus
extern "C" {
#endif

/* Reusable zip tree implementation. The style is inspired by the BSD
 * sys/queue.h linked list definition.
 *
 * Zip trees were developed in: Tarjan, R. E., Levy, C. C., and Timmel, S. "Zip
 * Trees." arXiv preprint arXiv:1806.06726 (2018). The original definition was
 * modified so that several elements with the same key can be inserted. However,
 * ZIP_FIND will only return the topmost of these elements in the tree.
 *
 * The ZIP_ENTRY definitions are to be contained in the tree entries themselves.
 * Use ZIP_PROTTYPE to define the signature of the zip tree and ZIP_IMPL (in a
 * .c compilation unit) for the method implementations.
 *
 * Zip trees are a probabilistic data structure. Entries are assigned a
 * (nonzero) rank k with probability 1/2^{k+1}. This header file does not assume
 * a specific random number generator. So the rank must be given when an entry
 * is inserted. A fast way (with a single call to a pseudo random generator) to
 * compute the rank is with ZIP_FFS32(random()). The ZIP_FFS32 returns the least
 * significant nonzero bit of a 32bit number. */

#define ZIP_HEAD(name, type)                    \
struct name {                                   \
    struct type *zip_root;                      \
}

#define ZIP_INIT(head) do { (head)->zip_root = NULL; } while (0)
#define ZIP_ROOT(head) (head)->zip_root
#define ZIP_EMPTY(head) (ZIP_ROOT(head) == NULL)

#define ZIP_ENTRY(type)                         \
struct {                                        \
    struct type *zip_left;                      \
    struct type *zip_right;                     \
    unsigned char rank;                         \
}

#define ZIP_LEFT(elm, field) (elm)->field.zip_left
#define ZIP_RIGHT(elm, field) (elm)->field.zip_right
#define ZIP_RANK(elm, field) (elm)->field.rank

/* Shortcuts */
#define ZIP_INSERT(name, head, elm, rank) name##_ZIP_INSERT(head, elm, rank)
#define ZIP_REMOVE(name, head, elm) name##_ZIP_REMOVE(head, elm)
#define ZIP_FIND(name, head, key) name##_ZIP_FIND(head, key)
#define ZIP_MIN(name, head) name##_ZIP_MIN(head)
#define ZIP_MAX(name, head) name##_ZIP_MAX(head)
#define ZIP_ITER(name, head, cb, d) name##_ZIP_ITER(head, cb, d)

/* Zip tree method prototypes */
#define ZIP_PROTTYPE(name, type, keytype)                               \
void name##_ZIP_INSERT(struct name *head, struct type *elm, unsigned char rank); \
void name##_ZIP_REMOVE(struct name *head, struct type *elm);            \
struct type *name##_ZIP_FIND(struct name *head, const keytype *key);    \
struct type *name##_ZIP_MIN(struct name *head);                         \
struct type *name##_ZIP_MAX(struct name *head);                         \
typedef void (*name##_cb)(struct type *elm, void *data);                \
void name##_ZIP_ITER(struct name *head, name##_cb cb, void *data);      \

/* The comparison method "cmp" defined for every zip tree has the signature
 *
 *   enum ZIP_CMP cmpDateTime(const keytype *a, const keytype *b);
 *
 * The entries need an absolute ordering. So ZIP_CMP_EQ must only be returned if
 * a and b point to the same memory. (E.g. assured by unique identifiers.) */
enum ZIP_CMP {
    ZIP_CMP_LESS = -1,
    ZIP_CMP_EQ = 0,
    ZIP_CMP_MORE = 1
};

/* Find the position of the first bit in an unsigned 32bit integer */
#ifdef _MSC_VER
static __inline
#else
static inline
#endif
unsigned char
ZIP_FFS32(unsigned int v) {
    unsigned int t = 1;
    unsigned char r = 1;
    if(v == 0) return 0;
    while((v & t) == 0) {
        t = t << 1; r++;
    }
    return r;
}

/* Zip tree method implementations */
#define ZIP_IMPL(name, type, field, keytype, keyfield, cmp)             \
static struct type *                                                    \
__##name##_ZIP_INSERT(struct type *root, struct type *elm) {            \
    if(!root) {                                                         \
        ZIP_LEFT(elm, field) = NULL;                                    \
        ZIP_RIGHT(elm, field) = NULL;                                   \
        return elm;                                                     \
    }                                                                   \
    if((cmp)(&(elm)->keyfield, &(root)->keyfield) == ZIP_CMP_LESS) {    \
        if(__##name##_ZIP_INSERT(ZIP_LEFT(root, field), elm) == elm) {  \
            if(ZIP_RANK(elm, field) < ZIP_RANK(root, field)) {          \
                ZIP_LEFT(root, field) = elm;                            \
            } else {                                                    \
                ZIP_LEFT(root, field) = ZIP_RIGHT(elm, field);          \
                ZIP_RIGHT(elm, field) = root;                           \
                return elm;                                             \
            }                                                           \
        }                                                               \
    } else {                                                            \
        if(__##name##_ZIP_INSERT(ZIP_RIGHT(root, field), elm) == elm) { \
            if(ZIP_RANK(elm, field) <= ZIP_RANK(root, field)) {         \
                ZIP_RIGHT(root, field) = elm;                           \
            } else {                                                    \
                ZIP_RIGHT(root, field) = ZIP_LEFT(elm, field);          \
                ZIP_LEFT(elm, field) = root;                            \
                return elm;                                             \
            }                                                           \
        }                                                               \
    }                                                                   \
    return root;                                                        \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_INSERT(struct name *head, struct type *elm,                  \
                  unsigned char rank) {                                 \
    ZIP_RANK(elm, field) = rank;                                        \
    ZIP_ROOT(head) = __##name##_ZIP_INSERT(ZIP_ROOT(head), elm);        \
}                                                                       \
                                                                        \
static struct type *                                                    \
__##name##ZIP(struct type *x, struct type *y) {                         \
    if(!x) return y;                                                    \
    if(!y) return x;                                                    \
    if(ZIP_RANK(x, field) < ZIP_RANK(y, field)) {                       \
        ZIP_LEFT(y, field) = __##name##ZIP(x, ZIP_LEFT(y, field));      \
        return y;                                                       \
    }                                                                   \
    ZIP_RIGHT(x, field) = __##name##ZIP(ZIP_RIGHT(x, field), y);        \
    return x;                                                           \
}                                                                       \
                                                                        \
/* Modified from the original algorithm. Allow multiple */              \
/* elements with the same key. */                                       \
static struct type *                                                    \
__##name##_ZIP_REMOVE(struct type *root, struct type *elm) {            \
    if(root == elm)                                                     \
        return __##name##ZIP(ZIP_LEFT(root, field),                     \
                             ZIP_RIGHT(root, field));                   \
    enum ZIP_CMP eq = (cmp)(&(elm)->keyfield, &(root)->keyfield);       \
    struct type *left = ZIP_LEFT(root, field);                          \
    struct type *right = ZIP_RIGHT(root, field);                        \
    if(eq == ZIP_CMP_LESS) {                                            \
        if(elm == left)                                                 \
            ZIP_LEFT(root, field) =                                     \
                __##name##ZIP(ZIP_LEFT(left, field),                    \
                              ZIP_RIGHT(left, field));                  \
        else if(left)                                                   \
            __##name##_ZIP_REMOVE(left, elm);                           \
    } else if(eq == ZIP_CMP_MORE) {                                     \
        if(elm == right)                                                \
            ZIP_RIGHT(root, field) =                                    \
                __##name##ZIP(ZIP_LEFT(right, field),                   \
                              ZIP_RIGHT(right, field));                 \
        else if(right)                                                  \
            __##name##_ZIP_REMOVE(right, elm);                          \
    } else { /* ZIP_CMP_EQ, but root != elm */                          \
        if(right)                                                       \
            ZIP_RIGHT(root, field) = __##name##_ZIP_REMOVE(right, elm); \
        if(left)                                                        \
            ZIP_LEFT(root, field) = __##name##_ZIP_REMOVE(left, elm);   \
    }                                                                   \
    return root;                                                        \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_REMOVE(struct name *head, struct type *elm) {                \
    ZIP_ROOT(head) = __##name##_ZIP_REMOVE(ZIP_ROOT(head), elm);        \
}                                                                       \
                                                                        \
static struct type *                                                    \
__##name##_ZIP_FIND(struct type *root, const keytype *key) {            \
    if(!root)                                                           \
        return NULL;                                                    \
    enum ZIP_CMP eq = (cmp)(key, &(root)->keyfield);                    \
    if(eq == ZIP_CMP_EQ) {                                              \
        return root;                                                    \
    }                                                                   \
    if(eq == ZIP_CMP_LESS) {                                            \
        return __##name##_ZIP_FIND(ZIP_LEFT(root, field), key);         \
    }                                                                   \
    return __##name##_ZIP_FIND(ZIP_RIGHT(root, field), key);            \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_FIND(struct name *head, const keytype *key) {                \
    return __##name##_ZIP_FIND(ZIP_ROOT(head), key);                    \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_MIN(struct name *head) {                                     \
    struct type *cur = ZIP_ROOT(head);                                  \
    if(!cur) return NULL;                                               \
    while(ZIP_LEFT(cur, field)) {                                       \
        cur = ZIP_LEFT(cur, field);                                     \
    }                                                                   \
    return cur;                                                         \
}                                                                       \
                                                                        \
struct type *                                                           \
name##_ZIP_MAX(struct name *head) {                                     \
    struct type *cur = ZIP_ROOT(head);                                  \
    if(!cur) return NULL;                                               \
    while(ZIP_RIGHT(cur, field)) {                                      \
        cur = ZIP_RIGHT(cur, field);                                    \
    }                                                                   \
    return cur;                                                         \
}                                                                       \
                                                                        \
static void                                                             \
__##name##_ZIP_ITER(struct type *elm, name##_cb cb, void *data) {       \
    if(!elm)                                                            \
        return;                                                         \
    __##name##_ZIP_ITER(ZIP_LEFT(elm, field), cb, data);                \
    __##name##_ZIP_ITER(ZIP_RIGHT(elm, field), cb, data);               \
    cb(elm, data);                                                      \
}                                                                       \
                                                                        \
void                                                                    \
name##_ZIP_ITER(struct name *head, name##_cb cb, void *data) {          \
    __##name##_ZIP_ITER(ZIP_ROOT(head), cb, data);                      \
}

#ifdef __cplusplus
} /* extern "C" */
#endif


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/nodestore.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Julian Grothoff
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 */


/* !!! Warning !!!
 *
 * If you are not developing a nodestore plugin, then you should not work with
 * the definitions from this file directly. The underlying node structures are
 * not meant to be used directly by end users. Please use the public server API
 * / OPC UA services to interact with the information model. */


_UA_BEGIN_DECLS

/* Forward declaration */
#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
struct UA_MonitoredItem;
#endif

/**
 * .. _information-modelling:
 *
 * Information Modelling
 * =====================
 *
 * Information modelling in OPC UA combines concepts from object-orientation and
 * semantic modelling. At the core, an OPC UA information model is a graph made
 * up of
 *
 * - Nodes: There are eight possible Node types (variable, object, method, ...)
 * - References: Typed and directed relations between two nodes
 *
 * Every node is identified by a unique (within the server) :ref:`nodeid`.
 * Reference are triples of the form ``(source-nodeid, referencetype-nodeid,
 * target-nodeid)``. An example reference between nodes is a
 * ``hasTypeDefinition`` reference between a Variable and its VariableType. Some
 * ReferenceTypes are *hierarchic* and must not form *directed loops*. See the
 * section on :ref:`ReferenceTypes <referencetypenode>` for more details on
 * possible references and their semantics.
 *
 * **Warning!!** The structures defined in this section are only relevant for
 * the developers of custom Nodestores. The interaction with the information
 * model is possible only via the OPC UA :ref:`services`. So the following
 * sections are purely informational so that users may have a clear mental
 * model of the underlying representation.
 *
 * Base Node Attributes
 * --------------------
 *
 * Nodes contain attributes according to their node type. The base node
 * attributes are common to all node types. In the OPC UA :ref:`services`,
 * attributes are referred to via the :ref:`nodeid` of the containing node and
 * an integer :ref:`attribute-id`.
 *
 * Internally, open62541 uses ``UA_Node`` in places where the exact node type is
 * not known or not important. The ``nodeClass`` attribute is used to ensure the
 * correctness of casting from ``UA_Node`` to a specific node type. */

/* Ordered tree structure for fast member check */
typedef struct UA_ReferenceTarget {
    ZIP_ENTRY(UA_ReferenceTarget) idTreeFields;
    ZIP_ENTRY(UA_ReferenceTarget) nameTreeFields;
    UA_UInt32 targetIdHash;   /* Hash of the target's NodeId */
    UA_UInt32 targetNameHash; /* Hash of the target's BrowseName */
    UA_ExpandedNodeId targetId;
} UA_ReferenceTarget;

ZIP_HEAD(UA_ReferenceTargetIdTree, UA_ReferenceTarget);
typedef struct UA_ReferenceTargetIdTree UA_ReferenceTargetIdTree;
ZIP_PROTTYPE(UA_ReferenceTargetIdTree, UA_ReferenceTarget, UA_ReferenceTarget)

ZIP_HEAD(UA_ReferenceTargetNameTree, UA_ReferenceTarget);
typedef struct UA_ReferenceTargetNameTree UA_ReferenceTargetNameTree;
ZIP_PROTTYPE(UA_ReferenceTargetNameTree, UA_ReferenceTarget, UA_UInt32)

/* List of reference targets with the same reference type and direction */
typedef struct {
    UA_NodeId referenceTypeId;
    UA_Boolean isInverse;
    size_t refTargetsSize;
    UA_ReferenceTarget *refTargets;
    UA_ReferenceTargetIdTree refTargetsIdTree;
    UA_ReferenceTargetNameTree refTargetsNameTree;
} UA_NodeReferenceKind;

#define UA_NODE_BASEATTRIBUTES                  \
    UA_NodeId nodeId;                           \
    UA_NodeClass nodeClass;                     \
    UA_QualifiedName browseName;                \
    UA_LocalizedText displayName;               \
    UA_LocalizedText description;               \
    UA_UInt32 writeMask;                        \
    size_t referencesSize;                      \
    UA_NodeReferenceKind *references;           \
                                                \
    /* Members specific to open62541 */         \
    void *context;                              \
    UA_Boolean constructed; /* Constructors were called */

typedef struct {
    UA_NODE_BASEATTRIBUTES
} UA_Node;

/**
 * VariableNode
 * ------------
 *
 * Variables store values in a :ref:`datavalue` together with
 * metadata for introspection. Most notably, the attributes data type, value
 * rank and array dimensions constrain the possible values the variable can take
 * on.
 *
 * Variables come in two flavours: properties and datavariables. Properties are
 * related to a parent with a ``hasProperty`` reference and may not have child
 * nodes themselves. Datavariables may contain properties (``hasProperty``) and
 * also datavariables (``hasComponents``).
 *
 * All variables are instances of some :ref:`variabletypenode` in return
 * constraining the possible data type, value rank and array dimensions
 * attributes.
 *
 * Data Type
 * ^^^^^^^^^
 *
 * The (scalar) data type of the variable is constrained to be of a specific
 * type or one of its children in the type hierarchy. The data type is given as
 * a NodeId pointing to a :ref:`datatypenode` in the type hierarchy. See the
 * Section :ref:`datatypenode` for more details.
 *
 * If the data type attribute points to ``UInt32``, then the value attribute
 * must be of that exact type since ``UInt32`` does not have children in the
 * type hierarchy. If the data type attribute points ``Number``, then the type
 * of the value attribute may still be ``UInt32``, but also ``Float`` or
 * ``Byte``.
 *
 * Consistency between the data type attribute in the variable and its
 * :ref:`VariableTypeNode` is ensured.
 *
 * Value Rank
 * ^^^^^^^^^^
 *
 * This attribute indicates whether the value attribute of the variable is an
 * array and how many dimensions the array has. It may have the following
 * values:
 *
 * - ``n >= 1``: the value is an array with the specified number of dimensions
 * - ``n =  0``: the value is an array with one or more dimensions
 * - ``n = -1``: the value is a scalar
 * - ``n = -2``: the value can be a scalar or an array with any number of dimensions
 * - ``n = -3``: the value can be a scalar or a one dimensional array
 *
 * Consistency between the value rank attribute in the variable and its
 * :ref:`variabletypenode` is ensured.
 *
 * Array Dimensions
 * ^^^^^^^^^^^^^^^^
 *
 * If the value rank permits the value to be a (multi-dimensional) array, the
 * exact length in each dimensions can be further constrained with this
 * attribute.
 *
 * - For positive lengths, the variable value is guaranteed to be of the same
 *   length in this dimension.
 * - The dimension length zero is a wildcard and the actual value may have any
 *   length in this dimension.
 *
 * Consistency between the array dimensions attribute in the variable and its
 * :ref:`variabletypenode` is ensured. */

/* Indicates whether a variable contains data inline or whether it points to an
 * external data source */
typedef enum {
    UA_VALUESOURCE_DATA,
    UA_VALUESOURCE_DATASOURCE
} UA_ValueSource;

#define UA_NODE_VARIABLEATTRIBUTES                                      \
    /* Constraints on possible values */                                \
    UA_NodeId dataType;                                                 \
    UA_Int32 valueRank;                                                 \
    size_t arrayDimensionsSize;                                         \
    UA_UInt32 *arrayDimensions;                                         \
                                                                        \
    /* The current value */                                             \
    UA_ValueSource valueSource;                                         \
    union {                                                             \
        struct {                                                        \
            UA_DataValue value;                                         \
            UA_ValueCallback callback;                                  \
        } data;                                                         \
        UA_DataSource dataSource;                                       \
    } value;

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_NODE_VARIABLEATTRIBUTES
    UA_Byte accessLevel;
    UA_Double minimumSamplingInterval;
    UA_Boolean historizing;

    /* Members specific to open62541 */
    UA_Boolean isDynamic; /* Some variables are "static" in the sense that they
                           * are not attached to a dynamic process in the
                           * background. Only dynamic variables conserve source
                           * and server timestamp for the value attribute.
                           * Static variables have timestamps of "now". */
} UA_VariableNode;

/**
 * .. _variabletypenode:
 *
 * VariableTypeNode
 * ----------------
 *
 * VariableTypes are used to provide type definitions for variables.
 * VariableTypes constrain the data type, value rank and array dimensions
 * attributes of variable instances. Furthermore, instantiating from a specific
 * variable type may provide semantic information. For example, an instance from
 * ``MotorTemperatureVariableType`` is more meaningful than a float variable
 * instantiated from ``BaseDataVariable``. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_NODE_VARIABLEATTRIBUTES
    UA_Boolean isAbstract;

    /* Members specific to open62541 */
    UA_NodeTypeLifecycle lifecycle;
} UA_VariableTypeNode;

/**
 * .. _methodnode:
 *
 * MethodNode
 * ----------
 *
 * Methods define callable functions and are invoked using the :ref:`Call
 * <method-services>` service. MethodNodes may have special properties (variable
 * childen with a ``hasProperty`` reference) with the :ref:`qualifiedname` ``(0,
 * "InputArguments")`` and ``(0, "OutputArguments")``. The input and output
 * arguments are both described via an array of ``UA_Argument``. While the Call
 * service uses a generic array of :ref:`variant` for input and output, the
 * actual argument values are checked to match the signature of the MethodNode.
 *
 * Note that the same MethodNode may be referenced from several objects (and
 * object types). For this, the NodeId of the method *and of the object
 * providing context* is part of a Call request message. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_Boolean executable;

    /* Members specific to open62541 */
    UA_MethodCallback method;
#if UA_MULTITHREADING >= 100
    UA_Boolean async; /* Indicates an async method call */
#endif
} UA_MethodNode;

/**
 * ObjectNode
 * ----------
 *
 * Objects are used to represent systems, system components, real-world objects
 * and software objects. Objects are instances of an :ref:`object
 * type<objecttypenode>` and may contain variables, methods and further
 * objects. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
    struct UA_MonitoredItem *monitoredItemQueue;
#endif
    UA_Byte eventNotifier;
} UA_ObjectNode;

/**
 * .. _objecttypenode:
 *
 * ObjectTypeNode
 * --------------
 *
 * ObjectTypes provide definitions for Objects. Abstract objects cannot be
 * instantiated. See :ref:`node-lifecycle` for the use of constructor and
 * destructor callbacks. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_Boolean isAbstract;

    /* Members specific to open62541 */
    UA_NodeTypeLifecycle lifecycle;
} UA_ObjectTypeNode;

/**
 * .. _referencetypenode:
 *
 * ReferenceTypeNode
 * -----------------
 *
 * Each reference between two nodes is typed with a ReferenceType that gives
 * meaning to the relation. The OPC UA standard defines a set of ReferenceTypes
 * as a mandatory part of OPC UA information models.
 *
 * - Abstract ReferenceTypes cannot be used in actual references and are only
 *   used to structure the ReferenceTypes hierarchy
 * - Symmetric references have the same meaning from the perspective of the
 *   source and target node
 *
 * The figure below shows the hierarchy of the standard ReferenceTypes (arrows
 * indicate a ``hasSubType`` relation). Refer to Part 3 of the OPC UA
 * specification for the full semantics of each ReferenceType.
 *
 * .. graphviz::
 *
 *    digraph tree {
 *
 *    node [height=0, shape=box, fillcolor="#E5E5E5", concentrate=true]
 *
 *    references [label="References\n(Abstract, Symmetric)"]
 *    hierarchical_references [label="HierarchicalReferences\n(Abstract)"]
 *    references -> hierarchical_references
 *
 *    nonhierarchical_references [label="NonHierarchicalReferences\n(Abstract, Symmetric)"]
 *    references -> nonhierarchical_references
 *
 *    haschild [label="HasChild\n(Abstract)"]
 *    hierarchical_references -> haschild
 *
 *    aggregates [label="Aggregates\n(Abstract)"]
 *    haschild -> aggregates
 *
 *    organizes [label="Organizes"]
 *    hierarchical_references -> organizes
 *
 *    hascomponent [label="HasComponent"]
 *    aggregates -> hascomponent
 *
 *    hasorderedcomponent [label="HasOrderedComponent"]
 *    hascomponent -> hasorderedcomponent
 *
 *    hasproperty [label="HasProperty"]
 *    aggregates -> hasproperty
 *
 *    hassubtype [label="HasSubtype"]
 *    haschild -> hassubtype
 *
 *    hasmodellingrule [label="HasModellingRule"]
 *    nonhierarchical_references -> hasmodellingrule
 *
 *    hastypedefinition [label="HasTypeDefinition"]
 *    nonhierarchical_references -> hastypedefinition
 *
 *    hasencoding [label="HasEncoding"]
 *    nonhierarchical_references -> hasencoding
 *
 *    hasdescription [label="HasDescription"]
 *    nonhierarchical_references -> hasdescription
 *
 *    haseventsource [label="HasEventSource"]
 *    hierarchical_references -> haseventsource
 *
 *    hasnotifier [label="HasNotifier"]
 *    hierarchical_references -> hasnotifier
 *
 *    generatesevent [label="GeneratesEvent"]
 *    nonhierarchical_references -> generatesevent
 *
 *    alwaysgeneratesevent [label="AlwaysGeneratesEvent"]
 *    generatesevent -> alwaysgeneratesevent
 *
 *    {rank=same hierarchical_references nonhierarchical_references}
 *    {rank=same generatesevent haseventsource hasmodellingrule
 *               hasencoding hassubtype}
 *    {rank=same alwaysgeneratesevent hasproperty}
 *
 *    }
 *
 * The ReferenceType hierarchy can be extended with user-defined ReferenceTypes.
 * Many Companion Specifications for OPC UA define new ReferenceTypes to be used
 * in their domain of interest.
 *
 * For the following example of custom ReferenceTypes, we attempt to model the
 * structure of a technical system. For this, we introduce two custom
 * ReferenceTypes. First, the hierarchical ``contains`` ReferenceType indicates
 * that a system (represented by an OPC UA object) contains a component (or
 * subsystem). This gives rise to a tree-structure of containment relations. For
 * example, the motor (object) is contained in the car and the crankshaft is
 * contained in the motor. Second, the symmetric ``connectedTo`` ReferenceType
 * indicates that two components are connected. For example, the motor's
 * crankshaft is connected to the gear box. Connections are independent of the
 * containment hierarchy and can induce a general graph-structure. Further
 * subtypes of ``connectedTo`` could be used to differentiate between physical,
 * electrical and information related connections. A client can then learn the
 * layout of a (physical) system represented in an OPC UA information model
 * based on a common understanding of just two custom reference types. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_Boolean isAbstract;
    UA_Boolean symmetric;
    UA_LocalizedText inverseName;
} UA_ReferenceTypeNode;

/**
 * .. _datatypenode:
 *
 * DataTypeNode
 * ------------
 *
 * DataTypes represent simple and structured data types. DataTypes may contain
 * arrays. But they always describe the structure of a single instance. In
 * open62541, DataTypeNodes in the information model hierarchy are matched to
 * ``UA_DataType`` type descriptions for :ref:`generic-types` via their NodeId.
 *
 * Abstract DataTypes (e.g. ``Number``) cannot be the type of actual values.
 * They are used to constrain values to possible child DataTypes (e.g.
 * ``UInt32``). */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_Boolean isAbstract;
} UA_DataTypeNode;

/**
 * ViewNode
 * --------
 *
 * Each View defines a subset of the Nodes in the AddressSpace. Views can be
 * used when browsing an information model to focus on a subset of nodes and
 * references only. ViewNodes can be created and be interacted with. But their
 * use in the :ref:`Browse<view-services>` service is currently unsupported in
 * open62541. */

typedef struct {
    UA_NODE_BASEATTRIBUTES
    UA_Byte eventNotifier;
    UA_Boolean containsNoLoops;
} UA_ViewNode;

/**
 * Nodestore Plugin API
 * --------------------
 *
 * The following definitions are used for implementing custom node storage
 * backends. **Most users will want to use the default nodestore and don't need
 * to work with the nodestore API**.
 *
 * Outside of custom nodestore implementations, users should not manually edit
 * nodes. Please use the OPC UA services for that. Otherwise, all consistency
 * checks are omitted. This can crash the application eventually. */

typedef void (*UA_NodestoreVisitor)(void *visitorCtx, const UA_Node *node);

typedef struct {
    /* Nodestore context and lifecycle */
    void *context;
    void (*clear)(void *nsCtx);

    /* The following definitions are used to create empty nodes of the different
     * node types. The memory is managed by the nodestore. Therefore, the node
     * has to be removed via a special deleteNode function. (If the new node is
     * not added to the nodestore.) */
    UA_Node * (*newNode)(void *nsCtx, UA_NodeClass nodeClass);

    void (*deleteNode)(void *nsCtx, UA_Node *node);

    /* ``Get`` returns a pointer to an immutable node. ``Release`` indicates
     * that the pointer is no longer accessed afterwards. */
    const UA_Node * (*getNode)(void *nsCtx, const UA_NodeId *nodeId);

    void (*releaseNode)(void *nsCtx, const UA_Node *node);

    /* Returns an editable copy of a node (needs to be deleted with the
     * deleteNode function or inserted / replaced into the nodestore). */
    UA_StatusCode (*getNodeCopy)(void *nsCtx, const UA_NodeId *nodeId,
                                 UA_Node **outNode);

    /* Inserts a new node into the nodestore. If the NodeId is zero, then a
     * fresh numeric NodeId is assigned. If insertion fails, the node is
     * deleted. */
    UA_StatusCode (*insertNode)(void *nsCtx, UA_Node *node,
                                UA_NodeId *addedNodeId);

    /* To replace a node, get an editable copy of the node, edit and replace
     * with this function. If the node was already replaced since the copy was
     * made, UA_STATUSCODE_BADINTERNALERROR is returned. If the NodeId is not
     * found, UA_STATUSCODE_BADNODEIDUNKNOWN is returned. In both error cases,
     * the editable node is deleted. */
    UA_StatusCode (*replaceNode)(void *nsCtx, UA_Node *node);

    /* Removes a node from the nodestore. */
    UA_StatusCode (*removeNode)(void *nsCtx, const UA_NodeId *nodeId);

    /* Execute a callback for every node in the nodestore. */
    void (*iterate)(void *nsCtx, UA_NodestoreVisitor visitor,
                    void *visitorCtx);
} UA_Nodestore;

/* Attributes must be of a matching type (VariableAttributes, ObjectAttributes,
 * and so on). The attributes are copied. Note that the attributes structs do
 * not contain NodeId, NodeClass and BrowseName. The NodeClass of the node needs
 * to be correctly set before calling this method. UA_Node_clear is called on
 * the node when an error occurs internally. */
UA_StatusCode UA_EXPORT
UA_Node_setAttributes(UA_Node *node, const void *attributes,
                      const UA_DataType *attributeType);

/* Reset the destination node and copy the content of the source */
UA_StatusCode UA_EXPORT
UA_Node_copy(const UA_Node *src, UA_Node *dst);

/* Allocate new node and copy the values from src */
UA_EXPORT UA_Node *
UA_Node_copy_alloc(const UA_Node *src);

/* Add a single reference to the node */
UA_StatusCode UA_EXPORT
UA_Node_addReference(UA_Node *node, const UA_AddReferencesItem *item,
                     UA_UInt32 targetBrowseNameHash);

/* Delete a single reference from the node */
UA_StatusCode UA_EXPORT
UA_Node_deleteReference(UA_Node *node, const UA_DeleteReferencesItem *item);

/* Delete all references of the node */
void UA_EXPORT
UA_Node_deleteReferences(UA_Node *node);

/* Remove all malloc'ed members of the node and reset */
void UA_EXPORT
UA_Node_clear(UA_Node *node);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/plugin/historydatabase.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
 */



_UA_BEGIN_DECLS

typedef struct UA_HistoryDatabase UA_HistoryDatabase;

struct UA_HistoryDatabase {
    void *context;

    void (*clear)(UA_HistoryDatabase *hdb);

    /* This function will be called when a nodes value is set.
     * Use this to insert data into your database(s) if polling is not suitable
     * and you need to get all data changes.
     * Set it to NULL if you do not need it.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * sessionId and sessionContext identify the session which set this value.
     * nodeId is the node id for which data was set.
     * historizing is the nodes boolean flag for historizing
     * value is the new value. */
    void
    (*setValue)(UA_Server *server,
                void *hdbContext,
                const UA_NodeId *sessionId,
                void *sessionContext,
                const UA_NodeId *nodeId,
                UA_Boolean historizing,
                const UA_DataValue *value);

    /* This function will be called when an event is triggered.
     * Use it to insert data into your event database.
     * No default implementation is provided by UA_HistoryDatabase_default.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * sessionId and sessionContext identify the session which set this value.
     * originId is the node id of the event's origin.
     * emitterId is the node id of the event emitter.
     * eventId is the node id of the event that is being emitted.
     * willEventNodeBeDeleted specifies whether the event node will be deleted after
     *                        it has been triggered (this might be relevant for
     *                        in-memory storage).
     * historicalEventFilter is the value of the HistoricalEventFilter property of
     *                       the emitter (OPC UA Part 11, 5.3.2), it is NULL if
     *                       the property does not exist or is not set.
     * fieldList is the event field list returned after application of
     *           historicalEventFilter to the event node
     *           (NULL if historicalEventFilter is NULL or filtering was
     *           unsuccessful); the fieldList is not deleted so
     *           make sure to delete it when it is no longer needed. */
    void
    (*setEvent)(UA_Server *server,
                void *hdbContext,
                const UA_NodeId *originId,
                const UA_NodeId *emitterId,
                const UA_NodeId *eventId,
                UA_Boolean willEventNodeBeDeleted,
                const UA_EventFilter *historicalEventFilter,
                UA_EventFieldList *fieldList);

    /* This function is called if a history read is requested with
     * isRawReadModified set to false. Setting it to NULL will result in a
     * response with statuscode UA_STATUSCODE_BADHISTORYOPERATIONUNSUPPORTED.
     *
     * server is the server this node lives in.
     * hdbContext is the context of the UA_HistoryDatabase.
     * sessionId and sessionContext identify the session which set this value.
     * requestHeader, historyReadDetails, timestampsToReturn, releaseContinuationPoints
     * nodesToReadSize and nodesToRead is the requested data from the client. It
     *                 is from the request object.
     * response the response to fill for the client. If the request is ok, there
     *          is no need to use it. Use this to set status codes other than
     *          "Good" or other data. You find an already allocated
     *          UA_HistoryReadResult array with an UA_HistoryData object in the
     *          extension object in the size of nodesToReadSize. If you are not
     *          willing to return data, you have to delete the results array,
     *          set it to NULL and set the resultsSize to 0. Do not access
     *          historyData after that.
     * historyData is a proper typed pointer array pointing in the
     *             UA_HistoryReadResult extension object. use this to provide
     *             result data to the client. Index in the array is the same as
     *             in nodesToRead and the UA_HistoryReadResult array. */
    void
    (*readRaw)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadRawModifiedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readModified)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadRawModifiedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryModifiedData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readEvent)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadEventDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryEvent * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readProcessed)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadProcessedDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    /* No default implementation is provided by UA_HistoryDatabase_default
     * for the following function */
    void
    (*readAtTime)(UA_Server *server,
               void *hdbContext,
               const UA_NodeId *sessionId,
               void *sessionContext,
               const UA_RequestHeader *requestHeader,
               const UA_ReadAtTimeDetails *historyReadDetails,
               UA_TimestampsToReturn timestampsToReturn,
               UA_Boolean releaseContinuationPoints,
               size_t nodesToReadSize,
               const UA_HistoryReadValueId *nodesToRead,
               UA_HistoryReadResponse *response,
               UA_HistoryData * const * const historyData);

    void
    (*updateData)(UA_Server *server,
                  void *hdbContext,
                  const UA_NodeId *sessionId,
                  void *sessionContext,
                  const UA_RequestHeader *requestHeader,
                  const UA_UpdateDataDetails *details,
                  UA_HistoryUpdateResult *result);

    void
    (*deleteRawModified)(UA_Server *server,
                         void *hdbContext,
                         const UA_NodeId *sessionId,
                         void *sessionContext,
                         const UA_RequestHeader *requestHeader,
                         const UA_DeleteRawModifiedDetails *details,
                         UA_HistoryUpdateResult *result);

    /* Add more function pointer here.
     * For example for read_event, read_annotation, update_details */
};

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/server_config.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2017 (c) Henrik Norrman
 *    Copyright 2018 (c) Fabian Arndt, Root-Core
 *    Copyright 2019 (c) HMS Industrial Networks AB (Author: Jonas Green)
 */



#ifdef UA_ENABLE_PUBSUB
#endif

#ifdef UA_ENABLE_HISTORIZING
#endif

_UA_BEGIN_DECLS

/**
 * .. _server-configuration:
 *
 * Server Configuration
 * --------------------

 * The configuration structure is passed to the server during initialization.
 * The server expects that the configuration is not modified during runtime.
 * Currently, only one server can use a configuration at a time. During
 * shutdown, the server will clean up the parts of the configuration that are
 * modified at runtime through the provided API.
 *
 * Examples for configurations are provided in the ``/plugins`` folder.
 * The usual usage is as follows:
 *
 * 1. Create a server configuration with default settings as a starting point
 * 2. Modifiy the configuration, e.g. by adding a server certificate
 * 3. Instantiate a server with it
 * 4. After shutdown of the server, clean up the configuration (free memory)
 *
 * The :ref:`tutorials` provide a good starting point for this. */

typedef struct {
    UA_UInt32 min;
    UA_UInt32 max;
} UA_UInt32Range;

typedef struct {
    UA_Duration min;
    UA_Duration max;
} UA_DurationRange;

#ifdef UA_ENABLE_DISCOVERY
typedef struct {

    /* Timeout in seconds when to automatically remove a registered server from
     * the list, if it doesn't re-register within the given time frame. A value
     * of 0 disables automatic removal. Default is 60 Minutes (60*60). Must be
     * bigger than 10 seconds, because cleanup is only triggered approximately
     * every 10 seconds. The server will still be removed depending on the
     * state of the semaphore file. */
    UA_UInt32 cleanupTimeout;

    /* Enable mDNS announce and response to queries */
    bool mdnsEnable;

#ifdef UA_ENABLE_DISCOVERY_MULTICAST
    UA_MdnsDiscoveryConfiguration mdns;
    UA_String mdnsInterfaceIP;
# if !defined(UA_HAS_GETIFADDR)
    uint32_t *ipAddressList;
    size_t ipAddressListSize;
# endif
#endif

} UA_ServerConfig_Discovery;

#endif

typedef void
(*UA_Server_AsyncOperationNotifyCallback)(UA_Server *server);

struct UA_ServerConfig {
    UA_UInt16 nThreads; /* only if multithreading is enabled */
    UA_Logger logger;
    void *userdata;

    /* Server Description:
     * The description must be internally consistent.
     * - The ApplicationUri set in the ApplicationDescription must match the
     *   URI set in the server certificate */
    UA_BuildInfo buildInfo;
    UA_ApplicationDescription applicationDescription;
    UA_ByteString serverCertificate;

    UA_Double shutdownDelay; /* Delay in ms from the shutdown signal (ctrl-c)
                                until the actual shutdown. Clients need to be
                                able to get a notification ahead of time. */

    /* Rule Handling */
    UA_RuleHandling verifyRequestTimestamp; /* Verify that the server sends a
                                             * timestamp in the request header */

    /* Custom DataTypes. Attention! Custom datatypes are not cleaned up together
     * with the configuration. So it is possible to allocate them on ROM. */
    const UA_DataTypeArray *customDataTypes;

    /**
     * .. note:: See the section on :ref:`generic-types`. Examples for working
     *    with custom data types are provided in
     *    ``/examples/custom_datatype/``. */

    /* Networking */
    size_t networkLayersSize;
    UA_ServerNetworkLayer *networkLayers;
    UA_String customHostname;

#ifdef UA_ENABLE_PUBSUB
    /*PubSub network layer */
    size_t pubsubTransportLayersSize;
    UA_PubSubTransportLayer *pubsubTransportLayers;
#endif

    /* Available security policies */
    size_t securityPoliciesSize;
    UA_SecurityPolicy* securityPolicies;

    /* Available endpoints */
    size_t endpointsSize;
    UA_EndpointDescription *endpoints;

    /* Only allow the following discovery services to be executed on a
     * SecureChannel with SecurityPolicyNone: GetEndpointsRequest,
     * FindServersRequest and FindServersOnNetworkRequest.
     *
     * Only enable this option if there is no endpoint with SecurityPolicy#None
     * in the endpoints list. The SecurityPolicy#None must be present in the
     * securityPolicies list. */
    UA_Boolean securityPolicyNoneDiscoveryOnly;

    /* Node Lifecycle callbacks */
    UA_GlobalNodeLifecycle nodeLifecycle;

    /**
     * .. note:: See the section for :ref:`node lifecycle
     *    handling<node-lifecycle>`. */

    /* Access Control */
    UA_AccessControl accessControl;

    /**
     * .. note:: See the section for :ref:`access-control
     *    handling<access-control>`. */

    /* Async Operations */
#if UA_MULTITHREADING >= 100
    UA_Double asyncOperationTimeout; /* in ms, 0 => unlimited */
    size_t maxAsyncOperationQueueSize; /* 0 => unlimited */
    UA_DEPRECATED UA_Double asyncCallRequestTimeout; /* in ms, 0 => unlimited */
    /* Notify workers when an async operation was enqueued */
    UA_Server_AsyncOperationNotifyCallback asyncOperationNotifyCallback;
#endif

    /**
     * .. note:: See the section for :ref:`async
     *    operations<async-operations>`. */

    /* Nodestore */
    UA_Nodestore nodestore;

    /* Certificate Verification */
    UA_CertificateVerification certificateVerification;

    /* Relax constraints for the InformationModel */
    UA_Boolean relaxEmptyValueConstraint; /* Nominally, only variables with data
                                           * type BaseDataType can have an empty
                                           * value. */

    /* Limits for SecureChannels */
    UA_UInt16 maxSecureChannels;
    UA_UInt32 maxSecurityTokenLifetime; /* in ms */

    /* Limits for Sessions */
    UA_UInt16 maxSessions;
    UA_Double maxSessionTimeout; /* in ms */

    /* Operation limits */
    UA_UInt32 maxNodesPerRead;
    UA_UInt32 maxNodesPerWrite;
    UA_UInt32 maxNodesPerMethodCall;
    UA_UInt32 maxNodesPerBrowse;
    UA_UInt32 maxNodesPerRegisterNodes;
    UA_UInt32 maxNodesPerTranslateBrowsePathsToNodeIds;
    UA_UInt32 maxNodesPerNodeManagement;
    UA_UInt32 maxMonitoredItemsPerCall;

    /* Limits for Requests */
    UA_UInt32 maxReferencesPerNode;

    /* Limits for Subscriptions */
    UA_UInt32 maxSubscriptions;
    UA_UInt32 maxSubscriptionsPerSession;
    UA_DurationRange publishingIntervalLimits; /* in ms (must not be less than 5) */
    UA_UInt32Range lifeTimeCountLimits;
    UA_UInt32Range keepAliveCountLimits;
    UA_UInt32 maxNotificationsPerPublish;
    UA_Boolean enableRetransmissionQueue;
    UA_UInt32 maxRetransmissionQueueSize; /* 0 -> unlimited size */
#ifdef UA_ENABLE_SUBSCRIPTIONS_EVENTS
    UA_UInt32 maxEventsPerNode; /* 0 -> unlimited size */
#endif

    /* Limits for MonitoredItems */
    UA_UInt32 maxMonitoredItems;
    UA_UInt32 maxMonitoredItemsPerSubscription;
    UA_DurationRange samplingIntervalLimits; /* in ms (must not be less than 5) */
    UA_UInt32Range queueSizeLimits; /* Negotiated with the client */

    /* Limits for PublishRequests */
    UA_UInt32 maxPublishReqPerSession;

    /* Discovery */
#ifdef UA_ENABLE_DISCOVERY
    UA_ServerConfig_Discovery discovery;
#endif

#ifdef UA_ENABLE_SUBSCRIPTIONS
    /* Register MonitoredItem in Userland
     *
     * @param server Allows the access to the server object
     * @param sessionId The session id, represented as an node id
     * @param sessionContext An optional pointer to user-defined data for the specific data source
     * @param nodeid Id of the node in question
     * @param nodeidContext An optional pointer to user-defined data, associated
     *        with the node in the nodestore. Note that, if the node has already been removed,
     *        this value contains a NULL pointer.
     * @param attributeId Identifies which attribute (value, data type etc.) is monitored
     * @param removed Determines if the MonitoredItem was removed or created. */
    void (*monitoredItemRegisterCallback)(UA_Server *server,
                                          const UA_NodeId *sessionId, void *sessionContext,
                                          const UA_NodeId *nodeId, void *nodeContext,
                                          UA_UInt32 attibuteId, UA_Boolean removed);
#endif

    /* Historical Access */
#ifdef UA_ENABLE_HISTORIZING
    UA_HistoryDatabase historyDatabase;

    UA_Boolean accessHistoryDataCapability;
    UA_UInt32  maxReturnDataValues; /* 0 -> unlimited size */

    UA_Boolean accessHistoryEventsCapability;
    UA_UInt32  maxReturnEventValues; /* 0 -> unlimited size */

    UA_Boolean insertDataCapability;
    UA_Boolean insertEventCapability;
    UA_Boolean insertAnnotationsCapability;

    UA_Boolean replaceDataCapability;
    UA_Boolean replaceEventCapability;

    UA_Boolean updateDataCapability;
    UA_Boolean updateEventCapability;

    UA_Boolean deleteRawCapability;
    UA_Boolean deleteEventCapability;
    UA_Boolean deleteAtTimeDataCapability;
#endif
};

void UA_EXPORT
UA_ServerConfig_clean(UA_ServerConfig *config);

/* Set a custom hostname in server configuration */
UA_EXPORT void
UA_ServerConfig_setCustomHostname(UA_ServerConfig *config,
                                  const UA_String customHostname);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/client_config.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2018 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2018 (c) Thomas Stalder, Blue Time Concept SA
 */

#ifndef UA_CLIENT_CONFIG_H
#define UA_CLIENT_CONFIG_H


_UA_BEGIN_DECLS

struct UA_Client;
typedef struct UA_Client UA_Client;

/**
 * .. _client-config:
 *
 * Client Configuration
 * --------------------
 *
 * The client configuration is used for setting connection parameters and
 * additional settings used by the client.







>
>
>
>
>










>
>
>
>
>
>
>
>
>
>
>
>






|





|
>
>
>
>
>
>
>
>
>

>





<
<

|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131


31132
31133
31134












































































































































































31135




































































































































































































31136
















































































































































31137






31138
















31139











































































































































































































31140






















































































































31141




31142



31143



31144

































































































































































31145















31146








31147





















































































































































31148








31149


31150






























































































































































31151
31152
31153
31154
31155
31156
31157
 */

/* Get configuraiton of ReaderGroup */
UA_StatusCode UA_EXPORT
UA_Server_ReaderGroup_getConfig(UA_Server *server, UA_NodeId readerGroupIdentifier,
                               UA_ReaderGroupConfig *config);

/* Get state of ReaderGroup */
UA_StatusCode UA_EXPORT
UA_Server_ReaderGroup_getState(UA_Server *server, UA_NodeId readerGroupIdentifier,
                               UA_PubSubState *state);

/* Add ReaderGroup to the created connection */
UA_StatusCode UA_EXPORT
UA_Server_addReaderGroup(UA_Server *server, UA_NodeId connectionIdentifier,
                                   const UA_ReaderGroupConfig *readerGroupConfig,
                                   UA_NodeId *readerGroupIdentifier);

/* Remove ReaderGroup from connection */
UA_StatusCode UA_EXPORT
UA_Server_removeReaderGroup(UA_Server *server, UA_NodeId groupIdentifier);

UA_StatusCode UA_EXPORT
UA_Server_freezeReaderGroupConfiguration(UA_Server *server, const UA_NodeId readerGroupId);

UA_StatusCode UA_EXPORT
UA_Server_unfreezeReaderGroupConfiguration(UA_Server *server, const UA_NodeId readerGroupId);

UA_StatusCode UA_EXPORT
UA_Server_setReaderGroupOperational(UA_Server *server, const UA_NodeId readerGroupId);

UA_StatusCode UA_EXPORT
UA_Server_setReaderGroupDisabled(UA_Server *server, const UA_NodeId readerGroupId);

#endif /* UA_ENABLE_PUBSUB */

_UA_END_DECLS

#endif /* UA_SERVER_PUBSUB_H */

/*********************************** amalgamated original file "/open62541/include/open62541/client.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2015-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2015-2016 (c) Sten Grüner
 *    Copyright 2015-2016 (c) Chris Iatrou
 *    Copyright 2015-2017 (c) Florian Palm
 *    Copyright 2015 (c) Holger Jeromin
 *    Copyright 2015 (c) Oleksiy Vasylyev
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2017 (c) Mark Giraud, Fraunhofer IOSB
 *    Copyright 2018 (c) Thomas Stalder, Blue Time Concept SA
 *    Copyright 2018 (c) Kalycito Infotech Private Limited
 */




_UA_BEGIN_DECLS



/**
 * .. _client:
 *












































































































































































 * Client




































































































































































































 * ======
















































































































































 *






 * The client implementation allows remote access to all OPC UA services. For
















 * convenience, some functionality has been wrapped in :ref:`high-level











































































































































































































 * abstractions <client-highlevel>`.






















































































































 *




 * **However**: At this time, the client does not yet contain its own thread or



 * event-driven main-loop, meaning that the client will not perform any actions



 * automatically in the background. This is especially relevant for

































































































































































 * connection/session management and subscriptions. The user will have to















 * periodically call `UA_Client_run_iterate` to ensure that asynchronous events








 * are handled, including keeping a secure connection established.





















































































































































 * See more about :ref:`asynchronicity<client-async-services>` and








 * :ref:`subscriptions<client-subscriptions>`.


 *






























































































































































 * .. _client-config:
 *
 * Client Configuration
 * --------------------
 *
 * The client configuration is used for setting connection parameters and
 * additional settings used by the client.
30091
30092
30093
30094
30095
30096
30097
30098
30099

30100
30101
30102
30103
30104
30105
30106
    UA_SecurityPolicy *securityPolicies;

    /* Certificate Verification Plugin */
    UA_CertificateVerification certificateVerification;

    /* Callbacks for async connection handshakes */
    UA_ConnectClientConnection initConnectionFunc;
    UA_StatusCode (*pollConnectionFunc)(UA_Client *client, void *context,
                                        UA_UInt32 timeout);


    /* Callback for state changes. The client state is differentated into the
     * SecureChannel state and the Session state. The connectStatus is set if
     * the client connection (including reconnects) has failed and the client
     * has to "give up". If the connectStatus is not set, the client still has
     * hope to connect or recover. */
    void (*stateCallback)(UA_Client *client,







|
|
>







31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
    UA_SecurityPolicy *securityPolicies;

    /* Certificate Verification Plugin */
    UA_CertificateVerification certificateVerification;

    /* Callbacks for async connection handshakes */
    UA_ConnectClientConnection initConnectionFunc;
    UA_StatusCode (*pollConnectionFunc)(UA_Connection *connection,
                                        UA_UInt32 timeout,
                                        const UA_Logger *logger);

    /* Callback for state changes. The client state is differentated into the
     * SecureChannel state and the Session state. The connectStatus is set if
     * the client connection (including reconnects) has failed and the client
     * has to "give up". If the connectStatus is not set, the client still has
     * hope to connect or recover. */
    void (*stateCallback)(UA_Client *client,
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
     * for the subscription.. */
    void (*subscriptionInactivityCallback)(UA_Client *client,
                                           UA_UInt32 subscriptionId,
                                           void *subContext);
#endif
} UA_ClientConfig;

_UA_END_DECLS

#endif /* UA_CLIENT_CONFIG_H */

/*********************************** amalgamated original file "/open62541/include/open62541/client.h" ***********************************/

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *    Copyright 2015-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
 *    Copyright 2015-2016 (c) Sten Grüner
 *    Copyright 2015-2016 (c) Chris Iatrou
 *    Copyright 2015-2017 (c) Florian Palm
 *    Copyright 2015 (c) Holger Jeromin
 *    Copyright 2015 (c) Oleksiy Vasylyev
 *    Copyright 2017 (c) Stefan Profanter, fortiss GmbH
 *    Copyright 2017 (c) Mark Giraud, Fraunhofer IOSB
 *    Copyright 2018 (c) Thomas Stalder, Blue Time Concept SA
 *    Copyright 2018 (c) Kalycito Infotech Private Limited
 */



_UA_BEGIN_DECLS

/**
 * .. _client:
 *
 * Client
 * ======
 *
 * The client implementation allows remote access to all OPC UA services. For
 * convenience, some functionality has been wrapped in :ref:`high-level
 * abstractions <client-highlevel>`.
 *
 * **However**: At this time, the client does not yet contain its own thread or
 * event-driven main-loop. So the client will not perform any actions
 * automatically in the background. This is especially relevant for
 * subscriptions. The user will have to periodically call
 * `UA_Client_Subscriptions_manuallySendPublishRequest`. See also :ref:`here
 * <client-subscriptions>`.
 *
 *
 * .. include:: client_config.rst
 *
 * Client Lifecycle
 * ---------------- */

/* The method UA_Client_new is defined in client_config_default.h. So default
 * plugins outside of the core library (for logging, etc) are already available
 * during the initialization.
 *







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







31259
31260
31261
31262
31263
31264
31265


























31266



















31267
31268
31269
31270
31271
31272
31273
     * for the subscription.. */
    void (*subscriptionInactivityCallback)(UA_Client *client,
                                           UA_UInt32 subscriptionId,
                                           void *subContext);
#endif
} UA_ClientConfig;



























 /**



















 * Client Lifecycle
 * ---------------- */

/* The method UA_Client_new is defined in client_config_default.h. So default
 * plugins outside of the core library (for logging, etc) are already available
 * during the initialization.
 *
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
UA_Client_disconnectAsync(UA_Client *client);

/* Disconnect the SecureChannel but keep the Session intact (if it exists).
 * This is always an async (non-blocking) operation. */
UA_StatusCode UA_EXPORT
UA_Client_disconnectSecureChannel(UA_Client *client);

/* Deprecated methods */

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_connect_async(UA_Client *client, const char *endpointUrl) {
    return UA_Client_connectAsync(client, endpointUrl);
}

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_connect_noSession(UA_Client *client, const char *endpointUrl) {
    return UA_Client_connectSecureChannel(client, endpointUrl);
}

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_connect_username(UA_Client *client, const char *endpointUrl,
                           const char *username, const char *password) {
    return UA_Client_connectUsername(client, endpointUrl,
                                     username, password);
}

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_disconnect_async(UA_Client *client, UA_UInt32 *requestId) {
    return UA_Client_disconnect(client);
}

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_close(UA_Client *client) {
    return UA_Client_disconnect(client);
}

/**
 * Discovery
 * --------- */

/* Gets a list of endpoints of a server
 *
 * @param client to use. Must be connected to the same endpoint given in







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







31373
31374
31375
31376
31377
31378
31379





























31380
31381
31382
31383
31384
31385
31386
UA_Client_disconnectAsync(UA_Client *client);

/* Disconnect the SecureChannel but keep the Session intact (if it exists).
 * This is always an async (non-blocking) operation. */
UA_StatusCode UA_EXPORT
UA_Client_disconnectSecureChannel(UA_Client *client);






























/**
 * Discovery
 * --------- */

/* Gets a list of endpoints of a server
 *
 * @param client to use. Must be connected to the same endpoint given in
30571
30572
30573
30574
30575
30576
30577
30578
30579














30580
30581
30582
30583
30584
30585
30586

/**
 * .. _client-async-services:
 *
 * Asynchronous Services
 * ---------------------
 * All OPC UA services are asynchronous in nature. So several service calls can
 * be made without waiting for a response first. Responess may come in a
 * different ordering. */















/* Use the type versions of this method. See below. However, the general
 * mechanism of async service calls is explained here.
 *
 * We say that an async service call has been dispatched once this method
 * returns UA_STATUSCODE_GOOD. If there is an error after an async service has
 * been dispatched, the callback is called with an "empty" response where the







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>







31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660

/**
 * .. _client-async-services:
 *
 * Asynchronous Services
 * ---------------------
 * All OPC UA services are asynchronous in nature. So several service calls can
 * be made without waiting for the individual responses. Depending on the
 * server's priorities responses may come in a different ordering than sent.
 *
 * As noted in :ref:`the client overview<client>` currently no means
 * of handling asynchronous events automatically is provided. However, some
 * synchronous function calls will trigger handling, but to ensure this
 * happens a client should periodically call `UA_Client_run_iterate`
 * explicitly.
 *
 * Connection and session management are also performed in
 * `UA_Client_run_iterate`, so to keep a connection healthy any client need to
 * consider how and when it is appropriate to do the call.
 * This is especially true for the periodic renewal of a SecureChannel's
 * SecurityToken which is designed to have a limited lifetime and will
 * invalidate the connection if not renewed.
 */

/* Use the type versions of this method. See below. However, the general
 * mechanism of async service calls is explained here.
 *
 * We say that an async service call has been dispatched once this method
 * returns UA_STATUSCODE_GOOD. If there is an error after an async service has
 * been dispatched, the callback is called with an "empty" response where the
30616
30617
30618
30619
30620
30621
30622
30623
30624


30625
30626
30627



30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638

/* Listen on the network and process arriving asynchronous responses in the
 * background. Internal housekeeping, renewal of SecureChannels and subscription
 * management is done as well. */
UA_StatusCode UA_EXPORT
UA_Client_run_iterate(UA_Client *client, UA_UInt32 timeout);

UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_runAsync(UA_Client *client, UA_UInt32 timeout) {


    return UA_Client_run_iterate(client, timeout);
}




UA_DEPRECATED static UA_INLINE UA_StatusCode
UA_Client_manuallyRenewSecureChannel(UA_Client *client) {
    return UA_Client_run_iterate(client, 0);
}

/* Use the type versions of this method. See below. However, the general
 * mechanism of async service calls is explained here.
 *
 * We say that an async service call has been dispatched once this method
 * returns UA_STATUSCODE_GOOD. If there is an error after an async service has
 * been dispatched, the callback is called with an "empty" response where the







|
|
>
>
|
<
|
>
>
>
|
|
<
<







31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701

31702
31703
31704
31705
31706
31707


31708
31709
31710
31711
31712
31713
31714

/* Listen on the network and process arriving asynchronous responses in the
 * background. Internal housekeeping, renewal of SecureChannels and subscription
 * management is done as well. */
UA_StatusCode UA_EXPORT
UA_Client_run_iterate(UA_Client *client, UA_UInt32 timeout);

/* Force the manual renewal of the SecureChannel. This is useful to renew the
 * SecureChannel during a downtime when no time-critical operations are
 * performed. This method is asynchronous. The renewal is triggered (the OPN
 * message is sent) but not completed. The OPN response is handled with
 * ``UA_Client_run_iterate`` or a synchronous servica-call operation.

 *
 * @return The return value is UA_STATUSCODE_GOODCALLAGAIN if the SecureChannel
 *         has not elapsed at least 75% of its lifetime. Otherwise the
 *         ``connectStatus`` is returned. */
UA_StatusCode UA_EXPORT
UA_Client_renewSecureChannel(UA_Client *client);



/* Use the type versions of this method. See below. However, the general
 * mechanism of async service calls is explained here.
 *
 * We say that an async service call has been dispatched once this method
 * returns UA_STATUSCODE_GOOD. If there is an error after an async service has
 * been dispatched, the callback is called with an "empty" response where the
30704
30705
30706
30707
30708
30709
30710
30711
30712

30713

30714




30715
30716
30717
30718
30719
30720
30721
UA_Client_changeRepeatedCallbackInterval(UA_Client *client,
                                         UA_UInt64 callbackId,
                                         UA_Double interval_ms);

void UA_EXPORT
UA_Client_removeCallback(UA_Client *client, UA_UInt64 callbackId);

UA_DEPRECATED static UA_INLINE void
UA_Client_removeRepeatedCallback(UA_Client *client, UA_UInt64 callbackId) {

    UA_Client_removeCallback(client, callbackId);

}





/**
 * .. toctree::
 *
 *    client_highlevel
 *    client_subscriptions */








<
<
>
|
>
|
>
>
>
>







31780
31781
31782
31783
31784
31785
31786


31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
UA_Client_changeRepeatedCallbackInterval(UA_Client *client,
                                         UA_UInt64 callbackId,
                                         UA_Double interval_ms);

void UA_EXPORT
UA_Client_removeCallback(UA_Client *client, UA_UInt64 callbackId);



/**
 * Client Utility Functions
 * ------------------------ */

/* Lookup a datatype by its NodeId. Takes the custom types in the client
 * configuration into account. Return NULL if none found. */
UA_EXPORT const UA_DataType *
UA_Client_findDataType(UA_Client *client, const UA_NodeId *typeId);

/**
 * .. toctree::
 *
 *    client_highlevel
 *    client_subscriptions */

31408
31409
31410
31411
31412
31413
31414
31415


31416
31417
31418
31419
31420
31421
31422
 * are used to report back notifications. MonitoredItems are used to generate
 * notifications. Every MonitoredItem is attached to exactly one Subscription.
 * And a Subscription can contain many MonitoredItems.
 *
 * The client automatically processes PublishResponses (with a callback) in the
 * background and keeps enough PublishRequests in transit. The PublishResponses
 * may be recieved during a synchronous service call or in
 * ``UA_Client_runAsync``. */



/* Callbacks defined for Subscriptions */
typedef void (*UA_Client_DeleteSubscriptionCallback)
    (UA_Client *client, UA_UInt32 subId, void *subContext);

typedef void (*UA_Client_StatusChangeNotificationCallback)
    (UA_Client *client, UA_UInt32 subId, void *subContext,







|
>
>







32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
 * are used to report back notifications. MonitoredItems are used to generate
 * notifications. Every MonitoredItem is attached to exactly one Subscription.
 * And a Subscription can contain many MonitoredItems.
 *
 * The client automatically processes PublishResponses (with a callback) in the
 * background and keeps enough PublishRequests in transit. The PublishResponses
 * may be recieved during a synchronous service call or in
 * ``UA_Client_run_iterate``. See more about
 * :ref:`asynchronicity<client-async-services>`.
 */

/* Callbacks defined for Subscriptions */
typedef void (*UA_Client_DeleteSubscriptionCallback)
    (UA_Client *client, UA_UInt32 subId, void *subContext);

typedef void (*UA_Client_StatusChangeNotificationCallback)
    (UA_Client *client, UA_UInt32 subId, void *subContext,
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446

/* Default implementation that accepts all certificates */
UA_EXPORT void
UA_CertificateVerification_AcceptAll(UA_CertificateVerification *cv);

#ifdef UA_ENABLE_ENCRYPTION

const unsigned char *
UA_Bstrstr(const unsigned char *s1, size_t l1, const unsigned char *s2, size_t l2);

/* Accept certificates based on a trust-list and a revocation-list. Based on
 * mbedTLS. */
UA_EXPORT UA_StatusCode
UA_CertificateVerification_Trustlist(UA_CertificateVerification *cv,
                                     const UA_ByteString *certificateTrustList,
                                     size_t certificateTrustListSize,
                                     const UA_ByteString *certificateIssuerList,







<
<
<







33512
33513
33514
33515
33516
33517
33518



33519
33520
33521
33522
33523
33524
33525

/* Default implementation that accepts all certificates */
UA_EXPORT void
UA_CertificateVerification_AcceptAll(UA_CertificateVerification *cv);

#ifdef UA_ENABLE_ENCRYPTION




/* Accept certificates based on a trust-list and a revocation-list. Based on
 * mbedTLS. */
UA_EXPORT UA_StatusCode
UA_CertificateVerification_Trustlist(UA_CertificateVerification *cv,
                                     const UA_ByteString *certificateTrustList,
                                     size_t certificateTrustListSize,
                                     const UA_ByteString *certificateIssuerList,
32638
32639
32640
32641
32642
32643
32644


32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
 *
 * @param conf The configuration to manipulate
 * @param portNumber The port number for the tcp network layer
 * @param sendBufferSize The size in bytes for the network send buffer. Pass 0
 *        to use defaults.
 * @param recvBufferSize The size in bytes for the network receive buffer.
 *        Pass 0 to use defaults.


 */

UA_EXPORT UA_StatusCode
UA_ServerConfig_addNetworkLayerWS(UA_ServerConfig *conf, UA_UInt16 portNumber,
                                  UA_UInt32 sendBufferSize, UA_UInt32 recvBufferSize);
#endif

/* Adds the security policy ``SecurityPolicy#None`` to the server. A
 * server certificate may be supplied but is optional.
 *
 * @param config The configuration to manipulate
 * @param certificate The optional server certificate.







>
>




|







33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
 *
 * @param conf The configuration to manipulate
 * @param portNumber The port number for the tcp network layer
 * @param sendBufferSize The size in bytes for the network send buffer. Pass 0
 *        to use defaults.
 * @param recvBufferSize The size in bytes for the network receive buffer.
 *        Pass 0 to use defaults.
 * @param certificate  certificate data. Pass NULL to disable WS security
 * @param privateKey   privateKey data. Pass NULL to disable WS security
 */

UA_EXPORT UA_StatusCode
UA_ServerConfig_addNetworkLayerWS(UA_ServerConfig *conf, UA_UInt16 portNumber,
                                  UA_UInt32 sendBufferSize, UA_UInt32 recvBufferSize, const UA_ByteString* certificate, const UA_ByteString* privateKey);
#endif

/* Adds the security policy ``SecurityPolicy#None`` to the server. A
 * server certificate may be supplied but is optional.
 *
 * @param config The configuration to manipulate
 * @param certificate The optional server certificate.
32702
32703
32704
32705
32706
32707
32708















32709
32710
32711
32712
32713
32714
32715
 * @param privateKey The private key that corresponds to the certificate.
 */
UA_EXPORT UA_StatusCode
UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, 
                                                const UA_ByteString *certificate,
                                                const UA_ByteString *privateKey);
















/* Adds all supported security policies and sets up certificate
 * validation procedures.
 *
 * Certificate verification should be configured before calling this
 * function. See PKI plugin.
 * 
 * @param config The configuration to manipulate







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
 * @param privateKey The private key that corresponds to the certificate.
 */
UA_EXPORT UA_StatusCode
UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, 
                                                const UA_ByteString *certificate,
                                                const UA_ByteString *privateKey);

/* Adds the security policy ``SecurityPolicy#Aes128Sha256RsaOaep`` to the server. A
 * server certificate may be supplied but is optional.
 *
 * Certificate verification should be configured before calling this
 * function. See PKI plugin.
 *
 * @param config The configuration to manipulate
 * @param certificate The server certificate.
 * @param privateKey The private key that corresponds to the certificate.
 */
UA_EXPORT UA_StatusCode
UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep(UA_ServerConfig *config,
                                                     const UA_ByteString *certificate,
                                                     const UA_ByteString *privateKey);

/* Adds all supported security policies and sets up certificate
 * validation procedures.
 *
 * Certificate verification should be configured before calling this
 * function. See PKI plugin.
 * 
 * @param config The configuration to manipulate
32809
32810
32811
32812
32813
32814
32815






32816
32817
32818
32819
32820
32821
32822
UA_SecurityPolicy_Basic256(UA_SecurityPolicy *policy,
                           const UA_ByteString localCertificate,
                           const UA_ByteString localPrivateKey,
                           const UA_Logger *logger);

UA_EXPORT UA_StatusCode
UA_SecurityPolicy_Basic256Sha256(UA_SecurityPolicy *policy,






                                 const UA_ByteString localCertificate,
                                 const UA_ByteString localPrivateKey,
                                 const UA_Logger *logger);

#endif

_UA_END_DECLS







>
>
>
>
>
>







33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
UA_SecurityPolicy_Basic256(UA_SecurityPolicy *policy,
                           const UA_ByteString localCertificate,
                           const UA_ByteString localPrivateKey,
                           const UA_Logger *logger);

UA_EXPORT UA_StatusCode
UA_SecurityPolicy_Basic256Sha256(UA_SecurityPolicy *policy,
                                 const UA_ByteString localCertificate,
                                 const UA_ByteString localPrivateKey,
                                 const UA_Logger *logger);

UA_EXPORT UA_StatusCode
UA_SecurityPolicy_Aes128Sha256RsaOaep(UA_SecurityPolicy *policy,
                                 const UA_ByteString localCertificate,
                                 const UA_ByteString localPrivateKey,
                                 const UA_Logger *logger);

#endif

_UA_END_DECLS
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340

#define INITIAL_MEMORY_STORE_SIZE 1000

UA_HistoryDataBackend UA_EXPORT
UA_HistoryDataBackend_Memory(size_t initialNodeIdStoreSize, size_t initialDataStoreSize);

void UA_EXPORT
UA_HistoryDataBackend_Memory_deleteMembers(UA_HistoryDataBackend *backend);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/plugins/include/open62541/plugin/pubsub_udp.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.







|







34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442

#define INITIAL_MEMORY_STORE_SIZE 1000

UA_HistoryDataBackend UA_EXPORT
UA_HistoryDataBackend_Memory(size_t initialNodeIdStoreSize, size_t initialDataStoreSize);

void UA_EXPORT
UA_HistoryDataBackend_Memory_clear(UA_HistoryDataBackend *backend);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/plugins/include/open62541/plugin/pubsub_udp.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
33373
33374
33375
33376
33377
33378
33379
33380
33381



33382
33383
33384
33385



33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405

33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
 * @param maxConnections Maximum number of TCP connections this network layer
 *                       instance is allowed to allocate. Set to 0 for unlimited
 *                       number of connections.
 * @param logger Pointer to a logger
 * @return Returns the network layer instance */
UA_ServerNetworkLayer UA_EXPORT
UA_ServerNetworkLayerTCP(UA_ConnectionConfig config, UA_UInt16 port,
                         UA_UInt16 maxConnections, UA_Logger *logger);




UA_Connection UA_EXPORT
UA_ClientConnectionTCP(UA_ConnectionConfig config, const UA_String endpointUrl,
                       UA_UInt32 timeout, UA_Logger *logger);




UA_StatusCode UA_EXPORT
UA_ClientConnectionTCP_poll(UA_Client *client, void *data, UA_UInt32 timeout);

UA_Connection UA_EXPORT
UA_ClientConnectionTCP_init(UA_ConnectionConfig config, const UA_String endpointUrl,
                            UA_UInt32 timeout, UA_Logger *logger);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/architecture_functions.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
 *
 *    Copyright 2018 (c) Jose Cabral, fortiss GmbH
 */

/*
 * This header has all the functions that are architecture dependent. The declaration is behind a ifndef since

 * they can be previously defined in the ua_architecture.h which include this files at the end
 */



_UA_BEGIN_DECLS

/*
 * Allocation functions
 */

#ifndef UA_malloc
void* UA_malloc(size_t size); //allocate memory in the heap with size bytes
#endif

#ifndef UA_calloc
void* UA_calloc(size_t num, size_t size); //allocate memory in the heap with size*num bytes and set the memory to zero
#endif

#ifndef UA_realloc
void* UA_realloc(void *ptr, size_t new_size);//re-allocate memory in the heap with new_size bytes from previously allocated memory ptr
#endif

#ifndef UA_free
void UA_free(void* ptr); //de-allocate memory previously allocated with UA_malloc, UA_calloc or UA_realloc
#endif

#ifndef UA_alloca
# if defined(__GNUC__) || defined(__clang__)
#  define UA_alloca(size) __builtin_alloca (size)
# elif defined(_WIN32)
#  define UA_alloca(SIZE) _alloca(SIZE)
# else
#  include <alloca.h>
#  define UA_alloca(SIZE) alloca(SIZE)
# endif
#endif

#ifndef UA_STACKARRAY
/* Stack-allocation of memory. Use C99 variable-length arrays if possible.
 * Otherwise revert to alloca. Note that alloca is not supported on some
 * plattforms. */
# if defined(__GNUC__) || defined(__clang__)
#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
# else
#  define UA_STACKARRAY(TYPE, NAME, SIZE) \
    TYPE *NAME = (TYPE*)UA_alloca(sizeof(TYPE) * SIZE)
# endif
#endif

/*
 * Sleep function
 */

#ifndef UA_sleep_ms
int UA_sleep_ms(unsigned int miliSeconds); //suspend the thread for a certain amount of mili seconds
#endif

/*
 * Socket functions
 */

#ifndef UA_send
ssize_t UA_send(UA_SOCKET sockfd, const void *buf, size_t len, int flags); //equivalent to posix send implementation
#endif

#ifndef UA_sendto
ssize_t sendto(UA_SOCKET sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); //equivalent to posix sendto implementation
#endif







|

>
>
>

|
|

>
>
>

|
<
<
<
|













|
>
|






<
|
<
<
















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<




<
|
<
<







34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495



34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518

34519


34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
























34536


34537
34538
34539
34540

34541


34542
34543
34544
34545
34546
34547
34548
 * @param maxConnections Maximum number of TCP connections this network layer
 *                       instance is allowed to allocate. Set to 0 for unlimited
 *                       number of connections.
 * @param logger Pointer to a logger
 * @return Returns the network layer instance */
UA_ServerNetworkLayer UA_EXPORT
UA_ServerNetworkLayerTCP(UA_ConnectionConfig config, UA_UInt16 port,
                         UA_UInt16 maxConnections);

/* Open a non-blocking client TCP socket. The connection might not be fully
 * opened yet. Drop into the _poll function withe a timeout to complete the
 * connection. */
UA_Connection UA_EXPORT
UA_ClientConnectionTCP_init(UA_ConnectionConfig config, const UA_String endpointUrl,
                            UA_UInt32 timeout, const UA_Logger *logger);

/* Wait for a half-opened connection to fully open. Returns UA_STATUSCODE_GOOD
 * even if the timeout was hit. Returns UA_STATUSCODE_BADDISCONNECT if the
 * connection is lost. */
UA_StatusCode UA_EXPORT
UA_ClientConnectionTCP_poll(UA_Connection *connection, UA_UInt32 timeout,



                            const UA_Logger *logger);

_UA_END_DECLS


/*********************************** amalgamated original file "/open62541/include/open62541/architecture_functions.h" ***********************************/

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
 *
 *    Copyright 2018 (c) Jose Cabral, fortiss GmbH
 */

/*
 * This header has all the functions that are architecture dependent. The
 * declaration is behind a ifndef since they can be previously defined in the
 * ua_architecture.h which include this files at the end
 */



_UA_BEGIN_DECLS


/* Allocation functions */


#ifndef UA_malloc
void* UA_malloc(size_t size); //allocate memory in the heap with size bytes
#endif

#ifndef UA_calloc
void* UA_calloc(size_t num, size_t size); //allocate memory in the heap with size*num bytes and set the memory to zero
#endif

#ifndef UA_realloc
void* UA_realloc(void *ptr, size_t new_size);//re-allocate memory in the heap with new_size bytes from previously allocated memory ptr
#endif

#ifndef UA_free
void UA_free(void* ptr); //de-allocate memory previously allocated with UA_malloc, UA_calloc or UA_realloc
#endif

























/* Sleep function */


#ifndef UA_sleep_ms
int UA_sleep_ms(unsigned int miliSeconds); //suspend the thread for a certain amount of mili seconds
#endif


/* Socket functions */


#ifndef UA_send
ssize_t UA_send(UA_SOCKET sockfd, const void *buf, size_t len, int flags); //equivalent to posix send implementation
#endif

#ifndef UA_sendto
ssize_t sendto(UA_SOCKET sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); //equivalent to posix sendto implementation
#endif
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588



33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
void UA_initialize_architecture_network(void);//initializes all needed for using the network interfaces
#endif

#ifndef UA_deinitialize_architecture_network
void UA_deinitialize_architecture_network(void);//de-initializes the network interfaces
#endif

/*
 * Print function
 */
#ifndef UA_snprintf
int UA_snprintf(char* pa_stream, size_t pa_size, const char* pa_format, ...); //prints text to output
#endif




/*
 * Access to file function
 */

#ifndef UA_access
int UA_access(const char *pathname, int mode); //equivalent implementation of https://linux.die.net/man/2/access
#endif

#ifndef UA_fileExists
#define UA_fileExists(X) ( UA_access(X, 0) == 0)
#endif







<
|
<




>
>
>
|
|
<
<







34649
34650
34651
34652
34653
34654
34655

34656

34657
34658
34659
34660
34661
34662
34663
34664
34665


34666
34667
34668
34669
34670
34671
34672
void UA_initialize_architecture_network(void);//initializes all needed for using the network interfaces
#endif

#ifndef UA_deinitialize_architecture_network
void UA_deinitialize_architecture_network(void);//de-initializes the network interfaces
#endif


/* Print function */

#ifndef UA_snprintf
int UA_snprintf(char* pa_stream, size_t pa_size, const char* pa_format, ...); //prints text to output
#endif

#ifndef UA_strncasecmp
int UA_strncasecmp(const char* s1, const char* s2, size_t n);
#endif

/* Access to file function */


#ifndef UA_access
int UA_access(const char *pathname, int mode); //equivalent implementation of https://linux.die.net/man/2/access
#endif

#ifndef UA_fileExists
#define UA_fileExists(X) ( UA_access(X, 0) == 0)
#endif
Changes to jni/topcua/open62541/open62541.pdf.

cannot compute difference between binary files

Changes to jni/topcua/topcua.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22



23
24
25
26
27
28
29
/*
 * topcua.c --
 *
 *	This file contains a proof of concept Tcl binding to the
 *	open62541 OPC/UA library (client and server).
 *
 * Copyright (c) 2018-2020 Christian Werner <chw at ch minus werner dot de>
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include <tcl.h>
#include <string.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>

#include "open62541.h"

#if (UA_OPEN62541_VER_MAJOR < 1)
#error "need open62541 version 1.0 or newer"



#endif

#define INT2PTR(p) ((void *)(intptr_t)(p))
#define PTR2INT(p) ((int)(intptr_t)(p))

/*
 * Structure representing one Subscription context.






|














|
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * topcua.c --
 *
 *	This file contains a proof of concept Tcl binding to the
 *	open62541 OPC/UA library (client and server).
 *
 * Copyright (c) 2018-2021 Christian Werner <chw at ch minus werner dot de>
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#include <tcl.h>
#include <string.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>

#include "open62541.h"

#if (UA_OPEN62541_VER_MAJOR < 1)
#error "need open62541 version 1.1 or newer"
#endif
#if (UA_OPEN62541_VER_MAJOR == 1) && (UA_OPEN62541_VER_MINOR < 1)
#error "need open62541 version 1.1 or newer"
#endif

#define INT2PTR(p) ((void *)(intptr_t)(p))
#define PTR2INT(p) ((int)(intptr_t)(p))

/*
 * Structure representing one Subscription context.
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
    UAM *mon = (UAM *) monctx;
    int i;

    hPtr = Tcl_FindHashEntry(&sub->monitors, INT2PTR(monid));
    if (hPtr != NULL) {
	Tcl_CancelIdleCall(MonIdleProc, (ClientData) mon);
	Tcl_DeleteHashEntry(hPtr);
	UA_NodeId_deleteMembers(&mon->nodeid);
	if (mon->dv != NULL) {
	    UA_DataValue_delete(mon->dv);
	    mon->dv = NULL;
	}
	if (mon->vv != NULL) {
	    UA_Array_delete(mon->vv, mon->vvSize, &UA_TYPES[UA_TYPES_VARIANT]);
	    mon->vvSize = 0;







|







846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
    UAM *mon = (UAM *) monctx;
    int i;

    hPtr = Tcl_FindHashEntry(&sub->monitors, INT2PTR(monid));
    if (hPtr != NULL) {
	Tcl_CancelIdleCall(MonIdleProc, (ClientData) mon);
	Tcl_DeleteHashEntry(hPtr);
	UA_NodeId_clear(&mon->nodeid);
	if (mon->dv != NULL) {
	    UA_DataValue_delete(mon->dv);
	    mon->dv = NULL;
	}
	if (mon->vv != NULL) {
	    UA_Array_delete(mon->vv, mon->vvSize, &UA_TYPES[UA_TYPES_VARIANT]);
	    mon->vvSize = 0;
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
	hPtr = Tcl_NextHashEntry(&search);
    }
    hPtr = Tcl_FirstHashEntry(&uah->mons, &search);
    while (hPtr != NULL) {
	UAM *mon = (UAM *) Tcl_GetHashValue(hPtr);

	Tcl_DeleteHashEntry(hPtr);
	UA_NodeId_deleteMembers(&mon->nodeid);
	for (i = 0; i < mon->nCmdObjs; i++) {
	    Tcl_DecrRefCount(mon->cmdObjs[i]);
	}
	if (mon->cmdObjs != NULL) {
	    ckfree((char *) mon->cmdObjs);
	}
	ckfree((char *) mon);







|







1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
	hPtr = Tcl_NextHashEntry(&search);
    }
    hPtr = Tcl_FirstHashEntry(&uah->mons, &search);
    while (hPtr != NULL) {
	UAM *mon = (UAM *) Tcl_GetHashValue(hPtr);

	Tcl_DeleteHashEntry(hPtr);
	UA_NodeId_clear(&mon->nodeid);
	for (i = 0; i < mon->nCmdObjs; i++) {
	    Tcl_DecrRefCount(mon->cmdObjs[i]);
	}
	if (mon->cmdObjs != NULL) {
	    ckfree((char *) mon->cmdObjs);
	}
	ckfree((char *) mon);
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
		for (j = 0; j < typesSize; j++) {
		    if (UA_NodeId_equal(&types[j].typeId, &nodeid)) {
			type = &types[j];
			break;
		    }
		}
	    }
	    UA_NodeId_deleteMembers(&nodeid);
	}
    }
    return type;
}

/*
 *-------------------------------------------------------------------------







|







1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
		for (j = 0; j < typesSize; j++) {
		    if (UA_NodeId_equal(&types[j].typeId, &nodeid)) {
			type = &types[j];
			break;
		    }
		}
	    }
	    UA_NodeId_clear(&nodeid);
	}
    }
    return type;
}

/*
 *-------------------------------------------------------------------------
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
static int
NodeConstructor0(Tcl_Event *evPtr, int flags)
{
    UAEVT *uaevt = (UAEVT *) evPtr;
    UAH *uah = uaevt->uah;

    NodeAdded(uah, &uaevt->nodeCopy);
    UA_NodeId_deleteMembers(&uaevt->nodeCopy);
    return 1;
}
#endif

static UA_StatusCode
NodeConstructor(UA_Server *server,
		const UA_NodeId *sessionId, void *sessionContext,







|







4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
static int
NodeConstructor0(Tcl_Event *evPtr, int flags)
{
    UAEVT *uaevt = (UAEVT *) evPtr;
    UAH *uah = uaevt->uah;

    NodeAdded(uah, &uaevt->nodeCopy);
    UA_NodeId_clear(&uaevt->nodeCopy);
    return 1;
}
#endif

static UA_StatusCode
NodeConstructor(UA_Server *server,
		const UA_NodeId *sessionId, void *sessionContext,
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
static int
NodeDestructor0(Tcl_Event *evPtr, int flags)
{
    UAEVT *uaevt = (UAEVT *) evPtr;
    UAH *uah = uaevt->uah;

    NodeDeleted(uah, &uaevt->nodeCopy);
    UA_NodeId_deleteMembers(&uaevt->nodeCopy);
    return 1;
}
#endif

static void
NodeDestructor(UA_Server *server,
	       const UA_NodeId *sessionId, void *sessionContext,







|







4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
static int
NodeDestructor0(Tcl_Event *evPtr, int flags)
{
    UAEVT *uaevt = (UAEVT *) evPtr;
    UAH *uah = uaevt->uah;

    NodeDeleted(uah, &uaevt->nodeCopy);
    UA_NodeId_clear(&uaevt->nodeCopy);
    return 1;
}
#endif

static void
NodeDestructor(UA_Server *server,
	       const UA_NodeId *sessionId, void *sessionContext,
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
	    }
	    goto doScalar;
	}
	if (meth->outArgs[i].valueRank == -1) {
doScalar:
	    d = EncodeFromObj(interp, uai, uah, type, NULL, elem[i], 0);
	    if (d == NULL) {
		UA_Variant_deleteMembers(output);
		ret = TCL_ERROR;
		goto error;
	    }
	    UA_Variant_setScalar(&output[i], d, type);
	} else {
doArray:
	    ret = Tcl_ListObjGetElements(interp, elem[i], &n, &subElem);
	    if (ret != TCL_OK) {
		UA_Variant_deleteMembers(output);
		goto error;
	    }
	    a = UA_Array_new(n, type);
	    if (a == NULL) {
		Tcl_SetResult(interp, "out of memory", TCL_STATIC);
		UA_Variant_deleteMembers(output);
		ret = TCL_ERROR;
		goto error;
	    }
	    for (j = 0, p = (char *) a; j < n; j++) {
		d = EncodeFromObj(interp, uai, uah, type, NULL, subElem[j], 0);
		if (d == NULL) {
		    UA_Array_delete(a, n, type);
		    UA_Variant_deleteMembers(output);
		    ret = TCL_ERROR;
		    goto error;
		}
		UA_copy(d, p, type);
		p += type->memSize;
	    }
	    UA_Variant_setArray(&output[i], a, n, type);







|








|





|







|







4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
	    }
	    goto doScalar;
	}
	if (meth->outArgs[i].valueRank == -1) {
doScalar:
	    d = EncodeFromObj(interp, uai, uah, type, NULL, elem[i], 0);
	    if (d == NULL) {
		UA_Variant_clear(output);
		ret = TCL_ERROR;
		goto error;
	    }
	    UA_Variant_setScalar(&output[i], d, type);
	} else {
doArray:
	    ret = Tcl_ListObjGetElements(interp, elem[i], &n, &subElem);
	    if (ret != TCL_OK) {
		UA_Variant_clear(output);
		goto error;
	    }
	    a = UA_Array_new(n, type);
	    if (a == NULL) {
		Tcl_SetResult(interp, "out of memory", TCL_STATIC);
		UA_Variant_clear(output);
		ret = TCL_ERROR;
		goto error;
	    }
	    for (j = 0, p = (char *) a; j < n; j++) {
		d = EncodeFromObj(interp, uai, uah, type, NULL, subElem[j], 0);
		if (d == NULL) {
		    UA_Array_delete(a, n, type);
		    UA_Variant_clear(output);
		    ret = TCL_ERROR;
		    goto error;
		}
		UA_copy(d, p, type);
		p += type->memSize;
	    }
	    UA_Variant_setArray(&output[i], a, n, type);
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
		UA_Array_delete(a, n, type);
		ret = TCL_ERROR;
		goto error;
	    }
	    UA_copy(d, p, type);
	    p += type->memSize;
	}
	UA_Variant_deleteMembers(&value->value);
	UA_Variant_setArray(&value->value, a, n, type);
	ret = TCL_OK;
    } else if (ret == TCL_OK) {
	void *d = EncodeFromObj(interp, uai, uah, type, NULL,
				Tcl_GetObjResult(interp), 0);

	if (d == NULL) {
	    ret = TCL_ERROR;
	    goto error;
	}
	UA_Variant_deleteMembers(&value->value);
	UA_Variant_setScalar(&value->value, d, type);
	ret = TCL_OK;
    }
    if (ret == TCL_OK) {
	uaret = UA_STATUSCODE_GOOD;
	value->status = UA_STATUSCODE_GOOD;
	if (srcTimestamp) {







|










|







5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
		UA_Array_delete(a, n, type);
		ret = TCL_ERROR;
		goto error;
	    }
	    UA_copy(d, p, type);
	    p += type->memSize;
	}
	UA_Variant_clear(&value->value);
	UA_Variant_setArray(&value->value, a, n, type);
	ret = TCL_OK;
    } else if (ret == TCL_OK) {
	void *d = EncodeFromObj(interp, uai, uah, type, NULL,
				Tcl_GetObjResult(interp), 0);

	if (d == NULL) {
	    ret = TCL_ERROR;
	    goto error;
	}
	UA_Variant_clear(&value->value);
	UA_Variant_setScalar(&value->value, d, type);
	ret = TCL_OK;
    }
    if (ret == TCL_OK) {
	uaret = UA_STATUSCODE_GOOD;
	value->status = UA_STATUSCODE_GOOD;
	if (srcTimestamp) {
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
	return TCL_ERROR;
    }
    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	return TCL_ERROR;
    }
    if ((objc > 3) && (Tcl_GetIndexFromObj(interp, objv[3], dirNames, "dir",
					   0, &dir) != TCL_OK)) {
	UA_NodeId_deleteMembers(&nodeid);
	return TCL_ERROR;
    }
    refid = UA_NODEID_NULL;
    if (objc > 4) {
	char *ref = Tcl_GetString(objv[4]);

	if ((ref[0] != '\0') &&
	    (ParseRefTypeOrNodeId(interp, uai, &refid, ref) == NULL)) {
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
    }
    for (i = 5; i < objc; i++) {
	UA_NodeClass ncln;

	if (GetNodeClass(interp, objv[i], &ncln) != TCL_OK) {
	    ReportError(interp, uai, NULL, 0);
	    UA_NodeId_deleteMembers(&nodeid);
	    UA_NodeId_deleteMembers(&refid);
	    return TCL_ERROR;
	}
	ncls |= ncln;
    }
    UA_BrowseRequest_init(&brq);
    brq.requestedMaxReferencesPerNode = 0;
    brq.nodesToBrowse = UA_BrowseDescription_new();







|








|








|
|







6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
	return TCL_ERROR;
    }
    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	return TCL_ERROR;
    }
    if ((objc > 3) && (Tcl_GetIndexFromObj(interp, objv[3], dirNames, "dir",
					   0, &dir) != TCL_OK)) {
	UA_NodeId_clear(&nodeid);
	return TCL_ERROR;
    }
    refid = UA_NODEID_NULL;
    if (objc > 4) {
	char *ref = Tcl_GetString(objv[4]);

	if ((ref[0] != '\0') &&
	    (ParseRefTypeOrNodeId(interp, uai, &refid, ref) == NULL)) {
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
    }
    for (i = 5; i < objc; i++) {
	UA_NodeClass ncln;

	if (GetNodeClass(interp, objv[i], &ncln) != TCL_OK) {
	    ReportError(interp, uai, NULL, 0);
	    UA_NodeId_clear(&nodeid);
	    UA_NodeId_clear(&refid);
	    return TCL_ERROR;
	}
	ncls |= ncln;
    }
    UA_BrowseRequest_init(&brq);
    brq.requestedMaxReferencesPerNode = 0;
    brq.nodesToBrowse = UA_BrowseDescription_new();
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
		AddRefDescrToList(uai, list, &br.results[i].references[j]);
	    }
	}
	if (br.resultsSize > 0) {
	    cp = br.results[0].continuationPoint;
	    br.results[0].continuationPoint = UA_BYTESTRING_NULL;
	}
	UA_BrowseResponse_deleteMembers(&br);
    } else {
	UA_BrowseResult br;

	br = UA_Server_browse(uah->server,
			      brq.requestedMaxReferencesPerNode,
			      brq.nodesToBrowse);
	for (j = 0; j < br.referencesSize; j++) {
	    AddRefDescrToList(uai, list, &br.references[j]);
	}
	cp = br.continuationPoint;
	br.continuationPoint = UA_BYTESTRING_NULL;
	UA_BrowseResult_deleteMembers(&br);
    }
    UA_BrowseRequest_deleteMembers(&brq);
    while (cp.length > 0) {
	UA_BrowseNextRequest bnrq;

	UA_BrowseNextRequest_init(&bnrq);
	bnrq.releaseContinuationPoints = UA_FALSE;
	bnrq.continuationPointsSize = 1;
	bnrq.continuationPoints = &cp;
	if (uah->client != NULL) {
	    UA_BrowseNextResponse bnr;

	    bnr = UA_Client_Service_browseNext(uah->client, bnrq);
	    for (i = 0; i < bnr.resultsSize; i++) {
		for (j = 0; j < bnr.results[i].referencesSize; j++) {
		    AddRefDescrToList(uai, list, &bnr.results[i].references[j]);
		}
	    }
	    UA_ByteString_deleteMembers(&cp);
	    cp = UA_BYTESTRING_NULL;
	    if (bnr.resultsSize > 0) {
		cp = bnr.results[0].continuationPoint;
		bnr.results[0].continuationPoint = UA_BYTESTRING_NULL;
	    }
	    UA_BrowseNextResponse_deleteMembers(&bnr);
	} else {
	    UA_BrowseResult br;

	    br = UA_Server_browseNext(uah->server,
				      bnrq.releaseContinuationPoints,
				      &cp);
	    for (j = 0; j < br.referencesSize; j++) {
		AddRefDescrToList(uai, list, &br.references[j]);
	    }
	    UA_ByteString_deleteMembers(&cp);
	    cp = UA_BYTESTRING_NULL;
	    cp = br.continuationPoint;
	    br.continuationPoint = UA_BYTESTRING_NULL;
	    UA_BrowseResult_deleteMembers(&br);
	}
	UA_BrowseNextRequest_deleteMembers(&bnrq);
    }
    UA_ByteString_deleteMembers(&cp);
    Tcl_SetObjResult(interp, list);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *







|











|

|
















|





|









|



|

|

|







6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
		AddRefDescrToList(uai, list, &br.results[i].references[j]);
	    }
	}
	if (br.resultsSize > 0) {
	    cp = br.results[0].continuationPoint;
	    br.results[0].continuationPoint = UA_BYTESTRING_NULL;
	}
	UA_BrowseResponse_clear(&br);
    } else {
	UA_BrowseResult br;

	br = UA_Server_browse(uah->server,
			      brq.requestedMaxReferencesPerNode,
			      brq.nodesToBrowse);
	for (j = 0; j < br.referencesSize; j++) {
	    AddRefDescrToList(uai, list, &br.references[j]);
	}
	cp = br.continuationPoint;
	br.continuationPoint = UA_BYTESTRING_NULL;
	UA_BrowseResult_clear(&br);
    }
    UA_BrowseRequest_clear(&brq);
    while (cp.length > 0) {
	UA_BrowseNextRequest bnrq;

	UA_BrowseNextRequest_init(&bnrq);
	bnrq.releaseContinuationPoints = UA_FALSE;
	bnrq.continuationPointsSize = 1;
	bnrq.continuationPoints = &cp;
	if (uah->client != NULL) {
	    UA_BrowseNextResponse bnr;

	    bnr = UA_Client_Service_browseNext(uah->client, bnrq);
	    for (i = 0; i < bnr.resultsSize; i++) {
		for (j = 0; j < bnr.results[i].referencesSize; j++) {
		    AddRefDescrToList(uai, list, &bnr.results[i].references[j]);
		}
	    }
	    UA_ByteString_clear(&cp);
	    cp = UA_BYTESTRING_NULL;
	    if (bnr.resultsSize > 0) {
		cp = bnr.results[0].continuationPoint;
		bnr.results[0].continuationPoint = UA_BYTESTRING_NULL;
	    }
	    UA_BrowseNextResponse_clear(&bnr);
	} else {
	    UA_BrowseResult br;

	    br = UA_Server_browseNext(uah->server,
				      bnrq.releaseContinuationPoints,
				      &cp);
	    for (j = 0; j < br.referencesSize; j++) {
		AddRefDescrToList(uai, list, &br.references[j]);
	    }
	    UA_ByteString_clear(&cp);
	    cp = UA_BYTESTRING_NULL;
	    cp = br.continuationPoint;
	    br.continuationPoint = UA_BYTESTRING_NULL;
	    UA_BrowseResult_clear(&br);
	}
	UA_BrowseNextRequest_clear(&bnrq);
    }
    UA_ByteString_clear(&cp);
    Tcl_SetObjResult(interp, list);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
	id = Tcl_GetString(objv[i * 2 + 3]);
	elem->isInverse = (id[0] == '!') ? UA_TRUE : UA_FALSE;
	if (elem->isInverse) {
	    id++;
	}
	if (ParseRefTypeOrNodeId(interp, uai, &elem->referenceTypeId, id)
	    == NULL) {
	    UA_BrowsePath_deleteMembers(&bp);
	    return TCL_ERROR;
	}
	if (ParseQualifiedName(interp, uai, &elem->targetName,
			       Tcl_GetString(objv[i * 2 + 4])) == NULL) {
	    UA_BrowsePath_deleteMembers(&bp);
	    return TCL_ERROR;
	}
    }
    UA_TranslateBrowsePathsToNodeIdsRequest_init(&bprq);
    bprq.browsePaths = &bp;
    bprq.browsePathsSize = 1;
    if (uah->client != NULL) {
	UA_TranslateBrowsePathsToNodeIdsResponse bpr;

	bpr = UA_Client_Service_translateBrowsePathsToNodeIds(uah->client,
							      bprq);
	uaret = bpr.responseHeader.serviceResult;
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_BrowsePath_deleteMembers(&bp);
	    UA_TranslateBrowsePathsToNodeIdsResponse_deleteMembers(&bpr);
	    ReportError(interp, uai, "TranslateBrowsePathToNodeIds", uaret);
	    return TCL_ERROR;
	}
	/* Should have zero or one results. */
	if (bpr.resultsSize == 0) {
	    UA_TranslateBrowsePathsToNodeIdsResponse_deleteMembers(&bpr);
	    goto done;
	}
	if (bpr.resultsSize > 1) {
	    UA_BrowsePathResult_copy(&bpr.results[0], &r);
	} else {
	    r = bpr.results[0];
	    bpr.resultsSize = 0;
	    bpr.results = NULL;
	}
	UA_TranslateBrowsePathsToNodeIdsResponse_deleteMembers(&bpr);
    } else {
	r = UA_Server_translateBrowsePathToNodeIds(uah->server, &bp);
    }
    if (r.statusCode != UA_STATUSCODE_GOOD) {
	uaret = r.statusCode;
	UA_BrowsePath_deleteMembers(&bp);
	UA_BrowsePathResult_deleteMembers(&r);
	ReportError(interp, uai, "TranslateBrowsePathToNodeIds", uaret);
	return TCL_ERROR;
    }
    list = Tcl_NewListObj(0, NULL);
    for (i = 0; i < r.targetsSize; i++) {
	UA_ExpandedNodeId *e = &r.targets[i].targetId;
	Tcl_DString ds;
	char *p;

	p = PrintNodeId(uai, &e->nodeId, &ds);
	Tcl_ListObjAppendElement(NULL, list, Tcl_NewStringObj(p, -1));
	Tcl_DStringFree(&ds);
	Tcl_ListObjAppendElement(NULL, list,
	    Tcl_NewStringObj((char *) e->namespaceUri.data,
			     e->namespaceUri.length));
	Tcl_ListObjAppendElement(NULL, list, Tcl_NewIntObj(e->serverIndex));
    }
    Tcl_SetObjResult(interp, list);
done:
    UA_BrowsePath_deleteMembers(&bp);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
 * AttrsObjCmd --







|




|













|
|





|









|





|
|



















|







6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
	id = Tcl_GetString(objv[i * 2 + 3]);
	elem->isInverse = (id[0] == '!') ? UA_TRUE : UA_FALSE;
	if (elem->isInverse) {
	    id++;
	}
	if (ParseRefTypeOrNodeId(interp, uai, &elem->referenceTypeId, id)
	    == NULL) {
	    UA_BrowsePath_clear(&bp);
	    return TCL_ERROR;
	}
	if (ParseQualifiedName(interp, uai, &elem->targetName,
			       Tcl_GetString(objv[i * 2 + 4])) == NULL) {
	    UA_BrowsePath_clear(&bp);
	    return TCL_ERROR;
	}
    }
    UA_TranslateBrowsePathsToNodeIdsRequest_init(&bprq);
    bprq.browsePaths = &bp;
    bprq.browsePathsSize = 1;
    if (uah->client != NULL) {
	UA_TranslateBrowsePathsToNodeIdsResponse bpr;

	bpr = UA_Client_Service_translateBrowsePathsToNodeIds(uah->client,
							      bprq);
	uaret = bpr.responseHeader.serviceResult;
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_BrowsePath_clear(&bp);
	    UA_TranslateBrowsePathsToNodeIdsResponse_clear(&bpr);
	    ReportError(interp, uai, "TranslateBrowsePathToNodeIds", uaret);
	    return TCL_ERROR;
	}
	/* Should have zero or one results. */
	if (bpr.resultsSize == 0) {
	    UA_TranslateBrowsePathsToNodeIdsResponse_clear(&bpr);
	    goto done;
	}
	if (bpr.resultsSize > 1) {
	    UA_BrowsePathResult_copy(&bpr.results[0], &r);
	} else {
	    r = bpr.results[0];
	    bpr.resultsSize = 0;
	    bpr.results = NULL;
	}
	UA_TranslateBrowsePathsToNodeIdsResponse_clear(&bpr);
    } else {
	r = UA_Server_translateBrowsePathToNodeIds(uah->server, &bp);
    }
    if (r.statusCode != UA_STATUSCODE_GOOD) {
	uaret = r.statusCode;
	UA_BrowsePath_clear(&bp);
	UA_BrowsePathResult_clear(&r);
	ReportError(interp, uai, "TranslateBrowsePathToNodeIds", uaret);
	return TCL_ERROR;
    }
    list = Tcl_NewListObj(0, NULL);
    for (i = 0; i < r.targetsSize; i++) {
	UA_ExpandedNodeId *e = &r.targets[i].targetId;
	Tcl_DString ds;
	char *p;

	p = PrintNodeId(uai, &e->nodeId, &ds);
	Tcl_ListObjAppendElement(NULL, list, Tcl_NewStringObj(p, -1));
	Tcl_DStringFree(&ds);
	Tcl_ListObjAppendElement(NULL, list,
	    Tcl_NewStringObj((char *) e->namespaceUri.data,
			     e->namespaceUri.length));
	Tcl_ListObjAppendElement(NULL, list, Tcl_NewIntObj(e->serverIndex));
    }
    Tcl_SetObjResult(interp, list);
done:
    UA_BrowsePath_clear(&bp);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
 * AttrsObjCmd --
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;
	    UA_ReadValueId item;
	    UA_ReadRequest req;

	    UA_DataValue_deleteMembers(&value);
	    UA_ReadValueId_init(&item);
	    UA_ReadRequest_init(&req);
	    item.nodeId = nodeid;
	    item.attributeId = attr;
	    req.nodesToRead = &item;
	    req.nodesToReadSize = 1;
	    if (Tcl_ListObjGetElements(interp, objv[4], &n, &elem) != TCL_OK) {







|







7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;
	    UA_ReadValueId item;
	    UA_ReadRequest req;

	    UA_DataValue_clear(&value);
	    UA_ReadValueId_init(&item);
	    UA_ReadRequest_init(&req);
	    item.nodeId = nodeid;
	    item.attributeId = attr;
	    req.nodesToRead = &item;
	    req.nodesToReadSize = 1;
	    if (Tcl_ListObjGetElements(interp, objv[4], &n, &elem) != TCL_OK) {
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
	    uaret =
		__UA_Client_AsyncService(uah->client, &req,
					 &UA_TYPES[UA_TYPES_READREQUEST],
					 ClientAsyncRWCallback,
					 &UA_TYPES[UA_TYPES_READRESPONSE],
					 (uaq == NULL) ? NULL : uah,
					 reqidPtr);
	    UA_NodeId_deleteMembers(&nodeid);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);
		    ckfree((char *) uaq);







|







7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
	    uaret =
		__UA_Client_AsyncService(uah->client, &req,
					 &UA_TYPES[UA_TYPES_READREQUEST],
					 ClientAsyncRWCallback,
					 &UA_TYPES[UA_TYPES_READRESPONSE],
					 (uaq == NULL) ? NULL : uah,
					 reqidPtr);
	    UA_NodeId_clear(&nodeid);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);
		    ckfree((char *) uaq);
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
	UA_ReadValueId_init(&rv);
	rv.nodeId = nodeid;
	rv.attributeId = (UA_AttributeId) attr;
	value = UA_Server_read(uah->server, &rv,
			       UA_TIMESTAMPSTORETURN_NEITHER);
	uaret = value.status;
    }
    UA_NodeId_deleteMembers(&nodeid);
    if (uaret != UA_STATUSCODE_GOOD) {
	UA_DataValue_deleteMembers(&value);
	ReportError(interp, uai, "ReadAttribute", uaret);
	return TCL_ERROR;
    }
    if (isType) {
	Tcl_DString ds;

	Tcl_DStringInit(&ds);







|

|







7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
	UA_ReadValueId_init(&rv);
	rv.nodeId = nodeid;
	rv.attributeId = (UA_AttributeId) attr;
	value = UA_Server_read(uah->server, &rv,
			       UA_TIMESTAMPSTORETURN_NEITHER);
	uaret = value.status;
    }
    UA_NodeId_clear(&nodeid);
    if (uaret != UA_STATUSCODE_GOOD) {
	UA_DataValue_clear(&value);
	ReportError(interp, uai, "ReadAttribute", uaret);
	return TCL_ERROR;
    }
    if (isType) {
	Tcl_DString ds;

	Tcl_DStringInit(&ds);
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
	    }
	    Tcl_SetObjResult(interp, obj);
	} else {
	    Tcl_SetObjResult(interp,
		DecodeToObj(uai, &UA_TYPES[UA_TYPES_VARIANT], &value.value, 0));
	}
    }
    UA_DataValue_deleteMembers(&value);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
 * ReadObjCmd --







|







7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
	    }
	    Tcl_SetObjResult(interp, obj);
	} else {
	    Tcl_SetObjResult(interp,
		DecodeToObj(uai, &UA_TYPES[UA_TYPES_VARIANT], &value.value, 0));
	}
    }
    UA_DataValue_clear(&value);
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
 * ReadObjCmd --
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
    }
    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	return TCL_ERROR;
    }
    if (objc > 5) {
	if (Tcl_GetIndexFromObj(interp, objv[3], attrNames, "attr", 0,
				&attr) != TCL_OK) {
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	/* UA_AttributeId is 1-based */
	attr += UA_ATTRIBUTEID_NODEID;
	idx = 4;
    } else {
	/* By default, write the "value" attribute. */







|







7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
    }
    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	return TCL_ERROR;
    }
    if (objc > 5) {
	if (Tcl_GetIndexFromObj(interp, objv[3], attrNames, "attr", 0,
				&attr) != TCL_OK) {
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	/* UA_AttributeId is 1-based */
	attr += UA_ATTRIBUTEID_NODEID;
	idx = 4;
    } else {
	/* By default, write the "value" attribute. */
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
	    uaret = UA_Client_readValueRankAttribute(uah->client, nodeid, &vr);
	} else {
	    uaret = UA_Server_readValueRank(uah->server, nodeid, &vr);
	}
	if (uaret != UA_STATUSCODE_GOOD) {
	    Tcl_SetResult(interp, "cannot get value rank", TCL_STATIC);
	    ReportError(interp, uai, "ReadValueRank", uaret);
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
    }
    idx++;
    if (vr >= 0) {
	/* An array, thus process a list. */
	void *vdata;
	Tcl_Obj **elem;

	if (Tcl_ListObjGetElements(interp, objv[idx], &n, &elem) != TCL_OK) {
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	vdata = UA_Array_new(n, type);
	if (vdata == NULL) {
	    Tcl_SetResult(interp, "out of memory", TCL_STATIC);
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	for (j = 0; j < n; j++) {
	    void *vv = EncodeFromObj(interp, uai, uah, type, NULL, elem[j], 0);

	    if (vv == NULL) {
		UA_Array_delete(vdata, n, type);







|










|





|







7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
	    uaret = UA_Client_readValueRankAttribute(uah->client, nodeid, &vr);
	} else {
	    uaret = UA_Server_readValueRank(uah->server, nodeid, &vr);
	}
	if (uaret != UA_STATUSCODE_GOOD) {
	    Tcl_SetResult(interp, "cannot get value rank", TCL_STATIC);
	    ReportError(interp, uai, "ReadValueRank", uaret);
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
    }
    idx++;
    if (vr >= 0) {
	/* An array, thus process a list. */
	void *vdata;
	Tcl_Obj **elem;

	if (Tcl_ListObjGetElements(interp, objv[idx], &n, &elem) != TCL_OK) {
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	vdata = UA_Array_new(n, type);
	if (vdata == NULL) {
	    Tcl_SetResult(interp, "out of memory", TCL_STATIC);
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	for (j = 0; j < n; j++) {
	    void *vv = EncodeFromObj(interp, uai, uah, type, NULL, elem[j], 0);

	    if (vv == NULL) {
		UA_Array_delete(vdata, n, type);
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
	if (uah->client != NULL) {
	    const UA_DataType *vtype = &UA_TYPES[UA_TYPES_VARIANT];

	    value = UA_new(vtype);
	    if (value == NULL) {
		UA_Array_delete(vdata, n, type);
		Tcl_SetResult(interp, "out of memory", TCL_STATIC);
		UA_NodeId_deleteMembers(&nodeid);
		return TCL_ERROR;
	    }
	    UA_Variant_setArray(value, vdata, n, type);
	    type = vtype;
	} else {
	    value = vdata;
	}
    } else {
	value = EncodeFromObj(interp, uai, uah, type, NULL, objv[idx], 0);
	if (value == NULL) {
error:
	    ReportError(interp, uai, NULL, 0);
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
    }
    if (uah->client != NULL) {
	if (isAsync) {
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;

	    idx++;
	    if (Tcl_ListObjGetElements(interp, objv[idx], &n, &elem)
		!= TCL_OK) {
		UA_NodeId_deleteMembers(&nodeid);
		UA_delete(value, type);
		return TCL_ERROR;
	    }
	    if (n > 0) {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));
		memset(uaq, 0, sizeof(UAQ));
		uaq->uah = uah;







|












|













|







7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
	if (uah->client != NULL) {
	    const UA_DataType *vtype = &UA_TYPES[UA_TYPES_VARIANT];

	    value = UA_new(vtype);
	    if (value == NULL) {
		UA_Array_delete(vdata, n, type);
		Tcl_SetResult(interp, "out of memory", TCL_STATIC);
		UA_NodeId_clear(&nodeid);
		return TCL_ERROR;
	    }
	    UA_Variant_setArray(value, vdata, n, type);
	    type = vtype;
	} else {
	    value = vdata;
	}
    } else {
	value = EncodeFromObj(interp, uai, uah, type, NULL, objv[idx], 0);
	if (value == NULL) {
error:
	    ReportError(interp, uai, NULL, 0);
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
    }
    if (uah->client != NULL) {
	if (isAsync) {
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;

	    idx++;
	    if (Tcl_ListObjGetElements(interp, objv[idx], &n, &elem)
		!= TCL_OK) {
		UA_NodeId_clear(&nodeid);
		UA_delete(value, type);
		return TCL_ERROR;
	    }
	    if (n > 0) {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));
		memset(uaq, 0, sizeof(UAQ));
		uaq->uah = uah;
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
	    uaret =
		__UA_Client_writeAttribute_async(uah->client, &nodeid,
						 (UA_AttributeId) attr,
						 value, type,
						 ClientAsyncRWCallback,
						 (uaq == NULL) ? NULL : uah,
						 reqidPtr);
	    UA_NodeId_deleteMembers(&nodeid);
	    UA_delete(value, type);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);







|







7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
	    uaret =
		__UA_Client_writeAttribute_async(uah->client, &nodeid,
						 (UA_AttributeId) attr,
						 value, type,
						 ClientAsyncRWCallback,
						 (uaq == NULL) ? NULL : uah,
						 reqidPtr);
	    UA_NodeId_clear(&nodeid);
	    UA_delete(value, type);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
	}
	uaret = UA_Server_write(uah->server, &wv);
    }
    if (uaret != UA_STATUSCODE_GOOD) {
	ReportError(interp, uai, "WriteAttribute", uaret);
    }
    if (uah->client != NULL) {
	UA_NodeId_deleteMembers(&nodeid);
	UA_delete(value, type);
    } else {
	UA_WriteValue_deleteMembers(&wv);
    }
    return (uaret != UA_STATUSCODE_GOOD) ? TCL_ERROR : TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *







|


|







7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
	}
	uaret = UA_Server_write(uah->server, &wv);
    }
    if (uaret != UA_STATUSCODE_GOOD) {
	ReportError(interp, uai, "WriteAttribute", uaret);
    }
    if (uah->client != NULL) {
	UA_NodeId_clear(&nodeid);
	UA_delete(value, type);
    } else {
	UA_WriteValue_clear(&wv);
    }
    return (uaret != UA_STATUSCODE_GOOD) ? TCL_ERROR : TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
	    UA_Variant_setArray(inArgs + i, value, n, type);
	} else {
doScalar:
	    value = EncodeFromObj(interp, uai, uah, type, NULL, objv[idx], 0);
	    if (value == NULL) {
argsError:
		ReportError(interp, uai, NULL, 0);
		UA_NodeId_deleteMembers(&nodeid);
		UA_NodeId_deleteMembers(&methid);
		UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
		return TCL_ERROR;
	    }
	    UA_Variant_setScalar(inArgs + i, value, type);
	}
    }
    if (uah->client != NULL) {
	if (isAsync) {
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;

	    if (Tcl_ListObjGetElements(interp, objv[objc - 1], &n, &elem)
		!= TCL_OK) {
		UA_NodeId_deleteMembers(&nodeid);
		UA_NodeId_deleteMembers(&methid);
		UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
		return TCL_ERROR;
	    }
	    if (n > 0) {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));
		memset(uaq, 0, sizeof(UAQ));
		uaq->uah = uah;







|
|















|
|







7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
	    UA_Variant_setArray(inArgs + i, value, n, type);
	} else {
doScalar:
	    value = EncodeFromObj(interp, uai, uah, type, NULL, objv[idx], 0);
	    if (value == NULL) {
argsError:
		ReportError(interp, uai, NULL, 0);
		UA_NodeId_clear(&nodeid);
		UA_NodeId_clear(&methid);
		UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
		return TCL_ERROR;
	    }
	    UA_Variant_setScalar(inArgs + i, value, type);
	}
    }
    if (uah->client != NULL) {
	if (isAsync) {
	    int i, n;
	    Tcl_Obj **elem;
	    UA_UInt32 *reqidPtr = NULL;
	    UAQ *uaq = NULL;

	    if (Tcl_ListObjGetElements(interp, objv[objc - 1], &n, &elem)
		!= TCL_OK) {
		UA_NodeId_clear(&nodeid);
		UA_NodeId_clear(&methid);
		UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
		return TCL_ERROR;
	    }
	    if (n > 0) {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));
		memset(uaq, 0, sizeof(UAQ));
		uaq->uah = uah;
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
		reqidPtr = &uaq->reqid;
	    }
	    uaret = __UA_Client_call_async(uah->client, nodeid, methid,
					   nInArgs, inArgs,
					   ClientAsyncRWCallback,
					   (uaq == NULL) ? NULL : uah,
					   reqidPtr);
	    UA_NodeId_deleteMembers(&nodeid);
	    UA_NodeId_deleteMembers(&methid);
	    UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);







|
|







7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
		reqidPtr = &uaq->reqid;
	    }
	    uaret = __UA_Client_call_async(uah->client, nodeid, methid,
					   nInArgs, inArgs,
					   ClientAsyncRWCallback,
					   (uaq == NULL) ? NULL : uah,
					   reqidPtr);
	    UA_NodeId_clear(&nodeid);
	    UA_NodeId_clear(&methid);
	    UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
	    if (uaret != UA_STATUSCODE_GOOD) {
		if (uaq != NULL) {
		    for (i = 0; i < n; i++) {
			Tcl_DecrRefCount(uaq->cmdObjs[i]);
		    }
		    ckfree((char *) uaq->cmdObjs);
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
	crq.inputArgumentsSize = nInArgs;
	crq.inputArguments = inArgs;
	cr = UA_Server_call(uah->server, &crq);
	crq.objectId = UA_NODEID_NULL;
	crq.methodId = UA_NODEID_NULL;
	crq.inputArgumentsSize = 0;
	crq.inputArguments = NULL;
	UA_CallMethodRequest_deleteMembers(&crq);
	uaret = cr.statusCode;
	nOutArgs = cr.outputArgumentsSize;
	outArgs = cr.outputArguments;
	cr.outputArgumentsSize = 0;
	cr.outputArguments = NULL;
	UA_CallMethodResult_deleteMembers(&cr);
    }
    UA_NodeId_deleteMembers(&nodeid);
    UA_NodeId_deleteMembers(&methid);
    UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
    if (uaret != UA_STATUSCODE_GOOD) {
	UA_Array_delete(outArgs, nOutArgs, &UA_TYPES[UA_TYPES_VARIANT]);
	ReportError(interp, uai, "Call", uaret);
	return TCL_ERROR;
    }
    if (nOutArgs == 1) {







|





|

|
|







7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
	crq.inputArgumentsSize = nInArgs;
	crq.inputArguments = inArgs;
	cr = UA_Server_call(uah->server, &crq);
	crq.objectId = UA_NODEID_NULL;
	crq.methodId = UA_NODEID_NULL;
	crq.inputArgumentsSize = 0;
	crq.inputArguments = NULL;
	UA_CallMethodRequest_clear(&crq);
	uaret = cr.statusCode;
	nOutArgs = cr.outputArgumentsSize;
	outArgs = cr.outputArguments;
	cr.outputArgumentsSize = 0;
	cr.outputArguments = NULL;
	UA_CallMethodResult_clear(&cr);
    }
    UA_NodeId_clear(&nodeid);
    UA_NodeId_clear(&methid);
    UA_Array_delete(inArgs, nInArgs, &UA_TYPES[UA_TYPES_VARIANT]);
    if (uaret != UA_STATUSCODE_GOOD) {
	UA_Array_delete(outArgs, nOutArgs, &UA_TYPES[UA_TYPES_VARIANT]);
	ReportError(interp, uai, "Call", uaret);
	return TCL_ERROR;
    }
    if (nOutArgs == 1) {
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
	    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[5]))
		== NULL) {
		return TCL_ERROR;
	    }
	    if (objc > 7) {
		if (Tcl_GetIndexFromObj(interp, objv[6], attrNames, "attr", 0,
					&attr) != TCL_OK) {
		    UA_NodeId_deleteMembers(&nodeid);
		    return TCL_ERROR;
		}
		/* UA_AttributeId is 1-based */
		attr += UA_ATTRIBUTEID_NODEID;
	    } else {
		/* By default, use the "value" attribute. */
		attr = UA_ATTRIBUTEID_VALUE;
	    }
	    if (Tcl_GetDoubleFromObj(interp, objv[(objc > 7) ? 7 : 6],
				     &interval) != TCL_OK) {
		UA_NodeId_deleteMembers(&nodeid);
		return TCL_ERROR;
	    }
	} else {
	    if ((objc < 7) || (objc > 10)) {
		Tcl_WrongNumArgs(interp, 1, objv, "handle new subid type "
				 "cmd nodeid ?attr mode interval?");
		return TCL_ERROR;







|










|







8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
	    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[5]))
		== NULL) {
		return TCL_ERROR;
	    }
	    if (objc > 7) {
		if (Tcl_GetIndexFromObj(interp, objv[6], attrNames, "attr", 0,
					&attr) != TCL_OK) {
		    UA_NodeId_clear(&nodeid);
		    return TCL_ERROR;
		}
		/* UA_AttributeId is 1-based */
		attr += UA_ATTRIBUTEID_NODEID;
	    } else {
		/* By default, use the "value" attribute. */
		attr = UA_ATTRIBUTEID_VALUE;
	    }
	    if (Tcl_GetDoubleFromObj(interp, objv[(objc > 7) ? 7 : 6],
				     &interval) != TCL_OK) {
		UA_NodeId_clear(&nodeid);
		return TCL_ERROR;
	    }
	} else {
	    if ((objc < 7) || (objc > 10)) {
		Tcl_WrongNumArgs(interp, 1, objv, "handle new subid type "
				 "cmd nodeid ?attr mode interval?");
		return TCL_ERROR;
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
	    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[6]))
		== NULL) {
		return TCL_ERROR;
	    }
	    if (objc > 7) {
		if (Tcl_GetIndexFromObj(interp, objv[7], attrNames, "attr", 0,
					&attr) != TCL_OK) {
		    UA_NodeId_deleteMembers(&nodeid);
		    return TCL_ERROR;
		}
		/* UA_AttributeId is 1-based */
		attr += UA_ATTRIBUTEID_NODEID;
	    } else {
		/* By default, use the "value" attribute. */
		attr = UA_ATTRIBUTEID_VALUE;
	    }
	    if ((objc > 8) &&
		(Tcl_GetIndexFromObj(interp, objv[8], modeNames, "mode", 0,
				     &mode) != TCL_OK)) {
		return TCL_ERROR;
	    }
	    if ((objc > 9) &&
		(Tcl_GetDoubleFromObj(interp, objv[9], &interval) != TCL_OK)) {
		UA_NodeId_deleteMembers(&nodeid);
		return TCL_ERROR;
	    }
	}
	mon = (UAM *) ckalloc(sizeof(UAM));
	memset(mon, 0, sizeof(UAM));
	mon->sub = sub;
	mon->event = kind;







|















|







8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
	    if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[6]))
		== NULL) {
		return TCL_ERROR;
	    }
	    if (objc > 7) {
		if (Tcl_GetIndexFromObj(interp, objv[7], attrNames, "attr", 0,
					&attr) != TCL_OK) {
		    UA_NodeId_clear(&nodeid);
		    return TCL_ERROR;
		}
		/* UA_AttributeId is 1-based */
		attr += UA_ATTRIBUTEID_NODEID;
	    } else {
		/* By default, use the "value" attribute. */
		attr = UA_ATTRIBUTEID_VALUE;
	    }
	    if ((objc > 8) &&
		(Tcl_GetIndexFromObj(interp, objv[8], modeNames, "mode", 0,
				     &mode) != TCL_OK)) {
		return TCL_ERROR;
	    }
	    if ((objc > 9) &&
		(Tcl_GetDoubleFromObj(interp, objv[9], &interval) != TCL_OK)) {
		UA_NodeId_clear(&nodeid);
		return TCL_ERROR;
	    }
	}
	mon = (UAM *) ckalloc(sizeof(UAM));
	memset(mon, 0, sizeof(UAM));
	mon->sub = sub;
	mon->event = kind;
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
		mr = UA_Client_MonitoredItems_createDataChange(uah->client,
			 subid, UA_TIMESTAMPSTORETURN_BOTH, mrq, mon,
			 DataChangeCB, DeleteMonCB);
	    }
	}
	uaret = mr.statusCode;
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_NodeId_deleteMembers(&nodeid);
	    for (i = 0; i < mon->nCmdObjs; i++) {
		Tcl_DecrRefCount(mon->cmdObjs[i]);
	    }
	    if (mon->cmdObjs != NULL) {
		ckfree((char *) mon->cmdObjs);
	    }
	    ckfree((char *) mon);
	    ReportError(interp, uai, "CreateMonitor", uaret);
	    return TCL_ERROR;
	} else if (uah->client == NULL) {
	    int isNew;

	    mon->monid = mr.monitoredItemId;
	    hPtr = Tcl_CreateHashEntry(&uah->mons,
				       INT2PTR(mon->monid), &isNew);
	    if (!isNew) {
		UAM *oldmon = (UAM *) Tcl_GetHashValue(hPtr);

		UA_NodeId_deleteMembers(&oldmon->nodeid);
		for (i = 0; i < oldmon->nCmdObjs; i++) {
		    Tcl_DecrRefCount(oldmon->cmdObjs[i]);
		}
		if (oldmon->cmdObjs != NULL) {
		    ckfree((char *) oldmon->cmdObjs);
		}
		ckfree((char *) oldmon);







|


















|







8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
		mr = UA_Client_MonitoredItems_createDataChange(uah->client,
			 subid, UA_TIMESTAMPSTORETURN_BOTH, mrq, mon,
			 DataChangeCB, DeleteMonCB);
	    }
	}
	uaret = mr.statusCode;
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_NodeId_clear(&nodeid);
	    for (i = 0; i < mon->nCmdObjs; i++) {
		Tcl_DecrRefCount(mon->cmdObjs[i]);
	    }
	    if (mon->cmdObjs != NULL) {
		ckfree((char *) mon->cmdObjs);
	    }
	    ckfree((char *) mon);
	    ReportError(interp, uai, "CreateMonitor", uaret);
	    return TCL_ERROR;
	} else if (uah->client == NULL) {
	    int isNew;

	    mon->monid = mr.monitoredItemId;
	    hPtr = Tcl_CreateHashEntry(&uah->mons,
				       INT2PTR(mon->monid), &isNew);
	    if (!isNew) {
		UAM *oldmon = (UAM *) Tcl_GetHashValue(hPtr);

		UA_NodeId_clear(&oldmon->nodeid);
		for (i = 0; i < oldmon->nCmdObjs; i++) {
		    Tcl_DecrRefCount(oldmon->cmdObjs[i]);
		}
		if (oldmon->cmdObjs != NULL) {
		    ckfree((char *) oldmon->cmdObjs);
		}
		ckfree((char *) oldmon);
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
		item.requestedParameters = params;
		params.samplingInterval = interval;
		params.discardOldest = UA_TRUE;
		params.queueSize = 1;
		mr = UA_Client_MonitoredItems_modify(uah->client, mrq);
		uaret = mr.responseHeader.serviceResult;
		if (uaret != UA_STATUSCODE_GOOD) {
		    UA_ModifyMonitoredItemsResponse_deleteMembers(&mr);
		    ReportError(interp, uai, "ModifyMonitor", uaret);
		    return TCL_ERROR;
		}
		if (mr.resultsSize > 0) {
		    uaret = mr.results[0].statusCode;
		    if (uaret != UA_STATUSCODE_GOOD) {
			UA_ModifyMonitoredItemsResponse_deleteMembers(&mr);
			ReportError(interp, uai, "ModifyMonitor", uaret);
			return TCL_ERROR;
		    }
		    mon->interval = mr.results[0].revisedSamplingInterval;
		}
		UA_ModifyMonitoredItemsResponse_deleteMembers(&mr);
	    }
#endif
	    if (objc > 6) {
		UA_SetMonitoringModeRequest srq;
		UA_SetMonitoringModeResponse sr;
		UA_UInt32 item;

		UA_SetMonitoringModeRequest_init(&srq);
		UA_SetMonitoringModeResponse_init(&sr);
		srq.subscriptionId = subid;
		srq.monitoringMode = mode;
		srq.monitoredItemIdsSize = 1;
		srq.monitoredItemIds = &item;
		item = monid;
		sr = UA_Client_MonitoredItems_setMonitoringMode(uah->client,
								srq);
		uaret = sr.responseHeader.serviceResult;
		if (uaret != UA_STATUSCODE_GOOD) {
		    UA_SetMonitoringModeResponse_deleteMembers(&sr);
		    ReportError(interp, uai, "SetMonitoringMode", uaret);
		    return TCL_ERROR;
		}
		if (sr.resultsSize > 0) {
		    uaret = sr.results[0];
		    if (uaret != UA_STATUSCODE_GOOD) {
			UA_SetMonitoringModeResponse_deleteMembers(&sr);
			ReportError(interp, uai, "SetMonitoringMode", uaret);
			return TCL_ERROR;
		    }
		    mon->mode = mode;
		}
		UA_SetMonitoringModeResponse_deleteMembers(&sr);
	    }
	    if (mon->cmdObjs != NULL) {
		for (i = 0; i < mon->nCmdObjs; i++) {
		    Tcl_DecrRefCount(mon->cmdObjs[i]);
		}
		ckfree((char *) mon->cmdObjs);
	    }







|






|





|


















|






|





|







8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
		item.requestedParameters = params;
		params.samplingInterval = interval;
		params.discardOldest = UA_TRUE;
		params.queueSize = 1;
		mr = UA_Client_MonitoredItems_modify(uah->client, mrq);
		uaret = mr.responseHeader.serviceResult;
		if (uaret != UA_STATUSCODE_GOOD) {
		    UA_ModifyMonitoredItemsResponse_clear(&mr);
		    ReportError(interp, uai, "ModifyMonitor", uaret);
		    return TCL_ERROR;
		}
		if (mr.resultsSize > 0) {
		    uaret = mr.results[0].statusCode;
		    if (uaret != UA_STATUSCODE_GOOD) {
			UA_ModifyMonitoredItemsResponse_clear(&mr);
			ReportError(interp, uai, "ModifyMonitor", uaret);
			return TCL_ERROR;
		    }
		    mon->interval = mr.results[0].revisedSamplingInterval;
		}
		UA_ModifyMonitoredItemsResponse_clear(&mr);
	    }
#endif
	    if (objc > 6) {
		UA_SetMonitoringModeRequest srq;
		UA_SetMonitoringModeResponse sr;
		UA_UInt32 item;

		UA_SetMonitoringModeRequest_init(&srq);
		UA_SetMonitoringModeResponse_init(&sr);
		srq.subscriptionId = subid;
		srq.monitoringMode = mode;
		srq.monitoredItemIdsSize = 1;
		srq.monitoredItemIds = &item;
		item = monid;
		sr = UA_Client_MonitoredItems_setMonitoringMode(uah->client,
								srq);
		uaret = sr.responseHeader.serviceResult;
		if (uaret != UA_STATUSCODE_GOOD) {
		    UA_SetMonitoringModeResponse_clear(&sr);
		    ReportError(interp, uai, "SetMonitoringMode", uaret);
		    return TCL_ERROR;
		}
		if (sr.resultsSize > 0) {
		    uaret = sr.results[0];
		    if (uaret != UA_STATUSCODE_GOOD) {
			UA_SetMonitoringModeResponse_clear(&sr);
			ReportError(interp, uai, "SetMonitoringMode", uaret);
			return TCL_ERROR;
		    }
		    mon->mode = mode;
		}
		UA_SetMonitoringModeResponse_clear(&sr);
	    }
	    if (mon->cmdObjs != NULL) {
		for (i = 0; i < mon->nCmdObjs; i++) {
		    Tcl_DecrRefCount(mon->cmdObjs[i]);
		}
		ckfree((char *) mon->cmdObjs);
	    }
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
		Tcl_SetResult(interp, "monitor id not found", TCL_STATIC);
		ReportError(interp, uai, NULL, 0);
		return TCL_ERROR;
	    }
	    uaret = UA_Server_deleteMonitoredItem(uah->server, monid);
	    mon = (UAM *) Tcl_GetHashValue(hPtr);
	    Tcl_DeleteHashEntry(hPtr);
	    UA_NodeId_deleteMembers(&mon->nodeid);
	    for (i = 0; i < mon->nCmdObjs; i++) {
		Tcl_DecrRefCount(mon->cmdObjs[i]);
	    }
	    if (mon->cmdObjs != NULL) {
		ckfree((char *) mon->cmdObjs);
	    }
	    ckfree((char *) mon);







|







8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
		Tcl_SetResult(interp, "monitor id not found", TCL_STATIC);
		ReportError(interp, uai, NULL, 0);
		return TCL_ERROR;
	    }
	    uaret = UA_Server_deleteMonitoredItem(uah->server, monid);
	    mon = (UAM *) Tcl_GetHashValue(hPtr);
	    Tcl_DeleteHashEntry(hPtr);
	    UA_NodeId_clear(&mon->nodeid);
	    for (i = 0; i < mon->nCmdObjs; i++) {
		Tcl_DecrRefCount(mon->cmdObjs[i]);
	    }
	    if (mon->cmdObjs != NULL) {
		ckfree((char *) mon->cmdObjs);
	    }
	    ckfree((char *) mon);
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
	     * callback has cleaned it up already.
	     */
	    hPtr = Tcl_FindHashEntry(&sub->monitors, INT2PTR(monid));
	    if (hPtr != NULL) {
		mon = (UAM *) Tcl_GetHashValue(hPtr);
		Tcl_CancelIdleCall(MonIdleProc, (ClientData) mon);
		Tcl_DeleteHashEntry(hPtr);
		UA_NodeId_deleteMembers(&mon->nodeid);
		if (mon->dv != NULL) {
		    UA_DataValue_delete(mon->dv);
		    mon->dv = NULL;
		}
		if (mon->vv != NULL) {
		    UA_Array_delete(mon->vv, mon->vvSize,
				    &UA_TYPES[UA_TYPES_VARIANT]);







|







8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
	     * callback has cleaned it up already.
	     */
	    hPtr = Tcl_FindHashEntry(&sub->monitors, INT2PTR(monid));
	    if (hPtr != NULL) {
		mon = (UAM *) Tcl_GetHashValue(hPtr);
		Tcl_CancelIdleCall(MonIdleProc, (ClientData) mon);
		Tcl_DeleteHashEntry(hPtr);
		UA_NodeId_clear(&mon->nodeid);
		if (mon->dv != NULL) {
		    UA_DataValue_delete(mon->dv);
		    mon->dv = NULL;
		}
		if (mon->vv != NULL) {
		    UA_Array_delete(mon->vv, mon->vvSize,
				    &UA_TYPES[UA_TYPES_VARIANT]);
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
	    }
	} else {
	    a = UA_new(aType);
	    UA_copy(a0, a, aType);
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {
	    UA_deleteMembers(&a->displayName.text,
			     &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if ((uah->server != NULL) && (objc > 9)) {
	    int nCmdObjs, i, isNew;
	    Tcl_Obj **cmdObjs;
	    UAQ *uaq;
	    static const UA_DataSource dsrc = {







<
|







9326
9327
9328
9329
9330
9331
9332

9333
9334
9335
9336
9337
9338
9339
9340
	    }
	} else {
	    a = UA_new(aType);
	    UA_copy(a0, a, aType);
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {

	    UA_clear(&a->displayName.text, &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if ((uah->server != NULL) && (objc > 9)) {
	    int nCmdObjs, i, isNew;
	    Tcl_Obj **cmdObjs;
	    UAQ *uaq;
	    static const UA_DataSource dsrc = {
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439

	    Tcl_SetObjResult(interp,
		Tcl_NewStringObj(PrintNodeId(uai, &retid, &ds), -1));
	    Tcl_DStringFree(&ds);
	    result = TCL_OK;
	}
varError:
	UA_NodeId_deleteMembers(&nodeid);
	UA_NodeId_deleteMembers(&parent);
	UA_NodeId_deleteMembers(&refid);
	UA_NodeId_deleteMembers(&typeid);
	UA_NodeId_deleteMembers(&retid);
	UA_QualifiedName_deleteMembers(&qn);
	if (a != NULL) {
	    UA_delete(a, aType);
	}
	break;
    }

    case NK_ObjectType:







|
|
|
|
|
|







9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441

	    Tcl_SetObjResult(interp,
		Tcl_NewStringObj(PrintNodeId(uai, &retid, &ds), -1));
	    Tcl_DStringFree(&ds);
	    result = TCL_OK;
	}
varError:
	UA_NodeId_clear(&nodeid);
	UA_NodeId_clear(&parent);
	UA_NodeId_clear(&refid);
	UA_NodeId_clear(&typeid);
	UA_NodeId_clear(&retid);
	UA_QualifiedName_clear(&qn);
	if (a != NULL) {
	    UA_delete(a, aType);
	}
	break;
    }

    case NK_ObjectType:
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
	    }
	} else {
	    a = UA_new(aType);
	    UA_copy(a0, a, aType);
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {
	    UA_deleteMembers(&a->displayName.text,
			     &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if (uah->server != NULL) {
	    uaret = __UA_Server_addNode(uah->server, ncl, &nodeid,
					&parent, &refid,
					qn, &UA_NODEID_NULL, a, aType, NULL,
					&retid);







<
|







9517
9518
9519
9520
9521
9522
9523

9524
9525
9526
9527
9528
9529
9530
9531
	    }
	} else {
	    a = UA_new(aType);
	    UA_copy(a0, a, aType);
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {

	    UA_clear(&a->displayName.text, &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if (uah->server != NULL) {
	    uaret = __UA_Server_addNode(uah->server, ncl, &nodeid,
					&parent, &refid,
					qn, &UA_NODEID_NULL, a, aType, NULL,
					&retid);
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559

	    Tcl_SetObjResult(interp,
		Tcl_NewStringObj(PrintNodeId(uai, &retid, &ds), -1));
	    Tcl_DStringFree(&ds);
	    result = TCL_OK;
	}
objError:
	UA_NodeId_deleteMembers(&nodeid);
	UA_NodeId_deleteMembers(&parent);
	UA_NodeId_deleteMembers(&refid);
	UA_NodeId_deleteMembers(&retid);
	UA_QualifiedName_deleteMembers(&qn);
	if (a != NULL) {
	    UA_delete(a, aType);
	}
	break;
    }

    case NK_Reference: {







|
|
|
|
|







9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560

	    Tcl_SetObjResult(interp,
		Tcl_NewStringObj(PrintNodeId(uai, &retid, &ds), -1));
	    Tcl_DStringFree(&ds);
	    result = TCL_OK;
	}
objError:
	UA_NodeId_clear(&nodeid);
	UA_NodeId_clear(&parent);
	UA_NodeId_clear(&refid);
	UA_NodeId_clear(&retid);
	UA_QualifiedName_clear(&qn);
	if (a != NULL) {
	    UA_delete(a, aType);
	}
	break;
    }

    case NK_Reference: {
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
					   xdestid, forward);
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_addReference(uah->client, nodeid, refid,
					   forward, UA_STRING_NULL,
					   xdestid, ncl);
	}
	UA_ExpandedNodeId_deleteMembers(&xdestid);
	UA_NodeId_init(&destid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "AddReference", uaret);
	} else {
	    result = TCL_OK;
	}
refError:
	UA_NodeId_deleteMembers(&nodeid);
	UA_NodeId_deleteMembers(&refid);
	UA_NodeId_deleteMembers(&destid);
	break;
    }

    case NK_Method:
    case NK_SimpleMethod: {
	UA_NodeId nodeid, parent, refid, retid;
	UA_QualifiedName qn;







|







|
|
|







9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
					   xdestid, forward);
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_addReference(uah->client, nodeid, refid,
					   forward, UA_STRING_NULL,
					   xdestid, ncl);
	}
	UA_ExpandedNodeId_clear(&xdestid);
	UA_NodeId_init(&destid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "AddReference", uaret);
	} else {
	    result = TCL_OK;
	}
refError:
	UA_NodeId_clear(&nodeid);
	UA_NodeId_clear(&refid);
	UA_NodeId_clear(&destid);
	break;
    }

    case NK_Method:
    case NK_SimpleMethod: {
	UA_NodeId nodeid, parent, refid, retid;
	UA_QualifiedName qn;
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
	    } else {
		a = UA_MethodAttributes_new();
		UA_MethodAttributes_copy(a0, a);
	    }
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {
	    UA_deleteMembers(&a->displayName.text,
			     &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if (uah->server != NULL) {
	    if (nCmdObjs == 0) {
		uaq = NULL;
	    } else {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));







<
|







9706
9707
9708
9709
9710
9711
9712

9713
9714
9715
9716
9717
9718
9719
9720
	    } else {
		a = UA_MethodAttributes_new();
		UA_MethodAttributes_copy(a0, a);
	    }
	}
	/* At least preset the DisplayName attribute from browse name. */
	if (a->displayName.text.length == 0) {

	    UA_clear(&a->displayName.text, &UA_TYPES[UA_TYPES_STRING]);
	    UA_String_copy(&qn.name, &a->displayName.text);
	}
	if (uah->server != NULL) {
	    if (nCmdObjs == 0) {
		uaq = NULL;
	    } else {
		uaq = (UAQ *) ckalloc(sizeof(UAQ));
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
		    oa = NULL;
		}
	    }
	    uaq = NULL;
	}
	Tcl_DStringFree(&ds);
methError:
	UA_NodeId_deleteMembers(&nodeid);
	UA_NodeId_deleteMembers(&parent);
	UA_NodeId_deleteMembers(&refid);
	UA_NodeId_deleteMembers(&retid);
	UA_QualifiedName_deleteMembers(&qn);
	if (a != NULL) {
	    UA_MethodAttributes_delete(a);
	}
	if (ia != NULL) {
	    UA_Array_delete(ia, ian, &UA_TYPES[UA_TYPES_ARGUMENT]);
	}
	if (oa != NULL) {







|
|
|
|
|







9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
		    oa = NULL;
		}
	    }
	    uaq = NULL;
	}
	Tcl_DStringFree(&ds);
methError:
	UA_NodeId_clear(&nodeid);
	UA_NodeId_clear(&parent);
	UA_NodeId_clear(&refid);
	UA_NodeId_clear(&retid);
	UA_QualifiedName_clear(&qn);
	if (a != NULL) {
	    UA_MethodAttributes_delete(a);
	}
	if (ia != NULL) {
	    UA_Array_delete(ia, ian, &UA_TYPES[UA_TYPES_ARGUMENT]);
	}
	if (oa != NULL) {
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
	    uaret = UA_Server_deleteReference(uah->server, nodeid, refid,
					      forward, xdestid, bidir);
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_deleteReference(uah->client, nodeid, refid,
					      forward, xdestid, bidir);
	}
	UA_ExpandedNodeId_deleteMembers(&xdestid);
	UA_NodeId_init(&destid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "DeleteReference", uaret);
refError:
	    UA_NodeId_deleteMembers(&nodeid);
	    UA_NodeId_deleteMembers(&refid);
	    UA_NodeId_deleteMembers(&destid);
	    return TCL_ERROR;
	}
	UA_NodeId_deleteMembers(&nodeid);
	UA_NodeId_deleteMembers(&refid);
	UA_NodeId_deleteMembers(&destid);
    } else {
	int withRefs = UA_FALSE;

	if (objc > 5) {
	    Tcl_WrongNumArgs(interp, 1, objv, "handle Node id ?withrefs?");
	    return TCL_ERROR;
	}







|




|
|
|


|
|
|







9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
	    uaret = UA_Server_deleteReference(uah->server, nodeid, refid,
					      forward, xdestid, bidir);
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_deleteReference(uah->client, nodeid, refid,
					      forward, xdestid, bidir);
	}
	UA_ExpandedNodeId_clear(&xdestid);
	UA_NodeId_init(&destid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "DeleteReference", uaret);
refError:
	    UA_NodeId_clear(&nodeid);
	    UA_NodeId_clear(&refid);
	    UA_NodeId_clear(&destid);
	    return TCL_ERROR;
	}
	UA_NodeId_clear(&nodeid);
	UA_NodeId_clear(&refid);
	UA_NodeId_clear(&destid);
    } else {
	int withRefs = UA_FALSE;

	if (objc > 5) {
	    Tcl_WrongNumArgs(interp, 1, objv, "handle Node id ?withrefs?");
	    return TCL_ERROR;
	}
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_deleteNode(uah->client, nodeid, withRefs);
	}
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "DeleteNode", uaret);
nodeError:
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}

	if (uah->server != NULL) {
	    /*
	     * Cleanup callbacks, if any.
	     */
	    NodeDeleted(uah, &nodeid);
	}
	UA_NodeId_deleteMembers(&nodeid);
    }
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *







|









|







9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
	} else {
	    /* TBD: client async op */
	    uaret = UA_Client_deleteNode(uah->client, nodeid, withRefs);
	}
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "DeleteNode", uaret);
nodeError:
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}

	if (uah->server != NULL) {
	    /*
	     * Cleanup callbacks, if any.
	     */
	    NodeDeleted(uah, &nodeid);
	}
	UA_NodeId_clear(&nodeid);
    }
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
	void **backRef;

	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	    if (isNew) {
		Tcl_DeleteHashEntry(hPtr);
	    }
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	args = GetMethodArgs(interp, uah, 0, objv[3], &nArgs);
	if (nArgs < 0) {
	    /* retry with simplified format but keep result */
	    Tcl_Obj *result = Tcl_GetObjResult(interp);

	    Tcl_IncrRefCount(result);
	    args = GetMethodArgs(interp, uah, 1, objv[3], &nArgs);
	    if (nArgs < 0) {
		UA_NodeId_deleteMembers(&nodeid);
		if (isNew) {
		    Tcl_DeleteHashEntry(hPtr);
		}
		Tcl_SetObjResult(interp, result);
		Tcl_DecrRefCount(result);
		ReportError(interp, uai, NULL, 0);
		return TCL_ERROR;
	    }
	    Tcl_DecrRefCount(result);
	}
	if ((objc > 4) && (nCmdObjs == 0)) {
	    /* callback to be deleted */
	    UA_NodeId_deleteMembers(&nodeid);
	    UA_Array_delete(args, nArgs, &UA_TYPES[UA_TYPES_ARGUMENT]);
	    if (uaq == NULL) {
		return TCL_OK;
	    }
	    backRef = uaq->backRef;
	    uaq->backRef = NULL;
	    while (backRef != NULL) {







|










|












|







10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
	void **backRef;

	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, Tcl_GetString(objv[2])) == NULL) {
	    if (isNew) {
		Tcl_DeleteHashEntry(hPtr);
	    }
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	args = GetMethodArgs(interp, uah, 0, objv[3], &nArgs);
	if (nArgs < 0) {
	    /* retry with simplified format but keep result */
	    Tcl_Obj *result = Tcl_GetObjResult(interp);

	    Tcl_IncrRefCount(result);
	    args = GetMethodArgs(interp, uah, 1, objv[3], &nArgs);
	    if (nArgs < 0) {
		UA_NodeId_clear(&nodeid);
		if (isNew) {
		    Tcl_DeleteHashEntry(hPtr);
		}
		Tcl_SetObjResult(interp, result);
		Tcl_DecrRefCount(result);
		ReportError(interp, uai, NULL, 0);
		return TCL_ERROR;
	    }
	    Tcl_DecrRefCount(result);
	}
	if ((objc > 4) && (nCmdObjs == 0)) {
	    /* callback to be deleted */
	    UA_NodeId_clear(&nodeid);
	    UA_Array_delete(args, nArgs, &UA_TYPES[UA_TYPES_ARGUMENT]);
	    if (uaq == NULL) {
		return TCL_OK;
	    }
	    backRef = uaq->backRef;
	    uaq->backRef = NULL;
	    while (backRef != NULL) {
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
	}
	if (uaq->outTypes != NULL) {
	    ckfree((char *) uaq->outTypes);
	    uaq->outTypes = NULL;
	}
	uaq->outObj = MakeArgsTypesList(uah, uaq->nOutArgs, uaq->outArgs,
					&uaq->outTypes);
	UA_NodeId_deleteMembers(&nodeid);
    }
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *







|







10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
	}
	if (uaq->outTypes != NULL) {
	    ckfree((char *) uaq->outTypes);
	    uaq->outTypes = NULL;
	}
	uaq->outObj = MakeArgsTypesList(uah, uaq->nOutArgs, uaq->outArgs,
					&uaq->outTypes);
	UA_NodeId_clear(&nodeid);
    }
    return TCL_OK;
}

/*
 *-------------------------------------------------------------------------
 *
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
	static const UA_DataSource dsrc = {
	    DataSourceRead, DataSourceWrite
	};

	/* new callback/data source to be added */
	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, p) == NULL) {
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	uaq = (UAQ *) ckalloc(sizeof(UAQ));
	memset(uaq, 0, sizeof(UAQ));
	uaq->uah = uah;
	uaq->nCmdObjs = 0;
	uaq->cmdObjs = NULL;
	uaq->nOutArgs = 0;
	uaq->outArgs = NULL;
	uaq->outObj = NULL;
	uaq->outTypes = NULL;
	uaq->backRef = NULL;
	uaret = UA_Server_setVariableNode_dataSource(uah->server, nodeid, dsrc);
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_NodeId_deleteMembers(&nodeid);
	    ckfree((char *) uaq);
	    ReportError(interp, uai, "SetDataSource", uaret);
	    return TCL_ERROR;
	}
	UA_Server_setNodeContext(uah->server, nodeid, uaq);
	p = PrintNodeId(uai, &nodeid, &ds);
	UA_NodeId_deleteMembers(&nodeid);
	hPtr = Tcl_CreateHashEntry(&uah->dsrcs, p, &isNew);
	Tcl_DStringFree(&ds);
	Tcl_SetHashValue(hPtr, (ClientData) uaq);
	goto finishUAQ;
    } else if (nCmdObjs == 0) {
	UA_NodeId nodeid;
	UA_StatusCode uaret;
	void **backRef;
	static const UA_DataSource dsrc = { NULL, NULL };

	/* callback/data source to be deleted */
	uaq = (UAQ *) Tcl_GetHashValue(hPtr);
	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, p) == NULL) {
	    UA_NodeId_deleteMembers(&nodeid);
	    return TCL_ERROR;
	}
	uaret = UA_Server_setVariableNode_dataSource(uah->server, nodeid, dsrc);
	UA_NodeId_deleteMembers(&nodeid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "SetDataSource", uaret);
	    return TCL_ERROR;
	}
	UA_Server_setNodeContext(uah->server, nodeid, NULL);
	Tcl_DeleteHashEntry(hPtr);








|














|






|














|



|







10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
	static const UA_DataSource dsrc = {
	    DataSourceRead, DataSourceWrite
	};

	/* new callback/data source to be added */
	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, p) == NULL) {
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	uaq = (UAQ *) ckalloc(sizeof(UAQ));
	memset(uaq, 0, sizeof(UAQ));
	uaq->uah = uah;
	uaq->nCmdObjs = 0;
	uaq->cmdObjs = NULL;
	uaq->nOutArgs = 0;
	uaq->outArgs = NULL;
	uaq->outObj = NULL;
	uaq->outTypes = NULL;
	uaq->backRef = NULL;
	uaret = UA_Server_setVariableNode_dataSource(uah->server, nodeid, dsrc);
	if (uaret != UA_STATUSCODE_GOOD) {
	    UA_NodeId_clear(&nodeid);
	    ckfree((char *) uaq);
	    ReportError(interp, uai, "SetDataSource", uaret);
	    return TCL_ERROR;
	}
	UA_Server_setNodeContext(uah->server, nodeid, uaq);
	p = PrintNodeId(uai, &nodeid, &ds);
	UA_NodeId_clear(&nodeid);
	hPtr = Tcl_CreateHashEntry(&uah->dsrcs, p, &isNew);
	Tcl_DStringFree(&ds);
	Tcl_SetHashValue(hPtr, (ClientData) uaq);
	goto finishUAQ;
    } else if (nCmdObjs == 0) {
	UA_NodeId nodeid;
	UA_StatusCode uaret;
	void **backRef;
	static const UA_DataSource dsrc = { NULL, NULL };

	/* callback/data source to be deleted */
	uaq = (UAQ *) Tcl_GetHashValue(hPtr);
	UA_NodeId_init(&nodeid);
	if (ParseNodeId(interp, uai, &nodeid, p) == NULL) {
	    UA_NodeId_clear(&nodeid);
	    return TCL_ERROR;
	}
	uaret = UA_Server_setVariableNode_dataSource(uah->server, nodeid, dsrc);
	UA_NodeId_clear(&nodeid);
	if (uaret != UA_STATUSCODE_GOOD) {
	    ReportError(interp, uai, "SetDataSource", uaret);
	    return TCL_ERROR;
	}
	UA_Server_setNodeContext(uah->server, nodeid, NULL);
	Tcl_DeleteHashEntry(hPtr);

10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
	UA_ReadValueId_init(&rv);
	rv.nodeId = nodeid;
	rv.attributeId = UA_ATTRIBUTEID_VALUE;
	value = UA_Server_read(uah->server, &rv,
			       UA_TIMESTAMPSTORETURN_NEITHER);
	uaret = value.status;
    }
    UA_NodeId_deleteMembers(&nodeid);
    if (uaret != UA_STATUSCODE_GOOD) {
	goto error;
    }
    if (UA_Variant_isEmpty(&value.value) || UA_Variant_isScalar(&value.value)) {
	uaret = UA_STATUSCODE_BADNODEATTRIBUTESINVALID;
	goto error;
    }







|







10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
	UA_ReadValueId_init(&rv);
	rv.nodeId = nodeid;
	rv.attributeId = UA_ATTRIBUTEID_VALUE;
	value = UA_Server_read(uah->server, &rv,
			       UA_TIMESTAMPSTORETURN_NEITHER);
	uaret = value.status;
    }
    UA_NodeId_clear(&nodeid);
    if (uaret != UA_STATUSCODE_GOOD) {
	goto error;
    }
    if (UA_Variant_isEmpty(&value.value) || UA_Variant_isScalar(&value.value)) {
	uaret = UA_STATUSCODE_BADNODEATTRIBUTESINVALID;
	goto error;
    }
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
	    const char *nn = ConvFromUAString(uai, &s[i], &ds);

	    Tcl_ListObjAppendElement(NULL, list, Tcl_NewWideIntObj(i));
	    Tcl_ListObjAppendElement(NULL, list,
		    Tcl_NewStringObj(nn, Tcl_DStringLength(&ds)));
	    Tcl_DStringFree(&ds);
	}
	UA_DataValue_deleteMembers(&value);
	Tcl_SetObjResult(interp, list);
	return TCL_OK;
    }
    p = Tcl_GetStringFromObj(objv[2], &len);
    for (i = 0; i < value.value.arrayLength; i++) {
	Tcl_DString ds;
	const char *nn = ConvFromUAString(uai, &s[i], &ds);

	if ((Tcl_DStringLength(&ds) == len) && (memcmp(p, nn, len) == 0)) {
	    Tcl_DStringFree(&ds);
	    UA_DataValue_deleteMembers(&value);
	    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(i));
	    return TCL_OK;
	}
	Tcl_DStringFree(&ds);
    }
    uaret = UA_STATUSCODE_BADNOTFOUND;
error:
    UA_DataValue_deleteMembers(&value);
    ReportError(interp, uai, "ReadNamespaceArray", uaret);
    return TCL_ERROR;
}

/*
 *-------------------------------------------------------------------------
 *







|










|







|







10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
	    const char *nn = ConvFromUAString(uai, &s[i], &ds);

	    Tcl_ListObjAppendElement(NULL, list, Tcl_NewWideIntObj(i));
	    Tcl_ListObjAppendElement(NULL, list,
		    Tcl_NewStringObj(nn, Tcl_DStringLength(&ds)));
	    Tcl_DStringFree(&ds);
	}
	UA_DataValue_clear(&value);
	Tcl_SetObjResult(interp, list);
	return TCL_OK;
    }
    p = Tcl_GetStringFromObj(objv[2], &len);
    for (i = 0; i < value.value.arrayLength; i++) {
	Tcl_DString ds;
	const char *nn = ConvFromUAString(uai, &s[i], &ds);

	if ((Tcl_DStringLength(&ds) == len) && (memcmp(p, nn, len) == 0)) {
	    Tcl_DStringFree(&ds);
	    UA_DataValue_clear(&value);
	    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(i));
	    return TCL_OK;
	}
	Tcl_DStringFree(&ds);
    }
    uaret = UA_STATUSCODE_BADNOTFOUND;
error:
    UA_DataValue_clear(&value);
    ReportError(interp, uai, "ReadNamespaceArray", uaret);
    return TCL_ERROR;
}

/*
 *-------------------------------------------------------------------------
 *
10757
10758
10759
10760
10761
10762
10763




10764

10765
10766
10767
10768
10769
10770
10771
			(char **) &uah->types[i].typeName);
	Tcl_IncrRefCount(obj);
	uah->types[i].typeId = nodeid;
	uah->types[i].memSize = type->memSize;
	uah->types[i].typeIndex = i;
	uah->types[i].pointerFree = 1;
	uah->types[i].overlayable = UA_BINARY_OVERLAYABLE_INTEGER;




	uah->types[i].binaryEncodingId = 0;

	uah->types[i].typeKind = UA_DATATYPEKIND_ENUM;
	uah->types[i].membersSize = 0;
	uah->types[i].members = NULL;
	break;

    case CMD_struct:
	if ((objc < 8) || (objc % 2 != 0)) {







>
>
>
>

>







10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
			(char **) &uah->types[i].typeName);
	Tcl_IncrRefCount(obj);
	uah->types[i].typeId = nodeid;
	uah->types[i].memSize = type->memSize;
	uah->types[i].typeIndex = i;
	uah->types[i].pointerFree = 1;
	uah->types[i].overlayable = UA_BINARY_OVERLAYABLE_INTEGER;
#if (UA_OPEN62541_VER_MAJOR == 1) && (UA_OPEN62541_VER_MINOR > 1)
	uah->types[i].binaryEncodingId = 
	    UA_TYPES[UA_TYPES_ENUMVALUETYPE].binaryEncodingId;
#else
	uah->types[i].binaryEncodingId = 0;
#endif
	uah->types[i].typeKind = UA_DATATYPEKIND_ENUM;
	uah->types[i].membersSize = 0;
	uah->types[i].members = NULL;
	break;

    case CMD_struct:
	if ((objc < 8) || (objc % 2 != 0)) {
10815
10816
10817
10818
10819
10820
10821



10822

10823
10824
10825
10826
10827
10828
10829
	uah->types[i].typeId = nodeid;
	uah->types[i].memSize = 0;
	uah->types[i].typeIndex = i;
	uah->types[i].membersSize = (objc - 6) / 2;
	uah->types[i].typeKind = UA_DATATYPEKIND_STRUCTURE;
	uah->types[i].pointerFree = 1;
	uah->types[i].overlayable = 0;



	uah->types[i].binaryEncodingId = encid.identifier.numeric;

	j = sizeof(UA_DataTypeMember) * uah->types[i].membersSize;
	uah->types[i].members = ckalloc(j);
	memset(uah->types[i].members, 0, j);
	for (j = 6; j < objc; j += 2) {
	    int k, isZero, isArray = 0;
	    char *p;








>
>
>

>







10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
	uah->types[i].typeId = nodeid;
	uah->types[i].memSize = 0;
	uah->types[i].typeIndex = i;
	uah->types[i].membersSize = (objc - 6) / 2;
	uah->types[i].typeKind = UA_DATATYPEKIND_STRUCTURE;
	uah->types[i].pointerFree = 1;
	uah->types[i].overlayable = 0;
#if (UA_OPEN62541_VER_MAJOR == 1) && (UA_OPEN62541_VER_MINOR > 1)
	uah->types[i].binaryEncodingId = encid;
#else
	uah->types[i].binaryEncodingId = encid.identifier.numeric;
#endif
	j = sizeof(UA_DataTypeMember) * uah->types[i].membersSize;
	uah->types[i].members = ckalloc(j);
	memset(uah->types[i].members, 0, j);
	for (j = 6; j < objc; j += 2) {
	    int k, isZero, isArray = 0;
	    char *p;

Changes to undroid/build-undroidwish-generic.sh.
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-undroidwish-kmsdrm.sh.
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-undroidwish-linux32.sh.
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=i586-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=i586-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-undroidwish-linux64.sh.
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-undroidwish-wayland.sh.
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-vanilla-generic.sh.
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-vanilla-linux32.sh.
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=i586-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=i586-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile
Changes to undroid/build-vanilla-linux64.sh.
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1 -DUA_ENABLE_DISCOVERY=1 -DUA_ENABLE_DISCOVERY_MULTICAST=1 -DUA_ENABLE_DISCOVERY_SEMAPHORE=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile







|







1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
echo -n "build topcua ... "
(
  exec 3>&1
  exec >> build.log 2>&1
  cd topcua
  test -e build-stamp && echo >&3 "already done" && exit 0
  DESTDIR=${HERE} \
    CPPFLAGS="-DUA_ENABLE_ENCRYPTION=1 -DUA_ENABLE_ENCRYPTION_OPENSSL=1 -DUA_HAS_GETIFADDR=1" \
    CFLAGS="-I${PFX_HERE}/include -std=c99" \
    LIBS="-L${PFX_HERE}/lib -lcrypto -lssl" \
      ./configure --build=x86_64-linux-gnu --prefix=${PFX} \
        --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1
  echo > exports '{ global: Topcua_*Init; local: *; };'
  perl -pi -e 's@\$\{LDFLAGS_DEFAULT\}@'-Wl,--version-script=$(pwd)/exports'@g' \
    Makefile