-
Notifications
You must be signed in to change notification settings - Fork 276
/
Copy pathuaNodeSet.go
349 lines (294 loc) · 11.2 KB
/
uaNodeSet.go
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
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
// Code generated by xgen. But it has been edited! see EDIT comments for what was changed and why.
package schema
import _ "embed"
//go:embed Opc.Ua.NodeSet2.xml
var OpcUaNodeSet2 []byte
// UANodeSet ...
type UANodeSet struct {
LastModifiedAttr string `xml:"LastModified,attr,omitempty"`
NamespaceUris *UriTable `xml:"NamespaceUris"`
ServerUris *UriTable `xml:"ServerUris"`
Models *ModelTable `xml:"Models"`
Aliases *AliasTable `xml:"Aliases"`
Extensions *ListOfExtensions `xml:"Extensions"`
UAObject []*UAObject `xml:"UAObject"`
UAVariable []*UAVariable `xml:"UAVariable"`
UAMethod []*UAMethod `xml:"UAMethod"`
UAView []*UAView `xml:"UAView"`
UAObjectType []*UAObjectType `xml:"UAObjectType"`
UAVariableType []*UAVariableType `xml:"UAVariableType"`
UADataType []*UADataType `xml:"UADataType"`
UAReferenceType []*UAReferenceType `xml:"UAReferenceType"`
}
// UANodeSetChanges ...
type UANodeSetChanges struct {
LastModifiedAttr string `xml:"LastModified,attr,omitempty"`
TransactionIdAttr string `xml:"TransactionId,attr"`
AcceptAllOrNothingAttr bool `xml:"AcceptAllOrNothing,attr,omitempty"`
NamespaceUris *UriTable `xml:"NamespaceUris"`
ServerUris *UriTable `xml:"ServerUris"`
Aliases *AliasTable `xml:"Aliases"`
Extensions *ListOfExtensions `xml:"Extensions"`
NodesToAdd *NodesToAdd `xml:"NodesToAdd"`
ReferencesToAdd *ReferencesToChange `xml:"ReferencesToAdd"`
NodesToDelete *NodesToDelete `xml:"NodesToDelete"`
ReferencesToDelete *ReferencesToChange `xml:"ReferencesToDelete"`
}
// UANodeSetChangesStatus ...
type UANodeSetChangesStatus struct {
LastModifiedAttr string `xml:"LastModified,attr,omitempty"`
TransactionIdAttr string `xml:"TransactionId,attr"`
NodesToAdd *NodeSetStatusList `xml:"NodesToAdd"`
ReferencesToAdd *NodeSetStatusList `xml:"ReferencesToAdd"`
NodesToDelete *NodeSetStatusList `xml:"NodesToDelete"`
ReferencesToDelete *NodeSetStatusList `xml:"ReferencesToDelete"`
}
// NodesToAdd ...
type NodesToAdd struct {
UAObject []*UAObject `xml:"UAObject"`
UAVariable []*UAVariable `xml:"UAVariable"`
UAMethod []*UAMethod `xml:"UAMethod"`
UAView []*UAView `xml:"UAView"`
UAObjectType []*UAObjectType `xml:"UAObjectType"`
UAVariableType []*UAVariableType `xml:"UAVariableType"`
UADataType []*UADataType `xml:"UADataType"`
UAReferenceType []*UAReferenceType `xml:"UAReferenceType"`
}
// NodesToDelete ...
type NodesToDelete struct {
Node []*NodeToDelete `xml:"Node"`
}
// NodeToDelete ...
type NodeToDelete struct {
DeleteReverseReferencesAttr bool `xml:"DeleteReverseReferences,attr,omitempty"`
*NodeId
}
// ReferencesToChange ...
type ReferencesToChange struct {
Reference []*ReferenceChange `xml:"Reference"`
}
// ReferenceChange ...
type ReferenceChange struct {
SourceAttr string `xml:"Source,attr"`
ReferenceTypeAttr string `xml:"ReferenceType,attr"`
IsForwardAttr *bool `xml:"IsForward,attr,omitempty"` // EDIT: this was changed from a bool to a *bool because the default value if this attribute isn't present is true
*NodeId
}
// NodeSetStatus ...
type NodeSetStatus struct {
CodeAttr uint32 `xml:"Code,attr,omitempty"`
Value string `xml:",chardata"`
}
// NodeSetStatusList ...
type NodeSetStatusList struct {
Status []*NodeSetStatus `xml:"Status"`
}
// UriTable ...
type UriTable struct {
Uri []string `xml:"Uri"`
}
// ModelTableEntry ...
type ModelTableEntry struct {
ModelUriAttr string `xml:"ModelUri,attr"`
XmlSchemaUriAttr string `xml:"XmlSchemaUri,attr,omitempty"`
VersionAttr string `xml:"Version,attr,omitempty"`
PublicationDateAttr string `xml:"PublicationDate,attr,omitempty"`
AccessRestrictionsAttr uint16 `xml:"AccessRestrictions,attr,omitempty"`
RolePermissions *ListOfRolePermissions `xml:"RolePermissions"`
RequiredModel []*ModelTableEntry `xml:"RequiredModel"`
}
// ModelTable ...
type ModelTable struct {
Model []*ModelTableEntry `xml:"Model"`
}
// NodeId ...
type NodeId string
// QualifiedName ...
type QualifiedName string
// NodeIdAlias ...
type NodeIdAlias struct {
AliasAttr string `xml:"Alias,attr"`
Value string `xml:",chardata"`
}
// AliasTable ...
type AliasTable struct {
Alias []*NodeIdAlias `xml:"Alias"`
}
// Locale ...
type Locale string
// LocalizedText ...
type LocalizedText struct {
LocaleAttr string `xml:"Locale,attr,omitempty"`
Value string `xml:",chardata"`
}
// WriteMask ...
type WriteMask uint32
// EventNotifier ...
type EventNotifier uint8
// ValueRank ...
type ValueRank int
// AccessRestriction ...
type AccessRestriction uint16
// ArrayDimensions ...
type ArrayDimensions string
// SymbolicName ...
type SymbolicName string
// Duration ...
type Duration float64
// AccessLevel ...
type AccessLevel uint32
// Reference ...
type Reference struct {
ReferenceTypeAttr string `xml:"ReferenceType,attr"`
IsForwardAttr *bool `xml:"IsForward,attr,omitempty"` // EDIT: this was changed from a bool to a *bool because the default value if this attribute isn't present is true
Value string `xml:",chardata"`
}
// ListOfReferences ...
type ListOfReferences struct {
Reference []*Reference `xml:"Reference"`
}
// RolePermission ...
type RolePermission struct {
PermissionsAttr uint32 `xml:"Permissions,attr,omitempty"`
Value string `xml:",chardata"`
}
// ListOfRolePermissions ...
type ListOfRolePermissions struct {
RolePermission []*RolePermission `xml:"RolePermission"`
}
// Extension ...
type Extension struct {
}
// ListOfExtensions ...
type ListOfExtensions struct {
Extension []*Extension `xml:"Extension"`
}
// ReleaseStatus ...
type ReleaseStatus string
// UANode ...
type UANode struct {
NodeIdAttr string `xml:"NodeId,attr"`
BrowseNameAttr string `xml:"BrowseName,attr"`
WriteMaskAttr uint32 `xml:"WriteMask,attr,omitempty"`
UserWriteMaskAttr uint32 `xml:"UserWriteMask,attr,omitempty"`
AccessRestrictionsAttr uint16 `xml:"AccessRestrictions,attr,omitempty"`
HasNoPermissionsAttr bool `xml:"HasNoPermissions,attr,omitempty"`
SymbolicNameAttr string `xml:"SymbolicName,attr,omitempty"`
ReleaseStatusAttr string `xml:"ReleaseStatus,attr,omitempty"`
DisplayName []*LocalizedText `xml:"DisplayName"`
Description []*LocalizedText `xml:"Description"`
Category []string `xml:"Category"`
Documentation string `xml:"Documentation"`
References *ListOfReferences `xml:"References"`
RolePermissions *ListOfRolePermissions `xml:"RolePermissions"`
Extensions *ListOfExtensions `xml:"Extensions"`
}
// UAInstance ...
type UAInstance struct {
ParentNodeIdAttr string `xml:"ParentNodeId,attr,omitempty"`
*UANode
}
// UAObject ...
type UAObject struct {
EventNotifierAttr uint8 `xml:"EventNotifier,attr,omitempty"`
*UAInstance
}
// Value ...
type Value struct {
}
// UAVariable ...
type UAVariable struct {
DataTypeAttr string `xml:"DataType,attr,omitempty"`
ValueRankAttr int `xml:"ValueRank,attr,omitempty"`
ArrayDimensionsAttr string `xml:"ArrayDimensions,attr,omitempty"`
AccessLevelAttr uint32 `xml:"AccessLevel,attr,omitempty"`
UserAccessLevelAttr uint32 `xml:"UserAccessLevel,attr,omitempty"`
MinimumSamplingIntervalAttr float64 `xml:"MinimumSamplingInterval,attr,omitempty"`
HistorizingAttr bool `xml:"Historizing,attr,omitempty"`
Value *Value `xml:"Value"`
Translation []*TranslationType `xml:"Translation"`
*UAInstance
}
// UAMethodArgument ...
type UAMethodArgument struct {
Name string `xml:"Name"`
Description []*LocalizedText `xml:"Description"`
}
// UAMethod ...
type UAMethod struct {
ExecutableAttr bool `xml:"Executable,attr,omitempty"`
UserExecutableAttr bool `xml:"UserExecutable,attr,omitempty"`
MethodDeclarationIdAttr string `xml:"MethodDeclarationId,attr,omitempty"`
ArgumentDescription []*UAMethodArgument `xml:"ArgumentDescription"`
*UAInstance
}
// TranslationType ...
type TranslationType struct {
Text []*LocalizedText `xml:"Text"`
Field []*StructureTranslationType `xml:"Field"`
}
// StructureTranslationType ...
type StructureTranslationType struct {
NameAttr string `xml:"Name,attr"`
Text []*LocalizedText `xml:"Text"`
}
// UAView ...
type UAView struct {
ContainsNoLoopsAttr bool `xml:"ContainsNoLoops,attr,omitempty"`
EventNotifierAttr uint8 `xml:"EventNotifier,attr,omitempty"`
*UAInstance
}
// UAType ...
type UAType struct {
IsAbstractAttr bool `xml:"IsAbstract,attr,omitempty"`
*UANode
}
// UAObjectType ...
type UAObjectType struct {
*UAType
}
// UAVariableType ...
type UAVariableType struct {
DataTypeAttr string `xml:"DataType,attr,omitempty"`
ValueRankAttr int `xml:"ValueRank,attr,omitempty"`
ArrayDimensionsAttr string `xml:"ArrayDimensions,attr,omitempty"`
Value *Value `xml:"Value"`
*UAType
}
// DataTypePurpose ...
type DataTypePurpose string
// UADataType ...
type UADataType struct {
PurposeAttr string `xml:"Purpose,attr,omitempty"`
Definition *DataTypeDefinition `xml:"Definition"`
*UAType
}
// DataTypeDefinition ...
type DataTypeDefinition struct {
NameAttr string `xml:"Name,attr"`
SymbolicNameAttr string `xml:"SymbolicName,attr,omitempty"`
IsUnionAttr bool `xml:"IsUnion,attr,omitempty"`
IsOptionSetAttr bool `xml:"IsOptionSet,attr,omitempty"`
BaseTypeAttr string `xml:"BaseType,attr,omitempty"`
Field []*DataTypeField `xml:"Field"`
}
// DataTypeField ...
type DataTypeField struct {
NameAttr string `xml:"Name,attr"`
SymbolicNameAttr string `xml:"SymbolicName,attr,omitempty"`
DataTypeAttr string `xml:"DataType,attr,omitempty"`
ValueRankAttr int `xml:"ValueRank,attr,omitempty"`
ArrayDimensionsAttr string `xml:"ArrayDimensions,attr,omitempty"`
MaxStringLengthAttr uint32 `xml:"MaxStringLength,attr,omitempty"`
ValueAttr int `xml:"Value,attr,omitempty"`
IsOptionalAttr bool `xml:"IsOptional,attr,omitempty"`
AllowSubTypesAttr bool `xml:"AllowSubTypes,attr,omitempty"`
DisplayName []*LocalizedText `xml:"DisplayName"`
Description []*LocalizedText `xml:"Description"`
}
// UAReferenceType ...
type UAReferenceType struct {
SymmetricAttr bool `xml:"Symmetric,attr,omitempty"`
InverseName []*LocalizedText `xml:"InverseName"`
*UAType
}