1
|
|
|
''' |
2
|
|
|
Autogenerate code from xml spec |
3
|
|
|
''' |
4
|
|
|
|
5
|
1 |
|
from datetime import datetime |
6
|
1 |
|
from enum import Enum, IntEnum |
7
|
|
|
|
8
|
1 |
|
from opcua.common.utils import Buffer |
9
|
1 |
|
from opcua.common.uaerrors import UAError |
10
|
1 |
|
from opcua.ua.uatypes import * |
11
|
1 |
|
from opcua.ua.object_ids import ObjectIds |
12
|
|
|
|
13
|
|
|
|
14
|
1 |
|
class NamingRuleType(IntEnum): |
15
|
|
|
''' |
16
|
|
|
:ivar Mandatory: |
17
|
|
|
:vartype Mandatory: 1 |
18
|
|
|
:ivar Optional: |
19
|
|
|
:vartype Optional: 2 |
20
|
|
|
:ivar Constraint: |
21
|
|
|
:vartype Constraint: 3 |
22
|
|
|
''' |
23
|
1 |
|
Mandatory = 1 |
24
|
1 |
|
Optional = 2 |
25
|
1 |
|
Constraint = 3 |
26
|
|
|
|
27
|
|
|
|
28
|
1 |
|
class OpenFileMode(IntEnum): |
29
|
|
|
''' |
30
|
|
|
:ivar Read: |
31
|
|
|
:vartype Read: 1 |
32
|
|
|
:ivar Write: |
33
|
|
|
:vartype Write: 2 |
34
|
|
|
:ivar EraseExisting: |
35
|
|
|
:vartype EraseExisting: 4 |
36
|
|
|
:ivar Append: |
37
|
|
|
:vartype Append: 8 |
38
|
|
|
''' |
39
|
1 |
|
Read = 1 |
40
|
1 |
|
Write = 2 |
41
|
1 |
|
EraseExisting = 4 |
42
|
1 |
|
Append = 8 |
43
|
|
|
|
44
|
|
|
|
45
|
1 |
|
class TrustListMasks(IntEnum): |
46
|
|
|
''' |
47
|
|
|
:ivar None_: |
48
|
|
|
:vartype None_: 0 |
49
|
|
|
:ivar TrustedCertificates: |
50
|
|
|
:vartype TrustedCertificates: 1 |
51
|
|
|
:ivar TrustedCrls: |
52
|
|
|
:vartype TrustedCrls: 2 |
53
|
|
|
:ivar IssuerCertificates: |
54
|
|
|
:vartype IssuerCertificates: 4 |
55
|
|
|
:ivar IssuerCrls: |
56
|
|
|
:vartype IssuerCrls: 8 |
57
|
|
|
:ivar All: |
58
|
|
|
:vartype All: 15 |
59
|
|
|
''' |
60
|
1 |
|
None_ = 0 |
61
|
1 |
|
TrustedCertificates = 1 |
62
|
1 |
|
TrustedCrls = 2 |
63
|
1 |
|
IssuerCertificates = 4 |
64
|
1 |
|
IssuerCrls = 8 |
65
|
1 |
|
All = 15 |
66
|
|
|
|
67
|
|
|
|
68
|
1 |
|
class IdType(IntEnum): |
69
|
|
|
''' |
70
|
|
|
The type of identifier used in a node id. |
71
|
|
|
|
72
|
|
|
:ivar Numeric: |
73
|
|
|
:vartype Numeric: 0 |
74
|
|
|
:ivar String: |
75
|
|
|
:vartype String: 1 |
76
|
|
|
:ivar Guid: |
77
|
|
|
:vartype Guid: 2 |
78
|
|
|
:ivar Opaque: |
79
|
|
|
:vartype Opaque: 3 |
80
|
|
|
''' |
81
|
1 |
|
Numeric = 0 |
82
|
1 |
|
String = 1 |
83
|
1 |
|
Guid = 2 |
84
|
1 |
|
Opaque = 3 |
85
|
|
|
|
86
|
|
|
|
87
|
1 |
|
class NodeClass(IntEnum): |
88
|
|
|
''' |
89
|
|
|
A mask specifying the class of the node. |
90
|
|
|
|
91
|
|
|
:ivar Unspecified: |
92
|
|
|
:vartype Unspecified: 0 |
93
|
|
|
:ivar Object: |
94
|
|
|
:vartype Object: 1 |
95
|
|
|
:ivar Variable: |
96
|
|
|
:vartype Variable: 2 |
97
|
|
|
:ivar Method: |
98
|
|
|
:vartype Method: 4 |
99
|
|
|
:ivar ObjectType: |
100
|
|
|
:vartype ObjectType: 8 |
101
|
|
|
:ivar VariableType: |
102
|
|
|
:vartype VariableType: 16 |
103
|
|
|
:ivar ReferenceType: |
104
|
|
|
:vartype ReferenceType: 32 |
105
|
|
|
:ivar DataType: |
106
|
|
|
:vartype DataType: 64 |
107
|
|
|
:ivar View: |
108
|
|
|
:vartype View: 128 |
109
|
|
|
''' |
110
|
1 |
|
Unspecified = 0 |
111
|
1 |
|
Object = 1 |
112
|
1 |
|
Variable = 2 |
113
|
1 |
|
Method = 4 |
114
|
1 |
|
ObjectType = 8 |
115
|
1 |
|
VariableType = 16 |
116
|
1 |
|
ReferenceType = 32 |
117
|
1 |
|
DataType = 64 |
118
|
1 |
|
View = 128 |
119
|
|
|
|
120
|
|
|
|
121
|
1 |
|
class ApplicationType(IntEnum): |
122
|
|
|
''' |
123
|
|
|
The types of applications. |
124
|
|
|
|
125
|
|
|
:ivar Server: |
126
|
|
|
:vartype Server: 0 |
127
|
|
|
:ivar Client: |
128
|
|
|
:vartype Client: 1 |
129
|
|
|
:ivar ClientAndServer: |
130
|
|
|
:vartype ClientAndServer: 2 |
131
|
|
|
:ivar DiscoveryServer: |
132
|
|
|
:vartype DiscoveryServer: 3 |
133
|
|
|
''' |
134
|
1 |
|
Server = 0 |
135
|
1 |
|
Client = 1 |
136
|
1 |
|
ClientAndServer = 2 |
137
|
1 |
|
DiscoveryServer = 3 |
138
|
|
|
|
139
|
|
|
|
140
|
1 |
|
class MessageSecurityMode(IntEnum): |
141
|
|
|
''' |
142
|
|
|
The type of security to use on a message. |
143
|
|
|
|
144
|
|
|
:ivar Invalid: |
145
|
|
|
:vartype Invalid: 0 |
146
|
|
|
:ivar None_: |
147
|
|
|
:vartype None_: 1 |
148
|
|
|
:ivar Sign: |
149
|
|
|
:vartype Sign: 2 |
150
|
|
|
:ivar SignAndEncrypt: |
151
|
|
|
:vartype SignAndEncrypt: 3 |
152
|
|
|
''' |
153
|
1 |
|
Invalid = 0 |
154
|
1 |
|
None_ = 1 |
155
|
1 |
|
Sign = 2 |
156
|
1 |
|
SignAndEncrypt = 3 |
157
|
|
|
|
158
|
|
|
|
159
|
1 |
|
class UserTokenType(IntEnum): |
160
|
|
|
''' |
161
|
|
|
The possible user token types. |
162
|
|
|
|
163
|
|
|
:ivar Anonymous: |
164
|
|
|
:vartype Anonymous: 0 |
165
|
|
|
:ivar UserName: |
166
|
|
|
:vartype UserName: 1 |
167
|
|
|
:ivar Certificate: |
168
|
|
|
:vartype Certificate: 2 |
169
|
|
|
:ivar IssuedToken: |
170
|
|
|
:vartype IssuedToken: 3 |
171
|
|
|
:ivar Kerberos: |
172
|
|
|
:vartype Kerberos: 4 |
173
|
|
|
''' |
174
|
1 |
|
Anonymous = 0 |
175
|
1 |
|
UserName = 1 |
176
|
1 |
|
Certificate = 2 |
177
|
1 |
|
IssuedToken = 3 |
178
|
1 |
|
Kerberos = 4 |
179
|
|
|
|
180
|
|
|
|
181
|
1 |
|
class SecurityTokenRequestType(IntEnum): |
182
|
|
|
''' |
183
|
|
|
Indicates whether a token if being created or renewed. |
184
|
|
|
|
185
|
|
|
:ivar Issue: |
186
|
|
|
:vartype Issue: 0 |
187
|
|
|
:ivar Renew: |
188
|
|
|
:vartype Renew: 1 |
189
|
|
|
''' |
190
|
1 |
|
Issue = 0 |
191
|
1 |
|
Renew = 1 |
192
|
|
|
|
193
|
|
|
|
194
|
1 |
|
class NodeAttributesMask(IntEnum): |
195
|
|
|
''' |
196
|
|
|
The bits used to specify default attributes for a new node. |
197
|
|
|
|
198
|
|
|
:ivar None_: |
199
|
|
|
:vartype None_: 0 |
200
|
|
|
:ivar AccessLevel: |
201
|
|
|
:vartype AccessLevel: 1 |
202
|
|
|
:ivar ArrayDimensions: |
203
|
|
|
:vartype ArrayDimensions: 2 |
204
|
|
|
:ivar BrowseName: |
205
|
|
|
:vartype BrowseName: 4 |
206
|
|
|
:ivar ContainsNoLoops: |
207
|
|
|
:vartype ContainsNoLoops: 8 |
208
|
|
|
:ivar DataType: |
209
|
|
|
:vartype DataType: 16 |
210
|
|
|
:ivar Description: |
211
|
|
|
:vartype Description: 32 |
212
|
|
|
:ivar DisplayName: |
213
|
|
|
:vartype DisplayName: 64 |
214
|
|
|
:ivar EventNotifier: |
215
|
|
|
:vartype EventNotifier: 128 |
216
|
|
|
:ivar Executable: |
217
|
|
|
:vartype Executable: 256 |
218
|
|
|
:ivar Historizing: |
219
|
|
|
:vartype Historizing: 512 |
220
|
|
|
:ivar InverseName: |
221
|
|
|
:vartype InverseName: 1024 |
222
|
|
|
:ivar IsAbstract: |
223
|
|
|
:vartype IsAbstract: 2048 |
224
|
|
|
:ivar MinimumSamplingInterval: |
225
|
|
|
:vartype MinimumSamplingInterval: 4096 |
226
|
|
|
:ivar NodeClass: |
227
|
|
|
:vartype NodeClass: 8192 |
228
|
|
|
:ivar NodeId: |
229
|
|
|
:vartype NodeId: 16384 |
230
|
|
|
:ivar Symmetric: |
231
|
|
|
:vartype Symmetric: 32768 |
232
|
|
|
:ivar UserAccessLevel: |
233
|
|
|
:vartype UserAccessLevel: 65536 |
234
|
|
|
:ivar UserExecutable: |
235
|
|
|
:vartype UserExecutable: 131072 |
236
|
|
|
:ivar UserWriteMask: |
237
|
|
|
:vartype UserWriteMask: 262144 |
238
|
|
|
:ivar ValueRank: |
239
|
|
|
:vartype ValueRank: 524288 |
240
|
|
|
:ivar WriteMask: |
241
|
|
|
:vartype WriteMask: 1048576 |
242
|
|
|
:ivar Value: |
243
|
|
|
:vartype Value: 2097152 |
244
|
|
|
:ivar All: |
245
|
|
|
:vartype All: 4194303 |
246
|
|
|
:ivar BaseNode: |
247
|
|
|
:vartype BaseNode: 1335396 |
248
|
|
|
:ivar Object: |
249
|
|
|
:vartype Object: 1335524 |
250
|
|
|
:ivar ObjectTypeOrDataType: |
251
|
|
|
:vartype ObjectTypeOrDataType: 1337444 |
252
|
|
|
:ivar Variable: |
253
|
|
|
:vartype Variable: 4026999 |
254
|
|
|
:ivar VariableType: |
255
|
|
|
:vartype VariableType: 3958902 |
256
|
|
|
:ivar Method: |
257
|
|
|
:vartype Method: 1466724 |
258
|
|
|
:ivar ReferenceType: |
259
|
|
|
:vartype ReferenceType: 1371236 |
260
|
|
|
:ivar View: |
261
|
|
|
:vartype View: 1335532 |
262
|
|
|
''' |
263
|
1 |
|
None_ = 0 |
264
|
1 |
|
AccessLevel = 1 |
265
|
1 |
|
ArrayDimensions = 2 |
266
|
1 |
|
BrowseName = 4 |
267
|
1 |
|
ContainsNoLoops = 8 |
268
|
1 |
|
DataType = 16 |
269
|
1 |
|
Description = 32 |
270
|
1 |
|
DisplayName = 64 |
271
|
1 |
|
EventNotifier = 128 |
272
|
1 |
|
Executable = 256 |
273
|
1 |
|
Historizing = 512 |
274
|
1 |
|
InverseName = 1024 |
275
|
1 |
|
IsAbstract = 2048 |
276
|
1 |
|
MinimumSamplingInterval = 4096 |
277
|
1 |
|
NodeClass = 8192 |
278
|
1 |
|
NodeId = 16384 |
279
|
1 |
|
Symmetric = 32768 |
280
|
1 |
|
UserAccessLevel = 65536 |
281
|
1 |
|
UserExecutable = 131072 |
282
|
1 |
|
UserWriteMask = 262144 |
283
|
1 |
|
ValueRank = 524288 |
284
|
1 |
|
WriteMask = 1048576 |
285
|
1 |
|
Value = 2097152 |
286
|
1 |
|
All = 4194303 |
287
|
1 |
|
BaseNode = 1335396 |
288
|
1 |
|
Object = 1335524 |
289
|
1 |
|
ObjectTypeOrDataType = 1337444 |
290
|
1 |
|
Variable = 4026999 |
291
|
1 |
|
VariableType = 3958902 |
292
|
1 |
|
Method = 1466724 |
293
|
1 |
|
ReferenceType = 1371236 |
294
|
1 |
|
View = 1335532 |
295
|
|
|
|
296
|
|
|
|
297
|
1 |
|
class AttributeWriteMask(IntEnum): |
298
|
|
|
''' |
299
|
|
|
Define bits used to indicate which attributes are writable. |
300
|
|
|
|
301
|
|
|
:ivar None_: |
302
|
|
|
:vartype None_: 0 |
303
|
|
|
:ivar AccessLevel: |
304
|
|
|
:vartype AccessLevel: 1 |
305
|
|
|
:ivar ArrayDimensions: |
306
|
|
|
:vartype ArrayDimensions: 2 |
307
|
|
|
:ivar BrowseName: |
308
|
|
|
:vartype BrowseName: 4 |
309
|
|
|
:ivar ContainsNoLoops: |
310
|
|
|
:vartype ContainsNoLoops: 8 |
311
|
|
|
:ivar DataType: |
312
|
|
|
:vartype DataType: 16 |
313
|
|
|
:ivar Description: |
314
|
|
|
:vartype Description: 32 |
315
|
|
|
:ivar DisplayName: |
316
|
|
|
:vartype DisplayName: 64 |
317
|
|
|
:ivar EventNotifier: |
318
|
|
|
:vartype EventNotifier: 128 |
319
|
|
|
:ivar Executable: |
320
|
|
|
:vartype Executable: 256 |
321
|
|
|
:ivar Historizing: |
322
|
|
|
:vartype Historizing: 512 |
323
|
|
|
:ivar InverseName: |
324
|
|
|
:vartype InverseName: 1024 |
325
|
|
|
:ivar IsAbstract: |
326
|
|
|
:vartype IsAbstract: 2048 |
327
|
|
|
:ivar MinimumSamplingInterval: |
328
|
|
|
:vartype MinimumSamplingInterval: 4096 |
329
|
|
|
:ivar NodeClass: |
330
|
|
|
:vartype NodeClass: 8192 |
331
|
|
|
:ivar NodeId: |
332
|
|
|
:vartype NodeId: 16384 |
333
|
|
|
:ivar Symmetric: |
334
|
|
|
:vartype Symmetric: 32768 |
335
|
|
|
:ivar UserAccessLevel: |
336
|
|
|
:vartype UserAccessLevel: 65536 |
337
|
|
|
:ivar UserExecutable: |
338
|
|
|
:vartype UserExecutable: 131072 |
339
|
|
|
:ivar UserWriteMask: |
340
|
|
|
:vartype UserWriteMask: 262144 |
341
|
|
|
:ivar ValueRank: |
342
|
|
|
:vartype ValueRank: 524288 |
343
|
|
|
:ivar WriteMask: |
344
|
|
|
:vartype WriteMask: 1048576 |
345
|
|
|
:ivar ValueForVariableType: |
346
|
|
|
:vartype ValueForVariableType: 2097152 |
347
|
|
|
''' |
348
|
1 |
|
None_ = 0 |
349
|
1 |
|
AccessLevel = 1 |
350
|
1 |
|
ArrayDimensions = 2 |
351
|
1 |
|
BrowseName = 4 |
352
|
1 |
|
ContainsNoLoops = 8 |
353
|
1 |
|
DataType = 16 |
354
|
1 |
|
Description = 32 |
355
|
1 |
|
DisplayName = 64 |
356
|
1 |
|
EventNotifier = 128 |
357
|
1 |
|
Executable = 256 |
358
|
1 |
|
Historizing = 512 |
359
|
1 |
|
InverseName = 1024 |
360
|
1 |
|
IsAbstract = 2048 |
361
|
1 |
|
MinimumSamplingInterval = 4096 |
362
|
1 |
|
NodeClass = 8192 |
363
|
1 |
|
NodeId = 16384 |
364
|
1 |
|
Symmetric = 32768 |
365
|
1 |
|
UserAccessLevel = 65536 |
366
|
1 |
|
UserExecutable = 131072 |
367
|
1 |
|
UserWriteMask = 262144 |
368
|
1 |
|
ValueRank = 524288 |
369
|
1 |
|
WriteMask = 1048576 |
370
|
1 |
|
ValueForVariableType = 2097152 |
371
|
|
|
|
372
|
|
|
|
373
|
1 |
|
class BrowseDirection(IntEnum): |
374
|
|
|
''' |
375
|
|
|
The directions of the references to return. |
376
|
|
|
|
377
|
|
|
:ivar Forward: |
378
|
|
|
:vartype Forward: 0 |
379
|
|
|
:ivar Inverse: |
380
|
|
|
:vartype Inverse: 1 |
381
|
|
|
:ivar Both: |
382
|
|
|
:vartype Both: 2 |
383
|
|
|
''' |
384
|
1 |
|
Forward = 0 |
385
|
1 |
|
Inverse = 1 |
386
|
1 |
|
Both = 2 |
387
|
|
|
|
388
|
|
|
|
389
|
1 |
|
class BrowseResultMask(IntEnum): |
390
|
|
|
''' |
391
|
|
|
A bit mask which specifies what should be returned in a browse response. |
392
|
|
|
|
393
|
|
|
:ivar None_: |
394
|
|
|
:vartype None_: 0 |
395
|
|
|
:ivar ReferenceTypeId: |
396
|
|
|
:vartype ReferenceTypeId: 1 |
397
|
|
|
:ivar IsForward: |
398
|
|
|
:vartype IsForward: 2 |
399
|
|
|
:ivar NodeClass: |
400
|
|
|
:vartype NodeClass: 4 |
401
|
|
|
:ivar BrowseName: |
402
|
|
|
:vartype BrowseName: 8 |
403
|
|
|
:ivar DisplayName: |
404
|
|
|
:vartype DisplayName: 16 |
405
|
|
|
:ivar TypeDefinition: |
406
|
|
|
:vartype TypeDefinition: 32 |
407
|
|
|
:ivar All: |
408
|
|
|
:vartype All: 63 |
409
|
|
|
:ivar ReferenceTypeInfo: |
410
|
|
|
:vartype ReferenceTypeInfo: 3 |
411
|
|
|
:ivar TargetInfo: |
412
|
|
|
:vartype TargetInfo: 60 |
413
|
|
|
''' |
414
|
1 |
|
None_ = 0 |
415
|
1 |
|
ReferenceTypeId = 1 |
416
|
1 |
|
IsForward = 2 |
417
|
1 |
|
NodeClass = 4 |
418
|
1 |
|
BrowseName = 8 |
419
|
1 |
|
DisplayName = 16 |
420
|
1 |
|
TypeDefinition = 32 |
421
|
1 |
|
All = 63 |
422
|
1 |
|
ReferenceTypeInfo = 3 |
423
|
1 |
|
TargetInfo = 60 |
424
|
|
|
|
425
|
|
|
|
426
|
1 |
|
class ComplianceLevel(IntEnum): |
427
|
|
|
''' |
428
|
|
|
:ivar Untested: |
429
|
|
|
:vartype Untested: 0 |
430
|
|
|
:ivar Partial: |
431
|
|
|
:vartype Partial: 1 |
432
|
|
|
:ivar SelfTested: |
433
|
|
|
:vartype SelfTested: 2 |
434
|
|
|
:ivar Certified: |
435
|
|
|
:vartype Certified: 3 |
436
|
|
|
''' |
437
|
1 |
|
Untested = 0 |
438
|
1 |
|
Partial = 1 |
439
|
1 |
|
SelfTested = 2 |
440
|
1 |
|
Certified = 3 |
441
|
|
|
|
442
|
|
|
|
443
|
1 |
|
class FilterOperator(IntEnum): |
444
|
|
|
''' |
445
|
|
|
:ivar Equals: |
446
|
|
|
:vartype Equals: 0 |
447
|
|
|
:ivar IsNull: |
448
|
|
|
:vartype IsNull: 1 |
449
|
|
|
:ivar GreaterThan: |
450
|
|
|
:vartype GreaterThan: 2 |
451
|
|
|
:ivar LessThan: |
452
|
|
|
:vartype LessThan: 3 |
453
|
|
|
:ivar GreaterThanOrEqual: |
454
|
|
|
:vartype GreaterThanOrEqual: 4 |
455
|
|
|
:ivar LessThanOrEqual: |
456
|
|
|
:vartype LessThanOrEqual: 5 |
457
|
|
|
:ivar Like: |
458
|
|
|
:vartype Like: 6 |
459
|
|
|
:ivar Not: |
460
|
|
|
:vartype Not: 7 |
461
|
|
|
:ivar Between: |
462
|
|
|
:vartype Between: 8 |
463
|
|
|
:ivar InList: |
464
|
|
|
:vartype InList: 9 |
465
|
|
|
:ivar And: |
466
|
|
|
:vartype And: 10 |
467
|
|
|
:ivar Or: |
468
|
|
|
:vartype Or: 11 |
469
|
|
|
:ivar Cast: |
470
|
|
|
:vartype Cast: 12 |
471
|
|
|
:ivar InView: |
472
|
|
|
:vartype InView: 13 |
473
|
|
|
:ivar OfType: |
474
|
|
|
:vartype OfType: 14 |
475
|
|
|
:ivar RelatedTo: |
476
|
|
|
:vartype RelatedTo: 15 |
477
|
|
|
:ivar BitwiseAnd: |
478
|
|
|
:vartype BitwiseAnd: 16 |
479
|
|
|
:ivar BitwiseOr: |
480
|
|
|
:vartype BitwiseOr: 17 |
481
|
|
|
''' |
482
|
1 |
|
Equals = 0 |
483
|
1 |
|
IsNull = 1 |
484
|
1 |
|
GreaterThan = 2 |
485
|
1 |
|
LessThan = 3 |
486
|
1 |
|
GreaterThanOrEqual = 4 |
487
|
1 |
|
LessThanOrEqual = 5 |
488
|
1 |
|
Like = 6 |
489
|
1 |
|
Not = 7 |
490
|
1 |
|
Between = 8 |
491
|
1 |
|
InList = 9 |
492
|
1 |
|
And = 10 |
493
|
1 |
|
Or = 11 |
494
|
1 |
|
Cast = 12 |
495
|
1 |
|
InView = 13 |
496
|
1 |
|
OfType = 14 |
497
|
1 |
|
RelatedTo = 15 |
498
|
1 |
|
BitwiseAnd = 16 |
499
|
1 |
|
BitwiseOr = 17 |
500
|
|
|
|
501
|
|
|
|
502
|
1 |
|
class TimestampsToReturn(IntEnum): |
503
|
|
|
''' |
504
|
|
|
:ivar Source: |
505
|
|
|
:vartype Source: 0 |
506
|
|
|
:ivar Server: |
507
|
|
|
:vartype Server: 1 |
508
|
|
|
:ivar Both: |
509
|
|
|
:vartype Both: 2 |
510
|
|
|
:ivar Neither: |
511
|
|
|
:vartype Neither: 3 |
512
|
|
|
''' |
513
|
1 |
|
Source = 0 |
514
|
1 |
|
Server = 1 |
515
|
1 |
|
Both = 2 |
516
|
1 |
|
Neither = 3 |
517
|
|
|
|
518
|
|
|
|
519
|
1 |
|
class HistoryUpdateType(IntEnum): |
520
|
|
|
''' |
521
|
|
|
:ivar Insert: |
522
|
|
|
:vartype Insert: 1 |
523
|
|
|
:ivar Replace: |
524
|
|
|
:vartype Replace: 2 |
525
|
|
|
:ivar Update: |
526
|
|
|
:vartype Update: 3 |
527
|
|
|
:ivar Delete: |
528
|
|
|
:vartype Delete: 4 |
529
|
|
|
''' |
530
|
1 |
|
Insert = 1 |
531
|
1 |
|
Replace = 2 |
532
|
1 |
|
Update = 3 |
533
|
1 |
|
Delete = 4 |
534
|
|
|
|
535
|
|
|
|
536
|
1 |
|
class PerformUpdateType(IntEnum): |
537
|
|
|
''' |
538
|
|
|
:ivar Insert: |
539
|
|
|
:vartype Insert: 1 |
540
|
|
|
:ivar Replace: |
541
|
|
|
:vartype Replace: 2 |
542
|
|
|
:ivar Update: |
543
|
|
|
:vartype Update: 3 |
544
|
|
|
:ivar Remove: |
545
|
|
|
:vartype Remove: 4 |
546
|
|
|
''' |
547
|
1 |
|
Insert = 1 |
548
|
1 |
|
Replace = 2 |
549
|
1 |
|
Update = 3 |
550
|
1 |
|
Remove = 4 |
551
|
|
|
|
552
|
|
|
|
553
|
1 |
|
class MonitoringMode(IntEnum): |
554
|
|
|
''' |
555
|
|
|
:ivar Disabled: |
556
|
|
|
:vartype Disabled: 0 |
557
|
|
|
:ivar Sampling: |
558
|
|
|
:vartype Sampling: 1 |
559
|
|
|
:ivar Reporting: |
560
|
|
|
:vartype Reporting: 2 |
561
|
|
|
''' |
562
|
1 |
|
Disabled = 0 |
563
|
1 |
|
Sampling = 1 |
564
|
1 |
|
Reporting = 2 |
565
|
|
|
|
566
|
|
|
|
567
|
1 |
|
class DataChangeTrigger(IntEnum): |
568
|
|
|
''' |
569
|
|
|
:ivar Status: |
570
|
|
|
:vartype Status: 0 |
571
|
|
|
:ivar StatusValue: |
572
|
|
|
:vartype StatusValue: 1 |
573
|
|
|
:ivar StatusValueTimestamp: |
574
|
|
|
:vartype StatusValueTimestamp: 2 |
575
|
|
|
''' |
576
|
1 |
|
Status = 0 |
577
|
1 |
|
StatusValue = 1 |
578
|
1 |
|
StatusValueTimestamp = 2 |
579
|
|
|
|
580
|
|
|
|
581
|
1 |
|
class DeadbandType(IntEnum): |
582
|
|
|
''' |
583
|
|
|
:ivar None_: |
584
|
|
|
:vartype None_: 0 |
585
|
|
|
:ivar Absolute: |
586
|
|
|
:vartype Absolute: 1 |
587
|
|
|
:ivar Percent: |
588
|
|
|
:vartype Percent: 2 |
589
|
|
|
''' |
590
|
1 |
|
None_ = 0 |
591
|
1 |
|
Absolute = 1 |
592
|
1 |
|
Percent = 2 |
593
|
|
|
|
594
|
|
|
|
595
|
1 |
|
class EnumeratedTestType(IntEnum): |
596
|
|
|
''' |
597
|
|
|
A simple enumerated type used for testing. |
598
|
|
|
|
599
|
|
|
:ivar Red: |
600
|
|
|
:vartype Red: 1 |
601
|
|
|
:ivar Yellow: |
602
|
|
|
:vartype Yellow: 4 |
603
|
|
|
:ivar Green: |
604
|
|
|
:vartype Green: 5 |
605
|
|
|
''' |
606
|
1 |
|
Red = 1 |
607
|
1 |
|
Yellow = 4 |
608
|
1 |
|
Green = 5 |
609
|
|
|
|
610
|
|
|
|
611
|
1 |
|
class RedundancySupport(IntEnum): |
612
|
|
|
''' |
613
|
|
|
:ivar None_: |
614
|
|
|
:vartype None_: 0 |
615
|
|
|
:ivar Cold: |
616
|
|
|
:vartype Cold: 1 |
617
|
|
|
:ivar Warm: |
618
|
|
|
:vartype Warm: 2 |
619
|
|
|
:ivar Hot: |
620
|
|
|
:vartype Hot: 3 |
621
|
|
|
:ivar Transparent: |
622
|
|
|
:vartype Transparent: 4 |
623
|
|
|
:ivar HotAndMirrored: |
624
|
|
|
:vartype HotAndMirrored: 5 |
625
|
|
|
''' |
626
|
1 |
|
None_ = 0 |
627
|
1 |
|
Cold = 1 |
628
|
1 |
|
Warm = 2 |
629
|
1 |
|
Hot = 3 |
630
|
1 |
|
Transparent = 4 |
631
|
1 |
|
HotAndMirrored = 5 |
632
|
|
|
|
633
|
|
|
|
634
|
1 |
|
class ServerState(IntEnum): |
635
|
|
|
''' |
636
|
|
|
:ivar Running: |
637
|
|
|
:vartype Running: 0 |
638
|
|
|
:ivar Failed: |
639
|
|
|
:vartype Failed: 1 |
640
|
|
|
:ivar NoConfiguration: |
641
|
|
|
:vartype NoConfiguration: 2 |
642
|
|
|
:ivar Suspended: |
643
|
|
|
:vartype Suspended: 3 |
644
|
|
|
:ivar Shutdown: |
645
|
|
|
:vartype Shutdown: 4 |
646
|
|
|
:ivar Test: |
647
|
|
|
:vartype Test: 5 |
648
|
|
|
:ivar CommunicationFault: |
649
|
|
|
:vartype CommunicationFault: 6 |
650
|
|
|
:ivar Unknown: |
651
|
|
|
:vartype Unknown: 7 |
652
|
|
|
''' |
653
|
1 |
|
Running = 0 |
654
|
1 |
|
Failed = 1 |
655
|
1 |
|
NoConfiguration = 2 |
656
|
1 |
|
Suspended = 3 |
657
|
1 |
|
Shutdown = 4 |
658
|
1 |
|
Test = 5 |
659
|
1 |
|
CommunicationFault = 6 |
660
|
1 |
|
Unknown = 7 |
661
|
|
|
|
662
|
|
|
|
663
|
1 |
|
class ModelChangeStructureVerbMask(IntEnum): |
664
|
|
|
''' |
665
|
|
|
:ivar NodeAdded: |
666
|
|
|
:vartype NodeAdded: 1 |
667
|
|
|
:ivar NodeDeleted: |
668
|
|
|
:vartype NodeDeleted: 2 |
669
|
|
|
:ivar ReferenceAdded: |
670
|
|
|
:vartype ReferenceAdded: 4 |
671
|
|
|
:ivar ReferenceDeleted: |
672
|
|
|
:vartype ReferenceDeleted: 8 |
673
|
|
|
:ivar DataTypeChanged: |
674
|
|
|
:vartype DataTypeChanged: 16 |
675
|
|
|
''' |
676
|
1 |
|
NodeAdded = 1 |
677
|
1 |
|
NodeDeleted = 2 |
678
|
1 |
|
ReferenceAdded = 4 |
679
|
1 |
|
ReferenceDeleted = 8 |
680
|
1 |
|
DataTypeChanged = 16 |
681
|
|
|
|
682
|
|
|
|
683
|
1 |
|
class AxisScaleEnumeration(IntEnum): |
684
|
|
|
''' |
685
|
|
|
:ivar Linear: |
686
|
|
|
:vartype Linear: 0 |
687
|
|
|
:ivar Log: |
688
|
|
|
:vartype Log: 1 |
689
|
|
|
:ivar Ln: |
690
|
|
|
:vartype Ln: 2 |
691
|
|
|
''' |
692
|
1 |
|
Linear = 0 |
693
|
1 |
|
Log = 1 |
694
|
1 |
|
Ln = 2 |
695
|
|
|
|
696
|
|
|
|
697
|
1 |
|
class ExceptionDeviationFormat(IntEnum): |
698
|
|
|
''' |
699
|
|
|
:ivar AbsoluteValue: |
700
|
|
|
:vartype AbsoluteValue: 0 |
701
|
|
|
:ivar PercentOfValue: |
702
|
|
|
:vartype PercentOfValue: 1 |
703
|
|
|
:ivar PercentOfRange: |
704
|
|
|
:vartype PercentOfRange: 2 |
705
|
|
|
:ivar PercentOfEURange: |
706
|
|
|
:vartype PercentOfEURange: 3 |
707
|
|
|
:ivar Unknown: |
708
|
|
|
:vartype Unknown: 4 |
709
|
|
|
''' |
710
|
1 |
|
AbsoluteValue = 0 |
711
|
1 |
|
PercentOfValue = 1 |
712
|
1 |
|
PercentOfRange = 2 |
713
|
1 |
|
PercentOfEURange = 3 |
714
|
1 |
|
Unknown = 4 |
715
|
|
|
|
716
|
|
|
|
717
|
1 |
|
class XmlElement(FrozenClass): |
718
|
|
|
''' |
719
|
|
|
An XML element encoded as a UTF-8 string. |
720
|
|
|
|
721
|
|
|
:ivar Length: |
722
|
|
|
:vartype Length: Int32 |
723
|
|
|
:ivar Value: |
724
|
|
|
:vartype Value: Char |
725
|
|
|
''' |
726
|
1 |
|
def __init__(self, binary=None): |
727
|
|
|
if binary is not None: |
728
|
|
|
self._binary_init(binary) |
729
|
|
|
self._freeze = True |
730
|
|
|
return |
731
|
|
|
self.Length = 0 |
732
|
|
|
self.Value = [] |
733
|
|
|
self._freeze = True |
734
|
|
|
|
735
|
1 |
|
def to_binary(self): |
736
|
|
|
packet = [] |
737
|
|
|
packet.append(uatype_Int32.pack(self.Length)) |
738
|
|
|
packet.append(uatype_Int32.pack(len(self.Value))) |
739
|
|
|
for fieldname in self.Value: |
740
|
|
|
packet.append(uatype_Char.pack(fieldname)) |
741
|
|
|
return b''.join(packet) |
742
|
|
|
|
743
|
1 |
|
@staticmethod |
744
|
|
|
def from_binary(data): |
745
|
|
|
return XmlElement(data) |
746
|
|
|
|
747
|
1 |
|
def _binary_init(self, data): |
748
|
|
|
self.Length = uatype_Int32.unpack(data.read(4))[0] |
749
|
|
|
self.Value = unpack_uatype_array('Char', data) |
750
|
|
|
|
751
|
1 |
|
def __str__(self): |
752
|
|
|
return 'XmlElement(' + 'Length:' + str(self.Length) + ', ' + \ |
753
|
|
|
'Value:' + str(self.Value) + ')' |
754
|
|
|
|
755
|
1 |
|
__repr__ = __str__ |
756
|
|
|
|
757
|
|
|
|
758
|
1 |
|
class DiagnosticInfo(FrozenClass): |
759
|
|
|
''' |
760
|
|
|
A recursive structure containing diagnostic information associated with a status code. |
761
|
|
|
|
762
|
|
|
:ivar Encoding: |
763
|
|
|
:vartype Encoding: UInt8 |
764
|
|
|
:ivar SymbolicId: |
765
|
|
|
:vartype SymbolicId: Int32 |
766
|
|
|
:ivar NamespaceURI: |
767
|
|
|
:vartype NamespaceURI: Int32 |
768
|
|
|
:ivar Locale: |
769
|
|
|
:vartype Locale: Int32 |
770
|
|
|
:ivar LocalizedText: |
771
|
|
|
:vartype LocalizedText: Int32 |
772
|
|
|
:ivar AdditionalInfo: |
773
|
|
|
:vartype AdditionalInfo: CharArray |
774
|
|
|
:ivar InnerStatusCode: |
775
|
|
|
:vartype InnerStatusCode: StatusCode |
776
|
|
|
:ivar InnerDiagnosticInfo: |
777
|
|
|
:vartype InnerDiagnosticInfo: DiagnosticInfo |
778
|
|
|
''' |
779
|
1 |
|
def __init__(self, binary=None): |
780
|
1 |
|
if binary is not None: |
781
|
1 |
|
self._binary_init(binary) |
782
|
1 |
|
self._freeze = True |
783
|
1 |
|
return |
784
|
1 |
|
self.Encoding = 0 |
785
|
1 |
|
self.SymbolicId = 0 |
786
|
1 |
|
self.NamespaceURI = 0 |
787
|
1 |
|
self.Locale = 0 |
788
|
1 |
|
self.LocalizedText = 0 |
789
|
1 |
|
self.AdditionalInfo = b'' |
790
|
1 |
|
self.InnerStatusCode = StatusCode() |
791
|
1 |
|
self.InnerDiagnosticInfo = None |
792
|
1 |
|
self._freeze = True |
793
|
|
|
|
794
|
1 |
|
def to_binary(self): |
795
|
1 |
|
packet = [] |
796
|
1 |
|
if self.SymbolicId: self.Encoding |= (1 << 0) |
797
|
1 |
|
if self.NamespaceURI: self.Encoding |= (1 << 1) |
798
|
1 |
|
if self.Locale: self.Encoding |= (1 << 2) |
799
|
1 |
|
if self.LocalizedText: self.Encoding |= (1 << 3) |
800
|
1 |
|
if self.AdditionalInfo: self.Encoding |= (1 << 4) |
801
|
1 |
|
if self.InnerStatusCode: self.Encoding |= (1 << 5) |
802
|
1 |
|
if self.InnerDiagnosticInfo: self.Encoding |= (1 << 6) |
803
|
1 |
|
packet.append(uatype_UInt8.pack(self.Encoding)) |
804
|
1 |
|
if self.SymbolicId: |
805
|
|
|
packet.append(uatype_Int32.pack(self.SymbolicId)) |
806
|
1 |
|
if self.NamespaceURI: |
807
|
|
|
packet.append(uatype_Int32.pack(self.NamespaceURI)) |
808
|
1 |
|
if self.Locale: |
809
|
|
|
packet.append(uatype_Int32.pack(self.Locale)) |
810
|
1 |
|
if self.LocalizedText: |
811
|
|
|
packet.append(uatype_Int32.pack(self.LocalizedText)) |
812
|
1 |
|
if self.AdditionalInfo: |
813
|
|
|
packet.append(pack_bytes(self.AdditionalInfo)) |
814
|
1 |
|
if self.InnerStatusCode: |
815
|
1 |
|
packet.append(self.InnerStatusCode.to_binary()) |
816
|
1 |
|
if self.InnerDiagnosticInfo: |
817
|
|
|
packet.append(self.InnerDiagnosticInfo.to_binary()) |
818
|
1 |
|
return b''.join(packet) |
819
|
|
|
|
820
|
1 |
|
@staticmethod |
821
|
|
|
def from_binary(data): |
822
|
1 |
|
return DiagnosticInfo(data) |
823
|
|
|
|
824
|
1 |
|
def _binary_init(self, data): |
825
|
1 |
|
self.Encoding = uatype_UInt8.unpack(data.read(1))[0] |
826
|
1 |
|
if self.Encoding & (1 << 0): |
827
|
|
|
self.SymbolicId = uatype_Int32.unpack(data.read(4))[0] |
828
|
|
|
else: |
829
|
1 |
|
self.SymbolicId = 0 |
830
|
1 |
|
if self.Encoding & (1 << 1): |
831
|
|
|
self.NamespaceURI = uatype_Int32.unpack(data.read(4))[0] |
832
|
|
|
else: |
833
|
1 |
|
self.NamespaceURI = 0 |
834
|
1 |
|
if self.Encoding & (1 << 2): |
835
|
|
|
self.Locale = uatype_Int32.unpack(data.read(4))[0] |
836
|
|
|
else: |
837
|
1 |
|
self.Locale = 0 |
838
|
1 |
|
if self.Encoding & (1 << 3): |
839
|
|
|
self.LocalizedText = uatype_Int32.unpack(data.read(4))[0] |
840
|
|
|
else: |
841
|
1 |
|
self.LocalizedText = 0 |
842
|
1 |
|
if self.Encoding & (1 << 4): |
843
|
|
|
self.AdditionalInfo = unpack_bytes(data) |
844
|
|
|
else: |
845
|
1 |
|
self.AdditionalInfo = b'' |
846
|
1 |
|
if self.Encoding & (1 << 5): |
847
|
1 |
|
self.InnerStatusCode = StatusCode.from_binary(data) |
848
|
|
|
else: |
849
|
|
|
self.InnerStatusCode = StatusCode() |
850
|
1 |
|
if self.Encoding & (1 << 6): |
851
|
|
|
self.InnerDiagnosticInfo = DiagnosticInfo.from_binary(data) |
852
|
|
|
else: |
853
|
1 |
|
self.InnerDiagnosticInfo = None |
854
|
|
|
|
855
|
1 |
|
def __str__(self): |
856
|
|
|
return 'DiagnosticInfo(' + 'Encoding:' + str(self.Encoding) + ', ' + \ |
857
|
|
|
'SymbolicId:' + str(self.SymbolicId) + ', ' + \ |
858
|
|
|
'NamespaceURI:' + str(self.NamespaceURI) + ', ' + \ |
859
|
|
|
'Locale:' + str(self.Locale) + ', ' + \ |
860
|
|
|
'LocalizedText:' + str(self.LocalizedText) + ', ' + \ |
861
|
|
|
'AdditionalInfo:' + str(self.AdditionalInfo) + ', ' + \ |
862
|
|
|
'InnerStatusCode:' + str(self.InnerStatusCode) + ', ' + \ |
863
|
|
|
'InnerDiagnosticInfo:' + str(self.InnerDiagnosticInfo) + ')' |
864
|
|
|
|
865
|
1 |
|
__repr__ = __str__ |
866
|
|
|
|
867
|
|
|
|
868
|
1 |
|
class TrustListDataType(FrozenClass): |
869
|
|
|
''' |
870
|
|
|
:ivar SpecifiedLists: |
871
|
|
|
:vartype SpecifiedLists: UInt32 |
872
|
|
|
:ivar TrustedCertificates: |
873
|
|
|
:vartype TrustedCertificates: ByteString |
874
|
|
|
:ivar TrustedCrls: |
875
|
|
|
:vartype TrustedCrls: ByteString |
876
|
|
|
:ivar IssuerCertificates: |
877
|
|
|
:vartype IssuerCertificates: ByteString |
878
|
|
|
:ivar IssuerCrls: |
879
|
|
|
:vartype IssuerCrls: ByteString |
880
|
|
|
''' |
881
|
1 |
|
def __init__(self, binary=None): |
882
|
|
|
if binary is not None: |
883
|
|
|
self._binary_init(binary) |
884
|
|
|
self._freeze = True |
885
|
|
|
return |
886
|
|
|
self.SpecifiedLists = 0 |
887
|
|
|
self.TrustedCertificates = [] |
888
|
|
|
self.TrustedCrls = [] |
889
|
|
|
self.IssuerCertificates = [] |
890
|
|
|
self.IssuerCrls = [] |
891
|
|
|
self._freeze = True |
892
|
|
|
|
893
|
1 |
|
def to_binary(self): |
894
|
|
|
packet = [] |
895
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedLists)) |
896
|
|
|
packet.append(uatype_Int32.pack(len(self.TrustedCertificates))) |
897
|
|
|
for fieldname in self.TrustedCertificates: |
898
|
|
|
packet.append(pack_bytes(fieldname)) |
899
|
|
|
packet.append(uatype_Int32.pack(len(self.TrustedCrls))) |
900
|
|
|
for fieldname in self.TrustedCrls: |
901
|
|
|
packet.append(pack_bytes(fieldname)) |
902
|
|
|
packet.append(uatype_Int32.pack(len(self.IssuerCertificates))) |
903
|
|
|
for fieldname in self.IssuerCertificates: |
904
|
|
|
packet.append(pack_bytes(fieldname)) |
905
|
|
|
packet.append(uatype_Int32.pack(len(self.IssuerCrls))) |
906
|
|
|
for fieldname in self.IssuerCrls: |
907
|
|
|
packet.append(pack_bytes(fieldname)) |
908
|
|
|
return b''.join(packet) |
909
|
|
|
|
910
|
1 |
|
@staticmethod |
911
|
|
|
def from_binary(data): |
912
|
|
|
return TrustListDataType(data) |
913
|
|
|
|
914
|
1 |
|
def _binary_init(self, data): |
915
|
|
|
self.SpecifiedLists = uatype_UInt32.unpack(data.read(4))[0] |
916
|
|
|
self.TrustedCertificates = unpack_uatype_array('ByteString', data) |
917
|
|
|
self.TrustedCrls = unpack_uatype_array('ByteString', data) |
918
|
|
|
self.IssuerCertificates = unpack_uatype_array('ByteString', data) |
919
|
|
|
self.IssuerCrls = unpack_uatype_array('ByteString', data) |
920
|
|
|
|
921
|
1 |
|
def __str__(self): |
922
|
|
|
return 'TrustListDataType(' + 'SpecifiedLists:' + str(self.SpecifiedLists) + ', ' + \ |
923
|
|
|
'TrustedCertificates:' + str(self.TrustedCertificates) + ', ' + \ |
924
|
|
|
'TrustedCrls:' + str(self.TrustedCrls) + ', ' + \ |
925
|
|
|
'IssuerCertificates:' + str(self.IssuerCertificates) + ', ' + \ |
926
|
|
|
'IssuerCrls:' + str(self.IssuerCrls) + ')' |
927
|
|
|
|
928
|
1 |
|
__repr__ = __str__ |
929
|
|
|
|
930
|
|
|
|
931
|
1 |
|
class Argument(FrozenClass): |
932
|
|
|
''' |
933
|
|
|
An argument for a method. |
934
|
|
|
|
935
|
|
|
:ivar Name: |
936
|
|
|
:vartype Name: String |
937
|
|
|
:ivar DataType: |
938
|
|
|
:vartype DataType: NodeId |
939
|
|
|
:ivar ValueRank: |
940
|
|
|
:vartype ValueRank: Int32 |
941
|
|
|
:ivar ArrayDimensions: |
942
|
|
|
:vartype ArrayDimensions: UInt32 |
943
|
|
|
:ivar Description: |
944
|
|
|
:vartype Description: LocalizedText |
945
|
|
|
''' |
946
|
1 |
|
def __init__(self, binary=None): |
947
|
1 |
|
if binary is not None: |
948
|
|
|
self._binary_init(binary) |
949
|
|
|
self._freeze = True |
950
|
|
|
return |
951
|
1 |
|
self.Name = '' |
952
|
1 |
|
self.DataType = NodeId() |
953
|
1 |
|
self.ValueRank = 0 |
954
|
1 |
|
self.ArrayDimensions = [] |
955
|
1 |
|
self.Description = LocalizedText() |
956
|
1 |
|
self._freeze = True |
957
|
|
|
|
958
|
1 |
|
def to_binary(self): |
959
|
|
|
packet = [] |
960
|
|
|
packet.append(pack_string(self.Name)) |
961
|
|
|
packet.append(self.DataType.to_binary()) |
962
|
|
|
packet.append(uatype_Int32.pack(self.ValueRank)) |
963
|
|
|
packet.append(uatype_Int32.pack(len(self.ArrayDimensions))) |
964
|
|
|
for fieldname in self.ArrayDimensions: |
965
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
966
|
|
|
packet.append(self.Description.to_binary()) |
967
|
|
|
return b''.join(packet) |
968
|
|
|
|
969
|
1 |
|
@staticmethod |
970
|
|
|
def from_binary(data): |
971
|
|
|
return Argument(data) |
972
|
|
|
|
973
|
1 |
|
def _binary_init(self, data): |
974
|
|
|
self.Name = unpack_string(data) |
975
|
|
|
self.DataType = NodeId.from_binary(data) |
976
|
|
|
self.ValueRank = uatype_Int32.unpack(data.read(4))[0] |
977
|
|
|
self.ArrayDimensions = unpack_uatype_array('UInt32', data) |
978
|
|
|
self.Description = LocalizedText.from_binary(data) |
979
|
|
|
|
980
|
1 |
|
def __str__(self): |
981
|
|
|
return 'Argument(' + 'Name:' + str(self.Name) + ', ' + \ |
982
|
|
|
'DataType:' + str(self.DataType) + ', ' + \ |
983
|
|
|
'ValueRank:' + str(self.ValueRank) + ', ' + \ |
984
|
|
|
'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ |
985
|
|
|
'Description:' + str(self.Description) + ')' |
986
|
|
|
|
987
|
1 |
|
__repr__ = __str__ |
988
|
|
|
|
989
|
|
|
|
990
|
1 |
|
class EnumValueType(FrozenClass): |
991
|
|
|
''' |
992
|
|
|
A mapping between a value of an enumerated type and a name and description. |
993
|
|
|
|
994
|
|
|
:ivar Value: |
995
|
|
|
:vartype Value: Int64 |
996
|
|
|
:ivar DisplayName: |
997
|
|
|
:vartype DisplayName: LocalizedText |
998
|
|
|
:ivar Description: |
999
|
|
|
:vartype Description: LocalizedText |
1000
|
|
|
''' |
1001
|
1 |
|
def __init__(self, binary=None): |
1002
|
|
|
if binary is not None: |
1003
|
|
|
self._binary_init(binary) |
1004
|
|
|
self._freeze = True |
1005
|
|
|
return |
1006
|
|
|
self.Value = 0 |
1007
|
|
|
self.DisplayName = LocalizedText() |
1008
|
|
|
self.Description = LocalizedText() |
1009
|
|
|
self._freeze = True |
1010
|
|
|
|
1011
|
1 |
|
def to_binary(self): |
1012
|
|
|
packet = [] |
1013
|
|
|
packet.append(uatype_Int64.pack(self.Value)) |
1014
|
|
|
packet.append(self.DisplayName.to_binary()) |
1015
|
|
|
packet.append(self.Description.to_binary()) |
1016
|
|
|
return b''.join(packet) |
1017
|
|
|
|
1018
|
1 |
|
@staticmethod |
1019
|
|
|
def from_binary(data): |
1020
|
|
|
return EnumValueType(data) |
1021
|
|
|
|
1022
|
1 |
|
def _binary_init(self, data): |
1023
|
|
|
self.Value = uatype_Int64.unpack(data.read(8))[0] |
1024
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
1025
|
|
|
self.Description = LocalizedText.from_binary(data) |
1026
|
|
|
|
1027
|
1 |
|
def __str__(self): |
1028
|
|
|
return 'EnumValueType(' + 'Value:' + str(self.Value) + ', ' + \ |
1029
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
1030
|
|
|
'Description:' + str(self.Description) + ')' |
1031
|
|
|
|
1032
|
1 |
|
__repr__ = __str__ |
1033
|
|
|
|
1034
|
|
|
|
1035
|
1 |
|
class OptionSet(FrozenClass): |
1036
|
|
|
''' |
1037
|
|
|
This abstract Structured DataType is the base DataType for all DataTypes representing a bit mask. |
1038
|
|
|
|
1039
|
|
|
:ivar Value: |
1040
|
|
|
:vartype Value: ByteString |
1041
|
|
|
:ivar ValidBits: |
1042
|
|
|
:vartype ValidBits: ByteString |
1043
|
|
|
''' |
1044
|
1 |
|
def __init__(self, binary=None): |
1045
|
|
|
if binary is not None: |
1046
|
|
|
self._binary_init(binary) |
1047
|
|
|
self._freeze = True |
1048
|
|
|
return |
1049
|
|
|
self.Value = b'' |
1050
|
|
|
self.ValidBits = b'' |
1051
|
|
|
self._freeze = True |
1052
|
|
|
|
1053
|
1 |
|
def to_binary(self): |
1054
|
|
|
packet = [] |
1055
|
|
|
packet.append(pack_bytes(self.Value)) |
1056
|
|
|
packet.append(pack_bytes(self.ValidBits)) |
1057
|
|
|
return b''.join(packet) |
1058
|
|
|
|
1059
|
1 |
|
@staticmethod |
1060
|
|
|
def from_binary(data): |
1061
|
|
|
return OptionSet(data) |
1062
|
|
|
|
1063
|
1 |
|
def _binary_init(self, data): |
1064
|
|
|
self.Value = unpack_bytes(data) |
1065
|
|
|
self.ValidBits = unpack_bytes(data) |
1066
|
|
|
|
1067
|
1 |
|
def __str__(self): |
1068
|
|
|
return 'OptionSet(' + 'Value:' + str(self.Value) + ', ' + \ |
1069
|
|
|
'ValidBits:' + str(self.ValidBits) + ')' |
1070
|
|
|
|
1071
|
1 |
|
__repr__ = __str__ |
1072
|
|
|
|
1073
|
|
|
|
1074
|
1 |
|
class Union(FrozenClass): |
1075
|
|
|
''' |
1076
|
|
|
This abstract DataType is the base DataType for all union DataTypes. |
1077
|
|
|
|
1078
|
|
|
''' |
1079
|
1 |
|
def __init__(self, binary=None): |
1080
|
|
|
if binary is not None: |
1081
|
|
|
self._binary_init(binary) |
1082
|
|
|
self._freeze = True |
1083
|
|
|
return |
1084
|
|
|
self._freeze = True |
1085
|
|
|
|
1086
|
1 |
|
def to_binary(self): |
1087
|
|
|
packet = [] |
1088
|
|
|
return b''.join(packet) |
1089
|
|
|
|
1090
|
1 |
|
@staticmethod |
1091
|
|
|
def from_binary(data): |
1092
|
|
|
return Union(data) |
1093
|
|
|
|
1094
|
1 |
|
def _binary_init(self, data): |
1095
|
|
|
pass |
1096
|
|
|
|
1097
|
1 |
|
def __str__(self): |
1098
|
|
|
return 'Union(' + + ')' |
1099
|
|
|
|
1100
|
1 |
|
__repr__ = __str__ |
1101
|
|
|
|
1102
|
|
|
|
1103
|
1 |
|
class TimeZoneDataType(FrozenClass): |
1104
|
|
|
''' |
1105
|
|
|
:ivar Offset: |
1106
|
|
|
:vartype Offset: Int16 |
1107
|
|
|
:ivar DaylightSavingInOffset: |
1108
|
|
|
:vartype DaylightSavingInOffset: Boolean |
1109
|
|
|
''' |
1110
|
1 |
|
def __init__(self, binary=None): |
1111
|
|
|
if binary is not None: |
1112
|
|
|
self._binary_init(binary) |
1113
|
|
|
self._freeze = True |
1114
|
|
|
return |
1115
|
|
|
self.Offset = 0 |
1116
|
|
|
self.DaylightSavingInOffset = True |
1117
|
|
|
self._freeze = True |
1118
|
|
|
|
1119
|
1 |
|
def to_binary(self): |
1120
|
|
|
packet = [] |
1121
|
|
|
packet.append(uatype_Int16.pack(self.Offset)) |
1122
|
|
|
packet.append(uatype_Boolean.pack(self.DaylightSavingInOffset)) |
1123
|
|
|
return b''.join(packet) |
1124
|
|
|
|
1125
|
1 |
|
@staticmethod |
1126
|
|
|
def from_binary(data): |
1127
|
|
|
return TimeZoneDataType(data) |
1128
|
|
|
|
1129
|
1 |
|
def _binary_init(self, data): |
1130
|
|
|
self.Offset = uatype_Int16.unpack(data.read(2))[0] |
1131
|
|
|
self.DaylightSavingInOffset = uatype_Boolean.unpack(data.read(1))[0] |
1132
|
|
|
|
1133
|
1 |
|
def __str__(self): |
1134
|
|
|
return 'TimeZoneDataType(' + 'Offset:' + str(self.Offset) + ', ' + \ |
1135
|
|
|
'DaylightSavingInOffset:' + str(self.DaylightSavingInOffset) + ')' |
1136
|
|
|
|
1137
|
1 |
|
__repr__ = __str__ |
1138
|
|
|
|
1139
|
|
|
|
1140
|
1 |
|
class ApplicationDescription(FrozenClass): |
1141
|
|
|
''' |
1142
|
|
|
Describes an application and how to find it. |
1143
|
|
|
|
1144
|
|
|
:ivar ApplicationUri: |
1145
|
|
|
:vartype ApplicationUri: String |
1146
|
|
|
:ivar ProductUri: |
1147
|
|
|
:vartype ProductUri: String |
1148
|
|
|
:ivar ApplicationName: |
1149
|
|
|
:vartype ApplicationName: LocalizedText |
1150
|
|
|
:ivar ApplicationType: |
1151
|
|
|
:vartype ApplicationType: ApplicationType |
1152
|
|
|
:ivar GatewayServerUri: |
1153
|
|
|
:vartype GatewayServerUri: String |
1154
|
|
|
:ivar DiscoveryProfileUri: |
1155
|
|
|
:vartype DiscoveryProfileUri: String |
1156
|
|
|
:ivar DiscoveryUrls: |
1157
|
|
|
:vartype DiscoveryUrls: String |
1158
|
|
|
''' |
1159
|
1 |
|
def __init__(self, binary=None): |
1160
|
1 |
|
if binary is not None: |
1161
|
1 |
|
self._binary_init(binary) |
1162
|
1 |
|
self._freeze = True |
1163
|
1 |
|
return |
1164
|
1 |
|
self.ApplicationUri = '' |
1165
|
1 |
|
self.ProductUri = '' |
1166
|
1 |
|
self.ApplicationName = LocalizedText() |
1167
|
1 |
|
self.ApplicationType = ApplicationType(0) |
1168
|
1 |
|
self.GatewayServerUri = '' |
1169
|
1 |
|
self.DiscoveryProfileUri = '' |
1170
|
1 |
|
self.DiscoveryUrls = [] |
1171
|
1 |
|
self._freeze = True |
1172
|
|
|
|
1173
|
1 |
|
def to_binary(self): |
1174
|
1 |
|
packet = [] |
1175
|
1 |
|
packet.append(pack_string(self.ApplicationUri)) |
1176
|
1 |
|
packet.append(pack_string(self.ProductUri)) |
1177
|
1 |
|
packet.append(self.ApplicationName.to_binary()) |
1178
|
1 |
|
packet.append(uatype_UInt32.pack(self.ApplicationType.value)) |
1179
|
1 |
|
packet.append(pack_string(self.GatewayServerUri)) |
1180
|
1 |
|
packet.append(pack_string(self.DiscoveryProfileUri)) |
1181
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiscoveryUrls))) |
1182
|
1 |
|
for fieldname in self.DiscoveryUrls: |
1183
|
1 |
|
packet.append(pack_string(fieldname)) |
1184
|
1 |
|
return b''.join(packet) |
1185
|
|
|
|
1186
|
1 |
|
@staticmethod |
1187
|
|
|
def from_binary(data): |
1188
|
1 |
|
return ApplicationDescription(data) |
1189
|
|
|
|
1190
|
1 |
|
def _binary_init(self, data): |
1191
|
1 |
|
self.ApplicationUri = unpack_string(data) |
1192
|
1 |
|
self.ProductUri = unpack_string(data) |
1193
|
1 |
|
self.ApplicationName = LocalizedText.from_binary(data) |
1194
|
1 |
|
self.ApplicationType = ApplicationType(uatype_UInt32.unpack(data.read(4))[0]) |
1195
|
1 |
|
self.GatewayServerUri = unpack_string(data) |
1196
|
1 |
|
self.DiscoveryProfileUri = unpack_string(data) |
1197
|
1 |
|
self.DiscoveryUrls = unpack_uatype_array('String', data) |
1198
|
|
|
|
1199
|
1 |
|
def __str__(self): |
1200
|
|
|
return 'ApplicationDescription(' + 'ApplicationUri:' + str(self.ApplicationUri) + ', ' + \ |
1201
|
|
|
'ProductUri:' + str(self.ProductUri) + ', ' + \ |
1202
|
|
|
'ApplicationName:' + str(self.ApplicationName) + ', ' + \ |
1203
|
|
|
'ApplicationType:' + str(self.ApplicationType) + ', ' + \ |
1204
|
|
|
'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \ |
1205
|
|
|
'DiscoveryProfileUri:' + str(self.DiscoveryProfileUri) + ', ' + \ |
1206
|
|
|
'DiscoveryUrls:' + str(self.DiscoveryUrls) + ')' |
1207
|
|
|
|
1208
|
1 |
|
__repr__ = __str__ |
1209
|
|
|
|
1210
|
|
|
|
1211
|
1 |
|
class RequestHeader(FrozenClass): |
1212
|
|
|
''' |
1213
|
|
|
The header passed with every server request. |
1214
|
|
|
|
1215
|
|
|
:ivar AuthenticationToken: |
1216
|
|
|
:vartype AuthenticationToken: NodeId |
1217
|
|
|
:ivar Timestamp: |
1218
|
|
|
:vartype Timestamp: DateTime |
1219
|
|
|
:ivar RequestHandle: |
1220
|
|
|
:vartype RequestHandle: UInt32 |
1221
|
|
|
:ivar ReturnDiagnostics: |
1222
|
|
|
:vartype ReturnDiagnostics: UInt32 |
1223
|
|
|
:ivar AuditEntryId: |
1224
|
|
|
:vartype AuditEntryId: String |
1225
|
|
|
:ivar TimeoutHint: |
1226
|
|
|
:vartype TimeoutHint: UInt32 |
1227
|
|
|
:ivar AdditionalHeader: |
1228
|
|
|
:vartype AdditionalHeader: ExtensionObject |
1229
|
|
|
''' |
1230
|
1 |
|
def __init__(self, binary=None): |
1231
|
1 |
|
if binary is not None: |
1232
|
1 |
|
self._binary_init(binary) |
1233
|
1 |
|
self._freeze = True |
1234
|
1 |
|
return |
1235
|
1 |
|
self.AuthenticationToken = NodeId() |
1236
|
1 |
|
self.Timestamp = datetime.now() |
1237
|
1 |
|
self.RequestHandle = 0 |
1238
|
1 |
|
self.ReturnDiagnostics = 0 |
1239
|
1 |
|
self.AuditEntryId = '' |
1240
|
1 |
|
self.TimeoutHint = 0 |
1241
|
1 |
|
self.AdditionalHeader = None |
1242
|
1 |
|
self._freeze = True |
1243
|
|
|
|
1244
|
1 |
|
def to_binary(self): |
1245
|
1 |
|
packet = [] |
1246
|
1 |
|
packet.append(self.AuthenticationToken.to_binary()) |
1247
|
1 |
|
packet.append(pack_datetime(self.Timestamp)) |
1248
|
1 |
|
packet.append(uatype_UInt32.pack(self.RequestHandle)) |
1249
|
1 |
|
packet.append(uatype_UInt32.pack(self.ReturnDiagnostics)) |
1250
|
1 |
|
packet.append(pack_string(self.AuditEntryId)) |
1251
|
1 |
|
packet.append(uatype_UInt32.pack(self.TimeoutHint)) |
1252
|
1 |
|
packet.append(extensionobject_to_binary(self.AdditionalHeader)) |
1253
|
1 |
|
return b''.join(packet) |
1254
|
|
|
|
1255
|
1 |
|
@staticmethod |
1256
|
|
|
def from_binary(data): |
1257
|
1 |
|
return RequestHeader(data) |
1258
|
|
|
|
1259
|
1 |
|
def _binary_init(self, data): |
1260
|
1 |
|
self.AuthenticationToken = NodeId.from_binary(data) |
1261
|
1 |
|
self.Timestamp = unpack_datetime(data) |
1262
|
1 |
|
self.RequestHandle = uatype_UInt32.unpack(data.read(4))[0] |
1263
|
1 |
|
self.ReturnDiagnostics = uatype_UInt32.unpack(data.read(4))[0] |
1264
|
1 |
|
self.AuditEntryId = unpack_string(data) |
1265
|
1 |
|
self.TimeoutHint = uatype_UInt32.unpack(data.read(4))[0] |
1266
|
1 |
|
self.AdditionalHeader = extensionobject_from_binary(data) |
1267
|
|
|
|
1268
|
1 |
|
def __str__(self): |
1269
|
|
|
return 'RequestHeader(' + 'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \ |
1270
|
|
|
'Timestamp:' + str(self.Timestamp) + ', ' + \ |
1271
|
|
|
'RequestHandle:' + str(self.RequestHandle) + ', ' + \ |
1272
|
|
|
'ReturnDiagnostics:' + str(self.ReturnDiagnostics) + ', ' + \ |
1273
|
|
|
'AuditEntryId:' + str(self.AuditEntryId) + ', ' + \ |
1274
|
|
|
'TimeoutHint:' + str(self.TimeoutHint) + ', ' + \ |
1275
|
|
|
'AdditionalHeader:' + str(self.AdditionalHeader) + ')' |
1276
|
|
|
|
1277
|
1 |
|
__repr__ = __str__ |
1278
|
|
|
|
1279
|
|
|
|
1280
|
1 |
|
class ResponseHeader(FrozenClass): |
1281
|
|
|
''' |
1282
|
|
|
The header passed with every server response. |
1283
|
|
|
|
1284
|
|
|
:ivar Timestamp: |
1285
|
|
|
:vartype Timestamp: DateTime |
1286
|
|
|
:ivar RequestHandle: |
1287
|
|
|
:vartype RequestHandle: UInt32 |
1288
|
|
|
:ivar ServiceResult: |
1289
|
|
|
:vartype ServiceResult: StatusCode |
1290
|
|
|
:ivar ServiceDiagnostics: |
1291
|
|
|
:vartype ServiceDiagnostics: DiagnosticInfo |
1292
|
|
|
:ivar StringTable: |
1293
|
|
|
:vartype StringTable: String |
1294
|
|
|
:ivar AdditionalHeader: |
1295
|
|
|
:vartype AdditionalHeader: ExtensionObject |
1296
|
|
|
''' |
1297
|
1 |
|
def __init__(self, binary=None): |
1298
|
1 |
|
if binary is not None: |
1299
|
1 |
|
self._binary_init(binary) |
1300
|
1 |
|
self._freeze = True |
1301
|
1 |
|
return |
1302
|
1 |
|
self.Timestamp = datetime.now() |
1303
|
1 |
|
self.RequestHandle = 0 |
1304
|
1 |
|
self.ServiceResult = StatusCode() |
1305
|
1 |
|
self.ServiceDiagnostics = DiagnosticInfo() |
1306
|
1 |
|
self.StringTable = [] |
1307
|
1 |
|
self.AdditionalHeader = None |
1308
|
1 |
|
self._freeze = True |
1309
|
|
|
|
1310
|
1 |
|
def to_binary(self): |
1311
|
1 |
|
packet = [] |
1312
|
1 |
|
packet.append(pack_datetime(self.Timestamp)) |
1313
|
1 |
|
packet.append(uatype_UInt32.pack(self.RequestHandle)) |
1314
|
1 |
|
packet.append(self.ServiceResult.to_binary()) |
1315
|
1 |
|
packet.append(self.ServiceDiagnostics.to_binary()) |
1316
|
1 |
|
packet.append(uatype_Int32.pack(len(self.StringTable))) |
1317
|
1 |
|
for fieldname in self.StringTable: |
1318
|
|
|
packet.append(pack_string(fieldname)) |
1319
|
1 |
|
packet.append(extensionobject_to_binary(self.AdditionalHeader)) |
1320
|
1 |
|
return b''.join(packet) |
1321
|
|
|
|
1322
|
1 |
|
@staticmethod |
1323
|
|
|
def from_binary(data): |
1324
|
1 |
|
return ResponseHeader(data) |
1325
|
|
|
|
1326
|
1 |
|
def _binary_init(self, data): |
1327
|
1 |
|
self.Timestamp = unpack_datetime(data) |
1328
|
1 |
|
self.RequestHandle = uatype_UInt32.unpack(data.read(4))[0] |
1329
|
1 |
|
self.ServiceResult = StatusCode.from_binary(data) |
1330
|
1 |
|
self.ServiceDiagnostics = DiagnosticInfo.from_binary(data) |
1331
|
1 |
|
self.StringTable = unpack_uatype_array('String', data) |
1332
|
1 |
|
self.AdditionalHeader = extensionobject_from_binary(data) |
1333
|
|
|
|
1334
|
1 |
|
def __str__(self): |
1335
|
|
|
return 'ResponseHeader(' + 'Timestamp:' + str(self.Timestamp) + ', ' + \ |
1336
|
|
|
'RequestHandle:' + str(self.RequestHandle) + ', ' + \ |
1337
|
|
|
'ServiceResult:' + str(self.ServiceResult) + ', ' + \ |
1338
|
|
|
'ServiceDiagnostics:' + str(self.ServiceDiagnostics) + ', ' + \ |
1339
|
|
|
'StringTable:' + str(self.StringTable) + ', ' + \ |
1340
|
|
|
'AdditionalHeader:' + str(self.AdditionalHeader) + ')' |
1341
|
|
|
|
1342
|
1 |
|
__repr__ = __str__ |
1343
|
|
|
|
1344
|
|
|
|
1345
|
1 |
|
class ServiceFault(FrozenClass): |
1346
|
|
|
''' |
1347
|
|
|
The response returned by all services when there is a service level error. |
1348
|
|
|
|
1349
|
|
|
:ivar TypeId: |
1350
|
|
|
:vartype TypeId: NodeId |
1351
|
|
|
:ivar ResponseHeader: |
1352
|
|
|
:vartype ResponseHeader: ResponseHeader |
1353
|
|
|
''' |
1354
|
1 |
|
def __init__(self, binary=None): |
1355
|
1 |
|
if binary is not None: |
1356
|
|
|
self._binary_init(binary) |
1357
|
|
|
self._freeze = True |
1358
|
|
|
return |
1359
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary) |
1360
|
1 |
|
self.ResponseHeader = ResponseHeader() |
1361
|
1 |
|
self._freeze = True |
1362
|
|
|
|
1363
|
1 |
|
def to_binary(self): |
1364
|
1 |
|
packet = [] |
1365
|
1 |
|
packet.append(self.TypeId.to_binary()) |
1366
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
1367
|
1 |
|
return b''.join(packet) |
1368
|
|
|
|
1369
|
1 |
|
@staticmethod |
1370
|
|
|
def from_binary(data): |
1371
|
|
|
return ServiceFault(data) |
1372
|
|
|
|
1373
|
1 |
|
def _binary_init(self, data): |
1374
|
|
|
self.TypeId = NodeId.from_binary(data) |
1375
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
1376
|
|
|
|
1377
|
1 |
|
def __str__(self): |
1378
|
|
|
return 'ServiceFault(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1379
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ')' |
1380
|
|
|
|
1381
|
1 |
|
__repr__ = __str__ |
1382
|
|
|
|
1383
|
|
|
|
1384
|
1 |
|
class FindServersParameters(FrozenClass): |
1385
|
|
|
''' |
1386
|
|
|
:ivar EndpointUrl: |
1387
|
|
|
:vartype EndpointUrl: String |
1388
|
|
|
:ivar LocaleIds: |
1389
|
|
|
:vartype LocaleIds: String |
1390
|
|
|
:ivar ServerUris: |
1391
|
|
|
:vartype ServerUris: String |
1392
|
|
|
''' |
1393
|
1 |
|
def __init__(self, binary=None): |
1394
|
1 |
|
if binary is not None: |
1395
|
1 |
|
self._binary_init(binary) |
1396
|
1 |
|
self._freeze = True |
1397
|
1 |
|
return |
1398
|
1 |
|
self.EndpointUrl = '' |
1399
|
1 |
|
self.LocaleIds = [] |
1400
|
1 |
|
self.ServerUris = [] |
1401
|
1 |
|
self._freeze = True |
1402
|
|
|
|
1403
|
1 |
|
def to_binary(self): |
1404
|
1 |
|
packet = [] |
1405
|
1 |
|
packet.append(pack_string(self.EndpointUrl)) |
1406
|
1 |
|
packet.append(uatype_Int32.pack(len(self.LocaleIds))) |
1407
|
1 |
|
for fieldname in self.LocaleIds: |
1408
|
|
|
packet.append(pack_string(fieldname)) |
1409
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ServerUris))) |
1410
|
1 |
|
for fieldname in self.ServerUris: |
1411
|
1 |
|
packet.append(pack_string(fieldname)) |
1412
|
1 |
|
return b''.join(packet) |
1413
|
|
|
|
1414
|
1 |
|
@staticmethod |
1415
|
|
|
def from_binary(data): |
1416
|
1 |
|
return FindServersParameters(data) |
1417
|
|
|
|
1418
|
1 |
|
def _binary_init(self, data): |
1419
|
1 |
|
self.EndpointUrl = unpack_string(data) |
1420
|
1 |
|
self.LocaleIds = unpack_uatype_array('String', data) |
1421
|
1 |
|
self.ServerUris = unpack_uatype_array('String', data) |
1422
|
|
|
|
1423
|
1 |
|
def __str__(self): |
1424
|
|
|
return 'FindServersParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ |
1425
|
|
|
'LocaleIds:' + str(self.LocaleIds) + ', ' + \ |
1426
|
|
|
'ServerUris:' + str(self.ServerUris) + ')' |
1427
|
|
|
|
1428
|
1 |
|
__repr__ = __str__ |
1429
|
|
|
|
1430
|
|
|
|
1431
|
1 |
|
class FindServersRequest(FrozenClass): |
1432
|
|
|
''' |
1433
|
|
|
Finds the servers known to the discovery server. |
1434
|
|
|
|
1435
|
|
|
:ivar TypeId: |
1436
|
|
|
:vartype TypeId: NodeId |
1437
|
|
|
:ivar RequestHeader: |
1438
|
|
|
:vartype RequestHeader: RequestHeader |
1439
|
|
|
:ivar Parameters: |
1440
|
|
|
:vartype Parameters: FindServersParameters |
1441
|
|
|
''' |
1442
|
1 |
|
def __init__(self, binary=None): |
1443
|
1 |
|
if binary is not None: |
1444
|
|
|
self._binary_init(binary) |
1445
|
|
|
self._freeze = True |
1446
|
|
|
return |
1447
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary) |
1448
|
1 |
|
self.RequestHeader = RequestHeader() |
1449
|
1 |
|
self.Parameters = FindServersParameters() |
1450
|
1 |
|
self._freeze = True |
1451
|
|
|
|
1452
|
1 |
|
def to_binary(self): |
1453
|
1 |
|
packet = [] |
1454
|
1 |
|
packet.append(self.TypeId.to_binary()) |
1455
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
1456
|
1 |
|
packet.append(self.Parameters.to_binary()) |
1457
|
1 |
|
return b''.join(packet) |
1458
|
|
|
|
1459
|
1 |
|
@staticmethod |
1460
|
|
|
def from_binary(data): |
1461
|
|
|
return FindServersRequest(data) |
1462
|
|
|
|
1463
|
1 |
|
def _binary_init(self, data): |
1464
|
|
|
self.TypeId = NodeId.from_binary(data) |
1465
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
1466
|
|
|
self.Parameters = FindServersParameters.from_binary(data) |
1467
|
|
|
|
1468
|
1 |
|
def __str__(self): |
1469
|
|
|
return 'FindServersRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1470
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
1471
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
1472
|
|
|
|
1473
|
1 |
|
__repr__ = __str__ |
1474
|
|
|
|
1475
|
|
|
|
1476
|
1 |
|
class FindServersResponse(FrozenClass): |
1477
|
|
|
''' |
1478
|
|
|
Finds the servers known to the discovery server. |
1479
|
|
|
|
1480
|
|
|
:ivar TypeId: |
1481
|
|
|
:vartype TypeId: NodeId |
1482
|
|
|
:ivar ResponseHeader: |
1483
|
|
|
:vartype ResponseHeader: ResponseHeader |
1484
|
|
|
:ivar Servers: |
1485
|
|
|
:vartype Servers: ApplicationDescription |
1486
|
|
|
''' |
1487
|
1 |
|
def __init__(self, binary=None): |
1488
|
1 |
|
if binary is not None: |
1489
|
1 |
|
self._binary_init(binary) |
1490
|
1 |
|
self._freeze = True |
1491
|
1 |
|
return |
1492
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary) |
1493
|
1 |
|
self.ResponseHeader = ResponseHeader() |
1494
|
1 |
|
self.Servers = [] |
1495
|
1 |
|
self._freeze = True |
1496
|
|
|
|
1497
|
1 |
|
def to_binary(self): |
1498
|
1 |
|
packet = [] |
1499
|
1 |
|
packet.append(self.TypeId.to_binary()) |
1500
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
1501
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Servers))) |
1502
|
1 |
|
for fieldname in self.Servers: |
1503
|
1 |
|
packet.append(fieldname.to_binary()) |
1504
|
1 |
|
return b''.join(packet) |
1505
|
|
|
|
1506
|
1 |
|
@staticmethod |
1507
|
|
|
def from_binary(data): |
1508
|
1 |
|
return FindServersResponse(data) |
1509
|
|
|
|
1510
|
1 |
|
def _binary_init(self, data): |
1511
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
1512
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
1513
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
1514
|
1 |
|
array = [] |
1515
|
1 |
|
if length != -1: |
1516
|
1 |
|
for _ in range(0, length): |
1517
|
1 |
|
array.append(ApplicationDescription.from_binary(data)) |
1518
|
1 |
|
self.Servers = array |
1519
|
|
|
|
1520
|
1 |
|
def __str__(self): |
1521
|
|
|
return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1522
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
1523
|
|
|
'Servers:' + str(self.Servers) + ')' |
1524
|
|
|
|
1525
|
1 |
|
__repr__ = __str__ |
1526
|
|
|
|
1527
|
|
|
|
1528
|
1 |
|
class ServerOnNetwork(FrozenClass): |
1529
|
|
|
''' |
1530
|
|
|
:ivar RecordId: |
1531
|
|
|
:vartype RecordId: UInt32 |
1532
|
|
|
:ivar ServerName: |
1533
|
|
|
:vartype ServerName: String |
1534
|
|
|
:ivar DiscoveryUrl: |
1535
|
|
|
:vartype DiscoveryUrl: String |
1536
|
|
|
:ivar ServerCapabilities: |
1537
|
|
|
:vartype ServerCapabilities: String |
1538
|
|
|
''' |
1539
|
1 |
|
def __init__(self, binary=None): |
1540
|
|
|
if binary is not None: |
1541
|
|
|
self._binary_init(binary) |
1542
|
|
|
self._freeze = True |
1543
|
|
|
return |
1544
|
|
|
self.RecordId = 0 |
1545
|
|
|
self.ServerName = '' |
1546
|
|
|
self.DiscoveryUrl = '' |
1547
|
|
|
self.ServerCapabilities = [] |
1548
|
|
|
self._freeze = True |
1549
|
|
|
|
1550
|
1 |
|
def to_binary(self): |
1551
|
|
|
packet = [] |
1552
|
|
|
packet.append(uatype_UInt32.pack(self.RecordId)) |
1553
|
|
|
packet.append(pack_string(self.ServerName)) |
1554
|
|
|
packet.append(pack_string(self.DiscoveryUrl)) |
1555
|
|
|
packet.append(uatype_Int32.pack(len(self.ServerCapabilities))) |
1556
|
|
|
for fieldname in self.ServerCapabilities: |
1557
|
|
|
packet.append(pack_string(fieldname)) |
1558
|
|
|
return b''.join(packet) |
1559
|
|
|
|
1560
|
1 |
|
@staticmethod |
1561
|
|
|
def from_binary(data): |
1562
|
|
|
return ServerOnNetwork(data) |
1563
|
|
|
|
1564
|
1 |
|
def _binary_init(self, data): |
1565
|
|
|
self.RecordId = uatype_UInt32.unpack(data.read(4))[0] |
1566
|
|
|
self.ServerName = unpack_string(data) |
1567
|
|
|
self.DiscoveryUrl = unpack_string(data) |
1568
|
|
|
self.ServerCapabilities = unpack_uatype_array('String', data) |
1569
|
|
|
|
1570
|
1 |
|
def __str__(self): |
1571
|
|
|
return 'ServerOnNetwork(' + 'RecordId:' + str(self.RecordId) + ', ' + \ |
1572
|
|
|
'ServerName:' + str(self.ServerName) + ', ' + \ |
1573
|
|
|
'DiscoveryUrl:' + str(self.DiscoveryUrl) + ', ' + \ |
1574
|
|
|
'ServerCapabilities:' + str(self.ServerCapabilities) + ')' |
1575
|
|
|
|
1576
|
1 |
|
__repr__ = __str__ |
1577
|
|
|
|
1578
|
|
|
|
1579
|
1 |
|
class FindServersOnNetworkParameters(FrozenClass): |
1580
|
|
|
''' |
1581
|
|
|
:ivar StartingRecordId: |
1582
|
|
|
:vartype StartingRecordId: UInt32 |
1583
|
|
|
:ivar MaxRecordsToReturn: |
1584
|
|
|
:vartype MaxRecordsToReturn: UInt32 |
1585
|
|
|
:ivar ServerCapabilityFilter: |
1586
|
|
|
:vartype ServerCapabilityFilter: String |
1587
|
|
|
''' |
1588
|
1 |
|
def __init__(self, binary=None): |
1589
|
|
|
if binary is not None: |
1590
|
|
|
self._binary_init(binary) |
1591
|
|
|
self._freeze = True |
1592
|
|
|
return |
1593
|
|
|
self.StartingRecordId = 0 |
1594
|
|
|
self.MaxRecordsToReturn = 0 |
1595
|
|
|
self.ServerCapabilityFilter = [] |
1596
|
|
|
self._freeze = True |
1597
|
|
|
|
1598
|
1 |
|
def to_binary(self): |
1599
|
|
|
packet = [] |
1600
|
|
|
packet.append(uatype_UInt32.pack(self.StartingRecordId)) |
1601
|
|
|
packet.append(uatype_UInt32.pack(self.MaxRecordsToReturn)) |
1602
|
|
|
packet.append(uatype_Int32.pack(len(self.ServerCapabilityFilter))) |
1603
|
|
|
for fieldname in self.ServerCapabilityFilter: |
1604
|
|
|
packet.append(pack_string(fieldname)) |
1605
|
|
|
return b''.join(packet) |
1606
|
|
|
|
1607
|
1 |
|
@staticmethod |
1608
|
|
|
def from_binary(data): |
1609
|
|
|
return FindServersOnNetworkParameters(data) |
1610
|
|
|
|
1611
|
1 |
|
def _binary_init(self, data): |
1612
|
|
|
self.StartingRecordId = uatype_UInt32.unpack(data.read(4))[0] |
1613
|
|
|
self.MaxRecordsToReturn = uatype_UInt32.unpack(data.read(4))[0] |
1614
|
|
|
self.ServerCapabilityFilter = unpack_uatype_array('String', data) |
1615
|
|
|
|
1616
|
1 |
|
def __str__(self): |
1617
|
|
|
return 'FindServersOnNetworkParameters(' + 'StartingRecordId:' + str(self.StartingRecordId) + ', ' + \ |
1618
|
|
|
'MaxRecordsToReturn:' + str(self.MaxRecordsToReturn) + ', ' + \ |
1619
|
|
|
'ServerCapabilityFilter:' + str(self.ServerCapabilityFilter) + ')' |
1620
|
|
|
|
1621
|
1 |
|
__repr__ = __str__ |
1622
|
|
|
|
1623
|
|
|
|
1624
|
1 |
|
class FindServersOnNetworkRequest(FrozenClass): |
1625
|
|
|
''' |
1626
|
|
|
:ivar TypeId: |
1627
|
|
|
:vartype TypeId: NodeId |
1628
|
|
|
:ivar RequestHeader: |
1629
|
|
|
:vartype RequestHeader: RequestHeader |
1630
|
|
|
:ivar Parameters: |
1631
|
|
|
:vartype Parameters: FindServersOnNetworkParameters |
1632
|
|
|
''' |
1633
|
1 |
|
def __init__(self, binary=None): |
1634
|
|
|
if binary is not None: |
1635
|
|
|
self._binary_init(binary) |
1636
|
|
|
self._freeze = True |
1637
|
|
|
return |
1638
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary) |
1639
|
|
|
self.RequestHeader = RequestHeader() |
1640
|
|
|
self.Parameters = FindServersOnNetworkParameters() |
1641
|
|
|
self._freeze = True |
1642
|
|
|
|
1643
|
1 |
|
def to_binary(self): |
1644
|
|
|
packet = [] |
1645
|
|
|
packet.append(self.TypeId.to_binary()) |
1646
|
|
|
packet.append(self.RequestHeader.to_binary()) |
1647
|
|
|
packet.append(self.Parameters.to_binary()) |
1648
|
|
|
return b''.join(packet) |
1649
|
|
|
|
1650
|
1 |
|
@staticmethod |
1651
|
|
|
def from_binary(data): |
1652
|
|
|
return FindServersOnNetworkRequest(data) |
1653
|
|
|
|
1654
|
1 |
|
def _binary_init(self, data): |
1655
|
|
|
self.TypeId = NodeId.from_binary(data) |
1656
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
1657
|
|
|
self.Parameters = FindServersOnNetworkParameters.from_binary(data) |
1658
|
|
|
|
1659
|
1 |
|
def __str__(self): |
1660
|
|
|
return 'FindServersOnNetworkRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1661
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
1662
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
1663
|
|
|
|
1664
|
1 |
|
__repr__ = __str__ |
1665
|
|
|
|
1666
|
|
|
|
1667
|
1 |
|
class FindServersOnNetworkResult(FrozenClass): |
1668
|
|
|
''' |
1669
|
|
|
:ivar LastCounterResetTime: |
1670
|
|
|
:vartype LastCounterResetTime: DateTime |
1671
|
|
|
:ivar Servers: |
1672
|
|
|
:vartype Servers: ServerOnNetwork |
1673
|
|
|
''' |
1674
|
1 |
|
def __init__(self, binary=None): |
1675
|
|
|
if binary is not None: |
1676
|
|
|
self._binary_init(binary) |
1677
|
|
|
self._freeze = True |
1678
|
|
|
return |
1679
|
|
|
self.LastCounterResetTime = datetime.now() |
1680
|
|
|
self.Servers = [] |
1681
|
|
|
self._freeze = True |
1682
|
|
|
|
1683
|
1 |
|
def to_binary(self): |
1684
|
|
|
packet = [] |
1685
|
|
|
packet.append(pack_datetime(self.LastCounterResetTime)) |
1686
|
|
|
packet.append(uatype_Int32.pack(len(self.Servers))) |
1687
|
|
|
for fieldname in self.Servers: |
1688
|
|
|
packet.append(fieldname.to_binary()) |
1689
|
|
|
return b''.join(packet) |
1690
|
|
|
|
1691
|
1 |
|
@staticmethod |
1692
|
|
|
def from_binary(data): |
1693
|
|
|
return FindServersOnNetworkResult(data) |
1694
|
|
|
|
1695
|
1 |
|
def _binary_init(self, data): |
1696
|
|
|
self.LastCounterResetTime = unpack_datetime(data) |
1697
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
1698
|
|
|
array = [] |
1699
|
|
|
if length != -1: |
1700
|
|
|
for _ in range(0, length): |
1701
|
|
|
array.append(ServerOnNetwork.from_binary(data)) |
1702
|
|
|
self.Servers = array |
1703
|
|
|
|
1704
|
1 |
|
def __str__(self): |
1705
|
|
|
return 'FindServersOnNetworkResult(' + 'LastCounterResetTime:' + str(self.LastCounterResetTime) + ', ' + \ |
1706
|
|
|
'Servers:' + str(self.Servers) + ')' |
1707
|
|
|
|
1708
|
1 |
|
__repr__ = __str__ |
1709
|
|
|
|
1710
|
|
|
|
1711
|
1 |
|
class FindServersOnNetworkResponse(FrozenClass): |
1712
|
|
|
''' |
1713
|
|
|
:ivar TypeId: |
1714
|
|
|
:vartype TypeId: NodeId |
1715
|
|
|
:ivar ResponseHeader: |
1716
|
|
|
:vartype ResponseHeader: ResponseHeader |
1717
|
|
|
:ivar Parameters: |
1718
|
|
|
:vartype Parameters: FindServersOnNetworkResult |
1719
|
|
|
''' |
1720
|
1 |
|
def __init__(self, binary=None): |
1721
|
|
|
if binary is not None: |
1722
|
|
|
self._binary_init(binary) |
1723
|
|
|
self._freeze = True |
1724
|
|
|
return |
1725
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary) |
1726
|
|
|
self.ResponseHeader = ResponseHeader() |
1727
|
|
|
self.Parameters = FindServersOnNetworkResult() |
1728
|
|
|
self._freeze = True |
1729
|
|
|
|
1730
|
1 |
|
def to_binary(self): |
1731
|
|
|
packet = [] |
1732
|
|
|
packet.append(self.TypeId.to_binary()) |
1733
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
1734
|
|
|
packet.append(self.Parameters.to_binary()) |
1735
|
|
|
return b''.join(packet) |
1736
|
|
|
|
1737
|
1 |
|
@staticmethod |
1738
|
|
|
def from_binary(data): |
1739
|
|
|
return FindServersOnNetworkResponse(data) |
1740
|
|
|
|
1741
|
1 |
|
def _binary_init(self, data): |
1742
|
|
|
self.TypeId = NodeId.from_binary(data) |
1743
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
1744
|
|
|
self.Parameters = FindServersOnNetworkResult.from_binary(data) |
1745
|
|
|
|
1746
|
1 |
|
def __str__(self): |
1747
|
|
|
return 'FindServersOnNetworkResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1748
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
1749
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
1750
|
|
|
|
1751
|
1 |
|
__repr__ = __str__ |
1752
|
|
|
|
1753
|
|
|
|
1754
|
1 |
|
class UserTokenPolicy(FrozenClass): |
1755
|
|
|
''' |
1756
|
|
|
Describes a user token that can be used with a server. |
1757
|
|
|
|
1758
|
|
|
:ivar PolicyId: |
1759
|
|
|
:vartype PolicyId: String |
1760
|
|
|
:ivar TokenType: |
1761
|
|
|
:vartype TokenType: UserTokenType |
1762
|
|
|
:ivar IssuedTokenType: |
1763
|
|
|
:vartype IssuedTokenType: String |
1764
|
|
|
:ivar IssuerEndpointUrl: |
1765
|
|
|
:vartype IssuerEndpointUrl: String |
1766
|
|
|
:ivar SecurityPolicyUri: |
1767
|
|
|
:vartype SecurityPolicyUri: String |
1768
|
|
|
''' |
1769
|
1 |
|
def __init__(self, binary=None): |
1770
|
1 |
|
if binary is not None: |
1771
|
1 |
|
self._binary_init(binary) |
1772
|
1 |
|
self._freeze = True |
1773
|
1 |
|
return |
1774
|
1 |
|
self.PolicyId = '' |
1775
|
1 |
|
self.TokenType = UserTokenType(0) |
1776
|
1 |
|
self.IssuedTokenType = '' |
1777
|
1 |
|
self.IssuerEndpointUrl = '' |
1778
|
1 |
|
self.SecurityPolicyUri = '' |
1779
|
1 |
|
self._freeze = True |
1780
|
|
|
|
1781
|
1 |
|
def to_binary(self): |
1782
|
1 |
|
packet = [] |
1783
|
1 |
|
packet.append(pack_string(self.PolicyId)) |
1784
|
1 |
|
packet.append(uatype_UInt32.pack(self.TokenType.value)) |
1785
|
1 |
|
packet.append(pack_string(self.IssuedTokenType)) |
1786
|
1 |
|
packet.append(pack_string(self.IssuerEndpointUrl)) |
1787
|
1 |
|
packet.append(pack_string(self.SecurityPolicyUri)) |
1788
|
1 |
|
return b''.join(packet) |
1789
|
|
|
|
1790
|
1 |
|
@staticmethod |
1791
|
|
|
def from_binary(data): |
1792
|
1 |
|
return UserTokenPolicy(data) |
1793
|
|
|
|
1794
|
1 |
|
def _binary_init(self, data): |
1795
|
1 |
|
self.PolicyId = unpack_string(data) |
1796
|
1 |
|
self.TokenType = UserTokenType(uatype_UInt32.unpack(data.read(4))[0]) |
1797
|
1 |
|
self.IssuedTokenType = unpack_string(data) |
1798
|
1 |
|
self.IssuerEndpointUrl = unpack_string(data) |
1799
|
1 |
|
self.SecurityPolicyUri = unpack_string(data) |
1800
|
|
|
|
1801
|
1 |
|
def __str__(self): |
1802
|
|
|
return 'UserTokenPolicy(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ |
1803
|
|
|
'TokenType:' + str(self.TokenType) + ', ' + \ |
1804
|
|
|
'IssuedTokenType:' + str(self.IssuedTokenType) + ', ' + \ |
1805
|
|
|
'IssuerEndpointUrl:' + str(self.IssuerEndpointUrl) + ', ' + \ |
1806
|
|
|
'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ')' |
1807
|
|
|
|
1808
|
1 |
|
__repr__ = __str__ |
1809
|
|
|
|
1810
|
|
|
|
1811
|
1 |
|
class EndpointDescription(FrozenClass): |
1812
|
|
|
''' |
1813
|
|
|
The description of a endpoint that can be used to access a server. |
1814
|
|
|
|
1815
|
|
|
:ivar EndpointUrl: |
1816
|
|
|
:vartype EndpointUrl: String |
1817
|
|
|
:ivar Server: |
1818
|
|
|
:vartype Server: ApplicationDescription |
1819
|
|
|
:ivar ServerCertificate: |
1820
|
|
|
:vartype ServerCertificate: ByteString |
1821
|
|
|
:ivar SecurityMode: |
1822
|
|
|
:vartype SecurityMode: MessageSecurityMode |
1823
|
|
|
:ivar SecurityPolicyUri: |
1824
|
|
|
:vartype SecurityPolicyUri: String |
1825
|
|
|
:ivar UserIdentityTokens: |
1826
|
|
|
:vartype UserIdentityTokens: UserTokenPolicy |
1827
|
|
|
:ivar TransportProfileUri: |
1828
|
|
|
:vartype TransportProfileUri: String |
1829
|
|
|
:ivar SecurityLevel: |
1830
|
|
|
:vartype SecurityLevel: Byte |
1831
|
|
|
''' |
1832
|
1 |
|
def __init__(self, binary=None): |
1833
|
1 |
|
if binary is not None: |
1834
|
1 |
|
self._binary_init(binary) |
1835
|
1 |
|
self._freeze = True |
1836
|
1 |
|
return |
1837
|
1 |
|
self.EndpointUrl = '' |
1838
|
1 |
|
self.Server = ApplicationDescription() |
1839
|
1 |
|
self.ServerCertificate = b'' |
1840
|
1 |
|
self.SecurityMode = MessageSecurityMode(0) |
1841
|
1 |
|
self.SecurityPolicyUri = '' |
1842
|
1 |
|
self.UserIdentityTokens = [] |
1843
|
1 |
|
self.TransportProfileUri = '' |
1844
|
1 |
|
self.SecurityLevel = 0 |
1845
|
1 |
|
self._freeze = True |
1846
|
|
|
|
1847
|
1 |
|
def to_binary(self): |
1848
|
1 |
|
packet = [] |
1849
|
1 |
|
packet.append(pack_string(self.EndpointUrl)) |
1850
|
1 |
|
packet.append(self.Server.to_binary()) |
1851
|
1 |
|
packet.append(pack_bytes(self.ServerCertificate)) |
1852
|
1 |
|
packet.append(uatype_UInt32.pack(self.SecurityMode.value)) |
1853
|
1 |
|
packet.append(pack_string(self.SecurityPolicyUri)) |
1854
|
1 |
|
packet.append(uatype_Int32.pack(len(self.UserIdentityTokens))) |
1855
|
1 |
|
for fieldname in self.UserIdentityTokens: |
1856
|
1 |
|
packet.append(fieldname.to_binary()) |
1857
|
1 |
|
packet.append(pack_string(self.TransportProfileUri)) |
1858
|
1 |
|
packet.append(uatype_Byte.pack(self.SecurityLevel)) |
1859
|
1 |
|
return b''.join(packet) |
1860
|
|
|
|
1861
|
1 |
|
@staticmethod |
1862
|
|
|
def from_binary(data): |
1863
|
1 |
|
return EndpointDescription(data) |
1864
|
|
|
|
1865
|
1 |
|
def _binary_init(self, data): |
1866
|
1 |
|
self.EndpointUrl = unpack_string(data) |
1867
|
1 |
|
self.Server = ApplicationDescription.from_binary(data) |
1868
|
1 |
|
self.ServerCertificate = unpack_bytes(data) |
1869
|
1 |
|
self.SecurityMode = MessageSecurityMode(uatype_UInt32.unpack(data.read(4))[0]) |
1870
|
1 |
|
self.SecurityPolicyUri = unpack_string(data) |
1871
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
1872
|
1 |
|
array = [] |
1873
|
1 |
|
if length != -1: |
1874
|
1 |
|
for _ in range(0, length): |
1875
|
1 |
|
array.append(UserTokenPolicy.from_binary(data)) |
1876
|
1 |
|
self.UserIdentityTokens = array |
1877
|
1 |
|
self.TransportProfileUri = unpack_string(data) |
1878
|
1 |
|
self.SecurityLevel = uatype_Byte.unpack(data.read(1))[0] |
1879
|
|
|
|
1880
|
1 |
|
def __str__(self): |
1881
|
|
|
return 'EndpointDescription(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ |
1882
|
|
|
'Server:' + str(self.Server) + ', ' + \ |
1883
|
|
|
'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \ |
1884
|
|
|
'SecurityMode:' + str(self.SecurityMode) + ', ' + \ |
1885
|
|
|
'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \ |
1886
|
|
|
'UserIdentityTokens:' + str(self.UserIdentityTokens) + ', ' + \ |
1887
|
|
|
'TransportProfileUri:' + str(self.TransportProfileUri) + ', ' + \ |
1888
|
|
|
'SecurityLevel:' + str(self.SecurityLevel) + ')' |
1889
|
|
|
|
1890
|
1 |
|
__repr__ = __str__ |
1891
|
|
|
|
1892
|
|
|
|
1893
|
1 |
|
class GetEndpointsParameters(FrozenClass): |
1894
|
|
|
''' |
1895
|
|
|
:ivar EndpointUrl: |
1896
|
|
|
:vartype EndpointUrl: String |
1897
|
|
|
:ivar LocaleIds: |
1898
|
|
|
:vartype LocaleIds: String |
1899
|
|
|
:ivar ProfileUris: |
1900
|
|
|
:vartype ProfileUris: String |
1901
|
|
|
''' |
1902
|
1 |
|
def __init__(self, binary=None): |
1903
|
1 |
|
if binary is not None: |
1904
|
1 |
|
self._binary_init(binary) |
1905
|
1 |
|
self._freeze = True |
1906
|
1 |
|
return |
1907
|
1 |
|
self.EndpointUrl = '' |
1908
|
1 |
|
self.LocaleIds = [] |
1909
|
1 |
|
self.ProfileUris = [] |
1910
|
1 |
|
self._freeze = True |
1911
|
|
|
|
1912
|
1 |
|
def to_binary(self): |
1913
|
1 |
|
packet = [] |
1914
|
1 |
|
packet.append(pack_string(self.EndpointUrl)) |
1915
|
1 |
|
packet.append(uatype_Int32.pack(len(self.LocaleIds))) |
1916
|
1 |
|
for fieldname in self.LocaleIds: |
1917
|
|
|
packet.append(pack_string(fieldname)) |
1918
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ProfileUris))) |
1919
|
1 |
|
for fieldname in self.ProfileUris: |
1920
|
|
|
packet.append(pack_string(fieldname)) |
1921
|
1 |
|
return b''.join(packet) |
1922
|
|
|
|
1923
|
1 |
|
@staticmethod |
1924
|
|
|
def from_binary(data): |
1925
|
1 |
|
return GetEndpointsParameters(data) |
1926
|
|
|
|
1927
|
1 |
|
def _binary_init(self, data): |
1928
|
1 |
|
self.EndpointUrl = unpack_string(data) |
1929
|
1 |
|
self.LocaleIds = unpack_uatype_array('String', data) |
1930
|
1 |
|
self.ProfileUris = unpack_uatype_array('String', data) |
1931
|
|
|
|
1932
|
1 |
|
def __str__(self): |
1933
|
|
|
return 'GetEndpointsParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ |
1934
|
|
|
'LocaleIds:' + str(self.LocaleIds) + ', ' + \ |
1935
|
|
|
'ProfileUris:' + str(self.ProfileUris) + ')' |
1936
|
|
|
|
1937
|
1 |
|
__repr__ = __str__ |
1938
|
|
|
|
1939
|
|
|
|
1940
|
1 |
|
class GetEndpointsRequest(FrozenClass): |
1941
|
|
|
''' |
1942
|
|
|
Gets the endpoints used by the server. |
1943
|
|
|
|
1944
|
|
|
:ivar TypeId: |
1945
|
|
|
:vartype TypeId: NodeId |
1946
|
|
|
:ivar RequestHeader: |
1947
|
|
|
:vartype RequestHeader: RequestHeader |
1948
|
|
|
:ivar Parameters: |
1949
|
|
|
:vartype Parameters: GetEndpointsParameters |
1950
|
|
|
''' |
1951
|
1 |
|
def __init__(self, binary=None): |
1952
|
1 |
|
if binary is not None: |
1953
|
|
|
self._binary_init(binary) |
1954
|
|
|
self._freeze = True |
1955
|
|
|
return |
1956
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary) |
1957
|
1 |
|
self.RequestHeader = RequestHeader() |
1958
|
1 |
|
self.Parameters = GetEndpointsParameters() |
1959
|
1 |
|
self._freeze = True |
1960
|
|
|
|
1961
|
1 |
|
def to_binary(self): |
1962
|
1 |
|
packet = [] |
1963
|
1 |
|
packet.append(self.TypeId.to_binary()) |
1964
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
1965
|
1 |
|
packet.append(self.Parameters.to_binary()) |
1966
|
1 |
|
return b''.join(packet) |
1967
|
|
|
|
1968
|
1 |
|
@staticmethod |
1969
|
|
|
def from_binary(data): |
1970
|
|
|
return GetEndpointsRequest(data) |
1971
|
|
|
|
1972
|
1 |
|
def _binary_init(self, data): |
1973
|
|
|
self.TypeId = NodeId.from_binary(data) |
1974
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
1975
|
|
|
self.Parameters = GetEndpointsParameters.from_binary(data) |
1976
|
|
|
|
1977
|
1 |
|
def __str__(self): |
1978
|
|
|
return 'GetEndpointsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
1979
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
1980
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
1981
|
|
|
|
1982
|
1 |
|
__repr__ = __str__ |
1983
|
|
|
|
1984
|
|
|
|
1985
|
1 |
|
class GetEndpointsResponse(FrozenClass): |
1986
|
|
|
''' |
1987
|
|
|
Gets the endpoints used by the server. |
1988
|
|
|
|
1989
|
|
|
:ivar TypeId: |
1990
|
|
|
:vartype TypeId: NodeId |
1991
|
|
|
:ivar ResponseHeader: |
1992
|
|
|
:vartype ResponseHeader: ResponseHeader |
1993
|
|
|
:ivar Endpoints: |
1994
|
|
|
:vartype Endpoints: EndpointDescription |
1995
|
|
|
''' |
1996
|
1 |
|
def __init__(self, binary=None): |
1997
|
1 |
|
if binary is not None: |
1998
|
1 |
|
self._binary_init(binary) |
1999
|
1 |
|
self._freeze = True |
2000
|
1 |
|
return |
2001
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary) |
2002
|
1 |
|
self.ResponseHeader = ResponseHeader() |
2003
|
1 |
|
self.Endpoints = [] |
2004
|
1 |
|
self._freeze = True |
2005
|
|
|
|
2006
|
1 |
|
def to_binary(self): |
2007
|
1 |
|
packet = [] |
2008
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2009
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
2010
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Endpoints))) |
2011
|
1 |
|
for fieldname in self.Endpoints: |
2012
|
1 |
|
packet.append(fieldname.to_binary()) |
2013
|
1 |
|
return b''.join(packet) |
2014
|
|
|
|
2015
|
1 |
|
@staticmethod |
2016
|
|
|
def from_binary(data): |
2017
|
1 |
|
return GetEndpointsResponse(data) |
2018
|
|
|
|
2019
|
1 |
|
def _binary_init(self, data): |
2020
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
2021
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
2022
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
2023
|
1 |
|
array = [] |
2024
|
1 |
|
if length != -1: |
2025
|
1 |
|
for _ in range(0, length): |
2026
|
1 |
|
array.append(EndpointDescription.from_binary(data)) |
2027
|
1 |
|
self.Endpoints = array |
2028
|
|
|
|
2029
|
1 |
|
def __str__(self): |
2030
|
|
|
return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2031
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
2032
|
|
|
'Endpoints:' + str(self.Endpoints) + ')' |
2033
|
|
|
|
2034
|
1 |
|
__repr__ = __str__ |
2035
|
|
|
|
2036
|
|
|
|
2037
|
1 |
|
class RegisteredServer(FrozenClass): |
2038
|
|
|
''' |
2039
|
|
|
The information required to register a server with a discovery server. |
2040
|
|
|
|
2041
|
|
|
:ivar ServerUri: |
2042
|
|
|
:vartype ServerUri: String |
2043
|
|
|
:ivar ProductUri: |
2044
|
|
|
:vartype ProductUri: String |
2045
|
|
|
:ivar ServerNames: |
2046
|
|
|
:vartype ServerNames: LocalizedText |
2047
|
|
|
:ivar ServerType: |
2048
|
|
|
:vartype ServerType: ApplicationType |
2049
|
|
|
:ivar GatewayServerUri: |
2050
|
|
|
:vartype GatewayServerUri: String |
2051
|
|
|
:ivar DiscoveryUrls: |
2052
|
|
|
:vartype DiscoveryUrls: String |
2053
|
|
|
:ivar SemaphoreFilePath: |
2054
|
|
|
:vartype SemaphoreFilePath: String |
2055
|
|
|
:ivar IsOnline: |
2056
|
|
|
:vartype IsOnline: Boolean |
2057
|
|
|
''' |
2058
|
1 |
|
def __init__(self, binary=None): |
2059
|
1 |
|
if binary is not None: |
2060
|
1 |
|
self._binary_init(binary) |
2061
|
1 |
|
self._freeze = True |
2062
|
1 |
|
return |
2063
|
1 |
|
self.ServerUri = '' |
2064
|
1 |
|
self.ProductUri = '' |
2065
|
1 |
|
self.ServerNames = [] |
2066
|
1 |
|
self.ServerType = ApplicationType(0) |
2067
|
1 |
|
self.GatewayServerUri = '' |
2068
|
1 |
|
self.DiscoveryUrls = [] |
2069
|
1 |
|
self.SemaphoreFilePath = '' |
2070
|
1 |
|
self.IsOnline = True |
2071
|
1 |
|
self._freeze = True |
2072
|
|
|
|
2073
|
1 |
|
def to_binary(self): |
2074
|
1 |
|
packet = [] |
2075
|
1 |
|
packet.append(pack_string(self.ServerUri)) |
2076
|
1 |
|
packet.append(pack_string(self.ProductUri)) |
2077
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ServerNames))) |
2078
|
1 |
|
for fieldname in self.ServerNames: |
2079
|
1 |
|
packet.append(fieldname.to_binary()) |
2080
|
1 |
|
packet.append(uatype_UInt32.pack(self.ServerType.value)) |
2081
|
1 |
|
packet.append(pack_string(self.GatewayServerUri)) |
2082
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiscoveryUrls))) |
2083
|
1 |
|
for fieldname in self.DiscoveryUrls: |
2084
|
1 |
|
packet.append(pack_string(fieldname)) |
2085
|
1 |
|
packet.append(pack_string(self.SemaphoreFilePath)) |
2086
|
1 |
|
packet.append(uatype_Boolean.pack(self.IsOnline)) |
2087
|
1 |
|
return b''.join(packet) |
2088
|
|
|
|
2089
|
1 |
|
@staticmethod |
2090
|
|
|
def from_binary(data): |
2091
|
1 |
|
return RegisteredServer(data) |
2092
|
|
|
|
2093
|
1 |
|
def _binary_init(self, data): |
2094
|
1 |
|
self.ServerUri = unpack_string(data) |
2095
|
1 |
|
self.ProductUri = unpack_string(data) |
2096
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
2097
|
1 |
|
array = [] |
2098
|
1 |
|
if length != -1: |
2099
|
1 |
|
for _ in range(0, length): |
2100
|
1 |
|
array.append(LocalizedText.from_binary(data)) |
2101
|
1 |
|
self.ServerNames = array |
2102
|
1 |
|
self.ServerType = ApplicationType(uatype_UInt32.unpack(data.read(4))[0]) |
2103
|
1 |
|
self.GatewayServerUri = unpack_string(data) |
2104
|
1 |
|
self.DiscoveryUrls = unpack_uatype_array('String', data) |
2105
|
1 |
|
self.SemaphoreFilePath = unpack_string(data) |
2106
|
1 |
|
self.IsOnline = uatype_Boolean.unpack(data.read(1))[0] |
2107
|
|
|
|
2108
|
1 |
|
def __str__(self): |
2109
|
|
|
return 'RegisteredServer(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \ |
2110
|
|
|
'ProductUri:' + str(self.ProductUri) + ', ' + \ |
2111
|
|
|
'ServerNames:' + str(self.ServerNames) + ', ' + \ |
2112
|
|
|
'ServerType:' + str(self.ServerType) + ', ' + \ |
2113
|
|
|
'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \ |
2114
|
|
|
'DiscoveryUrls:' + str(self.DiscoveryUrls) + ', ' + \ |
2115
|
|
|
'SemaphoreFilePath:' + str(self.SemaphoreFilePath) + ', ' + \ |
2116
|
|
|
'IsOnline:' + str(self.IsOnline) + ')' |
2117
|
|
|
|
2118
|
1 |
|
__repr__ = __str__ |
2119
|
|
|
|
2120
|
|
|
|
2121
|
1 |
|
class RegisterServerRequest(FrozenClass): |
2122
|
|
|
''' |
2123
|
|
|
Registers a server with the discovery server. |
2124
|
|
|
|
2125
|
|
|
:ivar TypeId: |
2126
|
|
|
:vartype TypeId: NodeId |
2127
|
|
|
:ivar RequestHeader: |
2128
|
|
|
:vartype RequestHeader: RequestHeader |
2129
|
|
|
:ivar Server: |
2130
|
|
|
:vartype Server: RegisteredServer |
2131
|
|
|
''' |
2132
|
1 |
|
def __init__(self, binary=None): |
2133
|
1 |
|
if binary is not None: |
2134
|
|
|
self._binary_init(binary) |
2135
|
|
|
self._freeze = True |
2136
|
|
|
return |
2137
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary) |
2138
|
1 |
|
self.RequestHeader = RequestHeader() |
2139
|
1 |
|
self.Server = RegisteredServer() |
2140
|
1 |
|
self._freeze = True |
2141
|
|
|
|
2142
|
1 |
|
def to_binary(self): |
2143
|
1 |
|
packet = [] |
2144
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2145
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
2146
|
1 |
|
packet.append(self.Server.to_binary()) |
2147
|
1 |
|
return b''.join(packet) |
2148
|
|
|
|
2149
|
1 |
|
@staticmethod |
2150
|
|
|
def from_binary(data): |
2151
|
|
|
return RegisterServerRequest(data) |
2152
|
|
|
|
2153
|
1 |
|
def _binary_init(self, data): |
2154
|
|
|
self.TypeId = NodeId.from_binary(data) |
2155
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
2156
|
|
|
self.Server = RegisteredServer.from_binary(data) |
2157
|
|
|
|
2158
|
1 |
|
def __str__(self): |
2159
|
|
|
return 'RegisterServerRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2160
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
2161
|
|
|
'Server:' + str(self.Server) + ')' |
2162
|
|
|
|
2163
|
1 |
|
__repr__ = __str__ |
2164
|
|
|
|
2165
|
|
|
|
2166
|
1 |
|
class RegisterServerResponse(FrozenClass): |
2167
|
|
|
''' |
2168
|
|
|
Registers a server with the discovery server. |
2169
|
|
|
|
2170
|
|
|
:ivar TypeId: |
2171
|
|
|
:vartype TypeId: NodeId |
2172
|
|
|
:ivar ResponseHeader: |
2173
|
|
|
:vartype ResponseHeader: ResponseHeader |
2174
|
|
|
''' |
2175
|
1 |
|
def __init__(self, binary=None): |
2176
|
1 |
|
if binary is not None: |
2177
|
1 |
|
self._binary_init(binary) |
2178
|
1 |
|
self._freeze = True |
2179
|
1 |
|
return |
2180
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary) |
2181
|
1 |
|
self.ResponseHeader = ResponseHeader() |
2182
|
1 |
|
self._freeze = True |
2183
|
|
|
|
2184
|
1 |
|
def to_binary(self): |
2185
|
1 |
|
packet = [] |
2186
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2187
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
2188
|
1 |
|
return b''.join(packet) |
2189
|
|
|
|
2190
|
1 |
|
@staticmethod |
2191
|
|
|
def from_binary(data): |
2192
|
1 |
|
return RegisterServerResponse(data) |
2193
|
|
|
|
2194
|
1 |
|
def _binary_init(self, data): |
2195
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
2196
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
2197
|
|
|
|
2198
|
1 |
|
def __str__(self): |
2199
|
|
|
return 'RegisterServerResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2200
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ')' |
2201
|
|
|
|
2202
|
1 |
|
__repr__ = __str__ |
2203
|
|
|
|
2204
|
|
|
|
2205
|
1 |
|
class DiscoveryConfiguration(FrozenClass): |
2206
|
|
|
''' |
2207
|
|
|
A base type for discovery configuration information. |
2208
|
|
|
|
2209
|
|
|
''' |
2210
|
1 |
|
def __init__(self, binary=None): |
2211
|
|
|
if binary is not None: |
2212
|
|
|
self._binary_init(binary) |
2213
|
|
|
self._freeze = True |
2214
|
|
|
return |
2215
|
|
|
self._freeze = True |
2216
|
|
|
|
2217
|
1 |
|
def to_binary(self): |
2218
|
|
|
packet = [] |
2219
|
|
|
return b''.join(packet) |
2220
|
|
|
|
2221
|
1 |
|
@staticmethod |
2222
|
|
|
def from_binary(data): |
2223
|
|
|
return DiscoveryConfiguration(data) |
2224
|
|
|
|
2225
|
1 |
|
def _binary_init(self, data): |
2226
|
|
|
pass |
2227
|
|
|
|
2228
|
1 |
|
def __str__(self): |
2229
|
|
|
return 'DiscoveryConfiguration(' + + ')' |
2230
|
|
|
|
2231
|
1 |
|
__repr__ = __str__ |
2232
|
|
|
|
2233
|
|
|
|
2234
|
1 |
|
class MdnsDiscoveryConfiguration(FrozenClass): |
2235
|
|
|
''' |
2236
|
|
|
The discovery information needed for mDNS registration. |
2237
|
|
|
|
2238
|
|
|
:ivar MdnsServerName: |
2239
|
|
|
:vartype MdnsServerName: String |
2240
|
|
|
:ivar ServerCapabilities: |
2241
|
|
|
:vartype ServerCapabilities: String |
2242
|
|
|
''' |
2243
|
1 |
|
def __init__(self, binary=None): |
2244
|
|
|
if binary is not None: |
2245
|
|
|
self._binary_init(binary) |
2246
|
|
|
self._freeze = True |
2247
|
|
|
return |
2248
|
|
|
self.MdnsServerName = '' |
2249
|
|
|
self.ServerCapabilities = [] |
2250
|
|
|
self._freeze = True |
2251
|
|
|
|
2252
|
1 |
|
def to_binary(self): |
2253
|
|
|
packet = [] |
2254
|
|
|
packet.append(pack_string(self.MdnsServerName)) |
2255
|
|
|
packet.append(uatype_Int32.pack(len(self.ServerCapabilities))) |
2256
|
|
|
for fieldname in self.ServerCapabilities: |
2257
|
|
|
packet.append(pack_string(fieldname)) |
2258
|
|
|
return b''.join(packet) |
2259
|
|
|
|
2260
|
1 |
|
@staticmethod |
2261
|
|
|
def from_binary(data): |
2262
|
|
|
return MdnsDiscoveryConfiguration(data) |
2263
|
|
|
|
2264
|
1 |
|
def _binary_init(self, data): |
2265
|
|
|
self.MdnsServerName = unpack_string(data) |
2266
|
|
|
self.ServerCapabilities = unpack_uatype_array('String', data) |
2267
|
|
|
|
2268
|
1 |
|
def __str__(self): |
2269
|
|
|
return 'MdnsDiscoveryConfiguration(' + 'MdnsServerName:' + str(self.MdnsServerName) + ', ' + \ |
2270
|
|
|
'ServerCapabilities:' + str(self.ServerCapabilities) + ')' |
2271
|
|
|
|
2272
|
1 |
|
__repr__ = __str__ |
2273
|
|
|
|
2274
|
|
|
|
2275
|
1 |
|
class RegisterServer2Parameters(FrozenClass): |
2276
|
|
|
''' |
2277
|
|
|
:ivar Server: |
2278
|
|
|
:vartype Server: RegisteredServer |
2279
|
|
|
:ivar DiscoveryConfiguration: |
2280
|
|
|
:vartype DiscoveryConfiguration: ExtensionObject |
2281
|
|
|
''' |
2282
|
1 |
|
def __init__(self, binary=None): |
2283
|
|
|
if binary is not None: |
2284
|
|
|
self._binary_init(binary) |
2285
|
|
|
self._freeze = True |
2286
|
|
|
return |
2287
|
|
|
self.Server = RegisteredServer() |
2288
|
|
|
self.DiscoveryConfiguration = [] |
2289
|
|
|
self._freeze = True |
2290
|
|
|
|
2291
|
1 |
|
def to_binary(self): |
2292
|
|
|
packet = [] |
2293
|
|
|
packet.append(self.Server.to_binary()) |
2294
|
|
|
packet.append(uatype_Int32.pack(len(self.DiscoveryConfiguration))) |
2295
|
|
|
for fieldname in self.DiscoveryConfiguration: |
2296
|
|
|
packet.append(extensionobject_to_binary(fieldname)) |
2297
|
|
|
return b''.join(packet) |
2298
|
|
|
|
2299
|
1 |
|
@staticmethod |
2300
|
|
|
def from_binary(data): |
2301
|
|
|
return RegisterServer2Parameters(data) |
2302
|
|
|
|
2303
|
1 |
|
def _binary_init(self, data): |
2304
|
|
|
self.Server = RegisteredServer.from_binary(data) |
2305
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
2306
|
|
|
array = [] |
2307
|
|
|
if length != -1: |
2308
|
|
|
for _ in range(0, length): |
2309
|
|
|
array.append(extensionobject_from_binary(data)) |
2310
|
|
|
self.DiscoveryConfiguration = array |
2311
|
|
|
|
2312
|
1 |
|
def __str__(self): |
2313
|
|
|
return 'RegisterServer2Parameters(' + 'Server:' + str(self.Server) + ', ' + \ |
2314
|
|
|
'DiscoveryConfiguration:' + str(self.DiscoveryConfiguration) + ')' |
2315
|
|
|
|
2316
|
1 |
|
__repr__ = __str__ |
2317
|
|
|
|
2318
|
|
|
|
2319
|
1 |
|
class RegisterServer2Request(FrozenClass): |
2320
|
|
|
''' |
2321
|
|
|
:ivar TypeId: |
2322
|
|
|
:vartype TypeId: NodeId |
2323
|
|
|
:ivar RequestHeader: |
2324
|
|
|
:vartype RequestHeader: RequestHeader |
2325
|
|
|
:ivar Parameters: |
2326
|
|
|
:vartype Parameters: RegisterServer2Parameters |
2327
|
|
|
''' |
2328
|
1 |
|
def __init__(self, binary=None): |
2329
|
|
|
if binary is not None: |
2330
|
|
|
self._binary_init(binary) |
2331
|
|
|
self._freeze = True |
2332
|
|
|
return |
2333
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary) |
2334
|
|
|
self.RequestHeader = RequestHeader() |
2335
|
|
|
self.Parameters = RegisterServer2Parameters() |
2336
|
|
|
self._freeze = True |
2337
|
|
|
|
2338
|
1 |
|
def to_binary(self): |
2339
|
|
|
packet = [] |
2340
|
|
|
packet.append(self.TypeId.to_binary()) |
2341
|
|
|
packet.append(self.RequestHeader.to_binary()) |
2342
|
|
|
packet.append(self.Parameters.to_binary()) |
2343
|
|
|
return b''.join(packet) |
2344
|
|
|
|
2345
|
1 |
|
@staticmethod |
2346
|
|
|
def from_binary(data): |
2347
|
|
|
return RegisterServer2Request(data) |
2348
|
|
|
|
2349
|
1 |
|
def _binary_init(self, data): |
2350
|
|
|
self.TypeId = NodeId.from_binary(data) |
2351
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
2352
|
|
|
self.Parameters = RegisterServer2Parameters.from_binary(data) |
2353
|
|
|
|
2354
|
1 |
|
def __str__(self): |
2355
|
|
|
return 'RegisterServer2Request(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2356
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
2357
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
2358
|
|
|
|
2359
|
1 |
|
__repr__ = __str__ |
2360
|
|
|
|
2361
|
|
|
|
2362
|
1 |
|
class RegisterServer2Response(FrozenClass): |
2363
|
|
|
''' |
2364
|
|
|
:ivar TypeId: |
2365
|
|
|
:vartype TypeId: NodeId |
2366
|
|
|
:ivar ResponseHeader: |
2367
|
|
|
:vartype ResponseHeader: ResponseHeader |
2368
|
|
|
:ivar ConfigurationResults: |
2369
|
|
|
:vartype ConfigurationResults: StatusCode |
2370
|
|
|
:ivar DiagnosticInfos: |
2371
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
2372
|
|
|
''' |
2373
|
1 |
|
def __init__(self, binary=None): |
2374
|
|
|
if binary is not None: |
2375
|
|
|
self._binary_init(binary) |
2376
|
|
|
self._freeze = True |
2377
|
|
|
return |
2378
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary) |
2379
|
|
|
self.ResponseHeader = ResponseHeader() |
2380
|
|
|
self.ConfigurationResults = [] |
2381
|
|
|
self.DiagnosticInfos = [] |
2382
|
|
|
self._freeze = True |
2383
|
|
|
|
2384
|
1 |
|
def to_binary(self): |
2385
|
|
|
packet = [] |
2386
|
|
|
packet.append(self.TypeId.to_binary()) |
2387
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
2388
|
|
|
packet.append(uatype_Int32.pack(len(self.ConfigurationResults))) |
2389
|
|
|
for fieldname in self.ConfigurationResults: |
2390
|
|
|
packet.append(fieldname.to_binary()) |
2391
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
2392
|
|
|
for fieldname in self.DiagnosticInfos: |
2393
|
|
|
packet.append(fieldname.to_binary()) |
2394
|
|
|
return b''.join(packet) |
2395
|
|
|
|
2396
|
1 |
|
@staticmethod |
2397
|
|
|
def from_binary(data): |
2398
|
|
|
return RegisterServer2Response(data) |
2399
|
|
|
|
2400
|
1 |
|
def _binary_init(self, data): |
2401
|
|
|
self.TypeId = NodeId.from_binary(data) |
2402
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
2403
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
2404
|
|
|
array = [] |
2405
|
|
|
if length != -1: |
2406
|
|
|
for _ in range(0, length): |
2407
|
|
|
array.append(StatusCode.from_binary(data)) |
2408
|
|
|
self.ConfigurationResults = array |
2409
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
2410
|
|
|
array = [] |
2411
|
|
|
if length != -1: |
2412
|
|
|
for _ in range(0, length): |
2413
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
2414
|
|
|
self.DiagnosticInfos = array |
2415
|
|
|
|
2416
|
1 |
|
def __str__(self): |
2417
|
|
|
return 'RegisterServer2Response(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2418
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
2419
|
|
|
'ConfigurationResults:' + str(self.ConfigurationResults) + ', ' + \ |
2420
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
2421
|
|
|
|
2422
|
1 |
|
__repr__ = __str__ |
2423
|
|
|
|
2424
|
|
|
|
2425
|
1 |
|
class ChannelSecurityToken(FrozenClass): |
2426
|
|
|
''' |
2427
|
|
|
The token that identifies a set of keys for an active secure channel. |
2428
|
|
|
|
2429
|
|
|
:ivar ChannelId: |
2430
|
|
|
:vartype ChannelId: UInt32 |
2431
|
|
|
:ivar TokenId: |
2432
|
|
|
:vartype TokenId: UInt32 |
2433
|
|
|
:ivar CreatedAt: |
2434
|
|
|
:vartype CreatedAt: DateTime |
2435
|
|
|
:ivar RevisedLifetime: |
2436
|
|
|
:vartype RevisedLifetime: UInt32 |
2437
|
|
|
''' |
2438
|
1 |
|
def __init__(self, binary=None): |
2439
|
1 |
|
if binary is not None: |
2440
|
1 |
|
self._binary_init(binary) |
2441
|
1 |
|
self._freeze = True |
2442
|
1 |
|
return |
2443
|
1 |
|
self.ChannelId = 0 |
2444
|
1 |
|
self.TokenId = 0 |
2445
|
1 |
|
self.CreatedAt = datetime.now() |
2446
|
1 |
|
self.RevisedLifetime = 0 |
2447
|
1 |
|
self._freeze = True |
2448
|
|
|
|
2449
|
1 |
|
def to_binary(self): |
2450
|
1 |
|
packet = [] |
2451
|
1 |
|
packet.append(uatype_UInt32.pack(self.ChannelId)) |
2452
|
1 |
|
packet.append(uatype_UInt32.pack(self.TokenId)) |
2453
|
1 |
|
packet.append(pack_datetime(self.CreatedAt)) |
2454
|
1 |
|
packet.append(uatype_UInt32.pack(self.RevisedLifetime)) |
2455
|
1 |
|
return b''.join(packet) |
2456
|
|
|
|
2457
|
1 |
|
@staticmethod |
2458
|
|
|
def from_binary(data): |
2459
|
1 |
|
return ChannelSecurityToken(data) |
2460
|
|
|
|
2461
|
1 |
|
def _binary_init(self, data): |
2462
|
1 |
|
self.ChannelId = uatype_UInt32.unpack(data.read(4))[0] |
2463
|
1 |
|
self.TokenId = uatype_UInt32.unpack(data.read(4))[0] |
2464
|
1 |
|
self.CreatedAt = unpack_datetime(data) |
2465
|
1 |
|
self.RevisedLifetime = uatype_UInt32.unpack(data.read(4))[0] |
2466
|
|
|
|
2467
|
1 |
|
def __str__(self): |
2468
|
|
|
return 'ChannelSecurityToken(' + 'ChannelId:' + str(self.ChannelId) + ', ' + \ |
2469
|
|
|
'TokenId:' + str(self.TokenId) + ', ' + \ |
2470
|
|
|
'CreatedAt:' + str(self.CreatedAt) + ', ' + \ |
2471
|
|
|
'RevisedLifetime:' + str(self.RevisedLifetime) + ')' |
2472
|
|
|
|
2473
|
1 |
|
__repr__ = __str__ |
2474
|
|
|
|
2475
|
|
|
|
2476
|
1 |
|
class OpenSecureChannelParameters(FrozenClass): |
2477
|
|
|
''' |
2478
|
|
|
:ivar ClientProtocolVersion: |
2479
|
|
|
:vartype ClientProtocolVersion: UInt32 |
2480
|
|
|
:ivar RequestType: |
2481
|
|
|
:vartype RequestType: SecurityTokenRequestType |
2482
|
|
|
:ivar SecurityMode: |
2483
|
|
|
:vartype SecurityMode: MessageSecurityMode |
2484
|
|
|
:ivar ClientNonce: |
2485
|
|
|
:vartype ClientNonce: ByteString |
2486
|
|
|
:ivar RequestedLifetime: |
2487
|
|
|
:vartype RequestedLifetime: UInt32 |
2488
|
|
|
''' |
2489
|
1 |
|
def __init__(self, binary=None): |
2490
|
1 |
|
if binary is not None: |
2491
|
1 |
|
self._binary_init(binary) |
2492
|
1 |
|
self._freeze = True |
2493
|
1 |
|
return |
2494
|
1 |
|
self.ClientProtocolVersion = 0 |
2495
|
1 |
|
self.RequestType = SecurityTokenRequestType(0) |
2496
|
1 |
|
self.SecurityMode = MessageSecurityMode(0) |
2497
|
1 |
|
self.ClientNonce = b'' |
2498
|
1 |
|
self.RequestedLifetime = 0 |
2499
|
1 |
|
self._freeze = True |
2500
|
|
|
|
2501
|
1 |
|
def to_binary(self): |
2502
|
1 |
|
packet = [] |
2503
|
1 |
|
packet.append(uatype_UInt32.pack(self.ClientProtocolVersion)) |
2504
|
1 |
|
packet.append(uatype_UInt32.pack(self.RequestType.value)) |
2505
|
1 |
|
packet.append(uatype_UInt32.pack(self.SecurityMode.value)) |
2506
|
1 |
|
packet.append(pack_bytes(self.ClientNonce)) |
2507
|
1 |
|
packet.append(uatype_UInt32.pack(self.RequestedLifetime)) |
2508
|
1 |
|
return b''.join(packet) |
2509
|
|
|
|
2510
|
1 |
|
@staticmethod |
2511
|
|
|
def from_binary(data): |
2512
|
1 |
|
return OpenSecureChannelParameters(data) |
2513
|
|
|
|
2514
|
1 |
|
def _binary_init(self, data): |
2515
|
1 |
|
self.ClientProtocolVersion = uatype_UInt32.unpack(data.read(4))[0] |
2516
|
1 |
|
self.RequestType = SecurityTokenRequestType(uatype_UInt32.unpack(data.read(4))[0]) |
2517
|
1 |
|
self.SecurityMode = MessageSecurityMode(uatype_UInt32.unpack(data.read(4))[0]) |
2518
|
1 |
|
self.ClientNonce = unpack_bytes(data) |
2519
|
1 |
|
self.RequestedLifetime = uatype_UInt32.unpack(data.read(4))[0] |
2520
|
|
|
|
2521
|
1 |
|
def __str__(self): |
2522
|
|
|
return 'OpenSecureChannelParameters(' + 'ClientProtocolVersion:' + str(self.ClientProtocolVersion) + ', ' + \ |
2523
|
|
|
'RequestType:' + str(self.RequestType) + ', ' + \ |
2524
|
|
|
'SecurityMode:' + str(self.SecurityMode) + ', ' + \ |
2525
|
|
|
'ClientNonce:' + str(self.ClientNonce) + ', ' + \ |
2526
|
|
|
'RequestedLifetime:' + str(self.RequestedLifetime) + ')' |
2527
|
|
|
|
2528
|
1 |
|
__repr__ = __str__ |
2529
|
|
|
|
2530
|
|
|
|
2531
|
1 |
|
class OpenSecureChannelRequest(FrozenClass): |
2532
|
|
|
''' |
2533
|
|
|
Creates a secure channel with a server. |
2534
|
|
|
|
2535
|
|
|
:ivar TypeId: |
2536
|
|
|
:vartype TypeId: NodeId |
2537
|
|
|
:ivar RequestHeader: |
2538
|
|
|
:vartype RequestHeader: RequestHeader |
2539
|
|
|
:ivar Parameters: |
2540
|
|
|
:vartype Parameters: OpenSecureChannelParameters |
2541
|
|
|
''' |
2542
|
1 |
|
def __init__(self, binary=None): |
2543
|
1 |
|
if binary is not None: |
2544
|
1 |
|
self._binary_init(binary) |
2545
|
1 |
|
self._freeze = True |
2546
|
1 |
|
return |
2547
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary) |
2548
|
1 |
|
self.RequestHeader = RequestHeader() |
2549
|
1 |
|
self.Parameters = OpenSecureChannelParameters() |
2550
|
1 |
|
self._freeze = True |
2551
|
|
|
|
2552
|
1 |
|
def to_binary(self): |
2553
|
1 |
|
packet = [] |
2554
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2555
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
2556
|
1 |
|
packet.append(self.Parameters.to_binary()) |
2557
|
1 |
|
return b''.join(packet) |
2558
|
|
|
|
2559
|
1 |
|
@staticmethod |
2560
|
|
|
def from_binary(data): |
2561
|
1 |
|
return OpenSecureChannelRequest(data) |
2562
|
|
|
|
2563
|
1 |
|
def _binary_init(self, data): |
2564
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
2565
|
1 |
|
self.RequestHeader = RequestHeader.from_binary(data) |
2566
|
1 |
|
self.Parameters = OpenSecureChannelParameters.from_binary(data) |
2567
|
|
|
|
2568
|
1 |
|
def __str__(self): |
2569
|
|
|
return 'OpenSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2570
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
2571
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
2572
|
|
|
|
2573
|
1 |
|
__repr__ = __str__ |
2574
|
|
|
|
2575
|
|
|
|
2576
|
1 |
|
class OpenSecureChannelResult(FrozenClass): |
2577
|
|
|
''' |
2578
|
|
|
:ivar ServerProtocolVersion: |
2579
|
|
|
:vartype ServerProtocolVersion: UInt32 |
2580
|
|
|
:ivar SecurityToken: |
2581
|
|
|
:vartype SecurityToken: ChannelSecurityToken |
2582
|
|
|
:ivar ServerNonce: |
2583
|
|
|
:vartype ServerNonce: ByteString |
2584
|
|
|
''' |
2585
|
1 |
|
def __init__(self, binary=None): |
2586
|
1 |
|
if binary is not None: |
2587
|
1 |
|
self._binary_init(binary) |
2588
|
1 |
|
self._freeze = True |
2589
|
1 |
|
return |
2590
|
1 |
|
self.ServerProtocolVersion = 0 |
2591
|
1 |
|
self.SecurityToken = ChannelSecurityToken() |
2592
|
1 |
|
self.ServerNonce = b'' |
2593
|
1 |
|
self._freeze = True |
2594
|
|
|
|
2595
|
1 |
|
def to_binary(self): |
2596
|
1 |
|
packet = [] |
2597
|
1 |
|
packet.append(uatype_UInt32.pack(self.ServerProtocolVersion)) |
2598
|
1 |
|
packet.append(self.SecurityToken.to_binary()) |
2599
|
1 |
|
packet.append(pack_bytes(self.ServerNonce)) |
2600
|
1 |
|
return b''.join(packet) |
2601
|
|
|
|
2602
|
1 |
|
@staticmethod |
2603
|
|
|
def from_binary(data): |
2604
|
1 |
|
return OpenSecureChannelResult(data) |
2605
|
|
|
|
2606
|
1 |
|
def _binary_init(self, data): |
2607
|
1 |
|
self.ServerProtocolVersion = uatype_UInt32.unpack(data.read(4))[0] |
2608
|
1 |
|
self.SecurityToken = ChannelSecurityToken.from_binary(data) |
2609
|
1 |
|
self.ServerNonce = unpack_bytes(data) |
2610
|
|
|
|
2611
|
1 |
|
def __str__(self): |
2612
|
|
|
return 'OpenSecureChannelResult(' + 'ServerProtocolVersion:' + str(self.ServerProtocolVersion) + ', ' + \ |
2613
|
|
|
'SecurityToken:' + str(self.SecurityToken) + ', ' + \ |
2614
|
|
|
'ServerNonce:' + str(self.ServerNonce) + ')' |
2615
|
|
|
|
2616
|
1 |
|
__repr__ = __str__ |
2617
|
|
|
|
2618
|
|
|
|
2619
|
1 |
|
class OpenSecureChannelResponse(FrozenClass): |
2620
|
|
|
''' |
2621
|
|
|
Creates a secure channel with a server. |
2622
|
|
|
|
2623
|
|
|
:ivar TypeId: |
2624
|
|
|
:vartype TypeId: NodeId |
2625
|
|
|
:ivar ResponseHeader: |
2626
|
|
|
:vartype ResponseHeader: ResponseHeader |
2627
|
|
|
:ivar Parameters: |
2628
|
|
|
:vartype Parameters: OpenSecureChannelResult |
2629
|
|
|
''' |
2630
|
1 |
|
def __init__(self, binary=None): |
2631
|
1 |
|
if binary is not None: |
2632
|
1 |
|
self._binary_init(binary) |
2633
|
1 |
|
self._freeze = True |
2634
|
1 |
|
return |
2635
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary) |
2636
|
1 |
|
self.ResponseHeader = ResponseHeader() |
2637
|
1 |
|
self.Parameters = OpenSecureChannelResult() |
2638
|
1 |
|
self._freeze = True |
2639
|
|
|
|
2640
|
1 |
|
def to_binary(self): |
2641
|
1 |
|
packet = [] |
2642
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2643
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
2644
|
1 |
|
packet.append(self.Parameters.to_binary()) |
2645
|
1 |
|
return b''.join(packet) |
2646
|
|
|
|
2647
|
1 |
|
@staticmethod |
2648
|
|
|
def from_binary(data): |
2649
|
1 |
|
return OpenSecureChannelResponse(data) |
2650
|
|
|
|
2651
|
1 |
|
def _binary_init(self, data): |
2652
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
2653
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
2654
|
1 |
|
self.Parameters = OpenSecureChannelResult.from_binary(data) |
2655
|
|
|
|
2656
|
1 |
|
def __str__(self): |
2657
|
|
|
return 'OpenSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2658
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
2659
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
2660
|
|
|
|
2661
|
1 |
|
__repr__ = __str__ |
2662
|
|
|
|
2663
|
|
|
|
2664
|
1 |
|
class CloseSecureChannelRequest(FrozenClass): |
2665
|
|
|
''' |
2666
|
|
|
Closes a secure channel. |
2667
|
|
|
|
2668
|
|
|
:ivar TypeId: |
2669
|
|
|
:vartype TypeId: NodeId |
2670
|
|
|
:ivar RequestHeader: |
2671
|
|
|
:vartype RequestHeader: RequestHeader |
2672
|
|
|
''' |
2673
|
1 |
|
def __init__(self, binary=None): |
2674
|
1 |
|
if binary is not None: |
2675
|
|
|
self._binary_init(binary) |
2676
|
|
|
self._freeze = True |
2677
|
|
|
return |
2678
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary) |
2679
|
1 |
|
self.RequestHeader = RequestHeader() |
2680
|
1 |
|
self._freeze = True |
2681
|
|
|
|
2682
|
1 |
|
def to_binary(self): |
2683
|
1 |
|
packet = [] |
2684
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2685
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
2686
|
1 |
|
return b''.join(packet) |
2687
|
|
|
|
2688
|
1 |
|
@staticmethod |
2689
|
|
|
def from_binary(data): |
2690
|
|
|
return CloseSecureChannelRequest(data) |
2691
|
|
|
|
2692
|
1 |
|
def _binary_init(self, data): |
2693
|
|
|
self.TypeId = NodeId.from_binary(data) |
2694
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
2695
|
|
|
|
2696
|
1 |
|
def __str__(self): |
2697
|
|
|
return 'CloseSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2698
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ')' |
2699
|
|
|
|
2700
|
1 |
|
__repr__ = __str__ |
2701
|
|
|
|
2702
|
|
|
|
2703
|
1 |
|
class CloseSecureChannelResponse(FrozenClass): |
2704
|
|
|
''' |
2705
|
|
|
Closes a secure channel. |
2706
|
|
|
|
2707
|
|
|
:ivar TypeId: |
2708
|
|
|
:vartype TypeId: NodeId |
2709
|
|
|
:ivar ResponseHeader: |
2710
|
|
|
:vartype ResponseHeader: ResponseHeader |
2711
|
|
|
''' |
2712
|
1 |
|
def __init__(self, binary=None): |
2713
|
|
|
if binary is not None: |
2714
|
|
|
self._binary_init(binary) |
2715
|
|
|
self._freeze = True |
2716
|
|
|
return |
2717
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary) |
2718
|
|
|
self.ResponseHeader = ResponseHeader() |
2719
|
|
|
self._freeze = True |
2720
|
|
|
|
2721
|
1 |
|
def to_binary(self): |
2722
|
|
|
packet = [] |
2723
|
|
|
packet.append(self.TypeId.to_binary()) |
2724
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
2725
|
|
|
return b''.join(packet) |
2726
|
|
|
|
2727
|
1 |
|
@staticmethod |
2728
|
|
|
def from_binary(data): |
2729
|
|
|
return CloseSecureChannelResponse(data) |
2730
|
|
|
|
2731
|
1 |
|
def _binary_init(self, data): |
2732
|
|
|
self.TypeId = NodeId.from_binary(data) |
2733
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
2734
|
|
|
|
2735
|
1 |
|
def __str__(self): |
2736
|
|
|
return 'CloseSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2737
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ')' |
2738
|
|
|
|
2739
|
1 |
|
__repr__ = __str__ |
2740
|
|
|
|
2741
|
|
|
|
2742
|
1 |
|
class SignedSoftwareCertificate(FrozenClass): |
2743
|
|
|
''' |
2744
|
|
|
A software certificate with a digital signature. |
2745
|
|
|
|
2746
|
|
|
:ivar CertificateData: |
2747
|
|
|
:vartype CertificateData: ByteString |
2748
|
|
|
:ivar Signature: |
2749
|
|
|
:vartype Signature: ByteString |
2750
|
|
|
''' |
2751
|
1 |
|
def __init__(self, binary=None): |
2752
|
|
|
if binary is not None: |
2753
|
|
|
self._binary_init(binary) |
2754
|
|
|
self._freeze = True |
2755
|
|
|
return |
2756
|
|
|
self.CertificateData = b'' |
2757
|
|
|
self.Signature = b'' |
2758
|
|
|
self._freeze = True |
2759
|
|
|
|
2760
|
1 |
|
def to_binary(self): |
2761
|
|
|
packet = [] |
2762
|
|
|
packet.append(pack_bytes(self.CertificateData)) |
2763
|
|
|
packet.append(pack_bytes(self.Signature)) |
2764
|
|
|
return b''.join(packet) |
2765
|
|
|
|
2766
|
1 |
|
@staticmethod |
2767
|
|
|
def from_binary(data): |
2768
|
|
|
return SignedSoftwareCertificate(data) |
2769
|
|
|
|
2770
|
1 |
|
def _binary_init(self, data): |
2771
|
|
|
self.CertificateData = unpack_bytes(data) |
2772
|
|
|
self.Signature = unpack_bytes(data) |
2773
|
|
|
|
2774
|
1 |
|
def __str__(self): |
2775
|
|
|
return 'SignedSoftwareCertificate(' + 'CertificateData:' + str(self.CertificateData) + ', ' + \ |
2776
|
|
|
'Signature:' + str(self.Signature) + ')' |
2777
|
|
|
|
2778
|
1 |
|
__repr__ = __str__ |
2779
|
|
|
|
2780
|
|
|
|
2781
|
1 |
|
class SignatureData(FrozenClass): |
2782
|
|
|
''' |
2783
|
|
|
A digital signature. |
2784
|
|
|
|
2785
|
|
|
:ivar Algorithm: |
2786
|
|
|
:vartype Algorithm: String |
2787
|
|
|
:ivar Signature: |
2788
|
|
|
:vartype Signature: ByteString |
2789
|
|
|
''' |
2790
|
1 |
|
def __init__(self, binary=None): |
2791
|
1 |
|
if binary is not None: |
2792
|
1 |
|
self._binary_init(binary) |
2793
|
1 |
|
self._freeze = True |
2794
|
1 |
|
return |
2795
|
1 |
|
self.Algorithm = '' |
2796
|
1 |
|
self.Signature = b'' |
2797
|
1 |
|
self._freeze = True |
2798
|
|
|
|
2799
|
1 |
|
def to_binary(self): |
2800
|
1 |
|
packet = [] |
2801
|
1 |
|
packet.append(pack_string(self.Algorithm)) |
2802
|
1 |
|
packet.append(pack_bytes(self.Signature)) |
2803
|
1 |
|
return b''.join(packet) |
2804
|
|
|
|
2805
|
1 |
|
@staticmethod |
2806
|
|
|
def from_binary(data): |
2807
|
1 |
|
return SignatureData(data) |
2808
|
|
|
|
2809
|
1 |
|
def _binary_init(self, data): |
2810
|
1 |
|
self.Algorithm = unpack_string(data) |
2811
|
1 |
|
self.Signature = unpack_bytes(data) |
2812
|
|
|
|
2813
|
1 |
|
def __str__(self): |
2814
|
|
|
return 'SignatureData(' + 'Algorithm:' + str(self.Algorithm) + ', ' + \ |
2815
|
|
|
'Signature:' + str(self.Signature) + ')' |
2816
|
|
|
|
2817
|
1 |
|
__repr__ = __str__ |
2818
|
|
|
|
2819
|
|
|
|
2820
|
1 |
|
class CreateSessionParameters(FrozenClass): |
2821
|
|
|
''' |
2822
|
|
|
:ivar ClientDescription: |
2823
|
|
|
:vartype ClientDescription: ApplicationDescription |
2824
|
|
|
:ivar ServerUri: |
2825
|
|
|
:vartype ServerUri: String |
2826
|
|
|
:ivar EndpointUrl: |
2827
|
|
|
:vartype EndpointUrl: String |
2828
|
|
|
:ivar SessionName: |
2829
|
|
|
:vartype SessionName: String |
2830
|
|
|
:ivar ClientNonce: |
2831
|
|
|
:vartype ClientNonce: ByteString |
2832
|
|
|
:ivar ClientCertificate: |
2833
|
|
|
:vartype ClientCertificate: ByteString |
2834
|
|
|
:ivar RequestedSessionTimeout: |
2835
|
|
|
:vartype RequestedSessionTimeout: Double |
2836
|
|
|
:ivar MaxResponseMessageSize: |
2837
|
|
|
:vartype MaxResponseMessageSize: UInt32 |
2838
|
|
|
''' |
2839
|
1 |
|
def __init__(self, binary=None): |
2840
|
1 |
|
if binary is not None: |
2841
|
1 |
|
self._binary_init(binary) |
2842
|
1 |
|
self._freeze = True |
2843
|
1 |
|
return |
2844
|
1 |
|
self.ClientDescription = ApplicationDescription() |
2845
|
1 |
|
self.ServerUri = '' |
2846
|
1 |
|
self.EndpointUrl = '' |
2847
|
1 |
|
self.SessionName = '' |
2848
|
1 |
|
self.ClientNonce = b'' |
2849
|
1 |
|
self.ClientCertificate = b'' |
2850
|
1 |
|
self.RequestedSessionTimeout = 0 |
2851
|
1 |
|
self.MaxResponseMessageSize = 0 |
2852
|
1 |
|
self._freeze = True |
2853
|
|
|
|
2854
|
1 |
|
def to_binary(self): |
2855
|
1 |
|
packet = [] |
2856
|
1 |
|
packet.append(self.ClientDescription.to_binary()) |
2857
|
1 |
|
packet.append(pack_string(self.ServerUri)) |
2858
|
1 |
|
packet.append(pack_string(self.EndpointUrl)) |
2859
|
1 |
|
packet.append(pack_string(self.SessionName)) |
2860
|
1 |
|
packet.append(pack_bytes(self.ClientNonce)) |
2861
|
1 |
|
packet.append(pack_bytes(self.ClientCertificate)) |
2862
|
1 |
|
packet.append(uatype_Double.pack(self.RequestedSessionTimeout)) |
2863
|
1 |
|
packet.append(uatype_UInt32.pack(self.MaxResponseMessageSize)) |
2864
|
1 |
|
return b''.join(packet) |
2865
|
|
|
|
2866
|
1 |
|
@staticmethod |
2867
|
|
|
def from_binary(data): |
2868
|
1 |
|
return CreateSessionParameters(data) |
2869
|
|
|
|
2870
|
1 |
|
def _binary_init(self, data): |
2871
|
1 |
|
self.ClientDescription = ApplicationDescription.from_binary(data) |
2872
|
1 |
|
self.ServerUri = unpack_string(data) |
2873
|
1 |
|
self.EndpointUrl = unpack_string(data) |
2874
|
1 |
|
self.SessionName = unpack_string(data) |
2875
|
1 |
|
self.ClientNonce = unpack_bytes(data) |
2876
|
1 |
|
self.ClientCertificate = unpack_bytes(data) |
2877
|
1 |
|
self.RequestedSessionTimeout = uatype_Double.unpack(data.read(8))[0] |
2878
|
1 |
|
self.MaxResponseMessageSize = uatype_UInt32.unpack(data.read(4))[0] |
2879
|
|
|
|
2880
|
1 |
|
def __str__(self): |
2881
|
|
|
return 'CreateSessionParameters(' + 'ClientDescription:' + str(self.ClientDescription) + ', ' + \ |
2882
|
|
|
'ServerUri:' + str(self.ServerUri) + ', ' + \ |
2883
|
|
|
'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ |
2884
|
|
|
'SessionName:' + str(self.SessionName) + ', ' + \ |
2885
|
|
|
'ClientNonce:' + str(self.ClientNonce) + ', ' + \ |
2886
|
|
|
'ClientCertificate:' + str(self.ClientCertificate) + ', ' + \ |
2887
|
|
|
'RequestedSessionTimeout:' + str(self.RequestedSessionTimeout) + ', ' + \ |
2888
|
|
|
'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ')' |
2889
|
|
|
|
2890
|
1 |
|
__repr__ = __str__ |
2891
|
|
|
|
2892
|
|
|
|
2893
|
1 |
|
class CreateSessionRequest(FrozenClass): |
2894
|
|
|
''' |
2895
|
|
|
Creates a new session with the server. |
2896
|
|
|
|
2897
|
|
|
:ivar TypeId: |
2898
|
|
|
:vartype TypeId: NodeId |
2899
|
|
|
:ivar RequestHeader: |
2900
|
|
|
:vartype RequestHeader: RequestHeader |
2901
|
|
|
:ivar Parameters: |
2902
|
|
|
:vartype Parameters: CreateSessionParameters |
2903
|
|
|
''' |
2904
|
1 |
|
def __init__(self, binary=None): |
2905
|
1 |
|
if binary is not None: |
2906
|
|
|
self._binary_init(binary) |
2907
|
|
|
self._freeze = True |
2908
|
|
|
return |
2909
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary) |
2910
|
1 |
|
self.RequestHeader = RequestHeader() |
2911
|
1 |
|
self.Parameters = CreateSessionParameters() |
2912
|
1 |
|
self._freeze = True |
2913
|
|
|
|
2914
|
1 |
|
def to_binary(self): |
2915
|
1 |
|
packet = [] |
2916
|
1 |
|
packet.append(self.TypeId.to_binary()) |
2917
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
2918
|
1 |
|
packet.append(self.Parameters.to_binary()) |
2919
|
1 |
|
return b''.join(packet) |
2920
|
|
|
|
2921
|
1 |
|
@staticmethod |
2922
|
|
|
def from_binary(data): |
2923
|
|
|
return CreateSessionRequest(data) |
2924
|
|
|
|
2925
|
1 |
|
def _binary_init(self, data): |
2926
|
|
|
self.TypeId = NodeId.from_binary(data) |
2927
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
2928
|
|
|
self.Parameters = CreateSessionParameters.from_binary(data) |
2929
|
|
|
|
2930
|
1 |
|
def __str__(self): |
2931
|
|
|
return 'CreateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
2932
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
2933
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
2934
|
|
|
|
2935
|
1 |
|
__repr__ = __str__ |
2936
|
|
|
|
2937
|
|
|
|
2938
|
1 |
|
class CreateSessionResult(FrozenClass): |
2939
|
|
|
''' |
2940
|
|
|
:ivar SessionId: |
2941
|
|
|
:vartype SessionId: NodeId |
2942
|
|
|
:ivar AuthenticationToken: |
2943
|
|
|
:vartype AuthenticationToken: NodeId |
2944
|
|
|
:ivar RevisedSessionTimeout: |
2945
|
|
|
:vartype RevisedSessionTimeout: Double |
2946
|
|
|
:ivar ServerNonce: |
2947
|
|
|
:vartype ServerNonce: ByteString |
2948
|
|
|
:ivar ServerCertificate: |
2949
|
|
|
:vartype ServerCertificate: ByteString |
2950
|
|
|
:ivar ServerEndpoints: |
2951
|
|
|
:vartype ServerEndpoints: EndpointDescription |
2952
|
|
|
:ivar ServerSoftwareCertificates: |
2953
|
|
|
:vartype ServerSoftwareCertificates: SignedSoftwareCertificate |
2954
|
|
|
:ivar ServerSignature: |
2955
|
|
|
:vartype ServerSignature: SignatureData |
2956
|
|
|
:ivar MaxRequestMessageSize: |
2957
|
|
|
:vartype MaxRequestMessageSize: UInt32 |
2958
|
|
|
''' |
2959
|
1 |
|
def __init__(self, binary=None): |
2960
|
1 |
|
if binary is not None: |
2961
|
1 |
|
self._binary_init(binary) |
2962
|
1 |
|
self._freeze = True |
2963
|
1 |
|
return |
2964
|
1 |
|
self.SessionId = NodeId() |
2965
|
1 |
|
self.AuthenticationToken = NodeId() |
2966
|
1 |
|
self.RevisedSessionTimeout = 0 |
2967
|
1 |
|
self.ServerNonce = b'' |
2968
|
1 |
|
self.ServerCertificate = b'' |
2969
|
1 |
|
self.ServerEndpoints = [] |
2970
|
1 |
|
self.ServerSoftwareCertificates = [] |
2971
|
1 |
|
self.ServerSignature = SignatureData() |
2972
|
1 |
|
self.MaxRequestMessageSize = 0 |
2973
|
1 |
|
self._freeze = True |
2974
|
|
|
|
2975
|
1 |
|
def to_binary(self): |
2976
|
1 |
|
packet = [] |
2977
|
1 |
|
packet.append(self.SessionId.to_binary()) |
2978
|
1 |
|
packet.append(self.AuthenticationToken.to_binary()) |
2979
|
1 |
|
packet.append(uatype_Double.pack(self.RevisedSessionTimeout)) |
2980
|
1 |
|
packet.append(pack_bytes(self.ServerNonce)) |
2981
|
1 |
|
packet.append(pack_bytes(self.ServerCertificate)) |
2982
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ServerEndpoints))) |
2983
|
1 |
|
for fieldname in self.ServerEndpoints: |
2984
|
1 |
|
packet.append(fieldname.to_binary()) |
2985
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ServerSoftwareCertificates))) |
2986
|
1 |
|
for fieldname in self.ServerSoftwareCertificates: |
2987
|
|
|
packet.append(fieldname.to_binary()) |
2988
|
1 |
|
packet.append(self.ServerSignature.to_binary()) |
2989
|
1 |
|
packet.append(uatype_UInt32.pack(self.MaxRequestMessageSize)) |
2990
|
1 |
|
return b''.join(packet) |
2991
|
|
|
|
2992
|
1 |
|
@staticmethod |
2993
|
|
|
def from_binary(data): |
2994
|
1 |
|
return CreateSessionResult(data) |
2995
|
|
|
|
2996
|
1 |
|
def _binary_init(self, data): |
2997
|
1 |
|
self.SessionId = NodeId.from_binary(data) |
2998
|
1 |
|
self.AuthenticationToken = NodeId.from_binary(data) |
2999
|
1 |
|
self.RevisedSessionTimeout = uatype_Double.unpack(data.read(8))[0] |
3000
|
1 |
|
self.ServerNonce = unpack_bytes(data) |
3001
|
1 |
|
self.ServerCertificate = unpack_bytes(data) |
3002
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
3003
|
1 |
|
array = [] |
3004
|
1 |
|
if length != -1: |
3005
|
1 |
|
for _ in range(0, length): |
3006
|
1 |
|
array.append(EndpointDescription.from_binary(data)) |
3007
|
1 |
|
self.ServerEndpoints = array |
3008
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
3009
|
1 |
|
array = [] |
3010
|
1 |
|
if length != -1: |
3011
|
1 |
|
for _ in range(0, length): |
3012
|
|
|
array.append(SignedSoftwareCertificate.from_binary(data)) |
3013
|
1 |
|
self.ServerSoftwareCertificates = array |
3014
|
1 |
|
self.ServerSignature = SignatureData.from_binary(data) |
3015
|
1 |
|
self.MaxRequestMessageSize = uatype_UInt32.unpack(data.read(4))[0] |
3016
|
|
|
|
3017
|
1 |
|
def __str__(self): |
3018
|
|
|
return 'CreateSessionResult(' + 'SessionId:' + str(self.SessionId) + ', ' + \ |
3019
|
|
|
'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \ |
3020
|
|
|
'RevisedSessionTimeout:' + str(self.RevisedSessionTimeout) + ', ' + \ |
3021
|
|
|
'ServerNonce:' + str(self.ServerNonce) + ', ' + \ |
3022
|
|
|
'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \ |
3023
|
|
|
'ServerEndpoints:' + str(self.ServerEndpoints) + ', ' + \ |
3024
|
|
|
'ServerSoftwareCertificates:' + str(self.ServerSoftwareCertificates) + ', ' + \ |
3025
|
|
|
'ServerSignature:' + str(self.ServerSignature) + ', ' + \ |
3026
|
|
|
'MaxRequestMessageSize:' + str(self.MaxRequestMessageSize) + ')' |
3027
|
|
|
|
3028
|
1 |
|
__repr__ = __str__ |
3029
|
|
|
|
3030
|
|
|
|
3031
|
1 |
|
class CreateSessionResponse(FrozenClass): |
3032
|
|
|
''' |
3033
|
|
|
Creates a new session with the server. |
3034
|
|
|
|
3035
|
|
|
:ivar TypeId: |
3036
|
|
|
:vartype TypeId: NodeId |
3037
|
|
|
:ivar ResponseHeader: |
3038
|
|
|
:vartype ResponseHeader: ResponseHeader |
3039
|
|
|
:ivar Parameters: |
3040
|
|
|
:vartype Parameters: CreateSessionResult |
3041
|
|
|
''' |
3042
|
1 |
|
def __init__(self, binary=None): |
3043
|
1 |
|
if binary is not None: |
3044
|
1 |
|
self._binary_init(binary) |
3045
|
1 |
|
self._freeze = True |
3046
|
1 |
|
return |
3047
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary) |
3048
|
1 |
|
self.ResponseHeader = ResponseHeader() |
3049
|
1 |
|
self.Parameters = CreateSessionResult() |
3050
|
1 |
|
self._freeze = True |
3051
|
|
|
|
3052
|
1 |
|
def to_binary(self): |
3053
|
1 |
|
packet = [] |
3054
|
1 |
|
packet.append(self.TypeId.to_binary()) |
3055
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
3056
|
1 |
|
packet.append(self.Parameters.to_binary()) |
3057
|
1 |
|
return b''.join(packet) |
3058
|
|
|
|
3059
|
1 |
|
@staticmethod |
3060
|
|
|
def from_binary(data): |
3061
|
1 |
|
return CreateSessionResponse(data) |
3062
|
|
|
|
3063
|
1 |
|
def _binary_init(self, data): |
3064
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
3065
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
3066
|
1 |
|
self.Parameters = CreateSessionResult.from_binary(data) |
3067
|
|
|
|
3068
|
1 |
|
def __str__(self): |
3069
|
|
|
return 'CreateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3070
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
3071
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
3072
|
|
|
|
3073
|
1 |
|
__repr__ = __str__ |
3074
|
|
|
|
3075
|
|
|
|
3076
|
1 |
|
class UserIdentityToken(FrozenClass): |
3077
|
|
|
''' |
3078
|
|
|
A base type for a user identity token. |
3079
|
|
|
|
3080
|
|
|
:ivar PolicyId: |
3081
|
|
|
:vartype PolicyId: String |
3082
|
|
|
''' |
3083
|
1 |
|
def __init__(self, binary=None): |
3084
|
|
|
if binary is not None: |
3085
|
|
|
self._binary_init(binary) |
3086
|
|
|
self._freeze = True |
3087
|
|
|
return |
3088
|
|
|
self.PolicyId = '' |
3089
|
|
|
self._freeze = True |
3090
|
|
|
|
3091
|
1 |
|
def to_binary(self): |
3092
|
|
|
packet = [] |
3093
|
|
|
packet.append(pack_string(self.PolicyId)) |
3094
|
|
|
return b''.join(packet) |
3095
|
|
|
|
3096
|
1 |
|
@staticmethod |
3097
|
|
|
def from_binary(data): |
3098
|
|
|
return UserIdentityToken(data) |
3099
|
|
|
|
3100
|
1 |
|
def _binary_init(self, data): |
3101
|
|
|
self.PolicyId = unpack_string(data) |
3102
|
|
|
|
3103
|
1 |
|
def __str__(self): |
3104
|
|
|
return 'UserIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')' |
3105
|
|
|
|
3106
|
1 |
|
__repr__ = __str__ |
3107
|
|
|
|
3108
|
|
|
|
3109
|
1 |
|
class AnonymousIdentityToken(FrozenClass): |
3110
|
|
|
''' |
3111
|
|
|
A token representing an anonymous user. |
3112
|
|
|
|
3113
|
|
|
:ivar PolicyId: |
3114
|
|
|
:vartype PolicyId: String |
3115
|
|
|
''' |
3116
|
1 |
|
def __init__(self, binary=None): |
3117
|
1 |
|
if binary is not None: |
3118
|
1 |
|
self._binary_init(binary) |
3119
|
1 |
|
self._freeze = True |
3120
|
1 |
|
return |
3121
|
1 |
|
self.PolicyId = '' |
3122
|
1 |
|
self._freeze = True |
3123
|
|
|
|
3124
|
1 |
|
def to_binary(self): |
3125
|
1 |
|
packet = [] |
3126
|
1 |
|
packet.append(pack_string(self.PolicyId)) |
3127
|
1 |
|
return b''.join(packet) |
3128
|
|
|
|
3129
|
1 |
|
@staticmethod |
3130
|
|
|
def from_binary(data): |
3131
|
1 |
|
return AnonymousIdentityToken(data) |
3132
|
|
|
|
3133
|
1 |
|
def _binary_init(self, data): |
3134
|
1 |
|
self.PolicyId = unpack_string(data) |
3135
|
|
|
|
3136
|
1 |
|
def __str__(self): |
3137
|
|
|
return 'AnonymousIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')' |
3138
|
|
|
|
3139
|
1 |
|
__repr__ = __str__ |
3140
|
|
|
|
3141
|
|
|
|
3142
|
1 |
|
class UserNameIdentityToken(FrozenClass): |
3143
|
|
|
''' |
3144
|
|
|
A token representing a user identified by a user name and password. |
3145
|
|
|
|
3146
|
|
|
:ivar PolicyId: |
3147
|
|
|
:vartype PolicyId: String |
3148
|
|
|
:ivar UserName: |
3149
|
|
|
:vartype UserName: String |
3150
|
|
|
:ivar Password: |
3151
|
|
|
:vartype Password: ByteString |
3152
|
|
|
:ivar EncryptionAlgorithm: |
3153
|
|
|
:vartype EncryptionAlgorithm: String |
3154
|
|
|
''' |
3155
|
1 |
|
def __init__(self, binary=None): |
3156
|
1 |
|
if binary is not None: |
3157
|
1 |
|
self._binary_init(binary) |
3158
|
1 |
|
self._freeze = True |
3159
|
1 |
|
return |
3160
|
1 |
|
self.PolicyId = '' |
3161
|
1 |
|
self.UserName = '' |
3162
|
1 |
|
self.Password = b'' |
3163
|
1 |
|
self.EncryptionAlgorithm = '' |
3164
|
1 |
|
self._freeze = True |
3165
|
|
|
|
3166
|
1 |
|
def to_binary(self): |
3167
|
1 |
|
packet = [] |
3168
|
1 |
|
packet.append(pack_string(self.PolicyId)) |
3169
|
1 |
|
packet.append(pack_string(self.UserName)) |
3170
|
1 |
|
packet.append(pack_bytes(self.Password)) |
3171
|
1 |
|
packet.append(pack_string(self.EncryptionAlgorithm)) |
3172
|
1 |
|
return b''.join(packet) |
3173
|
|
|
|
3174
|
1 |
|
@staticmethod |
3175
|
|
|
def from_binary(data): |
3176
|
1 |
|
return UserNameIdentityToken(data) |
3177
|
|
|
|
3178
|
1 |
|
def _binary_init(self, data): |
3179
|
1 |
|
self.PolicyId = unpack_string(data) |
3180
|
1 |
|
self.UserName = unpack_string(data) |
3181
|
1 |
|
self.Password = unpack_bytes(data) |
3182
|
1 |
|
self.EncryptionAlgorithm = unpack_string(data) |
3183
|
|
|
|
3184
|
1 |
|
def __str__(self): |
3185
|
|
|
return 'UserNameIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ |
3186
|
|
|
'UserName:' + str(self.UserName) + ', ' + \ |
3187
|
|
|
'Password:' + str(self.Password) + ', ' + \ |
3188
|
|
|
'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')' |
3189
|
|
|
|
3190
|
1 |
|
__repr__ = __str__ |
3191
|
|
|
|
3192
|
|
|
|
3193
|
1 |
|
class X509IdentityToken(FrozenClass): |
3194
|
|
|
''' |
3195
|
|
|
A token representing a user identified by an X509 certificate. |
3196
|
|
|
|
3197
|
|
|
:ivar PolicyId: |
3198
|
|
|
:vartype PolicyId: String |
3199
|
|
|
:ivar CertificateData: |
3200
|
|
|
:vartype CertificateData: ByteString |
3201
|
|
|
''' |
3202
|
1 |
|
def __init__(self, binary=None): |
3203
|
|
|
if binary is not None: |
3204
|
|
|
self._binary_init(binary) |
3205
|
|
|
self._freeze = True |
3206
|
|
|
return |
3207
|
|
|
self.PolicyId = '' |
3208
|
|
|
self.CertificateData = b'' |
3209
|
|
|
self._freeze = True |
3210
|
|
|
|
3211
|
1 |
|
def to_binary(self): |
3212
|
|
|
packet = [] |
3213
|
|
|
packet.append(pack_string(self.PolicyId)) |
3214
|
|
|
packet.append(pack_bytes(self.CertificateData)) |
3215
|
|
|
return b''.join(packet) |
3216
|
|
|
|
3217
|
1 |
|
@staticmethod |
3218
|
|
|
def from_binary(data): |
3219
|
|
|
return X509IdentityToken(data) |
3220
|
|
|
|
3221
|
1 |
|
def _binary_init(self, data): |
3222
|
|
|
self.PolicyId = unpack_string(data) |
3223
|
|
|
self.CertificateData = unpack_bytes(data) |
3224
|
|
|
|
3225
|
1 |
|
def __str__(self): |
3226
|
|
|
return 'X509IdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ |
3227
|
|
|
'CertificateData:' + str(self.CertificateData) + ')' |
3228
|
|
|
|
3229
|
1 |
|
__repr__ = __str__ |
3230
|
|
|
|
3231
|
|
|
|
3232
|
1 |
|
class KerberosIdentityToken(FrozenClass): |
3233
|
|
|
''' |
3234
|
|
|
:ivar PolicyId: |
3235
|
|
|
:vartype PolicyId: String |
3236
|
|
|
:ivar TicketData: |
3237
|
|
|
:vartype TicketData: ByteString |
3238
|
|
|
''' |
3239
|
1 |
|
def __init__(self, binary=None): |
3240
|
|
|
if binary is not None: |
3241
|
|
|
self._binary_init(binary) |
3242
|
|
|
self._freeze = True |
3243
|
|
|
return |
3244
|
|
|
self.PolicyId = '' |
3245
|
|
|
self.TicketData = b'' |
3246
|
|
|
self._freeze = True |
3247
|
|
|
|
3248
|
1 |
|
def to_binary(self): |
3249
|
|
|
packet = [] |
3250
|
|
|
packet.append(pack_string(self.PolicyId)) |
3251
|
|
|
packet.append(pack_bytes(self.TicketData)) |
3252
|
|
|
return b''.join(packet) |
3253
|
|
|
|
3254
|
1 |
|
@staticmethod |
3255
|
|
|
def from_binary(data): |
3256
|
|
|
return KerberosIdentityToken(data) |
3257
|
|
|
|
3258
|
1 |
|
def _binary_init(self, data): |
3259
|
|
|
self.PolicyId = unpack_string(data) |
3260
|
|
|
self.TicketData = unpack_bytes(data) |
3261
|
|
|
|
3262
|
1 |
|
def __str__(self): |
3263
|
|
|
return 'KerberosIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ |
3264
|
|
|
'TicketData:' + str(self.TicketData) + ')' |
3265
|
|
|
|
3266
|
1 |
|
__repr__ = __str__ |
3267
|
|
|
|
3268
|
|
|
|
3269
|
1 |
|
class IssuedIdentityToken(FrozenClass): |
3270
|
|
|
''' |
3271
|
|
|
A token representing a user identified by a WS-Security XML token. |
3272
|
|
|
|
3273
|
|
|
:ivar PolicyId: |
3274
|
|
|
:vartype PolicyId: String |
3275
|
|
|
:ivar TokenData: |
3276
|
|
|
:vartype TokenData: ByteString |
3277
|
|
|
:ivar EncryptionAlgorithm: |
3278
|
|
|
:vartype EncryptionAlgorithm: String |
3279
|
|
|
''' |
3280
|
1 |
|
def __init__(self, binary=None): |
3281
|
|
|
if binary is not None: |
3282
|
|
|
self._binary_init(binary) |
3283
|
|
|
self._freeze = True |
3284
|
|
|
return |
3285
|
|
|
self.PolicyId = '' |
3286
|
|
|
self.TokenData = b'' |
3287
|
|
|
self.EncryptionAlgorithm = '' |
3288
|
|
|
self._freeze = True |
3289
|
|
|
|
3290
|
1 |
|
def to_binary(self): |
3291
|
|
|
packet = [] |
3292
|
|
|
packet.append(pack_string(self.PolicyId)) |
3293
|
|
|
packet.append(pack_bytes(self.TokenData)) |
3294
|
|
|
packet.append(pack_string(self.EncryptionAlgorithm)) |
3295
|
|
|
return b''.join(packet) |
3296
|
|
|
|
3297
|
1 |
|
@staticmethod |
3298
|
|
|
def from_binary(data): |
3299
|
|
|
return IssuedIdentityToken(data) |
3300
|
|
|
|
3301
|
1 |
|
def _binary_init(self, data): |
3302
|
|
|
self.PolicyId = unpack_string(data) |
3303
|
|
|
self.TokenData = unpack_bytes(data) |
3304
|
|
|
self.EncryptionAlgorithm = unpack_string(data) |
3305
|
|
|
|
3306
|
1 |
|
def __str__(self): |
3307
|
|
|
return 'IssuedIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ |
3308
|
|
|
'TokenData:' + str(self.TokenData) + ', ' + \ |
3309
|
|
|
'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')' |
3310
|
|
|
|
3311
|
1 |
|
__repr__ = __str__ |
3312
|
|
|
|
3313
|
|
|
|
3314
|
1 |
|
class ActivateSessionParameters(FrozenClass): |
3315
|
|
|
''' |
3316
|
|
|
:ivar ClientSignature: |
3317
|
|
|
:vartype ClientSignature: SignatureData |
3318
|
|
|
:ivar ClientSoftwareCertificates: |
3319
|
|
|
:vartype ClientSoftwareCertificates: SignedSoftwareCertificate |
3320
|
|
|
:ivar LocaleIds: |
3321
|
|
|
:vartype LocaleIds: String |
3322
|
|
|
:ivar UserIdentityToken: |
3323
|
|
|
:vartype UserIdentityToken: ExtensionObject |
3324
|
|
|
:ivar UserTokenSignature: |
3325
|
|
|
:vartype UserTokenSignature: SignatureData |
3326
|
|
|
''' |
3327
|
1 |
|
def __init__(self, binary=None): |
3328
|
1 |
|
if binary is not None: |
3329
|
1 |
|
self._binary_init(binary) |
3330
|
1 |
|
self._freeze = True |
3331
|
1 |
|
return |
3332
|
1 |
|
self.ClientSignature = SignatureData() |
3333
|
1 |
|
self.ClientSoftwareCertificates = [] |
3334
|
1 |
|
self.LocaleIds = [] |
3335
|
1 |
|
self.UserIdentityToken = None |
3336
|
1 |
|
self.UserTokenSignature = SignatureData() |
3337
|
1 |
|
self._freeze = True |
3338
|
|
|
|
3339
|
1 |
|
def to_binary(self): |
3340
|
1 |
|
packet = [] |
3341
|
1 |
|
packet.append(self.ClientSignature.to_binary()) |
3342
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ClientSoftwareCertificates))) |
3343
|
1 |
|
for fieldname in self.ClientSoftwareCertificates: |
3344
|
|
|
packet.append(fieldname.to_binary()) |
3345
|
1 |
|
packet.append(uatype_Int32.pack(len(self.LocaleIds))) |
3346
|
1 |
|
for fieldname in self.LocaleIds: |
3347
|
1 |
|
packet.append(pack_string(fieldname)) |
3348
|
1 |
|
packet.append(extensionobject_to_binary(self.UserIdentityToken)) |
3349
|
1 |
|
packet.append(self.UserTokenSignature.to_binary()) |
3350
|
1 |
|
return b''.join(packet) |
3351
|
|
|
|
3352
|
1 |
|
@staticmethod |
3353
|
|
|
def from_binary(data): |
3354
|
1 |
|
return ActivateSessionParameters(data) |
3355
|
|
|
|
3356
|
1 |
|
def _binary_init(self, data): |
3357
|
1 |
|
self.ClientSignature = SignatureData.from_binary(data) |
3358
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
3359
|
1 |
|
array = [] |
3360
|
1 |
|
if length != -1: |
3361
|
1 |
|
for _ in range(0, length): |
3362
|
|
|
array.append(SignedSoftwareCertificate.from_binary(data)) |
3363
|
1 |
|
self.ClientSoftwareCertificates = array |
3364
|
1 |
|
self.LocaleIds = unpack_uatype_array('String', data) |
3365
|
1 |
|
self.UserIdentityToken = extensionobject_from_binary(data) |
3366
|
1 |
|
self.UserTokenSignature = SignatureData.from_binary(data) |
3367
|
|
|
|
3368
|
1 |
|
def __str__(self): |
3369
|
|
|
return 'ActivateSessionParameters(' + 'ClientSignature:' + str(self.ClientSignature) + ', ' + \ |
3370
|
|
|
'ClientSoftwareCertificates:' + str(self.ClientSoftwareCertificates) + ', ' + \ |
3371
|
|
|
'LocaleIds:' + str(self.LocaleIds) + ', ' + \ |
3372
|
|
|
'UserIdentityToken:' + str(self.UserIdentityToken) + ', ' + \ |
3373
|
|
|
'UserTokenSignature:' + str(self.UserTokenSignature) + ')' |
3374
|
|
|
|
3375
|
1 |
|
__repr__ = __str__ |
3376
|
|
|
|
3377
|
|
|
|
3378
|
1 |
|
class ActivateSessionRequest(FrozenClass): |
3379
|
|
|
''' |
3380
|
|
|
Activates a session with the server. |
3381
|
|
|
|
3382
|
|
|
:ivar TypeId: |
3383
|
|
|
:vartype TypeId: NodeId |
3384
|
|
|
:ivar RequestHeader: |
3385
|
|
|
:vartype RequestHeader: RequestHeader |
3386
|
|
|
:ivar Parameters: |
3387
|
|
|
:vartype Parameters: ActivateSessionParameters |
3388
|
|
|
''' |
3389
|
1 |
|
def __init__(self, binary=None): |
3390
|
1 |
|
if binary is not None: |
3391
|
|
|
self._binary_init(binary) |
3392
|
|
|
self._freeze = True |
3393
|
|
|
return |
3394
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary) |
3395
|
1 |
|
self.RequestHeader = RequestHeader() |
3396
|
1 |
|
self.Parameters = ActivateSessionParameters() |
3397
|
1 |
|
self._freeze = True |
3398
|
|
|
|
3399
|
1 |
|
def to_binary(self): |
3400
|
1 |
|
packet = [] |
3401
|
1 |
|
packet.append(self.TypeId.to_binary()) |
3402
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
3403
|
1 |
|
packet.append(self.Parameters.to_binary()) |
3404
|
1 |
|
return b''.join(packet) |
3405
|
|
|
|
3406
|
1 |
|
@staticmethod |
3407
|
|
|
def from_binary(data): |
3408
|
|
|
return ActivateSessionRequest(data) |
3409
|
|
|
|
3410
|
1 |
|
def _binary_init(self, data): |
3411
|
|
|
self.TypeId = NodeId.from_binary(data) |
3412
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
3413
|
|
|
self.Parameters = ActivateSessionParameters.from_binary(data) |
3414
|
|
|
|
3415
|
1 |
|
def __str__(self): |
3416
|
|
|
return 'ActivateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3417
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
3418
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
3419
|
|
|
|
3420
|
1 |
|
__repr__ = __str__ |
3421
|
|
|
|
3422
|
|
|
|
3423
|
1 |
|
class ActivateSessionResult(FrozenClass): |
3424
|
|
|
''' |
3425
|
|
|
:ivar ServerNonce: |
3426
|
|
|
:vartype ServerNonce: ByteString |
3427
|
|
|
:ivar Results: |
3428
|
|
|
:vartype Results: StatusCode |
3429
|
|
|
:ivar DiagnosticInfos: |
3430
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
3431
|
|
|
''' |
3432
|
1 |
|
def __init__(self, binary=None): |
3433
|
1 |
|
if binary is not None: |
3434
|
1 |
|
self._binary_init(binary) |
3435
|
1 |
|
self._freeze = True |
3436
|
1 |
|
return |
3437
|
1 |
|
self.ServerNonce = b'' |
3438
|
1 |
|
self.Results = [] |
3439
|
1 |
|
self.DiagnosticInfos = [] |
3440
|
1 |
|
self._freeze = True |
3441
|
|
|
|
3442
|
1 |
|
def to_binary(self): |
3443
|
1 |
|
packet = [] |
3444
|
1 |
|
packet.append(pack_bytes(self.ServerNonce)) |
3445
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
3446
|
1 |
|
for fieldname in self.Results: |
3447
|
|
|
packet.append(fieldname.to_binary()) |
3448
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
3449
|
1 |
|
for fieldname in self.DiagnosticInfos: |
3450
|
|
|
packet.append(fieldname.to_binary()) |
3451
|
1 |
|
return b''.join(packet) |
3452
|
|
|
|
3453
|
1 |
|
@staticmethod |
3454
|
|
|
def from_binary(data): |
3455
|
1 |
|
return ActivateSessionResult(data) |
3456
|
|
|
|
3457
|
1 |
|
def _binary_init(self, data): |
3458
|
1 |
|
self.ServerNonce = unpack_bytes(data) |
3459
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
3460
|
1 |
|
array = [] |
3461
|
1 |
|
if length != -1: |
3462
|
1 |
|
for _ in range(0, length): |
3463
|
|
|
array.append(StatusCode.from_binary(data)) |
3464
|
1 |
|
self.Results = array |
3465
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
3466
|
1 |
|
array = [] |
3467
|
1 |
|
if length != -1: |
3468
|
1 |
|
for _ in range(0, length): |
3469
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
3470
|
1 |
|
self.DiagnosticInfos = array |
3471
|
|
|
|
3472
|
1 |
|
def __str__(self): |
3473
|
|
|
return 'ActivateSessionResult(' + 'ServerNonce:' + str(self.ServerNonce) + ', ' + \ |
3474
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
3475
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
3476
|
|
|
|
3477
|
1 |
|
__repr__ = __str__ |
3478
|
|
|
|
3479
|
|
|
|
3480
|
1 |
|
class ActivateSessionResponse(FrozenClass): |
3481
|
|
|
''' |
3482
|
|
|
Activates a session with the server. |
3483
|
|
|
|
3484
|
|
|
:ivar TypeId: |
3485
|
|
|
:vartype TypeId: NodeId |
3486
|
|
|
:ivar ResponseHeader: |
3487
|
|
|
:vartype ResponseHeader: ResponseHeader |
3488
|
|
|
:ivar Parameters: |
3489
|
|
|
:vartype Parameters: ActivateSessionResult |
3490
|
|
|
''' |
3491
|
1 |
|
def __init__(self, binary=None): |
3492
|
1 |
|
if binary is not None: |
3493
|
1 |
|
self._binary_init(binary) |
3494
|
1 |
|
self._freeze = True |
3495
|
1 |
|
return |
3496
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary) |
3497
|
1 |
|
self.ResponseHeader = ResponseHeader() |
3498
|
1 |
|
self.Parameters = ActivateSessionResult() |
3499
|
1 |
|
self._freeze = True |
3500
|
|
|
|
3501
|
1 |
|
def to_binary(self): |
3502
|
1 |
|
packet = [] |
3503
|
1 |
|
packet.append(self.TypeId.to_binary()) |
3504
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
3505
|
1 |
|
packet.append(self.Parameters.to_binary()) |
3506
|
1 |
|
return b''.join(packet) |
3507
|
|
|
|
3508
|
1 |
|
@staticmethod |
3509
|
|
|
def from_binary(data): |
3510
|
1 |
|
return ActivateSessionResponse(data) |
3511
|
|
|
|
3512
|
1 |
|
def _binary_init(self, data): |
3513
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
3514
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
3515
|
1 |
|
self.Parameters = ActivateSessionResult.from_binary(data) |
3516
|
|
|
|
3517
|
1 |
|
def __str__(self): |
3518
|
|
|
return 'ActivateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3519
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
3520
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
3521
|
|
|
|
3522
|
1 |
|
__repr__ = __str__ |
3523
|
|
|
|
3524
|
|
|
|
3525
|
1 |
|
class CloseSessionRequest(FrozenClass): |
3526
|
|
|
''' |
3527
|
|
|
Closes a session with the server. |
3528
|
|
|
|
3529
|
|
|
:ivar TypeId: |
3530
|
|
|
:vartype TypeId: NodeId |
3531
|
|
|
:ivar RequestHeader: |
3532
|
|
|
:vartype RequestHeader: RequestHeader |
3533
|
|
|
:ivar DeleteSubscriptions: |
3534
|
|
|
:vartype DeleteSubscriptions: Boolean |
3535
|
|
|
''' |
3536
|
1 |
|
def __init__(self, binary=None): |
3537
|
1 |
|
if binary is not None: |
3538
|
|
|
self._binary_init(binary) |
3539
|
|
|
self._freeze = True |
3540
|
|
|
return |
3541
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary) |
3542
|
1 |
|
self.RequestHeader = RequestHeader() |
3543
|
1 |
|
self.DeleteSubscriptions = True |
3544
|
1 |
|
self._freeze = True |
3545
|
|
|
|
3546
|
1 |
|
def to_binary(self): |
3547
|
1 |
|
packet = [] |
3548
|
1 |
|
packet.append(self.TypeId.to_binary()) |
3549
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
3550
|
1 |
|
packet.append(uatype_Boolean.pack(self.DeleteSubscriptions)) |
3551
|
1 |
|
return b''.join(packet) |
3552
|
|
|
|
3553
|
1 |
|
@staticmethod |
3554
|
|
|
def from_binary(data): |
3555
|
|
|
return CloseSessionRequest(data) |
3556
|
|
|
|
3557
|
1 |
|
def _binary_init(self, data): |
3558
|
|
|
self.TypeId = NodeId.from_binary(data) |
3559
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
3560
|
|
|
self.DeleteSubscriptions = uatype_Boolean.unpack(data.read(1))[0] |
3561
|
|
|
|
3562
|
1 |
|
def __str__(self): |
3563
|
|
|
return 'CloseSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3564
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
3565
|
|
|
'DeleteSubscriptions:' + str(self.DeleteSubscriptions) + ')' |
3566
|
|
|
|
3567
|
1 |
|
__repr__ = __str__ |
3568
|
|
|
|
3569
|
|
|
|
3570
|
1 |
|
class CloseSessionResponse(FrozenClass): |
3571
|
|
|
''' |
3572
|
|
|
Closes a session with the server. |
3573
|
|
|
|
3574
|
|
|
:ivar TypeId: |
3575
|
|
|
:vartype TypeId: NodeId |
3576
|
|
|
:ivar ResponseHeader: |
3577
|
|
|
:vartype ResponseHeader: ResponseHeader |
3578
|
|
|
''' |
3579
|
1 |
|
def __init__(self, binary=None): |
3580
|
1 |
|
if binary is not None: |
3581
|
1 |
|
self._binary_init(binary) |
3582
|
1 |
|
self._freeze = True |
3583
|
1 |
|
return |
3584
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary) |
3585
|
1 |
|
self.ResponseHeader = ResponseHeader() |
3586
|
1 |
|
self._freeze = True |
3587
|
|
|
|
3588
|
1 |
|
def to_binary(self): |
3589
|
1 |
|
packet = [] |
3590
|
1 |
|
packet.append(self.TypeId.to_binary()) |
3591
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
3592
|
1 |
|
return b''.join(packet) |
3593
|
|
|
|
3594
|
1 |
|
@staticmethod |
3595
|
|
|
def from_binary(data): |
3596
|
1 |
|
return CloseSessionResponse(data) |
3597
|
|
|
|
3598
|
1 |
|
def _binary_init(self, data): |
3599
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
3600
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
3601
|
|
|
|
3602
|
1 |
|
def __str__(self): |
3603
|
|
|
return 'CloseSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3604
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ')' |
3605
|
|
|
|
3606
|
1 |
|
__repr__ = __str__ |
3607
|
|
|
|
3608
|
|
|
|
3609
|
1 |
|
class CancelParameters(FrozenClass): |
3610
|
|
|
''' |
3611
|
|
|
:ivar RequestHandle: |
3612
|
|
|
:vartype RequestHandle: UInt32 |
3613
|
|
|
''' |
3614
|
1 |
|
def __init__(self, binary=None): |
3615
|
|
|
if binary is not None: |
3616
|
|
|
self._binary_init(binary) |
3617
|
|
|
self._freeze = True |
3618
|
|
|
return |
3619
|
|
|
self.RequestHandle = 0 |
3620
|
|
|
self._freeze = True |
3621
|
|
|
|
3622
|
1 |
|
def to_binary(self): |
3623
|
|
|
packet = [] |
3624
|
|
|
packet.append(uatype_UInt32.pack(self.RequestHandle)) |
3625
|
|
|
return b''.join(packet) |
3626
|
|
|
|
3627
|
1 |
|
@staticmethod |
3628
|
|
|
def from_binary(data): |
3629
|
|
|
return CancelParameters(data) |
3630
|
|
|
|
3631
|
1 |
|
def _binary_init(self, data): |
3632
|
|
|
self.RequestHandle = uatype_UInt32.unpack(data.read(4))[0] |
3633
|
|
|
|
3634
|
1 |
|
def __str__(self): |
3635
|
|
|
return 'CancelParameters(' + 'RequestHandle:' + str(self.RequestHandle) + ')' |
3636
|
|
|
|
3637
|
1 |
|
__repr__ = __str__ |
3638
|
|
|
|
3639
|
|
|
|
3640
|
1 |
|
class CancelRequest(FrozenClass): |
3641
|
|
|
''' |
3642
|
|
|
Cancels an outstanding request. |
3643
|
|
|
|
3644
|
|
|
:ivar TypeId: |
3645
|
|
|
:vartype TypeId: NodeId |
3646
|
|
|
:ivar RequestHeader: |
3647
|
|
|
:vartype RequestHeader: RequestHeader |
3648
|
|
|
:ivar Parameters: |
3649
|
|
|
:vartype Parameters: CancelParameters |
3650
|
|
|
''' |
3651
|
1 |
|
def __init__(self, binary=None): |
3652
|
|
|
if binary is not None: |
3653
|
|
|
self._binary_init(binary) |
3654
|
|
|
self._freeze = True |
3655
|
|
|
return |
3656
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary) |
3657
|
|
|
self.RequestHeader = RequestHeader() |
3658
|
|
|
self.Parameters = CancelParameters() |
3659
|
|
|
self._freeze = True |
3660
|
|
|
|
3661
|
1 |
|
def to_binary(self): |
3662
|
|
|
packet = [] |
3663
|
|
|
packet.append(self.TypeId.to_binary()) |
3664
|
|
|
packet.append(self.RequestHeader.to_binary()) |
3665
|
|
|
packet.append(self.Parameters.to_binary()) |
3666
|
|
|
return b''.join(packet) |
3667
|
|
|
|
3668
|
1 |
|
@staticmethod |
3669
|
|
|
def from_binary(data): |
3670
|
|
|
return CancelRequest(data) |
3671
|
|
|
|
3672
|
1 |
|
def _binary_init(self, data): |
3673
|
|
|
self.TypeId = NodeId.from_binary(data) |
3674
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
3675
|
|
|
self.Parameters = CancelParameters.from_binary(data) |
3676
|
|
|
|
3677
|
1 |
|
def __str__(self): |
3678
|
|
|
return 'CancelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3679
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
3680
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
3681
|
|
|
|
3682
|
1 |
|
__repr__ = __str__ |
3683
|
|
|
|
3684
|
|
|
|
3685
|
1 |
|
class CancelResult(FrozenClass): |
3686
|
|
|
''' |
3687
|
|
|
:ivar CancelCount: |
3688
|
|
|
:vartype CancelCount: UInt32 |
3689
|
|
|
''' |
3690
|
1 |
|
def __init__(self, binary=None): |
3691
|
|
|
if binary is not None: |
3692
|
|
|
self._binary_init(binary) |
3693
|
|
|
self._freeze = True |
3694
|
|
|
return |
3695
|
|
|
self.CancelCount = 0 |
3696
|
|
|
self._freeze = True |
3697
|
|
|
|
3698
|
1 |
|
def to_binary(self): |
3699
|
|
|
packet = [] |
3700
|
|
|
packet.append(uatype_UInt32.pack(self.CancelCount)) |
3701
|
|
|
return b''.join(packet) |
3702
|
|
|
|
3703
|
1 |
|
@staticmethod |
3704
|
|
|
def from_binary(data): |
3705
|
|
|
return CancelResult(data) |
3706
|
|
|
|
3707
|
1 |
|
def _binary_init(self, data): |
3708
|
|
|
self.CancelCount = uatype_UInt32.unpack(data.read(4))[0] |
3709
|
|
|
|
3710
|
1 |
|
def __str__(self): |
3711
|
|
|
return 'CancelResult(' + 'CancelCount:' + str(self.CancelCount) + ')' |
3712
|
|
|
|
3713
|
1 |
|
__repr__ = __str__ |
3714
|
|
|
|
3715
|
|
|
|
3716
|
1 |
|
class CancelResponse(FrozenClass): |
3717
|
|
|
''' |
3718
|
|
|
Cancels an outstanding request. |
3719
|
|
|
|
3720
|
|
|
:ivar TypeId: |
3721
|
|
|
:vartype TypeId: NodeId |
3722
|
|
|
:ivar ResponseHeader: |
3723
|
|
|
:vartype ResponseHeader: ResponseHeader |
3724
|
|
|
:ivar Parameters: |
3725
|
|
|
:vartype Parameters: CancelResult |
3726
|
|
|
''' |
3727
|
1 |
|
def __init__(self, binary=None): |
3728
|
|
|
if binary is not None: |
3729
|
|
|
self._binary_init(binary) |
3730
|
|
|
self._freeze = True |
3731
|
|
|
return |
3732
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary) |
3733
|
|
|
self.ResponseHeader = ResponseHeader() |
3734
|
|
|
self.Parameters = CancelResult() |
3735
|
|
|
self._freeze = True |
3736
|
|
|
|
3737
|
1 |
|
def to_binary(self): |
3738
|
|
|
packet = [] |
3739
|
|
|
packet.append(self.TypeId.to_binary()) |
3740
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
3741
|
|
|
packet.append(self.Parameters.to_binary()) |
3742
|
|
|
return b''.join(packet) |
3743
|
|
|
|
3744
|
1 |
|
@staticmethod |
3745
|
|
|
def from_binary(data): |
3746
|
|
|
return CancelResponse(data) |
3747
|
|
|
|
3748
|
1 |
|
def _binary_init(self, data): |
3749
|
|
|
self.TypeId = NodeId.from_binary(data) |
3750
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
3751
|
|
|
self.Parameters = CancelResult.from_binary(data) |
3752
|
|
|
|
3753
|
1 |
|
def __str__(self): |
3754
|
|
|
return 'CancelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
3755
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
3756
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
3757
|
|
|
|
3758
|
1 |
|
__repr__ = __str__ |
3759
|
|
|
|
3760
|
|
|
|
3761
|
1 |
|
class NodeAttributes(FrozenClass): |
3762
|
|
|
''' |
3763
|
|
|
The base attributes for all nodes. |
3764
|
|
|
|
3765
|
|
|
:ivar SpecifiedAttributes: |
3766
|
|
|
:vartype SpecifiedAttributes: UInt32 |
3767
|
|
|
:ivar DisplayName: |
3768
|
|
|
:vartype DisplayName: LocalizedText |
3769
|
|
|
:ivar Description: |
3770
|
|
|
:vartype Description: LocalizedText |
3771
|
|
|
:ivar WriteMask: |
3772
|
|
|
:vartype WriteMask: UInt32 |
3773
|
|
|
:ivar UserWriteMask: |
3774
|
|
|
:vartype UserWriteMask: UInt32 |
3775
|
|
|
''' |
3776
|
1 |
|
def __init__(self, binary=None): |
3777
|
|
|
if binary is not None: |
3778
|
|
|
self._binary_init(binary) |
3779
|
|
|
self._freeze = True |
3780
|
|
|
return |
3781
|
|
|
self.SpecifiedAttributes = 0 |
3782
|
|
|
self.DisplayName = LocalizedText() |
3783
|
|
|
self.Description = LocalizedText() |
3784
|
|
|
self.WriteMask = 0 |
3785
|
|
|
self.UserWriteMask = 0 |
3786
|
|
|
self._freeze = True |
3787
|
|
|
|
3788
|
1 |
|
def to_binary(self): |
3789
|
|
|
packet = [] |
3790
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
3791
|
|
|
packet.append(self.DisplayName.to_binary()) |
3792
|
|
|
packet.append(self.Description.to_binary()) |
3793
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
3794
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
3795
|
|
|
return b''.join(packet) |
3796
|
|
|
|
3797
|
1 |
|
@staticmethod |
3798
|
|
|
def from_binary(data): |
3799
|
|
|
return NodeAttributes(data) |
3800
|
|
|
|
3801
|
1 |
|
def _binary_init(self, data): |
3802
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
3803
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
3804
|
|
|
self.Description = LocalizedText.from_binary(data) |
3805
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3806
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3807
|
|
|
|
3808
|
1 |
|
def __str__(self): |
3809
|
|
|
return 'NodeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
3810
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
3811
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
3812
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
3813
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ')' |
3814
|
|
|
|
3815
|
1 |
|
__repr__ = __str__ |
3816
|
|
|
|
3817
|
|
|
|
3818
|
1 |
|
class ObjectAttributes(FrozenClass): |
3819
|
|
|
''' |
3820
|
|
|
The attributes for an object node. |
3821
|
|
|
|
3822
|
|
|
:ivar SpecifiedAttributes: |
3823
|
|
|
:vartype SpecifiedAttributes: UInt32 |
3824
|
|
|
:ivar DisplayName: |
3825
|
|
|
:vartype DisplayName: LocalizedText |
3826
|
|
|
:ivar Description: |
3827
|
|
|
:vartype Description: LocalizedText |
3828
|
|
|
:ivar WriteMask: |
3829
|
|
|
:vartype WriteMask: UInt32 |
3830
|
|
|
:ivar UserWriteMask: |
3831
|
|
|
:vartype UserWriteMask: UInt32 |
3832
|
|
|
:ivar EventNotifier: |
3833
|
|
|
:vartype EventNotifier: Byte |
3834
|
|
|
''' |
3835
|
1 |
|
def __init__(self, binary=None): |
3836
|
1 |
|
if binary is not None: |
3837
|
1 |
|
self._binary_init(binary) |
3838
|
1 |
|
self._freeze = True |
3839
|
1 |
|
return |
3840
|
1 |
|
self.SpecifiedAttributes = 0 |
3841
|
1 |
|
self.DisplayName = LocalizedText() |
3842
|
1 |
|
self.Description = LocalizedText() |
3843
|
1 |
|
self.WriteMask = 0 |
3844
|
1 |
|
self.UserWriteMask = 0 |
3845
|
1 |
|
self.EventNotifier = 0 |
3846
|
1 |
|
self._freeze = True |
3847
|
|
|
|
3848
|
1 |
|
def to_binary(self): |
3849
|
1 |
|
packet = [] |
3850
|
1 |
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
3851
|
1 |
|
packet.append(self.DisplayName.to_binary()) |
3852
|
1 |
|
packet.append(self.Description.to_binary()) |
3853
|
1 |
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
3854
|
1 |
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
3855
|
1 |
|
packet.append(uatype_Byte.pack(self.EventNotifier)) |
3856
|
1 |
|
return b''.join(packet) |
3857
|
|
|
|
3858
|
1 |
|
@staticmethod |
3859
|
|
|
def from_binary(data): |
3860
|
1 |
|
return ObjectAttributes(data) |
3861
|
|
|
|
3862
|
1 |
|
def _binary_init(self, data): |
3863
|
1 |
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
3864
|
1 |
|
self.DisplayName = LocalizedText.from_binary(data) |
3865
|
1 |
|
self.Description = LocalizedText.from_binary(data) |
3866
|
1 |
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3867
|
1 |
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3868
|
1 |
|
self.EventNotifier = uatype_Byte.unpack(data.read(1))[0] |
3869
|
|
|
|
3870
|
1 |
|
def __str__(self): |
3871
|
|
|
return 'ObjectAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
3872
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
3873
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
3874
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
3875
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
3876
|
|
|
'EventNotifier:' + str(self.EventNotifier) + ')' |
3877
|
|
|
|
3878
|
1 |
|
__repr__ = __str__ |
3879
|
|
|
|
3880
|
|
|
|
3881
|
1 |
|
class VariableAttributes(FrozenClass): |
3882
|
|
|
''' |
3883
|
|
|
The attributes for a variable node. |
3884
|
|
|
|
3885
|
|
|
:ivar SpecifiedAttributes: |
3886
|
|
|
:vartype SpecifiedAttributes: UInt32 |
3887
|
|
|
:ivar DisplayName: |
3888
|
|
|
:vartype DisplayName: LocalizedText |
3889
|
|
|
:ivar Description: |
3890
|
|
|
:vartype Description: LocalizedText |
3891
|
|
|
:ivar WriteMask: |
3892
|
|
|
:vartype WriteMask: UInt32 |
3893
|
|
|
:ivar UserWriteMask: |
3894
|
|
|
:vartype UserWriteMask: UInt32 |
3895
|
|
|
:ivar Value: |
3896
|
|
|
:vartype Value: Variant |
3897
|
|
|
:ivar DataType: |
3898
|
|
|
:vartype DataType: NodeId |
3899
|
|
|
:ivar ValueRank: |
3900
|
|
|
:vartype ValueRank: Int32 |
3901
|
|
|
:ivar ArrayDimensions: |
3902
|
|
|
:vartype ArrayDimensions: UInt32 |
3903
|
|
|
:ivar AccessLevel: |
3904
|
|
|
:vartype AccessLevel: Byte |
3905
|
|
|
:ivar UserAccessLevel: |
3906
|
|
|
:vartype UserAccessLevel: Byte |
3907
|
|
|
:ivar MinimumSamplingInterval: |
3908
|
|
|
:vartype MinimumSamplingInterval: Double |
3909
|
|
|
:ivar Historizing: |
3910
|
|
|
:vartype Historizing: Boolean |
3911
|
|
|
''' |
3912
|
1 |
|
def __init__(self, binary=None): |
3913
|
1 |
|
if binary is not None: |
3914
|
1 |
|
self._binary_init(binary) |
3915
|
1 |
|
self._freeze = True |
3916
|
1 |
|
return |
3917
|
1 |
|
self.SpecifiedAttributes = 0 |
3918
|
1 |
|
self.DisplayName = LocalizedText() |
3919
|
1 |
|
self.Description = LocalizedText() |
3920
|
1 |
|
self.WriteMask = 0 |
3921
|
1 |
|
self.UserWriteMask = 0 |
3922
|
1 |
|
self.Value = Variant() |
3923
|
1 |
|
self.DataType = NodeId() |
3924
|
1 |
|
self.ValueRank = 0 |
3925
|
1 |
|
self.ArrayDimensions = [] |
3926
|
1 |
|
self.AccessLevel = 0 |
3927
|
1 |
|
self.UserAccessLevel = 0 |
3928
|
1 |
|
self.MinimumSamplingInterval = 0 |
3929
|
1 |
|
self.Historizing = True |
3930
|
1 |
|
self._freeze = True |
3931
|
|
|
|
3932
|
1 |
|
def to_binary(self): |
3933
|
1 |
|
packet = [] |
3934
|
1 |
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
3935
|
1 |
|
packet.append(self.DisplayName.to_binary()) |
3936
|
1 |
|
packet.append(self.Description.to_binary()) |
3937
|
1 |
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
3938
|
1 |
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
3939
|
1 |
|
packet.append(self.Value.to_binary()) |
3940
|
1 |
|
packet.append(self.DataType.to_binary()) |
3941
|
1 |
|
packet.append(uatype_Int32.pack(self.ValueRank)) |
3942
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ArrayDimensions))) |
3943
|
1 |
|
for fieldname in self.ArrayDimensions: |
3944
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
3945
|
1 |
|
packet.append(uatype_Byte.pack(self.AccessLevel)) |
3946
|
1 |
|
packet.append(uatype_Byte.pack(self.UserAccessLevel)) |
3947
|
1 |
|
packet.append(uatype_Double.pack(self.MinimumSamplingInterval)) |
3948
|
1 |
|
packet.append(uatype_Boolean.pack(self.Historizing)) |
3949
|
1 |
|
return b''.join(packet) |
3950
|
|
|
|
3951
|
1 |
|
@staticmethod |
3952
|
|
|
def from_binary(data): |
3953
|
1 |
|
return VariableAttributes(data) |
3954
|
|
|
|
3955
|
1 |
|
def _binary_init(self, data): |
3956
|
1 |
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
3957
|
1 |
|
self.DisplayName = LocalizedText.from_binary(data) |
3958
|
1 |
|
self.Description = LocalizedText.from_binary(data) |
3959
|
1 |
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3960
|
1 |
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
3961
|
1 |
|
self.Value = Variant.from_binary(data) |
3962
|
1 |
|
self.DataType = NodeId.from_binary(data) |
3963
|
1 |
|
self.ValueRank = uatype_Int32.unpack(data.read(4))[0] |
3964
|
1 |
|
self.ArrayDimensions = unpack_uatype_array('UInt32', data) |
3965
|
1 |
|
self.AccessLevel = uatype_Byte.unpack(data.read(1))[0] |
3966
|
1 |
|
self.UserAccessLevel = uatype_Byte.unpack(data.read(1))[0] |
3967
|
1 |
|
self.MinimumSamplingInterval = uatype_Double.unpack(data.read(8))[0] |
3968
|
1 |
|
self.Historizing = uatype_Boolean.unpack(data.read(1))[0] |
3969
|
|
|
|
3970
|
1 |
|
def __str__(self): |
3971
|
|
|
return 'VariableAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
3972
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
3973
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
3974
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
3975
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
3976
|
|
|
'Value:' + str(self.Value) + ', ' + \ |
3977
|
|
|
'DataType:' + str(self.DataType) + ', ' + \ |
3978
|
|
|
'ValueRank:' + str(self.ValueRank) + ', ' + \ |
3979
|
|
|
'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ |
3980
|
|
|
'AccessLevel:' + str(self.AccessLevel) + ', ' + \ |
3981
|
|
|
'UserAccessLevel:' + str(self.UserAccessLevel) + ', ' + \ |
3982
|
|
|
'MinimumSamplingInterval:' + str(self.MinimumSamplingInterval) + ', ' + \ |
3983
|
|
|
'Historizing:' + str(self.Historizing) + ')' |
3984
|
|
|
|
3985
|
1 |
|
__repr__ = __str__ |
3986
|
|
|
|
3987
|
|
|
|
3988
|
1 |
|
class MethodAttributes(FrozenClass): |
3989
|
|
|
''' |
3990
|
|
|
The attributes for a method node. |
3991
|
|
|
|
3992
|
|
|
:ivar SpecifiedAttributes: |
3993
|
|
|
:vartype SpecifiedAttributes: UInt32 |
3994
|
|
|
:ivar DisplayName: |
3995
|
|
|
:vartype DisplayName: LocalizedText |
3996
|
|
|
:ivar Description: |
3997
|
|
|
:vartype Description: LocalizedText |
3998
|
|
|
:ivar WriteMask: |
3999
|
|
|
:vartype WriteMask: UInt32 |
4000
|
|
|
:ivar UserWriteMask: |
4001
|
|
|
:vartype UserWriteMask: UInt32 |
4002
|
|
|
:ivar Executable: |
4003
|
|
|
:vartype Executable: Boolean |
4004
|
|
|
:ivar UserExecutable: |
4005
|
|
|
:vartype UserExecutable: Boolean |
4006
|
|
|
''' |
4007
|
1 |
|
def __init__(self, binary=None): |
4008
|
1 |
|
if binary is not None: |
4009
|
|
|
self._binary_init(binary) |
4010
|
|
|
self._freeze = True |
4011
|
|
|
return |
4012
|
1 |
|
self.SpecifiedAttributes = 0 |
4013
|
1 |
|
self.DisplayName = LocalizedText() |
4014
|
1 |
|
self.Description = LocalizedText() |
4015
|
1 |
|
self.WriteMask = 0 |
4016
|
1 |
|
self.UserWriteMask = 0 |
4017
|
1 |
|
self.Executable = True |
4018
|
1 |
|
self.UserExecutable = True |
4019
|
1 |
|
self._freeze = True |
4020
|
|
|
|
4021
|
1 |
|
def to_binary(self): |
4022
|
|
|
packet = [] |
4023
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4024
|
|
|
packet.append(self.DisplayName.to_binary()) |
4025
|
|
|
packet.append(self.Description.to_binary()) |
4026
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4027
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4028
|
|
|
packet.append(uatype_Boolean.pack(self.Executable)) |
4029
|
|
|
packet.append(uatype_Boolean.pack(self.UserExecutable)) |
4030
|
|
|
return b''.join(packet) |
4031
|
|
|
|
4032
|
1 |
|
@staticmethod |
4033
|
|
|
def from_binary(data): |
4034
|
|
|
return MethodAttributes(data) |
4035
|
|
|
|
4036
|
1 |
|
def _binary_init(self, data): |
4037
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4038
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4039
|
|
|
self.Description = LocalizedText.from_binary(data) |
4040
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4041
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4042
|
|
|
self.Executable = uatype_Boolean.unpack(data.read(1))[0] |
4043
|
|
|
self.UserExecutable = uatype_Boolean.unpack(data.read(1))[0] |
4044
|
|
|
|
4045
|
1 |
|
def __str__(self): |
4046
|
|
|
return 'MethodAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4047
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4048
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4049
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4050
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4051
|
|
|
'Executable:' + str(self.Executable) + ', ' + \ |
4052
|
|
|
'UserExecutable:' + str(self.UserExecutable) + ')' |
4053
|
|
|
|
4054
|
1 |
|
__repr__ = __str__ |
4055
|
|
|
|
4056
|
|
|
|
4057
|
1 |
|
class ObjectTypeAttributes(FrozenClass): |
4058
|
|
|
''' |
4059
|
|
|
The attributes for an object type node. |
4060
|
|
|
|
4061
|
|
|
:ivar SpecifiedAttributes: |
4062
|
|
|
:vartype SpecifiedAttributes: UInt32 |
4063
|
|
|
:ivar DisplayName: |
4064
|
|
|
:vartype DisplayName: LocalizedText |
4065
|
|
|
:ivar Description: |
4066
|
|
|
:vartype Description: LocalizedText |
4067
|
|
|
:ivar WriteMask: |
4068
|
|
|
:vartype WriteMask: UInt32 |
4069
|
|
|
:ivar UserWriteMask: |
4070
|
|
|
:vartype UserWriteMask: UInt32 |
4071
|
|
|
:ivar IsAbstract: |
4072
|
|
|
:vartype IsAbstract: Boolean |
4073
|
|
|
''' |
4074
|
1 |
|
def __init__(self, binary=None): |
4075
|
1 |
|
if binary is not None: |
4076
|
|
|
self._binary_init(binary) |
4077
|
|
|
self._freeze = True |
4078
|
|
|
return |
4079
|
1 |
|
self.SpecifiedAttributes = 0 |
4080
|
1 |
|
self.DisplayName = LocalizedText() |
4081
|
1 |
|
self.Description = LocalizedText() |
4082
|
1 |
|
self.WriteMask = 0 |
4083
|
1 |
|
self.UserWriteMask = 0 |
4084
|
1 |
|
self.IsAbstract = True |
4085
|
1 |
|
self._freeze = True |
4086
|
|
|
|
4087
|
1 |
|
def to_binary(self): |
4088
|
|
|
packet = [] |
4089
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4090
|
|
|
packet.append(self.DisplayName.to_binary()) |
4091
|
|
|
packet.append(self.Description.to_binary()) |
4092
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4093
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4094
|
|
|
packet.append(uatype_Boolean.pack(self.IsAbstract)) |
4095
|
|
|
return b''.join(packet) |
4096
|
|
|
|
4097
|
1 |
|
@staticmethod |
4098
|
|
|
def from_binary(data): |
4099
|
|
|
return ObjectTypeAttributes(data) |
4100
|
|
|
|
4101
|
1 |
|
def _binary_init(self, data): |
4102
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4103
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4104
|
|
|
self.Description = LocalizedText.from_binary(data) |
4105
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4106
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4107
|
|
|
self.IsAbstract = uatype_Boolean.unpack(data.read(1))[0] |
4108
|
|
|
|
4109
|
1 |
|
def __str__(self): |
4110
|
|
|
return 'ObjectTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4111
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4112
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4113
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4114
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4115
|
|
|
'IsAbstract:' + str(self.IsAbstract) + ')' |
4116
|
|
|
|
4117
|
1 |
|
__repr__ = __str__ |
4118
|
|
|
|
4119
|
|
|
|
4120
|
1 |
|
class VariableTypeAttributes(FrozenClass): |
4121
|
|
|
''' |
4122
|
|
|
The attributes for a variable type node. |
4123
|
|
|
|
4124
|
|
|
:ivar SpecifiedAttributes: |
4125
|
|
|
:vartype SpecifiedAttributes: UInt32 |
4126
|
|
|
:ivar DisplayName: |
4127
|
|
|
:vartype DisplayName: LocalizedText |
4128
|
|
|
:ivar Description: |
4129
|
|
|
:vartype Description: LocalizedText |
4130
|
|
|
:ivar WriteMask: |
4131
|
|
|
:vartype WriteMask: UInt32 |
4132
|
|
|
:ivar UserWriteMask: |
4133
|
|
|
:vartype UserWriteMask: UInt32 |
4134
|
|
|
:ivar Value: |
4135
|
|
|
:vartype Value: Variant |
4136
|
|
|
:ivar DataType: |
4137
|
|
|
:vartype DataType: NodeId |
4138
|
|
|
:ivar ValueRank: |
4139
|
|
|
:vartype ValueRank: Int32 |
4140
|
|
|
:ivar ArrayDimensions: |
4141
|
|
|
:vartype ArrayDimensions: UInt32 |
4142
|
|
|
:ivar IsAbstract: |
4143
|
|
|
:vartype IsAbstract: Boolean |
4144
|
|
|
''' |
4145
|
1 |
|
def __init__(self, binary=None): |
4146
|
1 |
|
if binary is not None: |
4147
|
|
|
self._binary_init(binary) |
4148
|
|
|
self._freeze = True |
4149
|
|
|
return |
4150
|
1 |
|
self.SpecifiedAttributes = 0 |
4151
|
1 |
|
self.DisplayName = LocalizedText() |
4152
|
1 |
|
self.Description = LocalizedText() |
4153
|
1 |
|
self.WriteMask = 0 |
4154
|
1 |
|
self.UserWriteMask = 0 |
4155
|
1 |
|
self.Value = Variant() |
4156
|
1 |
|
self.DataType = NodeId() |
4157
|
1 |
|
self.ValueRank = 0 |
4158
|
1 |
|
self.ArrayDimensions = [] |
4159
|
1 |
|
self.IsAbstract = True |
4160
|
1 |
|
self._freeze = True |
4161
|
|
|
|
4162
|
1 |
|
def to_binary(self): |
4163
|
|
|
packet = [] |
4164
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4165
|
|
|
packet.append(self.DisplayName.to_binary()) |
4166
|
|
|
packet.append(self.Description.to_binary()) |
4167
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4168
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4169
|
|
|
packet.append(self.Value.to_binary()) |
4170
|
|
|
packet.append(self.DataType.to_binary()) |
4171
|
|
|
packet.append(uatype_Int32.pack(self.ValueRank)) |
4172
|
|
|
packet.append(uatype_Int32.pack(len(self.ArrayDimensions))) |
4173
|
|
|
for fieldname in self.ArrayDimensions: |
4174
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
4175
|
|
|
packet.append(uatype_Boolean.pack(self.IsAbstract)) |
4176
|
|
|
return b''.join(packet) |
4177
|
|
|
|
4178
|
1 |
|
@staticmethod |
4179
|
|
|
def from_binary(data): |
4180
|
|
|
return VariableTypeAttributes(data) |
4181
|
|
|
|
4182
|
1 |
|
def _binary_init(self, data): |
4183
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4184
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4185
|
|
|
self.Description = LocalizedText.from_binary(data) |
4186
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4187
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4188
|
|
|
self.Value = Variant.from_binary(data) |
4189
|
|
|
self.DataType = NodeId.from_binary(data) |
4190
|
|
|
self.ValueRank = uatype_Int32.unpack(data.read(4))[0] |
4191
|
|
|
self.ArrayDimensions = unpack_uatype_array('UInt32', data) |
4192
|
|
|
self.IsAbstract = uatype_Boolean.unpack(data.read(1))[0] |
4193
|
|
|
|
4194
|
1 |
|
def __str__(self): |
4195
|
|
|
return 'VariableTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4196
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4197
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4198
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4199
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4200
|
|
|
'Value:' + str(self.Value) + ', ' + \ |
4201
|
|
|
'DataType:' + str(self.DataType) + ', ' + \ |
4202
|
|
|
'ValueRank:' + str(self.ValueRank) + ', ' + \ |
4203
|
|
|
'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ |
4204
|
|
|
'IsAbstract:' + str(self.IsAbstract) + ')' |
4205
|
|
|
|
4206
|
1 |
|
__repr__ = __str__ |
4207
|
|
|
|
4208
|
|
|
|
4209
|
1 |
|
class ReferenceTypeAttributes(FrozenClass): |
4210
|
|
|
''' |
4211
|
|
|
The attributes for a reference type node. |
4212
|
|
|
|
4213
|
|
|
:ivar SpecifiedAttributes: |
4214
|
|
|
:vartype SpecifiedAttributes: UInt32 |
4215
|
|
|
:ivar DisplayName: |
4216
|
|
|
:vartype DisplayName: LocalizedText |
4217
|
|
|
:ivar Description: |
4218
|
|
|
:vartype Description: LocalizedText |
4219
|
|
|
:ivar WriteMask: |
4220
|
|
|
:vartype WriteMask: UInt32 |
4221
|
|
|
:ivar UserWriteMask: |
4222
|
|
|
:vartype UserWriteMask: UInt32 |
4223
|
|
|
:ivar IsAbstract: |
4224
|
|
|
:vartype IsAbstract: Boolean |
4225
|
|
|
:ivar Symmetric: |
4226
|
|
|
:vartype Symmetric: Boolean |
4227
|
|
|
:ivar InverseName: |
4228
|
|
|
:vartype InverseName: LocalizedText |
4229
|
|
|
''' |
4230
|
1 |
|
def __init__(self, binary=None): |
4231
|
1 |
|
if binary is not None: |
4232
|
|
|
self._binary_init(binary) |
4233
|
|
|
self._freeze = True |
4234
|
|
|
return |
4235
|
1 |
|
self.SpecifiedAttributes = 0 |
4236
|
1 |
|
self.DisplayName = LocalizedText() |
4237
|
1 |
|
self.Description = LocalizedText() |
4238
|
1 |
|
self.WriteMask = 0 |
4239
|
1 |
|
self.UserWriteMask = 0 |
4240
|
1 |
|
self.IsAbstract = True |
4241
|
1 |
|
self.Symmetric = True |
4242
|
1 |
|
self.InverseName = LocalizedText() |
4243
|
1 |
|
self._freeze = True |
4244
|
|
|
|
4245
|
1 |
|
def to_binary(self): |
4246
|
|
|
packet = [] |
4247
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4248
|
|
|
packet.append(self.DisplayName.to_binary()) |
4249
|
|
|
packet.append(self.Description.to_binary()) |
4250
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4251
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4252
|
|
|
packet.append(uatype_Boolean.pack(self.IsAbstract)) |
4253
|
|
|
packet.append(uatype_Boolean.pack(self.Symmetric)) |
4254
|
|
|
packet.append(self.InverseName.to_binary()) |
4255
|
|
|
return b''.join(packet) |
4256
|
|
|
|
4257
|
1 |
|
@staticmethod |
4258
|
|
|
def from_binary(data): |
4259
|
|
|
return ReferenceTypeAttributes(data) |
4260
|
|
|
|
4261
|
1 |
|
def _binary_init(self, data): |
4262
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4263
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4264
|
|
|
self.Description = LocalizedText.from_binary(data) |
4265
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4266
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4267
|
|
|
self.IsAbstract = uatype_Boolean.unpack(data.read(1))[0] |
4268
|
|
|
self.Symmetric = uatype_Boolean.unpack(data.read(1))[0] |
4269
|
|
|
self.InverseName = LocalizedText.from_binary(data) |
4270
|
|
|
|
4271
|
1 |
|
def __str__(self): |
4272
|
|
|
return 'ReferenceTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4273
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4274
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4275
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4276
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4277
|
|
|
'IsAbstract:' + str(self.IsAbstract) + ', ' + \ |
4278
|
|
|
'Symmetric:' + str(self.Symmetric) + ', ' + \ |
4279
|
|
|
'InverseName:' + str(self.InverseName) + ')' |
4280
|
|
|
|
4281
|
1 |
|
__repr__ = __str__ |
4282
|
|
|
|
4283
|
|
|
|
4284
|
1 |
|
class DataTypeAttributes(FrozenClass): |
4285
|
|
|
''' |
4286
|
|
|
The attributes for a data type node. |
4287
|
|
|
|
4288
|
|
|
:ivar SpecifiedAttributes: |
4289
|
|
|
:vartype SpecifiedAttributes: UInt32 |
4290
|
|
|
:ivar DisplayName: |
4291
|
|
|
:vartype DisplayName: LocalizedText |
4292
|
|
|
:ivar Description: |
4293
|
|
|
:vartype Description: LocalizedText |
4294
|
|
|
:ivar WriteMask: |
4295
|
|
|
:vartype WriteMask: UInt32 |
4296
|
|
|
:ivar UserWriteMask: |
4297
|
|
|
:vartype UserWriteMask: UInt32 |
4298
|
|
|
:ivar IsAbstract: |
4299
|
|
|
:vartype IsAbstract: Boolean |
4300
|
|
|
''' |
4301
|
1 |
|
def __init__(self, binary=None): |
4302
|
1 |
|
if binary is not None: |
4303
|
|
|
self._binary_init(binary) |
4304
|
|
|
self._freeze = True |
4305
|
|
|
return |
4306
|
1 |
|
self.SpecifiedAttributes = 0 |
4307
|
1 |
|
self.DisplayName = LocalizedText() |
4308
|
1 |
|
self.Description = LocalizedText() |
4309
|
1 |
|
self.WriteMask = 0 |
4310
|
1 |
|
self.UserWriteMask = 0 |
4311
|
1 |
|
self.IsAbstract = True |
4312
|
1 |
|
self._freeze = True |
4313
|
|
|
|
4314
|
1 |
|
def to_binary(self): |
4315
|
|
|
packet = [] |
4316
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4317
|
|
|
packet.append(self.DisplayName.to_binary()) |
4318
|
|
|
packet.append(self.Description.to_binary()) |
4319
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4320
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4321
|
|
|
packet.append(uatype_Boolean.pack(self.IsAbstract)) |
4322
|
|
|
return b''.join(packet) |
4323
|
|
|
|
4324
|
1 |
|
@staticmethod |
4325
|
|
|
def from_binary(data): |
4326
|
|
|
return DataTypeAttributes(data) |
4327
|
|
|
|
4328
|
1 |
|
def _binary_init(self, data): |
4329
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4330
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4331
|
|
|
self.Description = LocalizedText.from_binary(data) |
4332
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4333
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4334
|
|
|
self.IsAbstract = uatype_Boolean.unpack(data.read(1))[0] |
4335
|
|
|
|
4336
|
1 |
|
def __str__(self): |
4337
|
|
|
return 'DataTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4338
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4339
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4340
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4341
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4342
|
|
|
'IsAbstract:' + str(self.IsAbstract) + ')' |
4343
|
|
|
|
4344
|
1 |
|
__repr__ = __str__ |
4345
|
|
|
|
4346
|
|
|
|
4347
|
1 |
|
class ViewAttributes(FrozenClass): |
4348
|
|
|
''' |
4349
|
|
|
The attributes for a view node. |
4350
|
|
|
|
4351
|
|
|
:ivar SpecifiedAttributes: |
4352
|
|
|
:vartype SpecifiedAttributes: UInt32 |
4353
|
|
|
:ivar DisplayName: |
4354
|
|
|
:vartype DisplayName: LocalizedText |
4355
|
|
|
:ivar Description: |
4356
|
|
|
:vartype Description: LocalizedText |
4357
|
|
|
:ivar WriteMask: |
4358
|
|
|
:vartype WriteMask: UInt32 |
4359
|
|
|
:ivar UserWriteMask: |
4360
|
|
|
:vartype UserWriteMask: UInt32 |
4361
|
|
|
:ivar ContainsNoLoops: |
4362
|
|
|
:vartype ContainsNoLoops: Boolean |
4363
|
|
|
:ivar EventNotifier: |
4364
|
|
|
:vartype EventNotifier: Byte |
4365
|
|
|
''' |
4366
|
1 |
|
def __init__(self, binary=None): |
4367
|
|
|
if binary is not None: |
4368
|
|
|
self._binary_init(binary) |
4369
|
|
|
self._freeze = True |
4370
|
|
|
return |
4371
|
|
|
self.SpecifiedAttributes = 0 |
4372
|
|
|
self.DisplayName = LocalizedText() |
4373
|
|
|
self.Description = LocalizedText() |
4374
|
|
|
self.WriteMask = 0 |
4375
|
|
|
self.UserWriteMask = 0 |
4376
|
|
|
self.ContainsNoLoops = True |
4377
|
|
|
self.EventNotifier = 0 |
4378
|
|
|
self._freeze = True |
4379
|
|
|
|
4380
|
1 |
|
def to_binary(self): |
4381
|
|
|
packet = [] |
4382
|
|
|
packet.append(uatype_UInt32.pack(self.SpecifiedAttributes)) |
4383
|
|
|
packet.append(self.DisplayName.to_binary()) |
4384
|
|
|
packet.append(self.Description.to_binary()) |
4385
|
|
|
packet.append(uatype_UInt32.pack(self.WriteMask)) |
4386
|
|
|
packet.append(uatype_UInt32.pack(self.UserWriteMask)) |
4387
|
|
|
packet.append(uatype_Boolean.pack(self.ContainsNoLoops)) |
4388
|
|
|
packet.append(uatype_Byte.pack(self.EventNotifier)) |
4389
|
|
|
return b''.join(packet) |
4390
|
|
|
|
4391
|
1 |
|
@staticmethod |
4392
|
|
|
def from_binary(data): |
4393
|
|
|
return ViewAttributes(data) |
4394
|
|
|
|
4395
|
1 |
|
def _binary_init(self, data): |
4396
|
|
|
self.SpecifiedAttributes = uatype_UInt32.unpack(data.read(4))[0] |
4397
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
4398
|
|
|
self.Description = LocalizedText.from_binary(data) |
4399
|
|
|
self.WriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4400
|
|
|
self.UserWriteMask = uatype_UInt32.unpack(data.read(4))[0] |
4401
|
|
|
self.ContainsNoLoops = uatype_Boolean.unpack(data.read(1))[0] |
4402
|
|
|
self.EventNotifier = uatype_Byte.unpack(data.read(1))[0] |
4403
|
|
|
|
4404
|
1 |
|
def __str__(self): |
4405
|
|
|
return 'ViewAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
4406
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
4407
|
|
|
'Description:' + str(self.Description) + ', ' + \ |
4408
|
|
|
'WriteMask:' + str(self.WriteMask) + ', ' + \ |
4409
|
|
|
'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
4410
|
|
|
'ContainsNoLoops:' + str(self.ContainsNoLoops) + ', ' + \ |
4411
|
|
|
'EventNotifier:' + str(self.EventNotifier) + ')' |
4412
|
|
|
|
4413
|
1 |
|
__repr__ = __str__ |
4414
|
|
|
|
4415
|
|
|
|
4416
|
1 |
|
class AddNodesItem(FrozenClass): |
4417
|
|
|
''' |
4418
|
|
|
A request to add a node to the server address space. |
4419
|
|
|
|
4420
|
|
|
:ivar ParentNodeId: |
4421
|
|
|
:vartype ParentNodeId: ExpandedNodeId |
4422
|
|
|
:ivar ReferenceTypeId: |
4423
|
|
|
:vartype ReferenceTypeId: NodeId |
4424
|
|
|
:ivar RequestedNewNodeId: |
4425
|
|
|
:vartype RequestedNewNodeId: ExpandedNodeId |
4426
|
|
|
:ivar BrowseName: |
4427
|
|
|
:vartype BrowseName: QualifiedName |
4428
|
|
|
:ivar NodeClass: |
4429
|
|
|
:vartype NodeClass: NodeClass |
4430
|
|
|
:ivar NodeAttributes: |
4431
|
|
|
:vartype NodeAttributes: ExtensionObject |
4432
|
|
|
:ivar TypeDefinition: |
4433
|
|
|
:vartype TypeDefinition: ExpandedNodeId |
4434
|
|
|
''' |
4435
|
1 |
|
def __init__(self, binary=None): |
4436
|
1 |
|
if binary is not None: |
4437
|
1 |
|
self._binary_init(binary) |
4438
|
1 |
|
self._freeze = True |
4439
|
1 |
|
return |
4440
|
1 |
|
self.ParentNodeId = ExpandedNodeId() |
4441
|
1 |
|
self.ReferenceTypeId = NodeId() |
4442
|
1 |
|
self.RequestedNewNodeId = ExpandedNodeId() |
4443
|
1 |
|
self.BrowseName = QualifiedName() |
4444
|
1 |
|
self.NodeClass = NodeClass(0) |
4445
|
1 |
|
self.NodeAttributes = None |
4446
|
1 |
|
self.TypeDefinition = ExpandedNodeId() |
4447
|
1 |
|
self._freeze = True |
4448
|
|
|
|
4449
|
1 |
|
def to_binary(self): |
4450
|
1 |
|
packet = [] |
4451
|
1 |
|
packet.append(self.ParentNodeId.to_binary()) |
4452
|
1 |
|
packet.append(self.ReferenceTypeId.to_binary()) |
4453
|
1 |
|
packet.append(self.RequestedNewNodeId.to_binary()) |
4454
|
1 |
|
packet.append(self.BrowseName.to_binary()) |
4455
|
1 |
|
packet.append(uatype_UInt32.pack(self.NodeClass.value)) |
4456
|
1 |
|
packet.append(extensionobject_to_binary(self.NodeAttributes)) |
4457
|
1 |
|
packet.append(self.TypeDefinition.to_binary()) |
4458
|
1 |
|
return b''.join(packet) |
4459
|
|
|
|
4460
|
1 |
|
@staticmethod |
4461
|
|
|
def from_binary(data): |
4462
|
1 |
|
return AddNodesItem(data) |
4463
|
|
|
|
4464
|
1 |
|
def _binary_init(self, data): |
4465
|
1 |
|
self.ParentNodeId = ExpandedNodeId.from_binary(data) |
4466
|
1 |
|
self.ReferenceTypeId = NodeId.from_binary(data) |
4467
|
1 |
|
self.RequestedNewNodeId = ExpandedNodeId.from_binary(data) |
4468
|
1 |
|
self.BrowseName = QualifiedName.from_binary(data) |
4469
|
1 |
|
self.NodeClass = NodeClass(uatype_UInt32.unpack(data.read(4))[0]) |
4470
|
1 |
|
self.NodeAttributes = extensionobject_from_binary(data) |
4471
|
1 |
|
self.TypeDefinition = ExpandedNodeId.from_binary(data) |
4472
|
|
|
|
4473
|
1 |
|
def __str__(self): |
4474
|
|
|
return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \ |
4475
|
|
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
4476
|
|
|
'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \ |
4477
|
|
|
'BrowseName:' + str(self.BrowseName) + ', ' + \ |
4478
|
|
|
'NodeClass:' + str(self.NodeClass) + ', ' + \ |
4479
|
|
|
'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \ |
4480
|
|
|
'TypeDefinition:' + str(self.TypeDefinition) + ')' |
4481
|
|
|
|
4482
|
1 |
|
__repr__ = __str__ |
4483
|
|
|
|
4484
|
|
|
|
4485
|
1 |
|
class AddNodesResult(FrozenClass): |
4486
|
|
|
''' |
4487
|
|
|
A result of an add node operation. |
4488
|
|
|
|
4489
|
|
|
:ivar StatusCode: |
4490
|
|
|
:vartype StatusCode: StatusCode |
4491
|
|
|
:ivar AddedNodeId: |
4492
|
|
|
:vartype AddedNodeId: NodeId |
4493
|
|
|
''' |
4494
|
1 |
|
def __init__(self, binary=None): |
4495
|
1 |
|
if binary is not None: |
4496
|
1 |
|
self._binary_init(binary) |
4497
|
1 |
|
self._freeze = True |
4498
|
1 |
|
return |
4499
|
1 |
|
self.StatusCode = StatusCode() |
4500
|
1 |
|
self.AddedNodeId = NodeId() |
4501
|
1 |
|
self._freeze = True |
4502
|
|
|
|
4503
|
1 |
|
def to_binary(self): |
4504
|
1 |
|
packet = [] |
4505
|
1 |
|
packet.append(self.StatusCode.to_binary()) |
4506
|
1 |
|
packet.append(self.AddedNodeId.to_binary()) |
4507
|
1 |
|
return b''.join(packet) |
4508
|
|
|
|
4509
|
1 |
|
@staticmethod |
4510
|
|
|
def from_binary(data): |
4511
|
1 |
|
return AddNodesResult(data) |
4512
|
|
|
|
4513
|
1 |
|
def _binary_init(self, data): |
4514
|
1 |
|
self.StatusCode = StatusCode.from_binary(data) |
4515
|
1 |
|
self.AddedNodeId = NodeId.from_binary(data) |
4516
|
|
|
|
4517
|
1 |
|
def __str__(self): |
4518
|
|
|
return 'AddNodesResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
4519
|
|
|
'AddedNodeId:' + str(self.AddedNodeId) + ')' |
4520
|
|
|
|
4521
|
1 |
|
__repr__ = __str__ |
4522
|
|
|
|
4523
|
|
|
|
4524
|
1 |
|
class AddNodesParameters(FrozenClass): |
4525
|
|
|
''' |
4526
|
|
|
:ivar NodesToAdd: |
4527
|
|
|
:vartype NodesToAdd: AddNodesItem |
4528
|
|
|
''' |
4529
|
1 |
|
def __init__(self, binary=None): |
4530
|
1 |
|
if binary is not None: |
4531
|
1 |
|
self._binary_init(binary) |
4532
|
1 |
|
self._freeze = True |
4533
|
1 |
|
return |
4534
|
1 |
|
self.NodesToAdd = [] |
4535
|
1 |
|
self._freeze = True |
4536
|
|
|
|
4537
|
1 |
|
def to_binary(self): |
4538
|
1 |
|
packet = [] |
4539
|
1 |
|
packet.append(uatype_Int32.pack(len(self.NodesToAdd))) |
4540
|
1 |
|
for fieldname in self.NodesToAdd: |
4541
|
1 |
|
packet.append(fieldname.to_binary()) |
4542
|
1 |
|
return b''.join(packet) |
4543
|
|
|
|
4544
|
1 |
|
@staticmethod |
4545
|
|
|
def from_binary(data): |
4546
|
1 |
|
return AddNodesParameters(data) |
4547
|
|
|
|
4548
|
1 |
|
def _binary_init(self, data): |
4549
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
4550
|
1 |
|
array = [] |
4551
|
1 |
|
if length != -1: |
4552
|
1 |
|
for _ in range(0, length): |
4553
|
1 |
|
array.append(AddNodesItem.from_binary(data)) |
4554
|
1 |
|
self.NodesToAdd = array |
4555
|
|
|
|
4556
|
1 |
|
def __str__(self): |
4557
|
|
|
return 'AddNodesParameters(' + 'NodesToAdd:' + str(self.NodesToAdd) + ')' |
4558
|
|
|
|
4559
|
1 |
|
__repr__ = __str__ |
4560
|
|
|
|
4561
|
|
|
|
4562
|
1 |
|
class AddNodesRequest(FrozenClass): |
4563
|
|
|
''' |
4564
|
|
|
Adds one or more nodes to the server address space. |
4565
|
|
|
|
4566
|
|
|
:ivar TypeId: |
4567
|
|
|
:vartype TypeId: NodeId |
4568
|
|
|
:ivar RequestHeader: |
4569
|
|
|
:vartype RequestHeader: RequestHeader |
4570
|
|
|
:ivar Parameters: |
4571
|
|
|
:vartype Parameters: AddNodesParameters |
4572
|
|
|
''' |
4573
|
1 |
|
def __init__(self, binary=None): |
4574
|
1 |
|
if binary is not None: |
4575
|
|
|
self._binary_init(binary) |
4576
|
|
|
self._freeze = True |
4577
|
|
|
return |
4578
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary) |
4579
|
1 |
|
self.RequestHeader = RequestHeader() |
4580
|
1 |
|
self.Parameters = AddNodesParameters() |
4581
|
1 |
|
self._freeze = True |
4582
|
|
|
|
4583
|
1 |
|
def to_binary(self): |
4584
|
1 |
|
packet = [] |
4585
|
1 |
|
packet.append(self.TypeId.to_binary()) |
4586
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
4587
|
1 |
|
packet.append(self.Parameters.to_binary()) |
4588
|
1 |
|
return b''.join(packet) |
4589
|
|
|
|
4590
|
1 |
|
@staticmethod |
4591
|
|
|
def from_binary(data): |
4592
|
|
|
return AddNodesRequest(data) |
4593
|
|
|
|
4594
|
1 |
|
def _binary_init(self, data): |
4595
|
|
|
self.TypeId = NodeId.from_binary(data) |
4596
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
4597
|
|
|
self.Parameters = AddNodesParameters.from_binary(data) |
4598
|
|
|
|
4599
|
1 |
|
def __str__(self): |
4600
|
|
|
return 'AddNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
4601
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
4602
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
4603
|
|
|
|
4604
|
1 |
|
__repr__ = __str__ |
4605
|
|
|
|
4606
|
|
|
|
4607
|
1 |
|
class AddNodesResponse(FrozenClass): |
4608
|
|
|
''' |
4609
|
|
|
Adds one or more nodes to the server address space. |
4610
|
|
|
|
4611
|
|
|
:ivar TypeId: |
4612
|
|
|
:vartype TypeId: NodeId |
4613
|
|
|
:ivar ResponseHeader: |
4614
|
|
|
:vartype ResponseHeader: ResponseHeader |
4615
|
|
|
:ivar Results: |
4616
|
|
|
:vartype Results: AddNodesResult |
4617
|
|
|
:ivar DiagnosticInfos: |
4618
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
4619
|
|
|
''' |
4620
|
1 |
|
def __init__(self, binary=None): |
4621
|
1 |
|
if binary is not None: |
4622
|
1 |
|
self._binary_init(binary) |
4623
|
1 |
|
self._freeze = True |
4624
|
1 |
|
return |
4625
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary) |
4626
|
1 |
|
self.ResponseHeader = ResponseHeader() |
4627
|
1 |
|
self.Results = [] |
4628
|
1 |
|
self.DiagnosticInfos = [] |
4629
|
1 |
|
self._freeze = True |
4630
|
|
|
|
4631
|
1 |
|
def to_binary(self): |
4632
|
1 |
|
packet = [] |
4633
|
1 |
|
packet.append(self.TypeId.to_binary()) |
4634
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
4635
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
4636
|
1 |
|
for fieldname in self.Results: |
4637
|
1 |
|
packet.append(fieldname.to_binary()) |
4638
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
4639
|
1 |
|
for fieldname in self.DiagnosticInfos: |
4640
|
|
|
packet.append(fieldname.to_binary()) |
4641
|
1 |
|
return b''.join(packet) |
4642
|
|
|
|
4643
|
1 |
|
@staticmethod |
4644
|
|
|
def from_binary(data): |
4645
|
1 |
|
return AddNodesResponse(data) |
4646
|
|
|
|
4647
|
1 |
|
def _binary_init(self, data): |
4648
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
4649
|
1 |
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
4650
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
4651
|
1 |
|
array = [] |
4652
|
1 |
|
if length != -1: |
4653
|
1 |
|
for _ in range(0, length): |
4654
|
1 |
|
array.append(AddNodesResult.from_binary(data)) |
4655
|
1 |
|
self.Results = array |
4656
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
4657
|
1 |
|
array = [] |
4658
|
1 |
|
if length != -1: |
4659
|
1 |
|
for _ in range(0, length): |
4660
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
4661
|
1 |
|
self.DiagnosticInfos = array |
4662
|
|
|
|
4663
|
1 |
|
def __str__(self): |
4664
|
|
|
return 'AddNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
4665
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
4666
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
4667
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
4668
|
|
|
|
4669
|
1 |
|
__repr__ = __str__ |
4670
|
|
|
|
4671
|
|
|
|
4672
|
1 |
|
class AddReferencesItem(FrozenClass): |
4673
|
|
|
''' |
4674
|
|
|
A request to add a reference to the server address space. |
4675
|
|
|
|
4676
|
|
|
:ivar SourceNodeId: |
4677
|
|
|
:vartype SourceNodeId: NodeId |
4678
|
|
|
:ivar ReferenceTypeId: |
4679
|
|
|
:vartype ReferenceTypeId: NodeId |
4680
|
|
|
:ivar IsForward: |
4681
|
|
|
:vartype IsForward: Boolean |
4682
|
|
|
:ivar TargetServerUri: |
4683
|
|
|
:vartype TargetServerUri: String |
4684
|
|
|
:ivar TargetNodeId: |
4685
|
|
|
:vartype TargetNodeId: ExpandedNodeId |
4686
|
|
|
:ivar TargetNodeClass: |
4687
|
|
|
:vartype TargetNodeClass: NodeClass |
4688
|
|
|
''' |
4689
|
1 |
|
def __init__(self, binary=None): |
4690
|
1 |
|
if binary is not None: |
4691
|
|
|
self._binary_init(binary) |
4692
|
|
|
self._freeze = True |
4693
|
|
|
return |
4694
|
1 |
|
self.SourceNodeId = NodeId() |
4695
|
1 |
|
self.ReferenceTypeId = NodeId() |
4696
|
1 |
|
self.IsForward = True |
4697
|
1 |
|
self.TargetServerUri = '' |
4698
|
1 |
|
self.TargetNodeId = ExpandedNodeId() |
4699
|
1 |
|
self.TargetNodeClass = NodeClass(0) |
4700
|
1 |
|
self._freeze = True |
4701
|
|
|
|
4702
|
1 |
|
def to_binary(self): |
4703
|
|
|
packet = [] |
4704
|
|
|
packet.append(self.SourceNodeId.to_binary()) |
4705
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
4706
|
|
|
packet.append(uatype_Boolean.pack(self.IsForward)) |
4707
|
|
|
packet.append(pack_string(self.TargetServerUri)) |
4708
|
|
|
packet.append(self.TargetNodeId.to_binary()) |
4709
|
|
|
packet.append(uatype_UInt32.pack(self.TargetNodeClass.value)) |
4710
|
|
|
return b''.join(packet) |
4711
|
|
|
|
4712
|
1 |
|
@staticmethod |
4713
|
|
|
def from_binary(data): |
4714
|
|
|
return AddReferencesItem(data) |
4715
|
|
|
|
4716
|
1 |
|
def _binary_init(self, data): |
4717
|
|
|
self.SourceNodeId = NodeId.from_binary(data) |
4718
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
4719
|
|
|
self.IsForward = uatype_Boolean.unpack(data.read(1))[0] |
4720
|
|
|
self.TargetServerUri = unpack_string(data) |
4721
|
|
|
self.TargetNodeId = ExpandedNodeId.from_binary(data) |
4722
|
|
|
self.TargetNodeClass = NodeClass(uatype_UInt32.unpack(data.read(4))[0]) |
4723
|
|
|
|
4724
|
1 |
|
def __str__(self): |
4725
|
|
|
return 'AddReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \ |
4726
|
|
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
4727
|
|
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
4728
|
|
|
'TargetServerUri:' + str(self.TargetServerUri) + ', ' + \ |
4729
|
|
|
'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \ |
4730
|
|
|
'TargetNodeClass:' + str(self.TargetNodeClass) + ')' |
4731
|
|
|
|
4732
|
1 |
|
__repr__ = __str__ |
4733
|
|
|
|
4734
|
|
|
|
4735
|
1 |
|
class AddReferencesRequest(FrozenClass): |
4736
|
|
|
''' |
4737
|
|
|
Adds one or more references to the server address space. |
4738
|
|
|
|
4739
|
|
|
:ivar TypeId: |
4740
|
|
|
:vartype TypeId: NodeId |
4741
|
|
|
:ivar RequestHeader: |
4742
|
|
|
:vartype RequestHeader: RequestHeader |
4743
|
|
|
:ivar ReferencesToAdd: |
4744
|
|
|
:vartype ReferencesToAdd: AddReferencesItem |
4745
|
|
|
''' |
4746
|
1 |
|
def __init__(self, binary=None): |
4747
|
|
|
if binary is not None: |
4748
|
|
|
self._binary_init(binary) |
4749
|
|
|
self._freeze = True |
4750
|
|
|
return |
4751
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary) |
4752
|
|
|
self.RequestHeader = RequestHeader() |
4753
|
|
|
self.ReferencesToAdd = [] |
4754
|
|
|
self._freeze = True |
4755
|
|
|
|
4756
|
1 |
|
def to_binary(self): |
4757
|
|
|
packet = [] |
4758
|
|
|
packet.append(self.TypeId.to_binary()) |
4759
|
|
|
packet.append(self.RequestHeader.to_binary()) |
4760
|
|
|
packet.append(uatype_Int32.pack(len(self.ReferencesToAdd))) |
4761
|
|
|
for fieldname in self.ReferencesToAdd: |
4762
|
|
|
packet.append(fieldname.to_binary()) |
4763
|
|
|
return b''.join(packet) |
4764
|
|
|
|
4765
|
1 |
|
@staticmethod |
4766
|
|
|
def from_binary(data): |
4767
|
|
|
return AddReferencesRequest(data) |
4768
|
|
|
|
4769
|
1 |
|
def _binary_init(self, data): |
4770
|
|
|
self.TypeId = NodeId.from_binary(data) |
4771
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
4772
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
4773
|
|
|
array = [] |
4774
|
|
|
if length != -1: |
4775
|
|
|
for _ in range(0, length): |
4776
|
|
|
array.append(AddReferencesItem.from_binary(data)) |
4777
|
|
|
self.ReferencesToAdd = array |
4778
|
|
|
|
4779
|
1 |
|
def __str__(self): |
4780
|
|
|
return 'AddReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
4781
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
4782
|
|
|
'ReferencesToAdd:' + str(self.ReferencesToAdd) + ')' |
4783
|
|
|
|
4784
|
1 |
|
__repr__ = __str__ |
4785
|
|
|
|
4786
|
|
|
|
4787
|
1 |
|
class AddReferencesResponse(FrozenClass): |
4788
|
|
|
''' |
4789
|
|
|
Adds one or more references to the server address space. |
4790
|
|
|
|
4791
|
|
|
:ivar TypeId: |
4792
|
|
|
:vartype TypeId: NodeId |
4793
|
|
|
:ivar ResponseHeader: |
4794
|
|
|
:vartype ResponseHeader: ResponseHeader |
4795
|
|
|
:ivar Results: |
4796
|
|
|
:vartype Results: StatusCode |
4797
|
|
|
:ivar DiagnosticInfos: |
4798
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
4799
|
|
|
''' |
4800
|
1 |
|
def __init__(self, binary=None): |
4801
|
|
|
if binary is not None: |
4802
|
|
|
self._binary_init(binary) |
4803
|
|
|
self._freeze = True |
4804
|
|
|
return |
4805
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary) |
4806
|
|
|
self.ResponseHeader = ResponseHeader() |
4807
|
|
|
self.Results = [] |
4808
|
|
|
self.DiagnosticInfos = [] |
4809
|
|
|
self._freeze = True |
4810
|
|
|
|
4811
|
1 |
|
def to_binary(self): |
4812
|
|
|
packet = [] |
4813
|
|
|
packet.append(self.TypeId.to_binary()) |
4814
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
4815
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
4816
|
|
|
for fieldname in self.Results: |
4817
|
|
|
packet.append(fieldname.to_binary()) |
4818
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
4819
|
|
|
for fieldname in self.DiagnosticInfos: |
4820
|
|
|
packet.append(fieldname.to_binary()) |
4821
|
|
|
return b''.join(packet) |
4822
|
|
|
|
4823
|
1 |
|
@staticmethod |
4824
|
|
|
def from_binary(data): |
4825
|
|
|
return AddReferencesResponse(data) |
4826
|
|
|
|
4827
|
1 |
|
def _binary_init(self, data): |
4828
|
|
|
self.TypeId = NodeId.from_binary(data) |
4829
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
4830
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
4831
|
|
|
array = [] |
4832
|
|
|
if length != -1: |
4833
|
|
|
for _ in range(0, length): |
4834
|
|
|
array.append(StatusCode.from_binary(data)) |
4835
|
|
|
self.Results = array |
4836
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
4837
|
|
|
array = [] |
4838
|
|
|
if length != -1: |
4839
|
|
|
for _ in range(0, length): |
4840
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
4841
|
|
|
self.DiagnosticInfos = array |
4842
|
|
|
|
4843
|
1 |
|
def __str__(self): |
4844
|
|
|
return 'AddReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
4845
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
4846
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
4847
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
4848
|
|
|
|
4849
|
1 |
|
__repr__ = __str__ |
4850
|
|
|
|
4851
|
|
|
|
4852
|
1 |
|
class DeleteNodesItem(FrozenClass): |
4853
|
|
|
''' |
4854
|
|
|
A request to delete a node to the server address space. |
4855
|
|
|
|
4856
|
|
|
:ivar NodeId: |
4857
|
|
|
:vartype NodeId: NodeId |
4858
|
|
|
:ivar DeleteTargetReferences: |
4859
|
|
|
:vartype DeleteTargetReferences: Boolean |
4860
|
|
|
''' |
4861
|
1 |
|
def __init__(self, binary=None): |
4862
|
|
|
if binary is not None: |
4863
|
|
|
self._binary_init(binary) |
4864
|
|
|
self._freeze = True |
4865
|
|
|
return |
4866
|
|
|
self.NodeId = NodeId() |
4867
|
|
|
self.DeleteTargetReferences = True |
4868
|
|
|
self._freeze = True |
4869
|
|
|
|
4870
|
1 |
|
def to_binary(self): |
4871
|
|
|
packet = [] |
4872
|
|
|
packet.append(self.NodeId.to_binary()) |
4873
|
|
|
packet.append(uatype_Boolean.pack(self.DeleteTargetReferences)) |
4874
|
|
|
return b''.join(packet) |
4875
|
|
|
|
4876
|
1 |
|
@staticmethod |
4877
|
|
|
def from_binary(data): |
4878
|
|
|
return DeleteNodesItem(data) |
4879
|
|
|
|
4880
|
1 |
|
def _binary_init(self, data): |
4881
|
|
|
self.NodeId = NodeId.from_binary(data) |
4882
|
|
|
self.DeleteTargetReferences = uatype_Boolean.unpack(data.read(1))[0] |
4883
|
|
|
|
4884
|
1 |
|
def __str__(self): |
4885
|
|
|
return 'DeleteNodesItem(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
4886
|
|
|
'DeleteTargetReferences:' + str(self.DeleteTargetReferences) + ')' |
4887
|
|
|
|
4888
|
1 |
|
__repr__ = __str__ |
4889
|
|
|
|
4890
|
|
|
|
4891
|
1 |
|
class DeleteNodesParameters(FrozenClass): |
4892
|
|
|
''' |
4893
|
|
|
:ivar NodesToDelete: |
4894
|
|
|
:vartype NodesToDelete: DeleteNodesItem |
4895
|
|
|
''' |
4896
|
1 |
|
def __init__(self, binary=None): |
4897
|
|
|
if binary is not None: |
4898
|
|
|
self._binary_init(binary) |
4899
|
|
|
self._freeze = True |
4900
|
|
|
return |
4901
|
|
|
self.NodesToDelete = [] |
4902
|
|
|
self._freeze = True |
4903
|
|
|
|
4904
|
1 |
|
def to_binary(self): |
4905
|
|
|
packet = [] |
4906
|
|
|
packet.append(uatype_Int32.pack(len(self.NodesToDelete))) |
4907
|
|
|
for fieldname in self.NodesToDelete: |
4908
|
|
|
packet.append(fieldname.to_binary()) |
4909
|
|
|
return b''.join(packet) |
4910
|
|
|
|
4911
|
1 |
|
@staticmethod |
4912
|
|
|
def from_binary(data): |
4913
|
|
|
return DeleteNodesParameters(data) |
4914
|
|
|
|
4915
|
1 |
|
def _binary_init(self, data): |
4916
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
4917
|
|
|
array = [] |
4918
|
|
|
if length != -1: |
4919
|
|
|
for _ in range(0, length): |
4920
|
|
|
array.append(DeleteNodesItem.from_binary(data)) |
4921
|
|
|
self.NodesToDelete = array |
4922
|
|
|
|
4923
|
1 |
|
def __str__(self): |
4924
|
|
|
return 'DeleteNodesParameters(' + 'NodesToDelete:' + str(self.NodesToDelete) + ')' |
4925
|
|
|
|
4926
|
1 |
|
__repr__ = __str__ |
4927
|
|
|
|
4928
|
|
|
|
4929
|
1 |
|
class DeleteNodesRequest(FrozenClass): |
4930
|
|
|
''' |
4931
|
|
|
Delete one or more nodes from the server address space. |
4932
|
|
|
|
4933
|
|
|
:ivar TypeId: |
4934
|
|
|
:vartype TypeId: NodeId |
4935
|
|
|
:ivar RequestHeader: |
4936
|
|
|
:vartype RequestHeader: RequestHeader |
4937
|
|
|
:ivar Parameters: |
4938
|
|
|
:vartype Parameters: DeleteNodesParameters |
4939
|
|
|
''' |
4940
|
1 |
|
def __init__(self, binary=None): |
4941
|
|
|
if binary is not None: |
4942
|
|
|
self._binary_init(binary) |
4943
|
|
|
self._freeze = True |
4944
|
|
|
return |
4945
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary) |
4946
|
|
|
self.RequestHeader = RequestHeader() |
4947
|
|
|
self.Parameters = DeleteNodesParameters() |
4948
|
|
|
self._freeze = True |
4949
|
|
|
|
4950
|
1 |
|
def to_binary(self): |
4951
|
|
|
packet = [] |
4952
|
|
|
packet.append(self.TypeId.to_binary()) |
4953
|
|
|
packet.append(self.RequestHeader.to_binary()) |
4954
|
|
|
packet.append(self.Parameters.to_binary()) |
4955
|
|
|
return b''.join(packet) |
4956
|
|
|
|
4957
|
1 |
|
@staticmethod |
4958
|
|
|
def from_binary(data): |
4959
|
|
|
return DeleteNodesRequest(data) |
4960
|
|
|
|
4961
|
1 |
|
def _binary_init(self, data): |
4962
|
|
|
self.TypeId = NodeId.from_binary(data) |
4963
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
4964
|
|
|
self.Parameters = DeleteNodesParameters.from_binary(data) |
4965
|
|
|
|
4966
|
1 |
|
def __str__(self): |
4967
|
|
|
return 'DeleteNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
4968
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
4969
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
4970
|
|
|
|
4971
|
1 |
|
__repr__ = __str__ |
4972
|
|
|
|
4973
|
|
|
|
4974
|
1 |
|
class DeleteNodesResponse(FrozenClass): |
4975
|
|
|
''' |
4976
|
|
|
Delete one or more nodes from the server address space. |
4977
|
|
|
|
4978
|
|
|
:ivar TypeId: |
4979
|
|
|
:vartype TypeId: NodeId |
4980
|
|
|
:ivar ResponseHeader: |
4981
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
4982
|
|
|
:ivar Results: |
4983
|
|
|
:vartype Results: StatusCode |
4984
|
|
|
:ivar DiagnosticInfos: |
4985
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
4986
|
|
|
''' |
4987
|
|
|
def __init__(self, binary=None): |
4988
|
|
|
if binary is not None: |
4989
|
|
|
self._binary_init(binary) |
4990
|
1 |
|
self._freeze = True |
4991
|
|
|
return |
4992
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary) |
4993
|
|
|
self.ResponseHeader = ResponseHeader() |
4994
|
|
|
self.Results = [] |
4995
|
|
|
self.DiagnosticInfos = [] |
4996
|
|
|
self._freeze = True |
4997
|
|
|
|
4998
|
|
|
def to_binary(self): |
4999
|
|
|
packet = [] |
5000
|
1 |
|
packet.append(self.TypeId.to_binary()) |
5001
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
5002
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
5003
|
|
|
for fieldname in self.Results: |
5004
|
1 |
|
packet.append(fieldname.to_binary()) |
5005
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
5006
|
|
|
for fieldname in self.DiagnosticInfos: |
5007
|
|
|
packet.append(fieldname.to_binary()) |
5008
|
|
|
return b''.join(packet) |
5009
|
|
|
|
5010
|
|
|
@staticmethod |
5011
|
|
|
def from_binary(data): |
5012
|
|
|
return DeleteNodesResponse(data) |
5013
|
|
|
|
5014
|
|
|
def _binary_init(self, data): |
5015
|
|
|
self.TypeId = NodeId.from_binary(data) |
5016
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
5017
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5018
|
1 |
|
array = [] |
5019
|
|
|
if length != -1: |
5020
|
|
|
for _ in range(0, length): |
5021
|
|
|
array.append(StatusCode.from_binary(data)) |
5022
|
1 |
|
self.Results = array |
5023
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5024
|
|
|
array = [] |
5025
|
1 |
|
if length != -1: |
5026
|
|
|
for _ in range(0, length): |
5027
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
5028
|
|
|
self.DiagnosticInfos = array |
5029
|
|
|
|
5030
|
|
|
def __str__(self): |
5031
|
|
|
return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5032
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
5033
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
5034
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
5035
|
|
|
|
5036
|
1 |
|
__repr__ = __str__ |
5037
|
|
|
|
5038
|
|
|
|
5039
|
|
|
class DeleteReferencesItem(FrozenClass): |
5040
|
|
|
''' |
5041
|
|
|
A request to delete a node from the server address space. |
5042
|
|
|
|
5043
|
|
|
:ivar SourceNodeId: |
5044
|
|
|
:vartype SourceNodeId: NodeId |
5045
|
|
|
:ivar ReferenceTypeId: |
5046
|
1 |
|
:vartype ReferenceTypeId: NodeId |
5047
|
|
|
:ivar IsForward: |
5048
|
|
|
:vartype IsForward: Boolean |
5049
|
|
|
:ivar TargetNodeId: |
5050
|
|
|
:vartype TargetNodeId: ExpandedNodeId |
5051
|
|
|
:ivar DeleteBidirectional: |
5052
|
|
|
:vartype DeleteBidirectional: Boolean |
5053
|
1 |
|
''' |
5054
|
|
|
def __init__(self, binary=None): |
5055
|
|
|
if binary is not None: |
5056
|
|
|
self._binary_init(binary) |
5057
|
1 |
|
self._freeze = True |
5058
|
|
|
return |
5059
|
|
|
self.SourceNodeId = NodeId() |
5060
|
|
|
self.ReferenceTypeId = NodeId() |
5061
|
|
|
self.IsForward = True |
5062
|
1 |
|
self.TargetNodeId = ExpandedNodeId() |
5063
|
|
|
self.DeleteBidirectional = True |
5064
|
|
|
self._freeze = True |
5065
|
|
|
|
5066
|
|
|
def to_binary(self): |
5067
|
1 |
|
packet = [] |
5068
|
|
|
packet.append(self.SourceNodeId.to_binary()) |
5069
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
5070
|
1 |
|
packet.append(uatype_Boolean.pack(self.IsForward)) |
5071
|
|
|
packet.append(self.TargetNodeId.to_binary()) |
5072
|
|
|
packet.append(uatype_Boolean.pack(self.DeleteBidirectional)) |
5073
|
|
|
return b''.join(packet) |
5074
|
|
|
|
5075
|
|
|
@staticmethod |
5076
|
|
|
def from_binary(data): |
5077
|
|
|
return DeleteReferencesItem(data) |
5078
|
|
|
|
5079
|
|
|
def _binary_init(self, data): |
5080
|
|
|
self.SourceNodeId = NodeId.from_binary(data) |
5081
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
5082
|
|
|
self.IsForward = uatype_Boolean.unpack(data.read(1))[0] |
5083
|
|
|
self.TargetNodeId = ExpandedNodeId.from_binary(data) |
5084
|
|
|
self.DeleteBidirectional = uatype_Boolean.unpack(data.read(1))[0] |
5085
|
1 |
|
|
5086
|
|
|
def __str__(self): |
5087
|
|
|
return 'DeleteReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \ |
5088
|
|
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
5089
|
|
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
5090
|
|
|
'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \ |
5091
|
|
|
'DeleteBidirectional:' + str(self.DeleteBidirectional) + ')' |
5092
|
|
|
|
5093
|
|
|
__repr__ = __str__ |
5094
|
|
|
|
5095
|
|
|
|
5096
|
|
|
class DeleteReferencesParameters(FrozenClass): |
5097
|
1 |
|
''' |
5098
|
|
|
:ivar ReferencesToDelete: |
5099
|
|
|
:vartype ReferencesToDelete: DeleteReferencesItem |
5100
|
|
|
''' |
5101
|
|
|
def __init__(self, binary=None): |
5102
|
|
|
if binary is not None: |
5103
|
|
|
self._binary_init(binary) |
5104
|
|
|
self._freeze = True |
5105
|
|
|
return |
5106
|
1 |
|
self.ReferencesToDelete = [] |
5107
|
|
|
self._freeze = True |
5108
|
|
|
|
5109
|
|
|
def to_binary(self): |
5110
|
1 |
|
packet = [] |
5111
|
|
|
packet.append(uatype_Int32.pack(len(self.ReferencesToDelete))) |
5112
|
|
|
for fieldname in self.ReferencesToDelete: |
5113
|
|
|
packet.append(fieldname.to_binary()) |
5114
|
|
|
return b''.join(packet) |
5115
|
|
|
|
5116
|
|
|
@staticmethod |
5117
|
1 |
|
def from_binary(data): |
5118
|
|
|
return DeleteReferencesParameters(data) |
5119
|
|
|
|
5120
|
|
|
def _binary_init(self, data): |
5121
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5122
|
|
|
array = [] |
5123
|
|
|
if length != -1: |
5124
|
1 |
|
for _ in range(0, length): |
5125
|
|
|
array.append(DeleteReferencesItem.from_binary(data)) |
5126
|
|
|
self.ReferencesToDelete = array |
5127
|
1 |
|
|
5128
|
|
|
def __str__(self): |
5129
|
|
|
return 'DeleteReferencesParameters(' + 'ReferencesToDelete:' + str(self.ReferencesToDelete) + ')' |
5130
|
|
|
|
5131
|
|
|
__repr__ = __str__ |
5132
|
1 |
|
|
5133
|
|
|
|
5134
|
|
|
class DeleteReferencesRequest(FrozenClass): |
5135
|
|
|
''' |
5136
|
|
|
Delete one or more references from the server address space. |
5137
|
|
|
|
5138
|
|
|
:ivar TypeId: |
5139
|
|
|
:vartype TypeId: NodeId |
5140
|
1 |
|
:ivar RequestHeader: |
5141
|
|
|
:vartype RequestHeader: RequestHeader |
5142
|
|
|
:ivar Parameters: |
5143
|
|
|
:vartype Parameters: DeleteReferencesParameters |
5144
|
|
|
''' |
5145
|
|
|
def __init__(self, binary=None): |
5146
|
|
|
if binary is not None: |
5147
|
1 |
|
self._binary_init(binary) |
5148
|
|
|
self._freeze = True |
5149
|
|
|
return |
5150
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary) |
5151
|
1 |
|
self.RequestHeader = RequestHeader() |
5152
|
|
|
self.Parameters = DeleteReferencesParameters() |
5153
|
|
|
self._freeze = True |
5154
|
|
|
|
5155
|
|
|
def to_binary(self): |
5156
|
|
|
packet = [] |
5157
|
|
|
packet.append(self.TypeId.to_binary()) |
5158
|
|
|
packet.append(self.RequestHeader.to_binary()) |
5159
|
1 |
|
packet.append(self.Parameters.to_binary()) |
5160
|
|
|
return b''.join(packet) |
5161
|
|
|
|
5162
|
1 |
|
@staticmethod |
5163
|
|
|
def from_binary(data): |
5164
|
|
|
return DeleteReferencesRequest(data) |
5165
|
1 |
|
|
5166
|
|
|
def _binary_init(self, data): |
5167
|
|
|
self.TypeId = NodeId.from_binary(data) |
5168
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
5169
|
|
|
self.Parameters = DeleteReferencesParameters.from_binary(data) |
5170
|
|
|
|
5171
|
|
|
def __str__(self): |
5172
|
|
|
return 'DeleteReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5173
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
5174
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
5175
|
|
|
|
5176
|
1 |
|
__repr__ = __str__ |
5177
|
|
|
|
5178
|
|
|
|
5179
|
|
|
class DeleteReferencesResult(FrozenClass): |
5180
|
|
|
''' |
5181
|
|
|
:ivar Results: |
5182
|
|
|
:vartype Results: StatusCode |
5183
|
|
|
:ivar DiagnosticInfos: |
5184
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
5185
|
|
|
''' |
5186
|
1 |
|
def __init__(self, binary=None): |
5187
|
|
|
if binary is not None: |
5188
|
|
|
self._binary_init(binary) |
5189
|
|
|
self._freeze = True |
5190
|
|
|
return |
5191
|
|
|
self.Results = [] |
5192
|
|
|
self.DiagnosticInfos = [] |
5193
|
1 |
|
self._freeze = True |
5194
|
|
|
|
5195
|
|
|
def to_binary(self): |
5196
|
|
|
packet = [] |
5197
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
5198
|
|
|
for fieldname in self.Results: |
5199
|
|
|
packet.append(fieldname.to_binary()) |
5200
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
5201
|
|
|
for fieldname in self.DiagnosticInfos: |
5202
|
1 |
|
packet.append(fieldname.to_binary()) |
5203
|
|
|
return b''.join(packet) |
5204
|
|
|
|
5205
|
|
|
@staticmethod |
5206
|
|
|
def from_binary(data): |
5207
|
1 |
|
return DeleteReferencesResult(data) |
5208
|
|
|
|
5209
|
|
|
def _binary_init(self, data): |
5210
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
5211
|
|
|
array = [] |
5212
|
|
|
if length != -1: |
5213
|
|
|
for _ in range(0, length): |
5214
|
|
|
array.append(StatusCode.from_binary(data)) |
5215
|
|
|
self.Results = array |
5216
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5217
|
1 |
|
array = [] |
5218
|
|
|
if length != -1: |
5219
|
|
|
for _ in range(0, length): |
5220
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
5221
|
|
|
self.DiagnosticInfos = array |
5222
|
|
|
|
5223
|
|
|
def __str__(self): |
5224
|
|
|
return 'DeleteReferencesResult(' + 'Results:' + str(self.Results) + ', ' + \ |
5225
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
5226
|
1 |
|
|
5227
|
|
|
__repr__ = __str__ |
5228
|
|
|
|
5229
|
|
|
|
5230
|
|
|
class DeleteReferencesResponse(FrozenClass): |
5231
|
|
|
''' |
5232
|
|
|
Delete one or more references from the server address space. |
5233
|
|
|
|
5234
|
|
|
:ivar TypeId: |
5235
|
|
|
:vartype TypeId: NodeId |
5236
|
1 |
|
:ivar ResponseHeader: |
5237
|
|
|
:vartype ResponseHeader: ResponseHeader |
5238
|
|
|
:ivar Parameters: |
5239
|
|
|
:vartype Parameters: DeleteReferencesResult |
5240
|
1 |
|
''' |
5241
|
|
|
def __init__(self, binary=None): |
5242
|
|
|
if binary is not None: |
5243
|
|
|
self._binary_init(binary) |
5244
|
|
|
self._freeze = True |
5245
|
|
|
return |
5246
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary) |
5247
|
|
|
self.ResponseHeader = ResponseHeader() |
5248
|
|
|
self.Parameters = DeleteReferencesResult() |
5249
|
|
|
self._freeze = True |
5250
|
|
|
|
5251
|
|
|
def to_binary(self): |
5252
|
|
|
packet = [] |
5253
|
|
|
packet.append(self.TypeId.to_binary()) |
5254
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
5255
|
|
|
packet.append(self.Parameters.to_binary()) |
5256
|
|
|
return b''.join(packet) |
5257
|
|
|
|
5258
|
1 |
|
@staticmethod |
5259
|
|
|
def from_binary(data): |
5260
|
|
|
return DeleteReferencesResponse(data) |
5261
|
1 |
|
|
5262
|
|
|
def _binary_init(self, data): |
5263
|
|
|
self.TypeId = NodeId.from_binary(data) |
5264
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
5265
|
|
|
self.Parameters = DeleteReferencesResult.from_binary(data) |
5266
|
|
|
|
5267
|
|
|
def __str__(self): |
5268
|
|
|
return 'DeleteReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5269
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
5270
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
5271
|
|
|
|
5272
|
1 |
|
__repr__ = __str__ |
5273
|
|
|
|
5274
|
|
|
|
5275
|
|
|
class ViewDescription(FrozenClass): |
5276
|
|
|
''' |
5277
|
|
|
The view to browse. |
5278
|
|
|
|
5279
|
|
|
:ivar ViewId: |
5280
|
|
|
:vartype ViewId: NodeId |
5281
|
|
|
:ivar Timestamp: |
5282
|
1 |
|
:vartype Timestamp: DateTime |
5283
|
|
|
:ivar ViewVersion: |
5284
|
|
|
:vartype ViewVersion: UInt32 |
5285
|
|
|
''' |
5286
|
|
|
def __init__(self, binary=None): |
5287
|
|
|
if binary is not None: |
5288
|
|
|
self._binary_init(binary) |
5289
|
1 |
|
self._freeze = True |
5290
|
|
|
return |
5291
|
|
|
self.ViewId = NodeId() |
5292
|
|
|
self.Timestamp = datetime.now() |
5293
|
1 |
|
self.ViewVersion = 0 |
5294
|
|
|
self._freeze = True |
5295
|
|
|
|
5296
|
|
|
def to_binary(self): |
5297
|
|
|
packet = [] |
5298
|
1 |
|
packet.append(self.ViewId.to_binary()) |
5299
|
|
|
packet.append(pack_datetime(self.Timestamp)) |
5300
|
|
|
packet.append(uatype_UInt32.pack(self.ViewVersion)) |
5301
|
|
|
return b''.join(packet) |
5302
|
|
|
|
5303
|
1 |
|
@staticmethod |
5304
|
|
|
def from_binary(data): |
5305
|
|
|
return ViewDescription(data) |
5306
|
1 |
|
|
5307
|
|
|
def _binary_init(self, data): |
5308
|
|
|
self.ViewId = NodeId.from_binary(data) |
5309
|
|
|
self.Timestamp = unpack_datetime(data) |
5310
|
|
|
self.ViewVersion = uatype_UInt32.unpack(data.read(4))[0] |
5311
|
|
|
|
5312
|
|
|
def __str__(self): |
5313
|
|
|
return 'ViewDescription(' + 'ViewId:' + str(self.ViewId) + ', ' + \ |
5314
|
|
|
'Timestamp:' + str(self.Timestamp) + ', ' + \ |
5315
|
|
|
'ViewVersion:' + str(self.ViewVersion) + ')' |
5316
|
|
|
|
5317
|
1 |
|
__repr__ = __str__ |
5318
|
1 |
|
|
5319
|
1 |
|
|
5320
|
1 |
|
class BrowseDescription(FrozenClass): |
5321
|
1 |
|
''' |
5322
|
1 |
|
A request to browse the the references from a node. |
5323
|
1 |
|
|
5324
|
1 |
|
:ivar NodeId: |
5325
|
1 |
|
:vartype NodeId: NodeId |
5326
|
|
|
:ivar BrowseDirection: |
5327
|
1 |
|
:vartype BrowseDirection: BrowseDirection |
5328
|
1 |
|
:ivar ReferenceTypeId: |
5329
|
1 |
|
:vartype ReferenceTypeId: NodeId |
5330
|
1 |
|
:ivar IncludeSubtypes: |
5331
|
1 |
|
:vartype IncludeSubtypes: Boolean |
5332
|
1 |
|
:ivar NodeClassMask: |
5333
|
|
|
:vartype NodeClassMask: UInt32 |
5334
|
1 |
|
:ivar ResultMask: |
5335
|
|
|
:vartype ResultMask: UInt32 |
5336
|
1 |
|
''' |
5337
|
|
|
def __init__(self, binary=None): |
5338
|
1 |
|
if binary is not None: |
5339
|
1 |
|
self._binary_init(binary) |
5340
|
1 |
|
self._freeze = True |
5341
|
1 |
|
return |
5342
|
|
|
self.NodeId = NodeId() |
5343
|
1 |
|
self.BrowseDirection = BrowseDirection(0) |
5344
|
|
|
self.ReferenceTypeId = NodeId() |
5345
|
|
|
self.IncludeSubtypes = True |
5346
|
|
|
self.NodeClassMask = 0 |
5347
|
|
|
self.ResultMask = 0 |
5348
|
1 |
|
self._freeze = True |
5349
|
|
|
|
5350
|
|
|
def to_binary(self): |
5351
|
1 |
|
packet = [] |
5352
|
|
|
packet.append(self.NodeId.to_binary()) |
5353
|
|
|
packet.append(uatype_UInt32.pack(self.BrowseDirection.value)) |
5354
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
5355
|
|
|
packet.append(uatype_Boolean.pack(self.IncludeSubtypes)) |
5356
|
|
|
packet.append(uatype_UInt32.pack(self.NodeClassMask)) |
5357
|
|
|
packet.append(uatype_UInt32.pack(self.ResultMask)) |
5358
|
|
|
return b''.join(packet) |
5359
|
|
|
|
5360
|
|
|
@staticmethod |
5361
|
|
|
def from_binary(data): |
5362
|
|
|
return BrowseDescription(data) |
5363
|
|
|
|
5364
|
|
|
def _binary_init(self, data): |
5365
|
|
|
self.NodeId = NodeId.from_binary(data) |
5366
|
|
|
self.BrowseDirection = BrowseDirection(uatype_UInt32.unpack(data.read(4))[0]) |
5367
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
5368
|
1 |
|
self.IncludeSubtypes = uatype_Boolean.unpack(data.read(1))[0] |
5369
|
1 |
|
self.NodeClassMask = uatype_UInt32.unpack(data.read(4))[0] |
5370
|
1 |
|
self.ResultMask = uatype_UInt32.unpack(data.read(4))[0] |
5371
|
1 |
|
|
5372
|
1 |
|
def __str__(self): |
5373
|
1 |
|
return 'BrowseDescription(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
5374
|
1 |
|
'BrowseDirection:' + str(self.BrowseDirection) + ', ' + \ |
5375
|
1 |
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
5376
|
1 |
|
'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \ |
5377
|
1 |
|
'NodeClassMask:' + str(self.NodeClassMask) + ', ' + \ |
5378
|
1 |
|
'ResultMask:' + str(self.ResultMask) + ')' |
5379
|
1 |
|
|
5380
|
|
|
__repr__ = __str__ |
5381
|
1 |
|
|
5382
|
1 |
|
|
5383
|
1 |
|
class ReferenceDescription(FrozenClass): |
5384
|
1 |
|
''' |
5385
|
1 |
|
The description of a reference. |
5386
|
1 |
|
|
5387
|
1 |
|
:ivar ReferenceTypeId: |
5388
|
1 |
|
:vartype ReferenceTypeId: NodeId |
5389
|
1 |
|
:ivar IsForward: |
5390
|
|
|
:vartype IsForward: Boolean |
5391
|
1 |
|
:ivar NodeId: |
5392
|
|
|
:vartype NodeId: ExpandedNodeId |
5393
|
1 |
|
:ivar BrowseName: |
5394
|
|
|
:vartype BrowseName: QualifiedName |
5395
|
1 |
|
:ivar DisplayName: |
5396
|
1 |
|
:vartype DisplayName: LocalizedText |
5397
|
1 |
|
:ivar NodeClass: |
5398
|
1 |
|
:vartype NodeClass: NodeClass |
5399
|
1 |
|
:ivar TypeDefinition: |
5400
|
1 |
|
:vartype TypeDefinition: ExpandedNodeId |
5401
|
1 |
|
''' |
5402
|
|
|
def __init__(self, binary=None): |
5403
|
1 |
|
if binary is not None: |
5404
|
|
|
self._binary_init(binary) |
5405
|
|
|
self._freeze = True |
5406
|
|
|
return |
5407
|
|
|
self.ReferenceTypeId = NodeId() |
5408
|
|
|
self.IsForward = True |
5409
|
|
|
self.NodeId = ExpandedNodeId() |
5410
|
|
|
self.BrowseName = QualifiedName() |
5411
|
1 |
|
self.DisplayName = LocalizedText() |
5412
|
|
|
self.NodeClass = NodeClass(0) |
5413
|
|
|
self.TypeDefinition = ExpandedNodeId() |
5414
|
1 |
|
self._freeze = True |
5415
|
|
|
|
5416
|
|
|
def to_binary(self): |
5417
|
|
|
packet = [] |
5418
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
5419
|
|
|
packet.append(uatype_Boolean.pack(self.IsForward)) |
5420
|
|
|
packet.append(self.NodeId.to_binary()) |
5421
|
|
|
packet.append(self.BrowseName.to_binary()) |
5422
|
|
|
packet.append(self.DisplayName.to_binary()) |
5423
|
|
|
packet.append(uatype_UInt32.pack(self.NodeClass.value)) |
5424
|
|
|
packet.append(self.TypeDefinition.to_binary()) |
5425
|
|
|
return b''.join(packet) |
5426
|
|
|
|
5427
|
|
|
@staticmethod |
5428
|
|
|
def from_binary(data): |
5429
|
|
|
return ReferenceDescription(data) |
5430
|
|
|
|
5431
|
|
|
def _binary_init(self, data): |
5432
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
5433
|
1 |
|
self.IsForward = uatype_Boolean.unpack(data.read(1))[0] |
5434
|
1 |
|
self.NodeId = ExpandedNodeId.from_binary(data) |
5435
|
1 |
|
self.BrowseName = QualifiedName.from_binary(data) |
5436
|
1 |
|
self.DisplayName = LocalizedText.from_binary(data) |
5437
|
1 |
|
self.NodeClass = NodeClass(uatype_UInt32.unpack(data.read(4))[0]) |
5438
|
1 |
|
self.TypeDefinition = ExpandedNodeId.from_binary(data) |
5439
|
1 |
|
|
5440
|
1 |
|
def __str__(self): |
5441
|
1 |
|
return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
5442
|
1 |
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
5443
|
1 |
|
'NodeId:' + str(self.NodeId) + ', ' + \ |
5444
|
1 |
|
'BrowseName:' + str(self.BrowseName) + ', ' + \ |
5445
|
1 |
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
5446
|
|
|
'NodeClass:' + str(self.NodeClass) + ', ' + \ |
5447
|
1 |
|
'TypeDefinition:' + str(self.TypeDefinition) + ')' |
5448
|
1 |
|
|
5449
|
1 |
|
__repr__ = __str__ |
5450
|
1 |
|
|
5451
|
1 |
|
|
5452
|
1 |
|
class BrowseResult(FrozenClass): |
5453
|
1 |
|
''' |
5454
|
1 |
|
The result of a browse operation. |
5455
|
1 |
|
|
5456
|
1 |
|
:ivar StatusCode: |
5457
|
|
|
:vartype StatusCode: StatusCode |
5458
|
1 |
|
:ivar ContinuationPoint: |
5459
|
|
|
:vartype ContinuationPoint: ByteString |
5460
|
1 |
|
:ivar References: |
5461
|
|
|
:vartype References: ReferenceDescription |
5462
|
1 |
|
''' |
5463
|
1 |
|
def __init__(self, binary=None): |
5464
|
1 |
|
if binary is not None: |
5465
|
1 |
|
self._binary_init(binary) |
5466
|
1 |
|
self._freeze = True |
5467
|
1 |
|
return |
5468
|
1 |
|
self.StatusCode = StatusCode() |
5469
|
1 |
|
self.ContinuationPoint = b'' |
5470
|
|
|
self.References = [] |
5471
|
1 |
|
self._freeze = True |
5472
|
|
|
|
5473
|
|
|
def to_binary(self): |
5474
|
|
|
packet = [] |
5475
|
|
|
packet.append(self.StatusCode.to_binary()) |
5476
|
|
|
packet.append(pack_bytes(self.ContinuationPoint)) |
5477
|
|
|
packet.append(uatype_Int32.pack(len(self.References))) |
5478
|
|
|
for fieldname in self.References: |
5479
|
|
|
packet.append(fieldname.to_binary()) |
5480
|
1 |
|
return b''.join(packet) |
5481
|
|
|
|
5482
|
|
|
@staticmethod |
5483
|
1 |
|
def from_binary(data): |
5484
|
|
|
return BrowseResult(data) |
5485
|
|
|
|
5486
|
|
|
def _binary_init(self, data): |
5487
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
5488
|
|
|
self.ContinuationPoint = unpack_bytes(data) |
5489
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5490
|
|
|
array = [] |
5491
|
|
|
if length != -1: |
5492
|
|
|
for _ in range(0, length): |
5493
|
|
|
array.append(ReferenceDescription.from_binary(data)) |
5494
|
1 |
|
self.References = array |
5495
|
1 |
|
|
5496
|
1 |
|
def __str__(self): |
5497
|
1 |
|
return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
5498
|
1 |
|
'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ |
5499
|
1 |
|
'References:' + str(self.References) + ')' |
5500
|
1 |
|
|
5501
|
1 |
|
__repr__ = __str__ |
5502
|
1 |
|
|
5503
|
|
|
|
5504
|
1 |
|
class BrowseParameters(FrozenClass): |
5505
|
1 |
|
''' |
5506
|
1 |
|
:ivar View: |
5507
|
1 |
|
:vartype View: ViewDescription |
5508
|
1 |
|
:ivar RequestedMaxReferencesPerNode: |
5509
|
1 |
|
:vartype RequestedMaxReferencesPerNode: UInt32 |
5510
|
1 |
|
:ivar NodesToBrowse: |
5511
|
1 |
|
:vartype NodesToBrowse: BrowseDescription |
5512
|
|
|
''' |
5513
|
1 |
|
def __init__(self, binary=None): |
5514
|
|
|
if binary is not None: |
5515
|
1 |
|
self._binary_init(binary) |
5516
|
|
|
self._freeze = True |
5517
|
1 |
|
return |
5518
|
1 |
|
self.View = ViewDescription() |
5519
|
1 |
|
self.RequestedMaxReferencesPerNode = 0 |
5520
|
1 |
|
self.NodesToBrowse = [] |
5521
|
1 |
|
self._freeze = True |
5522
|
1 |
|
|
5523
|
1 |
|
def to_binary(self): |
5524
|
1 |
|
packet = [] |
5525
|
1 |
|
packet.append(self.View.to_binary()) |
5526
|
|
|
packet.append(uatype_UInt32.pack(self.RequestedMaxReferencesPerNode)) |
5527
|
1 |
|
packet.append(uatype_Int32.pack(len(self.NodesToBrowse))) |
5528
|
|
|
for fieldname in self.NodesToBrowse: |
5529
|
|
|
packet.append(fieldname.to_binary()) |
5530
|
|
|
return b''.join(packet) |
5531
|
|
|
|
5532
|
1 |
|
@staticmethod |
5533
|
|
|
def from_binary(data): |
5534
|
|
|
return BrowseParameters(data) |
5535
|
1 |
|
|
5536
|
|
|
def _binary_init(self, data): |
5537
|
|
|
self.View = ViewDescription.from_binary(data) |
5538
|
|
|
self.RequestedMaxReferencesPerNode = uatype_UInt32.unpack(data.read(4))[0] |
5539
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5540
|
|
|
array = [] |
5541
|
|
|
if length != -1: |
5542
|
|
|
for _ in range(0, length): |
5543
|
|
|
array.append(BrowseDescription.from_binary(data)) |
5544
|
1 |
|
self.NodesToBrowse = array |
5545
|
1 |
|
|
5546
|
1 |
|
def __str__(self): |
5547
|
1 |
|
return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \ |
5548
|
1 |
|
'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \ |
5549
|
1 |
|
'NodesToBrowse:' + str(self.NodesToBrowse) + ')' |
5550
|
1 |
|
|
5551
|
1 |
|
__repr__ = __str__ |
5552
|
1 |
|
|
5553
|
|
|
|
5554
|
1 |
|
class BrowseRequest(FrozenClass): |
5555
|
1 |
|
''' |
5556
|
1 |
|
Browse the references for one or more nodes from the server address space. |
5557
|
1 |
|
|
5558
|
1 |
|
:ivar TypeId: |
5559
|
1 |
|
:vartype TypeId: NodeId |
5560
|
1 |
|
:ivar RequestHeader: |
5561
|
1 |
|
:vartype RequestHeader: RequestHeader |
5562
|
|
|
:ivar Parameters: |
5563
|
1 |
|
:vartype Parameters: BrowseParameters |
5564
|
|
|
''' |
5565
|
1 |
|
def __init__(self, binary=None): |
5566
|
|
|
if binary is not None: |
5567
|
1 |
|
self._binary_init(binary) |
5568
|
1 |
|
self._freeze = True |
5569
|
1 |
|
return |
5570
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary) |
5571
|
1 |
|
self.RequestHeader = RequestHeader() |
5572
|
1 |
|
self.Parameters = BrowseParameters() |
5573
|
1 |
|
self._freeze = True |
5574
|
1 |
|
|
5575
|
1 |
|
def to_binary(self): |
5576
|
|
|
packet = [] |
5577
|
1 |
|
packet.append(self.TypeId.to_binary()) |
5578
|
|
|
packet.append(self.RequestHeader.to_binary()) |
5579
|
|
|
packet.append(self.Parameters.to_binary()) |
5580
|
|
|
return b''.join(packet) |
5581
|
|
|
|
5582
|
1 |
|
@staticmethod |
5583
|
|
|
def from_binary(data): |
5584
|
|
|
return BrowseRequest(data) |
5585
|
1 |
|
|
5586
|
|
|
def _binary_init(self, data): |
5587
|
|
|
self.TypeId = NodeId.from_binary(data) |
5588
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
5589
|
|
|
self.Parameters = BrowseParameters.from_binary(data) |
5590
|
|
|
|
5591
|
|
|
def __str__(self): |
5592
|
|
|
return 'BrowseRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5593
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
5594
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
5595
|
|
|
|
5596
|
1 |
|
__repr__ = __str__ |
5597
|
1 |
|
|
5598
|
|
|
|
5599
|
|
|
class BrowseResponse(FrozenClass): |
5600
|
|
|
''' |
5601
|
1 |
|
Browse the references for one or more nodes from the server address space. |
5602
|
1 |
|
|
5603
|
1 |
|
:ivar TypeId: |
5604
|
1 |
|
:vartype TypeId: NodeId |
5605
|
|
|
:ivar ResponseHeader: |
5606
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
5607
|
1 |
|
:ivar Results: |
5608
|
1 |
|
:vartype Results: BrowseResult |
5609
|
1 |
|
:ivar DiagnosticInfos: |
5610
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
5611
|
1 |
|
''' |
5612
|
|
|
def __init__(self, binary=None): |
5613
|
1 |
|
if binary is not None: |
5614
|
|
|
self._binary_init(binary) |
5615
|
|
|
self._freeze = True |
5616
|
|
|
return |
5617
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary) |
5618
|
|
|
self.ResponseHeader = ResponseHeader() |
5619
|
|
|
self.Results = [] |
5620
|
|
|
self.DiagnosticInfos = [] |
5621
|
|
|
self._freeze = True |
5622
|
1 |
|
|
5623
|
|
|
def to_binary(self): |
5624
|
|
|
packet = [] |
5625
|
|
|
packet.append(self.TypeId.to_binary()) |
5626
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
5627
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
5628
|
|
|
for fieldname in self.Results: |
5629
|
|
|
packet.append(fieldname.to_binary()) |
5630
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
5631
|
|
|
for fieldname in self.DiagnosticInfos: |
5632
|
|
|
packet.append(fieldname.to_binary()) |
5633
|
|
|
return b''.join(packet) |
5634
|
|
|
|
5635
|
|
|
@staticmethod |
5636
|
|
|
def from_binary(data): |
5637
|
|
|
return BrowseResponse(data) |
5638
|
|
|
|
5639
|
|
|
def _binary_init(self, data): |
5640
|
|
|
self.TypeId = NodeId.from_binary(data) |
5641
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
5642
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5643
|
1 |
|
array = [] |
5644
|
1 |
|
if length != -1: |
5645
|
1 |
|
for _ in range(0, length): |
5646
|
1 |
|
array.append(BrowseResult.from_binary(data)) |
5647
|
1 |
|
self.Results = array |
5648
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
5649
|
1 |
|
array = [] |
5650
|
1 |
|
if length != -1: |
5651
|
1 |
|
for _ in range(0, length): |
5652
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
5653
|
|
|
self.DiagnosticInfos = array |
5654
|
1 |
|
|
5655
|
1 |
|
def __str__(self): |
5656
|
1 |
|
return 'BrowseResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5657
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
5658
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
5659
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
5660
|
1 |
|
|
5661
|
1 |
|
__repr__ = __str__ |
5662
|
1 |
|
|
5663
|
|
|
|
5664
|
1 |
|
class BrowseNextParameters(FrozenClass): |
5665
|
|
|
''' |
5666
|
1 |
|
:ivar ReleaseContinuationPoints: |
5667
|
|
|
:vartype ReleaseContinuationPoints: Boolean |
5668
|
1 |
|
:ivar ContinuationPoints: |
5669
|
|
|
:vartype ContinuationPoints: ByteString |
5670
|
1 |
|
''' |
5671
|
1 |
|
def __init__(self, binary=None): |
5672
|
1 |
|
if binary is not None: |
5673
|
1 |
|
self._binary_init(binary) |
5674
|
1 |
|
self._freeze = True |
5675
|
1 |
|
return |
5676
|
1 |
|
self.ReleaseContinuationPoints = True |
5677
|
1 |
|
self.ContinuationPoints = [] |
5678
|
1 |
|
self._freeze = True |
5679
|
1 |
|
|
5680
|
1 |
|
def to_binary(self): |
5681
|
1 |
|
packet = [] |
5682
|
1 |
|
packet.append(uatype_Boolean.pack(self.ReleaseContinuationPoints)) |
5683
|
|
|
packet.append(uatype_Int32.pack(len(self.ContinuationPoints))) |
5684
|
1 |
|
for fieldname in self.ContinuationPoints: |
5685
|
|
|
packet.append(pack_bytes(fieldname)) |
5686
|
1 |
|
return b''.join(packet) |
5687
|
|
|
|
5688
|
|
|
@staticmethod |
5689
|
|
|
def from_binary(data): |
5690
|
|
|
return BrowseNextParameters(data) |
5691
|
|
|
|
5692
|
1 |
|
def _binary_init(self, data): |
5693
|
|
|
self.ReleaseContinuationPoints = uatype_Boolean.unpack(data.read(1))[0] |
5694
|
|
|
self.ContinuationPoints = unpack_uatype_array('ByteString', data) |
5695
|
1 |
|
|
5696
|
|
|
def __str__(self): |
5697
|
|
|
return 'BrowseNextParameters(' + 'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \ |
5698
|
|
|
'ContinuationPoints:' + str(self.ContinuationPoints) + ')' |
5699
|
|
|
|
5700
|
|
|
__repr__ = __str__ |
5701
|
|
|
|
5702
|
1 |
|
|
5703
|
|
|
class BrowseNextRequest(FrozenClass): |
5704
|
|
|
''' |
5705
|
|
|
Continues one or more browse operations. |
5706
|
|
|
|
5707
|
|
|
:ivar TypeId: |
5708
|
|
|
:vartype TypeId: NodeId |
5709
|
|
|
:ivar RequestHeader: |
5710
|
|
|
:vartype RequestHeader: RequestHeader |
5711
|
1 |
|
:ivar Parameters: |
5712
|
|
|
:vartype Parameters: BrowseNextParameters |
5713
|
|
|
''' |
5714
|
|
|
def __init__(self, binary=None): |
5715
|
|
|
if binary is not None: |
5716
|
|
|
self._binary_init(binary) |
5717
|
|
|
self._freeze = True |
5718
|
|
|
return |
5719
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary) |
5720
|
|
|
self.RequestHeader = RequestHeader() |
5721
|
|
|
self.Parameters = BrowseNextParameters() |
5722
|
|
|
self._freeze = True |
5723
|
1 |
|
|
5724
|
|
|
def to_binary(self): |
5725
|
|
|
packet = [] |
5726
|
|
|
packet.append(self.TypeId.to_binary()) |
5727
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
5728
|
|
|
packet.append(self.Parameters.to_binary()) |
5729
|
|
|
return b''.join(packet) |
5730
|
|
|
|
5731
|
1 |
|
@staticmethod |
5732
|
|
|
def from_binary(data): |
5733
|
|
|
return BrowseNextRequest(data) |
5734
|
1 |
|
|
5735
|
|
|
def _binary_init(self, data): |
5736
|
|
|
self.TypeId = NodeId.from_binary(data) |
5737
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
5738
|
|
|
self.Parameters = BrowseNextParameters.from_binary(data) |
5739
|
|
|
|
5740
|
|
|
def __str__(self): |
5741
|
|
|
return 'BrowseNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5742
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
5743
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
5744
|
|
|
|
5745
|
1 |
|
__repr__ = __str__ |
5746
|
|
|
|
5747
|
|
|
|
5748
|
|
|
class BrowseNextResult(FrozenClass): |
5749
|
|
|
''' |
5750
|
|
|
:ivar Results: |
5751
|
|
|
:vartype Results: BrowseResult |
5752
|
|
|
:ivar DiagnosticInfos: |
5753
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
5754
|
|
|
''' |
5755
|
1 |
|
def __init__(self, binary=None): |
5756
|
|
|
if binary is not None: |
5757
|
|
|
self._binary_init(binary) |
5758
|
|
|
self._freeze = True |
5759
|
|
|
return |
5760
|
|
|
self.Results = [] |
5761
|
|
|
self.DiagnosticInfos = [] |
5762
|
1 |
|
self._freeze = True |
5763
|
|
|
|
5764
|
|
|
def to_binary(self): |
5765
|
|
|
packet = [] |
5766
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
5767
|
|
|
for fieldname in self.Results: |
5768
|
|
|
packet.append(fieldname.to_binary()) |
5769
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
5770
|
|
|
for fieldname in self.DiagnosticInfos: |
5771
|
1 |
|
packet.append(fieldname.to_binary()) |
5772
|
|
|
return b''.join(packet) |
5773
|
|
|
|
5774
|
|
|
@staticmethod |
5775
|
|
|
def from_binary(data): |
5776
|
1 |
|
return BrowseNextResult(data) |
5777
|
|
|
|
5778
|
|
|
def _binary_init(self, data): |
5779
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
5780
|
|
|
array = [] |
5781
|
|
|
if length != -1: |
5782
|
|
|
for _ in range(0, length): |
5783
|
|
|
array.append(BrowseResult.from_binary(data)) |
5784
|
|
|
self.Results = array |
5785
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5786
|
1 |
|
array = [] |
5787
|
|
|
if length != -1: |
5788
|
|
|
for _ in range(0, length): |
5789
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
5790
|
|
|
self.DiagnosticInfos = array |
5791
|
|
|
|
5792
|
|
|
def __str__(self): |
5793
|
|
|
return 'BrowseNextResult(' + 'Results:' + str(self.Results) + ', ' + \ |
5794
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
5795
|
1 |
|
|
5796
|
|
|
__repr__ = __str__ |
5797
|
|
|
|
5798
|
|
|
|
5799
|
|
|
class BrowseNextResponse(FrozenClass): |
5800
|
|
|
''' |
5801
|
|
|
Continues one or more browse operations. |
5802
|
|
|
|
5803
|
|
|
:ivar TypeId: |
5804
|
|
|
:vartype TypeId: NodeId |
5805
|
1 |
|
:ivar ResponseHeader: |
5806
|
|
|
:vartype ResponseHeader: ResponseHeader |
5807
|
|
|
:ivar Parameters: |
5808
|
|
|
:vartype Parameters: BrowseNextResult |
5809
|
1 |
|
''' |
5810
|
|
|
def __init__(self, binary=None): |
5811
|
|
|
if binary is not None: |
5812
|
|
|
self._binary_init(binary) |
5813
|
|
|
self._freeze = True |
5814
|
|
|
return |
5815
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary) |
5816
|
|
|
self.ResponseHeader = ResponseHeader() |
5817
|
|
|
self.Parameters = BrowseNextResult() |
5818
|
|
|
self._freeze = True |
5819
|
|
|
|
5820
|
|
|
def to_binary(self): |
5821
|
|
|
packet = [] |
5822
|
|
|
packet.append(self.TypeId.to_binary()) |
5823
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
5824
|
|
|
packet.append(self.Parameters.to_binary()) |
5825
|
|
|
return b''.join(packet) |
5826
|
|
|
|
5827
|
1 |
|
@staticmethod |
5828
|
|
|
def from_binary(data): |
5829
|
|
|
return BrowseNextResponse(data) |
5830
|
1 |
|
|
5831
|
|
|
def _binary_init(self, data): |
5832
|
|
|
self.TypeId = NodeId.from_binary(data) |
5833
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
5834
|
|
|
self.Parameters = BrowseNextResult.from_binary(data) |
5835
|
|
|
|
5836
|
|
|
def __str__(self): |
5837
|
|
|
return 'BrowseNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
5838
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
5839
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
5840
|
|
|
|
5841
|
1 |
|
__repr__ = __str__ |
5842
|
|
|
|
5843
|
|
|
|
5844
|
|
|
class RelativePathElement(FrozenClass): |
5845
|
|
|
''' |
5846
|
|
|
An element in a relative path. |
5847
|
|
|
|
5848
|
|
|
:ivar ReferenceTypeId: |
5849
|
|
|
:vartype ReferenceTypeId: NodeId |
5850
|
|
|
:ivar IsInverse: |
5851
|
1 |
|
:vartype IsInverse: Boolean |
5852
|
|
|
:ivar IncludeSubtypes: |
5853
|
|
|
:vartype IncludeSubtypes: Boolean |
5854
|
|
|
:ivar TargetName: |
5855
|
|
|
:vartype TargetName: QualifiedName |
5856
|
|
|
''' |
5857
|
|
|
def __init__(self, binary=None): |
5858
|
1 |
|
if binary is not None: |
5859
|
|
|
self._binary_init(binary) |
5860
|
|
|
self._freeze = True |
5861
|
|
|
return |
5862
|
1 |
|
self.ReferenceTypeId = NodeId() |
5863
|
|
|
self.IsInverse = True |
5864
|
|
|
self.IncludeSubtypes = True |
5865
|
|
|
self.TargetName = QualifiedName() |
5866
|
|
|
self._freeze = True |
5867
|
1 |
|
|
5868
|
|
|
def to_binary(self): |
5869
|
|
|
packet = [] |
5870
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
5871
|
|
|
packet.append(uatype_Boolean.pack(self.IsInverse)) |
5872
|
1 |
|
packet.append(uatype_Boolean.pack(self.IncludeSubtypes)) |
5873
|
|
|
packet.append(self.TargetName.to_binary()) |
5874
|
|
|
return b''.join(packet) |
5875
|
1 |
|
|
5876
|
|
|
@staticmethod |
5877
|
|
|
def from_binary(data): |
5878
|
|
|
return RelativePathElement(data) |
5879
|
|
|
|
5880
|
|
|
def _binary_init(self, data): |
5881
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
5882
|
|
|
self.IsInverse = uatype_Boolean.unpack(data.read(1))[0] |
5883
|
|
|
self.IncludeSubtypes = uatype_Boolean.unpack(data.read(1))[0] |
5884
|
|
|
self.TargetName = QualifiedName.from_binary(data) |
5885
|
|
|
|
5886
|
|
|
def __str__(self): |
5887
|
|
|
return 'RelativePathElement(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
5888
|
1 |
|
'IsInverse:' + str(self.IsInverse) + ', ' + \ |
5889
|
1 |
|
'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \ |
5890
|
1 |
|
'TargetName:' + str(self.TargetName) + ')' |
5891
|
1 |
|
|
5892
|
1 |
|
__repr__ = __str__ |
5893
|
1 |
|
|
5894
|
1 |
|
|
5895
|
1 |
|
class RelativePath(FrozenClass): |
5896
|
1 |
|
''' |
5897
|
1 |
|
A relative path constructed from reference types and browse names. |
5898
|
|
|
|
5899
|
1 |
|
:ivar Elements: |
5900
|
1 |
|
:vartype Elements: RelativePathElement |
5901
|
1 |
|
''' |
5902
|
1 |
|
def __init__(self, binary=None): |
5903
|
1 |
|
if binary is not None: |
5904
|
1 |
|
self._binary_init(binary) |
5905
|
1 |
|
self._freeze = True |
5906
|
|
|
return |
5907
|
1 |
|
self.Elements = [] |
5908
|
|
|
self._freeze = True |
5909
|
1 |
|
|
5910
|
|
|
def to_binary(self): |
5911
|
1 |
|
packet = [] |
5912
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Elements))) |
5913
|
1 |
|
for fieldname in self.Elements: |
5914
|
1 |
|
packet.append(fieldname.to_binary()) |
5915
|
1 |
|
return b''.join(packet) |
5916
|
|
|
|
5917
|
1 |
|
@staticmethod |
5918
|
|
|
def from_binary(data): |
5919
|
|
|
return RelativePath(data) |
5920
|
|
|
|
5921
|
|
|
def _binary_init(self, data): |
5922
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
5923
|
1 |
|
array = [] |
5924
|
|
|
if length != -1: |
5925
|
|
|
for _ in range(0, length): |
5926
|
1 |
|
array.append(RelativePathElement.from_binary(data)) |
5927
|
|
|
self.Elements = array |
5928
|
|
|
|
5929
|
|
|
def __str__(self): |
5930
|
|
|
return 'RelativePath(' + 'Elements:' + str(self.Elements) + ')' |
5931
|
|
|
|
5932
|
|
|
__repr__ = __str__ |
5933
|
1 |
|
|
5934
|
1 |
|
|
5935
|
1 |
|
class BrowsePath(FrozenClass): |
5936
|
1 |
|
''' |
5937
|
1 |
|
A request to translate a path into a node id. |
5938
|
1 |
|
|
5939
|
1 |
|
:ivar StartingNode: |
5940
|
|
|
:vartype StartingNode: NodeId |
5941
|
1 |
|
:ivar RelativePath: |
5942
|
1 |
|
:vartype RelativePath: RelativePath |
5943
|
1 |
|
''' |
5944
|
1 |
|
def __init__(self, binary=None): |
5945
|
1 |
|
if binary is not None: |
5946
|
1 |
|
self._binary_init(binary) |
5947
|
|
|
self._freeze = True |
5948
|
1 |
|
return |
5949
|
|
|
self.StartingNode = NodeId() |
5950
|
1 |
|
self.RelativePath = RelativePath() |
5951
|
|
|
self._freeze = True |
5952
|
1 |
|
|
5953
|
1 |
|
def to_binary(self): |
5954
|
1 |
|
packet = [] |
5955
|
1 |
|
packet.append(self.StartingNode.to_binary()) |
5956
|
1 |
|
packet.append(self.RelativePath.to_binary()) |
5957
|
1 |
|
return b''.join(packet) |
5958
|
1 |
|
|
5959
|
|
|
@staticmethod |
5960
|
1 |
|
def from_binary(data): |
5961
|
|
|
return BrowsePath(data) |
5962
|
|
|
|
5963
|
1 |
|
def _binary_init(self, data): |
5964
|
|
|
self.StartingNode = NodeId.from_binary(data) |
5965
|
|
|
self.RelativePath = RelativePath.from_binary(data) |
5966
|
1 |
|
|
5967
|
|
|
def __str__(self): |
5968
|
|
|
return 'BrowsePath(' + 'StartingNode:' + str(self.StartingNode) + ', ' + \ |
5969
|
|
|
'RelativePath:' + str(self.RelativePath) + ')' |
5970
|
|
|
|
5971
|
|
|
__repr__ = __str__ |
5972
|
|
|
|
5973
|
|
|
|
5974
|
|
|
class BrowsePathTarget(FrozenClass): |
5975
|
1 |
|
''' |
5976
|
1 |
|
The target of the translated path. |
5977
|
1 |
|
|
5978
|
1 |
|
:ivar TargetId: |
5979
|
1 |
|
:vartype TargetId: ExpandedNodeId |
5980
|
1 |
|
:ivar RemainingPathIndex: |
5981
|
1 |
|
:vartype RemainingPathIndex: UInt32 |
5982
|
1 |
|
''' |
5983
|
|
|
def __init__(self, binary=None): |
5984
|
1 |
|
if binary is not None: |
5985
|
1 |
|
self._binary_init(binary) |
5986
|
1 |
|
self._freeze = True |
5987
|
1 |
|
return |
5988
|
1 |
|
self.TargetId = ExpandedNodeId() |
5989
|
|
|
self.RemainingPathIndex = 0 |
5990
|
1 |
|
self._freeze = True |
5991
|
|
|
|
5992
|
1 |
|
def to_binary(self): |
5993
|
|
|
packet = [] |
5994
|
1 |
|
packet.append(self.TargetId.to_binary()) |
5995
|
1 |
|
packet.append(uatype_UInt32.pack(self.RemainingPathIndex)) |
5996
|
1 |
|
return b''.join(packet) |
5997
|
|
|
|
5998
|
1 |
|
@staticmethod |
5999
|
|
|
def from_binary(data): |
6000
|
|
|
return BrowsePathTarget(data) |
6001
|
|
|
|
6002
|
1 |
|
def _binary_init(self, data): |
6003
|
|
|
self.TargetId = ExpandedNodeId.from_binary(data) |
6004
|
|
|
self.RemainingPathIndex = uatype_UInt32.unpack(data.read(4))[0] |
6005
|
1 |
|
|
6006
|
|
|
def __str__(self): |
6007
|
|
|
return 'BrowsePathTarget(' + 'TargetId:' + str(self.TargetId) + ', ' + \ |
6008
|
|
|
'RemainingPathIndex:' + str(self.RemainingPathIndex) + ')' |
6009
|
|
|
|
6010
|
|
|
__repr__ = __str__ |
6011
|
|
|
|
6012
|
|
|
|
6013
|
|
|
class BrowsePathResult(FrozenClass): |
6014
|
1 |
|
''' |
6015
|
1 |
|
The result of a translate opearation. |
6016
|
1 |
|
|
6017
|
1 |
|
:ivar StatusCode: |
6018
|
1 |
|
:vartype StatusCode: StatusCode |
6019
|
1 |
|
:ivar Targets: |
6020
|
1 |
|
:vartype Targets: BrowsePathTarget |
6021
|
1 |
|
''' |
6022
|
|
|
def __init__(self, binary=None): |
6023
|
1 |
|
if binary is not None: |
6024
|
1 |
|
self._binary_init(binary) |
6025
|
1 |
|
self._freeze = True |
6026
|
1 |
|
return |
6027
|
1 |
|
self.StatusCode = StatusCode() |
6028
|
|
|
self.Targets = [] |
6029
|
1 |
|
self._freeze = True |
6030
|
|
|
|
6031
|
1 |
|
def to_binary(self): |
6032
|
|
|
packet = [] |
6033
|
1 |
|
packet.append(self.StatusCode.to_binary()) |
6034
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Targets))) |
6035
|
1 |
|
for fieldname in self.Targets: |
6036
|
|
|
packet.append(fieldname.to_binary()) |
6037
|
1 |
|
return b''.join(packet) |
6038
|
|
|
|
6039
|
|
|
@staticmethod |
6040
|
|
|
def from_binary(data): |
6041
|
1 |
|
return BrowsePathResult(data) |
6042
|
|
|
|
6043
|
|
|
def _binary_init(self, data): |
6044
|
1 |
|
self.StatusCode = StatusCode.from_binary(data) |
6045
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6046
|
|
|
array = [] |
6047
|
|
|
if length != -1: |
6048
|
|
|
for _ in range(0, length): |
6049
|
|
|
array.append(BrowsePathTarget.from_binary(data)) |
6050
|
|
|
self.Targets = array |
6051
|
|
|
|
6052
|
|
|
def __str__(self): |
6053
|
1 |
|
return 'BrowsePathResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
6054
|
1 |
|
'Targets:' + str(self.Targets) + ')' |
6055
|
1 |
|
|
6056
|
1 |
|
__repr__ = __str__ |
6057
|
1 |
|
|
6058
|
1 |
|
|
6059
|
1 |
|
class TranslateBrowsePathsToNodeIdsParameters(FrozenClass): |
6060
|
1 |
|
''' |
6061
|
|
|
:ivar BrowsePaths: |
6062
|
1 |
|
:vartype BrowsePaths: BrowsePath |
6063
|
1 |
|
''' |
6064
|
1 |
|
def __init__(self, binary=None): |
6065
|
1 |
|
if binary is not None: |
6066
|
1 |
|
self._binary_init(binary) |
6067
|
1 |
|
self._freeze = True |
6068
|
1 |
|
return |
6069
|
|
|
self.BrowsePaths = [] |
6070
|
1 |
|
self._freeze = True |
6071
|
|
|
|
6072
|
1 |
|
def to_binary(self): |
6073
|
|
|
packet = [] |
6074
|
1 |
|
packet.append(uatype_Int32.pack(len(self.BrowsePaths))) |
6075
|
1 |
|
for fieldname in self.BrowsePaths: |
6076
|
1 |
|
packet.append(fieldname.to_binary()) |
6077
|
1 |
|
return b''.join(packet) |
6078
|
1 |
|
|
6079
|
1 |
|
@staticmethod |
6080
|
1 |
|
def from_binary(data): |
6081
|
1 |
|
return TranslateBrowsePathsToNodeIdsParameters(data) |
6082
|
|
|
|
6083
|
1 |
|
def _binary_init(self, data): |
6084
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6085
|
|
|
array = [] |
6086
|
|
|
if length != -1: |
6087
|
1 |
|
for _ in range(0, length): |
6088
|
|
|
array.append(BrowsePath.from_binary(data)) |
6089
|
|
|
self.BrowsePaths = array |
6090
|
1 |
|
|
6091
|
|
|
def __str__(self): |
6092
|
|
|
return 'TranslateBrowsePathsToNodeIdsParameters(' + 'BrowsePaths:' + str(self.BrowsePaths) + ')' |
6093
|
|
|
|
6094
|
|
|
__repr__ = __str__ |
6095
|
1 |
|
|
6096
|
1 |
|
|
6097
|
1 |
|
class TranslateBrowsePathsToNodeIdsRequest(FrozenClass): |
6098
|
1 |
|
''' |
6099
|
1 |
|
Translates one or more paths in the server address space. |
6100
|
1 |
|
|
6101
|
1 |
|
:ivar TypeId: |
6102
|
|
|
:vartype TypeId: NodeId |
6103
|
1 |
|
:ivar RequestHeader: |
6104
|
1 |
|
:vartype RequestHeader: RequestHeader |
6105
|
1 |
|
:ivar Parameters: |
6106
|
1 |
|
:vartype Parameters: TranslateBrowsePathsToNodeIdsParameters |
6107
|
1 |
|
''' |
6108
|
1 |
|
def __init__(self, binary=None): |
6109
|
|
|
if binary is not None: |
6110
|
1 |
|
self._binary_init(binary) |
6111
|
|
|
self._freeze = True |
6112
|
1 |
|
return |
6113
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary) |
6114
|
1 |
|
self.RequestHeader = RequestHeader() |
6115
|
1 |
|
self.Parameters = TranslateBrowsePathsToNodeIdsParameters() |
6116
|
1 |
|
self._freeze = True |
6117
|
1 |
|
|
6118
|
1 |
|
def to_binary(self): |
6119
|
1 |
|
packet = [] |
6120
|
1 |
|
packet.append(self.TypeId.to_binary()) |
6121
|
|
|
packet.append(self.RequestHeader.to_binary()) |
6122
|
1 |
|
packet.append(self.Parameters.to_binary()) |
6123
|
|
|
return b''.join(packet) |
6124
|
|
|
|
6125
|
1 |
|
@staticmethod |
6126
|
|
|
def from_binary(data): |
6127
|
|
|
return TranslateBrowsePathsToNodeIdsRequest(data) |
6128
|
1 |
|
|
6129
|
|
|
def _binary_init(self, data): |
6130
|
|
|
self.TypeId = NodeId.from_binary(data) |
6131
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
6132
|
|
|
self.Parameters = TranslateBrowsePathsToNodeIdsParameters.from_binary(data) |
6133
|
|
|
|
6134
|
|
|
def __str__(self): |
6135
|
|
|
return 'TranslateBrowsePathsToNodeIdsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6136
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
6137
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
6138
|
|
|
|
6139
|
1 |
|
__repr__ = __str__ |
6140
|
1 |
|
|
6141
|
|
|
|
6142
|
|
|
class TranslateBrowsePathsToNodeIdsResponse(FrozenClass): |
6143
|
|
|
''' |
6144
|
1 |
|
Translates one or more paths in the server address space. |
6145
|
1 |
|
|
6146
|
1 |
|
:ivar TypeId: |
6147
|
1 |
|
:vartype TypeId: NodeId |
6148
|
|
|
:ivar ResponseHeader: |
6149
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
6150
|
1 |
|
:ivar Results: |
6151
|
1 |
|
:vartype Results: BrowsePathResult |
6152
|
1 |
|
:ivar DiagnosticInfos: |
6153
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
6154
|
1 |
|
''' |
6155
|
|
|
def __init__(self, binary=None): |
6156
|
1 |
|
if binary is not None: |
6157
|
|
|
self._binary_init(binary) |
6158
|
|
|
self._freeze = True |
6159
|
|
|
return |
6160
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary) |
6161
|
|
|
self.ResponseHeader = ResponseHeader() |
6162
|
|
|
self.Results = [] |
6163
|
|
|
self.DiagnosticInfos = [] |
6164
|
|
|
self._freeze = True |
6165
|
1 |
|
|
6166
|
|
|
def to_binary(self): |
6167
|
|
|
packet = [] |
6168
|
|
|
packet.append(self.TypeId.to_binary()) |
6169
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
6170
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
6171
|
|
|
for fieldname in self.Results: |
6172
|
|
|
packet.append(fieldname.to_binary()) |
6173
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
6174
|
|
|
for fieldname in self.DiagnosticInfos: |
6175
|
|
|
packet.append(fieldname.to_binary()) |
6176
|
|
|
return b''.join(packet) |
6177
|
|
|
|
6178
|
|
|
@staticmethod |
6179
|
|
|
def from_binary(data): |
6180
|
|
|
return TranslateBrowsePathsToNodeIdsResponse(data) |
6181
|
|
|
|
6182
|
|
|
def _binary_init(self, data): |
6183
|
|
|
self.TypeId = NodeId.from_binary(data) |
6184
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
6185
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6186
|
1 |
|
array = [] |
6187
|
1 |
|
if length != -1: |
6188
|
1 |
|
for _ in range(0, length): |
6189
|
1 |
|
array.append(BrowsePathResult.from_binary(data)) |
6190
|
1 |
|
self.Results = array |
6191
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
6192
|
1 |
|
array = [] |
6193
|
1 |
|
if length != -1: |
6194
|
1 |
|
for _ in range(0, length): |
6195
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
6196
|
|
|
self.DiagnosticInfos = array |
6197
|
1 |
|
|
6198
|
1 |
|
def __str__(self): |
6199
|
1 |
|
return 'TranslateBrowsePathsToNodeIdsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6200
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
6201
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
6202
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
6203
|
1 |
|
|
6204
|
1 |
|
__repr__ = __str__ |
6205
|
1 |
|
|
6206
|
|
|
|
6207
|
1 |
|
class RegisterNodesParameters(FrozenClass): |
6208
|
|
|
''' |
6209
|
1 |
|
:ivar NodesToRegister: |
6210
|
|
|
:vartype NodesToRegister: NodeId |
6211
|
1 |
|
''' |
6212
|
|
|
def __init__(self, binary=None): |
6213
|
1 |
|
if binary is not None: |
6214
|
1 |
|
self._binary_init(binary) |
6215
|
1 |
|
self._freeze = True |
6216
|
1 |
|
return |
6217
|
1 |
|
self.NodesToRegister = [] |
6218
|
1 |
|
self._freeze = True |
6219
|
1 |
|
|
6220
|
1 |
|
def to_binary(self): |
6221
|
1 |
|
packet = [] |
6222
|
1 |
|
packet.append(uatype_Int32.pack(len(self.NodesToRegister))) |
6223
|
1 |
|
for fieldname in self.NodesToRegister: |
6224
|
1 |
|
packet.append(fieldname.to_binary()) |
6225
|
1 |
|
return b''.join(packet) |
6226
|
|
|
|
6227
|
1 |
|
@staticmethod |
6228
|
|
|
def from_binary(data): |
6229
|
1 |
|
return RegisterNodesParameters(data) |
6230
|
|
|
|
6231
|
|
|
def _binary_init(self, data): |
6232
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6233
|
|
|
array = [] |
6234
|
|
|
if length != -1: |
6235
|
1 |
|
for _ in range(0, length): |
6236
|
|
|
array.append(NodeId.from_binary(data)) |
6237
|
|
|
self.NodesToRegister = array |
6238
|
1 |
|
|
6239
|
|
|
def __str__(self): |
6240
|
|
|
return 'RegisterNodesParameters(' + 'NodesToRegister:' + str(self.NodesToRegister) + ')' |
6241
|
|
|
|
6242
|
|
|
__repr__ = __str__ |
6243
|
1 |
|
|
6244
|
|
|
|
6245
|
|
|
class RegisterNodesRequest(FrozenClass): |
6246
|
|
|
''' |
6247
|
|
|
Registers one or more nodes for repeated use within a session. |
6248
|
|
|
|
6249
|
|
|
:ivar TypeId: |
6250
|
|
|
:vartype TypeId: NodeId |
6251
|
1 |
|
:ivar RequestHeader: |
6252
|
|
|
:vartype RequestHeader: RequestHeader |
6253
|
|
|
:ivar Parameters: |
6254
|
|
|
:vartype Parameters: RegisterNodesParameters |
6255
|
|
|
''' |
6256
|
|
|
def __init__(self, binary=None): |
6257
|
|
|
if binary is not None: |
6258
|
1 |
|
self._binary_init(binary) |
6259
|
|
|
self._freeze = True |
6260
|
|
|
return |
6261
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary) |
6262
|
1 |
|
self.RequestHeader = RequestHeader() |
6263
|
|
|
self.Parameters = RegisterNodesParameters() |
6264
|
|
|
self._freeze = True |
6265
|
|
|
|
6266
|
|
|
def to_binary(self): |
6267
|
|
|
packet = [] |
6268
|
|
|
packet.append(self.TypeId.to_binary()) |
6269
|
|
|
packet.append(self.RequestHeader.to_binary()) |
6270
|
1 |
|
packet.append(self.Parameters.to_binary()) |
6271
|
|
|
return b''.join(packet) |
6272
|
|
|
|
6273
|
1 |
|
@staticmethod |
6274
|
|
|
def from_binary(data): |
6275
|
|
|
return RegisterNodesRequest(data) |
6276
|
1 |
|
|
6277
|
|
|
def _binary_init(self, data): |
6278
|
|
|
self.TypeId = NodeId.from_binary(data) |
6279
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
6280
|
|
|
self.Parameters = RegisterNodesParameters.from_binary(data) |
6281
|
|
|
|
6282
|
|
|
def __str__(self): |
6283
|
|
|
return 'RegisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6284
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
6285
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
6286
|
|
|
|
6287
|
1 |
|
__repr__ = __str__ |
6288
|
|
|
|
6289
|
|
|
|
6290
|
|
|
class RegisterNodesResult(FrozenClass): |
6291
|
|
|
''' |
6292
|
|
|
:ivar RegisteredNodeIds: |
6293
|
|
|
:vartype RegisteredNodeIds: NodeId |
6294
|
|
|
''' |
6295
|
|
|
def __init__(self, binary=None): |
6296
|
|
|
if binary is not None: |
6297
|
1 |
|
self._binary_init(binary) |
6298
|
|
|
self._freeze = True |
6299
|
|
|
return |
6300
|
|
|
self.RegisteredNodeIds = [] |
6301
|
|
|
self._freeze = True |
6302
|
|
|
|
6303
|
|
|
def to_binary(self): |
6304
|
1 |
|
packet = [] |
6305
|
|
|
packet.append(uatype_Int32.pack(len(self.RegisteredNodeIds))) |
6306
|
|
|
for fieldname in self.RegisteredNodeIds: |
6307
|
|
|
packet.append(fieldname.to_binary()) |
6308
|
1 |
|
return b''.join(packet) |
6309
|
|
|
|
6310
|
|
|
@staticmethod |
6311
|
|
|
def from_binary(data): |
6312
|
|
|
return RegisterNodesResult(data) |
6313
|
1 |
|
|
6314
|
|
|
def _binary_init(self, data): |
6315
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6316
|
|
|
array = [] |
6317
|
|
|
if length != -1: |
6318
|
1 |
|
for _ in range(0, length): |
6319
|
|
|
array.append(NodeId.from_binary(data)) |
6320
|
|
|
self.RegisteredNodeIds = array |
6321
|
1 |
|
|
6322
|
|
|
def __str__(self): |
6323
|
|
|
return 'RegisterNodesResult(' + 'RegisteredNodeIds:' + str(self.RegisteredNodeIds) + ')' |
6324
|
|
|
|
6325
|
|
|
__repr__ = __str__ |
6326
|
1 |
|
|
6327
|
|
|
|
6328
|
|
|
class RegisterNodesResponse(FrozenClass): |
6329
|
|
|
''' |
6330
|
|
|
Registers one or more nodes for repeated use within a session. |
6331
|
|
|
|
6332
|
|
|
:ivar TypeId: |
6333
|
|
|
:vartype TypeId: NodeId |
6334
|
1 |
|
:ivar ResponseHeader: |
6335
|
|
|
:vartype ResponseHeader: ResponseHeader |
6336
|
|
|
:ivar Parameters: |
6337
|
|
|
:vartype Parameters: RegisterNodesResult |
6338
|
|
|
''' |
6339
|
|
|
def __init__(self, binary=None): |
6340
|
|
|
if binary is not None: |
6341
|
1 |
|
self._binary_init(binary) |
6342
|
|
|
self._freeze = True |
6343
|
|
|
return |
6344
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary) |
6345
|
1 |
|
self.ResponseHeader = ResponseHeader() |
6346
|
|
|
self.Parameters = RegisterNodesResult() |
6347
|
|
|
self._freeze = True |
6348
|
|
|
|
6349
|
|
|
def to_binary(self): |
6350
|
|
|
packet = [] |
6351
|
|
|
packet.append(self.TypeId.to_binary()) |
6352
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
6353
|
1 |
|
packet.append(self.Parameters.to_binary()) |
6354
|
|
|
return b''.join(packet) |
6355
|
|
|
|
6356
|
1 |
|
@staticmethod |
6357
|
|
|
def from_binary(data): |
6358
|
|
|
return RegisterNodesResponse(data) |
6359
|
1 |
|
|
6360
|
|
|
def _binary_init(self, data): |
6361
|
|
|
self.TypeId = NodeId.from_binary(data) |
6362
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
6363
|
|
|
self.Parameters = RegisterNodesResult.from_binary(data) |
6364
|
|
|
|
6365
|
|
|
def __str__(self): |
6366
|
|
|
return 'RegisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6367
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
6368
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
6369
|
|
|
|
6370
|
1 |
|
__repr__ = __str__ |
6371
|
|
|
|
6372
|
|
|
|
6373
|
|
|
class UnregisterNodesParameters(FrozenClass): |
6374
|
|
|
''' |
6375
|
|
|
:ivar NodesToUnregister: |
6376
|
|
|
:vartype NodesToUnregister: NodeId |
6377
|
|
|
''' |
6378
|
|
|
def __init__(self, binary=None): |
6379
|
|
|
if binary is not None: |
6380
|
1 |
|
self._binary_init(binary) |
6381
|
|
|
self._freeze = True |
6382
|
|
|
return |
6383
|
|
|
self.NodesToUnregister = [] |
6384
|
|
|
self._freeze = True |
6385
|
|
|
|
6386
|
|
|
def to_binary(self): |
6387
|
1 |
|
packet = [] |
6388
|
|
|
packet.append(uatype_Int32.pack(len(self.NodesToUnregister))) |
6389
|
|
|
for fieldname in self.NodesToUnregister: |
6390
|
|
|
packet.append(fieldname.to_binary()) |
6391
|
1 |
|
return b''.join(packet) |
6392
|
|
|
|
6393
|
|
|
@staticmethod |
6394
|
|
|
def from_binary(data): |
6395
|
|
|
return UnregisterNodesParameters(data) |
6396
|
1 |
|
|
6397
|
|
|
def _binary_init(self, data): |
6398
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6399
|
|
|
array = [] |
6400
|
|
|
if length != -1: |
6401
|
1 |
|
for _ in range(0, length): |
6402
|
|
|
array.append(NodeId.from_binary(data)) |
6403
|
|
|
self.NodesToUnregister = array |
6404
|
1 |
|
|
6405
|
|
|
def __str__(self): |
6406
|
|
|
return 'UnregisterNodesParameters(' + 'NodesToUnregister:' + str(self.NodesToUnregister) + ')' |
6407
|
|
|
|
6408
|
|
|
__repr__ = __str__ |
6409
|
1 |
|
|
6410
|
|
|
|
6411
|
|
|
class UnregisterNodesRequest(FrozenClass): |
6412
|
|
|
''' |
6413
|
|
|
Unregisters one or more previously registered nodes. |
6414
|
|
|
|
6415
|
|
|
:ivar TypeId: |
6416
|
|
|
:vartype TypeId: NodeId |
6417
|
1 |
|
:ivar RequestHeader: |
6418
|
|
|
:vartype RequestHeader: RequestHeader |
6419
|
|
|
:ivar Parameters: |
6420
|
|
|
:vartype Parameters: UnregisterNodesParameters |
6421
|
|
|
''' |
6422
|
|
|
def __init__(self, binary=None): |
6423
|
|
|
if binary is not None: |
6424
|
1 |
|
self._binary_init(binary) |
6425
|
|
|
self._freeze = True |
6426
|
|
|
return |
6427
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary) |
6428
|
1 |
|
self.RequestHeader = RequestHeader() |
6429
|
|
|
self.Parameters = UnregisterNodesParameters() |
6430
|
|
|
self._freeze = True |
6431
|
|
|
|
6432
|
|
|
def to_binary(self): |
6433
|
|
|
packet = [] |
6434
|
|
|
packet.append(self.TypeId.to_binary()) |
6435
|
|
|
packet.append(self.RequestHeader.to_binary()) |
6436
|
1 |
|
packet.append(self.Parameters.to_binary()) |
6437
|
|
|
return b''.join(packet) |
6438
|
|
|
|
6439
|
1 |
|
@staticmethod |
6440
|
|
|
def from_binary(data): |
6441
|
|
|
return UnregisterNodesRequest(data) |
6442
|
1 |
|
|
6443
|
|
|
def _binary_init(self, data): |
6444
|
|
|
self.TypeId = NodeId.from_binary(data) |
6445
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
6446
|
|
|
self.Parameters = UnregisterNodesParameters.from_binary(data) |
6447
|
|
|
|
6448
|
|
|
def __str__(self): |
6449
|
|
|
return 'UnregisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6450
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
6451
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
6452
|
|
|
|
6453
|
1 |
|
__repr__ = __str__ |
6454
|
|
|
|
6455
|
|
|
|
6456
|
|
|
class UnregisterNodesResponse(FrozenClass): |
6457
|
|
|
''' |
6458
|
|
|
Unregisters one or more previously registered nodes. |
6459
|
|
|
|
6460
|
|
|
:ivar TypeId: |
6461
|
|
|
:vartype TypeId: NodeId |
6462
|
|
|
:ivar ResponseHeader: |
6463
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
6464
|
|
|
''' |
6465
|
|
|
def __init__(self, binary=None): |
6466
|
|
|
if binary is not None: |
6467
|
|
|
self._binary_init(binary) |
6468
|
|
|
self._freeze = True |
6469
|
|
|
return |
6470
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary) |
6471
|
|
|
self.ResponseHeader = ResponseHeader() |
6472
|
|
|
self._freeze = True |
6473
|
|
|
|
6474
|
1 |
|
def to_binary(self): |
6475
|
|
|
packet = [] |
6476
|
|
|
packet.append(self.TypeId.to_binary()) |
6477
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
6478
|
|
|
return b''.join(packet) |
6479
|
1 |
|
|
6480
|
|
|
@staticmethod |
6481
|
|
|
def from_binary(data): |
6482
|
|
|
return UnregisterNodesResponse(data) |
6483
|
|
|
|
6484
|
1 |
|
def _binary_init(self, data): |
6485
|
|
|
self.TypeId = NodeId.from_binary(data) |
6486
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
6487
|
1 |
|
|
6488
|
|
|
def __str__(self): |
6489
|
|
|
return 'UnregisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
6490
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ')' |
6491
|
|
|
|
6492
|
|
|
__repr__ = __str__ |
6493
|
|
|
|
6494
|
|
|
|
6495
|
|
|
class EndpointConfiguration(FrozenClass): |
6496
|
1 |
|
''' |
6497
|
|
|
:ivar OperationTimeout: |
6498
|
|
|
:vartype OperationTimeout: Int32 |
6499
|
|
|
:ivar UseBinaryEncoding: |
6500
|
|
|
:vartype UseBinaryEncoding: Boolean |
6501
|
|
|
:ivar MaxStringLength: |
6502
|
|
|
:vartype MaxStringLength: Int32 |
6503
|
|
|
:ivar MaxByteStringLength: |
6504
|
|
|
:vartype MaxByteStringLength: Int32 |
6505
|
1 |
|
:ivar MaxArrayLength: |
6506
|
|
|
:vartype MaxArrayLength: Int32 |
6507
|
|
|
:ivar MaxMessageSize: |
6508
|
|
|
:vartype MaxMessageSize: Int32 |
6509
|
|
|
:ivar MaxBufferSize: |
6510
|
|
|
:vartype MaxBufferSize: Int32 |
6511
|
1 |
|
:ivar ChannelLifetime: |
6512
|
|
|
:vartype ChannelLifetime: Int32 |
6513
|
|
|
:ivar SecurityTokenLifetime: |
6514
|
|
|
:vartype SecurityTokenLifetime: Int32 |
6515
|
1 |
|
''' |
6516
|
|
|
def __init__(self, binary=None): |
6517
|
|
|
if binary is not None: |
6518
|
|
|
self._binary_init(binary) |
6519
|
1 |
|
self._freeze = True |
6520
|
|
|
return |
6521
|
|
|
self.OperationTimeout = 0 |
6522
|
|
|
self.UseBinaryEncoding = True |
6523
|
1 |
|
self.MaxStringLength = 0 |
6524
|
|
|
self.MaxByteStringLength = 0 |
6525
|
|
|
self.MaxArrayLength = 0 |
6526
|
1 |
|
self.MaxMessageSize = 0 |
6527
|
|
|
self.MaxBufferSize = 0 |
6528
|
|
|
self.ChannelLifetime = 0 |
6529
|
|
|
self.SecurityTokenLifetime = 0 |
6530
|
|
|
self._freeze = True |
6531
|
|
|
|
6532
|
|
|
def to_binary(self): |
6533
|
|
|
packet = [] |
6534
|
|
|
packet.append(uatype_Int32.pack(self.OperationTimeout)) |
6535
|
|
|
packet.append(uatype_Boolean.pack(self.UseBinaryEncoding)) |
6536
|
|
|
packet.append(uatype_Int32.pack(self.MaxStringLength)) |
6537
|
|
|
packet.append(uatype_Int32.pack(self.MaxByteStringLength)) |
6538
|
|
|
packet.append(uatype_Int32.pack(self.MaxArrayLength)) |
6539
|
|
|
packet.append(uatype_Int32.pack(self.MaxMessageSize)) |
6540
|
|
|
packet.append(uatype_Int32.pack(self.MaxBufferSize)) |
6541
|
|
|
packet.append(uatype_Int32.pack(self.ChannelLifetime)) |
6542
|
|
|
packet.append(uatype_Int32.pack(self.SecurityTokenLifetime)) |
6543
|
|
|
return b''.join(packet) |
6544
|
|
|
|
6545
|
|
|
@staticmethod |
6546
|
|
|
def from_binary(data): |
6547
|
1 |
|
return EndpointConfiguration(data) |
6548
|
|
|
|
6549
|
|
|
def _binary_init(self, data): |
6550
|
|
|
self.OperationTimeout = uatype_Int32.unpack(data.read(4))[0] |
6551
|
|
|
self.UseBinaryEncoding = uatype_Boolean.unpack(data.read(1))[0] |
6552
|
|
|
self.MaxStringLength = uatype_Int32.unpack(data.read(4))[0] |
6553
|
|
|
self.MaxByteStringLength = uatype_Int32.unpack(data.read(4))[0] |
6554
|
|
|
self.MaxArrayLength = uatype_Int32.unpack(data.read(4))[0] |
6555
|
|
|
self.MaxMessageSize = uatype_Int32.unpack(data.read(4))[0] |
6556
|
|
|
self.MaxBufferSize = uatype_Int32.unpack(data.read(4))[0] |
6557
|
|
|
self.ChannelLifetime = uatype_Int32.unpack(data.read(4))[0] |
6558
|
|
|
self.SecurityTokenLifetime = uatype_Int32.unpack(data.read(4))[0] |
6559
|
|
|
|
6560
|
|
|
def __str__(self): |
6561
|
|
|
return 'EndpointConfiguration(' + 'OperationTimeout:' + str(self.OperationTimeout) + ', ' + \ |
6562
|
|
|
'UseBinaryEncoding:' + str(self.UseBinaryEncoding) + ', ' + \ |
6563
|
1 |
|
'MaxStringLength:' + str(self.MaxStringLength) + ', ' + \ |
6564
|
|
|
'MaxByteStringLength:' + str(self.MaxByteStringLength) + ', ' + \ |
6565
|
|
|
'MaxArrayLength:' + str(self.MaxArrayLength) + ', ' + \ |
6566
|
|
|
'MaxMessageSize:' + str(self.MaxMessageSize) + ', ' + \ |
6567
|
|
|
'MaxBufferSize:' + str(self.MaxBufferSize) + ', ' + \ |
6568
|
|
|
'ChannelLifetime:' + str(self.ChannelLifetime) + ', ' + \ |
6569
|
|
|
'SecurityTokenLifetime:' + str(self.SecurityTokenLifetime) + ')' |
6570
|
|
|
|
6571
|
|
|
__repr__ = __str__ |
6572
|
|
|
|
6573
|
|
|
|
6574
|
|
|
class SupportedProfile(FrozenClass): |
6575
|
|
|
''' |
6576
|
1 |
|
:ivar OrganizationUri: |
6577
|
|
|
:vartype OrganizationUri: String |
6578
|
|
|
:ivar ProfileId: |
6579
|
|
|
:vartype ProfileId: String |
6580
|
1 |
|
:ivar ComplianceTool: |
6581
|
|
|
:vartype ComplianceTool: String |
6582
|
|
|
:ivar ComplianceDate: |
6583
|
|
|
:vartype ComplianceDate: DateTime |
6584
|
|
|
:ivar ComplianceLevel: |
6585
|
|
|
:vartype ComplianceLevel: ComplianceLevel |
6586
|
|
|
:ivar UnsupportedUnitIds: |
6587
|
|
|
:vartype UnsupportedUnitIds: String |
6588
|
|
|
''' |
6589
|
|
|
def __init__(self, binary=None): |
6590
|
|
|
if binary is not None: |
6591
|
1 |
|
self._binary_init(binary) |
6592
|
|
|
self._freeze = True |
6593
|
|
|
return |
6594
|
|
|
self.OrganizationUri = '' |
6595
|
|
|
self.ProfileId = '' |
6596
|
|
|
self.ComplianceTool = '' |
6597
|
|
|
self.ComplianceDate = datetime.now() |
6598
|
|
|
self.ComplianceLevel = ComplianceLevel(0) |
6599
|
|
|
self.UnsupportedUnitIds = [] |
6600
|
|
|
self._freeze = True |
6601
|
|
|
|
6602
|
1 |
|
def to_binary(self): |
6603
|
|
|
packet = [] |
6604
|
|
|
packet.append(pack_string(self.OrganizationUri)) |
6605
|
1 |
|
packet.append(pack_string(self.ProfileId)) |
6606
|
|
|
packet.append(pack_string(self.ComplianceTool)) |
6607
|
|
|
packet.append(pack_datetime(self.ComplianceDate)) |
6608
|
|
|
packet.append(uatype_UInt32.pack(self.ComplianceLevel.value)) |
6609
|
|
|
packet.append(uatype_Int32.pack(len(self.UnsupportedUnitIds))) |
6610
|
|
|
for fieldname in self.UnsupportedUnitIds: |
6611
|
|
|
packet.append(pack_string(fieldname)) |
6612
|
|
|
return b''.join(packet) |
6613
|
|
|
|
6614
|
|
|
@staticmethod |
6615
|
|
|
def from_binary(data): |
6616
|
|
|
return SupportedProfile(data) |
6617
|
|
|
|
6618
|
|
|
def _binary_init(self, data): |
6619
|
|
|
self.OrganizationUri = unpack_string(data) |
6620
|
1 |
|
self.ProfileId = unpack_string(data) |
6621
|
|
|
self.ComplianceTool = unpack_string(data) |
6622
|
|
|
self.ComplianceDate = unpack_datetime(data) |
6623
|
|
|
self.ComplianceLevel = ComplianceLevel(uatype_UInt32.unpack(data.read(4))[0]) |
6624
|
|
|
self.UnsupportedUnitIds = unpack_uatype_array('String', data) |
6625
|
|
|
|
6626
|
|
|
def __str__(self): |
6627
|
|
|
return 'SupportedProfile(' + 'OrganizationUri:' + str(self.OrganizationUri) + ', ' + \ |
6628
|
|
|
'ProfileId:' + str(self.ProfileId) + ', ' + \ |
6629
|
|
|
'ComplianceTool:' + str(self.ComplianceTool) + ', ' + \ |
6630
|
|
|
'ComplianceDate:' + str(self.ComplianceDate) + ', ' + \ |
6631
|
|
|
'ComplianceLevel:' + str(self.ComplianceLevel) + ', ' + \ |
6632
|
|
|
'UnsupportedUnitIds:' + str(self.UnsupportedUnitIds) + ')' |
6633
|
1 |
|
|
6634
|
|
|
__repr__ = __str__ |
6635
|
|
|
|
6636
|
|
|
|
6637
|
|
|
class SoftwareCertificate(FrozenClass): |
6638
|
|
|
''' |
6639
|
|
|
:ivar ProductName: |
6640
|
|
|
:vartype ProductName: String |
6641
|
|
|
:ivar ProductUri: |
6642
|
|
|
:vartype ProductUri: String |
6643
|
|
|
:ivar VendorName: |
6644
|
|
|
:vartype VendorName: String |
6645
|
1 |
|
:ivar VendorProductCertificate: |
6646
|
|
|
:vartype VendorProductCertificate: ByteString |
6647
|
|
|
:ivar SoftwareVersion: |
6648
|
|
|
:vartype SoftwareVersion: String |
6649
|
1 |
|
:ivar BuildNumber: |
6650
|
|
|
:vartype BuildNumber: String |
6651
|
|
|
:ivar BuildDate: |
6652
|
|
|
:vartype BuildDate: DateTime |
6653
|
|
|
:ivar IssuedBy: |
6654
|
|
|
:vartype IssuedBy: String |
6655
|
|
|
:ivar IssueDate: |
6656
|
|
|
:vartype IssueDate: DateTime |
6657
|
1 |
|
:ivar SupportedProfiles: |
6658
|
|
|
:vartype SupportedProfiles: SupportedProfile |
6659
|
|
|
''' |
6660
|
|
|
def __init__(self, binary=None): |
6661
|
|
|
if binary is not None: |
6662
|
|
|
self._binary_init(binary) |
6663
|
|
|
self._freeze = True |
6664
|
|
|
return |
6665
|
1 |
|
self.ProductName = '' |
6666
|
|
|
self.ProductUri = '' |
6667
|
|
|
self.VendorName = '' |
6668
|
1 |
|
self.VendorProductCertificate = b'' |
6669
|
|
|
self.SoftwareVersion = '' |
6670
|
|
|
self.BuildNumber = '' |
6671
|
|
|
self.BuildDate = datetime.now() |
6672
|
|
|
self.IssuedBy = '' |
6673
|
|
|
self.IssueDate = datetime.now() |
6674
|
|
|
self.SupportedProfiles = [] |
6675
|
|
|
self._freeze = True |
6676
|
|
|
|
6677
|
|
|
def to_binary(self): |
6678
|
|
|
packet = [] |
6679
|
|
|
packet.append(pack_string(self.ProductName)) |
6680
|
|
|
packet.append(pack_string(self.ProductUri)) |
6681
|
|
|
packet.append(pack_string(self.VendorName)) |
6682
|
|
|
packet.append(pack_bytes(self.VendorProductCertificate)) |
6683
|
|
|
packet.append(pack_string(self.SoftwareVersion)) |
6684
|
|
|
packet.append(pack_string(self.BuildNumber)) |
6685
|
|
|
packet.append(pack_datetime(self.BuildDate)) |
6686
|
|
|
packet.append(pack_string(self.IssuedBy)) |
6687
|
|
|
packet.append(pack_datetime(self.IssueDate)) |
6688
|
|
|
packet.append(uatype_Int32.pack(len(self.SupportedProfiles))) |
6689
|
|
|
for fieldname in self.SupportedProfiles: |
6690
|
|
|
packet.append(fieldname.to_binary()) |
6691
|
1 |
|
return b''.join(packet) |
6692
|
|
|
|
6693
|
|
|
@staticmethod |
6694
|
|
|
def from_binary(data): |
6695
|
|
|
return SoftwareCertificate(data) |
6696
|
|
|
|
6697
|
|
|
def _binary_init(self, data): |
6698
|
|
|
self.ProductName = unpack_string(data) |
6699
|
|
|
self.ProductUri = unpack_string(data) |
6700
|
|
|
self.VendorName = unpack_string(data) |
6701
|
|
|
self.VendorProductCertificate = unpack_bytes(data) |
6702
|
|
|
self.SoftwareVersion = unpack_string(data) |
6703
|
|
|
self.BuildNumber = unpack_string(data) |
6704
|
|
|
self.BuildDate = unpack_datetime(data) |
6705
|
|
|
self.IssuedBy = unpack_string(data) |
6706
|
|
|
self.IssueDate = unpack_datetime(data) |
6707
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6708
|
1 |
|
array = [] |
6709
|
|
|
if length != -1: |
6710
|
|
|
for _ in range(0, length): |
6711
|
|
|
array.append(SupportedProfile.from_binary(data)) |
6712
|
|
|
self.SupportedProfiles = array |
6713
|
|
|
|
6714
|
|
|
def __str__(self): |
6715
|
|
|
return 'SoftwareCertificate(' + 'ProductName:' + str(self.ProductName) + ', ' + \ |
6716
|
|
|
'ProductUri:' + str(self.ProductUri) + ', ' + \ |
6717
|
|
|
'VendorName:' + str(self.VendorName) + ', ' + \ |
6718
|
|
|
'VendorProductCertificate:' + str(self.VendorProductCertificate) + ', ' + \ |
6719
|
|
|
'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \ |
6720
|
|
|
'BuildNumber:' + str(self.BuildNumber) + ', ' + \ |
6721
|
|
|
'BuildDate:' + str(self.BuildDate) + ', ' + \ |
6722
|
|
|
'IssuedBy:' + str(self.IssuedBy) + ', ' + \ |
6723
|
|
|
'IssueDate:' + str(self.IssueDate) + ', ' + \ |
6724
|
1 |
|
'SupportedProfiles:' + str(self.SupportedProfiles) + ')' |
6725
|
|
|
|
6726
|
|
|
__repr__ = __str__ |
6727
|
|
|
|
6728
|
1 |
|
|
6729
|
|
|
class QueryDataDescription(FrozenClass): |
6730
|
|
|
''' |
6731
|
|
|
:ivar RelativePath: |
6732
|
|
|
:vartype RelativePath: RelativePath |
6733
|
|
|
:ivar AttributeId: |
6734
|
|
|
:vartype AttributeId: UInt32 |
6735
|
|
|
:ivar IndexRange: |
6736
|
|
|
:vartype IndexRange: String |
6737
|
|
|
''' |
6738
|
|
|
def __init__(self, binary=None): |
6739
|
|
|
if binary is not None: |
6740
|
|
|
self._binary_init(binary) |
6741
|
|
|
self._freeze = True |
6742
|
|
|
return |
6743
|
|
|
self.RelativePath = RelativePath() |
6744
|
|
|
self.AttributeId = 0 |
6745
|
1 |
|
self.IndexRange = '' |
6746
|
|
|
self._freeze = True |
6747
|
|
|
|
6748
|
|
|
def to_binary(self): |
6749
|
|
|
packet = [] |
6750
|
|
|
packet.append(self.RelativePath.to_binary()) |
6751
|
|
|
packet.append(uatype_UInt32.pack(self.AttributeId)) |
6752
|
|
|
packet.append(pack_string(self.IndexRange)) |
6753
|
|
|
return b''.join(packet) |
6754
|
|
|
|
6755
|
|
|
@staticmethod |
6756
|
|
|
def from_binary(data): |
6757
|
1 |
|
return QueryDataDescription(data) |
6758
|
|
|
|
6759
|
|
|
def _binary_init(self, data): |
6760
|
1 |
|
self.RelativePath = RelativePath.from_binary(data) |
6761
|
|
|
self.AttributeId = uatype_UInt32.unpack(data.read(4))[0] |
6762
|
|
|
self.IndexRange = unpack_string(data) |
6763
|
|
|
|
6764
|
|
|
def __str__(self): |
6765
|
|
|
return 'QueryDataDescription(' + 'RelativePath:' + str(self.RelativePath) + ', ' + \ |
6766
|
|
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
6767
|
|
|
'IndexRange:' + str(self.IndexRange) + ')' |
6768
|
|
|
|
6769
|
1 |
|
__repr__ = __str__ |
6770
|
|
|
|
6771
|
|
|
|
6772
|
|
|
class NodeTypeDescription(FrozenClass): |
6773
|
|
|
''' |
6774
|
|
|
:ivar TypeDefinitionNode: |
6775
|
|
|
:vartype TypeDefinitionNode: ExpandedNodeId |
6776
|
|
|
:ivar IncludeSubTypes: |
6777
|
|
|
:vartype IncludeSubTypes: Boolean |
6778
|
|
|
:ivar DataToReturn: |
6779
|
1 |
|
:vartype DataToReturn: QueryDataDescription |
6780
|
|
|
''' |
6781
|
|
|
def __init__(self, binary=None): |
6782
|
|
|
if binary is not None: |
6783
|
|
|
self._binary_init(binary) |
6784
|
|
|
self._freeze = True |
6785
|
|
|
return |
6786
|
1 |
|
self.TypeDefinitionNode = ExpandedNodeId() |
6787
|
|
|
self.IncludeSubTypes = True |
6788
|
|
|
self.DataToReturn = [] |
6789
|
|
|
self._freeze = True |
6790
|
1 |
|
|
6791
|
|
|
def to_binary(self): |
6792
|
|
|
packet = [] |
6793
|
|
|
packet.append(self.TypeDefinitionNode.to_binary()) |
6794
|
|
|
packet.append(uatype_Boolean.pack(self.IncludeSubTypes)) |
6795
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DataToReturn))) |
6796
|
|
|
for fieldname in self.DataToReturn: |
6797
|
|
|
packet.append(fieldname.to_binary()) |
6798
|
|
|
return b''.join(packet) |
6799
|
|
|
|
6800
|
1 |
|
@staticmethod |
6801
|
|
|
def from_binary(data): |
6802
|
|
|
return NodeTypeDescription(data) |
6803
|
1 |
|
|
6804
|
|
|
def _binary_init(self, data): |
6805
|
|
|
self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
6806
|
|
|
self.IncludeSubTypes = uatype_Boolean.unpack(data.read(1))[0] |
6807
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6808
|
|
|
array = [] |
6809
|
|
|
if length != -1: |
6810
|
|
|
for _ in range(0, length): |
6811
|
|
|
array.append(QueryDataDescription.from_binary(data)) |
6812
|
1 |
|
self.DataToReturn = array |
6813
|
|
|
|
6814
|
|
|
def __str__(self): |
6815
|
|
|
return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
6816
|
|
|
'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \ |
6817
|
|
|
'DataToReturn:' + str(self.DataToReturn) + ')' |
6818
|
|
|
|
6819
|
|
|
__repr__ = __str__ |
6820
|
|
|
|
6821
|
|
|
|
6822
|
1 |
|
class QueryDataSet(FrozenClass): |
6823
|
|
|
''' |
6824
|
|
|
:ivar NodeId: |
6825
|
|
|
:vartype NodeId: ExpandedNodeId |
6826
|
|
|
:ivar TypeDefinitionNode: |
6827
|
|
|
:vartype TypeDefinitionNode: ExpandedNodeId |
6828
|
|
|
:ivar Values: |
6829
|
|
|
:vartype Values: Variant |
6830
|
|
|
''' |
6831
|
1 |
|
def __init__(self, binary=None): |
6832
|
|
|
if binary is not None: |
6833
|
|
|
self._binary_init(binary) |
6834
|
|
|
self._freeze = True |
6835
|
1 |
|
return |
6836
|
|
|
self.NodeId = ExpandedNodeId() |
6837
|
|
|
self.TypeDefinitionNode = ExpandedNodeId() |
6838
|
|
|
self.Values = [] |
6839
|
|
|
self._freeze = True |
6840
|
|
|
|
6841
|
|
|
def to_binary(self): |
6842
|
|
|
packet = [] |
6843
|
|
|
packet.append(self.NodeId.to_binary()) |
6844
|
|
|
packet.append(self.TypeDefinitionNode.to_binary()) |
6845
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Values))) |
6846
|
|
|
for fieldname in self.Values: |
6847
|
|
|
packet.append(fieldname.to_binary()) |
6848
|
|
|
return b''.join(packet) |
6849
|
|
|
|
6850
|
1 |
|
@staticmethod |
6851
|
|
|
def from_binary(data): |
6852
|
|
|
return QueryDataSet(data) |
6853
|
1 |
|
|
6854
|
|
|
def _binary_init(self, data): |
6855
|
|
|
self.NodeId = ExpandedNodeId.from_binary(data) |
6856
|
|
|
self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
6857
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6858
|
|
|
array = [] |
6859
|
|
|
if length != -1: |
6860
|
|
|
for _ in range(0, length): |
6861
|
|
|
array.append(Variant.from_binary(data)) |
6862
|
1 |
|
self.Values = array |
6863
|
|
|
|
6864
|
|
|
def __str__(self): |
6865
|
|
|
return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
6866
|
|
|
'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
6867
|
|
|
'Values:' + str(self.Values) + ')' |
6868
|
|
|
|
6869
|
|
|
__repr__ = __str__ |
6870
|
|
|
|
6871
|
|
|
|
6872
|
1 |
|
class NodeReference(FrozenClass): |
6873
|
|
|
''' |
6874
|
|
|
:ivar NodeId: |
6875
|
|
|
:vartype NodeId: NodeId |
6876
|
|
|
:ivar ReferenceTypeId: |
6877
|
|
|
:vartype ReferenceTypeId: NodeId |
6878
|
|
|
:ivar IsForward: |
6879
|
|
|
:vartype IsForward: Boolean |
6880
|
|
|
:ivar ReferencedNodeIds: |
6881
|
1 |
|
:vartype ReferencedNodeIds: NodeId |
6882
|
|
|
''' |
6883
|
|
|
def __init__(self, binary=None): |
6884
|
|
|
if binary is not None: |
6885
|
1 |
|
self._binary_init(binary) |
6886
|
|
|
self._freeze = True |
6887
|
|
|
return |
6888
|
|
|
self.NodeId = NodeId() |
6889
|
|
|
self.ReferenceTypeId = NodeId() |
6890
|
|
|
self.IsForward = True |
6891
|
|
|
self.ReferencedNodeIds = [] |
6892
|
|
|
self._freeze = True |
6893
|
|
|
|
6894
|
|
|
def to_binary(self): |
6895
|
1 |
|
packet = [] |
6896
|
|
|
packet.append(self.NodeId.to_binary()) |
6897
|
|
|
packet.append(self.ReferenceTypeId.to_binary()) |
6898
|
|
|
packet.append(uatype_Boolean.pack(self.IsForward)) |
6899
|
|
|
packet.append(uatype_Int32.pack(len(self.ReferencedNodeIds))) |
6900
|
1 |
|
for fieldname in self.ReferencedNodeIds: |
6901
|
|
|
packet.append(fieldname.to_binary()) |
6902
|
|
|
return b''.join(packet) |
6903
|
1 |
|
|
6904
|
|
|
@staticmethod |
6905
|
|
|
def from_binary(data): |
6906
|
|
|
return NodeReference(data) |
6907
|
|
|
|
6908
|
|
|
def _binary_init(self, data): |
6909
|
|
|
self.NodeId = NodeId.from_binary(data) |
6910
|
|
|
self.ReferenceTypeId = NodeId.from_binary(data) |
6911
|
|
|
self.IsForward = uatype_Boolean.unpack(data.read(1))[0] |
6912
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6913
|
|
|
array = [] |
6914
|
1 |
|
if length != -1: |
6915
|
|
|
for _ in range(0, length): |
6916
|
|
|
array.append(NodeId.from_binary(data)) |
6917
|
|
|
self.ReferencedNodeIds = array |
6918
|
|
|
|
6919
|
|
|
def __str__(self): |
6920
|
|
|
return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
6921
|
|
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
6922
|
|
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
6923
|
|
|
'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')' |
6924
|
|
|
|
6925
|
1 |
|
__repr__ = __str__ |
6926
|
|
|
|
6927
|
|
|
|
6928
|
|
|
class ContentFilterElement(FrozenClass): |
6929
|
|
|
''' |
6930
|
|
|
:ivar FilterOperator: |
6931
|
|
|
:vartype FilterOperator: FilterOperator |
6932
|
|
|
:ivar FilterOperands: |
6933
|
|
|
:vartype FilterOperands: ExtensionObject |
6934
|
|
|
''' |
6935
|
1 |
|
def __init__(self, binary=None): |
6936
|
|
|
if binary is not None: |
6937
|
|
|
self._binary_init(binary) |
6938
|
|
|
self._freeze = True |
6939
|
1 |
|
return |
6940
|
|
|
self.FilterOperator = FilterOperator(0) |
6941
|
|
|
self.FilterOperands = [] |
6942
|
|
|
self._freeze = True |
6943
|
|
|
|
6944
|
|
|
def to_binary(self): |
6945
|
|
|
packet = [] |
6946
|
|
|
packet.append(uatype_UInt32.pack(self.FilterOperator.value)) |
6947
|
|
|
packet.append(uatype_Int32.pack(len(self.FilterOperands))) |
6948
|
|
|
for fieldname in self.FilterOperands: |
6949
|
|
|
packet.append(extensionobject_to_binary(fieldname)) |
6950
|
1 |
|
return b''.join(packet) |
6951
|
|
|
|
6952
|
|
|
@staticmethod |
6953
|
|
|
def from_binary(data): |
6954
|
|
|
return ContentFilterElement(data) |
6955
|
|
|
|
6956
|
1 |
|
def _binary_init(self, data): |
6957
|
|
|
self.FilterOperator = FilterOperator(uatype_UInt32.unpack(data.read(4))[0]) |
6958
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6959
|
1 |
|
array = [] |
6960
|
|
|
if length != -1: |
6961
|
|
|
for _ in range(0, length): |
6962
|
|
|
array.append(extensionobject_from_binary(data)) |
6963
|
|
|
self.FilterOperands = array |
6964
|
|
|
|
6965
|
|
|
def __str__(self): |
6966
|
1 |
|
return 'ContentFilterElement(' + 'FilterOperator:' + str(self.FilterOperator) + ', ' + \ |
6967
|
|
|
'FilterOperands:' + str(self.FilterOperands) + ')' |
6968
|
|
|
|
6969
|
|
|
__repr__ = __str__ |
6970
|
|
|
|
6971
|
|
|
|
6972
|
|
|
class ContentFilter(FrozenClass): |
6973
|
|
|
''' |
6974
|
|
|
:ivar Elements: |
6975
|
1 |
|
:vartype Elements: ContentFilterElement |
6976
|
|
|
''' |
6977
|
|
|
def __init__(self, binary=None): |
6978
|
|
|
if binary is not None: |
6979
|
|
|
self._binary_init(binary) |
6980
|
|
|
self._freeze = True |
6981
|
|
|
return |
6982
|
|
|
self.Elements = [] |
6983
|
1 |
|
self._freeze = True |
6984
|
|
|
|
6985
|
|
|
def to_binary(self): |
6986
|
|
|
packet = [] |
6987
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Elements))) |
6988
|
|
|
for fieldname in self.Elements: |
6989
|
|
|
packet.append(fieldname.to_binary()) |
6990
|
|
|
return b''.join(packet) |
6991
|
|
|
|
6992
|
|
|
@staticmethod |
6993
|
|
|
def from_binary(data): |
6994
|
|
|
return ContentFilter(data) |
6995
|
|
|
|
6996
|
1 |
|
def _binary_init(self, data): |
6997
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
6998
|
|
|
array = [] |
6999
|
|
|
if length != -1: |
7000
|
1 |
|
for _ in range(0, length): |
7001
|
|
|
array.append(ContentFilterElement.from_binary(data)) |
7002
|
|
|
self.Elements = array |
7003
|
1 |
|
|
7004
|
|
|
def __str__(self): |
7005
|
|
|
return 'ContentFilter(' + 'Elements:' + str(self.Elements) + ')' |
7006
|
|
|
|
7007
|
|
|
__repr__ = __str__ |
7008
|
1 |
|
|
7009
|
1 |
|
|
7010
|
1 |
|
class ElementOperand(FrozenClass): |
7011
|
1 |
|
''' |
7012
|
1 |
|
:ivar Index: |
7013
|
1 |
|
:vartype Index: UInt32 |
7014
|
1 |
|
''' |
7015
|
|
|
def __init__(self, binary=None): |
7016
|
1 |
|
if binary is not None: |
7017
|
1 |
|
self._binary_init(binary) |
7018
|
1 |
|
self._freeze = True |
7019
|
1 |
|
return |
7020
|
|
|
self.Index = 0 |
7021
|
1 |
|
self._freeze = True |
7022
|
|
|
|
7023
|
1 |
|
def to_binary(self): |
7024
|
|
|
packet = [] |
7025
|
1 |
|
packet.append(uatype_UInt32.pack(self.Index)) |
7026
|
|
|
return b''.join(packet) |
7027
|
1 |
|
|
7028
|
1 |
|
@staticmethod |
7029
|
1 |
|
def from_binary(data): |
7030
|
1 |
|
return ElementOperand(data) |
7031
|
1 |
|
|
7032
|
|
|
def _binary_init(self, data): |
7033
|
1 |
|
self.Index = uatype_UInt32.unpack(data.read(4))[0] |
7034
|
|
|
|
7035
|
1 |
|
def __str__(self): |
7036
|
|
|
return 'ElementOperand(' + 'Index:' + str(self.Index) + ')' |
7037
|
|
|
|
7038
|
1 |
|
__repr__ = __str__ |
7039
|
|
|
|
7040
|
|
|
|
7041
|
1 |
|
class LiteralOperand(FrozenClass): |
7042
|
|
|
''' |
7043
|
|
|
:ivar Value: |
7044
|
|
|
:vartype Value: Variant |
7045
|
|
|
''' |
7046
|
1 |
|
def __init__(self, binary=None): |
7047
|
|
|
if binary is not None: |
7048
|
|
|
self._binary_init(binary) |
7049
|
|
|
self._freeze = True |
7050
|
|
|
return |
7051
|
|
|
self.Value = Variant() |
7052
|
|
|
self._freeze = True |
7053
|
|
|
|
7054
|
1 |
|
def to_binary(self): |
7055
|
|
|
packet = [] |
7056
|
|
|
packet.append(self.Value.to_binary()) |
7057
|
|
|
return b''.join(packet) |
7058
|
|
|
|
7059
|
1 |
|
@staticmethod |
7060
|
|
|
def from_binary(data): |
7061
|
|
|
return LiteralOperand(data) |
7062
|
|
|
|
7063
|
1 |
|
def _binary_init(self, data): |
7064
|
|
|
self.Value = Variant.from_binary(data) |
7065
|
|
|
|
7066
|
1 |
|
def __str__(self): |
7067
|
|
|
return 'LiteralOperand(' + 'Value:' + str(self.Value) + ')' |
7068
|
|
|
|
7069
|
1 |
|
__repr__ = __str__ |
7070
|
|
|
|
7071
|
|
|
|
7072
|
1 |
|
class AttributeOperand(FrozenClass): |
7073
|
|
|
''' |
7074
|
|
|
:ivar NodeId: |
7075
|
|
|
:vartype NodeId: NodeId |
7076
|
|
|
:ivar Alias: |
7077
|
1 |
|
:vartype Alias: String |
7078
|
|
|
:ivar BrowsePath: |
7079
|
|
|
:vartype BrowsePath: RelativePath |
7080
|
|
|
:ivar AttributeId: |
7081
|
|
|
:vartype AttributeId: UInt32 |
7082
|
|
|
:ivar IndexRange: |
7083
|
|
|
:vartype IndexRange: String |
7084
|
|
|
''' |
7085
|
1 |
|
def __init__(self, binary=None): |
7086
|
|
|
if binary is not None: |
7087
|
|
|
self._binary_init(binary) |
7088
|
|
|
self._freeze = True |
7089
|
|
|
return |
7090
|
1 |
|
self.NodeId = NodeId() |
7091
|
|
|
self.Alias = '' |
7092
|
|
|
self.BrowsePath = RelativePath() |
7093
|
|
|
self.AttributeId = 0 |
7094
|
1 |
|
self.IndexRange = '' |
7095
|
|
|
self._freeze = True |
7096
|
|
|
|
7097
|
1 |
|
def to_binary(self): |
7098
|
|
|
packet = [] |
7099
|
|
|
packet.append(self.NodeId.to_binary()) |
7100
|
1 |
|
packet.append(pack_string(self.Alias)) |
7101
|
|
|
packet.append(self.BrowsePath.to_binary()) |
7102
|
|
|
packet.append(uatype_UInt32.pack(self.AttributeId)) |
7103
|
1 |
|
packet.append(pack_string(self.IndexRange)) |
7104
|
|
|
return b''.join(packet) |
7105
|
|
|
|
7106
|
|
|
@staticmethod |
7107
|
|
|
def from_binary(data): |
7108
|
|
|
return AttributeOperand(data) |
7109
|
|
|
|
7110
|
|
|
def _binary_init(self, data): |
7111
|
|
|
self.NodeId = NodeId.from_binary(data) |
7112
|
|
|
self.Alias = unpack_string(data) |
7113
|
|
|
self.BrowsePath = RelativePath.from_binary(data) |
7114
|
|
|
self.AttributeId = uatype_UInt32.unpack(data.read(4))[0] |
7115
|
|
|
self.IndexRange = unpack_string(data) |
7116
|
1 |
|
|
7117
|
|
|
def __str__(self): |
7118
|
|
|
return 'AttributeOperand(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
7119
|
|
|
'Alias:' + str(self.Alias) + ', ' + \ |
7120
|
|
|
'BrowsePath:' + str(self.BrowsePath) + ', ' + \ |
7121
|
|
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
7122
|
|
|
'IndexRange:' + str(self.IndexRange) + ')' |
7123
|
|
|
|
7124
|
|
|
__repr__ = __str__ |
7125
|
|
|
|
7126
|
|
|
|
7127
|
|
|
class SimpleAttributeOperand(FrozenClass): |
7128
|
1 |
|
''' |
7129
|
|
|
:ivar TypeDefinitionId: |
7130
|
|
|
:vartype TypeDefinitionId: NodeId |
7131
|
|
|
:ivar BrowsePath: |
7132
|
|
|
:vartype BrowsePath: QualifiedName |
7133
|
|
|
:ivar AttributeId: |
7134
|
|
|
:vartype AttributeId: UInt32 |
7135
|
|
|
:ivar IndexRange: |
7136
|
|
|
:vartype IndexRange: String |
7137
|
1 |
|
''' |
7138
|
|
|
def __init__(self, binary=None): |
7139
|
|
|
if binary is not None: |
7140
|
|
|
self._binary_init(binary) |
7141
|
1 |
|
self._freeze = True |
7142
|
|
|
return |
7143
|
|
|
self.TypeDefinitionId = NodeId() |
7144
|
|
|
self.BrowsePath = [] |
7145
|
|
|
self.AttributeId = 0 |
7146
|
|
|
self.IndexRange = '' |
7147
|
|
|
self._freeze = True |
7148
|
1 |
|
|
7149
|
|
|
def to_binary(self): |
7150
|
|
|
packet = [] |
7151
|
|
|
packet.append(self.TypeDefinitionId.to_binary()) |
7152
|
|
|
packet.append(uatype_Int32.pack(len(self.BrowsePath))) |
7153
|
|
|
for fieldname in self.BrowsePath: |
7154
|
|
|
packet.append(fieldname.to_binary()) |
7155
|
1 |
|
packet.append(uatype_UInt32.pack(self.AttributeId)) |
7156
|
|
|
packet.append(pack_string(self.IndexRange)) |
7157
|
|
|
return b''.join(packet) |
7158
|
1 |
|
|
7159
|
|
|
@staticmethod |
7160
|
|
|
def from_binary(data): |
7161
|
|
|
return SimpleAttributeOperand(data) |
7162
|
|
|
|
7163
|
|
|
def _binary_init(self, data): |
7164
|
|
|
self.TypeDefinitionId = NodeId.from_binary(data) |
7165
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7166
|
|
|
array = [] |
7167
|
|
|
if length != -1: |
7168
|
|
|
for _ in range(0, length): |
7169
|
1 |
|
array.append(QualifiedName.from_binary(data)) |
7170
|
1 |
|
self.BrowsePath = array |
7171
|
1 |
|
self.AttributeId = uatype_UInt32.unpack(data.read(4))[0] |
7172
|
1 |
|
self.IndexRange = unpack_string(data) |
7173
|
1 |
|
|
7174
|
1 |
|
def __str__(self): |
7175
|
1 |
|
return 'SimpleAttributeOperand(' + 'TypeDefinitionId:' + str(self.TypeDefinitionId) + ', ' + \ |
7176
|
1 |
|
'BrowsePath:' + str(self.BrowsePath) + ', ' + \ |
7177
|
1 |
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
7178
|
1 |
|
'IndexRange:' + str(self.IndexRange) + ')' |
7179
|
|
|
|
7180
|
1 |
|
__repr__ = __str__ |
7181
|
1 |
|
|
7182
|
1 |
|
|
7183
|
1 |
|
class ContentFilterElementResult(FrozenClass): |
7184
|
1 |
|
''' |
7185
|
1 |
|
:ivar StatusCode: |
7186
|
1 |
|
:vartype StatusCode: StatusCode |
7187
|
1 |
|
:ivar OperandStatusCodes: |
7188
|
1 |
|
:vartype OperandStatusCodes: StatusCode |
7189
|
|
|
:ivar OperandDiagnosticInfos: |
7190
|
1 |
|
:vartype OperandDiagnosticInfos: DiagnosticInfo |
7191
|
|
|
''' |
7192
|
1 |
|
def __init__(self, binary=None): |
7193
|
|
|
if binary is not None: |
7194
|
1 |
|
self._binary_init(binary) |
7195
|
1 |
|
self._freeze = True |
7196
|
1 |
|
return |
7197
|
1 |
|
self.StatusCode = StatusCode() |
7198
|
1 |
|
self.OperandStatusCodes = [] |
7199
|
1 |
|
self.OperandDiagnosticInfos = [] |
7200
|
1 |
|
self._freeze = True |
7201
|
1 |
|
|
7202
|
1 |
|
def to_binary(self): |
7203
|
1 |
|
packet = [] |
7204
|
|
|
packet.append(self.StatusCode.to_binary()) |
7205
|
1 |
|
packet.append(uatype_Int32.pack(len(self.OperandStatusCodes))) |
7206
|
|
|
for fieldname in self.OperandStatusCodes: |
7207
|
|
|
packet.append(fieldname.to_binary()) |
7208
|
|
|
packet.append(uatype_Int32.pack(len(self.OperandDiagnosticInfos))) |
7209
|
|
|
for fieldname in self.OperandDiagnosticInfos: |
7210
|
|
|
packet.append(fieldname.to_binary()) |
7211
|
1 |
|
return b''.join(packet) |
7212
|
|
|
|
7213
|
|
|
@staticmethod |
7214
|
1 |
|
def from_binary(data): |
7215
|
|
|
return ContentFilterElementResult(data) |
7216
|
|
|
|
7217
|
|
|
def _binary_init(self, data): |
7218
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
7219
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7220
|
|
|
array = [] |
7221
|
|
|
if length != -1: |
7222
|
|
|
for _ in range(0, length): |
7223
|
1 |
|
array.append(StatusCode.from_binary(data)) |
7224
|
|
|
self.OperandStatusCodes = array |
7225
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7226
|
|
|
array = [] |
7227
|
|
|
if length != -1: |
7228
|
|
|
for _ in range(0, length): |
7229
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
7230
|
|
|
self.OperandDiagnosticInfos = array |
7231
|
|
|
|
7232
|
|
|
def __str__(self): |
7233
|
1 |
|
return 'ContentFilterElementResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
7234
|
|
|
'OperandStatusCodes:' + str(self.OperandStatusCodes) + ', ' + \ |
7235
|
|
|
'OperandDiagnosticInfos:' + str(self.OperandDiagnosticInfos) + ')' |
7236
|
|
|
|
7237
|
|
|
__repr__ = __str__ |
7238
|
|
|
|
7239
|
|
|
|
7240
|
|
|
class ContentFilterResult(FrozenClass): |
7241
|
|
|
''' |
7242
|
|
|
:ivar ElementResults: |
7243
|
|
|
:vartype ElementResults: ContentFilterElementResult |
7244
|
1 |
|
:ivar ElementDiagnosticInfos: |
7245
|
|
|
:vartype ElementDiagnosticInfos: DiagnosticInfo |
7246
|
|
|
''' |
7247
|
|
|
def __init__(self, binary=None): |
7248
|
1 |
|
if binary is not None: |
7249
|
|
|
self._binary_init(binary) |
7250
|
|
|
self._freeze = True |
7251
|
|
|
return |
7252
|
|
|
self.ElementResults = [] |
7253
|
|
|
self.ElementDiagnosticInfos = [] |
7254
|
|
|
self._freeze = True |
7255
|
|
|
|
7256
|
|
|
def to_binary(self): |
7257
|
|
|
packet = [] |
7258
|
|
|
packet.append(uatype_Int32.pack(len(self.ElementResults))) |
7259
|
|
|
for fieldname in self.ElementResults: |
7260
|
|
|
packet.append(fieldname.to_binary()) |
7261
|
|
|
packet.append(uatype_Int32.pack(len(self.ElementDiagnosticInfos))) |
7262
|
|
|
for fieldname in self.ElementDiagnosticInfos: |
7263
|
1 |
|
packet.append(fieldname.to_binary()) |
7264
|
|
|
return b''.join(packet) |
7265
|
|
|
|
7266
|
|
|
@staticmethod |
7267
|
|
|
def from_binary(data): |
7268
|
1 |
|
return ContentFilterResult(data) |
7269
|
|
|
|
7270
|
|
|
def _binary_init(self, data): |
7271
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
7272
|
|
|
array = [] |
7273
|
|
|
if length != -1: |
7274
|
|
|
for _ in range(0, length): |
7275
|
|
|
array.append(ContentFilterElementResult.from_binary(data)) |
7276
|
|
|
self.ElementResults = array |
7277
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7278
|
1 |
|
array = [] |
7279
|
1 |
|
if length != -1: |
7280
|
1 |
|
for _ in range(0, length): |
7281
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
7282
|
1 |
|
self.ElementDiagnosticInfos = array |
7283
|
1 |
|
|
7284
|
1 |
|
def __str__(self): |
7285
|
1 |
|
return 'ContentFilterResult(' + 'ElementResults:' + str(self.ElementResults) + ', ' + \ |
7286
|
|
|
'ElementDiagnosticInfos:' + str(self.ElementDiagnosticInfos) + ')' |
7287
|
1 |
|
|
7288
|
1 |
|
__repr__ = __str__ |
7289
|
1 |
|
|
7290
|
1 |
|
|
7291
|
|
|
class ParsingResult(FrozenClass): |
7292
|
1 |
|
''' |
7293
|
1 |
|
:ivar StatusCode: |
7294
|
|
|
:vartype StatusCode: StatusCode |
7295
|
1 |
|
:ivar DataStatusCodes: |
7296
|
|
|
:vartype DataStatusCodes: StatusCode |
7297
|
1 |
|
:ivar DataDiagnosticInfos: |
7298
|
|
|
:vartype DataDiagnosticInfos: DiagnosticInfo |
7299
|
1 |
|
''' |
7300
|
|
|
def __init__(self, binary=None): |
7301
|
1 |
|
if binary is not None: |
7302
|
1 |
|
self._binary_init(binary) |
7303
|
1 |
|
self._freeze = True |
7304
|
1 |
|
return |
7305
|
1 |
|
self.StatusCode = StatusCode() |
7306
|
|
|
self.DataStatusCodes = [] |
7307
|
1 |
|
self.DataDiagnosticInfos = [] |
7308
|
1 |
|
self._freeze = True |
7309
|
1 |
|
|
7310
|
1 |
|
def to_binary(self): |
7311
|
1 |
|
packet = [] |
7312
|
|
|
packet.append(self.StatusCode.to_binary()) |
7313
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DataStatusCodes))) |
7314
|
|
|
for fieldname in self.DataStatusCodes: |
7315
|
1 |
|
packet.append(fieldname.to_binary()) |
7316
|
|
|
packet.append(uatype_Int32.pack(len(self.DataDiagnosticInfos))) |
7317
|
|
|
for fieldname in self.DataDiagnosticInfos: |
7318
|
|
|
packet.append(fieldname.to_binary()) |
7319
|
1 |
|
return b''.join(packet) |
7320
|
|
|
|
7321
|
|
|
@staticmethod |
7322
|
1 |
|
def from_binary(data): |
7323
|
|
|
return ParsingResult(data) |
7324
|
|
|
|
7325
|
|
|
def _binary_init(self, data): |
7326
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
7327
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7328
|
|
|
array = [] |
7329
|
|
|
if length != -1: |
7330
|
|
|
for _ in range(0, length): |
7331
|
1 |
|
array.append(StatusCode.from_binary(data)) |
7332
|
|
|
self.DataStatusCodes = array |
7333
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7334
|
|
|
array = [] |
7335
|
|
|
if length != -1: |
7336
|
|
|
for _ in range(0, length): |
7337
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
7338
|
|
|
self.DataDiagnosticInfos = array |
7339
|
|
|
|
7340
|
|
|
def __str__(self): |
7341
|
1 |
|
return 'ParsingResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
7342
|
|
|
'DataStatusCodes:' + str(self.DataStatusCodes) + ', ' + \ |
7343
|
|
|
'DataDiagnosticInfos:' + str(self.DataDiagnosticInfos) + ')' |
7344
|
|
|
|
7345
|
|
|
__repr__ = __str__ |
7346
|
|
|
|
7347
|
|
|
|
7348
|
|
|
class QueryFirstParameters(FrozenClass): |
7349
|
|
|
''' |
7350
|
|
|
:ivar View: |
7351
|
|
|
:vartype View: ViewDescription |
7352
|
1 |
|
:ivar NodeTypes: |
7353
|
|
|
:vartype NodeTypes: NodeTypeDescription |
7354
|
|
|
:ivar Filter: |
7355
|
|
|
:vartype Filter: ContentFilter |
7356
|
1 |
|
:ivar MaxDataSetsToReturn: |
7357
|
|
|
:vartype MaxDataSetsToReturn: UInt32 |
7358
|
|
|
:ivar MaxReferencesToReturn: |
7359
|
|
|
:vartype MaxReferencesToReturn: UInt32 |
7360
|
|
|
''' |
7361
|
|
|
def __init__(self, binary=None): |
7362
|
|
|
if binary is not None: |
7363
|
|
|
self._binary_init(binary) |
7364
|
|
|
self._freeze = True |
7365
|
|
|
return |
7366
|
|
|
self.View = ViewDescription() |
7367
|
|
|
self.NodeTypes = [] |
7368
|
|
|
self.Filter = ContentFilter() |
7369
|
|
|
self.MaxDataSetsToReturn = 0 |
7370
|
|
|
self.MaxReferencesToReturn = 0 |
7371
|
1 |
|
self._freeze = True |
7372
|
|
|
|
7373
|
|
|
def to_binary(self): |
7374
|
|
|
packet = [] |
7375
|
|
|
packet.append(self.View.to_binary()) |
7376
|
1 |
|
packet.append(uatype_Int32.pack(len(self.NodeTypes))) |
7377
|
|
|
for fieldname in self.NodeTypes: |
7378
|
|
|
packet.append(fieldname.to_binary()) |
7379
|
1 |
|
packet.append(self.Filter.to_binary()) |
7380
|
|
|
packet.append(uatype_UInt32.pack(self.MaxDataSetsToReturn)) |
7381
|
|
|
packet.append(uatype_UInt32.pack(self.MaxReferencesToReturn)) |
7382
|
|
|
return b''.join(packet) |
7383
|
|
|
|
7384
|
|
|
@staticmethod |
7385
|
|
|
def from_binary(data): |
7386
|
|
|
return QueryFirstParameters(data) |
7387
|
|
|
|
7388
|
|
|
def _binary_init(self, data): |
7389
|
|
|
self.View = ViewDescription.from_binary(data) |
7390
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7391
|
|
|
array = [] |
7392
|
1 |
|
if length != -1: |
7393
|
|
|
for _ in range(0, length): |
7394
|
|
|
array.append(NodeTypeDescription.from_binary(data)) |
7395
|
|
|
self.NodeTypes = array |
7396
|
|
|
self.Filter = ContentFilter.from_binary(data) |
7397
|
|
|
self.MaxDataSetsToReturn = uatype_UInt32.unpack(data.read(4))[0] |
7398
|
|
|
self.MaxReferencesToReturn = uatype_UInt32.unpack(data.read(4))[0] |
7399
|
|
|
|
7400
|
|
|
def __str__(self): |
7401
|
|
|
return 'QueryFirstParameters(' + 'View:' + str(self.View) + ', ' + \ |
7402
|
|
|
'NodeTypes:' + str(self.NodeTypes) + ', ' + \ |
7403
|
|
|
'Filter:' + str(self.Filter) + ', ' + \ |
7404
|
1 |
|
'MaxDataSetsToReturn:' + str(self.MaxDataSetsToReturn) + ', ' + \ |
7405
|
|
|
'MaxReferencesToReturn:' + str(self.MaxReferencesToReturn) + ')' |
7406
|
|
|
|
7407
|
|
|
__repr__ = __str__ |
7408
|
|
|
|
7409
|
|
|
|
7410
|
|
|
class QueryFirstRequest(FrozenClass): |
7411
|
|
|
''' |
7412
|
|
|
:ivar TypeId: |
7413
|
|
|
:vartype TypeId: NodeId |
7414
|
|
|
:ivar RequestHeader: |
7415
|
1 |
|
:vartype RequestHeader: RequestHeader |
7416
|
|
|
:ivar Parameters: |
7417
|
|
|
:vartype Parameters: QueryFirstParameters |
7418
|
|
|
''' |
7419
|
1 |
|
def __init__(self, binary=None): |
7420
|
|
|
if binary is not None: |
7421
|
|
|
self._binary_init(binary) |
7422
|
|
|
self._freeze = True |
7423
|
|
|
return |
7424
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary) |
7425
|
|
|
self.RequestHeader = RequestHeader() |
7426
|
|
|
self.Parameters = QueryFirstParameters() |
7427
|
|
|
self._freeze = True |
7428
|
|
|
|
7429
|
|
|
def to_binary(self): |
7430
|
|
|
packet = [] |
7431
|
1 |
|
packet.append(self.TypeId.to_binary()) |
7432
|
|
|
packet.append(self.RequestHeader.to_binary()) |
7433
|
|
|
packet.append(self.Parameters.to_binary()) |
7434
|
|
|
return b''.join(packet) |
7435
|
|
|
|
7436
|
|
|
@staticmethod |
7437
|
|
|
def from_binary(data): |
7438
|
1 |
|
return QueryFirstRequest(data) |
7439
|
|
|
|
7440
|
|
|
def _binary_init(self, data): |
7441
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
7442
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
7443
|
|
|
self.Parameters = QueryFirstParameters.from_binary(data) |
7444
|
|
|
|
7445
|
|
|
def __str__(self): |
7446
|
|
|
return 'QueryFirstRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7447
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
7448
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
7449
|
|
|
|
7450
|
1 |
|
__repr__ = __str__ |
7451
|
|
|
|
7452
|
|
|
|
7453
|
|
|
class QueryFirstResult(FrozenClass): |
7454
|
|
|
''' |
7455
|
|
|
:ivar QueryDataSets: |
7456
|
|
|
:vartype QueryDataSets: QueryDataSet |
7457
|
|
|
:ivar ContinuationPoint: |
7458
|
|
|
:vartype ContinuationPoint: ByteString |
7459
|
|
|
:ivar ParsingResults: |
7460
|
1 |
|
:vartype ParsingResults: ParsingResult |
7461
|
|
|
:ivar DiagnosticInfos: |
7462
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
7463
|
|
|
:ivar FilterResult: |
7464
|
|
|
:vartype FilterResult: ContentFilterResult |
7465
|
|
|
''' |
7466
|
|
|
def __init__(self, binary=None): |
7467
|
1 |
|
if binary is not None: |
7468
|
|
|
self._binary_init(binary) |
7469
|
|
|
self._freeze = True |
7470
|
|
|
return |
7471
|
1 |
|
self.QueryDataSets = [] |
7472
|
|
|
self.ContinuationPoint = b'' |
7473
|
|
|
self.ParsingResults = [] |
7474
|
|
|
self.DiagnosticInfos = [] |
7475
|
|
|
self.FilterResult = ContentFilterResult() |
7476
|
1 |
|
self._freeze = True |
7477
|
|
|
|
7478
|
|
|
def to_binary(self): |
7479
|
|
|
packet = [] |
7480
|
|
|
packet.append(uatype_Int32.pack(len(self.QueryDataSets))) |
7481
|
1 |
|
for fieldname in self.QueryDataSets: |
7482
|
|
|
packet.append(fieldname.to_binary()) |
7483
|
|
|
packet.append(pack_bytes(self.ContinuationPoint)) |
7484
|
1 |
|
packet.append(uatype_Int32.pack(len(self.ParsingResults))) |
7485
|
|
|
for fieldname in self.ParsingResults: |
7486
|
|
|
packet.append(fieldname.to_binary()) |
7487
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
7488
|
|
|
for fieldname in self.DiagnosticInfos: |
7489
|
|
|
packet.append(fieldname.to_binary()) |
7490
|
|
|
packet.append(self.FilterResult.to_binary()) |
7491
|
|
|
return b''.join(packet) |
7492
|
|
|
|
7493
|
|
|
@staticmethod |
7494
|
|
|
def from_binary(data): |
7495
|
|
|
return QueryFirstResult(data) |
7496
|
|
|
|
7497
|
1 |
|
def _binary_init(self, data): |
7498
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7499
|
|
|
array = [] |
7500
|
|
|
if length != -1: |
7501
|
|
|
for _ in range(0, length): |
7502
|
|
|
array.append(QueryDataSet.from_binary(data)) |
7503
|
|
|
self.QueryDataSets = array |
7504
|
|
|
self.ContinuationPoint = unpack_bytes(data) |
7505
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7506
|
|
|
array = [] |
7507
|
|
|
if length != -1: |
7508
|
|
|
for _ in range(0, length): |
7509
|
1 |
|
array.append(ParsingResult.from_binary(data)) |
7510
|
|
|
self.ParsingResults = array |
7511
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7512
|
|
|
array = [] |
7513
|
|
|
if length != -1: |
7514
|
|
|
for _ in range(0, length): |
7515
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
7516
|
|
|
self.DiagnosticInfos = array |
7517
|
|
|
self.FilterResult = ContentFilterResult.from_binary(data) |
7518
|
|
|
|
7519
|
|
|
def __str__(self): |
7520
|
|
|
return 'QueryFirstResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \ |
7521
|
|
|
'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ |
7522
|
|
|
'ParsingResults:' + str(self.ParsingResults) + ', ' + \ |
7523
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ', ' + \ |
7524
|
1 |
|
'FilterResult:' + str(self.FilterResult) + ')' |
7525
|
|
|
|
7526
|
|
|
__repr__ = __str__ |
7527
|
|
|
|
7528
|
1 |
|
|
7529
|
|
|
class QueryFirstResponse(FrozenClass): |
7530
|
|
|
''' |
7531
|
|
|
:ivar TypeId: |
7532
|
|
|
:vartype TypeId: NodeId |
7533
|
|
|
:ivar ResponseHeader: |
7534
|
|
|
:vartype ResponseHeader: ResponseHeader |
7535
|
|
|
:ivar Parameters: |
7536
|
|
|
:vartype Parameters: QueryFirstResult |
7537
|
|
|
''' |
7538
|
|
|
def __init__(self, binary=None): |
7539
|
|
|
if binary is not None: |
7540
|
|
|
self._binary_init(binary) |
7541
|
|
|
self._freeze = True |
7542
|
|
|
return |
7543
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary) |
7544
|
|
|
self.ResponseHeader = ResponseHeader() |
7545
|
|
|
self.Parameters = QueryFirstResult() |
7546
|
|
|
self._freeze = True |
7547
|
|
|
|
7548
|
|
|
def to_binary(self): |
7549
|
|
|
packet = [] |
7550
|
1 |
|
packet.append(self.TypeId.to_binary()) |
7551
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
7552
|
|
|
packet.append(self.Parameters.to_binary()) |
7553
|
|
|
return b''.join(packet) |
7554
|
|
|
|
7555
|
|
|
@staticmethod |
7556
|
|
|
def from_binary(data): |
7557
|
1 |
|
return QueryFirstResponse(data) |
7558
|
|
|
|
7559
|
|
|
def _binary_init(self, data): |
7560
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
7561
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
7562
|
|
|
self.Parameters = QueryFirstResult.from_binary(data) |
7563
|
|
|
|
7564
|
|
|
def __str__(self): |
7565
|
|
|
return 'QueryFirstResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7566
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
7567
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
7568
|
|
|
|
7569
|
1 |
|
__repr__ = __str__ |
7570
|
|
|
|
7571
|
|
|
|
7572
|
|
|
class QueryNextParameters(FrozenClass): |
7573
|
|
|
''' |
7574
|
|
|
:ivar ReleaseContinuationPoint: |
7575
|
|
|
:vartype ReleaseContinuationPoint: Boolean |
7576
|
|
|
:ivar ContinuationPoint: |
7577
|
|
|
:vartype ContinuationPoint: ByteString |
7578
|
|
|
''' |
7579
|
1 |
|
def __init__(self, binary=None): |
7580
|
|
|
if binary is not None: |
7581
|
|
|
self._binary_init(binary) |
7582
|
|
|
self._freeze = True |
7583
|
|
|
return |
7584
|
|
|
self.ReleaseContinuationPoint = True |
7585
|
|
|
self.ContinuationPoint = b'' |
7586
|
1 |
|
self._freeze = True |
7587
|
|
|
|
7588
|
|
|
def to_binary(self): |
7589
|
|
|
packet = [] |
7590
|
1 |
|
packet.append(uatype_Boolean.pack(self.ReleaseContinuationPoint)) |
7591
|
|
|
packet.append(pack_bytes(self.ContinuationPoint)) |
7592
|
|
|
return b''.join(packet) |
7593
|
|
|
|
7594
|
|
|
@staticmethod |
7595
|
1 |
|
def from_binary(data): |
7596
|
|
|
return QueryNextParameters(data) |
7597
|
|
|
|
7598
|
|
|
def _binary_init(self, data): |
7599
|
|
|
self.ReleaseContinuationPoint = uatype_Boolean.unpack(data.read(1))[0] |
7600
|
1 |
|
self.ContinuationPoint = unpack_bytes(data) |
7601
|
|
|
|
7602
|
|
|
def __str__(self): |
7603
|
1 |
|
return 'QueryNextParameters(' + 'ReleaseContinuationPoint:' + str(self.ReleaseContinuationPoint) + ', ' + \ |
7604
|
|
|
'ContinuationPoint:' + str(self.ContinuationPoint) + ')' |
7605
|
|
|
|
7606
|
|
|
__repr__ = __str__ |
7607
|
|
|
|
7608
|
|
|
|
7609
|
|
|
class QueryNextRequest(FrozenClass): |
7610
|
1 |
|
''' |
7611
|
|
|
:ivar TypeId: |
7612
|
|
|
:vartype TypeId: NodeId |
7613
|
|
|
:ivar RequestHeader: |
7614
|
|
|
:vartype RequestHeader: RequestHeader |
7615
|
|
|
:ivar Parameters: |
7616
|
|
|
:vartype Parameters: QueryNextParameters |
7617
|
|
|
''' |
7618
|
|
|
def __init__(self, binary=None): |
7619
|
1 |
|
if binary is not None: |
7620
|
|
|
self._binary_init(binary) |
7621
|
|
|
self._freeze = True |
7622
|
|
|
return |
7623
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary) |
7624
|
|
|
self.RequestHeader = RequestHeader() |
7625
|
1 |
|
self.Parameters = QueryNextParameters() |
7626
|
|
|
self._freeze = True |
7627
|
|
|
|
7628
|
|
|
def to_binary(self): |
7629
|
1 |
|
packet = [] |
7630
|
|
|
packet.append(self.TypeId.to_binary()) |
7631
|
|
|
packet.append(self.RequestHeader.to_binary()) |
7632
|
|
|
packet.append(self.Parameters.to_binary()) |
7633
|
1 |
|
return b''.join(packet) |
7634
|
|
|
|
7635
|
|
|
@staticmethod |
7636
|
|
|
def from_binary(data): |
7637
|
1 |
|
return QueryNextRequest(data) |
7638
|
|
|
|
7639
|
|
|
def _binary_init(self, data): |
7640
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
7641
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
7642
|
|
|
self.Parameters = QueryNextParameters.from_binary(data) |
7643
|
|
|
|
7644
|
|
|
def __str__(self): |
7645
|
|
|
return 'QueryNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7646
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
7647
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
7648
|
|
|
|
7649
|
1 |
|
__repr__ = __str__ |
7650
|
|
|
|
7651
|
|
|
|
7652
|
|
|
class QueryNextResult(FrozenClass): |
7653
|
|
|
''' |
7654
|
|
|
:ivar QueryDataSets: |
7655
|
|
|
:vartype QueryDataSets: QueryDataSet |
7656
|
|
|
:ivar RevisedContinuationPoint: |
7657
|
|
|
:vartype RevisedContinuationPoint: ByteString |
7658
|
|
|
''' |
7659
|
1 |
|
def __init__(self, binary=None): |
7660
|
|
|
if binary is not None: |
7661
|
|
|
self._binary_init(binary) |
7662
|
|
|
self._freeze = True |
7663
|
|
|
return |
7664
|
|
|
self.QueryDataSets = [] |
7665
|
|
|
self.RevisedContinuationPoint = b'' |
7666
|
1 |
|
self._freeze = True |
7667
|
|
|
|
7668
|
|
|
def to_binary(self): |
7669
|
|
|
packet = [] |
7670
|
1 |
|
packet.append(uatype_Int32.pack(len(self.QueryDataSets))) |
7671
|
|
|
for fieldname in self.QueryDataSets: |
7672
|
|
|
packet.append(fieldname.to_binary()) |
7673
|
|
|
packet.append(pack_bytes(self.RevisedContinuationPoint)) |
7674
|
|
|
return b''.join(packet) |
7675
|
1 |
|
|
7676
|
|
|
@staticmethod |
7677
|
|
|
def from_binary(data): |
7678
|
|
|
return QueryNextResult(data) |
7679
|
|
|
|
7680
|
1 |
|
def _binary_init(self, data): |
7681
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7682
|
|
|
array = [] |
7683
|
1 |
|
if length != -1: |
7684
|
|
|
for _ in range(0, length): |
7685
|
|
|
array.append(QueryDataSet.from_binary(data)) |
7686
|
|
|
self.QueryDataSets = array |
7687
|
|
|
self.RevisedContinuationPoint = unpack_bytes(data) |
7688
|
|
|
|
7689
|
|
|
def __str__(self): |
7690
|
1 |
|
return 'QueryNextResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \ |
7691
|
|
|
'RevisedContinuationPoint:' + str(self.RevisedContinuationPoint) + ')' |
7692
|
|
|
|
7693
|
|
|
__repr__ = __str__ |
7694
|
|
|
|
7695
|
|
|
|
7696
|
|
|
class QueryNextResponse(FrozenClass): |
7697
|
|
|
''' |
7698
|
|
|
:ivar TypeId: |
7699
|
1 |
|
:vartype TypeId: NodeId |
7700
|
|
|
:ivar ResponseHeader: |
7701
|
|
|
:vartype ResponseHeader: ResponseHeader |
7702
|
|
|
:ivar Parameters: |
7703
|
|
|
:vartype Parameters: QueryNextResult |
7704
|
|
|
''' |
7705
|
|
|
def __init__(self, binary=None): |
7706
|
|
|
if binary is not None: |
7707
|
1 |
|
self._binary_init(binary) |
7708
|
|
|
self._freeze = True |
7709
|
|
|
return |
7710
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary) |
7711
|
1 |
|
self.ResponseHeader = ResponseHeader() |
7712
|
|
|
self.Parameters = QueryNextResult() |
7713
|
|
|
self._freeze = True |
7714
|
|
|
|
7715
|
|
|
def to_binary(self): |
7716
|
|
|
packet = [] |
7717
|
|
|
packet.append(self.TypeId.to_binary()) |
7718
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
7719
|
|
|
packet.append(self.Parameters.to_binary()) |
7720
|
1 |
|
return b''.join(packet) |
7721
|
|
|
|
7722
|
|
|
@staticmethod |
7723
|
|
|
def from_binary(data): |
7724
|
1 |
|
return QueryNextResponse(data) |
7725
|
|
|
|
7726
|
|
|
def _binary_init(self, data): |
7727
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
7728
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
7729
|
|
|
self.Parameters = QueryNextResult.from_binary(data) |
7730
|
|
|
|
7731
|
|
|
def __str__(self): |
7732
|
|
|
return 'QueryNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7733
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
7734
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
7735
|
|
|
|
7736
|
1 |
|
__repr__ = __str__ |
7737
|
|
|
|
7738
|
|
|
|
7739
|
|
|
class ReadValueId(FrozenClass): |
7740
|
|
|
''' |
7741
|
|
|
:ivar NodeId: |
7742
|
|
|
:vartype NodeId: NodeId |
7743
|
|
|
:ivar AttributeId: |
7744
|
|
|
:vartype AttributeId: UInt32 |
7745
|
|
|
:ivar IndexRange: |
7746
|
1 |
|
:vartype IndexRange: String |
7747
|
|
|
:ivar DataEncoding: |
7748
|
|
|
:vartype DataEncoding: QualifiedName |
7749
|
|
|
''' |
7750
|
|
|
def __init__(self, binary=None): |
7751
|
|
|
if binary is not None: |
7752
|
|
|
self._binary_init(binary) |
7753
|
1 |
|
self._freeze = True |
7754
|
|
|
return |
7755
|
|
|
self.NodeId = NodeId() |
7756
|
|
|
self.AttributeId = 0 |
7757
|
1 |
|
self.IndexRange = '' |
7758
|
|
|
self.DataEncoding = QualifiedName() |
7759
|
|
|
self._freeze = True |
7760
|
|
|
|
7761
|
|
|
def to_binary(self): |
7762
|
1 |
|
packet = [] |
7763
|
|
|
packet.append(self.NodeId.to_binary()) |
7764
|
|
|
packet.append(uatype_UInt32.pack(self.AttributeId)) |
7765
|
|
|
packet.append(pack_string(self.IndexRange)) |
7766
|
|
|
packet.append(self.DataEncoding.to_binary()) |
7767
|
1 |
|
return b''.join(packet) |
7768
|
|
|
|
7769
|
|
|
@staticmethod |
7770
|
1 |
|
def from_binary(data): |
7771
|
|
|
return ReadValueId(data) |
7772
|
|
|
|
7773
|
|
|
def _binary_init(self, data): |
7774
|
|
|
self.NodeId = NodeId.from_binary(data) |
7775
|
|
|
self.AttributeId = uatype_UInt32.unpack(data.read(4))[0] |
7776
|
|
|
self.IndexRange = unpack_string(data) |
7777
|
|
|
self.DataEncoding = QualifiedName.from_binary(data) |
7778
|
|
|
|
7779
|
|
|
def __str__(self): |
7780
|
|
|
return 'ReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
7781
|
1 |
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
7782
|
1 |
|
'IndexRange:' + str(self.IndexRange) + ', ' + \ |
7783
|
1 |
|
'DataEncoding:' + str(self.DataEncoding) + ')' |
7784
|
1 |
|
|
7785
|
1 |
|
__repr__ = __str__ |
7786
|
1 |
|
|
7787
|
1 |
|
|
7788
|
1 |
|
class ReadParameters(FrozenClass): |
7789
|
1 |
|
''' |
7790
|
1 |
|
:ivar MaxAge: |
7791
|
|
|
:vartype MaxAge: Double |
7792
|
1 |
|
:ivar TimestampsToReturn: |
7793
|
1 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
7794
|
1 |
|
:ivar NodesToRead: |
7795
|
1 |
|
:vartype NodesToRead: ReadValueId |
7796
|
1 |
|
''' |
7797
|
1 |
|
def __init__(self, binary=None): |
7798
|
1 |
|
if binary is not None: |
7799
|
|
|
self._binary_init(binary) |
7800
|
1 |
|
self._freeze = True |
7801
|
|
|
return |
7802
|
1 |
|
self.MaxAge = 0 |
7803
|
|
|
self.TimestampsToReturn = TimestampsToReturn(0) |
7804
|
1 |
|
self.NodesToRead = [] |
7805
|
1 |
|
self._freeze = True |
7806
|
1 |
|
|
7807
|
1 |
|
def to_binary(self): |
7808
|
1 |
|
packet = [] |
7809
|
|
|
packet.append(uatype_Double.pack(self.MaxAge)) |
7810
|
1 |
|
packet.append(uatype_UInt32.pack(self.TimestampsToReturn.value)) |
7811
|
|
|
packet.append(uatype_Int32.pack(len(self.NodesToRead))) |
7812
|
|
|
for fieldname in self.NodesToRead: |
7813
|
|
|
packet.append(fieldname.to_binary()) |
7814
|
|
|
return b''.join(packet) |
7815
|
|
|
|
7816
|
1 |
|
@staticmethod |
7817
|
|
|
def from_binary(data): |
7818
|
|
|
return ReadParameters(data) |
7819
|
1 |
|
|
7820
|
|
|
def _binary_init(self, data): |
7821
|
|
|
self.MaxAge = uatype_Double.unpack(data.read(8))[0] |
7822
|
|
|
self.TimestampsToReturn = TimestampsToReturn(uatype_UInt32.unpack(data.read(4))[0]) |
7823
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7824
|
|
|
array = [] |
7825
|
|
|
if length != -1: |
7826
|
|
|
for _ in range(0, length): |
7827
|
|
|
array.append(ReadValueId.from_binary(data)) |
7828
|
1 |
|
self.NodesToRead = array |
7829
|
1 |
|
|
7830
|
1 |
|
def __str__(self): |
7831
|
1 |
|
return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \ |
7832
|
1 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
7833
|
1 |
|
'NodesToRead:' + str(self.NodesToRead) + ')' |
7834
|
1 |
|
|
7835
|
1 |
|
__repr__ = __str__ |
7836
|
1 |
|
|
7837
|
|
|
|
7838
|
1 |
|
class ReadRequest(FrozenClass): |
7839
|
1 |
|
''' |
7840
|
1 |
|
:ivar TypeId: |
7841
|
1 |
|
:vartype TypeId: NodeId |
7842
|
1 |
|
:ivar RequestHeader: |
7843
|
1 |
|
:vartype RequestHeader: RequestHeader |
7844
|
1 |
|
:ivar Parameters: |
7845
|
1 |
|
:vartype Parameters: ReadParameters |
7846
|
|
|
''' |
7847
|
1 |
|
def __init__(self, binary=None): |
7848
|
|
|
if binary is not None: |
7849
|
1 |
|
self._binary_init(binary) |
7850
|
|
|
self._freeze = True |
7851
|
1 |
|
return |
7852
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary) |
7853
|
1 |
|
self.RequestHeader = RequestHeader() |
7854
|
1 |
|
self.Parameters = ReadParameters() |
7855
|
1 |
|
self._freeze = True |
7856
|
1 |
|
|
7857
|
1 |
|
def to_binary(self): |
7858
|
1 |
|
packet = [] |
7859
|
1 |
|
packet.append(self.TypeId.to_binary()) |
7860
|
|
|
packet.append(self.RequestHeader.to_binary()) |
7861
|
1 |
|
packet.append(self.Parameters.to_binary()) |
7862
|
|
|
return b''.join(packet) |
7863
|
|
|
|
7864
|
|
|
@staticmethod |
7865
|
|
|
def from_binary(data): |
7866
|
1 |
|
return ReadRequest(data) |
7867
|
|
|
|
7868
|
|
|
def _binary_init(self, data): |
7869
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
7870
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
7871
|
|
|
self.Parameters = ReadParameters.from_binary(data) |
7872
|
|
|
|
7873
|
|
|
def __str__(self): |
7874
|
|
|
return 'ReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7875
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
7876
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
7877
|
|
|
|
7878
|
1 |
|
__repr__ = __str__ |
7879
|
1 |
|
|
7880
|
|
|
|
7881
|
|
|
class ReadResponse(FrozenClass): |
7882
|
|
|
''' |
7883
|
1 |
|
:ivar TypeId: |
7884
|
1 |
|
:vartype TypeId: NodeId |
7885
|
1 |
|
:ivar ResponseHeader: |
7886
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
7887
|
|
|
:ivar Results: |
7888
|
1 |
|
:vartype Results: DataValue |
7889
|
1 |
|
:ivar DiagnosticInfos: |
7890
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
7891
|
1 |
|
''' |
7892
|
1 |
|
def __init__(self, binary=None): |
7893
|
1 |
|
if binary is not None: |
7894
|
|
|
self._binary_init(binary) |
7895
|
1 |
|
self._freeze = True |
7896
|
|
|
return |
7897
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary) |
7898
|
|
|
self.ResponseHeader = ResponseHeader() |
7899
|
1 |
|
self.Results = [] |
7900
|
|
|
self.DiagnosticInfos = [] |
7901
|
|
|
self._freeze = True |
7902
|
|
|
|
7903
|
|
|
def to_binary(self): |
7904
|
1 |
|
packet = [] |
7905
|
|
|
packet.append(self.TypeId.to_binary()) |
7906
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
7907
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
7908
|
|
|
for fieldname in self.Results: |
7909
|
1 |
|
packet.append(fieldname.to_binary()) |
7910
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
7911
|
|
|
for fieldname in self.DiagnosticInfos: |
7912
|
1 |
|
packet.append(fieldname.to_binary()) |
7913
|
|
|
return b''.join(packet) |
7914
|
|
|
|
7915
|
|
|
@staticmethod |
7916
|
|
|
def from_binary(data): |
7917
|
|
|
return ReadResponse(data) |
7918
|
|
|
|
7919
|
|
|
def _binary_init(self, data): |
7920
|
|
|
self.TypeId = NodeId.from_binary(data) |
7921
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
7922
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
7923
|
1 |
|
array = [] |
7924
|
1 |
|
if length != -1: |
7925
|
1 |
|
for _ in range(0, length): |
7926
|
1 |
|
array.append(DataValue.from_binary(data)) |
7927
|
1 |
|
self.Results = array |
7928
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
7929
|
1 |
|
array = [] |
7930
|
1 |
|
if length != -1: |
7931
|
1 |
|
for _ in range(0, length): |
7932
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
7933
|
|
|
self.DiagnosticInfos = array |
7934
|
1 |
|
|
7935
|
1 |
|
def __str__(self): |
7936
|
1 |
|
return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
7937
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
7938
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
7939
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
7940
|
1 |
|
|
7941
|
1 |
|
__repr__ = __str__ |
7942
|
1 |
|
|
7943
|
|
|
|
7944
|
1 |
|
class HistoryReadValueId(FrozenClass): |
7945
|
|
|
''' |
7946
|
1 |
|
:ivar NodeId: |
7947
|
|
|
:vartype NodeId: NodeId |
7948
|
1 |
|
:ivar IndexRange: |
7949
|
|
|
:vartype IndexRange: String |
7950
|
1 |
|
:ivar DataEncoding: |
7951
|
1 |
|
:vartype DataEncoding: QualifiedName |
7952
|
1 |
|
:ivar ContinuationPoint: |
7953
|
1 |
|
:vartype ContinuationPoint: ByteString |
7954
|
1 |
|
''' |
7955
|
1 |
|
def __init__(self, binary=None): |
7956
|
1 |
|
if binary is not None: |
7957
|
1 |
|
self._binary_init(binary) |
7958
|
1 |
|
self._freeze = True |
7959
|
1 |
|
return |
7960
|
1 |
|
self.NodeId = NodeId() |
7961
|
1 |
|
self.IndexRange = '' |
7962
|
1 |
|
self.DataEncoding = QualifiedName() |
7963
|
|
|
self.ContinuationPoint = b'' |
7964
|
1 |
|
self._freeze = True |
7965
|
|
|
|
7966
|
1 |
|
def to_binary(self): |
7967
|
|
|
packet = [] |
7968
|
|
|
packet.append(self.NodeId.to_binary()) |
7969
|
|
|
packet.append(pack_string(self.IndexRange)) |
7970
|
|
|
packet.append(self.DataEncoding.to_binary()) |
7971
|
|
|
packet.append(pack_bytes(self.ContinuationPoint)) |
7972
|
1 |
|
return b''.join(packet) |
7973
|
|
|
|
7974
|
|
|
@staticmethod |
7975
|
1 |
|
def from_binary(data): |
7976
|
|
|
return HistoryReadValueId(data) |
7977
|
|
|
|
7978
|
|
|
def _binary_init(self, data): |
7979
|
|
|
self.NodeId = NodeId.from_binary(data) |
7980
|
|
|
self.IndexRange = unpack_string(data) |
7981
|
|
|
self.DataEncoding = QualifiedName.from_binary(data) |
7982
|
|
|
self.ContinuationPoint = unpack_bytes(data) |
7983
|
|
|
|
7984
|
|
|
def __str__(self): |
7985
|
|
|
return 'HistoryReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
7986
|
1 |
|
'IndexRange:' + str(self.IndexRange) + ', ' + \ |
7987
|
|
|
'DataEncoding:' + str(self.DataEncoding) + ', ' + \ |
7988
|
|
|
'ContinuationPoint:' + str(self.ContinuationPoint) + ')' |
7989
|
|
|
|
7990
|
|
|
__repr__ = __str__ |
7991
|
|
|
|
7992
|
|
|
|
7993
|
|
|
class HistoryReadResult(FrozenClass): |
7994
|
|
|
''' |
7995
|
|
|
:ivar StatusCode: |
7996
|
|
|
:vartype StatusCode: StatusCode |
7997
|
1 |
|
:ivar ContinuationPoint: |
7998
|
|
|
:vartype ContinuationPoint: ByteString |
7999
|
|
|
:ivar HistoryData: |
8000
|
|
|
:vartype HistoryData: ExtensionObject |
8001
|
|
|
''' |
8002
|
|
|
def __init__(self, binary=None): |
8003
|
|
|
if binary is not None: |
8004
|
|
|
self._binary_init(binary) |
8005
|
1 |
|
self._freeze = True |
8006
|
|
|
return |
8007
|
|
|
self.StatusCode = StatusCode() |
8008
|
|
|
self.ContinuationPoint = b'' |
8009
|
1 |
|
self.HistoryData = None |
8010
|
|
|
self._freeze = True |
8011
|
|
|
|
8012
|
|
|
def to_binary(self): |
8013
|
|
|
packet = [] |
8014
|
|
|
packet.append(self.StatusCode.to_binary()) |
8015
|
1 |
|
packet.append(pack_bytes(self.ContinuationPoint)) |
8016
|
|
|
packet.append(extensionobject_to_binary(self.HistoryData)) |
8017
|
|
|
return b''.join(packet) |
8018
|
|
|
|
8019
|
|
|
@staticmethod |
8020
|
|
|
def from_binary(data): |
8021
|
1 |
|
return HistoryReadResult(data) |
8022
|
|
|
|
8023
|
|
|
def _binary_init(self, data): |
8024
|
1 |
|
self.StatusCode = StatusCode.from_binary(data) |
8025
|
|
|
self.ContinuationPoint = unpack_bytes(data) |
8026
|
|
|
self.HistoryData = extensionobject_from_binary(data) |
8027
|
|
|
|
8028
|
|
|
def __str__(self): |
8029
|
|
|
return 'HistoryReadResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
8030
|
|
|
'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ |
8031
|
|
|
'HistoryData:' + str(self.HistoryData) + ')' |
8032
|
|
|
|
8033
|
1 |
|
__repr__ = __str__ |
8034
|
|
|
|
8035
|
|
|
|
8036
|
|
|
class HistoryReadDetails(FrozenClass): |
8037
|
|
|
''' |
8038
|
|
|
''' |
8039
|
|
|
def __init__(self, binary=None): |
8040
|
|
|
if binary is not None: |
8041
|
|
|
self._binary_init(binary) |
8042
|
|
|
self._freeze = True |
8043
|
1 |
|
return |
8044
|
|
|
self._freeze = True |
8045
|
|
|
|
8046
|
|
|
def to_binary(self): |
8047
|
|
|
packet = [] |
8048
|
|
|
return b''.join(packet) |
8049
|
|
|
|
8050
|
1 |
|
@staticmethod |
8051
|
|
|
def from_binary(data): |
8052
|
|
|
return HistoryReadDetails(data) |
8053
|
|
|
|
8054
|
1 |
|
def _binary_init(self, data): |
8055
|
|
|
pass |
8056
|
|
|
|
8057
|
|
|
def __str__(self): |
8058
|
|
|
return 'HistoryReadDetails(' + + ')' |
8059
|
1 |
|
|
8060
|
|
|
__repr__ = __str__ |
8061
|
|
|
|
8062
|
|
|
|
8063
|
|
|
class ReadEventDetails(FrozenClass): |
8064
|
1 |
|
''' |
8065
|
|
|
:ivar NumValuesPerNode: |
8066
|
|
|
:vartype NumValuesPerNode: UInt32 |
8067
|
1 |
|
:ivar StartTime: |
8068
|
|
|
:vartype StartTime: DateTime |
8069
|
|
|
:ivar EndTime: |
8070
|
1 |
|
:vartype EndTime: DateTime |
8071
|
|
|
:ivar Filter: |
8072
|
|
|
:vartype Filter: EventFilter |
8073
|
|
|
''' |
8074
|
|
|
def __init__(self, binary=None): |
8075
|
|
|
if binary is not None: |
8076
|
|
|
self._binary_init(binary) |
8077
|
1 |
|
self._freeze = True |
8078
|
|
|
return |
8079
|
|
|
self.NumValuesPerNode = 0 |
8080
|
|
|
self.StartTime = datetime.now() |
8081
|
1 |
|
self.EndTime = datetime.now() |
8082
|
|
|
self.Filter = EventFilter() |
8083
|
|
|
self._freeze = True |
8084
|
|
|
|
8085
|
1 |
|
def to_binary(self): |
8086
|
|
|
packet = [] |
8087
|
|
|
packet.append(uatype_UInt32.pack(self.NumValuesPerNode)) |
8088
|
1 |
|
packet.append(pack_datetime(self.StartTime)) |
8089
|
|
|
packet.append(pack_datetime(self.EndTime)) |
8090
|
|
|
packet.append(self.Filter.to_binary()) |
8091
|
1 |
|
return b''.join(packet) |
8092
|
|
|
|
8093
|
|
|
@staticmethod |
8094
|
1 |
|
def from_binary(data): |
8095
|
|
|
return ReadEventDetails(data) |
8096
|
|
|
|
8097
|
|
|
def _binary_init(self, data): |
8098
|
|
|
self.NumValuesPerNode = uatype_UInt32.unpack(data.read(4))[0] |
8099
|
|
|
self.StartTime = unpack_datetime(data) |
8100
|
|
|
self.EndTime = unpack_datetime(data) |
8101
|
|
|
self.Filter = EventFilter.from_binary(data) |
8102
|
|
|
|
8103
|
|
|
def __str__(self): |
8104
|
|
|
return 'ReadEventDetails(' + 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \ |
8105
|
1 |
|
'StartTime:' + str(self.StartTime) + ', ' + \ |
8106
|
|
|
'EndTime:' + str(self.EndTime) + ', ' + \ |
8107
|
|
|
'Filter:' + str(self.Filter) + ')' |
8108
|
|
|
|
8109
|
|
|
__repr__ = __str__ |
8110
|
|
|
|
8111
|
|
|
|
8112
|
|
|
class ReadRawModifiedDetails(FrozenClass): |
8113
|
|
|
''' |
8114
|
|
|
:ivar IsReadModified: |
8115
|
|
|
:vartype IsReadModified: Boolean |
8116
|
1 |
|
:ivar StartTime: |
8117
|
|
|
:vartype StartTime: DateTime |
8118
|
|
|
:ivar EndTime: |
8119
|
|
|
:vartype EndTime: DateTime |
8120
|
|
|
:ivar NumValuesPerNode: |
8121
|
|
|
:vartype NumValuesPerNode: UInt32 |
8122
|
|
|
:ivar ReturnBounds: |
8123
|
|
|
:vartype ReturnBounds: Boolean |
8124
|
1 |
|
''' |
8125
|
|
|
def __init__(self, binary=None): |
8126
|
|
|
if binary is not None: |
8127
|
|
|
self._binary_init(binary) |
8128
|
1 |
|
self._freeze = True |
8129
|
|
|
return |
8130
|
|
|
self.IsReadModified = True |
8131
|
|
|
self.StartTime = datetime.now() |
8132
|
|
|
self.EndTime = datetime.now() |
8133
|
|
|
self.NumValuesPerNode = 0 |
8134
|
1 |
|
self.ReturnBounds = True |
8135
|
|
|
self._freeze = True |
8136
|
|
|
|
8137
|
|
|
def to_binary(self): |
8138
|
|
|
packet = [] |
8139
|
|
|
packet.append(uatype_Boolean.pack(self.IsReadModified)) |
8140
|
1 |
|
packet.append(pack_datetime(self.StartTime)) |
8141
|
|
|
packet.append(pack_datetime(self.EndTime)) |
8142
|
|
|
packet.append(uatype_UInt32.pack(self.NumValuesPerNode)) |
8143
|
1 |
|
packet.append(uatype_Boolean.pack(self.ReturnBounds)) |
8144
|
|
|
return b''.join(packet) |
8145
|
|
|
|
8146
|
|
|
@staticmethod |
8147
|
|
|
def from_binary(data): |
8148
|
|
|
return ReadRawModifiedDetails(data) |
8149
|
|
|
|
8150
|
|
|
def _binary_init(self, data): |
8151
|
|
|
self.IsReadModified = uatype_Boolean.unpack(data.read(1))[0] |
8152
|
|
|
self.StartTime = unpack_datetime(data) |
8153
|
|
|
self.EndTime = unpack_datetime(data) |
8154
|
|
|
self.NumValuesPerNode = uatype_UInt32.unpack(data.read(4))[0] |
8155
|
|
|
self.ReturnBounds = uatype_Boolean.unpack(data.read(1))[0] |
8156
|
1 |
|
|
8157
|
|
|
def __str__(self): |
8158
|
|
|
return 'ReadRawModifiedDetails(' + 'IsReadModified:' + str(self.IsReadModified) + ', ' + \ |
8159
|
|
|
'StartTime:' + str(self.StartTime) + ', ' + \ |
8160
|
|
|
'EndTime:' + str(self.EndTime) + ', ' + \ |
8161
|
|
|
'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \ |
8162
|
|
|
'ReturnBounds:' + str(self.ReturnBounds) + ')' |
8163
|
|
|
|
8164
|
|
|
__repr__ = __str__ |
8165
|
|
|
|
8166
|
|
|
|
8167
|
|
|
class ReadProcessedDetails(FrozenClass): |
8168
|
1 |
|
''' |
8169
|
|
|
:ivar StartTime: |
8170
|
|
|
:vartype StartTime: DateTime |
8171
|
|
|
:ivar EndTime: |
8172
|
|
|
:vartype EndTime: DateTime |
8173
|
|
|
:ivar ProcessingInterval: |
8174
|
|
|
:vartype ProcessingInterval: Double |
8175
|
|
|
:ivar AggregateType: |
8176
|
|
|
:vartype AggregateType: NodeId |
8177
|
1 |
|
:ivar AggregateConfiguration: |
8178
|
|
|
:vartype AggregateConfiguration: AggregateConfiguration |
8179
|
|
|
''' |
8180
|
|
|
def __init__(self, binary=None): |
8181
|
1 |
|
if binary is not None: |
8182
|
|
|
self._binary_init(binary) |
8183
|
|
|
self._freeze = True |
8184
|
|
|
return |
8185
|
|
|
self.StartTime = datetime.now() |
8186
|
|
|
self.EndTime = datetime.now() |
8187
|
|
|
self.ProcessingInterval = 0 |
8188
|
1 |
|
self.AggregateType = [] |
8189
|
|
|
self.AggregateConfiguration = AggregateConfiguration() |
8190
|
|
|
self._freeze = True |
8191
|
|
|
|
8192
|
|
|
def to_binary(self): |
8193
|
|
|
packet = [] |
8194
|
|
|
packet.append(pack_datetime(self.StartTime)) |
8195
|
1 |
|
packet.append(pack_datetime(self.EndTime)) |
8196
|
|
|
packet.append(uatype_Double.pack(self.ProcessingInterval)) |
8197
|
|
|
packet.append(uatype_Int32.pack(len(self.AggregateType))) |
8198
|
1 |
|
for fieldname in self.AggregateType: |
8199
|
|
|
packet.append(fieldname.to_binary()) |
8200
|
|
|
packet.append(self.AggregateConfiguration.to_binary()) |
8201
|
|
|
return b''.join(packet) |
8202
|
|
|
|
8203
|
|
|
@staticmethod |
8204
|
|
|
def from_binary(data): |
8205
|
|
|
return ReadProcessedDetails(data) |
8206
|
|
|
|
8207
|
|
|
def _binary_init(self, data): |
8208
|
|
|
self.StartTime = unpack_datetime(data) |
8209
|
|
|
self.EndTime = unpack_datetime(data) |
8210
|
|
|
self.ProcessingInterval = uatype_Double.unpack(data.read(8))[0] |
8211
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
8212
|
|
|
array = [] |
8213
|
|
|
if length != -1: |
8214
|
|
|
for _ in range(0, length): |
8215
|
|
|
array.append(NodeId.from_binary(data)) |
8216
|
|
|
self.AggregateType = array |
8217
|
|
|
self.AggregateConfiguration = AggregateConfiguration.from_binary(data) |
8218
|
|
|
|
8219
|
|
|
def __str__(self): |
8220
|
|
|
return 'ReadProcessedDetails(' + 'StartTime:' + str(self.StartTime) + ', ' + \ |
8221
|
|
|
'EndTime:' + str(self.EndTime) + ', ' + \ |
8222
|
|
|
'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \ |
8223
|
1 |
|
'AggregateType:' + str(self.AggregateType) + ', ' + \ |
8224
|
|
|
'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')' |
8225
|
|
|
|
8226
|
|
|
__repr__ = __str__ |
8227
|
|
|
|
8228
|
|
|
|
8229
|
|
|
class ReadAtTimeDetails(FrozenClass): |
8230
|
|
|
''' |
8231
|
|
|
:ivar ReqTimes: |
8232
|
|
|
:vartype ReqTimes: DateTime |
8233
|
|
|
:ivar UseSimpleBounds: |
8234
|
1 |
|
:vartype UseSimpleBounds: Boolean |
8235
|
|
|
''' |
8236
|
|
|
def __init__(self, binary=None): |
8237
|
|
|
if binary is not None: |
8238
|
1 |
|
self._binary_init(binary) |
8239
|
|
|
self._freeze = True |
8240
|
|
|
return |
8241
|
|
|
self.ReqTimes = [] |
8242
|
|
|
self.UseSimpleBounds = True |
8243
|
|
|
self._freeze = True |
8244
|
|
|
|
8245
|
|
|
def to_binary(self): |
8246
|
|
|
packet = [] |
8247
|
|
|
packet.append(uatype_Int32.pack(len(self.ReqTimes))) |
8248
|
|
|
for fieldname in self.ReqTimes: |
8249
|
|
|
packet.append(pack_datetime(fieldname)) |
8250
|
1 |
|
packet.append(uatype_Boolean.pack(self.UseSimpleBounds)) |
8251
|
|
|
return b''.join(packet) |
8252
|
|
|
|
8253
|
|
|
@staticmethod |
8254
|
|
|
def from_binary(data): |
8255
|
|
|
return ReadAtTimeDetails(data) |
8256
|
|
|
|
8257
|
1 |
|
def _binary_init(self, data): |
8258
|
|
|
self.ReqTimes = unpack_uatype_array('DateTime', data) |
8259
|
|
|
self.UseSimpleBounds = uatype_Boolean.unpack(data.read(1))[0] |
8260
|
1 |
|
|
8261
|
|
|
def __str__(self): |
8262
|
|
|
return 'ReadAtTimeDetails(' + 'ReqTimes:' + str(self.ReqTimes) + ', ' + \ |
8263
|
|
|
'UseSimpleBounds:' + str(self.UseSimpleBounds) + ')' |
8264
|
|
|
|
8265
|
|
|
__repr__ = __str__ |
8266
|
|
|
|
8267
|
1 |
|
|
8268
|
|
|
class HistoryData(FrozenClass): |
8269
|
|
|
''' |
8270
|
|
|
:ivar DataValues: |
8271
|
|
|
:vartype DataValues: DataValue |
8272
|
|
|
''' |
8273
|
|
|
def __init__(self, binary=None): |
8274
|
|
|
if binary is not None: |
8275
|
|
|
self._binary_init(binary) |
8276
|
1 |
|
self._freeze = True |
8277
|
|
|
return |
8278
|
|
|
self.DataValues = [] |
8279
|
|
|
self._freeze = True |
8280
|
|
|
|
8281
|
|
|
def to_binary(self): |
8282
|
|
|
packet = [] |
8283
|
|
|
packet.append(uatype_Int32.pack(len(self.DataValues))) |
8284
|
1 |
|
for fieldname in self.DataValues: |
8285
|
|
|
packet.append(fieldname.to_binary()) |
8286
|
|
|
return b''.join(packet) |
8287
|
|
|
|
8288
|
1 |
|
@staticmethod |
8289
|
|
|
def from_binary(data): |
8290
|
|
|
return HistoryData(data) |
8291
|
|
|
|
8292
|
1 |
|
def _binary_init(self, data): |
8293
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8294
|
|
|
array = [] |
8295
|
|
|
if length != -1: |
8296
|
1 |
|
for _ in range(0, length): |
8297
|
|
|
array.append(DataValue.from_binary(data)) |
8298
|
|
|
self.DataValues = array |
8299
|
1 |
|
|
8300
|
|
|
def __str__(self): |
8301
|
|
|
return 'HistoryData(' + 'DataValues:' + str(self.DataValues) + ')' |
8302
|
|
|
|
8303
|
|
|
__repr__ = __str__ |
8304
|
1 |
|
|
8305
|
|
|
|
8306
|
|
|
class ModificationInfo(FrozenClass): |
8307
|
|
|
''' |
8308
|
|
|
:ivar ModificationTime: |
8309
|
|
|
:vartype ModificationTime: DateTime |
8310
|
|
|
:ivar UpdateType: |
8311
|
|
|
:vartype UpdateType: HistoryUpdateType |
8312
|
1 |
|
:ivar UserName: |
8313
|
|
|
:vartype UserName: String |
8314
|
|
|
''' |
8315
|
|
|
def __init__(self, binary=None): |
8316
|
|
|
if binary is not None: |
8317
|
|
|
self._binary_init(binary) |
8318
|
|
|
self._freeze = True |
8319
|
1 |
|
return |
8320
|
|
|
self.ModificationTime = datetime.now() |
8321
|
|
|
self.UpdateType = HistoryUpdateType(0) |
8322
|
|
|
self.UserName = '' |
8323
|
1 |
|
self._freeze = True |
8324
|
|
|
|
8325
|
|
|
def to_binary(self): |
8326
|
|
|
packet = [] |
8327
|
|
|
packet.append(pack_datetime(self.ModificationTime)) |
8328
|
|
|
packet.append(uatype_UInt32.pack(self.UpdateType.value)) |
8329
|
|
|
packet.append(pack_string(self.UserName)) |
8330
|
|
|
return b''.join(packet) |
8331
|
1 |
|
|
8332
|
|
|
@staticmethod |
8333
|
|
|
def from_binary(data): |
8334
|
1 |
|
return ModificationInfo(data) |
8335
|
|
|
|
8336
|
|
|
def _binary_init(self, data): |
8337
|
1 |
|
self.ModificationTime = unpack_datetime(data) |
8338
|
|
|
self.UpdateType = HistoryUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
8339
|
|
|
self.UserName = unpack_string(data) |
8340
|
|
|
|
8341
|
|
|
def __str__(self): |
8342
|
|
|
return 'ModificationInfo(' + 'ModificationTime:' + str(self.ModificationTime) + ', ' + \ |
8343
|
|
|
'UpdateType:' + str(self.UpdateType) + ', ' + \ |
8344
|
|
|
'UserName:' + str(self.UserName) + ')' |
8345
|
|
|
|
8346
|
1 |
|
__repr__ = __str__ |
8347
|
|
|
|
8348
|
|
|
|
8349
|
|
|
class HistoryModifiedData(FrozenClass): |
8350
|
|
|
''' |
8351
|
|
|
:ivar DataValues: |
8352
|
|
|
:vartype DataValues: DataValue |
8353
|
|
|
:ivar ModificationInfos: |
8354
|
|
|
:vartype ModificationInfos: ModificationInfo |
8355
|
|
|
''' |
8356
|
1 |
|
def __init__(self, binary=None): |
8357
|
|
|
if binary is not None: |
8358
|
|
|
self._binary_init(binary) |
8359
|
|
|
self._freeze = True |
8360
|
|
|
return |
8361
|
|
|
self.DataValues = [] |
8362
|
|
|
self.ModificationInfos = [] |
8363
|
1 |
|
self._freeze = True |
8364
|
|
|
|
8365
|
|
|
def to_binary(self): |
8366
|
|
|
packet = [] |
8367
|
1 |
|
packet.append(uatype_Int32.pack(len(self.DataValues))) |
8368
|
|
|
for fieldname in self.DataValues: |
8369
|
|
|
packet.append(fieldname.to_binary()) |
8370
|
|
|
packet.append(uatype_Int32.pack(len(self.ModificationInfos))) |
8371
|
|
|
for fieldname in self.ModificationInfos: |
8372
|
1 |
|
packet.append(fieldname.to_binary()) |
8373
|
|
|
return b''.join(packet) |
8374
|
|
|
|
8375
|
|
|
@staticmethod |
8376
|
|
|
def from_binary(data): |
8377
|
1 |
|
return HistoryModifiedData(data) |
8378
|
|
|
|
8379
|
|
|
def _binary_init(self, data): |
8380
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
8381
|
|
|
array = [] |
8382
|
|
|
if length != -1: |
8383
|
|
|
for _ in range(0, length): |
8384
|
|
|
array.append(DataValue.from_binary(data)) |
8385
|
|
|
self.DataValues = array |
8386
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8387
|
1 |
|
array = [] |
8388
|
|
|
if length != -1: |
8389
|
|
|
for _ in range(0, length): |
8390
|
|
|
array.append(ModificationInfo.from_binary(data)) |
8391
|
|
|
self.ModificationInfos = array |
8392
|
|
|
|
8393
|
|
|
def __str__(self): |
8394
|
|
|
return 'HistoryModifiedData(' + 'DataValues:' + str(self.DataValues) + ', ' + \ |
8395
|
|
|
'ModificationInfos:' + str(self.ModificationInfos) + ')' |
8396
|
1 |
|
|
8397
|
|
|
__repr__ = __str__ |
8398
|
|
|
|
8399
|
|
|
|
8400
|
|
|
class HistoryEvent(FrozenClass): |
8401
|
|
|
''' |
8402
|
|
|
:ivar Events: |
8403
|
|
|
:vartype Events: HistoryEventFieldList |
8404
|
|
|
''' |
8405
|
|
|
def __init__(self, binary=None): |
8406
|
1 |
|
if binary is not None: |
8407
|
|
|
self._binary_init(binary) |
8408
|
|
|
self._freeze = True |
8409
|
|
|
return |
8410
|
1 |
|
self.Events = [] |
8411
|
|
|
self._freeze = True |
8412
|
|
|
|
8413
|
|
|
def to_binary(self): |
8414
|
|
|
packet = [] |
8415
|
|
|
packet.append(uatype_Int32.pack(len(self.Events))) |
8416
|
|
|
for fieldname in self.Events: |
8417
|
|
|
packet.append(fieldname.to_binary()) |
8418
|
|
|
return b''.join(packet) |
8419
|
|
|
|
8420
|
|
|
@staticmethod |
8421
|
|
|
def from_binary(data): |
8422
|
|
|
return HistoryEvent(data) |
8423
|
|
|
|
8424
|
1 |
|
def _binary_init(self, data): |
8425
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8426
|
|
|
array = [] |
8427
|
|
|
if length != -1: |
8428
|
1 |
|
for _ in range(0, length): |
8429
|
|
|
array.append(HistoryEventFieldList.from_binary(data)) |
8430
|
|
|
self.Events = array |
8431
|
1 |
|
|
8432
|
|
|
def __str__(self): |
8433
|
|
|
return 'HistoryEvent(' + 'Events:' + str(self.Events) + ')' |
8434
|
|
|
|
8435
|
|
|
__repr__ = __str__ |
8436
|
1 |
|
|
8437
|
|
|
|
8438
|
|
|
class HistoryReadParameters(FrozenClass): |
8439
|
|
|
''' |
8440
|
|
|
:ivar HistoryReadDetails: |
8441
|
|
|
:vartype HistoryReadDetails: ExtensionObject |
8442
|
|
|
:ivar TimestampsToReturn: |
8443
|
|
|
:vartype TimestampsToReturn: TimestampsToReturn |
8444
|
1 |
|
:ivar ReleaseContinuationPoints: |
8445
|
|
|
:vartype ReleaseContinuationPoints: Boolean |
8446
|
|
|
:ivar NodesToRead: |
8447
|
|
|
:vartype NodesToRead: HistoryReadValueId |
8448
|
|
|
''' |
8449
|
|
|
def __init__(self, binary=None): |
8450
|
|
|
if binary is not None: |
8451
|
1 |
|
self._binary_init(binary) |
8452
|
|
|
self._freeze = True |
8453
|
|
|
return |
8454
|
|
|
self.HistoryReadDetails = None |
8455
|
1 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
8456
|
|
|
self.ReleaseContinuationPoints = True |
8457
|
|
|
self.NodesToRead = [] |
8458
|
|
|
self._freeze = True |
8459
|
|
|
|
8460
|
|
|
def to_binary(self): |
8461
|
|
|
packet = [] |
8462
|
|
|
packet.append(extensionobject_to_binary(self.HistoryReadDetails)) |
8463
|
1 |
|
packet.append(uatype_UInt32.pack(self.TimestampsToReturn.value)) |
8464
|
|
|
packet.append(uatype_Boolean.pack(self.ReleaseContinuationPoints)) |
8465
|
|
|
packet.append(uatype_Int32.pack(len(self.NodesToRead))) |
8466
|
1 |
|
for fieldname in self.NodesToRead: |
8467
|
|
|
packet.append(fieldname.to_binary()) |
8468
|
|
|
return b''.join(packet) |
8469
|
1 |
|
|
8470
|
|
|
@staticmethod |
8471
|
|
|
def from_binary(data): |
8472
|
|
|
return HistoryReadParameters(data) |
8473
|
|
|
|
8474
|
|
|
def _binary_init(self, data): |
8475
|
|
|
self.HistoryReadDetails = extensionobject_from_binary(data) |
8476
|
|
|
self.TimestampsToReturn = TimestampsToReturn(uatype_UInt32.unpack(data.read(4))[0]) |
8477
|
|
|
self.ReleaseContinuationPoints = uatype_Boolean.unpack(data.read(1))[0] |
8478
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8479
|
|
|
array = [] |
8480
|
1 |
|
if length != -1: |
8481
|
|
|
for _ in range(0, length): |
8482
|
|
|
array.append(HistoryReadValueId.from_binary(data)) |
8483
|
|
|
self.NodesToRead = array |
8484
|
|
|
|
8485
|
|
|
def __str__(self): |
8486
|
|
|
return 'HistoryReadParameters(' + 'HistoryReadDetails:' + str(self.HistoryReadDetails) + ', ' + \ |
8487
|
|
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
8488
|
|
|
'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \ |
8489
|
|
|
'NodesToRead:' + str(self.NodesToRead) + ')' |
8490
|
|
|
|
8491
|
1 |
|
__repr__ = __str__ |
8492
|
|
|
|
8493
|
|
|
|
8494
|
|
|
class HistoryReadRequest(FrozenClass): |
8495
|
|
|
''' |
8496
|
|
|
:ivar TypeId: |
8497
|
|
|
:vartype TypeId: NodeId |
8498
|
|
|
:ivar RequestHeader: |
8499
|
|
|
:vartype RequestHeader: RequestHeader |
8500
|
|
|
:ivar Parameters: |
8501
|
1 |
|
:vartype Parameters: HistoryReadParameters |
8502
|
|
|
''' |
8503
|
|
|
def __init__(self, binary=None): |
8504
|
|
|
if binary is not None: |
8505
|
1 |
|
self._binary_init(binary) |
8506
|
|
|
self._freeze = True |
8507
|
|
|
return |
8508
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary) |
8509
|
|
|
self.RequestHeader = RequestHeader() |
8510
|
|
|
self.Parameters = HistoryReadParameters() |
8511
|
|
|
self._freeze = True |
8512
|
|
|
|
8513
|
|
|
def to_binary(self): |
8514
|
|
|
packet = [] |
8515
|
|
|
packet.append(self.TypeId.to_binary()) |
8516
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
8517
|
|
|
packet.append(self.Parameters.to_binary()) |
8518
|
|
|
return b''.join(packet) |
8519
|
|
|
|
8520
|
|
|
@staticmethod |
8521
|
|
|
def from_binary(data): |
8522
|
1 |
|
return HistoryReadRequest(data) |
8523
|
|
|
|
8524
|
|
|
def _binary_init(self, data): |
8525
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
8526
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
8527
|
|
|
self.Parameters = HistoryReadParameters.from_binary(data) |
8528
|
|
|
|
8529
|
|
|
def __str__(self): |
8530
|
|
|
return 'HistoryReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
8531
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
8532
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
8533
|
|
|
|
8534
|
1 |
|
__repr__ = __str__ |
8535
|
|
|
|
8536
|
|
|
|
8537
|
|
|
class HistoryReadResponse(FrozenClass): |
8538
|
|
|
''' |
8539
|
|
|
:ivar TypeId: |
8540
|
|
|
:vartype TypeId: NodeId |
8541
|
|
|
:ivar ResponseHeader: |
8542
|
|
|
:vartype ResponseHeader: ResponseHeader |
8543
|
|
|
:ivar Results: |
8544
|
1 |
|
:vartype Results: HistoryReadResult |
8545
|
|
|
:ivar DiagnosticInfos: |
8546
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
8547
|
|
|
''' |
8548
|
|
|
def __init__(self, binary=None): |
8549
|
|
|
if binary is not None: |
8550
|
|
|
self._binary_init(binary) |
8551
|
1 |
|
self._freeze = True |
8552
|
|
|
return |
8553
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary) |
8554
|
|
|
self.ResponseHeader = ResponseHeader() |
8555
|
1 |
|
self.Results = [] |
8556
|
|
|
self.DiagnosticInfos = [] |
8557
|
|
|
self._freeze = True |
8558
|
|
|
|
8559
|
|
|
def to_binary(self): |
8560
|
1 |
|
packet = [] |
8561
|
|
|
packet.append(self.TypeId.to_binary()) |
8562
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
8563
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
8564
|
|
|
for fieldname in self.Results: |
8565
|
1 |
|
packet.append(fieldname.to_binary()) |
8566
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
8567
|
|
|
for fieldname in self.DiagnosticInfos: |
8568
|
1 |
|
packet.append(fieldname.to_binary()) |
8569
|
|
|
return b''.join(packet) |
8570
|
|
|
|
8571
|
|
|
@staticmethod |
8572
|
|
|
def from_binary(data): |
8573
|
|
|
return HistoryReadResponse(data) |
8574
|
|
|
|
8575
|
|
|
def _binary_init(self, data): |
8576
|
|
|
self.TypeId = NodeId.from_binary(data) |
8577
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
8578
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8579
|
1 |
|
array = [] |
8580
|
|
|
if length != -1: |
8581
|
|
|
for _ in range(0, length): |
8582
|
|
|
array.append(HistoryReadResult.from_binary(data)) |
8583
|
|
|
self.Results = array |
8584
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8585
|
|
|
array = [] |
8586
|
|
|
if length != -1: |
8587
|
|
|
for _ in range(0, length): |
8588
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
8589
|
|
|
self.DiagnosticInfos = array |
8590
|
1 |
|
|
8591
|
|
|
def __str__(self): |
8592
|
|
|
return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
8593
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
8594
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
8595
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
8596
|
|
|
|
8597
|
|
|
__repr__ = __str__ |
8598
|
|
|
|
8599
|
|
|
|
8600
|
|
|
class WriteValue(FrozenClass): |
8601
|
|
|
''' |
8602
|
1 |
|
:ivar NodeId: |
8603
|
|
|
:vartype NodeId: NodeId |
8604
|
|
|
:ivar AttributeId: |
8605
|
|
|
:vartype AttributeId: UInt32 |
8606
|
1 |
|
:ivar IndexRange: |
8607
|
|
|
:vartype IndexRange: String |
8608
|
|
|
:ivar Value: |
8609
|
|
|
:vartype Value: DataValue |
8610
|
|
|
''' |
8611
|
|
|
def __init__(self, binary=None): |
8612
|
|
|
if binary is not None: |
8613
|
|
|
self._binary_init(binary) |
8614
|
|
|
self._freeze = True |
8615
|
|
|
return |
8616
|
|
|
self.NodeId = NodeId() |
8617
|
|
|
self.AttributeId = 0 |
8618
|
|
|
self.IndexRange = '' |
8619
|
|
|
self.Value = DataValue() |
8620
|
|
|
self._freeze = True |
8621
|
|
|
|
8622
|
1 |
|
def to_binary(self): |
8623
|
|
|
packet = [] |
8624
|
|
|
packet.append(self.NodeId.to_binary()) |
8625
|
|
|
packet.append(uatype_UInt32.pack(self.AttributeId)) |
8626
|
|
|
packet.append(pack_string(self.IndexRange)) |
8627
|
|
|
packet.append(self.Value.to_binary()) |
8628
|
1 |
|
return b''.join(packet) |
8629
|
|
|
|
8630
|
|
|
@staticmethod |
8631
|
1 |
|
def from_binary(data): |
8632
|
|
|
return WriteValue(data) |
8633
|
|
|
|
8634
|
|
|
def _binary_init(self, data): |
8635
|
|
|
self.NodeId = NodeId.from_binary(data) |
8636
|
|
|
self.AttributeId = uatype_UInt32.unpack(data.read(4))[0] |
8637
|
|
|
self.IndexRange = unpack_string(data) |
8638
|
|
|
self.Value = DataValue.from_binary(data) |
8639
|
|
|
|
8640
|
|
|
def __str__(self): |
8641
|
|
|
return 'WriteValue(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
8642
|
1 |
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
8643
|
1 |
|
'IndexRange:' + str(self.IndexRange) + ', ' + \ |
8644
|
1 |
|
'Value:' + str(self.Value) + ')' |
8645
|
1 |
|
|
8646
|
1 |
|
__repr__ = __str__ |
8647
|
1 |
|
|
8648
|
1 |
|
|
8649
|
1 |
|
class WriteParameters(FrozenClass): |
8650
|
1 |
|
''' |
8651
|
1 |
|
:ivar NodesToWrite: |
8652
|
|
|
:vartype NodesToWrite: WriteValue |
8653
|
1 |
|
''' |
8654
|
1 |
|
def __init__(self, binary=None): |
8655
|
1 |
|
if binary is not None: |
8656
|
1 |
|
self._binary_init(binary) |
8657
|
1 |
|
self._freeze = True |
8658
|
1 |
|
return |
8659
|
1 |
|
self.NodesToWrite = [] |
8660
|
|
|
self._freeze = True |
8661
|
1 |
|
|
8662
|
|
|
def to_binary(self): |
8663
|
1 |
|
packet = [] |
8664
|
|
|
packet.append(uatype_Int32.pack(len(self.NodesToWrite))) |
8665
|
1 |
|
for fieldname in self.NodesToWrite: |
8666
|
1 |
|
packet.append(fieldname.to_binary()) |
8667
|
1 |
|
return b''.join(packet) |
8668
|
1 |
|
|
8669
|
1 |
|
@staticmethod |
8670
|
|
|
def from_binary(data): |
8671
|
1 |
|
return WriteParameters(data) |
8672
|
|
|
|
8673
|
|
|
def _binary_init(self, data): |
8674
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8675
|
|
|
array = [] |
8676
|
|
|
if length != -1: |
8677
|
1 |
|
for _ in range(0, length): |
8678
|
|
|
array.append(WriteValue.from_binary(data)) |
8679
|
|
|
self.NodesToWrite = array |
8680
|
1 |
|
|
8681
|
|
|
def __str__(self): |
8682
|
|
|
return 'WriteParameters(' + 'NodesToWrite:' + str(self.NodesToWrite) + ')' |
8683
|
|
|
|
8684
|
|
|
__repr__ = __str__ |
8685
|
1 |
|
|
8686
|
1 |
|
|
8687
|
1 |
|
class WriteRequest(FrozenClass): |
8688
|
1 |
|
''' |
8689
|
1 |
|
:ivar TypeId: |
8690
|
1 |
|
:vartype TypeId: NodeId |
8691
|
1 |
|
:ivar RequestHeader: |
8692
|
|
|
:vartype RequestHeader: RequestHeader |
8693
|
1 |
|
:ivar Parameters: |
8694
|
1 |
|
:vartype Parameters: WriteParameters |
8695
|
1 |
|
''' |
8696
|
1 |
|
def __init__(self, binary=None): |
8697
|
1 |
|
if binary is not None: |
8698
|
1 |
|
self._binary_init(binary) |
8699
|
|
|
self._freeze = True |
8700
|
1 |
|
return |
8701
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary) |
8702
|
1 |
|
self.RequestHeader = RequestHeader() |
8703
|
|
|
self.Parameters = WriteParameters() |
8704
|
1 |
|
self._freeze = True |
8705
|
1 |
|
|
8706
|
1 |
|
def to_binary(self): |
8707
|
1 |
|
packet = [] |
8708
|
1 |
|
packet.append(self.TypeId.to_binary()) |
8709
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
8710
|
1 |
|
packet.append(self.Parameters.to_binary()) |
8711
|
|
|
return b''.join(packet) |
8712
|
1 |
|
|
8713
|
|
|
@staticmethod |
8714
|
|
|
def from_binary(data): |
8715
|
1 |
|
return WriteRequest(data) |
8716
|
|
|
|
8717
|
|
|
def _binary_init(self, data): |
8718
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
8719
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
8720
|
|
|
self.Parameters = WriteParameters.from_binary(data) |
8721
|
|
|
|
8722
|
|
|
def __str__(self): |
8723
|
|
|
return 'WriteRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
8724
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
8725
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
8726
|
|
|
|
8727
|
1 |
|
__repr__ = __str__ |
8728
|
1 |
|
|
8729
|
|
|
|
8730
|
|
|
class WriteResponse(FrozenClass): |
8731
|
|
|
''' |
8732
|
1 |
|
:ivar TypeId: |
8733
|
1 |
|
:vartype TypeId: NodeId |
8734
|
1 |
|
:ivar ResponseHeader: |
8735
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
8736
|
|
|
:ivar Results: |
8737
|
1 |
|
:vartype Results: StatusCode |
8738
|
1 |
|
:ivar DiagnosticInfos: |
8739
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
8740
|
1 |
|
''' |
8741
|
1 |
|
def __init__(self, binary=None): |
8742
|
1 |
|
if binary is not None: |
8743
|
|
|
self._binary_init(binary) |
8744
|
1 |
|
self._freeze = True |
8745
|
|
|
return |
8746
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary) |
8747
|
|
|
self.ResponseHeader = ResponseHeader() |
8748
|
1 |
|
self.Results = [] |
8749
|
|
|
self.DiagnosticInfos = [] |
8750
|
|
|
self._freeze = True |
8751
|
|
|
|
8752
|
|
|
def to_binary(self): |
8753
|
1 |
|
packet = [] |
8754
|
|
|
packet.append(self.TypeId.to_binary()) |
8755
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
8756
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
8757
|
|
|
for fieldname in self.Results: |
8758
|
1 |
|
packet.append(fieldname.to_binary()) |
8759
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
8760
|
|
|
for fieldname in self.DiagnosticInfos: |
8761
|
1 |
|
packet.append(fieldname.to_binary()) |
8762
|
|
|
return b''.join(packet) |
8763
|
|
|
|
8764
|
|
|
@staticmethod |
8765
|
|
|
def from_binary(data): |
8766
|
|
|
return WriteResponse(data) |
8767
|
|
|
|
8768
|
|
|
def _binary_init(self, data): |
8769
|
|
|
self.TypeId = NodeId.from_binary(data) |
8770
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
8771
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8772
|
1 |
|
array = [] |
8773
|
1 |
|
if length != -1: |
8774
|
1 |
|
for _ in range(0, length): |
8775
|
1 |
|
array.append(StatusCode.from_binary(data)) |
8776
|
1 |
|
self.Results = array |
8777
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
8778
|
1 |
|
array = [] |
8779
|
1 |
|
if length != -1: |
8780
|
1 |
|
for _ in range(0, length): |
8781
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
8782
|
|
|
self.DiagnosticInfos = array |
8783
|
1 |
|
|
8784
|
1 |
|
def __str__(self): |
8785
|
1 |
|
return 'WriteResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
8786
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
8787
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
8788
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
8789
|
1 |
|
|
8790
|
1 |
|
__repr__ = __str__ |
8791
|
1 |
|
|
8792
|
|
|
|
8793
|
1 |
|
class HistoryUpdateDetails(FrozenClass): |
8794
|
|
|
''' |
8795
|
1 |
|
:ivar NodeId: |
8796
|
|
|
:vartype NodeId: NodeId |
8797
|
1 |
|
''' |
8798
|
|
|
def __init__(self, binary=None): |
8799
|
1 |
|
if binary is not None: |
8800
|
1 |
|
self._binary_init(binary) |
8801
|
1 |
|
self._freeze = True |
8802
|
1 |
|
return |
8803
|
1 |
|
self.NodeId = NodeId() |
8804
|
1 |
|
self._freeze = True |
8805
|
1 |
|
|
8806
|
1 |
|
def to_binary(self): |
8807
|
1 |
|
packet = [] |
8808
|
1 |
|
packet.append(self.NodeId.to_binary()) |
8809
|
1 |
|
return b''.join(packet) |
8810
|
1 |
|
|
8811
|
1 |
|
@staticmethod |
8812
|
|
|
def from_binary(data): |
8813
|
1 |
|
return HistoryUpdateDetails(data) |
8814
|
|
|
|
8815
|
1 |
|
def _binary_init(self, data): |
8816
|
|
|
self.NodeId = NodeId.from_binary(data) |
8817
|
|
|
|
8818
|
|
|
def __str__(self): |
8819
|
|
|
return 'HistoryUpdateDetails(' + 'NodeId:' + str(self.NodeId) + ')' |
8820
|
|
|
|
8821
|
1 |
|
__repr__ = __str__ |
8822
|
|
|
|
8823
|
|
|
|
8824
|
1 |
|
class UpdateDataDetails(FrozenClass): |
8825
|
|
|
''' |
8826
|
|
|
:ivar NodeId: |
8827
|
|
|
:vartype NodeId: NodeId |
8828
|
|
|
:ivar PerformInsertReplace: |
8829
|
1 |
|
:vartype PerformInsertReplace: PerformUpdateType |
8830
|
|
|
:ivar UpdateValues: |
8831
|
|
|
:vartype UpdateValues: DataValue |
8832
|
|
|
''' |
8833
|
|
|
def __init__(self, binary=None): |
8834
|
|
|
if binary is not None: |
8835
|
|
|
self._binary_init(binary) |
8836
|
|
|
self._freeze = True |
8837
|
1 |
|
return |
8838
|
|
|
self.NodeId = NodeId() |
8839
|
|
|
self.PerformInsertReplace = PerformUpdateType(0) |
8840
|
|
|
self.UpdateValues = [] |
8841
|
|
|
self._freeze = True |
8842
|
1 |
|
|
8843
|
|
|
def to_binary(self): |
8844
|
|
|
packet = [] |
8845
|
|
|
packet.append(self.NodeId.to_binary()) |
8846
|
1 |
|
packet.append(uatype_UInt32.pack(self.PerformInsertReplace.value)) |
8847
|
|
|
packet.append(uatype_Int32.pack(len(self.UpdateValues))) |
8848
|
|
|
for fieldname in self.UpdateValues: |
8849
|
1 |
|
packet.append(fieldname.to_binary()) |
8850
|
|
|
return b''.join(packet) |
8851
|
|
|
|
8852
|
1 |
|
@staticmethod |
8853
|
|
|
def from_binary(data): |
8854
|
|
|
return UpdateDataDetails(data) |
8855
|
1 |
|
|
8856
|
|
|
def _binary_init(self, data): |
8857
|
|
|
self.NodeId = NodeId.from_binary(data) |
8858
|
|
|
self.PerformInsertReplace = PerformUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
8859
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8860
|
|
|
array = [] |
8861
|
|
|
if length != -1: |
8862
|
|
|
for _ in range(0, length): |
8863
|
|
|
array.append(DataValue.from_binary(data)) |
8864
|
1 |
|
self.UpdateValues = array |
8865
|
|
|
|
8866
|
|
|
def __str__(self): |
8867
|
|
|
return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
8868
|
|
|
'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
8869
|
|
|
'UpdateValues:' + str(self.UpdateValues) + ')' |
8870
|
|
|
|
8871
|
|
|
__repr__ = __str__ |
8872
|
|
|
|
8873
|
|
|
|
8874
|
1 |
|
class UpdateStructureDataDetails(FrozenClass): |
8875
|
|
|
''' |
8876
|
|
|
:ivar NodeId: |
8877
|
|
|
:vartype NodeId: NodeId |
8878
|
|
|
:ivar PerformInsertReplace: |
8879
|
|
|
:vartype PerformInsertReplace: PerformUpdateType |
8880
|
|
|
:ivar UpdateValues: |
8881
|
|
|
:vartype UpdateValues: DataValue |
8882
|
|
|
''' |
8883
|
1 |
|
def __init__(self, binary=None): |
8884
|
|
|
if binary is not None: |
8885
|
|
|
self._binary_init(binary) |
8886
|
|
|
self._freeze = True |
8887
|
1 |
|
return |
8888
|
|
|
self.NodeId = NodeId() |
8889
|
|
|
self.PerformInsertReplace = PerformUpdateType(0) |
8890
|
|
|
self.UpdateValues = [] |
8891
|
|
|
self._freeze = True |
8892
|
|
|
|
8893
|
|
|
def to_binary(self): |
8894
|
|
|
packet = [] |
8895
|
|
|
packet.append(self.NodeId.to_binary()) |
8896
|
|
|
packet.append(uatype_UInt32.pack(self.PerformInsertReplace.value)) |
8897
|
1 |
|
packet.append(uatype_Int32.pack(len(self.UpdateValues))) |
8898
|
|
|
for fieldname in self.UpdateValues: |
8899
|
|
|
packet.append(fieldname.to_binary()) |
8900
|
|
|
return b''.join(packet) |
8901
|
|
|
|
8902
|
1 |
|
@staticmethod |
8903
|
|
|
def from_binary(data): |
8904
|
|
|
return UpdateStructureDataDetails(data) |
8905
|
1 |
|
|
8906
|
|
|
def _binary_init(self, data): |
8907
|
|
|
self.NodeId = NodeId.from_binary(data) |
8908
|
|
|
self.PerformInsertReplace = PerformUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
8909
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8910
|
|
|
array = [] |
8911
|
|
|
if length != -1: |
8912
|
|
|
for _ in range(0, length): |
8913
|
|
|
array.append(DataValue.from_binary(data)) |
8914
|
1 |
|
self.UpdateValues = array |
8915
|
|
|
|
8916
|
|
|
def __str__(self): |
8917
|
|
|
return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
8918
|
|
|
'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
8919
|
|
|
'UpdateValues:' + str(self.UpdateValues) + ')' |
8920
|
|
|
|
8921
|
|
|
__repr__ = __str__ |
8922
|
|
|
|
8923
|
|
|
|
8924
|
1 |
|
class UpdateEventDetails(FrozenClass): |
8925
|
|
|
''' |
8926
|
|
|
:ivar NodeId: |
8927
|
|
|
:vartype NodeId: NodeId |
8928
|
|
|
:ivar PerformInsertReplace: |
8929
|
|
|
:vartype PerformInsertReplace: PerformUpdateType |
8930
|
|
|
:ivar Filter: |
8931
|
|
|
:vartype Filter: EventFilter |
8932
|
|
|
:ivar EventData: |
8933
|
1 |
|
:vartype EventData: HistoryEventFieldList |
8934
|
|
|
''' |
8935
|
|
|
def __init__(self, binary=None): |
8936
|
|
|
if binary is not None: |
8937
|
1 |
|
self._binary_init(binary) |
8938
|
|
|
self._freeze = True |
8939
|
|
|
return |
8940
|
|
|
self.NodeId = NodeId() |
8941
|
|
|
self.PerformInsertReplace = PerformUpdateType(0) |
8942
|
|
|
self.Filter = EventFilter() |
8943
|
|
|
self.EventData = [] |
8944
|
|
|
self._freeze = True |
8945
|
|
|
|
8946
|
|
|
def to_binary(self): |
8947
|
1 |
|
packet = [] |
8948
|
|
|
packet.append(self.NodeId.to_binary()) |
8949
|
|
|
packet.append(uatype_UInt32.pack(self.PerformInsertReplace.value)) |
8950
|
|
|
packet.append(self.Filter.to_binary()) |
8951
|
|
|
packet.append(uatype_Int32.pack(len(self.EventData))) |
8952
|
1 |
|
for fieldname in self.EventData: |
8953
|
|
|
packet.append(fieldname.to_binary()) |
8954
|
|
|
return b''.join(packet) |
8955
|
1 |
|
|
8956
|
|
|
@staticmethod |
8957
|
|
|
def from_binary(data): |
8958
|
|
|
return UpdateEventDetails(data) |
8959
|
|
|
|
8960
|
|
|
def _binary_init(self, data): |
8961
|
|
|
self.NodeId = NodeId.from_binary(data) |
8962
|
|
|
self.PerformInsertReplace = PerformUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
8963
|
|
|
self.Filter = EventFilter.from_binary(data) |
8964
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
8965
|
|
|
array = [] |
8966
|
1 |
|
if length != -1: |
8967
|
|
|
for _ in range(0, length): |
8968
|
|
|
array.append(HistoryEventFieldList.from_binary(data)) |
8969
|
|
|
self.EventData = array |
8970
|
|
|
|
8971
|
|
|
def __str__(self): |
8972
|
|
|
return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
8973
|
|
|
'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
8974
|
|
|
'Filter:' + str(self.Filter) + ', ' + \ |
8975
|
|
|
'EventData:' + str(self.EventData) + ')' |
8976
|
|
|
|
8977
|
1 |
|
__repr__ = __str__ |
8978
|
|
|
|
8979
|
|
|
|
8980
|
|
|
class DeleteRawModifiedDetails(FrozenClass): |
8981
|
|
|
''' |
8982
|
|
|
:ivar NodeId: |
8983
|
|
|
:vartype NodeId: NodeId |
8984
|
|
|
:ivar IsDeleteModified: |
8985
|
|
|
:vartype IsDeleteModified: Boolean |
8986
|
|
|
:ivar StartTime: |
8987
|
1 |
|
:vartype StartTime: DateTime |
8988
|
|
|
:ivar EndTime: |
8989
|
|
|
:vartype EndTime: DateTime |
8990
|
|
|
''' |
8991
|
1 |
|
def __init__(self, binary=None): |
8992
|
|
|
if binary is not None: |
8993
|
|
|
self._binary_init(binary) |
8994
|
|
|
self._freeze = True |
8995
|
|
|
return |
8996
|
|
|
self.NodeId = NodeId() |
8997
|
|
|
self.IsDeleteModified = True |
8998
|
|
|
self.StartTime = datetime.now() |
8999
|
|
|
self.EndTime = datetime.now() |
9000
|
|
|
self._freeze = True |
9001
|
|
|
|
9002
|
1 |
|
def to_binary(self): |
9003
|
|
|
packet = [] |
9004
|
|
|
packet.append(self.NodeId.to_binary()) |
9005
|
|
|
packet.append(uatype_Boolean.pack(self.IsDeleteModified)) |
9006
|
|
|
packet.append(pack_datetime(self.StartTime)) |
9007
|
|
|
packet.append(pack_datetime(self.EndTime)) |
9008
|
1 |
|
return b''.join(packet) |
9009
|
|
|
|
9010
|
|
|
@staticmethod |
9011
|
1 |
|
def from_binary(data): |
9012
|
|
|
return DeleteRawModifiedDetails(data) |
9013
|
|
|
|
9014
|
|
|
def _binary_init(self, data): |
9015
|
|
|
self.NodeId = NodeId.from_binary(data) |
9016
|
|
|
self.IsDeleteModified = uatype_Boolean.unpack(data.read(1))[0] |
9017
|
|
|
self.StartTime = unpack_datetime(data) |
9018
|
|
|
self.EndTime = unpack_datetime(data) |
9019
|
|
|
|
9020
|
|
|
def __str__(self): |
9021
|
|
|
return 'DeleteRawModifiedDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
9022
|
1 |
|
'IsDeleteModified:' + str(self.IsDeleteModified) + ', ' + \ |
9023
|
|
|
'StartTime:' + str(self.StartTime) + ', ' + \ |
9024
|
|
|
'EndTime:' + str(self.EndTime) + ')' |
9025
|
|
|
|
9026
|
|
|
__repr__ = __str__ |
9027
|
|
|
|
9028
|
|
|
|
9029
|
|
|
class DeleteAtTimeDetails(FrozenClass): |
9030
|
|
|
''' |
9031
|
|
|
:ivar NodeId: |
9032
|
|
|
:vartype NodeId: NodeId |
9033
|
1 |
|
:ivar ReqTimes: |
9034
|
|
|
:vartype ReqTimes: DateTime |
9035
|
|
|
''' |
9036
|
|
|
def __init__(self, binary=None): |
9037
|
|
|
if binary is not None: |
9038
|
|
|
self._binary_init(binary) |
9039
|
|
|
self._freeze = True |
9040
|
|
|
return |
9041
|
1 |
|
self.NodeId = NodeId() |
9042
|
|
|
self.ReqTimes = [] |
9043
|
|
|
self._freeze = True |
9044
|
|
|
|
9045
|
1 |
|
def to_binary(self): |
9046
|
|
|
packet = [] |
9047
|
|
|
packet.append(self.NodeId.to_binary()) |
9048
|
|
|
packet.append(uatype_Int32.pack(len(self.ReqTimes))) |
9049
|
|
|
for fieldname in self.ReqTimes: |
9050
|
|
|
packet.append(pack_datetime(fieldname)) |
9051
|
1 |
|
return b''.join(packet) |
9052
|
|
|
|
9053
|
|
|
@staticmethod |
9054
|
|
|
def from_binary(data): |
9055
|
|
|
return DeleteAtTimeDetails(data) |
9056
|
|
|
|
9057
|
1 |
|
def _binary_init(self, data): |
9058
|
|
|
self.NodeId = NodeId.from_binary(data) |
9059
|
|
|
self.ReqTimes = unpack_uatype_array('DateTime', data) |
9060
|
1 |
|
|
9061
|
|
|
def __str__(self): |
9062
|
|
|
return 'DeleteAtTimeDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
9063
|
|
|
'ReqTimes:' + str(self.ReqTimes) + ')' |
9064
|
|
|
|
9065
|
|
|
__repr__ = __str__ |
9066
|
|
|
|
9067
|
1 |
|
|
9068
|
|
|
class DeleteEventDetails(FrozenClass): |
9069
|
|
|
''' |
9070
|
|
|
:ivar NodeId: |
9071
|
|
|
:vartype NodeId: NodeId |
9072
|
|
|
:ivar EventIds: |
9073
|
|
|
:vartype EventIds: ByteString |
9074
|
|
|
''' |
9075
|
|
|
def __init__(self, binary=None): |
9076
|
1 |
|
if binary is not None: |
9077
|
|
|
self._binary_init(binary) |
9078
|
|
|
self._freeze = True |
9079
|
|
|
return |
9080
|
|
|
self.NodeId = NodeId() |
9081
|
|
|
self.EventIds = [] |
9082
|
|
|
self._freeze = True |
9083
|
|
|
|
9084
|
1 |
|
def to_binary(self): |
9085
|
|
|
packet = [] |
9086
|
|
|
packet.append(self.NodeId.to_binary()) |
9087
|
|
|
packet.append(uatype_Int32.pack(len(self.EventIds))) |
9088
|
1 |
|
for fieldname in self.EventIds: |
9089
|
|
|
packet.append(pack_bytes(fieldname)) |
9090
|
|
|
return b''.join(packet) |
9091
|
|
|
|
9092
|
1 |
|
@staticmethod |
9093
|
|
|
def from_binary(data): |
9094
|
|
|
return DeleteEventDetails(data) |
9095
|
|
|
|
9096
|
1 |
|
def _binary_init(self, data): |
9097
|
|
|
self.NodeId = NodeId.from_binary(data) |
9098
|
|
|
self.EventIds = unpack_uatype_array('ByteString', data) |
9099
|
1 |
|
|
9100
|
|
|
def __str__(self): |
9101
|
|
|
return 'DeleteEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
9102
|
|
|
'EventIds:' + str(self.EventIds) + ')' |
9103
|
|
|
|
9104
|
|
|
__repr__ = __str__ |
9105
|
|
|
|
9106
|
1 |
|
|
9107
|
|
|
class HistoryUpdateResult(FrozenClass): |
9108
|
|
|
''' |
9109
|
|
|
:ivar StatusCode: |
9110
|
|
|
:vartype StatusCode: StatusCode |
9111
|
|
|
:ivar OperationResults: |
9112
|
|
|
:vartype OperationResults: StatusCode |
9113
|
|
|
:ivar DiagnosticInfos: |
9114
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
9115
|
1 |
|
''' |
9116
|
|
|
def __init__(self, binary=None): |
9117
|
|
|
if binary is not None: |
9118
|
|
|
self._binary_init(binary) |
9119
|
|
|
self._freeze = True |
9120
|
|
|
return |
9121
|
|
|
self.StatusCode = StatusCode() |
9122
|
|
|
self.OperationResults = [] |
9123
|
1 |
|
self.DiagnosticInfos = [] |
9124
|
|
|
self._freeze = True |
9125
|
|
|
|
9126
|
|
|
def to_binary(self): |
9127
|
1 |
|
packet = [] |
9128
|
|
|
packet.append(self.StatusCode.to_binary()) |
9129
|
|
|
packet.append(uatype_Int32.pack(len(self.OperationResults))) |
9130
|
|
|
for fieldname in self.OperationResults: |
9131
|
1 |
|
packet.append(fieldname.to_binary()) |
9132
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
9133
|
|
|
for fieldname in self.DiagnosticInfos: |
9134
|
|
|
packet.append(fieldname.to_binary()) |
9135
|
1 |
|
return b''.join(packet) |
9136
|
|
|
|
9137
|
|
|
@staticmethod |
9138
|
1 |
|
def from_binary(data): |
9139
|
|
|
return HistoryUpdateResult(data) |
9140
|
|
|
|
9141
|
|
|
def _binary_init(self, data): |
9142
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
9143
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9144
|
|
|
array = [] |
9145
|
|
|
if length != -1: |
9146
|
|
|
for _ in range(0, length): |
9147
|
1 |
|
array.append(StatusCode.from_binary(data)) |
9148
|
|
|
self.OperationResults = array |
9149
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9150
|
|
|
array = [] |
9151
|
|
|
if length != -1: |
9152
|
|
|
for _ in range(0, length): |
9153
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
9154
|
|
|
self.DiagnosticInfos = array |
9155
|
|
|
|
9156
|
|
|
def __str__(self): |
9157
|
1 |
|
return 'HistoryUpdateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
9158
|
|
|
'OperationResults:' + str(self.OperationResults) + ', ' + \ |
9159
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
9160
|
|
|
|
9161
|
|
|
__repr__ = __str__ |
9162
|
|
|
|
9163
|
|
|
|
9164
|
|
|
class HistoryUpdateParameters(FrozenClass): |
9165
|
|
|
''' |
9166
|
|
|
:ivar HistoryUpdateDetails: |
9167
|
|
|
:vartype HistoryUpdateDetails: ExtensionObject |
9168
|
1 |
|
''' |
9169
|
|
|
def __init__(self, binary=None): |
9170
|
|
|
if binary is not None: |
9171
|
|
|
self._binary_init(binary) |
9172
|
1 |
|
self._freeze = True |
9173
|
|
|
return |
9174
|
|
|
self.HistoryUpdateDetails = [] |
9175
|
|
|
self._freeze = True |
9176
|
|
|
|
9177
|
|
|
def to_binary(self): |
9178
|
|
|
packet = [] |
9179
|
|
|
packet.append(uatype_Int32.pack(len(self.HistoryUpdateDetails))) |
9180
|
|
|
for fieldname in self.HistoryUpdateDetails: |
9181
|
|
|
packet.append(extensionobject_to_binary(fieldname)) |
9182
|
|
|
return b''.join(packet) |
9183
|
|
|
|
9184
|
|
|
@staticmethod |
9185
|
|
|
def from_binary(data): |
9186
|
|
|
return HistoryUpdateParameters(data) |
9187
|
1 |
|
|
9188
|
|
|
def _binary_init(self, data): |
9189
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9190
|
|
|
array = [] |
9191
|
|
|
if length != -1: |
9192
|
1 |
|
for _ in range(0, length): |
9193
|
|
|
array.append(extensionobject_from_binary(data)) |
9194
|
|
|
self.HistoryUpdateDetails = array |
9195
|
1 |
|
|
9196
|
|
|
def __str__(self): |
9197
|
|
|
return 'HistoryUpdateParameters(' + 'HistoryUpdateDetails:' + str(self.HistoryUpdateDetails) + ')' |
9198
|
|
|
|
9199
|
|
|
__repr__ = __str__ |
9200
|
1 |
|
|
9201
|
|
|
|
9202
|
|
|
class HistoryUpdateRequest(FrozenClass): |
9203
|
|
|
''' |
9204
|
|
|
:ivar TypeId: |
9205
|
|
|
:vartype TypeId: NodeId |
9206
|
|
|
:ivar RequestHeader: |
9207
|
|
|
:vartype RequestHeader: RequestHeader |
9208
|
1 |
|
:ivar Parameters: |
9209
|
|
|
:vartype Parameters: HistoryUpdateParameters |
9210
|
|
|
''' |
9211
|
|
|
def __init__(self, binary=None): |
9212
|
|
|
if binary is not None: |
9213
|
|
|
self._binary_init(binary) |
9214
|
|
|
self._freeze = True |
9215
|
1 |
|
return |
9216
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary) |
9217
|
|
|
self.RequestHeader = RequestHeader() |
9218
|
|
|
self.Parameters = HistoryUpdateParameters() |
9219
|
1 |
|
self._freeze = True |
9220
|
|
|
|
9221
|
|
|
def to_binary(self): |
9222
|
|
|
packet = [] |
9223
|
|
|
packet.append(self.TypeId.to_binary()) |
9224
|
|
|
packet.append(self.RequestHeader.to_binary()) |
9225
|
|
|
packet.append(self.Parameters.to_binary()) |
9226
|
|
|
return b''.join(packet) |
9227
|
1 |
|
|
9228
|
|
|
@staticmethod |
9229
|
|
|
def from_binary(data): |
9230
|
1 |
|
return HistoryUpdateRequest(data) |
9231
|
|
|
|
9232
|
|
|
def _binary_init(self, data): |
9233
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
9234
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
9235
|
|
|
self.Parameters = HistoryUpdateParameters.from_binary(data) |
9236
|
|
|
|
9237
|
|
|
def __str__(self): |
9238
|
|
|
return 'HistoryUpdateRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
9239
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
9240
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
9241
|
|
|
|
9242
|
1 |
|
__repr__ = __str__ |
9243
|
|
|
|
9244
|
|
|
|
9245
|
|
|
class HistoryUpdateResponse(FrozenClass): |
9246
|
|
|
''' |
9247
|
|
|
:ivar TypeId: |
9248
|
|
|
:vartype TypeId: NodeId |
9249
|
|
|
:ivar ResponseHeader: |
9250
|
|
|
:vartype ResponseHeader: ResponseHeader |
9251
|
|
|
:ivar Results: |
9252
|
1 |
|
:vartype Results: HistoryUpdateResult |
9253
|
|
|
:ivar DiagnosticInfos: |
9254
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
9255
|
|
|
''' |
9256
|
|
|
def __init__(self, binary=None): |
9257
|
|
|
if binary is not None: |
9258
|
|
|
self._binary_init(binary) |
9259
|
1 |
|
self._freeze = True |
9260
|
|
|
return |
9261
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary) |
9262
|
|
|
self.ResponseHeader = ResponseHeader() |
9263
|
1 |
|
self.Results = [] |
9264
|
|
|
self.DiagnosticInfos = [] |
9265
|
|
|
self._freeze = True |
9266
|
|
|
|
9267
|
|
|
def to_binary(self): |
9268
|
1 |
|
packet = [] |
9269
|
|
|
packet.append(self.TypeId.to_binary()) |
9270
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
9271
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
9272
|
|
|
for fieldname in self.Results: |
9273
|
1 |
|
packet.append(fieldname.to_binary()) |
9274
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
9275
|
|
|
for fieldname in self.DiagnosticInfos: |
9276
|
1 |
|
packet.append(fieldname.to_binary()) |
9277
|
|
|
return b''.join(packet) |
9278
|
|
|
|
9279
|
|
|
@staticmethod |
9280
|
|
|
def from_binary(data): |
9281
|
|
|
return HistoryUpdateResponse(data) |
9282
|
|
|
|
9283
|
|
|
def _binary_init(self, data): |
9284
|
|
|
self.TypeId = NodeId.from_binary(data) |
9285
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
9286
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9287
|
1 |
|
array = [] |
9288
|
|
|
if length != -1: |
9289
|
|
|
for _ in range(0, length): |
9290
|
|
|
array.append(HistoryUpdateResult.from_binary(data)) |
9291
|
|
|
self.Results = array |
9292
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9293
|
|
|
array = [] |
9294
|
|
|
if length != -1: |
9295
|
|
|
for _ in range(0, length): |
9296
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
9297
|
|
|
self.DiagnosticInfos = array |
9298
|
1 |
|
|
9299
|
|
|
def __str__(self): |
9300
|
|
|
return 'HistoryUpdateResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
9301
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
9302
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
9303
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
9304
|
|
|
|
9305
|
|
|
__repr__ = __str__ |
9306
|
|
|
|
9307
|
|
|
|
9308
|
|
|
class CallMethodRequest(FrozenClass): |
9309
|
|
|
''' |
9310
|
1 |
|
:ivar ObjectId: |
9311
|
|
|
:vartype ObjectId: NodeId |
9312
|
|
|
:ivar MethodId: |
9313
|
|
|
:vartype MethodId: NodeId |
9314
|
1 |
|
:ivar InputArguments: |
9315
|
|
|
:vartype InputArguments: Variant |
9316
|
|
|
''' |
9317
|
|
|
def __init__(self, binary=None): |
9318
|
|
|
if binary is not None: |
9319
|
|
|
self._binary_init(binary) |
9320
|
|
|
self._freeze = True |
9321
|
|
|
return |
9322
|
|
|
self.ObjectId = NodeId() |
9323
|
|
|
self.MethodId = NodeId() |
9324
|
|
|
self.InputArguments = [] |
9325
|
|
|
self._freeze = True |
9326
|
|
|
|
9327
|
|
|
def to_binary(self): |
9328
|
|
|
packet = [] |
9329
|
|
|
packet.append(self.ObjectId.to_binary()) |
9330
|
1 |
|
packet.append(self.MethodId.to_binary()) |
9331
|
|
|
packet.append(uatype_Int32.pack(len(self.InputArguments))) |
9332
|
|
|
for fieldname in self.InputArguments: |
9333
|
|
|
packet.append(fieldname.to_binary()) |
9334
|
|
|
return b''.join(packet) |
9335
|
|
|
|
9336
|
1 |
|
@staticmethod |
9337
|
|
|
def from_binary(data): |
9338
|
|
|
return CallMethodRequest(data) |
9339
|
1 |
|
|
9340
|
|
|
def _binary_init(self, data): |
9341
|
|
|
self.ObjectId = NodeId.from_binary(data) |
9342
|
|
|
self.MethodId = NodeId.from_binary(data) |
9343
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9344
|
|
|
array = [] |
9345
|
|
|
if length != -1: |
9346
|
|
|
for _ in range(0, length): |
9347
|
|
|
array.append(Variant.from_binary(data)) |
9348
|
1 |
|
self.InputArguments = array |
9349
|
1 |
|
|
9350
|
1 |
|
def __str__(self): |
9351
|
1 |
|
return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \ |
9352
|
1 |
|
'MethodId:' + str(self.MethodId) + ', ' + \ |
9353
|
1 |
|
'InputArguments:' + str(self.InputArguments) + ')' |
9354
|
1 |
|
|
9355
|
1 |
|
__repr__ = __str__ |
9356
|
1 |
|
|
9357
|
|
|
|
9358
|
1 |
|
class CallMethodResult(FrozenClass): |
9359
|
1 |
|
''' |
9360
|
1 |
|
:ivar StatusCode: |
9361
|
1 |
|
:vartype StatusCode: StatusCode |
9362
|
1 |
|
:ivar InputArgumentResults: |
9363
|
1 |
|
:vartype InputArgumentResults: StatusCode |
9364
|
1 |
|
:ivar InputArgumentDiagnosticInfos: |
9365
|
1 |
|
:vartype InputArgumentDiagnosticInfos: DiagnosticInfo |
9366
|
|
|
:ivar OutputArguments: |
9367
|
1 |
|
:vartype OutputArguments: Variant |
9368
|
|
|
''' |
9369
|
1 |
|
def __init__(self, binary=None): |
9370
|
|
|
if binary is not None: |
9371
|
1 |
|
self._binary_init(binary) |
9372
|
1 |
|
self._freeze = True |
9373
|
1 |
|
return |
9374
|
1 |
|
self.StatusCode = StatusCode() |
9375
|
1 |
|
self.InputArgumentResults = [] |
9376
|
1 |
|
self.InputArgumentDiagnosticInfos = [] |
9377
|
1 |
|
self.OutputArguments = [] |
9378
|
1 |
|
self._freeze = True |
9379
|
1 |
|
|
9380
|
|
|
def to_binary(self): |
9381
|
1 |
|
packet = [] |
9382
|
1 |
|
packet.append(self.StatusCode.to_binary()) |
9383
|
|
|
packet.append(uatype_Int32.pack(len(self.InputArgumentResults))) |
9384
|
|
|
for fieldname in self.InputArgumentResults: |
9385
|
|
|
packet.append(fieldname.to_binary()) |
9386
|
1 |
|
packet.append(uatype_Int32.pack(len(self.InputArgumentDiagnosticInfos))) |
9387
|
|
|
for fieldname in self.InputArgumentDiagnosticInfos: |
9388
|
|
|
packet.append(fieldname.to_binary()) |
9389
|
1 |
|
packet.append(uatype_Int32.pack(len(self.OutputArguments))) |
9390
|
|
|
for fieldname in self.OutputArguments: |
9391
|
|
|
packet.append(fieldname.to_binary()) |
9392
|
|
|
return b''.join(packet) |
9393
|
|
|
|
9394
|
|
|
@staticmethod |
9395
|
|
|
def from_binary(data): |
9396
|
|
|
return CallMethodResult(data) |
9397
|
|
|
|
9398
|
|
|
def _binary_init(self, data): |
9399
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
9400
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
9401
|
1 |
|
array = [] |
9402
|
1 |
|
if length != -1: |
9403
|
1 |
|
for _ in range(0, length): |
9404
|
1 |
|
array.append(StatusCode.from_binary(data)) |
9405
|
1 |
|
self.InputArgumentResults = array |
9406
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
9407
|
1 |
|
array = [] |
9408
|
1 |
|
if length != -1: |
9409
|
1 |
|
for _ in range(0, length): |
9410
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
9411
|
1 |
|
self.InputArgumentDiagnosticInfos = array |
9412
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
9413
|
1 |
|
array = [] |
9414
|
1 |
|
if length != -1: |
9415
|
1 |
|
for _ in range(0, length): |
9416
|
1 |
|
array.append(Variant.from_binary(data)) |
9417
|
1 |
|
self.OutputArguments = array |
9418
|
1 |
|
|
9419
|
|
|
def __str__(self): |
9420
|
1 |
|
return 'CallMethodResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
9421
|
1 |
|
'InputArgumentResults:' + str(self.InputArgumentResults) + ', ' + \ |
9422
|
1 |
|
'InputArgumentDiagnosticInfos:' + str(self.InputArgumentDiagnosticInfos) + ', ' + \ |
9423
|
1 |
|
'OutputArguments:' + str(self.OutputArguments) + ')' |
9424
|
|
|
|
9425
|
1 |
|
__repr__ = __str__ |
9426
|
|
|
|
9427
|
1 |
|
|
9428
|
|
|
class CallParameters(FrozenClass): |
9429
|
1 |
|
''' |
9430
|
1 |
|
:ivar MethodsToCall: |
9431
|
1 |
|
:vartype MethodsToCall: CallMethodRequest |
9432
|
1 |
|
''' |
9433
|
1 |
|
def __init__(self, binary=None): |
9434
|
1 |
|
if binary is not None: |
9435
|
1 |
|
self._binary_init(binary) |
9436
|
1 |
|
self._freeze = True |
9437
|
1 |
|
return |
9438
|
1 |
|
self.MethodsToCall = [] |
9439
|
1 |
|
self._freeze = True |
9440
|
1 |
|
|
9441
|
|
|
def to_binary(self): |
9442
|
1 |
|
packet = [] |
9443
|
1 |
|
packet.append(uatype_Int32.pack(len(self.MethodsToCall))) |
9444
|
1 |
|
for fieldname in self.MethodsToCall: |
9445
|
1 |
|
packet.append(fieldname.to_binary()) |
9446
|
1 |
|
return b''.join(packet) |
9447
|
1 |
|
|
9448
|
1 |
|
@staticmethod |
9449
|
|
|
def from_binary(data): |
9450
|
1 |
|
return CallParameters(data) |
9451
|
|
|
|
9452
|
|
|
def _binary_init(self, data): |
9453
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9454
|
|
|
array = [] |
9455
|
|
|
if length != -1: |
9456
|
1 |
|
for _ in range(0, length): |
9457
|
|
|
array.append(CallMethodRequest.from_binary(data)) |
9458
|
|
|
self.MethodsToCall = array |
9459
|
1 |
|
|
9460
|
|
|
def __str__(self): |
9461
|
|
|
return 'CallParameters(' + 'MethodsToCall:' + str(self.MethodsToCall) + ')' |
9462
|
|
|
|
9463
|
|
|
__repr__ = __str__ |
9464
|
1 |
|
|
9465
|
1 |
|
|
9466
|
1 |
|
class CallRequest(FrozenClass): |
9467
|
1 |
|
''' |
9468
|
1 |
|
:ivar TypeId: |
9469
|
1 |
|
:vartype TypeId: NodeId |
9470
|
1 |
|
:ivar RequestHeader: |
9471
|
|
|
:vartype RequestHeader: RequestHeader |
9472
|
1 |
|
:ivar Parameters: |
9473
|
1 |
|
:vartype Parameters: CallParameters |
9474
|
1 |
|
''' |
9475
|
1 |
|
def __init__(self, binary=None): |
9476
|
1 |
|
if binary is not None: |
9477
|
1 |
|
self._binary_init(binary) |
9478
|
|
|
self._freeze = True |
9479
|
1 |
|
return |
9480
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary) |
9481
|
1 |
|
self.RequestHeader = RequestHeader() |
9482
|
|
|
self.Parameters = CallParameters() |
9483
|
1 |
|
self._freeze = True |
9484
|
1 |
|
|
9485
|
1 |
|
def to_binary(self): |
9486
|
1 |
|
packet = [] |
9487
|
1 |
|
packet.append(self.TypeId.to_binary()) |
9488
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
9489
|
1 |
|
packet.append(self.Parameters.to_binary()) |
9490
|
|
|
return b''.join(packet) |
9491
|
1 |
|
|
9492
|
|
|
@staticmethod |
9493
|
|
|
def from_binary(data): |
9494
|
1 |
|
return CallRequest(data) |
9495
|
|
|
|
9496
|
|
|
def _binary_init(self, data): |
9497
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
9498
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
9499
|
|
|
self.Parameters = CallParameters.from_binary(data) |
9500
|
|
|
|
9501
|
|
|
def __str__(self): |
9502
|
|
|
return 'CallRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
9503
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
9504
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
9505
|
|
|
|
9506
|
1 |
|
__repr__ = __str__ |
9507
|
1 |
|
|
9508
|
|
|
|
9509
|
|
|
class CallResponse(FrozenClass): |
9510
|
|
|
''' |
9511
|
1 |
|
:ivar TypeId: |
9512
|
1 |
|
:vartype TypeId: NodeId |
9513
|
1 |
|
:ivar ResponseHeader: |
9514
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
9515
|
|
|
:ivar Results: |
9516
|
1 |
|
:vartype Results: CallMethodResult |
9517
|
1 |
|
:ivar DiagnosticInfos: |
9518
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
9519
|
1 |
|
''' |
9520
|
1 |
|
def __init__(self, binary=None): |
9521
|
1 |
|
if binary is not None: |
9522
|
|
|
self._binary_init(binary) |
9523
|
1 |
|
self._freeze = True |
9524
|
|
|
return |
9525
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary) |
9526
|
|
|
self.ResponseHeader = ResponseHeader() |
9527
|
1 |
|
self.Results = [] |
9528
|
|
|
self.DiagnosticInfos = [] |
9529
|
|
|
self._freeze = True |
9530
|
|
|
|
9531
|
|
|
def to_binary(self): |
9532
|
1 |
|
packet = [] |
9533
|
|
|
packet.append(self.TypeId.to_binary()) |
9534
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
9535
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
9536
|
|
|
for fieldname in self.Results: |
9537
|
1 |
|
packet.append(fieldname.to_binary()) |
9538
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
9539
|
|
|
for fieldname in self.DiagnosticInfos: |
9540
|
1 |
|
packet.append(fieldname.to_binary()) |
9541
|
|
|
return b''.join(packet) |
9542
|
|
|
|
9543
|
|
|
@staticmethod |
9544
|
|
|
def from_binary(data): |
9545
|
|
|
return CallResponse(data) |
9546
|
|
|
|
9547
|
|
|
def _binary_init(self, data): |
9548
|
|
|
self.TypeId = NodeId.from_binary(data) |
9549
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
9550
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9551
|
1 |
|
array = [] |
9552
|
1 |
|
if length != -1: |
9553
|
1 |
|
for _ in range(0, length): |
9554
|
1 |
|
array.append(CallMethodResult.from_binary(data)) |
9555
|
1 |
|
self.Results = array |
9556
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
9557
|
1 |
|
array = [] |
9558
|
1 |
|
if length != -1: |
9559
|
1 |
|
for _ in range(0, length): |
9560
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
9561
|
|
|
self.DiagnosticInfos = array |
9562
|
1 |
|
|
9563
|
1 |
|
def __str__(self): |
9564
|
1 |
|
return 'CallResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
9565
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
9566
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
9567
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
9568
|
1 |
|
|
9569
|
1 |
|
__repr__ = __str__ |
9570
|
1 |
|
|
9571
|
|
|
|
9572
|
1 |
|
class MonitoringFilter(FrozenClass): |
9573
|
|
|
''' |
9574
|
1 |
|
''' |
9575
|
|
|
def __init__(self, binary=None): |
9576
|
1 |
|
if binary is not None: |
9577
|
|
|
self._binary_init(binary) |
9578
|
1 |
|
self._freeze = True |
9579
|
1 |
|
return |
9580
|
1 |
|
self._freeze = True |
9581
|
1 |
|
|
9582
|
1 |
|
def to_binary(self): |
9583
|
1 |
|
packet = [] |
9584
|
1 |
|
return b''.join(packet) |
9585
|
1 |
|
|
9586
|
1 |
|
@staticmethod |
9587
|
1 |
|
def from_binary(data): |
9588
|
1 |
|
return MonitoringFilter(data) |
9589
|
1 |
|
|
9590
|
1 |
|
def _binary_init(self, data): |
9591
|
|
|
pass |
9592
|
1 |
|
|
9593
|
|
|
def __str__(self): |
9594
|
1 |
|
return 'MonitoringFilter(' + + ')' |
9595
|
|
|
|
9596
|
|
|
__repr__ = __str__ |
9597
|
|
|
|
9598
|
|
|
|
9599
|
|
|
class DataChangeFilter(FrozenClass): |
9600
|
1 |
|
''' |
9601
|
|
|
:ivar Trigger: |
9602
|
|
|
:vartype Trigger: DataChangeTrigger |
9603
|
1 |
|
:ivar DeadbandType: |
9604
|
|
|
:vartype DeadbandType: UInt32 |
9605
|
|
|
:ivar DeadbandValue: |
9606
|
1 |
|
:vartype DeadbandValue: Double |
9607
|
|
|
''' |
9608
|
|
|
def __init__(self, binary=None): |
9609
|
|
|
if binary is not None: |
9610
|
|
|
self._binary_init(binary) |
9611
|
|
|
self._freeze = True |
9612
|
|
|
return |
9613
|
1 |
|
self.Trigger = DataChangeTrigger(0) |
9614
|
|
|
self.DeadbandType = 0 |
9615
|
|
|
self.DeadbandValue = 0 |
9616
|
|
|
self._freeze = True |
9617
|
1 |
|
|
9618
|
|
|
def to_binary(self): |
9619
|
|
|
packet = [] |
9620
|
|
|
packet.append(uatype_UInt32.pack(self.Trigger.value)) |
9621
|
1 |
|
packet.append(uatype_UInt32.pack(self.DeadbandType)) |
9622
|
|
|
packet.append(uatype_Double.pack(self.DeadbandValue)) |
9623
|
|
|
return b''.join(packet) |
9624
|
1 |
|
|
9625
|
|
|
@staticmethod |
9626
|
|
|
def from_binary(data): |
9627
|
1 |
|
return DataChangeFilter(data) |
9628
|
|
|
|
9629
|
|
|
def _binary_init(self, data): |
9630
|
1 |
|
self.Trigger = DataChangeTrigger(uatype_UInt32.unpack(data.read(4))[0]) |
9631
|
|
|
self.DeadbandType = uatype_UInt32.unpack(data.read(4))[0] |
9632
|
|
|
self.DeadbandValue = uatype_Double.unpack(data.read(8))[0] |
9633
|
|
|
|
9634
|
|
|
def __str__(self): |
9635
|
|
|
return 'DataChangeFilter(' + 'Trigger:' + str(self.Trigger) + ', ' + \ |
9636
|
|
|
'DeadbandType:' + str(self.DeadbandType) + ', ' + \ |
9637
|
|
|
'DeadbandValue:' + str(self.DeadbandValue) + ')' |
9638
|
|
|
|
9639
|
1 |
|
__repr__ = __str__ |
9640
|
|
|
|
9641
|
|
|
|
9642
|
|
|
class EventFilter(FrozenClass): |
9643
|
|
|
''' |
9644
|
|
|
:ivar SelectClauses: |
9645
|
|
|
:vartype SelectClauses: SimpleAttributeOperand |
9646
|
|
|
:ivar WhereClause: |
9647
|
|
|
:vartype WhereClause: ContentFilter |
9648
|
|
|
''' |
9649
|
1 |
|
def __init__(self, binary=None): |
9650
|
|
|
if binary is not None: |
9651
|
|
|
self._binary_init(binary) |
9652
|
|
|
self._freeze = True |
9653
|
|
|
return |
9654
|
|
|
self.SelectClauses = [] |
9655
|
|
|
self.WhereClause = ContentFilter() |
9656
|
1 |
|
self._freeze = True |
9657
|
|
|
|
9658
|
|
|
def to_binary(self): |
9659
|
|
|
packet = [] |
9660
|
1 |
|
packet.append(uatype_Int32.pack(len(self.SelectClauses))) |
9661
|
|
|
for fieldname in self.SelectClauses: |
9662
|
|
|
packet.append(fieldname.to_binary()) |
9663
|
|
|
packet.append(self.WhereClause.to_binary()) |
9664
|
|
|
return b''.join(packet) |
9665
|
1 |
|
|
9666
|
|
|
@staticmethod |
9667
|
|
|
def from_binary(data): |
9668
|
|
|
return EventFilter(data) |
9669
|
|
|
|
9670
|
1 |
|
def _binary_init(self, data): |
9671
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9672
|
|
|
array = [] |
9673
|
1 |
|
if length != -1: |
9674
|
|
|
for _ in range(0, length): |
9675
|
|
|
array.append(SimpleAttributeOperand.from_binary(data)) |
9676
|
|
|
self.SelectClauses = array |
9677
|
|
|
self.WhereClause = ContentFilter.from_binary(data) |
9678
|
|
|
|
9679
|
|
|
def __str__(self): |
9680
|
1 |
|
return 'EventFilter(' + 'SelectClauses:' + str(self.SelectClauses) + ', ' + \ |
9681
|
1 |
|
'WhereClause:' + str(self.WhereClause) + ')' |
9682
|
1 |
|
|
9683
|
1 |
|
__repr__ = __str__ |
9684
|
1 |
|
|
9685
|
1 |
|
|
9686
|
1 |
|
class AggregateConfiguration(FrozenClass): |
9687
|
1 |
|
''' |
9688
|
|
|
:ivar UseServerCapabilitiesDefaults: |
9689
|
1 |
|
:vartype UseServerCapabilitiesDefaults: Boolean |
9690
|
1 |
|
:ivar TreatUncertainAsBad: |
9691
|
1 |
|
:vartype TreatUncertainAsBad: Boolean |
9692
|
1 |
|
:ivar PercentDataBad: |
9693
|
1 |
|
:vartype PercentDataBad: Byte |
9694
|
1 |
|
:ivar PercentDataGood: |
9695
|
1 |
|
:vartype PercentDataGood: Byte |
9696
|
|
|
:ivar UseSlopedExtrapolation: |
9697
|
1 |
|
:vartype UseSlopedExtrapolation: Boolean |
9698
|
|
|
''' |
9699
|
1 |
|
def __init__(self, binary=None): |
9700
|
|
|
if binary is not None: |
9701
|
1 |
|
self._binary_init(binary) |
9702
|
1 |
|
self._freeze = True |
9703
|
1 |
|
return |
9704
|
1 |
|
self.UseServerCapabilitiesDefaults = True |
9705
|
1 |
|
self.TreatUncertainAsBad = True |
9706
|
1 |
|
self.PercentDataBad = 0 |
9707
|
1 |
|
self.PercentDataGood = 0 |
9708
|
1 |
|
self.UseSlopedExtrapolation = True |
9709
|
|
|
self._freeze = True |
9710
|
1 |
|
|
9711
|
|
|
def to_binary(self): |
9712
|
|
|
packet = [] |
9713
|
|
|
packet.append(uatype_Boolean.pack(self.UseServerCapabilitiesDefaults)) |
9714
|
1 |
|
packet.append(uatype_Boolean.pack(self.TreatUncertainAsBad)) |
9715
|
|
|
packet.append(uatype_Byte.pack(self.PercentDataBad)) |
9716
|
|
|
packet.append(uatype_Byte.pack(self.PercentDataGood)) |
9717
|
1 |
|
packet.append(uatype_Boolean.pack(self.UseSlopedExtrapolation)) |
9718
|
|
|
return b''.join(packet) |
9719
|
|
|
|
9720
|
|
|
@staticmethod |
9721
|
|
|
def from_binary(data): |
9722
|
|
|
return AggregateConfiguration(data) |
9723
|
|
|
|
9724
|
|
|
def _binary_init(self, data): |
9725
|
|
|
self.UseServerCapabilitiesDefaults = uatype_Boolean.unpack(data.read(1))[0] |
9726
|
|
|
self.TreatUncertainAsBad = uatype_Boolean.unpack(data.read(1))[0] |
9727
|
|
|
self.PercentDataBad = uatype_Byte.unpack(data.read(1))[0] |
9728
|
|
|
self.PercentDataGood = uatype_Byte.unpack(data.read(1))[0] |
9729
|
|
|
self.UseSlopedExtrapolation = uatype_Boolean.unpack(data.read(1))[0] |
9730
|
1 |
|
|
9731
|
|
|
def __str__(self): |
9732
|
|
|
return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \ |
9733
|
|
|
'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \ |
9734
|
|
|
'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \ |
9735
|
|
|
'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \ |
9736
|
|
|
'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')' |
9737
|
|
|
|
9738
|
|
|
__repr__ = __str__ |
9739
|
|
|
|
9740
|
|
|
|
9741
|
|
|
class AggregateFilter(FrozenClass): |
9742
|
1 |
|
''' |
9743
|
|
|
:ivar StartTime: |
9744
|
|
|
:vartype StartTime: DateTime |
9745
|
|
|
:ivar AggregateType: |
9746
|
|
|
:vartype AggregateType: NodeId |
9747
|
|
|
:ivar ProcessingInterval: |
9748
|
|
|
:vartype ProcessingInterval: Double |
9749
|
|
|
:ivar AggregateConfiguration: |
9750
|
|
|
:vartype AggregateConfiguration: AggregateConfiguration |
9751
|
1 |
|
''' |
9752
|
|
|
def __init__(self, binary=None): |
9753
|
|
|
if binary is not None: |
9754
|
|
|
self._binary_init(binary) |
9755
|
1 |
|
self._freeze = True |
9756
|
|
|
return |
9757
|
|
|
self.StartTime = datetime.now() |
9758
|
|
|
self.AggregateType = NodeId() |
9759
|
|
|
self.ProcessingInterval = 0 |
9760
|
|
|
self.AggregateConfiguration = AggregateConfiguration() |
9761
|
|
|
self._freeze = True |
9762
|
1 |
|
|
9763
|
|
|
def to_binary(self): |
9764
|
|
|
packet = [] |
9765
|
|
|
packet.append(pack_datetime(self.StartTime)) |
9766
|
|
|
packet.append(self.AggregateType.to_binary()) |
9767
|
|
|
packet.append(uatype_Double.pack(self.ProcessingInterval)) |
9768
|
|
|
packet.append(self.AggregateConfiguration.to_binary()) |
9769
|
1 |
|
return b''.join(packet) |
9770
|
|
|
|
9771
|
|
|
@staticmethod |
9772
|
1 |
|
def from_binary(data): |
9773
|
|
|
return AggregateFilter(data) |
9774
|
|
|
|
9775
|
|
|
def _binary_init(self, data): |
9776
|
|
|
self.StartTime = unpack_datetime(data) |
9777
|
|
|
self.AggregateType = NodeId.from_binary(data) |
9778
|
|
|
self.ProcessingInterval = uatype_Double.unpack(data.read(8))[0] |
9779
|
|
|
self.AggregateConfiguration = AggregateConfiguration.from_binary(data) |
9780
|
|
|
|
9781
|
|
|
def __str__(self): |
9782
|
|
|
return 'AggregateFilter(' + 'StartTime:' + str(self.StartTime) + ', ' + \ |
9783
|
1 |
|
'AggregateType:' + str(self.AggregateType) + ', ' + \ |
9784
|
|
|
'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \ |
9785
|
|
|
'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')' |
9786
|
|
|
|
9787
|
|
|
__repr__ = __str__ |
9788
|
|
|
|
9789
|
|
|
|
9790
|
|
|
class MonitoringFilterResult(FrozenClass): |
9791
|
|
|
''' |
9792
|
|
|
''' |
9793
|
|
|
def __init__(self, binary=None): |
9794
|
1 |
|
if binary is not None: |
9795
|
|
|
self._binary_init(binary) |
9796
|
|
|
self._freeze = True |
9797
|
|
|
return |
9798
|
|
|
self._freeze = True |
9799
|
|
|
|
9800
|
|
|
def to_binary(self): |
9801
|
|
|
packet = [] |
9802
|
1 |
|
return b''.join(packet) |
9803
|
|
|
|
9804
|
|
|
@staticmethod |
9805
|
|
|
def from_binary(data): |
9806
|
1 |
|
return MonitoringFilterResult(data) |
9807
|
|
|
|
9808
|
|
|
def _binary_init(self, data): |
9809
|
|
|
pass |
9810
|
|
|
|
9811
|
|
|
def __str__(self): |
9812
|
1 |
|
return 'MonitoringFilterResult(' + + ')' |
9813
|
|
|
|
9814
|
|
|
__repr__ = __str__ |
9815
|
|
|
|
9816
|
|
|
|
9817
|
|
|
class EventFilterResult(FrozenClass): |
9818
|
1 |
|
''' |
9819
|
|
|
:ivar SelectClauseResults: |
9820
|
|
|
:vartype SelectClauseResults: StatusCode |
9821
|
1 |
|
:ivar SelectClauseDiagnosticInfos: |
9822
|
|
|
:vartype SelectClauseDiagnosticInfos: DiagnosticInfo |
9823
|
|
|
:ivar WhereClauseResult: |
9824
|
1 |
|
:vartype WhereClauseResult: ContentFilterResult |
9825
|
|
|
''' |
9826
|
|
|
def __init__(self, binary=None): |
9827
|
|
|
if binary is not None: |
9828
|
|
|
self._binary_init(binary) |
9829
|
|
|
self._freeze = True |
9830
|
|
|
return |
9831
|
1 |
|
self.SelectClauseResults = [] |
9832
|
|
|
self.SelectClauseDiagnosticInfos = [] |
9833
|
|
|
self.WhereClauseResult = ContentFilterResult() |
9834
|
|
|
self._freeze = True |
9835
|
1 |
|
|
9836
|
|
|
def to_binary(self): |
9837
|
|
|
packet = [] |
9838
|
|
|
packet.append(uatype_Int32.pack(len(self.SelectClauseResults))) |
9839
|
1 |
|
for fieldname in self.SelectClauseResults: |
9840
|
|
|
packet.append(fieldname.to_binary()) |
9841
|
|
|
packet.append(uatype_Int32.pack(len(self.SelectClauseDiagnosticInfos))) |
9842
|
1 |
|
for fieldname in self.SelectClauseDiagnosticInfos: |
9843
|
|
|
packet.append(fieldname.to_binary()) |
9844
|
|
|
packet.append(self.WhereClauseResult.to_binary()) |
9845
|
1 |
|
return b''.join(packet) |
9846
|
|
|
|
9847
|
|
|
@staticmethod |
9848
|
1 |
|
def from_binary(data): |
9849
|
|
|
return EventFilterResult(data) |
9850
|
|
|
|
9851
|
|
|
def _binary_init(self, data): |
9852
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
9853
|
|
|
array = [] |
9854
|
|
|
if length != -1: |
9855
|
|
|
for _ in range(0, length): |
9856
|
|
|
array.append(StatusCode.from_binary(data)) |
9857
|
1 |
|
self.SelectClauseResults = array |
9858
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
9859
|
1 |
|
array = [] |
9860
|
1 |
|
if length != -1: |
9861
|
1 |
|
for _ in range(0, length): |
9862
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
9863
|
1 |
|
self.SelectClauseDiagnosticInfos = array |
9864
|
1 |
|
self.WhereClauseResult = ContentFilterResult.from_binary(data) |
9865
|
1 |
|
|
9866
|
|
|
def __str__(self): |
9867
|
1 |
|
return 'EventFilterResult(' + 'SelectClauseResults:' + str(self.SelectClauseResults) + ', ' + \ |
9868
|
1 |
|
'SelectClauseDiagnosticInfos:' + str(self.SelectClauseDiagnosticInfos) + ', ' + \ |
9869
|
1 |
|
'WhereClauseResult:' + str(self.WhereClauseResult) + ')' |
9870
|
1 |
|
|
9871
|
1 |
|
__repr__ = __str__ |
9872
|
1 |
|
|
9873
|
1 |
|
|
9874
|
|
|
class AggregateFilterResult(FrozenClass): |
9875
|
1 |
|
''' |
9876
|
1 |
|
:ivar RevisedStartTime: |
9877
|
|
|
:vartype RevisedStartTime: DateTime |
9878
|
1 |
|
:ivar RevisedProcessingInterval: |
9879
|
|
|
:vartype RevisedProcessingInterval: Double |
9880
|
1 |
|
:ivar RevisedAggregateConfiguration: |
9881
|
|
|
:vartype RevisedAggregateConfiguration: AggregateConfiguration |
9882
|
1 |
|
''' |
9883
|
1 |
|
def __init__(self, binary=None): |
9884
|
1 |
|
if binary is not None: |
9885
|
1 |
|
self._binary_init(binary) |
9886
|
1 |
|
self._freeze = True |
9887
|
1 |
|
return |
9888
|
1 |
|
self.RevisedStartTime = datetime.now() |
9889
|
1 |
|
self.RevisedProcessingInterval = 0 |
9890
|
1 |
|
self.RevisedAggregateConfiguration = AggregateConfiguration() |
9891
|
1 |
|
self._freeze = True |
9892
|
1 |
|
|
9893
|
|
|
def to_binary(self): |
9894
|
1 |
|
packet = [] |
9895
|
1 |
|
packet.append(pack_datetime(self.RevisedStartTime)) |
9896
|
|
|
packet.append(uatype_Double.pack(self.RevisedProcessingInterval)) |
9897
|
1 |
|
packet.append(self.RevisedAggregateConfiguration.to_binary()) |
9898
|
|
|
return b''.join(packet) |
9899
|
|
|
|
9900
|
|
|
@staticmethod |
9901
|
|
|
def from_binary(data): |
9902
|
1 |
|
return AggregateFilterResult(data) |
9903
|
|
|
|
9904
|
|
|
def _binary_init(self, data): |
9905
|
1 |
|
self.RevisedStartTime = unpack_datetime(data) |
9906
|
|
|
self.RevisedProcessingInterval = uatype_Double.unpack(data.read(8))[0] |
9907
|
|
|
self.RevisedAggregateConfiguration = AggregateConfiguration.from_binary(data) |
9908
|
|
|
|
9909
|
|
|
def __str__(self): |
9910
|
|
|
return 'AggregateFilterResult(' + 'RevisedStartTime:' + str(self.RevisedStartTime) + ', ' + \ |
9911
|
|
|
'RevisedProcessingInterval:' + str(self.RevisedProcessingInterval) + ', ' + \ |
9912
|
|
|
'RevisedAggregateConfiguration:' + str(self.RevisedAggregateConfiguration) + ')' |
9913
|
|
|
|
9914
|
1 |
|
__repr__ = __str__ |
9915
|
|
|
|
9916
|
|
|
|
9917
|
|
|
class MonitoringParameters(FrozenClass): |
9918
|
|
|
''' |
9919
|
|
|
:ivar ClientHandle: |
9920
|
|
|
:vartype ClientHandle: UInt32 |
9921
|
|
|
:ivar SamplingInterval: |
9922
|
|
|
:vartype SamplingInterval: Double |
9923
|
|
|
:ivar Filter: |
9924
|
1 |
|
:vartype Filter: ExtensionObject |
9925
|
|
|
:ivar QueueSize: |
9926
|
|
|
:vartype QueueSize: UInt32 |
9927
|
|
|
:ivar DiscardOldest: |
9928
|
|
|
:vartype DiscardOldest: Boolean |
9929
|
|
|
''' |
9930
|
|
|
def __init__(self, binary=None): |
9931
|
1 |
|
if binary is not None: |
9932
|
|
|
self._binary_init(binary) |
9933
|
|
|
self._freeze = True |
9934
|
|
|
return |
9935
|
1 |
|
self.ClientHandle = 0 |
9936
|
|
|
self.SamplingInterval = 0 |
9937
|
|
|
self.Filter = None |
9938
|
|
|
self.QueueSize = 0 |
9939
|
|
|
self.DiscardOldest = True |
9940
|
1 |
|
self._freeze = True |
9941
|
|
|
|
9942
|
|
|
def to_binary(self): |
9943
|
|
|
packet = [] |
9944
|
|
|
packet.append(uatype_UInt32.pack(self.ClientHandle)) |
9945
|
1 |
|
packet.append(uatype_Double.pack(self.SamplingInterval)) |
9946
|
|
|
packet.append(extensionobject_to_binary(self.Filter)) |
9947
|
|
|
packet.append(uatype_UInt32.pack(self.QueueSize)) |
9948
|
1 |
|
packet.append(uatype_Boolean.pack(self.DiscardOldest)) |
9949
|
|
|
return b''.join(packet) |
9950
|
|
|
|
9951
|
|
|
@staticmethod |
9952
|
|
|
def from_binary(data): |
9953
|
|
|
return MonitoringParameters(data) |
9954
|
|
|
|
9955
|
|
|
def _binary_init(self, data): |
9956
|
|
|
self.ClientHandle = uatype_UInt32.unpack(data.read(4))[0] |
9957
|
|
|
self.SamplingInterval = uatype_Double.unpack(data.read(8))[0] |
9958
|
|
|
self.Filter = extensionobject_from_binary(data) |
9959
|
|
|
self.QueueSize = uatype_UInt32.unpack(data.read(4))[0] |
9960
|
|
|
self.DiscardOldest = uatype_Boolean.unpack(data.read(1))[0] |
9961
|
1 |
|
|
9962
|
1 |
|
def __str__(self): |
9963
|
1 |
|
return 'MonitoringParameters(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ |
9964
|
1 |
|
'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \ |
9965
|
1 |
|
'Filter:' + str(self.Filter) + ', ' + \ |
9966
|
1 |
|
'QueueSize:' + str(self.QueueSize) + ', ' + \ |
9967
|
1 |
|
'DiscardOldest:' + str(self.DiscardOldest) + ')' |
9968
|
1 |
|
|
9969
|
1 |
|
__repr__ = __str__ |
9970
|
1 |
|
|
9971
|
1 |
|
|
9972
|
|
|
class MonitoredItemCreateRequest(FrozenClass): |
9973
|
1 |
|
''' |
9974
|
1 |
|
:ivar ItemToMonitor: |
9975
|
1 |
|
:vartype ItemToMonitor: ReadValueId |
9976
|
1 |
|
:ivar MonitoringMode: |
9977
|
1 |
|
:vartype MonitoringMode: MonitoringMode |
9978
|
1 |
|
:ivar RequestedParameters: |
9979
|
1 |
|
:vartype RequestedParameters: MonitoringParameters |
9980
|
1 |
|
''' |
9981
|
|
|
def __init__(self, binary=None): |
9982
|
1 |
|
if binary is not None: |
9983
|
|
|
self._binary_init(binary) |
9984
|
1 |
|
self._freeze = True |
9985
|
|
|
return |
9986
|
1 |
|
self.ItemToMonitor = ReadValueId() |
9987
|
1 |
|
self.MonitoringMode = MonitoringMode(0) |
9988
|
1 |
|
self.RequestedParameters = MonitoringParameters() |
9989
|
1 |
|
self._freeze = True |
9990
|
1 |
|
|
9991
|
1 |
|
def to_binary(self): |
9992
|
|
|
packet = [] |
9993
|
1 |
|
packet.append(self.ItemToMonitor.to_binary()) |
9994
|
|
|
packet.append(uatype_UInt32.pack(self.MonitoringMode.value)) |
9995
|
|
|
packet.append(self.RequestedParameters.to_binary()) |
9996
|
|
|
return b''.join(packet) |
9997
|
|
|
|
9998
|
|
|
@staticmethod |
9999
|
|
|
def from_binary(data): |
10000
|
1 |
|
return MonitoredItemCreateRequest(data) |
10001
|
|
|
|
10002
|
|
|
def _binary_init(self, data): |
10003
|
1 |
|
self.ItemToMonitor = ReadValueId.from_binary(data) |
10004
|
|
|
self.MonitoringMode = MonitoringMode(uatype_UInt32.unpack(data.read(4))[0]) |
10005
|
|
|
self.RequestedParameters = MonitoringParameters.from_binary(data) |
10006
|
|
|
|
10007
|
|
|
def __str__(self): |
10008
|
|
|
return 'MonitoredItemCreateRequest(' + 'ItemToMonitor:' + str(self.ItemToMonitor) + ', ' + \ |
10009
|
|
|
'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \ |
10010
|
|
|
'RequestedParameters:' + str(self.RequestedParameters) + ')' |
10011
|
|
|
|
10012
|
1 |
|
__repr__ = __str__ |
10013
|
1 |
|
|
10014
|
1 |
|
|
10015
|
1 |
|
class MonitoredItemCreateResult(FrozenClass): |
10016
|
1 |
|
''' |
10017
|
1 |
|
:ivar StatusCode: |
10018
|
1 |
|
:vartype StatusCode: StatusCode |
10019
|
1 |
|
:ivar MonitoredItemId: |
10020
|
1 |
|
:vartype MonitoredItemId: UInt32 |
10021
|
|
|
:ivar RevisedSamplingInterval: |
10022
|
1 |
|
:vartype RevisedSamplingInterval: Double |
10023
|
1 |
|
:ivar RevisedQueueSize: |
10024
|
1 |
|
:vartype RevisedQueueSize: UInt32 |
10025
|
1 |
|
:ivar FilterResult: |
10026
|
1 |
|
:vartype FilterResult: ExtensionObject |
10027
|
1 |
|
''' |
10028
|
|
|
def __init__(self, binary=None): |
10029
|
1 |
|
if binary is not None: |
10030
|
|
|
self._binary_init(binary) |
10031
|
1 |
|
self._freeze = True |
10032
|
|
|
return |
10033
|
1 |
|
self.StatusCode = StatusCode() |
10034
|
1 |
|
self.MonitoredItemId = 0 |
10035
|
1 |
|
self.RevisedSamplingInterval = 0 |
10036
|
1 |
|
self.RevisedQueueSize = 0 |
10037
|
|
|
self.FilterResult = None |
10038
|
1 |
|
self._freeze = True |
10039
|
|
|
|
10040
|
|
|
def to_binary(self): |
10041
|
|
|
packet = [] |
10042
|
|
|
packet.append(self.StatusCode.to_binary()) |
10043
|
1 |
|
packet.append(uatype_UInt32.pack(self.MonitoredItemId)) |
10044
|
|
|
packet.append(uatype_Double.pack(self.RevisedSamplingInterval)) |
10045
|
|
|
packet.append(uatype_UInt32.pack(self.RevisedQueueSize)) |
10046
|
1 |
|
packet.append(extensionobject_to_binary(self.FilterResult)) |
10047
|
|
|
return b''.join(packet) |
10048
|
|
|
|
10049
|
|
|
@staticmethod |
10050
|
|
|
def from_binary(data): |
10051
|
|
|
return MonitoredItemCreateResult(data) |
10052
|
|
|
|
10053
|
|
|
def _binary_init(self, data): |
10054
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
10055
|
|
|
self.MonitoredItemId = uatype_UInt32.unpack(data.read(4))[0] |
10056
|
|
|
self.RevisedSamplingInterval = uatype_Double.unpack(data.read(8))[0] |
10057
|
|
|
self.RevisedQueueSize = uatype_UInt32.unpack(data.read(4))[0] |
10058
|
|
|
self.FilterResult = extensionobject_from_binary(data) |
10059
|
1 |
|
|
10060
|
1 |
|
def __str__(self): |
10061
|
1 |
|
return 'MonitoredItemCreateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
10062
|
1 |
|
'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \ |
10063
|
1 |
|
'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \ |
10064
|
1 |
|
'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \ |
10065
|
1 |
|
'FilterResult:' + str(self.FilterResult) + ')' |
10066
|
1 |
|
|
10067
|
1 |
|
__repr__ = __str__ |
10068
|
1 |
|
|
10069
|
1 |
|
|
10070
|
|
|
class CreateMonitoredItemsParameters(FrozenClass): |
10071
|
1 |
|
''' |
10072
|
1 |
|
:ivar SubscriptionId: |
10073
|
1 |
|
:vartype SubscriptionId: UInt32 |
10074
|
1 |
|
:ivar TimestampsToReturn: |
10075
|
1 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
10076
|
1 |
|
:ivar ItemsToCreate: |
10077
|
1 |
|
:vartype ItemsToCreate: MonitoredItemCreateRequest |
10078
|
1 |
|
''' |
10079
|
|
|
def __init__(self, binary=None): |
10080
|
1 |
|
if binary is not None: |
10081
|
|
|
self._binary_init(binary) |
10082
|
1 |
|
self._freeze = True |
10083
|
|
|
return |
10084
|
1 |
|
self.SubscriptionId = 0 |
10085
|
1 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
10086
|
1 |
|
self.ItemsToCreate = [] |
10087
|
1 |
|
self._freeze = True |
10088
|
1 |
|
|
10089
|
1 |
|
def to_binary(self): |
10090
|
|
|
packet = [] |
10091
|
1 |
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
10092
|
|
|
packet.append(uatype_UInt32.pack(self.TimestampsToReturn.value)) |
10093
|
|
|
packet.append(uatype_Int32.pack(len(self.ItemsToCreate))) |
10094
|
|
|
for fieldname in self.ItemsToCreate: |
10095
|
|
|
packet.append(fieldname.to_binary()) |
10096
|
|
|
return b''.join(packet) |
10097
|
|
|
|
10098
|
1 |
|
@staticmethod |
10099
|
|
|
def from_binary(data): |
10100
|
|
|
return CreateMonitoredItemsParameters(data) |
10101
|
1 |
|
|
10102
|
|
|
def _binary_init(self, data): |
10103
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
10104
|
|
|
self.TimestampsToReturn = TimestampsToReturn(uatype_UInt32.unpack(data.read(4))[0]) |
10105
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10106
|
|
|
array = [] |
10107
|
|
|
if length != -1: |
10108
|
|
|
for _ in range(0, length): |
10109
|
|
|
array.append(MonitoredItemCreateRequest.from_binary(data)) |
10110
|
1 |
|
self.ItemsToCreate = array |
10111
|
1 |
|
|
10112
|
1 |
|
def __str__(self): |
10113
|
1 |
|
return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
10114
|
1 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
10115
|
1 |
|
'ItemsToCreate:' + str(self.ItemsToCreate) + ')' |
10116
|
1 |
|
|
10117
|
1 |
|
__repr__ = __str__ |
10118
|
1 |
|
|
10119
|
|
|
|
10120
|
1 |
|
class CreateMonitoredItemsRequest(FrozenClass): |
10121
|
1 |
|
''' |
10122
|
1 |
|
:ivar TypeId: |
10123
|
1 |
|
:vartype TypeId: NodeId |
10124
|
1 |
|
:ivar RequestHeader: |
10125
|
1 |
|
:vartype RequestHeader: RequestHeader |
10126
|
1 |
|
:ivar Parameters: |
10127
|
1 |
|
:vartype Parameters: CreateMonitoredItemsParameters |
10128
|
|
|
''' |
10129
|
1 |
|
def __init__(self, binary=None): |
10130
|
|
|
if binary is not None: |
10131
|
1 |
|
self._binary_init(binary) |
10132
|
|
|
self._freeze = True |
10133
|
1 |
|
return |
10134
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary) |
10135
|
1 |
|
self.RequestHeader = RequestHeader() |
10136
|
1 |
|
self.Parameters = CreateMonitoredItemsParameters() |
10137
|
1 |
|
self._freeze = True |
10138
|
1 |
|
|
10139
|
1 |
|
def to_binary(self): |
10140
|
1 |
|
packet = [] |
10141
|
1 |
|
packet.append(self.TypeId.to_binary()) |
10142
|
|
|
packet.append(self.RequestHeader.to_binary()) |
10143
|
1 |
|
packet.append(self.Parameters.to_binary()) |
10144
|
|
|
return b''.join(packet) |
10145
|
|
|
|
10146
|
|
|
@staticmethod |
10147
|
|
|
def from_binary(data): |
10148
|
1 |
|
return CreateMonitoredItemsRequest(data) |
10149
|
|
|
|
10150
|
|
|
def _binary_init(self, data): |
10151
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10152
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
10153
|
|
|
self.Parameters = CreateMonitoredItemsParameters.from_binary(data) |
10154
|
|
|
|
10155
|
|
|
def __str__(self): |
10156
|
|
|
return 'CreateMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10157
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
10158
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10159
|
|
|
|
10160
|
1 |
|
__repr__ = __str__ |
10161
|
1 |
|
|
10162
|
|
|
|
10163
|
|
|
class CreateMonitoredItemsResponse(FrozenClass): |
10164
|
|
|
''' |
10165
|
1 |
|
:ivar TypeId: |
10166
|
1 |
|
:vartype TypeId: NodeId |
10167
|
1 |
|
:ivar ResponseHeader: |
10168
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
10169
|
|
|
:ivar Results: |
10170
|
1 |
|
:vartype Results: MonitoredItemCreateResult |
10171
|
1 |
|
:ivar DiagnosticInfos: |
10172
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
10173
|
1 |
|
''' |
10174
|
1 |
|
def __init__(self, binary=None): |
10175
|
1 |
|
if binary is not None: |
10176
|
|
|
self._binary_init(binary) |
10177
|
1 |
|
self._freeze = True |
10178
|
|
|
return |
10179
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary) |
10180
|
|
|
self.ResponseHeader = ResponseHeader() |
10181
|
1 |
|
self.Results = [] |
10182
|
|
|
self.DiagnosticInfos = [] |
10183
|
|
|
self._freeze = True |
10184
|
|
|
|
10185
|
|
|
def to_binary(self): |
10186
|
1 |
|
packet = [] |
10187
|
|
|
packet.append(self.TypeId.to_binary()) |
10188
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
10189
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
10190
|
|
|
for fieldname in self.Results: |
10191
|
1 |
|
packet.append(fieldname.to_binary()) |
10192
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
10193
|
|
|
for fieldname in self.DiagnosticInfos: |
10194
|
1 |
|
packet.append(fieldname.to_binary()) |
10195
|
|
|
return b''.join(packet) |
10196
|
|
|
|
10197
|
|
|
@staticmethod |
10198
|
|
|
def from_binary(data): |
10199
|
|
|
return CreateMonitoredItemsResponse(data) |
10200
|
|
|
|
10201
|
|
|
def _binary_init(self, data): |
10202
|
|
|
self.TypeId = NodeId.from_binary(data) |
10203
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
10204
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10205
|
1 |
|
array = [] |
10206
|
1 |
|
if length != -1: |
10207
|
1 |
|
for _ in range(0, length): |
10208
|
1 |
|
array.append(MonitoredItemCreateResult.from_binary(data)) |
10209
|
1 |
|
self.Results = array |
10210
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
10211
|
1 |
|
array = [] |
10212
|
1 |
|
if length != -1: |
10213
|
1 |
|
for _ in range(0, length): |
10214
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
10215
|
|
|
self.DiagnosticInfos = array |
10216
|
1 |
|
|
10217
|
1 |
|
def __str__(self): |
10218
|
1 |
|
return 'CreateMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10219
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
10220
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
10221
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
10222
|
1 |
|
|
10223
|
1 |
|
__repr__ = __str__ |
10224
|
1 |
|
|
10225
|
|
|
|
10226
|
1 |
|
class MonitoredItemModifyRequest(FrozenClass): |
10227
|
|
|
''' |
10228
|
1 |
|
:ivar MonitoredItemId: |
10229
|
|
|
:vartype MonitoredItemId: UInt32 |
10230
|
1 |
|
:ivar RequestedParameters: |
10231
|
|
|
:vartype RequestedParameters: MonitoringParameters |
10232
|
1 |
|
''' |
10233
|
1 |
|
def __init__(self, binary=None): |
10234
|
1 |
|
if binary is not None: |
10235
|
1 |
|
self._binary_init(binary) |
10236
|
1 |
|
self._freeze = True |
10237
|
1 |
|
return |
10238
|
1 |
|
self.MonitoredItemId = 0 |
10239
|
1 |
|
self.RequestedParameters = MonitoringParameters() |
10240
|
1 |
|
self._freeze = True |
10241
|
1 |
|
|
10242
|
1 |
|
def to_binary(self): |
10243
|
1 |
|
packet = [] |
10244
|
1 |
|
packet.append(uatype_UInt32.pack(self.MonitoredItemId)) |
10245
|
|
|
packet.append(self.RequestedParameters.to_binary()) |
10246
|
1 |
|
return b''.join(packet) |
10247
|
|
|
|
10248
|
1 |
|
@staticmethod |
10249
|
|
|
def from_binary(data): |
10250
|
|
|
return MonitoredItemModifyRequest(data) |
10251
|
|
|
|
10252
|
|
|
def _binary_init(self, data): |
10253
|
|
|
self.MonitoredItemId = uatype_UInt32.unpack(data.read(4))[0] |
10254
|
1 |
|
self.RequestedParameters = MonitoringParameters.from_binary(data) |
10255
|
|
|
|
10256
|
|
|
def __str__(self): |
10257
|
1 |
|
return 'MonitoredItemModifyRequest(' + 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \ |
10258
|
|
|
'RequestedParameters:' + str(self.RequestedParameters) + ')' |
10259
|
|
|
|
10260
|
|
|
__repr__ = __str__ |
10261
|
|
|
|
10262
|
|
|
|
10263
|
|
|
class MonitoredItemModifyResult(FrozenClass): |
10264
|
1 |
|
''' |
10265
|
|
|
:ivar StatusCode: |
10266
|
|
|
:vartype StatusCode: StatusCode |
10267
|
|
|
:ivar RevisedSamplingInterval: |
10268
|
|
|
:vartype RevisedSamplingInterval: Double |
10269
|
|
|
:ivar RevisedQueueSize: |
10270
|
|
|
:vartype RevisedQueueSize: UInt32 |
10271
|
|
|
:ivar FilterResult: |
10272
|
|
|
:vartype FilterResult: ExtensionObject |
10273
|
1 |
|
''' |
10274
|
|
|
def __init__(self, binary=None): |
10275
|
|
|
if binary is not None: |
10276
|
|
|
self._binary_init(binary) |
10277
|
|
|
self._freeze = True |
10278
|
|
|
return |
10279
|
1 |
|
self.StatusCode = StatusCode() |
10280
|
|
|
self.RevisedSamplingInterval = 0 |
10281
|
|
|
self.RevisedQueueSize = 0 |
10282
|
|
|
self.FilterResult = None |
10283
|
1 |
|
self._freeze = True |
10284
|
|
|
|
10285
|
|
|
def to_binary(self): |
10286
|
|
|
packet = [] |
10287
|
1 |
|
packet.append(self.StatusCode.to_binary()) |
10288
|
|
|
packet.append(uatype_Double.pack(self.RevisedSamplingInterval)) |
10289
|
|
|
packet.append(uatype_UInt32.pack(self.RevisedQueueSize)) |
10290
|
|
|
packet.append(extensionobject_to_binary(self.FilterResult)) |
10291
|
1 |
|
return b''.join(packet) |
10292
|
|
|
|
10293
|
|
|
@staticmethod |
10294
|
1 |
|
def from_binary(data): |
10295
|
|
|
return MonitoredItemModifyResult(data) |
10296
|
|
|
|
10297
|
|
|
def _binary_init(self, data): |
10298
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
10299
|
|
|
self.RevisedSamplingInterval = uatype_Double.unpack(data.read(8))[0] |
10300
|
|
|
self.RevisedQueueSize = uatype_UInt32.unpack(data.read(4))[0] |
10301
|
|
|
self.FilterResult = extensionobject_from_binary(data) |
10302
|
|
|
|
10303
|
|
|
def __str__(self): |
10304
|
|
|
return 'MonitoredItemModifyResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
10305
|
1 |
|
'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \ |
10306
|
|
|
'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \ |
10307
|
|
|
'FilterResult:' + str(self.FilterResult) + ')' |
10308
|
|
|
|
10309
|
|
|
__repr__ = __str__ |
10310
|
|
|
|
10311
|
|
|
|
10312
|
|
|
class ModifyMonitoredItemsParameters(FrozenClass): |
10313
|
|
|
''' |
10314
|
|
|
:ivar SubscriptionId: |
10315
|
|
|
:vartype SubscriptionId: UInt32 |
10316
|
1 |
|
:ivar TimestampsToReturn: |
10317
|
|
|
:vartype TimestampsToReturn: TimestampsToReturn |
10318
|
|
|
:ivar ItemsToModify: |
10319
|
|
|
:vartype ItemsToModify: MonitoredItemModifyRequest |
10320
|
|
|
''' |
10321
|
|
|
def __init__(self, binary=None): |
10322
|
|
|
if binary is not None: |
10323
|
|
|
self._binary_init(binary) |
10324
|
1 |
|
self._freeze = True |
10325
|
|
|
return |
10326
|
|
|
self.SubscriptionId = 0 |
10327
|
|
|
self.TimestampsToReturn = TimestampsToReturn(0) |
10328
|
1 |
|
self.ItemsToModify = [] |
10329
|
|
|
self._freeze = True |
10330
|
|
|
|
10331
|
|
|
def to_binary(self): |
10332
|
|
|
packet = [] |
10333
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
10334
|
1 |
|
packet.append(uatype_UInt32.pack(self.TimestampsToReturn.value)) |
10335
|
|
|
packet.append(uatype_Int32.pack(len(self.ItemsToModify))) |
10336
|
|
|
for fieldname in self.ItemsToModify: |
10337
|
|
|
packet.append(fieldname.to_binary()) |
10338
|
|
|
return b''.join(packet) |
10339
|
|
|
|
10340
|
1 |
|
@staticmethod |
10341
|
|
|
def from_binary(data): |
10342
|
|
|
return ModifyMonitoredItemsParameters(data) |
10343
|
1 |
|
|
10344
|
|
|
def _binary_init(self, data): |
10345
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
10346
|
|
|
self.TimestampsToReturn = TimestampsToReturn(uatype_UInt32.unpack(data.read(4))[0]) |
10347
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10348
|
|
|
array = [] |
10349
|
|
|
if length != -1: |
10350
|
|
|
for _ in range(0, length): |
10351
|
|
|
array.append(MonitoredItemModifyRequest.from_binary(data)) |
10352
|
1 |
|
self.ItemsToModify = array |
10353
|
|
|
|
10354
|
|
|
def __str__(self): |
10355
|
|
|
return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
10356
|
|
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
10357
|
|
|
'ItemsToModify:' + str(self.ItemsToModify) + ')' |
10358
|
|
|
|
10359
|
|
|
__repr__ = __str__ |
10360
|
|
|
|
10361
|
|
|
|
10362
|
1 |
|
class ModifyMonitoredItemsRequest(FrozenClass): |
10363
|
|
|
''' |
10364
|
|
|
:ivar TypeId: |
10365
|
|
|
:vartype TypeId: NodeId |
10366
|
|
|
:ivar RequestHeader: |
10367
|
|
|
:vartype RequestHeader: RequestHeader |
10368
|
|
|
:ivar Parameters: |
10369
|
|
|
:vartype Parameters: ModifyMonitoredItemsParameters |
10370
|
|
|
''' |
10371
|
1 |
|
def __init__(self, binary=None): |
10372
|
|
|
if binary is not None: |
10373
|
|
|
self._binary_init(binary) |
10374
|
|
|
self._freeze = True |
10375
|
1 |
|
return |
10376
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary) |
10377
|
|
|
self.RequestHeader = RequestHeader() |
10378
|
|
|
self.Parameters = ModifyMonitoredItemsParameters() |
10379
|
|
|
self._freeze = True |
10380
|
|
|
|
10381
|
|
|
def to_binary(self): |
10382
|
|
|
packet = [] |
10383
|
|
|
packet.append(self.TypeId.to_binary()) |
10384
|
|
|
packet.append(self.RequestHeader.to_binary()) |
10385
|
1 |
|
packet.append(self.Parameters.to_binary()) |
10386
|
|
|
return b''.join(packet) |
10387
|
|
|
|
10388
|
|
|
@staticmethod |
10389
|
|
|
def from_binary(data): |
10390
|
1 |
|
return ModifyMonitoredItemsRequest(data) |
10391
|
|
|
|
10392
|
|
|
def _binary_init(self, data): |
10393
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10394
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
10395
|
|
|
self.Parameters = ModifyMonitoredItemsParameters.from_binary(data) |
10396
|
|
|
|
10397
|
|
|
def __str__(self): |
10398
|
|
|
return 'ModifyMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10399
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
10400
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10401
|
|
|
|
10402
|
1 |
|
__repr__ = __str__ |
10403
|
|
|
|
10404
|
|
|
|
10405
|
|
|
class ModifyMonitoredItemsResponse(FrozenClass): |
10406
|
|
|
''' |
10407
|
|
|
:ivar TypeId: |
10408
|
|
|
:vartype TypeId: NodeId |
10409
|
|
|
:ivar ResponseHeader: |
10410
|
|
|
:vartype ResponseHeader: ResponseHeader |
10411
|
|
|
:ivar Results: |
10412
|
1 |
|
:vartype Results: MonitoredItemModifyResult |
10413
|
|
|
:ivar DiagnosticInfos: |
10414
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
10415
|
|
|
''' |
10416
|
|
|
def __init__(self, binary=None): |
10417
|
|
|
if binary is not None: |
10418
|
|
|
self._binary_init(binary) |
10419
|
1 |
|
self._freeze = True |
10420
|
|
|
return |
10421
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary) |
10422
|
|
|
self.ResponseHeader = ResponseHeader() |
10423
|
1 |
|
self.Results = [] |
10424
|
|
|
self.DiagnosticInfos = [] |
10425
|
|
|
self._freeze = True |
10426
|
|
|
|
10427
|
|
|
def to_binary(self): |
10428
|
1 |
|
packet = [] |
10429
|
|
|
packet.append(self.TypeId.to_binary()) |
10430
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
10431
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
10432
|
|
|
for fieldname in self.Results: |
10433
|
1 |
|
packet.append(fieldname.to_binary()) |
10434
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
10435
|
|
|
for fieldname in self.DiagnosticInfos: |
10436
|
1 |
|
packet.append(fieldname.to_binary()) |
10437
|
|
|
return b''.join(packet) |
10438
|
|
|
|
10439
|
|
|
@staticmethod |
10440
|
|
|
def from_binary(data): |
10441
|
|
|
return ModifyMonitoredItemsResponse(data) |
10442
|
|
|
|
10443
|
|
|
def _binary_init(self, data): |
10444
|
|
|
self.TypeId = NodeId.from_binary(data) |
10445
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
10446
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10447
|
1 |
|
array = [] |
10448
|
|
|
if length != -1: |
10449
|
|
|
for _ in range(0, length): |
10450
|
|
|
array.append(MonitoredItemModifyResult.from_binary(data)) |
10451
|
|
|
self.Results = array |
10452
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10453
|
|
|
array = [] |
10454
|
|
|
if length != -1: |
10455
|
|
|
for _ in range(0, length): |
10456
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
10457
|
|
|
self.DiagnosticInfos = array |
10458
|
1 |
|
|
10459
|
|
|
def __str__(self): |
10460
|
|
|
return 'ModifyMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10461
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
10462
|
|
|
'Results:' + str(self.Results) + ', ' + \ |
10463
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
10464
|
|
|
|
10465
|
|
|
__repr__ = __str__ |
10466
|
|
|
|
10467
|
|
|
|
10468
|
|
|
class SetMonitoringModeParameters(FrozenClass): |
10469
|
|
|
''' |
10470
|
1 |
|
:ivar SubscriptionId: |
10471
|
|
|
:vartype SubscriptionId: UInt32 |
10472
|
|
|
:ivar MonitoringMode: |
10473
|
|
|
:vartype MonitoringMode: MonitoringMode |
10474
|
1 |
|
:ivar MonitoredItemIds: |
10475
|
|
|
:vartype MonitoredItemIds: UInt32 |
10476
|
|
|
''' |
10477
|
|
|
def __init__(self, binary=None): |
10478
|
|
|
if binary is not None: |
10479
|
|
|
self._binary_init(binary) |
10480
|
|
|
self._freeze = True |
10481
|
|
|
return |
10482
|
|
|
self.SubscriptionId = 0 |
10483
|
|
|
self.MonitoringMode = MonitoringMode(0) |
10484
|
|
|
self.MonitoredItemIds = [] |
10485
|
|
|
self._freeze = True |
10486
|
|
|
|
10487
|
|
|
def to_binary(self): |
10488
|
|
|
packet = [] |
10489
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
10490
|
1 |
|
packet.append(uatype_UInt32.pack(self.MonitoringMode.value)) |
10491
|
|
|
packet.append(uatype_Int32.pack(len(self.MonitoredItemIds))) |
10492
|
|
|
for fieldname in self.MonitoredItemIds: |
10493
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
10494
|
|
|
return b''.join(packet) |
10495
|
|
|
|
10496
|
1 |
|
@staticmethod |
10497
|
|
|
def from_binary(data): |
10498
|
|
|
return SetMonitoringModeParameters(data) |
10499
|
1 |
|
|
10500
|
|
|
def _binary_init(self, data): |
10501
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
10502
|
|
|
self.MonitoringMode = MonitoringMode(uatype_UInt32.unpack(data.read(4))[0]) |
10503
|
|
|
self.MonitoredItemIds = unpack_uatype_array('UInt32', data) |
10504
|
|
|
|
10505
|
|
|
def __str__(self): |
10506
|
|
|
return 'SetMonitoringModeParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
10507
|
|
|
'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \ |
10508
|
1 |
|
'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')' |
10509
|
|
|
|
10510
|
|
|
__repr__ = __str__ |
10511
|
|
|
|
10512
|
|
|
|
10513
|
|
|
class SetMonitoringModeRequest(FrozenClass): |
10514
|
|
|
''' |
10515
|
|
|
:ivar TypeId: |
10516
|
|
|
:vartype TypeId: NodeId |
10517
|
|
|
:ivar RequestHeader: |
10518
|
1 |
|
:vartype RequestHeader: RequestHeader |
10519
|
|
|
:ivar Parameters: |
10520
|
|
|
:vartype Parameters: SetMonitoringModeParameters |
10521
|
|
|
''' |
10522
|
|
|
def __init__(self, binary=None): |
10523
|
|
|
if binary is not None: |
10524
|
|
|
self._binary_init(binary) |
10525
|
|
|
self._freeze = True |
10526
|
|
|
return |
10527
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary) |
10528
|
|
|
self.RequestHeader = RequestHeader() |
10529
|
|
|
self.Parameters = SetMonitoringModeParameters() |
10530
|
|
|
self._freeze = True |
10531
|
1 |
|
|
10532
|
|
|
def to_binary(self): |
10533
|
|
|
packet = [] |
10534
|
|
|
packet.append(self.TypeId.to_binary()) |
10535
|
|
|
packet.append(self.RequestHeader.to_binary()) |
10536
|
1 |
|
packet.append(self.Parameters.to_binary()) |
10537
|
|
|
return b''.join(packet) |
10538
|
|
|
|
10539
|
|
|
@staticmethod |
10540
|
|
|
def from_binary(data): |
10541
|
1 |
|
return SetMonitoringModeRequest(data) |
10542
|
|
|
|
10543
|
|
|
def _binary_init(self, data): |
10544
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10545
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
10546
|
|
|
self.Parameters = SetMonitoringModeParameters.from_binary(data) |
10547
|
|
|
|
10548
|
|
|
def __str__(self): |
10549
|
|
|
return 'SetMonitoringModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10550
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
10551
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10552
|
|
|
|
10553
|
1 |
|
__repr__ = __str__ |
10554
|
|
|
|
10555
|
|
|
|
10556
|
|
|
class SetMonitoringModeResult(FrozenClass): |
10557
|
|
|
''' |
10558
|
|
|
:ivar Results: |
10559
|
|
|
:vartype Results: StatusCode |
10560
|
|
|
:ivar DiagnosticInfos: |
10561
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
10562
|
|
|
''' |
10563
|
1 |
|
def __init__(self, binary=None): |
10564
|
|
|
if binary is not None: |
10565
|
|
|
self._binary_init(binary) |
10566
|
|
|
self._freeze = True |
10567
|
|
|
return |
10568
|
|
|
self.Results = [] |
10569
|
|
|
self.DiagnosticInfos = [] |
10570
|
1 |
|
self._freeze = True |
10571
|
|
|
|
10572
|
|
|
def to_binary(self): |
10573
|
|
|
packet = [] |
10574
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
10575
|
|
|
for fieldname in self.Results: |
10576
|
|
|
packet.append(fieldname.to_binary()) |
10577
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
10578
|
|
|
for fieldname in self.DiagnosticInfos: |
10579
|
1 |
|
packet.append(fieldname.to_binary()) |
10580
|
|
|
return b''.join(packet) |
10581
|
|
|
|
10582
|
|
|
@staticmethod |
10583
|
|
|
def from_binary(data): |
10584
|
1 |
|
return SetMonitoringModeResult(data) |
10585
|
|
|
|
10586
|
|
|
def _binary_init(self, data): |
10587
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
10588
|
|
|
array = [] |
10589
|
|
|
if length != -1: |
10590
|
|
|
for _ in range(0, length): |
10591
|
|
|
array.append(StatusCode.from_binary(data)) |
10592
|
|
|
self.Results = array |
10593
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10594
|
1 |
|
array = [] |
10595
|
|
|
if length != -1: |
10596
|
|
|
for _ in range(0, length): |
10597
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
10598
|
|
|
self.DiagnosticInfos = array |
10599
|
|
|
|
10600
|
|
|
def __str__(self): |
10601
|
|
|
return 'SetMonitoringModeResult(' + 'Results:' + str(self.Results) + ', ' + \ |
10602
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
10603
|
1 |
|
|
10604
|
|
|
__repr__ = __str__ |
10605
|
|
|
|
10606
|
|
|
|
10607
|
|
|
class SetMonitoringModeResponse(FrozenClass): |
10608
|
|
|
''' |
10609
|
|
|
:ivar TypeId: |
10610
|
|
|
:vartype TypeId: NodeId |
10611
|
|
|
:ivar ResponseHeader: |
10612
|
|
|
:vartype ResponseHeader: ResponseHeader |
10613
|
1 |
|
:ivar Parameters: |
10614
|
|
|
:vartype Parameters: SetMonitoringModeResult |
10615
|
|
|
''' |
10616
|
|
|
def __init__(self, binary=None): |
10617
|
1 |
|
if binary is not None: |
10618
|
|
|
self._binary_init(binary) |
10619
|
|
|
self._freeze = True |
10620
|
|
|
return |
10621
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary) |
10622
|
|
|
self.ResponseHeader = ResponseHeader() |
10623
|
|
|
self.Parameters = SetMonitoringModeResult() |
10624
|
|
|
self._freeze = True |
10625
|
|
|
|
10626
|
|
|
def to_binary(self): |
10627
|
|
|
packet = [] |
10628
|
|
|
packet.append(self.TypeId.to_binary()) |
10629
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
10630
|
|
|
packet.append(self.Parameters.to_binary()) |
10631
|
1 |
|
return b''.join(packet) |
10632
|
|
|
|
10633
|
|
|
@staticmethod |
10634
|
|
|
def from_binary(data): |
10635
|
1 |
|
return SetMonitoringModeResponse(data) |
10636
|
|
|
|
10637
|
|
|
def _binary_init(self, data): |
10638
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10639
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
10640
|
|
|
self.Parameters = SetMonitoringModeResult.from_binary(data) |
10641
|
|
|
|
10642
|
|
|
def __str__(self): |
10643
|
|
|
return 'SetMonitoringModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10644
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
10645
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10646
|
|
|
|
10647
|
1 |
|
__repr__ = __str__ |
10648
|
|
|
|
10649
|
|
|
|
10650
|
|
|
class SetTriggeringParameters(FrozenClass): |
10651
|
|
|
''' |
10652
|
|
|
:ivar SubscriptionId: |
10653
|
|
|
:vartype SubscriptionId: UInt32 |
10654
|
|
|
:ivar TriggeringItemId: |
10655
|
|
|
:vartype TriggeringItemId: UInt32 |
10656
|
|
|
:ivar LinksToAdd: |
10657
|
1 |
|
:vartype LinksToAdd: UInt32 |
10658
|
|
|
:ivar LinksToRemove: |
10659
|
|
|
:vartype LinksToRemove: UInt32 |
10660
|
|
|
''' |
10661
|
|
|
def __init__(self, binary=None): |
10662
|
|
|
if binary is not None: |
10663
|
|
|
self._binary_init(binary) |
10664
|
1 |
|
self._freeze = True |
10665
|
|
|
return |
10666
|
|
|
self.SubscriptionId = 0 |
10667
|
|
|
self.TriggeringItemId = 0 |
10668
|
1 |
|
self.LinksToAdd = [] |
10669
|
|
|
self.LinksToRemove = [] |
10670
|
|
|
self._freeze = True |
10671
|
|
|
|
10672
|
|
|
def to_binary(self): |
10673
|
1 |
|
packet = [] |
10674
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
10675
|
|
|
packet.append(uatype_UInt32.pack(self.TriggeringItemId)) |
10676
|
|
|
packet.append(uatype_Int32.pack(len(self.LinksToAdd))) |
10677
|
|
|
for fieldname in self.LinksToAdd: |
10678
|
1 |
|
packet.append(uatype_UInt32.pack(fieldname)) |
10679
|
|
|
packet.append(uatype_Int32.pack(len(self.LinksToRemove))) |
10680
|
|
|
for fieldname in self.LinksToRemove: |
10681
|
1 |
|
packet.append(uatype_UInt32.pack(fieldname)) |
10682
|
|
|
return b''.join(packet) |
10683
|
|
|
|
10684
|
|
|
@staticmethod |
10685
|
|
|
def from_binary(data): |
10686
|
|
|
return SetTriggeringParameters(data) |
10687
|
|
|
|
10688
|
|
|
def _binary_init(self, data): |
10689
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
10690
|
|
|
self.TriggeringItemId = uatype_UInt32.unpack(data.read(4))[0] |
10691
|
|
|
self.LinksToAdd = unpack_uatype_array('UInt32', data) |
10692
|
1 |
|
self.LinksToRemove = unpack_uatype_array('UInt32', data) |
10693
|
|
|
|
10694
|
|
|
def __str__(self): |
10695
|
|
|
return 'SetTriggeringParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
10696
|
|
|
'TriggeringItemId:' + str(self.TriggeringItemId) + ', ' + \ |
10697
|
|
|
'LinksToAdd:' + str(self.LinksToAdd) + ', ' + \ |
10698
|
|
|
'LinksToRemove:' + str(self.LinksToRemove) + ')' |
10699
|
|
|
|
10700
|
|
|
__repr__ = __str__ |
10701
|
|
|
|
10702
|
|
|
|
10703
|
1 |
|
class SetTriggeringRequest(FrozenClass): |
10704
|
|
|
''' |
10705
|
|
|
:ivar TypeId: |
10706
|
|
|
:vartype TypeId: NodeId |
10707
|
|
|
:ivar RequestHeader: |
10708
|
|
|
:vartype RequestHeader: RequestHeader |
10709
|
|
|
:ivar Parameters: |
10710
|
|
|
:vartype Parameters: SetTriggeringParameters |
10711
|
|
|
''' |
10712
|
|
|
def __init__(self, binary=None): |
10713
|
|
|
if binary is not None: |
10714
|
|
|
self._binary_init(binary) |
10715
|
1 |
|
self._freeze = True |
10716
|
|
|
return |
10717
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary) |
10718
|
|
|
self.RequestHeader = RequestHeader() |
10719
|
1 |
|
self.Parameters = SetTriggeringParameters() |
10720
|
|
|
self._freeze = True |
10721
|
|
|
|
10722
|
|
|
def to_binary(self): |
10723
|
|
|
packet = [] |
10724
|
|
|
packet.append(self.TypeId.to_binary()) |
10725
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
10726
|
|
|
packet.append(self.Parameters.to_binary()) |
10727
|
|
|
return b''.join(packet) |
10728
|
|
|
|
10729
|
|
|
@staticmethod |
10730
|
|
|
def from_binary(data): |
10731
|
1 |
|
return SetTriggeringRequest(data) |
10732
|
|
|
|
10733
|
|
|
def _binary_init(self, data): |
10734
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10735
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
10736
|
|
|
self.Parameters = SetTriggeringParameters.from_binary(data) |
10737
|
|
|
|
10738
|
|
|
def __str__(self): |
10739
|
|
|
return 'SetTriggeringRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10740
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
10741
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10742
|
|
|
|
10743
|
1 |
|
__repr__ = __str__ |
10744
|
|
|
|
10745
|
|
|
|
10746
|
|
|
class SetTriggeringResult(FrozenClass): |
10747
|
|
|
''' |
10748
|
|
|
:ivar AddResults: |
10749
|
|
|
:vartype AddResults: StatusCode |
10750
|
|
|
:ivar AddDiagnosticInfos: |
10751
|
|
|
:vartype AddDiagnosticInfos: DiagnosticInfo |
10752
|
|
|
:ivar RemoveResults: |
10753
|
1 |
|
:vartype RemoveResults: StatusCode |
10754
|
|
|
:ivar RemoveDiagnosticInfos: |
10755
|
|
|
:vartype RemoveDiagnosticInfos: DiagnosticInfo |
10756
|
|
|
''' |
10757
|
|
|
def __init__(self, binary=None): |
10758
|
|
|
if binary is not None: |
10759
|
|
|
self._binary_init(binary) |
10760
|
1 |
|
self._freeze = True |
10761
|
|
|
return |
10762
|
|
|
self.AddResults = [] |
10763
|
|
|
self.AddDiagnosticInfos = [] |
10764
|
1 |
|
self.RemoveResults = [] |
10765
|
|
|
self.RemoveDiagnosticInfos = [] |
10766
|
|
|
self._freeze = True |
10767
|
|
|
|
10768
|
|
|
def to_binary(self): |
10769
|
1 |
|
packet = [] |
10770
|
|
|
packet.append(uatype_Int32.pack(len(self.AddResults))) |
10771
|
|
|
for fieldname in self.AddResults: |
10772
|
|
|
packet.append(fieldname.to_binary()) |
10773
|
|
|
packet.append(uatype_Int32.pack(len(self.AddDiagnosticInfos))) |
10774
|
1 |
|
for fieldname in self.AddDiagnosticInfos: |
10775
|
|
|
packet.append(fieldname.to_binary()) |
10776
|
|
|
packet.append(uatype_Int32.pack(len(self.RemoveResults))) |
10777
|
1 |
|
for fieldname in self.RemoveResults: |
10778
|
|
|
packet.append(fieldname.to_binary()) |
10779
|
|
|
packet.append(uatype_Int32.pack(len(self.RemoveDiagnosticInfos))) |
10780
|
|
|
for fieldname in self.RemoveDiagnosticInfos: |
10781
|
|
|
packet.append(fieldname.to_binary()) |
10782
|
|
|
return b''.join(packet) |
10783
|
|
|
|
10784
|
|
|
@staticmethod |
10785
|
|
|
def from_binary(data): |
10786
|
|
|
return SetTriggeringResult(data) |
10787
|
|
|
|
10788
|
1 |
|
def _binary_init(self, data): |
10789
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10790
|
|
|
array = [] |
10791
|
|
|
if length != -1: |
10792
|
|
|
for _ in range(0, length): |
10793
|
|
|
array.append(StatusCode.from_binary(data)) |
10794
|
|
|
self.AddResults = array |
10795
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10796
|
|
|
array = [] |
10797
|
|
|
if length != -1: |
10798
|
|
|
for _ in range(0, length): |
10799
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
10800
|
|
|
self.AddDiagnosticInfos = array |
10801
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10802
|
|
|
array = [] |
10803
|
|
|
if length != -1: |
10804
|
|
|
for _ in range(0, length): |
10805
|
|
|
array.append(StatusCode.from_binary(data)) |
10806
|
|
|
self.RemoveResults = array |
10807
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10808
|
|
|
array = [] |
10809
|
|
|
if length != -1: |
10810
|
|
|
for _ in range(0, length): |
10811
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
10812
|
|
|
self.RemoveDiagnosticInfos = array |
10813
|
|
|
|
10814
|
|
|
def __str__(self): |
10815
|
1 |
|
return 'SetTriggeringResult(' + 'AddResults:' + str(self.AddResults) + ', ' + \ |
10816
|
|
|
'AddDiagnosticInfos:' + str(self.AddDiagnosticInfos) + ', ' + \ |
10817
|
|
|
'RemoveResults:' + str(self.RemoveResults) + ', ' + \ |
10818
|
|
|
'RemoveDiagnosticInfos:' + str(self.RemoveDiagnosticInfos) + ')' |
10819
|
1 |
|
|
10820
|
|
|
__repr__ = __str__ |
10821
|
|
|
|
10822
|
|
|
|
10823
|
|
|
class SetTriggeringResponse(FrozenClass): |
10824
|
|
|
''' |
10825
|
|
|
:ivar TypeId: |
10826
|
|
|
:vartype TypeId: NodeId |
10827
|
|
|
:ivar ResponseHeader: |
10828
|
|
|
:vartype ResponseHeader: ResponseHeader |
10829
|
|
|
:ivar Parameters: |
10830
|
|
|
:vartype Parameters: SetTriggeringResult |
10831
|
|
|
''' |
10832
|
|
|
def __init__(self, binary=None): |
10833
|
|
|
if binary is not None: |
10834
|
|
|
self._binary_init(binary) |
10835
|
|
|
self._freeze = True |
10836
|
|
|
return |
10837
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary) |
10838
|
|
|
self.ResponseHeader = ResponseHeader() |
10839
|
|
|
self.Parameters = SetTriggeringResult() |
10840
|
|
|
self._freeze = True |
10841
|
|
|
|
10842
|
|
|
def to_binary(self): |
10843
|
|
|
packet = [] |
10844
|
|
|
packet.append(self.TypeId.to_binary()) |
10845
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
10846
|
|
|
packet.append(self.Parameters.to_binary()) |
10847
|
|
|
return b''.join(packet) |
10848
|
|
|
|
10849
|
|
|
@staticmethod |
10850
|
|
|
def from_binary(data): |
10851
|
1 |
|
return SetTriggeringResponse(data) |
10852
|
|
|
|
10853
|
|
|
def _binary_init(self, data): |
10854
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10855
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
10856
|
|
|
self.Parameters = SetTriggeringResult.from_binary(data) |
10857
|
|
|
|
10858
|
|
|
def __str__(self): |
10859
|
|
|
return 'SetTriggeringResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10860
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
10861
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10862
|
|
|
|
10863
|
1 |
|
__repr__ = __str__ |
10864
|
|
|
|
10865
|
|
|
|
10866
|
|
|
class DeleteMonitoredItemsParameters(FrozenClass): |
10867
|
|
|
''' |
10868
|
|
|
:ivar SubscriptionId: |
10869
|
|
|
:vartype SubscriptionId: UInt32 |
10870
|
|
|
:ivar MonitoredItemIds: |
10871
|
|
|
:vartype MonitoredItemIds: UInt32 |
10872
|
|
|
''' |
10873
|
1 |
|
def __init__(self, binary=None): |
10874
|
|
|
if binary is not None: |
10875
|
|
|
self._binary_init(binary) |
10876
|
|
|
self._freeze = True |
10877
|
|
|
return |
10878
|
|
|
self.SubscriptionId = 0 |
10879
|
|
|
self.MonitoredItemIds = [] |
10880
|
1 |
|
self._freeze = True |
10881
|
|
|
|
10882
|
|
|
def to_binary(self): |
10883
|
|
|
packet = [] |
10884
|
1 |
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
10885
|
|
|
packet.append(uatype_Int32.pack(len(self.MonitoredItemIds))) |
10886
|
|
|
for fieldname in self.MonitoredItemIds: |
10887
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
10888
|
|
|
return b''.join(packet) |
10889
|
1 |
|
|
10890
|
|
|
@staticmethod |
10891
|
|
|
def from_binary(data): |
10892
|
|
|
return DeleteMonitoredItemsParameters(data) |
10893
|
|
|
|
10894
|
1 |
|
def _binary_init(self, data): |
10895
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
10896
|
|
|
self.MonitoredItemIds = unpack_uatype_array('UInt32', data) |
10897
|
1 |
|
|
10898
|
|
|
def __str__(self): |
10899
|
|
|
return 'DeleteMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
10900
|
|
|
'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')' |
10901
|
|
|
|
10902
|
|
|
__repr__ = __str__ |
10903
|
|
|
|
10904
|
1 |
|
|
10905
|
1 |
|
class DeleteMonitoredItemsRequest(FrozenClass): |
10906
|
1 |
|
''' |
10907
|
1 |
|
:ivar TypeId: |
10908
|
1 |
|
:vartype TypeId: NodeId |
10909
|
1 |
|
:ivar RequestHeader: |
10910
|
1 |
|
:vartype RequestHeader: RequestHeader |
10911
|
1 |
|
:ivar Parameters: |
10912
|
|
|
:vartype Parameters: DeleteMonitoredItemsParameters |
10913
|
1 |
|
''' |
10914
|
1 |
|
def __init__(self, binary=None): |
10915
|
1 |
|
if binary is not None: |
10916
|
1 |
|
self._binary_init(binary) |
10917
|
1 |
|
self._freeze = True |
10918
|
1 |
|
return |
10919
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary) |
10920
|
|
|
self.RequestHeader = RequestHeader() |
10921
|
1 |
|
self.Parameters = DeleteMonitoredItemsParameters() |
10922
|
|
|
self._freeze = True |
10923
|
1 |
|
|
10924
|
|
|
def to_binary(self): |
10925
|
1 |
|
packet = [] |
10926
|
1 |
|
packet.append(self.TypeId.to_binary()) |
10927
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
10928
|
|
|
packet.append(self.Parameters.to_binary()) |
10929
|
1 |
|
return b''.join(packet) |
10930
|
|
|
|
10931
|
|
|
@staticmethod |
10932
|
|
|
def from_binary(data): |
10933
|
1 |
|
return DeleteMonitoredItemsRequest(data) |
10934
|
|
|
|
10935
|
|
|
def _binary_init(self, data): |
10936
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
10937
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
10938
|
|
|
self.Parameters = DeleteMonitoredItemsParameters.from_binary(data) |
10939
|
|
|
|
10940
|
|
|
def __str__(self): |
10941
|
|
|
return 'DeleteMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
10942
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
10943
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
10944
|
|
|
|
10945
|
1 |
|
__repr__ = __str__ |
10946
|
1 |
|
|
10947
|
|
|
|
10948
|
|
|
class DeleteMonitoredItemsResponse(FrozenClass): |
10949
|
|
|
''' |
10950
|
1 |
|
:ivar TypeId: |
10951
|
1 |
|
:vartype TypeId: NodeId |
10952
|
1 |
|
:ivar ResponseHeader: |
10953
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
10954
|
|
|
:ivar Results: |
10955
|
1 |
|
:vartype Results: StatusCode |
10956
|
1 |
|
:ivar DiagnosticInfos: |
10957
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
10958
|
1 |
|
''' |
10959
|
1 |
|
def __init__(self, binary=None): |
10960
|
1 |
|
if binary is not None: |
10961
|
|
|
self._binary_init(binary) |
10962
|
1 |
|
self._freeze = True |
10963
|
|
|
return |
10964
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary) |
10965
|
|
|
self.ResponseHeader = ResponseHeader() |
10966
|
1 |
|
self.Results = [] |
10967
|
|
|
self.DiagnosticInfos = [] |
10968
|
|
|
self._freeze = True |
10969
|
|
|
|
10970
|
|
|
def to_binary(self): |
10971
|
1 |
|
packet = [] |
10972
|
|
|
packet.append(self.TypeId.to_binary()) |
10973
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
10974
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
10975
|
|
|
for fieldname in self.Results: |
10976
|
1 |
|
packet.append(fieldname.to_binary()) |
10977
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
10978
|
|
|
for fieldname in self.DiagnosticInfos: |
10979
|
1 |
|
packet.append(fieldname.to_binary()) |
10980
|
|
|
return b''.join(packet) |
10981
|
|
|
|
10982
|
|
|
@staticmethod |
10983
|
|
|
def from_binary(data): |
10984
|
|
|
return DeleteMonitoredItemsResponse(data) |
10985
|
|
|
|
10986
|
|
|
def _binary_init(self, data): |
10987
|
|
|
self.TypeId = NodeId.from_binary(data) |
10988
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
10989
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
10990
|
1 |
|
array = [] |
10991
|
1 |
|
if length != -1: |
10992
|
1 |
|
for _ in range(0, length): |
10993
|
1 |
|
array.append(StatusCode.from_binary(data)) |
10994
|
1 |
|
self.Results = array |
10995
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
10996
|
1 |
|
array = [] |
10997
|
1 |
|
if length != -1: |
10998
|
1 |
|
for _ in range(0, length): |
10999
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
11000
|
|
|
self.DiagnosticInfos = array |
11001
|
1 |
|
|
11002
|
1 |
|
def __str__(self): |
11003
|
1 |
|
return 'DeleteMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11004
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
11005
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
11006
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
11007
|
1 |
|
|
11008
|
1 |
|
__repr__ = __str__ |
11009
|
1 |
|
|
11010
|
|
|
|
11011
|
1 |
|
class CreateSubscriptionParameters(FrozenClass): |
11012
|
|
|
''' |
11013
|
1 |
|
:ivar RequestedPublishingInterval: |
11014
|
|
|
:vartype RequestedPublishingInterval: Double |
11015
|
1 |
|
:ivar RequestedLifetimeCount: |
11016
|
|
|
:vartype RequestedLifetimeCount: UInt32 |
11017
|
1 |
|
:ivar RequestedMaxKeepAliveCount: |
11018
|
1 |
|
:vartype RequestedMaxKeepAliveCount: UInt32 |
11019
|
1 |
|
:ivar MaxNotificationsPerPublish: |
11020
|
1 |
|
:vartype MaxNotificationsPerPublish: UInt32 |
11021
|
1 |
|
:ivar PublishingEnabled: |
11022
|
1 |
|
:vartype PublishingEnabled: Boolean |
11023
|
1 |
|
:ivar Priority: |
11024
|
1 |
|
:vartype Priority: Byte |
11025
|
1 |
|
''' |
11026
|
1 |
|
def __init__(self, binary=None): |
11027
|
1 |
|
if binary is not None: |
11028
|
1 |
|
self._binary_init(binary) |
11029
|
1 |
|
self._freeze = True |
11030
|
|
|
return |
11031
|
1 |
|
self.RequestedPublishingInterval = 0 |
11032
|
|
|
self.RequestedLifetimeCount = 0 |
11033
|
1 |
|
self.RequestedMaxKeepAliveCount = 0 |
11034
|
|
|
self.MaxNotificationsPerPublish = 0 |
11035
|
|
|
self.PublishingEnabled = True |
11036
|
|
|
self.Priority = 0 |
11037
|
|
|
self._freeze = True |
11038
|
|
|
|
11039
|
1 |
|
def to_binary(self): |
11040
|
|
|
packet = [] |
11041
|
|
|
packet.append(uatype_Double.pack(self.RequestedPublishingInterval)) |
11042
|
1 |
|
packet.append(uatype_UInt32.pack(self.RequestedLifetimeCount)) |
11043
|
|
|
packet.append(uatype_UInt32.pack(self.RequestedMaxKeepAliveCount)) |
11044
|
|
|
packet.append(uatype_UInt32.pack(self.MaxNotificationsPerPublish)) |
11045
|
|
|
packet.append(uatype_Boolean.pack(self.PublishingEnabled)) |
11046
|
|
|
packet.append(uatype_Byte.pack(self.Priority)) |
11047
|
|
|
return b''.join(packet) |
11048
|
|
|
|
11049
|
|
|
@staticmethod |
11050
|
|
|
def from_binary(data): |
11051
|
|
|
return CreateSubscriptionParameters(data) |
11052
|
|
|
|
11053
|
|
|
def _binary_init(self, data): |
11054
|
|
|
self.RequestedPublishingInterval = uatype_Double.unpack(data.read(8))[0] |
11055
|
|
|
self.RequestedLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
11056
|
|
|
self.RequestedMaxKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
11057
|
1 |
|
self.MaxNotificationsPerPublish = uatype_UInt32.unpack(data.read(4))[0] |
11058
|
1 |
|
self.PublishingEnabled = uatype_Boolean.unpack(data.read(1))[0] |
11059
|
1 |
|
self.Priority = uatype_Byte.unpack(data.read(1))[0] |
11060
|
1 |
|
|
11061
|
1 |
|
def __str__(self): |
11062
|
1 |
|
return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ |
11063
|
1 |
|
'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ |
11064
|
1 |
|
'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ |
11065
|
1 |
|
'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ |
11066
|
1 |
|
'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ |
11067
|
1 |
|
'Priority:' + str(self.Priority) + ')' |
11068
|
1 |
|
|
11069
|
|
|
__repr__ = __str__ |
11070
|
1 |
|
|
11071
|
1 |
|
|
11072
|
1 |
|
class CreateSubscriptionRequest(FrozenClass): |
11073
|
1 |
|
''' |
11074
|
1 |
|
:ivar TypeId: |
11075
|
1 |
|
:vartype TypeId: NodeId |
11076
|
1 |
|
:ivar RequestHeader: |
11077
|
1 |
|
:vartype RequestHeader: RequestHeader |
11078
|
1 |
|
:ivar Parameters: |
11079
|
|
|
:vartype Parameters: CreateSubscriptionParameters |
11080
|
1 |
|
''' |
11081
|
|
|
def __init__(self, binary=None): |
11082
|
1 |
|
if binary is not None: |
11083
|
|
|
self._binary_init(binary) |
11084
|
1 |
|
self._freeze = True |
11085
|
1 |
|
return |
11086
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary) |
11087
|
1 |
|
self.RequestHeader = RequestHeader() |
11088
|
1 |
|
self.Parameters = CreateSubscriptionParameters() |
11089
|
1 |
|
self._freeze = True |
11090
|
1 |
|
|
11091
|
|
|
def to_binary(self): |
11092
|
1 |
|
packet = [] |
11093
|
|
|
packet.append(self.TypeId.to_binary()) |
11094
|
|
|
packet.append(self.RequestHeader.to_binary()) |
11095
|
|
|
packet.append(self.Parameters.to_binary()) |
11096
|
|
|
return b''.join(packet) |
11097
|
|
|
|
11098
|
|
|
@staticmethod |
11099
|
|
|
def from_binary(data): |
11100
|
1 |
|
return CreateSubscriptionRequest(data) |
11101
|
|
|
|
11102
|
|
|
def _binary_init(self, data): |
11103
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11104
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
11105
|
|
|
self.Parameters = CreateSubscriptionParameters.from_binary(data) |
11106
|
|
|
|
11107
|
|
|
def __str__(self): |
11108
|
|
|
return 'CreateSubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11109
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
11110
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11111
|
|
|
|
11112
|
1 |
|
__repr__ = __str__ |
11113
|
1 |
|
|
11114
|
|
|
|
11115
|
|
|
class CreateSubscriptionResult(FrozenClass): |
11116
|
|
|
''' |
11117
|
1 |
|
:ivar SubscriptionId: |
11118
|
1 |
|
:vartype SubscriptionId: UInt32 |
11119
|
1 |
|
:ivar RevisedPublishingInterval: |
11120
|
1 |
|
:vartype RevisedPublishingInterval: Double |
11121
|
|
|
:ivar RevisedLifetimeCount: |
11122
|
1 |
|
:vartype RevisedLifetimeCount: UInt32 |
11123
|
1 |
|
:ivar RevisedMaxKeepAliveCount: |
11124
|
1 |
|
:vartype RevisedMaxKeepAliveCount: UInt32 |
11125
|
1 |
|
''' |
11126
|
1 |
|
def __init__(self, binary=None): |
11127
|
1 |
|
if binary is not None: |
11128
|
|
|
self._binary_init(binary) |
11129
|
1 |
|
self._freeze = True |
11130
|
|
|
return |
11131
|
|
|
self.SubscriptionId = 0 |
11132
|
|
|
self.RevisedPublishingInterval = 0 |
11133
|
1 |
|
self.RevisedLifetimeCount = 0 |
11134
|
|
|
self.RevisedMaxKeepAliveCount = 0 |
11135
|
|
|
self._freeze = True |
11136
|
|
|
|
11137
|
|
|
def to_binary(self): |
11138
|
1 |
|
packet = [] |
11139
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
11140
|
|
|
packet.append(uatype_Double.pack(self.RevisedPublishingInterval)) |
11141
|
|
|
packet.append(uatype_UInt32.pack(self.RevisedLifetimeCount)) |
11142
|
|
|
packet.append(uatype_UInt32.pack(self.RevisedMaxKeepAliveCount)) |
11143
|
1 |
|
return b''.join(packet) |
11144
|
|
|
|
11145
|
|
|
@staticmethod |
11146
|
1 |
|
def from_binary(data): |
11147
|
|
|
return CreateSubscriptionResult(data) |
11148
|
|
|
|
11149
|
|
|
def _binary_init(self, data): |
11150
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
11151
|
|
|
self.RevisedPublishingInterval = uatype_Double.unpack(data.read(8))[0] |
11152
|
|
|
self.RevisedLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
11153
|
|
|
self.RevisedMaxKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
11154
|
|
|
|
11155
|
|
|
def __str__(self): |
11156
|
|
|
return 'CreateSubscriptionResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
11157
|
1 |
|
'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \ |
11158
|
1 |
|
'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \ |
11159
|
1 |
|
'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')' |
11160
|
1 |
|
|
11161
|
1 |
|
__repr__ = __str__ |
11162
|
1 |
|
|
11163
|
1 |
|
|
11164
|
1 |
|
class CreateSubscriptionResponse(FrozenClass): |
11165
|
1 |
|
''' |
11166
|
1 |
|
:ivar TypeId: |
11167
|
|
|
:vartype TypeId: NodeId |
11168
|
1 |
|
:ivar ResponseHeader: |
11169
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
11170
|
1 |
|
:ivar Parameters: |
11171
|
1 |
|
:vartype Parameters: CreateSubscriptionResult |
11172
|
1 |
|
''' |
11173
|
1 |
|
def __init__(self, binary=None): |
11174
|
1 |
|
if binary is not None: |
11175
|
|
|
self._binary_init(binary) |
11176
|
1 |
|
self._freeze = True |
11177
|
|
|
return |
11178
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary) |
11179
|
|
|
self.ResponseHeader = ResponseHeader() |
11180
|
1 |
|
self.Parameters = CreateSubscriptionResult() |
11181
|
1 |
|
self._freeze = True |
11182
|
1 |
|
|
11183
|
1 |
|
def to_binary(self): |
11184
|
1 |
|
packet = [] |
11185
|
|
|
packet.append(self.TypeId.to_binary()) |
11186
|
1 |
|
packet.append(self.ResponseHeader.to_binary()) |
11187
|
|
|
packet.append(self.Parameters.to_binary()) |
11188
|
|
|
return b''.join(packet) |
11189
|
|
|
|
11190
|
|
|
@staticmethod |
11191
|
|
|
def from_binary(data): |
11192
|
1 |
|
return CreateSubscriptionResponse(data) |
11193
|
|
|
|
11194
|
|
|
def _binary_init(self, data): |
11195
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11196
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
11197
|
|
|
self.Parameters = CreateSubscriptionResult.from_binary(data) |
11198
|
|
|
|
11199
|
|
|
def __str__(self): |
11200
|
|
|
return 'CreateSubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11201
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
11202
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11203
|
|
|
|
11204
|
1 |
|
__repr__ = __str__ |
11205
|
1 |
|
|
11206
|
1 |
|
|
11207
|
1 |
|
class ModifySubscriptionParameters(FrozenClass): |
11208
|
1 |
|
''' |
11209
|
1 |
|
:ivar SubscriptionId: |
11210
|
1 |
|
:vartype SubscriptionId: UInt32 |
11211
|
1 |
|
:ivar RequestedPublishingInterval: |
11212
|
1 |
|
:vartype RequestedPublishingInterval: Double |
11213
|
|
|
:ivar RequestedLifetimeCount: |
11214
|
1 |
|
:vartype RequestedLifetimeCount: UInt32 |
11215
|
1 |
|
:ivar RequestedMaxKeepAliveCount: |
11216
|
1 |
|
:vartype RequestedMaxKeepAliveCount: UInt32 |
11217
|
1 |
|
:ivar MaxNotificationsPerPublish: |
11218
|
1 |
|
:vartype MaxNotificationsPerPublish: UInt32 |
11219
|
1 |
|
:ivar Priority: |
11220
|
|
|
:vartype Priority: Byte |
11221
|
1 |
|
''' |
11222
|
|
|
def __init__(self, binary=None): |
11223
|
1 |
|
if binary is not None: |
11224
|
|
|
self._binary_init(binary) |
11225
|
1 |
|
self._freeze = True |
11226
|
1 |
|
return |
11227
|
1 |
|
self.SubscriptionId = 0 |
11228
|
1 |
|
self.RequestedPublishingInterval = 0 |
11229
|
|
|
self.RequestedLifetimeCount = 0 |
11230
|
1 |
|
self.RequestedMaxKeepAliveCount = 0 |
11231
|
|
|
self.MaxNotificationsPerPublish = 0 |
11232
|
|
|
self.Priority = 0 |
11233
|
|
|
self._freeze = True |
11234
|
|
|
|
11235
|
1 |
|
def to_binary(self): |
11236
|
|
|
packet = [] |
11237
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
11238
|
1 |
|
packet.append(uatype_Double.pack(self.RequestedPublishingInterval)) |
11239
|
|
|
packet.append(uatype_UInt32.pack(self.RequestedLifetimeCount)) |
11240
|
|
|
packet.append(uatype_UInt32.pack(self.RequestedMaxKeepAliveCount)) |
11241
|
|
|
packet.append(uatype_UInt32.pack(self.MaxNotificationsPerPublish)) |
11242
|
|
|
packet.append(uatype_Byte.pack(self.Priority)) |
11243
|
|
|
return b''.join(packet) |
11244
|
|
|
|
11245
|
|
|
@staticmethod |
11246
|
|
|
def from_binary(data): |
11247
|
|
|
return ModifySubscriptionParameters(data) |
11248
|
|
|
|
11249
|
|
|
def _binary_init(self, data): |
11250
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
11251
|
|
|
self.RequestedPublishingInterval = uatype_Double.unpack(data.read(8))[0] |
11252
|
|
|
self.RequestedLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
11253
|
1 |
|
self.RequestedMaxKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
11254
|
|
|
self.MaxNotificationsPerPublish = uatype_UInt32.unpack(data.read(4))[0] |
11255
|
|
|
self.Priority = uatype_Byte.unpack(data.read(1))[0] |
11256
|
|
|
|
11257
|
|
|
def __str__(self): |
11258
|
|
|
return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
11259
|
|
|
'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ |
11260
|
|
|
'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ |
11261
|
|
|
'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ |
11262
|
|
|
'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ |
11263
|
|
|
'Priority:' + str(self.Priority) + ')' |
11264
|
|
|
|
11265
|
|
|
__repr__ = __str__ |
11266
|
1 |
|
|
11267
|
|
|
|
11268
|
|
|
class ModifySubscriptionRequest(FrozenClass): |
11269
|
|
|
''' |
11270
|
|
|
:ivar TypeId: |
11271
|
|
|
:vartype TypeId: NodeId |
11272
|
|
|
:ivar RequestHeader: |
11273
|
|
|
:vartype RequestHeader: RequestHeader |
11274
|
|
|
:ivar Parameters: |
11275
|
|
|
:vartype Parameters: ModifySubscriptionParameters |
11276
|
1 |
|
''' |
11277
|
|
|
def __init__(self, binary=None): |
11278
|
|
|
if binary is not None: |
11279
|
|
|
self._binary_init(binary) |
11280
|
1 |
|
self._freeze = True |
11281
|
|
|
return |
11282
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary) |
11283
|
|
|
self.RequestHeader = RequestHeader() |
11284
|
|
|
self.Parameters = ModifySubscriptionParameters() |
11285
|
|
|
self._freeze = True |
11286
|
|
|
|
11287
|
|
|
def to_binary(self): |
11288
|
1 |
|
packet = [] |
11289
|
|
|
packet.append(self.TypeId.to_binary()) |
11290
|
|
|
packet.append(self.RequestHeader.to_binary()) |
11291
|
|
|
packet.append(self.Parameters.to_binary()) |
11292
|
|
|
return b''.join(packet) |
11293
|
|
|
|
11294
|
|
|
@staticmethod |
11295
|
|
|
def from_binary(data): |
11296
|
1 |
|
return ModifySubscriptionRequest(data) |
11297
|
|
|
|
11298
|
|
|
def _binary_init(self, data): |
11299
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11300
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
11301
|
|
|
self.Parameters = ModifySubscriptionParameters.from_binary(data) |
11302
|
|
|
|
11303
|
|
|
def __str__(self): |
11304
|
|
|
return 'ModifySubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11305
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
11306
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11307
|
|
|
|
11308
|
1 |
|
__repr__ = __str__ |
11309
|
|
|
|
11310
|
|
|
|
11311
|
|
|
class ModifySubscriptionResult(FrozenClass): |
11312
|
|
|
''' |
11313
|
|
|
:ivar RevisedPublishingInterval: |
11314
|
|
|
:vartype RevisedPublishingInterval: Double |
11315
|
|
|
:ivar RevisedLifetimeCount: |
11316
|
|
|
:vartype RevisedLifetimeCount: UInt32 |
11317
|
|
|
:ivar RevisedMaxKeepAliveCount: |
11318
|
1 |
|
:vartype RevisedMaxKeepAliveCount: UInt32 |
11319
|
|
|
''' |
11320
|
|
|
def __init__(self, binary=None): |
11321
|
|
|
if binary is not None: |
11322
|
|
|
self._binary_init(binary) |
11323
|
|
|
self._freeze = True |
11324
|
|
|
return |
11325
|
1 |
|
self.RevisedPublishingInterval = 0 |
11326
|
|
|
self.RevisedLifetimeCount = 0 |
11327
|
|
|
self.RevisedMaxKeepAliveCount = 0 |
11328
|
|
|
self._freeze = True |
11329
|
1 |
|
|
11330
|
|
|
def to_binary(self): |
11331
|
|
|
packet = [] |
11332
|
|
|
packet.append(uatype_Double.pack(self.RevisedPublishingInterval)) |
11333
|
|
|
packet.append(uatype_UInt32.pack(self.RevisedLifetimeCount)) |
11334
|
1 |
|
packet.append(uatype_UInt32.pack(self.RevisedMaxKeepAliveCount)) |
11335
|
|
|
return b''.join(packet) |
11336
|
|
|
|
11337
|
|
|
@staticmethod |
11338
|
|
|
def from_binary(data): |
11339
|
1 |
|
return ModifySubscriptionResult(data) |
11340
|
|
|
|
11341
|
|
|
def _binary_init(self, data): |
11342
|
1 |
|
self.RevisedPublishingInterval = uatype_Double.unpack(data.read(8))[0] |
11343
|
|
|
self.RevisedLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
11344
|
|
|
self.RevisedMaxKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
11345
|
|
|
|
11346
|
|
|
def __str__(self): |
11347
|
|
|
return 'ModifySubscriptionResult(' + 'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \ |
11348
|
|
|
'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \ |
11349
|
|
|
'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')' |
11350
|
|
|
|
11351
|
1 |
|
__repr__ = __str__ |
11352
|
|
|
|
11353
|
|
|
|
11354
|
|
|
class ModifySubscriptionResponse(FrozenClass): |
11355
|
|
|
''' |
11356
|
|
|
:ivar TypeId: |
11357
|
|
|
:vartype TypeId: NodeId |
11358
|
|
|
:ivar ResponseHeader: |
11359
|
|
|
:vartype ResponseHeader: ResponseHeader |
11360
|
|
|
:ivar Parameters: |
11361
|
1 |
|
:vartype Parameters: ModifySubscriptionResult |
11362
|
|
|
''' |
11363
|
|
|
def __init__(self, binary=None): |
11364
|
|
|
if binary is not None: |
11365
|
|
|
self._binary_init(binary) |
11366
|
|
|
self._freeze = True |
11367
|
|
|
return |
11368
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary) |
11369
|
|
|
self.ResponseHeader = ResponseHeader() |
11370
|
|
|
self.Parameters = ModifySubscriptionResult() |
11371
|
|
|
self._freeze = True |
11372
|
1 |
|
|
11373
|
|
|
def to_binary(self): |
11374
|
|
|
packet = [] |
11375
|
|
|
packet.append(self.TypeId.to_binary()) |
11376
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
11377
|
1 |
|
packet.append(self.Parameters.to_binary()) |
11378
|
|
|
return b''.join(packet) |
11379
|
|
|
|
11380
|
|
|
@staticmethod |
11381
|
|
|
def from_binary(data): |
11382
|
1 |
|
return ModifySubscriptionResponse(data) |
11383
|
|
|
|
11384
|
|
|
def _binary_init(self, data): |
11385
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11386
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
11387
|
|
|
self.Parameters = ModifySubscriptionResult.from_binary(data) |
11388
|
|
|
|
11389
|
|
|
def __str__(self): |
11390
|
|
|
return 'ModifySubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11391
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
11392
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11393
|
|
|
|
11394
|
1 |
|
__repr__ = __str__ |
11395
|
|
|
|
11396
|
|
|
|
11397
|
|
|
class SetPublishingModeParameters(FrozenClass): |
11398
|
|
|
''' |
11399
|
|
|
:ivar PublishingEnabled: |
11400
|
|
|
:vartype PublishingEnabled: Boolean |
11401
|
|
|
:ivar SubscriptionIds: |
11402
|
|
|
:vartype SubscriptionIds: UInt32 |
11403
|
|
|
''' |
11404
|
1 |
|
def __init__(self, binary=None): |
11405
|
|
|
if binary is not None: |
11406
|
|
|
self._binary_init(binary) |
11407
|
|
|
self._freeze = True |
11408
|
|
|
return |
11409
|
|
|
self.PublishingEnabled = True |
11410
|
|
|
self.SubscriptionIds = [] |
11411
|
1 |
|
self._freeze = True |
11412
|
|
|
|
11413
|
|
|
def to_binary(self): |
11414
|
|
|
packet = [] |
11415
|
1 |
|
packet.append(uatype_Boolean.pack(self.PublishingEnabled)) |
11416
|
|
|
packet.append(uatype_Int32.pack(len(self.SubscriptionIds))) |
11417
|
|
|
for fieldname in self.SubscriptionIds: |
11418
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
11419
|
|
|
return b''.join(packet) |
11420
|
1 |
|
|
11421
|
|
|
@staticmethod |
11422
|
|
|
def from_binary(data): |
11423
|
|
|
return SetPublishingModeParameters(data) |
11424
|
|
|
|
11425
|
1 |
|
def _binary_init(self, data): |
11426
|
|
|
self.PublishingEnabled = uatype_Boolean.unpack(data.read(1))[0] |
11427
|
|
|
self.SubscriptionIds = unpack_uatype_array('UInt32', data) |
11428
|
1 |
|
|
11429
|
|
|
def __str__(self): |
11430
|
|
|
return 'SetPublishingModeParameters(' + 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ |
11431
|
|
|
'SubscriptionIds:' + str(self.SubscriptionIds) + ')' |
11432
|
|
|
|
11433
|
|
|
__repr__ = __str__ |
11434
|
|
|
|
11435
|
1 |
|
|
11436
|
|
|
class SetPublishingModeRequest(FrozenClass): |
11437
|
|
|
''' |
11438
|
|
|
:ivar TypeId: |
11439
|
|
|
:vartype TypeId: NodeId |
11440
|
|
|
:ivar RequestHeader: |
11441
|
|
|
:vartype RequestHeader: RequestHeader |
11442
|
|
|
:ivar Parameters: |
11443
|
|
|
:vartype Parameters: SetPublishingModeParameters |
11444
|
1 |
|
''' |
11445
|
|
|
def __init__(self, binary=None): |
11446
|
|
|
if binary is not None: |
11447
|
|
|
self._binary_init(binary) |
11448
|
|
|
self._freeze = True |
11449
|
|
|
return |
11450
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary) |
11451
|
|
|
self.RequestHeader = RequestHeader() |
11452
|
1 |
|
self.Parameters = SetPublishingModeParameters() |
11453
|
|
|
self._freeze = True |
11454
|
|
|
|
11455
|
|
|
def to_binary(self): |
11456
|
1 |
|
packet = [] |
11457
|
|
|
packet.append(self.TypeId.to_binary()) |
11458
|
|
|
packet.append(self.RequestHeader.to_binary()) |
11459
|
|
|
packet.append(self.Parameters.to_binary()) |
11460
|
1 |
|
return b''.join(packet) |
11461
|
|
|
|
11462
|
|
|
@staticmethod |
11463
|
|
|
def from_binary(data): |
11464
|
1 |
|
return SetPublishingModeRequest(data) |
11465
|
|
|
|
11466
|
|
|
def _binary_init(self, data): |
11467
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11468
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
11469
|
|
|
self.Parameters = SetPublishingModeParameters.from_binary(data) |
11470
|
|
|
|
11471
|
|
|
def __str__(self): |
11472
|
|
|
return 'SetPublishingModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11473
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
11474
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11475
|
|
|
|
11476
|
1 |
|
__repr__ = __str__ |
11477
|
|
|
|
11478
|
|
|
|
11479
|
|
|
class SetPublishingModeResult(FrozenClass): |
11480
|
|
|
''' |
11481
|
|
|
:ivar Results: |
11482
|
|
|
:vartype Results: StatusCode |
11483
|
|
|
:ivar DiagnosticInfos: |
11484
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
11485
|
|
|
''' |
11486
|
1 |
|
def __init__(self, binary=None): |
11487
|
|
|
if binary is not None: |
11488
|
|
|
self._binary_init(binary) |
11489
|
|
|
self._freeze = True |
11490
|
|
|
return |
11491
|
|
|
self.Results = [] |
11492
|
|
|
self.DiagnosticInfos = [] |
11493
|
1 |
|
self._freeze = True |
11494
|
|
|
|
11495
|
|
|
def to_binary(self): |
11496
|
|
|
packet = [] |
11497
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
11498
|
|
|
for fieldname in self.Results: |
11499
|
|
|
packet.append(fieldname.to_binary()) |
11500
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
11501
|
|
|
for fieldname in self.DiagnosticInfos: |
11502
|
1 |
|
packet.append(fieldname.to_binary()) |
11503
|
|
|
return b''.join(packet) |
11504
|
|
|
|
11505
|
|
|
@staticmethod |
11506
|
|
|
def from_binary(data): |
11507
|
1 |
|
return SetPublishingModeResult(data) |
11508
|
|
|
|
11509
|
|
|
def _binary_init(self, data): |
11510
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
11511
|
|
|
array = [] |
11512
|
|
|
if length != -1: |
11513
|
|
|
for _ in range(0, length): |
11514
|
|
|
array.append(StatusCode.from_binary(data)) |
11515
|
|
|
self.Results = array |
11516
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11517
|
1 |
|
array = [] |
11518
|
|
|
if length != -1: |
11519
|
|
|
for _ in range(0, length): |
11520
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
11521
|
|
|
self.DiagnosticInfos = array |
11522
|
|
|
|
11523
|
|
|
def __str__(self): |
11524
|
|
|
return 'SetPublishingModeResult(' + 'Results:' + str(self.Results) + ', ' + \ |
11525
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
11526
|
1 |
|
|
11527
|
|
|
__repr__ = __str__ |
11528
|
|
|
|
11529
|
|
|
|
11530
|
|
|
class SetPublishingModeResponse(FrozenClass): |
11531
|
|
|
''' |
11532
|
|
|
:ivar TypeId: |
11533
|
|
|
:vartype TypeId: NodeId |
11534
|
|
|
:ivar ResponseHeader: |
11535
|
|
|
:vartype ResponseHeader: ResponseHeader |
11536
|
1 |
|
:ivar Parameters: |
11537
|
|
|
:vartype Parameters: SetPublishingModeResult |
11538
|
|
|
''' |
11539
|
|
|
def __init__(self, binary=None): |
11540
|
1 |
|
if binary is not None: |
11541
|
|
|
self._binary_init(binary) |
11542
|
|
|
self._freeze = True |
11543
|
|
|
return |
11544
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary) |
11545
|
|
|
self.ResponseHeader = ResponseHeader() |
11546
|
|
|
self.Parameters = SetPublishingModeResult() |
11547
|
|
|
self._freeze = True |
11548
|
|
|
|
11549
|
|
|
def to_binary(self): |
11550
|
|
|
packet = [] |
11551
|
|
|
packet.append(self.TypeId.to_binary()) |
11552
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
11553
|
|
|
packet.append(self.Parameters.to_binary()) |
11554
|
1 |
|
return b''.join(packet) |
11555
|
|
|
|
11556
|
|
|
@staticmethod |
11557
|
|
|
def from_binary(data): |
11558
|
1 |
|
return SetPublishingModeResponse(data) |
11559
|
|
|
|
11560
|
|
|
def _binary_init(self, data): |
11561
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
11562
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
11563
|
|
|
self.Parameters = SetPublishingModeResult.from_binary(data) |
11564
|
|
|
|
11565
|
|
|
def __str__(self): |
11566
|
|
|
return 'SetPublishingModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
11567
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
11568
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
11569
|
|
|
|
11570
|
1 |
|
__repr__ = __str__ |
11571
|
|
|
|
11572
|
|
|
|
11573
|
|
|
class NotificationMessage(FrozenClass): |
11574
|
|
|
''' |
11575
|
|
|
:ivar SequenceNumber: |
11576
|
|
|
:vartype SequenceNumber: UInt32 |
11577
|
|
|
:ivar PublishTime: |
11578
|
|
|
:vartype PublishTime: DateTime |
11579
|
|
|
:ivar NotificationData: |
11580
|
1 |
|
:vartype NotificationData: ExtensionObject |
11581
|
|
|
''' |
11582
|
|
|
def __init__(self, binary=None): |
11583
|
|
|
if binary is not None: |
11584
|
|
|
self._binary_init(binary) |
11585
|
|
|
self._freeze = True |
11586
|
|
|
return |
11587
|
1 |
|
self.SequenceNumber = 0 |
11588
|
|
|
self.PublishTime = datetime.now() |
11589
|
|
|
self.NotificationData = [] |
11590
|
|
|
self._freeze = True |
11591
|
1 |
|
|
11592
|
|
|
def to_binary(self): |
11593
|
|
|
packet = [] |
11594
|
|
|
packet.append(uatype_UInt32.pack(self.SequenceNumber)) |
11595
|
|
|
packet.append(pack_datetime(self.PublishTime)) |
11596
|
1 |
|
packet.append(uatype_Int32.pack(len(self.NotificationData))) |
11597
|
|
|
for fieldname in self.NotificationData: |
11598
|
|
|
packet.append(extensionobject_to_binary(fieldname)) |
11599
|
|
|
return b''.join(packet) |
11600
|
|
|
|
11601
|
1 |
|
@staticmethod |
11602
|
|
|
def from_binary(data): |
11603
|
|
|
return NotificationMessage(data) |
11604
|
1 |
|
|
11605
|
|
|
def _binary_init(self, data): |
11606
|
|
|
self.SequenceNumber = uatype_UInt32.unpack(data.read(4))[0] |
11607
|
|
|
self.PublishTime = unpack_datetime(data) |
11608
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11609
|
|
|
array = [] |
11610
|
|
|
if length != -1: |
11611
|
|
|
for _ in range(0, length): |
11612
|
|
|
array.append(extensionobject_from_binary(data)) |
11613
|
1 |
|
self.NotificationData = array |
11614
|
1 |
|
|
11615
|
1 |
|
def __str__(self): |
11616
|
1 |
|
return 'NotificationMessage(' + 'SequenceNumber:' + str(self.SequenceNumber) + ', ' + \ |
11617
|
1 |
|
'PublishTime:' + str(self.PublishTime) + ', ' + \ |
11618
|
1 |
|
'NotificationData:' + str(self.NotificationData) + ')' |
11619
|
1 |
|
|
11620
|
1 |
|
__repr__ = __str__ |
11621
|
1 |
|
|
11622
|
|
|
|
11623
|
1 |
|
class NotificationData(FrozenClass): |
11624
|
1 |
|
''' |
11625
|
1 |
|
''' |
11626
|
1 |
|
def __init__(self, binary=None): |
11627
|
1 |
|
if binary is not None: |
11628
|
1 |
|
self._binary_init(binary) |
11629
|
1 |
|
self._freeze = True |
11630
|
1 |
|
return |
11631
|
|
|
self._freeze = True |
11632
|
1 |
|
|
11633
|
|
|
def to_binary(self): |
11634
|
1 |
|
packet = [] |
11635
|
|
|
return b''.join(packet) |
11636
|
1 |
|
|
11637
|
1 |
|
@staticmethod |
11638
|
1 |
|
def from_binary(data): |
11639
|
1 |
|
return NotificationData(data) |
11640
|
1 |
|
|
11641
|
1 |
|
def _binary_init(self, data): |
11642
|
1 |
|
pass |
11643
|
1 |
|
|
11644
|
1 |
|
def __str__(self): |
11645
|
|
|
return 'NotificationData(' + + ')' |
11646
|
1 |
|
|
11647
|
|
|
__repr__ = __str__ |
11648
|
|
|
|
11649
|
|
|
|
11650
|
|
|
class DataChangeNotification(FrozenClass): |
11651
|
1 |
|
''' |
11652
|
|
|
:ivar MonitoredItems: |
11653
|
|
|
:vartype MonitoredItems: MonitoredItemNotification |
11654
|
1 |
|
:ivar DiagnosticInfos: |
11655
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
11656
|
|
|
''' |
11657
|
1 |
|
def __init__(self, binary=None): |
11658
|
|
|
if binary is not None: |
11659
|
|
|
self._binary_init(binary) |
11660
|
|
|
self._freeze = True |
11661
|
|
|
return |
11662
|
|
|
self.MonitoredItems = [] |
11663
|
|
|
self.DiagnosticInfos = [] |
11664
|
1 |
|
self._freeze = True |
11665
|
|
|
|
11666
|
|
|
def to_binary(self): |
11667
|
|
|
packet = [] |
11668
|
1 |
|
packet.append(uatype_Int32.pack(len(self.MonitoredItems))) |
11669
|
|
|
for fieldname in self.MonitoredItems: |
11670
|
|
|
packet.append(fieldname.to_binary()) |
11671
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
11672
|
1 |
|
for fieldname in self.DiagnosticInfos: |
11673
|
|
|
packet.append(fieldname.to_binary()) |
11674
|
|
|
return b''.join(packet) |
11675
|
1 |
|
|
11676
|
|
|
@staticmethod |
11677
|
|
|
def from_binary(data): |
11678
|
1 |
|
return DataChangeNotification(data) |
11679
|
|
|
|
11680
|
|
|
def _binary_init(self, data): |
11681
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
11682
|
|
|
array = [] |
11683
|
|
|
if length != -1: |
11684
|
|
|
for _ in range(0, length): |
11685
|
|
|
array.append(MonitoredItemNotification.from_binary(data)) |
11686
|
|
|
self.MonitoredItems = array |
11687
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11688
|
1 |
|
array = [] |
11689
|
1 |
|
if length != -1: |
11690
|
1 |
|
for _ in range(0, length): |
11691
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
11692
|
1 |
|
self.DiagnosticInfos = array |
11693
|
1 |
|
|
11694
|
1 |
|
def __str__(self): |
11695
|
1 |
|
return 'DataChangeNotification(' + 'MonitoredItems:' + str(self.MonitoredItems) + ', ' + \ |
11696
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
11697
|
1 |
|
|
11698
|
1 |
|
__repr__ = __str__ |
11699
|
1 |
|
|
11700
|
1 |
|
|
11701
|
1 |
|
class MonitoredItemNotification(FrozenClass): |
11702
|
1 |
|
''' |
11703
|
1 |
|
:ivar ClientHandle: |
11704
|
|
|
:vartype ClientHandle: UInt32 |
11705
|
1 |
|
:ivar Value: |
11706
|
|
|
:vartype Value: DataValue |
11707
|
1 |
|
''' |
11708
|
|
|
def __init__(self, binary=None): |
11709
|
1 |
|
if binary is not None: |
11710
|
|
|
self._binary_init(binary) |
11711
|
1 |
|
self._freeze = True |
11712
|
1 |
|
return |
11713
|
1 |
|
self.ClientHandle = 0 |
11714
|
1 |
|
self.Value = DataValue() |
11715
|
1 |
|
self._freeze = True |
11716
|
1 |
|
|
11717
|
1 |
|
def to_binary(self): |
11718
|
1 |
|
packet = [] |
11719
|
1 |
|
packet.append(uatype_UInt32.pack(self.ClientHandle)) |
11720
|
1 |
|
packet.append(self.Value.to_binary()) |
11721
|
1 |
|
return b''.join(packet) |
11722
|
|
|
|
11723
|
1 |
|
@staticmethod |
11724
|
|
|
def from_binary(data): |
11725
|
1 |
|
return MonitoredItemNotification(data) |
11726
|
|
|
|
11727
|
|
|
def _binary_init(self, data): |
11728
|
|
|
self.ClientHandle = uatype_UInt32.unpack(data.read(4))[0] |
11729
|
1 |
|
self.Value = DataValue.from_binary(data) |
11730
|
|
|
|
11731
|
|
|
def __str__(self): |
11732
|
1 |
|
return 'MonitoredItemNotification(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ |
11733
|
|
|
'Value:' + str(self.Value) + ')' |
11734
|
|
|
|
11735
|
|
|
__repr__ = __str__ |
11736
|
|
|
|
11737
|
|
|
|
11738
|
|
|
class EventNotificationList(FrozenClass): |
11739
|
1 |
|
''' |
11740
|
1 |
|
:ivar Events: |
11741
|
1 |
|
:vartype Events: EventFieldList |
11742
|
1 |
|
''' |
11743
|
1 |
|
def __init__(self, binary=None): |
11744
|
1 |
|
if binary is not None: |
11745
|
1 |
|
self._binary_init(binary) |
11746
|
1 |
|
self._freeze = True |
11747
|
|
|
return |
11748
|
1 |
|
self.Events = [] |
11749
|
1 |
|
self._freeze = True |
11750
|
1 |
|
|
11751
|
1 |
|
def to_binary(self): |
11752
|
1 |
|
packet = [] |
11753
|
|
|
packet.append(uatype_Int32.pack(len(self.Events))) |
11754
|
1 |
|
for fieldname in self.Events: |
11755
|
|
|
packet.append(fieldname.to_binary()) |
11756
|
1 |
|
return b''.join(packet) |
11757
|
|
|
|
11758
|
1 |
|
@staticmethod |
11759
|
1 |
|
def from_binary(data): |
11760
|
1 |
|
return EventNotificationList(data) |
11761
|
|
|
|
11762
|
1 |
|
def _binary_init(self, data): |
11763
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11764
|
|
|
array = [] |
11765
|
|
|
if length != -1: |
11766
|
1 |
|
for _ in range(0, length): |
11767
|
|
|
array.append(EventFieldList.from_binary(data)) |
11768
|
|
|
self.Events = array |
11769
|
1 |
|
|
11770
|
|
|
def __str__(self): |
11771
|
|
|
return 'EventNotificationList(' + 'Events:' + str(self.Events) + ')' |
11772
|
|
|
|
11773
|
|
|
__repr__ = __str__ |
11774
|
1 |
|
|
11775
|
1 |
|
|
11776
|
1 |
|
class EventFieldList(FrozenClass): |
11777
|
1 |
|
''' |
11778
|
1 |
|
:ivar ClientHandle: |
11779
|
1 |
|
:vartype ClientHandle: UInt32 |
11780
|
1 |
|
:ivar EventFields: |
11781
|
|
|
:vartype EventFields: Variant |
11782
|
1 |
|
''' |
11783
|
1 |
|
def __init__(self, binary=None): |
11784
|
1 |
|
if binary is not None: |
11785
|
1 |
|
self._binary_init(binary) |
11786
|
1 |
|
self._freeze = True |
11787
|
1 |
|
return |
11788
|
|
|
self.ClientHandle = 0 |
11789
|
1 |
|
self.EventFields = [] |
11790
|
|
|
self._freeze = True |
11791
|
1 |
|
|
11792
|
|
|
def to_binary(self): |
11793
|
1 |
|
packet = [] |
11794
|
1 |
|
packet.append(uatype_UInt32.pack(self.ClientHandle)) |
11795
|
1 |
|
packet.append(uatype_Int32.pack(len(self.EventFields))) |
11796
|
1 |
|
for fieldname in self.EventFields: |
11797
|
1 |
|
packet.append(fieldname.to_binary()) |
11798
|
1 |
|
return b''.join(packet) |
11799
|
1 |
|
|
11800
|
|
|
@staticmethod |
11801
|
1 |
|
def from_binary(data): |
11802
|
|
|
return EventFieldList(data) |
11803
|
|
|
|
11804
|
1 |
|
def _binary_init(self, data): |
11805
|
|
|
self.ClientHandle = uatype_UInt32.unpack(data.read(4))[0] |
11806
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11807
|
1 |
|
array = [] |
11808
|
|
|
if length != -1: |
11809
|
|
|
for _ in range(0, length): |
11810
|
|
|
array.append(Variant.from_binary(data)) |
11811
|
|
|
self.EventFields = array |
11812
|
|
|
|
11813
|
|
|
def __str__(self): |
11814
|
1 |
|
return 'EventFieldList(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ |
11815
|
1 |
|
'EventFields:' + str(self.EventFields) + ')' |
11816
|
1 |
|
|
11817
|
1 |
|
__repr__ = __str__ |
11818
|
1 |
|
|
11819
|
1 |
|
|
11820
|
1 |
|
class HistoryEventFieldList(FrozenClass): |
11821
|
1 |
|
''' |
11822
|
|
|
:ivar EventFields: |
11823
|
1 |
|
:vartype EventFields: Variant |
11824
|
1 |
|
''' |
11825
|
1 |
|
def __init__(self, binary=None): |
11826
|
1 |
|
if binary is not None: |
11827
|
1 |
|
self._binary_init(binary) |
11828
|
1 |
|
self._freeze = True |
11829
|
1 |
|
return |
11830
|
|
|
self.EventFields = [] |
11831
|
1 |
|
self._freeze = True |
11832
|
|
|
|
11833
|
1 |
|
def to_binary(self): |
11834
|
|
|
packet = [] |
11835
|
1 |
|
packet.append(uatype_Int32.pack(len(self.EventFields))) |
11836
|
1 |
|
for fieldname in self.EventFields: |
11837
|
1 |
|
packet.append(fieldname.to_binary()) |
11838
|
1 |
|
return b''.join(packet) |
11839
|
1 |
|
|
11840
|
1 |
|
@staticmethod |
11841
|
1 |
|
def from_binary(data): |
11842
|
1 |
|
return HistoryEventFieldList(data) |
11843
|
|
|
|
11844
|
1 |
|
def _binary_init(self, data): |
11845
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11846
|
|
|
array = [] |
11847
|
|
|
if length != -1: |
11848
|
1 |
|
for _ in range(0, length): |
11849
|
|
|
array.append(Variant.from_binary(data)) |
11850
|
|
|
self.EventFields = array |
11851
|
1 |
|
|
11852
|
|
|
def __str__(self): |
11853
|
|
|
return 'HistoryEventFieldList(' + 'EventFields:' + str(self.EventFields) + ')' |
11854
|
|
|
|
11855
|
|
|
__repr__ = __str__ |
11856
|
1 |
|
|
11857
|
|
|
|
11858
|
|
|
class StatusChangeNotification(FrozenClass): |
11859
|
|
|
''' |
11860
|
|
|
:ivar Status: |
11861
|
|
|
:vartype Status: StatusCode |
11862
|
|
|
:ivar DiagnosticInfo: |
11863
|
|
|
:vartype DiagnosticInfo: DiagnosticInfo |
11864
|
1 |
|
''' |
11865
|
|
|
def __init__(self, binary=None): |
11866
|
|
|
if binary is not None: |
11867
|
|
|
self._binary_init(binary) |
11868
|
|
|
self._freeze = True |
11869
|
|
|
return |
11870
|
|
|
self.Status = StatusCode() |
11871
|
1 |
|
self.DiagnosticInfo = DiagnosticInfo() |
11872
|
|
|
self._freeze = True |
11873
|
|
|
|
11874
|
|
|
def to_binary(self): |
11875
|
1 |
|
packet = [] |
11876
|
|
|
packet.append(self.Status.to_binary()) |
11877
|
|
|
packet.append(self.DiagnosticInfo.to_binary()) |
11878
|
|
|
return b''.join(packet) |
11879
|
|
|
|
11880
|
|
|
@staticmethod |
11881
|
|
|
def from_binary(data): |
11882
|
|
|
return StatusChangeNotification(data) |
11883
|
1 |
|
|
11884
|
|
|
def _binary_init(self, data): |
11885
|
|
|
self.Status = StatusCode.from_binary(data) |
11886
|
1 |
|
self.DiagnosticInfo = DiagnosticInfo.from_binary(data) |
11887
|
|
|
|
11888
|
|
|
def __str__(self): |
11889
|
1 |
|
return 'StatusChangeNotification(' + 'Status:' + str(self.Status) + ', ' + \ |
11890
|
|
|
'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')' |
11891
|
|
|
|
11892
|
|
|
__repr__ = __str__ |
11893
|
|
|
|
11894
|
|
|
|
11895
|
|
|
class SubscriptionAcknowledgement(FrozenClass): |
11896
|
1 |
|
''' |
11897
|
|
|
:ivar SubscriptionId: |
11898
|
|
|
:vartype SubscriptionId: UInt32 |
11899
|
|
|
:ivar SequenceNumber: |
11900
|
|
|
:vartype SequenceNumber: UInt32 |
11901
|
|
|
''' |
11902
|
|
|
def __init__(self, binary=None): |
11903
|
|
|
if binary is not None: |
11904
|
|
|
self._binary_init(binary) |
11905
|
1 |
|
self._freeze = True |
11906
|
|
|
return |
11907
|
|
|
self.SubscriptionId = 0 |
11908
|
|
|
self.SequenceNumber = 0 |
11909
|
|
|
self._freeze = True |
11910
|
|
|
|
11911
|
1 |
|
def to_binary(self): |
11912
|
|
|
packet = [] |
11913
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
11914
|
|
|
packet.append(uatype_UInt32.pack(self.SequenceNumber)) |
11915
|
1 |
|
return b''.join(packet) |
11916
|
|
|
|
11917
|
|
|
@staticmethod |
11918
|
|
|
def from_binary(data): |
11919
|
1 |
|
return SubscriptionAcknowledgement(data) |
11920
|
|
|
|
11921
|
|
|
def _binary_init(self, data): |
11922
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
11923
|
1 |
|
self.SequenceNumber = uatype_UInt32.unpack(data.read(4))[0] |
11924
|
|
|
|
11925
|
|
|
def __str__(self): |
11926
|
1 |
|
return 'SubscriptionAcknowledgement(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
11927
|
|
|
'SequenceNumber:' + str(self.SequenceNumber) + ')' |
11928
|
|
|
|
11929
|
|
|
__repr__ = __str__ |
11930
|
|
|
|
11931
|
|
|
|
11932
|
|
|
class PublishParameters(FrozenClass): |
11933
|
1 |
|
''' |
11934
|
1 |
|
:ivar SubscriptionAcknowledgements: |
11935
|
1 |
|
:vartype SubscriptionAcknowledgements: SubscriptionAcknowledgement |
11936
|
1 |
|
''' |
11937
|
1 |
|
def __init__(self, binary=None): |
11938
|
1 |
|
if binary is not None: |
11939
|
1 |
|
self._binary_init(binary) |
11940
|
1 |
|
self._freeze = True |
11941
|
|
|
return |
11942
|
1 |
|
self.SubscriptionAcknowledgements = [] |
11943
|
1 |
|
self._freeze = True |
11944
|
1 |
|
|
11945
|
1 |
|
def to_binary(self): |
11946
|
1 |
|
packet = [] |
11947
|
|
|
packet.append(uatype_Int32.pack(len(self.SubscriptionAcknowledgements))) |
11948
|
1 |
|
for fieldname in self.SubscriptionAcknowledgements: |
11949
|
|
|
packet.append(fieldname.to_binary()) |
11950
|
1 |
|
return b''.join(packet) |
11951
|
|
|
|
11952
|
1 |
|
@staticmethod |
11953
|
1 |
|
def from_binary(data): |
11954
|
1 |
|
return PublishParameters(data) |
11955
|
|
|
|
11956
|
1 |
|
def _binary_init(self, data): |
11957
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
11958
|
|
|
array = [] |
11959
|
|
|
if length != -1: |
11960
|
1 |
|
for _ in range(0, length): |
11961
|
|
|
array.append(SubscriptionAcknowledgement.from_binary(data)) |
11962
|
|
|
self.SubscriptionAcknowledgements = array |
11963
|
1 |
|
|
11964
|
|
|
def __str__(self): |
11965
|
|
|
return 'PublishParameters(' + 'SubscriptionAcknowledgements:' + str(self.SubscriptionAcknowledgements) + ')' |
11966
|
|
|
|
11967
|
|
|
__repr__ = __str__ |
11968
|
1 |
|
|
11969
|
1 |
|
|
11970
|
1 |
|
class PublishRequest(FrozenClass): |
11971
|
1 |
|
''' |
11972
|
1 |
|
:ivar TypeId: |
11973
|
1 |
|
:vartype TypeId: NodeId |
11974
|
1 |
|
:ivar RequestHeader: |
11975
|
|
|
:vartype RequestHeader: RequestHeader |
11976
|
1 |
|
:ivar Parameters: |
11977
|
1 |
|
:vartype Parameters: PublishParameters |
11978
|
1 |
|
''' |
11979
|
1 |
|
def __init__(self, binary=None): |
11980
|
1 |
|
if binary is not None: |
11981
|
1 |
|
self._binary_init(binary) |
11982
|
|
|
self._freeze = True |
11983
|
1 |
|
return |
11984
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary) |
11985
|
1 |
|
self.RequestHeader = RequestHeader() |
11986
|
|
|
self.Parameters = PublishParameters() |
11987
|
1 |
|
self._freeze = True |
11988
|
1 |
|
|
11989
|
1 |
|
def to_binary(self): |
11990
|
1 |
|
packet = [] |
11991
|
1 |
|
packet.append(self.TypeId.to_binary()) |
11992
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
11993
|
1 |
|
packet.append(self.Parameters.to_binary()) |
11994
|
|
|
return b''.join(packet) |
11995
|
1 |
|
|
11996
|
|
|
@staticmethod |
11997
|
|
|
def from_binary(data): |
11998
|
1 |
|
return PublishRequest(data) |
11999
|
|
|
|
12000
|
|
|
def _binary_init(self, data): |
12001
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12002
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
12003
|
|
|
self.Parameters = PublishParameters.from_binary(data) |
12004
|
|
|
|
12005
|
|
|
def __str__(self): |
12006
|
|
|
return 'PublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12007
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
12008
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12009
|
|
|
|
12010
|
1 |
|
__repr__ = __str__ |
12011
|
1 |
|
|
12012
|
|
|
|
12013
|
|
|
class PublishResult(FrozenClass): |
12014
|
|
|
''' |
12015
|
1 |
|
:ivar SubscriptionId: |
12016
|
1 |
|
:vartype SubscriptionId: UInt32 |
12017
|
1 |
|
:ivar AvailableSequenceNumbers: |
12018
|
1 |
|
:vartype AvailableSequenceNumbers: UInt32 |
12019
|
|
|
:ivar MoreNotifications: |
12020
|
1 |
|
:vartype MoreNotifications: Boolean |
12021
|
1 |
|
:ivar NotificationMessage: |
12022
|
1 |
|
:vartype NotificationMessage: NotificationMessage |
12023
|
1 |
|
:ivar Results: |
12024
|
1 |
|
:vartype Results: StatusCode |
12025
|
1 |
|
:ivar DiagnosticInfos: |
12026
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
12027
|
1 |
|
''' |
12028
|
|
|
def __init__(self, binary=None): |
12029
|
|
|
if binary is not None: |
12030
|
|
|
self._binary_init(binary) |
12031
|
1 |
|
self._freeze = True |
12032
|
|
|
return |
12033
|
|
|
self.SubscriptionId = 0 |
12034
|
|
|
self.AvailableSequenceNumbers = [] |
12035
|
|
|
self.MoreNotifications = True |
12036
|
1 |
|
self.NotificationMessage = NotificationMessage() |
12037
|
|
|
self.Results = [] |
12038
|
|
|
self.DiagnosticInfos = [] |
12039
|
|
|
self._freeze = True |
12040
|
|
|
|
12041
|
1 |
|
def to_binary(self): |
12042
|
|
|
packet = [] |
12043
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
12044
|
1 |
|
packet.append(uatype_Int32.pack(len(self.AvailableSequenceNumbers))) |
12045
|
|
|
for fieldname in self.AvailableSequenceNumbers: |
12046
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
12047
|
|
|
packet.append(uatype_Boolean.pack(self.MoreNotifications)) |
12048
|
|
|
packet.append(self.NotificationMessage.to_binary()) |
12049
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
12050
|
|
|
for fieldname in self.Results: |
12051
|
|
|
packet.append(fieldname.to_binary()) |
12052
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
12053
|
|
|
for fieldname in self.DiagnosticInfos: |
12054
|
|
|
packet.append(fieldname.to_binary()) |
12055
|
|
|
return b''.join(packet) |
12056
|
|
|
|
12057
|
|
|
@staticmethod |
12058
|
|
|
def from_binary(data): |
12059
|
1 |
|
return PublishResult(data) |
12060
|
1 |
|
|
12061
|
1 |
|
def _binary_init(self, data): |
12062
|
1 |
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
12063
|
1 |
|
self.AvailableSequenceNumbers = unpack_uatype_array('UInt32', data) |
12064
|
1 |
|
self.MoreNotifications = uatype_Boolean.unpack(data.read(1))[0] |
12065
|
1 |
|
self.NotificationMessage = NotificationMessage.from_binary(data) |
12066
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
12067
|
1 |
|
array = [] |
12068
|
1 |
|
if length != -1: |
12069
|
1 |
|
for _ in range(0, length): |
12070
|
1 |
|
array.append(StatusCode.from_binary(data)) |
12071
|
|
|
self.Results = array |
12072
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
12073
|
1 |
|
array = [] |
12074
|
1 |
|
if length != -1: |
12075
|
1 |
|
for _ in range(0, length): |
12076
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
12077
|
1 |
|
self.DiagnosticInfos = array |
12078
|
1 |
|
|
12079
|
1 |
|
def __str__(self): |
12080
|
1 |
|
return 'PublishResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
12081
|
1 |
|
'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ', ' + \ |
12082
|
|
|
'MoreNotifications:' + str(self.MoreNotifications) + ', ' + \ |
12083
|
1 |
|
'NotificationMessage:' + str(self.NotificationMessage) + ', ' + \ |
12084
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
12085
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
12086
|
1 |
|
|
12087
|
|
|
__repr__ = __str__ |
12088
|
1 |
|
|
12089
|
|
|
|
12090
|
1 |
|
class PublishResponse(FrozenClass): |
12091
|
|
|
''' |
12092
|
1 |
|
:ivar TypeId: |
12093
|
1 |
|
:vartype TypeId: NodeId |
12094
|
1 |
|
:ivar ResponseHeader: |
12095
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
12096
|
1 |
|
:ivar Parameters: |
12097
|
1 |
|
:vartype Parameters: PublishResult |
12098
|
1 |
|
''' |
12099
|
1 |
|
def __init__(self, binary=None): |
12100
|
1 |
|
if binary is not None: |
12101
|
|
|
self._binary_init(binary) |
12102
|
1 |
|
self._freeze = True |
12103
|
1 |
|
return |
12104
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary) |
12105
|
1 |
|
self.ResponseHeader = ResponseHeader() |
12106
|
1 |
|
self.Parameters = PublishResult() |
12107
|
|
|
self._freeze = True |
12108
|
1 |
|
|
12109
|
|
|
def to_binary(self): |
12110
|
1 |
|
packet = [] |
12111
|
|
|
packet.append(self.TypeId.to_binary()) |
12112
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
12113
|
|
|
packet.append(self.Parameters.to_binary()) |
12114
|
|
|
return b''.join(packet) |
12115
|
|
|
|
12116
|
|
|
@staticmethod |
12117
|
|
|
def from_binary(data): |
12118
|
1 |
|
return PublishResponse(data) |
12119
|
|
|
|
12120
|
|
|
def _binary_init(self, data): |
12121
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12122
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
12123
|
|
|
self.Parameters = PublishResult.from_binary(data) |
12124
|
|
|
|
12125
|
|
|
def __str__(self): |
12126
|
|
|
return 'PublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12127
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
12128
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12129
|
|
|
|
12130
|
1 |
|
__repr__ = __str__ |
12131
|
1 |
|
|
12132
|
1 |
|
|
12133
|
1 |
|
class RepublishParameters(FrozenClass): |
12134
|
1 |
|
''' |
12135
|
1 |
|
:ivar SubscriptionId: |
12136
|
1 |
|
:vartype SubscriptionId: UInt32 |
12137
|
1 |
|
:ivar RetransmitSequenceNumber: |
12138
|
1 |
|
:vartype RetransmitSequenceNumber: UInt32 |
12139
|
|
|
''' |
12140
|
1 |
|
def __init__(self, binary=None): |
12141
|
1 |
|
if binary is not None: |
12142
|
1 |
|
self._binary_init(binary) |
12143
|
1 |
|
self._freeze = True |
12144
|
1 |
|
return |
12145
|
1 |
|
self.SubscriptionId = 0 |
12146
|
|
|
self.RetransmitSequenceNumber = 0 |
12147
|
1 |
|
self._freeze = True |
12148
|
|
|
|
12149
|
1 |
|
def to_binary(self): |
12150
|
|
|
packet = [] |
12151
|
1 |
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
12152
|
1 |
|
packet.append(uatype_UInt32.pack(self.RetransmitSequenceNumber)) |
12153
|
1 |
|
return b''.join(packet) |
12154
|
1 |
|
|
12155
|
|
|
@staticmethod |
12156
|
1 |
|
def from_binary(data): |
12157
|
|
|
return RepublishParameters(data) |
12158
|
|
|
|
12159
|
|
|
def _binary_init(self, data): |
12160
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
12161
|
1 |
|
self.RetransmitSequenceNumber = uatype_UInt32.unpack(data.read(4))[0] |
12162
|
|
|
|
12163
|
|
|
def __str__(self): |
12164
|
1 |
|
return 'RepublishParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
12165
|
|
|
'RetransmitSequenceNumber:' + str(self.RetransmitSequenceNumber) + ')' |
12166
|
|
|
|
12167
|
|
|
__repr__ = __str__ |
12168
|
|
|
|
12169
|
|
|
|
12170
|
|
|
class RepublishRequest(FrozenClass): |
12171
|
1 |
|
''' |
12172
|
|
|
:ivar TypeId: |
12173
|
|
|
:vartype TypeId: NodeId |
12174
|
|
|
:ivar RequestHeader: |
12175
|
|
|
:vartype RequestHeader: RequestHeader |
12176
|
|
|
:ivar Parameters: |
12177
|
|
|
:vartype Parameters: RepublishParameters |
12178
|
|
|
''' |
12179
|
|
|
def __init__(self, binary=None): |
12180
|
1 |
|
if binary is not None: |
12181
|
|
|
self._binary_init(binary) |
12182
|
|
|
self._freeze = True |
12183
|
|
|
return |
12184
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary) |
12185
|
|
|
self.RequestHeader = RequestHeader() |
12186
|
1 |
|
self.Parameters = RepublishParameters() |
12187
|
|
|
self._freeze = True |
12188
|
|
|
|
12189
|
|
|
def to_binary(self): |
12190
|
1 |
|
packet = [] |
12191
|
|
|
packet.append(self.TypeId.to_binary()) |
12192
|
|
|
packet.append(self.RequestHeader.to_binary()) |
12193
|
|
|
packet.append(self.Parameters.to_binary()) |
12194
|
1 |
|
return b''.join(packet) |
12195
|
|
|
|
12196
|
|
|
@staticmethod |
12197
|
|
|
def from_binary(data): |
12198
|
1 |
|
return RepublishRequest(data) |
12199
|
|
|
|
12200
|
|
|
def _binary_init(self, data): |
12201
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12202
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
12203
|
|
|
self.Parameters = RepublishParameters.from_binary(data) |
12204
|
|
|
|
12205
|
|
|
def __str__(self): |
12206
|
|
|
return 'RepublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12207
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
12208
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12209
|
|
|
|
12210
|
1 |
|
__repr__ = __str__ |
12211
|
|
|
|
12212
|
|
|
|
12213
|
|
|
class RepublishResponse(FrozenClass): |
12214
|
|
|
''' |
12215
|
|
|
:ivar TypeId: |
12216
|
|
|
:vartype TypeId: NodeId |
12217
|
|
|
:ivar ResponseHeader: |
12218
|
|
|
:vartype ResponseHeader: ResponseHeader |
12219
|
|
|
:ivar NotificationMessage: |
12220
|
1 |
|
:vartype NotificationMessage: NotificationMessage |
12221
|
|
|
''' |
12222
|
|
|
def __init__(self, binary=None): |
12223
|
|
|
if binary is not None: |
12224
|
|
|
self._binary_init(binary) |
12225
|
|
|
self._freeze = True |
12226
|
|
|
return |
12227
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary) |
12228
|
|
|
self.ResponseHeader = ResponseHeader() |
12229
|
|
|
self.NotificationMessage = NotificationMessage() |
12230
|
|
|
self._freeze = True |
12231
|
1 |
|
|
12232
|
|
|
def to_binary(self): |
12233
|
|
|
packet = [] |
12234
|
|
|
packet.append(self.TypeId.to_binary()) |
12235
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
12236
|
1 |
|
packet.append(self.NotificationMessage.to_binary()) |
12237
|
|
|
return b''.join(packet) |
12238
|
|
|
|
12239
|
|
|
@staticmethod |
12240
|
|
|
def from_binary(data): |
12241
|
1 |
|
return RepublishResponse(data) |
12242
|
|
|
|
12243
|
|
|
def _binary_init(self, data): |
12244
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12245
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
12246
|
|
|
self.NotificationMessage = NotificationMessage.from_binary(data) |
12247
|
|
|
|
12248
|
|
|
def __str__(self): |
12249
|
|
|
return 'RepublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12250
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
12251
|
|
|
'NotificationMessage:' + str(self.NotificationMessage) + ')' |
12252
|
|
|
|
12253
|
1 |
|
__repr__ = __str__ |
12254
|
|
|
|
12255
|
|
|
|
12256
|
|
|
class TransferResult(FrozenClass): |
12257
|
|
|
''' |
12258
|
|
|
:ivar StatusCode: |
12259
|
|
|
:vartype StatusCode: StatusCode |
12260
|
|
|
:ivar AvailableSequenceNumbers: |
12261
|
|
|
:vartype AvailableSequenceNumbers: UInt32 |
12262
|
|
|
''' |
12263
|
1 |
|
def __init__(self, binary=None): |
12264
|
|
|
if binary is not None: |
12265
|
|
|
self._binary_init(binary) |
12266
|
|
|
self._freeze = True |
12267
|
|
|
return |
12268
|
|
|
self.StatusCode = StatusCode() |
12269
|
|
|
self.AvailableSequenceNumbers = [] |
12270
|
1 |
|
self._freeze = True |
12271
|
|
|
|
12272
|
|
|
def to_binary(self): |
12273
|
|
|
packet = [] |
12274
|
1 |
|
packet.append(self.StatusCode.to_binary()) |
12275
|
|
|
packet.append(uatype_Int32.pack(len(self.AvailableSequenceNumbers))) |
12276
|
|
|
for fieldname in self.AvailableSequenceNumbers: |
12277
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
12278
|
|
|
return b''.join(packet) |
12279
|
1 |
|
|
12280
|
|
|
@staticmethod |
12281
|
|
|
def from_binary(data): |
12282
|
|
|
return TransferResult(data) |
12283
|
|
|
|
12284
|
1 |
|
def _binary_init(self, data): |
12285
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
12286
|
|
|
self.AvailableSequenceNumbers = unpack_uatype_array('UInt32', data) |
12287
|
1 |
|
|
12288
|
|
|
def __str__(self): |
12289
|
|
|
return 'TransferResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
12290
|
|
|
'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ')' |
12291
|
|
|
|
12292
|
|
|
__repr__ = __str__ |
12293
|
|
|
|
12294
|
1 |
|
|
12295
|
|
|
class TransferSubscriptionsParameters(FrozenClass): |
12296
|
|
|
''' |
12297
|
|
|
:ivar SubscriptionIds: |
12298
|
|
|
:vartype SubscriptionIds: UInt32 |
12299
|
|
|
:ivar SendInitialValues: |
12300
|
|
|
:vartype SendInitialValues: Boolean |
12301
|
|
|
''' |
12302
|
|
|
def __init__(self, binary=None): |
12303
|
1 |
|
if binary is not None: |
12304
|
|
|
self._binary_init(binary) |
12305
|
|
|
self._freeze = True |
12306
|
|
|
return |
12307
|
|
|
self.SubscriptionIds = [] |
12308
|
|
|
self.SendInitialValues = True |
12309
|
|
|
self._freeze = True |
12310
|
|
|
|
12311
|
1 |
|
def to_binary(self): |
12312
|
|
|
packet = [] |
12313
|
|
|
packet.append(uatype_Int32.pack(len(self.SubscriptionIds))) |
12314
|
|
|
for fieldname in self.SubscriptionIds: |
12315
|
1 |
|
packet.append(uatype_UInt32.pack(fieldname)) |
12316
|
|
|
packet.append(uatype_Boolean.pack(self.SendInitialValues)) |
12317
|
|
|
return b''.join(packet) |
12318
|
|
|
|
12319
|
1 |
|
@staticmethod |
12320
|
|
|
def from_binary(data): |
12321
|
|
|
return TransferSubscriptionsParameters(data) |
12322
|
|
|
|
12323
|
1 |
|
def _binary_init(self, data): |
12324
|
|
|
self.SubscriptionIds = unpack_uatype_array('UInt32', data) |
12325
|
|
|
self.SendInitialValues = uatype_Boolean.unpack(data.read(1))[0] |
12326
|
1 |
|
|
12327
|
|
|
def __str__(self): |
12328
|
|
|
return 'TransferSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ', ' + \ |
12329
|
|
|
'SendInitialValues:' + str(self.SendInitialValues) + ')' |
12330
|
|
|
|
12331
|
|
|
__repr__ = __str__ |
12332
|
|
|
|
12333
|
1 |
|
|
12334
|
|
|
class TransferSubscriptionsRequest(FrozenClass): |
12335
|
|
|
''' |
12336
|
|
|
:ivar TypeId: |
12337
|
|
|
:vartype TypeId: NodeId |
12338
|
|
|
:ivar RequestHeader: |
12339
|
|
|
:vartype RequestHeader: RequestHeader |
12340
|
|
|
:ivar Parameters: |
12341
|
|
|
:vartype Parameters: TransferSubscriptionsParameters |
12342
|
1 |
|
''' |
12343
|
|
|
def __init__(self, binary=None): |
12344
|
|
|
if binary is not None: |
12345
|
|
|
self._binary_init(binary) |
12346
|
|
|
self._freeze = True |
12347
|
|
|
return |
12348
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary) |
12349
|
|
|
self.RequestHeader = RequestHeader() |
12350
|
1 |
|
self.Parameters = TransferSubscriptionsParameters() |
12351
|
|
|
self._freeze = True |
12352
|
|
|
|
12353
|
|
|
def to_binary(self): |
12354
|
1 |
|
packet = [] |
12355
|
|
|
packet.append(self.TypeId.to_binary()) |
12356
|
|
|
packet.append(self.RequestHeader.to_binary()) |
12357
|
|
|
packet.append(self.Parameters.to_binary()) |
12358
|
1 |
|
return b''.join(packet) |
12359
|
|
|
|
12360
|
|
|
@staticmethod |
12361
|
|
|
def from_binary(data): |
12362
|
1 |
|
return TransferSubscriptionsRequest(data) |
12363
|
|
|
|
12364
|
|
|
def _binary_init(self, data): |
12365
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12366
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
12367
|
|
|
self.Parameters = TransferSubscriptionsParameters.from_binary(data) |
12368
|
|
|
|
12369
|
|
|
def __str__(self): |
12370
|
|
|
return 'TransferSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12371
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
12372
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12373
|
|
|
|
12374
|
1 |
|
__repr__ = __str__ |
12375
|
|
|
|
12376
|
|
|
|
12377
|
|
|
class TransferSubscriptionsResult(FrozenClass): |
12378
|
|
|
''' |
12379
|
|
|
:ivar Results: |
12380
|
|
|
:vartype Results: TransferResult |
12381
|
|
|
:ivar DiagnosticInfos: |
12382
|
|
|
:vartype DiagnosticInfos: DiagnosticInfo |
12383
|
|
|
''' |
12384
|
1 |
|
def __init__(self, binary=None): |
12385
|
|
|
if binary is not None: |
12386
|
|
|
self._binary_init(binary) |
12387
|
|
|
self._freeze = True |
12388
|
|
|
return |
12389
|
|
|
self.Results = [] |
12390
|
|
|
self.DiagnosticInfos = [] |
12391
|
1 |
|
self._freeze = True |
12392
|
|
|
|
12393
|
|
|
def to_binary(self): |
12394
|
|
|
packet = [] |
12395
|
1 |
|
packet.append(uatype_Int32.pack(len(self.Results))) |
12396
|
|
|
for fieldname in self.Results: |
12397
|
|
|
packet.append(fieldname.to_binary()) |
12398
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
12399
|
|
|
for fieldname in self.DiagnosticInfos: |
12400
|
1 |
|
packet.append(fieldname.to_binary()) |
12401
|
|
|
return b''.join(packet) |
12402
|
|
|
|
12403
|
|
|
@staticmethod |
12404
|
|
|
def from_binary(data): |
12405
|
1 |
|
return TransferSubscriptionsResult(data) |
12406
|
|
|
|
12407
|
|
|
def _binary_init(self, data): |
12408
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
12409
|
|
|
array = [] |
12410
|
|
|
if length != -1: |
12411
|
|
|
for _ in range(0, length): |
12412
|
|
|
array.append(TransferResult.from_binary(data)) |
12413
|
|
|
self.Results = array |
12414
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
12415
|
1 |
|
array = [] |
12416
|
|
|
if length != -1: |
12417
|
|
|
for _ in range(0, length): |
12418
|
|
|
array.append(DiagnosticInfo.from_binary(data)) |
12419
|
|
|
self.DiagnosticInfos = array |
12420
|
|
|
|
12421
|
|
|
def __str__(self): |
12422
|
|
|
return 'TransferSubscriptionsResult(' + 'Results:' + str(self.Results) + ', ' + \ |
12423
|
|
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
12424
|
1 |
|
|
12425
|
|
|
__repr__ = __str__ |
12426
|
|
|
|
12427
|
|
|
|
12428
|
|
|
class TransferSubscriptionsResponse(FrozenClass): |
12429
|
|
|
''' |
12430
|
|
|
:ivar TypeId: |
12431
|
|
|
:vartype TypeId: NodeId |
12432
|
|
|
:ivar ResponseHeader: |
12433
|
|
|
:vartype ResponseHeader: ResponseHeader |
12434
|
1 |
|
:ivar Parameters: |
12435
|
|
|
:vartype Parameters: TransferSubscriptionsResult |
12436
|
|
|
''' |
12437
|
|
|
def __init__(self, binary=None): |
12438
|
1 |
|
if binary is not None: |
12439
|
|
|
self._binary_init(binary) |
12440
|
|
|
self._freeze = True |
12441
|
|
|
return |
12442
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary) |
12443
|
|
|
self.ResponseHeader = ResponseHeader() |
12444
|
|
|
self.Parameters = TransferSubscriptionsResult() |
12445
|
|
|
self._freeze = True |
12446
|
|
|
|
12447
|
|
|
def to_binary(self): |
12448
|
|
|
packet = [] |
12449
|
|
|
packet.append(self.TypeId.to_binary()) |
12450
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
12451
|
|
|
packet.append(self.Parameters.to_binary()) |
12452
|
1 |
|
return b''.join(packet) |
12453
|
|
|
|
12454
|
|
|
@staticmethod |
12455
|
|
|
def from_binary(data): |
12456
|
1 |
|
return TransferSubscriptionsResponse(data) |
12457
|
|
|
|
12458
|
|
|
def _binary_init(self, data): |
12459
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12460
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
12461
|
|
|
self.Parameters = TransferSubscriptionsResult.from_binary(data) |
12462
|
|
|
|
12463
|
|
|
def __str__(self): |
12464
|
|
|
return 'TransferSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12465
|
|
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
12466
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12467
|
|
|
|
12468
|
1 |
|
__repr__ = __str__ |
12469
|
|
|
|
12470
|
|
|
|
12471
|
|
|
class DeleteSubscriptionsParameters(FrozenClass): |
12472
|
|
|
''' |
12473
|
|
|
:ivar SubscriptionIds: |
12474
|
|
|
:vartype SubscriptionIds: UInt32 |
12475
|
|
|
''' |
12476
|
|
|
def __init__(self, binary=None): |
12477
|
|
|
if binary is not None: |
12478
|
1 |
|
self._binary_init(binary) |
12479
|
|
|
self._freeze = True |
12480
|
|
|
return |
12481
|
|
|
self.SubscriptionIds = [] |
12482
|
|
|
self._freeze = True |
12483
|
|
|
|
12484
|
|
|
def to_binary(self): |
12485
|
1 |
|
packet = [] |
12486
|
|
|
packet.append(uatype_Int32.pack(len(self.SubscriptionIds))) |
12487
|
|
|
for fieldname in self.SubscriptionIds: |
12488
|
|
|
packet.append(uatype_UInt32.pack(fieldname)) |
12489
|
1 |
|
return b''.join(packet) |
12490
|
|
|
|
12491
|
|
|
@staticmethod |
12492
|
|
|
def from_binary(data): |
12493
|
|
|
return DeleteSubscriptionsParameters(data) |
12494
|
1 |
|
|
12495
|
|
|
def _binary_init(self, data): |
12496
|
|
|
self.SubscriptionIds = unpack_uatype_array('UInt32', data) |
12497
|
|
|
|
12498
|
|
|
def __str__(self): |
12499
|
1 |
|
return 'DeleteSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ')' |
12500
|
|
|
|
12501
|
|
|
__repr__ = __str__ |
12502
|
1 |
|
|
12503
|
|
|
|
12504
|
|
|
class DeleteSubscriptionsRequest(FrozenClass): |
12505
|
|
|
''' |
12506
|
|
|
:ivar TypeId: |
12507
|
1 |
|
:vartype TypeId: NodeId |
12508
|
1 |
|
:ivar RequestHeader: |
12509
|
1 |
|
:vartype RequestHeader: RequestHeader |
12510
|
1 |
|
:ivar Parameters: |
12511
|
1 |
|
:vartype Parameters: DeleteSubscriptionsParameters |
12512
|
1 |
|
''' |
12513
|
1 |
|
def __init__(self, binary=None): |
12514
|
|
|
if binary is not None: |
12515
|
1 |
|
self._binary_init(binary) |
12516
|
1 |
|
self._freeze = True |
12517
|
1 |
|
return |
12518
|
1 |
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary) |
12519
|
1 |
|
self.RequestHeader = RequestHeader() |
12520
|
1 |
|
self.Parameters = DeleteSubscriptionsParameters() |
12521
|
|
|
self._freeze = True |
12522
|
1 |
|
|
12523
|
|
|
def to_binary(self): |
12524
|
1 |
|
packet = [] |
12525
|
|
|
packet.append(self.TypeId.to_binary()) |
12526
|
1 |
|
packet.append(self.RequestHeader.to_binary()) |
12527
|
1 |
|
packet.append(self.Parameters.to_binary()) |
12528
|
|
|
return b''.join(packet) |
12529
|
1 |
|
|
12530
|
|
|
@staticmethod |
12531
|
|
|
def from_binary(data): |
12532
|
1 |
|
return DeleteSubscriptionsRequest(data) |
12533
|
|
|
|
12534
|
|
|
def _binary_init(self, data): |
12535
|
1 |
|
self.TypeId = NodeId.from_binary(data) |
12536
|
|
|
self.RequestHeader = RequestHeader.from_binary(data) |
12537
|
|
|
self.Parameters = DeleteSubscriptionsParameters.from_binary(data) |
12538
|
|
|
|
12539
|
|
|
def __str__(self): |
12540
|
|
|
return 'DeleteSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12541
|
|
|
'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
12542
|
|
|
'Parameters:' + str(self.Parameters) + ')' |
12543
|
|
|
|
12544
|
1 |
|
__repr__ = __str__ |
12545
|
1 |
|
|
12546
|
|
|
|
12547
|
|
|
class DeleteSubscriptionsResponse(FrozenClass): |
12548
|
|
|
''' |
12549
|
1 |
|
:ivar TypeId: |
12550
|
1 |
|
:vartype TypeId: NodeId |
12551
|
1 |
|
:ivar ResponseHeader: |
12552
|
1 |
|
:vartype ResponseHeader: ResponseHeader |
12553
|
|
|
:ivar Results: |
12554
|
1 |
|
:vartype Results: StatusCode |
12555
|
1 |
|
:ivar DiagnosticInfos: |
12556
|
1 |
|
:vartype DiagnosticInfos: DiagnosticInfo |
12557
|
1 |
|
''' |
12558
|
1 |
|
def __init__(self, binary=None): |
12559
|
1 |
|
if binary is not None: |
12560
|
|
|
self._binary_init(binary) |
12561
|
1 |
|
self._freeze = True |
12562
|
|
|
return |
12563
|
|
|
self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary) |
12564
|
|
|
self.ResponseHeader = ResponseHeader() |
12565
|
1 |
|
self.Results = [] |
12566
|
|
|
self.DiagnosticInfos = [] |
12567
|
|
|
self._freeze = True |
12568
|
|
|
|
12569
|
|
|
def to_binary(self): |
12570
|
1 |
|
packet = [] |
12571
|
|
|
packet.append(self.TypeId.to_binary()) |
12572
|
|
|
packet.append(self.ResponseHeader.to_binary()) |
12573
|
|
|
packet.append(uatype_Int32.pack(len(self.Results))) |
12574
|
|
|
for fieldname in self.Results: |
12575
|
1 |
|
packet.append(fieldname.to_binary()) |
12576
|
|
|
packet.append(uatype_Int32.pack(len(self.DiagnosticInfos))) |
12577
|
|
|
for fieldname in self.DiagnosticInfos: |
12578
|
1 |
|
packet.append(fieldname.to_binary()) |
12579
|
|
|
return b''.join(packet) |
12580
|
|
|
|
12581
|
|
|
@staticmethod |
12582
|
|
|
def from_binary(data): |
12583
|
|
|
return DeleteSubscriptionsResponse(data) |
12584
|
|
|
|
12585
|
|
|
def _binary_init(self, data): |
12586
|
|
|
self.TypeId = NodeId.from_binary(data) |
12587
|
|
|
self.ResponseHeader = ResponseHeader.from_binary(data) |
12588
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
12589
|
1 |
|
array = [] |
12590
|
1 |
|
if length != -1: |
12591
|
1 |
|
for _ in range(0, length): |
12592
|
1 |
|
array.append(StatusCode.from_binary(data)) |
12593
|
1 |
|
self.Results = array |
12594
|
1 |
|
length = uatype_Int32.unpack(data.read(4))[0] |
12595
|
1 |
|
array = [] |
12596
|
1 |
|
if length != -1: |
12597
|
1 |
|
for _ in range(0, length): |
12598
|
1 |
|
array.append(DiagnosticInfo.from_binary(data)) |
12599
|
|
|
self.DiagnosticInfos = array |
12600
|
1 |
|
|
12601
|
1 |
|
def __str__(self): |
12602
|
1 |
|
return 'DeleteSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
12603
|
1 |
|
'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
12604
|
1 |
|
'Results:' + str(self.Results) + ', ' + \ |
12605
|
1 |
|
'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' |
12606
|
1 |
|
|
12607
|
1 |
|
__repr__ = __str__ |
12608
|
1 |
|
|
12609
|
|
|
|
12610
|
1 |
|
class BuildInfo(FrozenClass): |
12611
|
|
|
''' |
12612
|
1 |
|
:ivar ProductUri: |
12613
|
|
|
:vartype ProductUri: String |
12614
|
1 |
|
:ivar ManufacturerName: |
12615
|
|
|
:vartype ManufacturerName: String |
12616
|
1 |
|
:ivar ProductName: |
12617
|
1 |
|
:vartype ProductName: String |
12618
|
1 |
|
:ivar SoftwareVersion: |
12619
|
1 |
|
:vartype SoftwareVersion: String |
12620
|
1 |
|
:ivar BuildNumber: |
12621
|
1 |
|
:vartype BuildNumber: String |
12622
|
1 |
|
:ivar BuildDate: |
12623
|
1 |
|
:vartype BuildDate: DateTime |
12624
|
1 |
|
''' |
12625
|
1 |
|
def __init__(self, binary=None): |
12626
|
1 |
|
if binary is not None: |
12627
|
1 |
|
self._binary_init(binary) |
12628
|
1 |
|
self._freeze = True |
12629
|
|
|
return |
12630
|
1 |
|
self.ProductUri = '' |
12631
|
|
|
self.ManufacturerName = '' |
12632
|
1 |
|
self.ProductName = '' |
12633
|
|
|
self.SoftwareVersion = '' |
12634
|
|
|
self.BuildNumber = '' |
12635
|
|
|
self.BuildDate = datetime.now() |
12636
|
|
|
self._freeze = True |
12637
|
|
|
|
12638
|
1 |
|
def to_binary(self): |
12639
|
|
|
packet = [] |
12640
|
|
|
packet.append(pack_string(self.ProductUri)) |
12641
|
1 |
|
packet.append(pack_string(self.ManufacturerName)) |
12642
|
|
|
packet.append(pack_string(self.ProductName)) |
12643
|
|
|
packet.append(pack_string(self.SoftwareVersion)) |
12644
|
|
|
packet.append(pack_string(self.BuildNumber)) |
12645
|
|
|
packet.append(pack_datetime(self.BuildDate)) |
12646
|
|
|
return b''.join(packet) |
12647
|
|
|
|
12648
|
|
|
@staticmethod |
12649
|
|
|
def from_binary(data): |
12650
|
|
|
return BuildInfo(data) |
12651
|
|
|
|
12652
|
|
|
def _binary_init(self, data): |
12653
|
|
|
self.ProductUri = unpack_string(data) |
12654
|
|
|
self.ManufacturerName = unpack_string(data) |
12655
|
|
|
self.ProductName = unpack_string(data) |
12656
|
1 |
|
self.SoftwareVersion = unpack_string(data) |
12657
|
|
|
self.BuildNumber = unpack_string(data) |
12658
|
|
|
self.BuildDate = unpack_datetime(data) |
12659
|
|
|
|
12660
|
|
|
def __str__(self): |
12661
|
|
|
return 'BuildInfo(' + 'ProductUri:' + str(self.ProductUri) + ', ' + \ |
12662
|
|
|
'ManufacturerName:' + str(self.ManufacturerName) + ', ' + \ |
12663
|
|
|
'ProductName:' + str(self.ProductName) + ', ' + \ |
12664
|
|
|
'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \ |
12665
|
|
|
'BuildNumber:' + str(self.BuildNumber) + ', ' + \ |
12666
|
|
|
'BuildDate:' + str(self.BuildDate) + ')' |
12667
|
|
|
|
12668
|
|
|
__repr__ = __str__ |
12669
|
1 |
|
|
12670
|
|
|
|
12671
|
|
|
class RedundantServerDataType(FrozenClass): |
12672
|
|
|
''' |
12673
|
|
|
:ivar ServerId: |
12674
|
|
|
:vartype ServerId: String |
12675
|
|
|
:ivar ServiceLevel: |
12676
|
|
|
:vartype ServiceLevel: Byte |
12677
|
|
|
:ivar ServerState: |
12678
|
|
|
:vartype ServerState: ServerState |
12679
|
1 |
|
''' |
12680
|
|
|
def __init__(self, binary=None): |
12681
|
|
|
if binary is not None: |
12682
|
|
|
self._binary_init(binary) |
12683
|
1 |
|
self._freeze = True |
12684
|
|
|
return |
12685
|
|
|
self.ServerId = '' |
12686
|
|
|
self.ServiceLevel = 0 |
12687
|
|
|
self.ServerState = ServerState(0) |
12688
|
|
|
self._freeze = True |
12689
|
|
|
|
12690
|
|
|
def to_binary(self): |
12691
|
1 |
|
packet = [] |
12692
|
|
|
packet.append(pack_string(self.ServerId)) |
12693
|
|
|
packet.append(uatype_Byte.pack(self.ServiceLevel)) |
12694
|
|
|
packet.append(uatype_UInt32.pack(self.ServerState.value)) |
12695
|
|
|
return b''.join(packet) |
12696
|
|
|
|
12697
|
|
|
@staticmethod |
12698
|
|
|
def from_binary(data): |
12699
|
1 |
|
return RedundantServerDataType(data) |
12700
|
|
|
|
12701
|
|
|
def _binary_init(self, data): |
12702
|
1 |
|
self.ServerId = unpack_string(data) |
12703
|
|
|
self.ServiceLevel = uatype_Byte.unpack(data.read(1))[0] |
12704
|
|
|
self.ServerState = ServerState(uatype_UInt32.unpack(data.read(4))[0]) |
12705
|
|
|
|
12706
|
|
|
def __str__(self): |
12707
|
|
|
return 'RedundantServerDataType(' + 'ServerId:' + str(self.ServerId) + ', ' + \ |
12708
|
|
|
'ServiceLevel:' + str(self.ServiceLevel) + ', ' + \ |
12709
|
|
|
'ServerState:' + str(self.ServerState) + ')' |
12710
|
|
|
|
12711
|
1 |
|
__repr__ = __str__ |
12712
|
|
|
|
12713
|
|
|
|
12714
|
|
|
class EndpointUrlListDataType(FrozenClass): |
12715
|
|
|
''' |
12716
|
|
|
:ivar EndpointUrlList: |
12717
|
|
|
:vartype EndpointUrlList: String |
12718
|
|
|
''' |
12719
|
|
|
def __init__(self, binary=None): |
12720
|
|
|
if binary is not None: |
12721
|
1 |
|
self._binary_init(binary) |
12722
|
|
|
self._freeze = True |
12723
|
|
|
return |
12724
|
|
|
self.EndpointUrlList = [] |
12725
|
|
|
self._freeze = True |
12726
|
|
|
|
12727
|
|
|
def to_binary(self): |
12728
|
1 |
|
packet = [] |
12729
|
|
|
packet.append(uatype_Int32.pack(len(self.EndpointUrlList))) |
12730
|
|
|
for fieldname in self.EndpointUrlList: |
12731
|
|
|
packet.append(pack_string(fieldname)) |
12732
|
1 |
|
return b''.join(packet) |
12733
|
|
|
|
12734
|
|
|
@staticmethod |
12735
|
|
|
def from_binary(data): |
12736
|
|
|
return EndpointUrlListDataType(data) |
12737
|
1 |
|
|
12738
|
|
|
def _binary_init(self, data): |
12739
|
|
|
self.EndpointUrlList = unpack_uatype_array('String', data) |
12740
|
|
|
|
12741
|
|
|
def __str__(self): |
12742
|
1 |
|
return 'EndpointUrlListDataType(' + 'EndpointUrlList:' + str(self.EndpointUrlList) + ')' |
12743
|
|
|
|
12744
|
|
|
__repr__ = __str__ |
12745
|
1 |
|
|
12746
|
|
|
|
12747
|
|
|
class NetworkGroupDataType(FrozenClass): |
12748
|
|
|
''' |
12749
|
|
|
:ivar ServerUri: |
12750
|
1 |
|
:vartype ServerUri: String |
12751
|
|
|
:ivar NetworkPaths: |
12752
|
|
|
:vartype NetworkPaths: EndpointUrlListDataType |
12753
|
|
|
''' |
12754
|
|
|
def __init__(self, binary=None): |
12755
|
|
|
if binary is not None: |
12756
|
|
|
self._binary_init(binary) |
12757
|
|
|
self._freeze = True |
12758
|
1 |
|
return |
12759
|
|
|
self.ServerUri = '' |
12760
|
|
|
self.NetworkPaths = [] |
12761
|
|
|
self._freeze = True |
12762
|
|
|
|
12763
|
|
|
def to_binary(self): |
12764
|
|
|
packet = [] |
12765
|
1 |
|
packet.append(pack_string(self.ServerUri)) |
12766
|
|
|
packet.append(uatype_Int32.pack(len(self.NetworkPaths))) |
12767
|
|
|
for fieldname in self.NetworkPaths: |
12768
|
|
|
packet.append(fieldname.to_binary()) |
12769
|
1 |
|
return b''.join(packet) |
12770
|
|
|
|
12771
|
|
|
@staticmethod |
12772
|
1 |
|
def from_binary(data): |
12773
|
|
|
return NetworkGroupDataType(data) |
12774
|
|
|
|
12775
|
1 |
|
def _binary_init(self, data): |
12776
|
|
|
self.ServerUri = unpack_string(data) |
12777
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
12778
|
1 |
|
array = [] |
12779
|
|
|
if length != -1: |
12780
|
|
|
for _ in range(0, length): |
12781
|
|
|
array.append(EndpointUrlListDataType.from_binary(data)) |
12782
|
|
|
self.NetworkPaths = array |
12783
|
|
|
|
12784
|
|
|
def __str__(self): |
12785
|
1 |
|
return 'NetworkGroupDataType(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \ |
12786
|
|
|
'NetworkPaths:' + str(self.NetworkPaths) + ')' |
12787
|
|
|
|
12788
|
|
|
__repr__ = __str__ |
12789
|
|
|
|
12790
|
|
|
|
12791
|
|
|
class SamplingIntervalDiagnosticsDataType(FrozenClass): |
12792
|
|
|
''' |
12793
|
|
|
:ivar SamplingInterval: |
12794
|
1 |
|
:vartype SamplingInterval: Double |
12795
|
|
|
:ivar MonitoredItemCount: |
12796
|
|
|
:vartype MonitoredItemCount: UInt32 |
12797
|
|
|
:ivar MaxMonitoredItemCount: |
12798
|
|
|
:vartype MaxMonitoredItemCount: UInt32 |
12799
|
|
|
:ivar DisabledMonitoredItemCount: |
12800
|
|
|
:vartype DisabledMonitoredItemCount: UInt32 |
12801
|
|
|
''' |
12802
|
1 |
|
def __init__(self, binary=None): |
12803
|
|
|
if binary is not None: |
12804
|
|
|
self._binary_init(binary) |
12805
|
|
|
self._freeze = True |
12806
|
1 |
|
return |
12807
|
|
|
self.SamplingInterval = 0 |
12808
|
|
|
self.MonitoredItemCount = 0 |
12809
|
|
|
self.MaxMonitoredItemCount = 0 |
12810
|
|
|
self.DisabledMonitoredItemCount = 0 |
12811
|
|
|
self._freeze = True |
12812
|
|
|
|
12813
|
|
|
def to_binary(self): |
12814
|
|
|
packet = [] |
12815
|
1 |
|
packet.append(uatype_Double.pack(self.SamplingInterval)) |
12816
|
|
|
packet.append(uatype_UInt32.pack(self.MonitoredItemCount)) |
12817
|
|
|
packet.append(uatype_UInt32.pack(self.MaxMonitoredItemCount)) |
12818
|
|
|
packet.append(uatype_UInt32.pack(self.DisabledMonitoredItemCount)) |
12819
|
1 |
|
return b''.join(packet) |
12820
|
|
|
|
12821
|
|
|
@staticmethod |
12822
|
1 |
|
def from_binary(data): |
12823
|
|
|
return SamplingIntervalDiagnosticsDataType(data) |
12824
|
|
|
|
12825
|
|
|
def _binary_init(self, data): |
12826
|
|
|
self.SamplingInterval = uatype_Double.unpack(data.read(8))[0] |
12827
|
|
|
self.MonitoredItemCount = uatype_UInt32.unpack(data.read(4))[0] |
12828
|
|
|
self.MaxMonitoredItemCount = uatype_UInt32.unpack(data.read(4))[0] |
12829
|
|
|
self.DisabledMonitoredItemCount = uatype_UInt32.unpack(data.read(4))[0] |
12830
|
|
|
|
12831
|
|
|
def __str__(self): |
12832
|
|
|
return 'SamplingIntervalDiagnosticsDataType(' + 'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \ |
12833
|
1 |
|
'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \ |
12834
|
|
|
'MaxMonitoredItemCount:' + str(self.MaxMonitoredItemCount) + ', ' + \ |
12835
|
|
|
'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ')' |
12836
|
|
|
|
12837
|
|
|
__repr__ = __str__ |
12838
|
|
|
|
12839
|
|
|
|
12840
|
|
|
class ServerDiagnosticsSummaryDataType(FrozenClass): |
12841
|
|
|
''' |
12842
|
|
|
:ivar ServerViewCount: |
12843
|
|
|
:vartype ServerViewCount: UInt32 |
12844
|
1 |
|
:ivar CurrentSessionCount: |
12845
|
|
|
:vartype CurrentSessionCount: UInt32 |
12846
|
|
|
:ivar CumulatedSessionCount: |
12847
|
|
|
:vartype CumulatedSessionCount: UInt32 |
12848
|
|
|
:ivar SecurityRejectedSessionCount: |
12849
|
|
|
:vartype SecurityRejectedSessionCount: UInt32 |
12850
|
|
|
:ivar RejectedSessionCount: |
12851
|
|
|
:vartype RejectedSessionCount: UInt32 |
12852
|
1 |
|
:ivar SessionTimeoutCount: |
12853
|
|
|
:vartype SessionTimeoutCount: UInt32 |
12854
|
|
|
:ivar SessionAbortCount: |
12855
|
|
|
:vartype SessionAbortCount: UInt32 |
12856
|
1 |
|
:ivar CurrentSubscriptionCount: |
12857
|
|
|
:vartype CurrentSubscriptionCount: UInt32 |
12858
|
|
|
:ivar CumulatedSubscriptionCount: |
12859
|
|
|
:vartype CumulatedSubscriptionCount: UInt32 |
12860
|
|
|
:ivar PublishingIntervalCount: |
12861
|
|
|
:vartype PublishingIntervalCount: UInt32 |
12862
|
1 |
|
:ivar SecurityRejectedRequestsCount: |
12863
|
|
|
:vartype SecurityRejectedRequestsCount: UInt32 |
12864
|
|
|
:ivar RejectedRequestsCount: |
12865
|
|
|
:vartype RejectedRequestsCount: UInt32 |
12866
|
|
|
''' |
12867
|
|
|
def __init__(self, binary=None): |
12868
|
1 |
|
if binary is not None: |
12869
|
|
|
self._binary_init(binary) |
12870
|
|
|
self._freeze = True |
12871
|
1 |
|
return |
12872
|
|
|
self.ServerViewCount = 0 |
12873
|
|
|
self.CurrentSessionCount = 0 |
12874
|
|
|
self.CumulatedSessionCount = 0 |
12875
|
|
|
self.SecurityRejectedSessionCount = 0 |
12876
|
|
|
self.RejectedSessionCount = 0 |
12877
|
|
|
self.SessionTimeoutCount = 0 |
12878
|
|
|
self.SessionAbortCount = 0 |
12879
|
|
|
self.CurrentSubscriptionCount = 0 |
12880
|
|
|
self.CumulatedSubscriptionCount = 0 |
12881
|
|
|
self.PublishingIntervalCount = 0 |
12882
|
|
|
self.SecurityRejectedRequestsCount = 0 |
12883
|
|
|
self.RejectedRequestsCount = 0 |
12884
|
|
|
self._freeze = True |
12885
|
|
|
|
12886
|
|
|
def to_binary(self): |
12887
|
|
|
packet = [] |
12888
|
|
|
packet.append(uatype_UInt32.pack(self.ServerViewCount)) |
12889
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentSessionCount)) |
12890
|
|
|
packet.append(uatype_UInt32.pack(self.CumulatedSessionCount)) |
12891
|
|
|
packet.append(uatype_UInt32.pack(self.SecurityRejectedSessionCount)) |
12892
|
|
|
packet.append(uatype_UInt32.pack(self.RejectedSessionCount)) |
12893
|
|
|
packet.append(uatype_UInt32.pack(self.SessionTimeoutCount)) |
12894
|
|
|
packet.append(uatype_UInt32.pack(self.SessionAbortCount)) |
12895
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentSubscriptionCount)) |
12896
|
|
|
packet.append(uatype_UInt32.pack(self.CumulatedSubscriptionCount)) |
12897
|
|
|
packet.append(uatype_UInt32.pack(self.PublishingIntervalCount)) |
12898
|
1 |
|
packet.append(uatype_UInt32.pack(self.SecurityRejectedRequestsCount)) |
12899
|
|
|
packet.append(uatype_UInt32.pack(self.RejectedRequestsCount)) |
12900
|
|
|
return b''.join(packet) |
12901
|
|
|
|
12902
|
|
|
@staticmethod |
12903
|
|
|
def from_binary(data): |
12904
|
|
|
return ServerDiagnosticsSummaryDataType(data) |
12905
|
|
|
|
12906
|
|
|
def _binary_init(self, data): |
12907
|
|
|
self.ServerViewCount = uatype_UInt32.unpack(data.read(4))[0] |
12908
|
|
|
self.CurrentSessionCount = uatype_UInt32.unpack(data.read(4))[0] |
12909
|
|
|
self.CumulatedSessionCount = uatype_UInt32.unpack(data.read(4))[0] |
12910
|
|
|
self.SecurityRejectedSessionCount = uatype_UInt32.unpack(data.read(4))[0] |
12911
|
|
|
self.RejectedSessionCount = uatype_UInt32.unpack(data.read(4))[0] |
12912
|
|
|
self.SessionTimeoutCount = uatype_UInt32.unpack(data.read(4))[0] |
12913
|
|
|
self.SessionAbortCount = uatype_UInt32.unpack(data.read(4))[0] |
12914
|
|
|
self.CurrentSubscriptionCount = uatype_UInt32.unpack(data.read(4))[0] |
12915
|
|
|
self.CumulatedSubscriptionCount = uatype_UInt32.unpack(data.read(4))[0] |
12916
|
|
|
self.PublishingIntervalCount = uatype_UInt32.unpack(data.read(4))[0] |
12917
|
1 |
|
self.SecurityRejectedRequestsCount = uatype_UInt32.unpack(data.read(4))[0] |
12918
|
|
|
self.RejectedRequestsCount = uatype_UInt32.unpack(data.read(4))[0] |
12919
|
|
|
|
12920
|
|
|
def __str__(self): |
12921
|
|
|
return 'ServerDiagnosticsSummaryDataType(' + 'ServerViewCount:' + str(self.ServerViewCount) + ', ' + \ |
12922
|
|
|
'CurrentSessionCount:' + str(self.CurrentSessionCount) + ', ' + \ |
12923
|
|
|
'CumulatedSessionCount:' + str(self.CumulatedSessionCount) + ', ' + \ |
12924
|
|
|
'SecurityRejectedSessionCount:' + str(self.SecurityRejectedSessionCount) + ', ' + \ |
12925
|
|
|
'RejectedSessionCount:' + str(self.RejectedSessionCount) + ', ' + \ |
12926
|
|
|
'SessionTimeoutCount:' + str(self.SessionTimeoutCount) + ', ' + \ |
12927
|
|
|
'SessionAbortCount:' + str(self.SessionAbortCount) + ', ' + \ |
12928
|
|
|
'CurrentSubscriptionCount:' + str(self.CurrentSubscriptionCount) + ', ' + \ |
12929
|
|
|
'CumulatedSubscriptionCount:' + str(self.CumulatedSubscriptionCount) + ', ' + \ |
12930
|
|
|
'PublishingIntervalCount:' + str(self.PublishingIntervalCount) + ', ' + \ |
12931
|
|
|
'SecurityRejectedRequestsCount:' + str(self.SecurityRejectedRequestsCount) + ', ' + \ |
12932
|
|
|
'RejectedRequestsCount:' + str(self.RejectedRequestsCount) + ')' |
12933
|
1 |
|
|
12934
|
|
|
__repr__ = __str__ |
12935
|
|
|
|
12936
|
|
|
|
12937
|
1 |
|
class ServerStatusDataType(FrozenClass): |
12938
|
|
|
''' |
12939
|
|
|
:ivar StartTime: |
12940
|
|
|
:vartype StartTime: DateTime |
12941
|
|
|
:ivar CurrentTime: |
12942
|
|
|
:vartype CurrentTime: DateTime |
12943
|
|
|
:ivar State: |
12944
|
|
|
:vartype State: ServerState |
12945
|
|
|
:ivar BuildInfo: |
12946
|
|
|
:vartype BuildInfo: BuildInfo |
12947
|
|
|
:ivar SecondsTillShutdown: |
12948
|
|
|
:vartype SecondsTillShutdown: UInt32 |
12949
|
|
|
:ivar ShutdownReason: |
12950
|
|
|
:vartype ShutdownReason: LocalizedText |
12951
|
1 |
|
''' |
12952
|
|
|
def __init__(self, binary=None): |
12953
|
|
|
if binary is not None: |
12954
|
|
|
self._binary_init(binary) |
12955
|
|
|
self._freeze = True |
12956
|
|
|
return |
12957
|
|
|
self.StartTime = datetime.now() |
12958
|
|
|
self.CurrentTime = datetime.now() |
12959
|
|
|
self.State = ServerState(0) |
12960
|
|
|
self.BuildInfo = BuildInfo() |
12961
|
|
|
self.SecondsTillShutdown = 0 |
12962
|
|
|
self.ShutdownReason = LocalizedText() |
12963
|
|
|
self._freeze = True |
12964
|
|
|
|
12965
|
1 |
|
def to_binary(self): |
12966
|
|
|
packet = [] |
12967
|
|
|
packet.append(pack_datetime(self.StartTime)) |
12968
|
1 |
|
packet.append(pack_datetime(self.CurrentTime)) |
12969
|
|
|
packet.append(uatype_UInt32.pack(self.State.value)) |
12970
|
|
|
packet.append(self.BuildInfo.to_binary()) |
12971
|
|
|
packet.append(uatype_UInt32.pack(self.SecondsTillShutdown)) |
12972
|
|
|
packet.append(self.ShutdownReason.to_binary()) |
12973
|
|
|
return b''.join(packet) |
12974
|
|
|
|
12975
|
|
|
@staticmethod |
12976
|
|
|
def from_binary(data): |
12977
|
|
|
return ServerStatusDataType(data) |
12978
|
|
|
|
12979
|
|
|
def _binary_init(self, data): |
12980
|
|
|
self.StartTime = unpack_datetime(data) |
12981
|
|
|
self.CurrentTime = unpack_datetime(data) |
12982
|
|
|
self.State = ServerState(uatype_UInt32.unpack(data.read(4))[0]) |
12983
|
1 |
|
self.BuildInfo = BuildInfo.from_binary(data) |
12984
|
|
|
self.SecondsTillShutdown = uatype_UInt32.unpack(data.read(4))[0] |
12985
|
|
|
self.ShutdownReason = LocalizedText.from_binary(data) |
12986
|
|
|
|
12987
|
|
|
def __str__(self): |
12988
|
|
|
return 'ServerStatusDataType(' + 'StartTime:' + str(self.StartTime) + ', ' + \ |
12989
|
|
|
'CurrentTime:' + str(self.CurrentTime) + ', ' + \ |
12990
|
|
|
'State:' + str(self.State) + ', ' + \ |
12991
|
|
|
'BuildInfo:' + str(self.BuildInfo) + ', ' + \ |
12992
|
|
|
'SecondsTillShutdown:' + str(self.SecondsTillShutdown) + ', ' + \ |
12993
|
|
|
'ShutdownReason:' + str(self.ShutdownReason) + ')' |
12994
|
|
|
|
12995
|
|
|
__repr__ = __str__ |
12996
|
1 |
|
|
12997
|
|
|
|
12998
|
|
|
class SessionDiagnosticsDataType(FrozenClass): |
12999
|
|
|
''' |
13000
|
|
|
:ivar SessionId: |
13001
|
|
|
:vartype SessionId: NodeId |
13002
|
|
|
:ivar SessionName: |
13003
|
|
|
:vartype SessionName: String |
13004
|
|
|
:ivar ClientDescription: |
13005
|
|
|
:vartype ClientDescription: ApplicationDescription |
13006
|
1 |
|
:ivar ServerUri: |
13007
|
|
|
:vartype ServerUri: String |
13008
|
|
|
:ivar EndpointUrl: |
13009
|
|
|
:vartype EndpointUrl: String |
13010
|
1 |
|
:ivar LocaleIds: |
13011
|
|
|
:vartype LocaleIds: String |
13012
|
|
|
:ivar ActualSessionTimeout: |
13013
|
|
|
:vartype ActualSessionTimeout: Double |
13014
|
|
|
:ivar MaxResponseMessageSize: |
13015
|
|
|
:vartype MaxResponseMessageSize: UInt32 |
13016
|
|
|
:ivar ClientConnectionTime: |
13017
|
|
|
:vartype ClientConnectionTime: DateTime |
13018
|
1 |
|
:ivar ClientLastContactTime: |
13019
|
|
|
:vartype ClientLastContactTime: DateTime |
13020
|
|
|
:ivar CurrentSubscriptionsCount: |
13021
|
|
|
:vartype CurrentSubscriptionsCount: UInt32 |
13022
|
|
|
:ivar CurrentMonitoredItemsCount: |
13023
|
|
|
:vartype CurrentMonitoredItemsCount: UInt32 |
13024
|
|
|
:ivar CurrentPublishRequestsInQueue: |
13025
|
|
|
:vartype CurrentPublishRequestsInQueue: UInt32 |
13026
|
1 |
|
:ivar TotalRequestCount: |
13027
|
|
|
:vartype TotalRequestCount: ServiceCounterDataType |
13028
|
|
|
:ivar UnauthorizedRequestCount: |
13029
|
1 |
|
:vartype UnauthorizedRequestCount: UInt32 |
13030
|
|
|
:ivar ReadCount: |
13031
|
|
|
:vartype ReadCount: ServiceCounterDataType |
13032
|
|
|
:ivar HistoryReadCount: |
13033
|
|
|
:vartype HistoryReadCount: ServiceCounterDataType |
13034
|
|
|
:ivar WriteCount: |
13035
|
|
|
:vartype WriteCount: ServiceCounterDataType |
13036
|
|
|
:ivar HistoryUpdateCount: |
13037
|
|
|
:vartype HistoryUpdateCount: ServiceCounterDataType |
13038
|
|
|
:ivar CallCount: |
13039
|
|
|
:vartype CallCount: ServiceCounterDataType |
13040
|
|
|
:ivar CreateMonitoredItemsCount: |
13041
|
|
|
:vartype CreateMonitoredItemsCount: ServiceCounterDataType |
13042
|
|
|
:ivar ModifyMonitoredItemsCount: |
13043
|
|
|
:vartype ModifyMonitoredItemsCount: ServiceCounterDataType |
13044
|
|
|
:ivar SetMonitoringModeCount: |
13045
|
|
|
:vartype SetMonitoringModeCount: ServiceCounterDataType |
13046
|
|
|
:ivar SetTriggeringCount: |
13047
|
|
|
:vartype SetTriggeringCount: ServiceCounterDataType |
13048
|
|
|
:ivar DeleteMonitoredItemsCount: |
13049
|
|
|
:vartype DeleteMonitoredItemsCount: ServiceCounterDataType |
13050
|
|
|
:ivar CreateSubscriptionCount: |
13051
|
|
|
:vartype CreateSubscriptionCount: ServiceCounterDataType |
13052
|
|
|
:ivar ModifySubscriptionCount: |
13053
|
|
|
:vartype ModifySubscriptionCount: ServiceCounterDataType |
13054
|
|
|
:ivar SetPublishingModeCount: |
13055
|
|
|
:vartype SetPublishingModeCount: ServiceCounterDataType |
13056
|
|
|
:ivar PublishCount: |
13057
|
|
|
:vartype PublishCount: ServiceCounterDataType |
13058
|
|
|
:ivar RepublishCount: |
13059
|
|
|
:vartype RepublishCount: ServiceCounterDataType |
13060
|
|
|
:ivar TransferSubscriptionsCount: |
13061
|
|
|
:vartype TransferSubscriptionsCount: ServiceCounterDataType |
13062
|
|
|
:ivar DeleteSubscriptionsCount: |
13063
|
|
|
:vartype DeleteSubscriptionsCount: ServiceCounterDataType |
13064
|
|
|
:ivar AddNodesCount: |
13065
|
|
|
:vartype AddNodesCount: ServiceCounterDataType |
13066
|
|
|
:ivar AddReferencesCount: |
13067
|
|
|
:vartype AddReferencesCount: ServiceCounterDataType |
13068
|
|
|
:ivar DeleteNodesCount: |
13069
|
|
|
:vartype DeleteNodesCount: ServiceCounterDataType |
13070
|
|
|
:ivar DeleteReferencesCount: |
13071
|
|
|
:vartype DeleteReferencesCount: ServiceCounterDataType |
13072
|
|
|
:ivar BrowseCount: |
13073
|
|
|
:vartype BrowseCount: ServiceCounterDataType |
13074
|
|
|
:ivar BrowseNextCount: |
13075
|
|
|
:vartype BrowseNextCount: ServiceCounterDataType |
13076
|
|
|
:ivar TranslateBrowsePathsToNodeIdsCount: |
13077
|
|
|
:vartype TranslateBrowsePathsToNodeIdsCount: ServiceCounterDataType |
13078
|
|
|
:ivar QueryFirstCount: |
13079
|
|
|
:vartype QueryFirstCount: ServiceCounterDataType |
13080
|
|
|
:ivar QueryNextCount: |
13081
|
|
|
:vartype QueryNextCount: ServiceCounterDataType |
13082
|
|
|
:ivar RegisterNodesCount: |
13083
|
|
|
:vartype RegisterNodesCount: ServiceCounterDataType |
13084
|
|
|
:ivar UnregisterNodesCount: |
13085
|
|
|
:vartype UnregisterNodesCount: ServiceCounterDataType |
13086
|
|
|
''' |
13087
|
|
|
def __init__(self, binary=None): |
13088
|
|
|
if binary is not None: |
13089
|
|
|
self._binary_init(binary) |
13090
|
|
|
self._freeze = True |
13091
|
|
|
return |
13092
|
|
|
self.SessionId = NodeId() |
13093
|
|
|
self.SessionName = '' |
13094
|
|
|
self.ClientDescription = ApplicationDescription() |
13095
|
|
|
self.ServerUri = '' |
13096
|
|
|
self.EndpointUrl = '' |
13097
|
|
|
self.LocaleIds = [] |
13098
|
|
|
self.ActualSessionTimeout = 0 |
13099
|
|
|
self.MaxResponseMessageSize = 0 |
13100
|
|
|
self.ClientConnectionTime = datetime.now() |
13101
|
|
|
self.ClientLastContactTime = datetime.now() |
13102
|
|
|
self.CurrentSubscriptionsCount = 0 |
13103
|
|
|
self.CurrentMonitoredItemsCount = 0 |
13104
|
|
|
self.CurrentPublishRequestsInQueue = 0 |
13105
|
|
|
self.TotalRequestCount = ServiceCounterDataType() |
13106
|
|
|
self.UnauthorizedRequestCount = 0 |
13107
|
|
|
self.ReadCount = ServiceCounterDataType() |
13108
|
|
|
self.HistoryReadCount = ServiceCounterDataType() |
13109
|
|
|
self.WriteCount = ServiceCounterDataType() |
13110
|
|
|
self.HistoryUpdateCount = ServiceCounterDataType() |
13111
|
|
|
self.CallCount = ServiceCounterDataType() |
13112
|
|
|
self.CreateMonitoredItemsCount = ServiceCounterDataType() |
13113
|
|
|
self.ModifyMonitoredItemsCount = ServiceCounterDataType() |
13114
|
|
|
self.SetMonitoringModeCount = ServiceCounterDataType() |
13115
|
|
|
self.SetTriggeringCount = ServiceCounterDataType() |
13116
|
|
|
self.DeleteMonitoredItemsCount = ServiceCounterDataType() |
13117
|
|
|
self.CreateSubscriptionCount = ServiceCounterDataType() |
13118
|
1 |
|
self.ModifySubscriptionCount = ServiceCounterDataType() |
13119
|
|
|
self.SetPublishingModeCount = ServiceCounterDataType() |
13120
|
|
|
self.PublishCount = ServiceCounterDataType() |
13121
|
|
|
self.RepublishCount = ServiceCounterDataType() |
13122
|
|
|
self.TransferSubscriptionsCount = ServiceCounterDataType() |
13123
|
|
|
self.DeleteSubscriptionsCount = ServiceCounterDataType() |
13124
|
|
|
self.AddNodesCount = ServiceCounterDataType() |
13125
|
|
|
self.AddReferencesCount = ServiceCounterDataType() |
13126
|
|
|
self.DeleteNodesCount = ServiceCounterDataType() |
13127
|
|
|
self.DeleteReferencesCount = ServiceCounterDataType() |
13128
|
|
|
self.BrowseCount = ServiceCounterDataType() |
13129
|
|
|
self.BrowseNextCount = ServiceCounterDataType() |
13130
|
|
|
self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType() |
13131
|
|
|
self.QueryFirstCount = ServiceCounterDataType() |
13132
|
|
|
self.QueryNextCount = ServiceCounterDataType() |
13133
|
|
|
self.RegisterNodesCount = ServiceCounterDataType() |
13134
|
|
|
self.UnregisterNodesCount = ServiceCounterDataType() |
13135
|
|
|
self._freeze = True |
13136
|
|
|
|
13137
|
|
|
def to_binary(self): |
13138
|
|
|
packet = [] |
13139
|
|
|
packet.append(self.SessionId.to_binary()) |
13140
|
|
|
packet.append(pack_string(self.SessionName)) |
13141
|
|
|
packet.append(self.ClientDescription.to_binary()) |
13142
|
|
|
packet.append(pack_string(self.ServerUri)) |
13143
|
|
|
packet.append(pack_string(self.EndpointUrl)) |
13144
|
|
|
packet.append(uatype_Int32.pack(len(self.LocaleIds))) |
13145
|
|
|
for fieldname in self.LocaleIds: |
13146
|
|
|
packet.append(pack_string(fieldname)) |
13147
|
|
|
packet.append(uatype_Double.pack(self.ActualSessionTimeout)) |
13148
|
|
|
packet.append(uatype_UInt32.pack(self.MaxResponseMessageSize)) |
13149
|
|
|
packet.append(pack_datetime(self.ClientConnectionTime)) |
13150
|
|
|
packet.append(pack_datetime(self.ClientLastContactTime)) |
13151
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentSubscriptionsCount)) |
13152
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentMonitoredItemsCount)) |
13153
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentPublishRequestsInQueue)) |
13154
|
|
|
packet.append(self.TotalRequestCount.to_binary()) |
13155
|
|
|
packet.append(uatype_UInt32.pack(self.UnauthorizedRequestCount)) |
13156
|
|
|
packet.append(self.ReadCount.to_binary()) |
13157
|
|
|
packet.append(self.HistoryReadCount.to_binary()) |
13158
|
|
|
packet.append(self.WriteCount.to_binary()) |
13159
|
|
|
packet.append(self.HistoryUpdateCount.to_binary()) |
13160
|
|
|
packet.append(self.CallCount.to_binary()) |
13161
|
|
|
packet.append(self.CreateMonitoredItemsCount.to_binary()) |
13162
|
|
|
packet.append(self.ModifyMonitoredItemsCount.to_binary()) |
13163
|
|
|
packet.append(self.SetMonitoringModeCount.to_binary()) |
13164
|
|
|
packet.append(self.SetTriggeringCount.to_binary()) |
13165
|
|
|
packet.append(self.DeleteMonitoredItemsCount.to_binary()) |
13166
|
|
|
packet.append(self.CreateSubscriptionCount.to_binary()) |
13167
|
|
|
packet.append(self.ModifySubscriptionCount.to_binary()) |
13168
|
1 |
|
packet.append(self.SetPublishingModeCount.to_binary()) |
13169
|
|
|
packet.append(self.PublishCount.to_binary()) |
13170
|
|
|
packet.append(self.RepublishCount.to_binary()) |
13171
|
|
|
packet.append(self.TransferSubscriptionsCount.to_binary()) |
13172
|
|
|
packet.append(self.DeleteSubscriptionsCount.to_binary()) |
13173
|
|
|
packet.append(self.AddNodesCount.to_binary()) |
13174
|
|
|
packet.append(self.AddReferencesCount.to_binary()) |
13175
|
|
|
packet.append(self.DeleteNodesCount.to_binary()) |
13176
|
|
|
packet.append(self.DeleteReferencesCount.to_binary()) |
13177
|
|
|
packet.append(self.BrowseCount.to_binary()) |
13178
|
|
|
packet.append(self.BrowseNextCount.to_binary()) |
13179
|
|
|
packet.append(self.TranslateBrowsePathsToNodeIdsCount.to_binary()) |
13180
|
|
|
packet.append(self.QueryFirstCount.to_binary()) |
13181
|
|
|
packet.append(self.QueryNextCount.to_binary()) |
13182
|
|
|
packet.append(self.RegisterNodesCount.to_binary()) |
13183
|
|
|
packet.append(self.UnregisterNodesCount.to_binary()) |
13184
|
|
|
return b''.join(packet) |
13185
|
|
|
|
13186
|
|
|
@staticmethod |
13187
|
|
|
def from_binary(data): |
13188
|
|
|
return SessionDiagnosticsDataType(data) |
13189
|
|
|
|
13190
|
|
|
def _binary_init(self, data): |
13191
|
|
|
self.SessionId = NodeId.from_binary(data) |
13192
|
|
|
self.SessionName = unpack_string(data) |
13193
|
|
|
self.ClientDescription = ApplicationDescription.from_binary(data) |
13194
|
|
|
self.ServerUri = unpack_string(data) |
13195
|
|
|
self.EndpointUrl = unpack_string(data) |
13196
|
|
|
self.LocaleIds = unpack_uatype_array('String', data) |
13197
|
|
|
self.ActualSessionTimeout = uatype_Double.unpack(data.read(8))[0] |
13198
|
|
|
self.MaxResponseMessageSize = uatype_UInt32.unpack(data.read(4))[0] |
13199
|
|
|
self.ClientConnectionTime = unpack_datetime(data) |
13200
|
|
|
self.ClientLastContactTime = unpack_datetime(data) |
13201
|
|
|
self.CurrentSubscriptionsCount = uatype_UInt32.unpack(data.read(4))[0] |
13202
|
|
|
self.CurrentMonitoredItemsCount = uatype_UInt32.unpack(data.read(4))[0] |
13203
|
|
|
self.CurrentPublishRequestsInQueue = uatype_UInt32.unpack(data.read(4))[0] |
13204
|
|
|
self.TotalRequestCount = ServiceCounterDataType.from_binary(data) |
13205
|
|
|
self.UnauthorizedRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13206
|
|
|
self.ReadCount = ServiceCounterDataType.from_binary(data) |
13207
|
|
|
self.HistoryReadCount = ServiceCounterDataType.from_binary(data) |
13208
|
|
|
self.WriteCount = ServiceCounterDataType.from_binary(data) |
13209
|
|
|
self.HistoryUpdateCount = ServiceCounterDataType.from_binary(data) |
13210
|
|
|
self.CallCount = ServiceCounterDataType.from_binary(data) |
13211
|
|
|
self.CreateMonitoredItemsCount = ServiceCounterDataType.from_binary(data) |
13212
|
|
|
self.ModifyMonitoredItemsCount = ServiceCounterDataType.from_binary(data) |
13213
|
|
|
self.SetMonitoringModeCount = ServiceCounterDataType.from_binary(data) |
13214
|
|
|
self.SetTriggeringCount = ServiceCounterDataType.from_binary(data) |
13215
|
|
|
self.DeleteMonitoredItemsCount = ServiceCounterDataType.from_binary(data) |
13216
|
|
|
self.CreateSubscriptionCount = ServiceCounterDataType.from_binary(data) |
13217
|
1 |
|
self.ModifySubscriptionCount = ServiceCounterDataType.from_binary(data) |
13218
|
|
|
self.SetPublishingModeCount = ServiceCounterDataType.from_binary(data) |
13219
|
|
|
self.PublishCount = ServiceCounterDataType.from_binary(data) |
13220
|
|
|
self.RepublishCount = ServiceCounterDataType.from_binary(data) |
13221
|
1 |
|
self.TransferSubscriptionsCount = ServiceCounterDataType.from_binary(data) |
13222
|
|
|
self.DeleteSubscriptionsCount = ServiceCounterDataType.from_binary(data) |
13223
|
|
|
self.AddNodesCount = ServiceCounterDataType.from_binary(data) |
13224
|
|
|
self.AddReferencesCount = ServiceCounterDataType.from_binary(data) |
13225
|
|
|
self.DeleteNodesCount = ServiceCounterDataType.from_binary(data) |
13226
|
|
|
self.DeleteReferencesCount = ServiceCounterDataType.from_binary(data) |
13227
|
|
|
self.BrowseCount = ServiceCounterDataType.from_binary(data) |
13228
|
|
|
self.BrowseNextCount = ServiceCounterDataType.from_binary(data) |
13229
|
|
|
self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType.from_binary(data) |
13230
|
|
|
self.QueryFirstCount = ServiceCounterDataType.from_binary(data) |
13231
|
|
|
self.QueryNextCount = ServiceCounterDataType.from_binary(data) |
13232
|
|
|
self.RegisterNodesCount = ServiceCounterDataType.from_binary(data) |
13233
|
|
|
self.UnregisterNodesCount = ServiceCounterDataType.from_binary(data) |
13234
|
|
|
|
13235
|
|
|
def __str__(self): |
13236
|
|
|
return 'SessionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ |
13237
|
|
|
'SessionName:' + str(self.SessionName) + ', ' + \ |
13238
|
|
|
'ClientDescription:' + str(self.ClientDescription) + ', ' + \ |
13239
|
|
|
'ServerUri:' + str(self.ServerUri) + ', ' + \ |
13240
|
|
|
'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ |
13241
|
|
|
'LocaleIds:' + str(self.LocaleIds) + ', ' + \ |
13242
|
|
|
'ActualSessionTimeout:' + str(self.ActualSessionTimeout) + ', ' + \ |
13243
|
|
|
'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ', ' + \ |
13244
|
|
|
'ClientConnectionTime:' + str(self.ClientConnectionTime) + ', ' + \ |
13245
|
|
|
'ClientLastContactTime:' + str(self.ClientLastContactTime) + ', ' + \ |
13246
|
|
|
'CurrentSubscriptionsCount:' + str(self.CurrentSubscriptionsCount) + ', ' + \ |
13247
|
|
|
'CurrentMonitoredItemsCount:' + str(self.CurrentMonitoredItemsCount) + ', ' + \ |
13248
|
|
|
'CurrentPublishRequestsInQueue:' + str(self.CurrentPublishRequestsInQueue) + ', ' + \ |
13249
|
|
|
'TotalRequestCount:' + str(self.TotalRequestCount) + ', ' + \ |
13250
|
|
|
'UnauthorizedRequestCount:' + str(self.UnauthorizedRequestCount) + ', ' + \ |
13251
|
|
|
'ReadCount:' + str(self.ReadCount) + ', ' + \ |
13252
|
|
|
'HistoryReadCount:' + str(self.HistoryReadCount) + ', ' + \ |
13253
|
|
|
'WriteCount:' + str(self.WriteCount) + ', ' + \ |
13254
|
|
|
'HistoryUpdateCount:' + str(self.HistoryUpdateCount) + ', ' + \ |
13255
|
|
|
'CallCount:' + str(self.CallCount) + ', ' + \ |
13256
|
|
|
'CreateMonitoredItemsCount:' + str(self.CreateMonitoredItemsCount) + ', ' + \ |
13257
|
|
|
'ModifyMonitoredItemsCount:' + str(self.ModifyMonitoredItemsCount) + ', ' + \ |
13258
|
|
|
'SetMonitoringModeCount:' + str(self.SetMonitoringModeCount) + ', ' + \ |
13259
|
|
|
'SetTriggeringCount:' + str(self.SetTriggeringCount) + ', ' + \ |
13260
|
|
|
'DeleteMonitoredItemsCount:' + str(self.DeleteMonitoredItemsCount) + ', ' + \ |
13261
|
|
|
'CreateSubscriptionCount:' + str(self.CreateSubscriptionCount) + ', ' + \ |
13262
|
|
|
'ModifySubscriptionCount:' + str(self.ModifySubscriptionCount) + ', ' + \ |
13263
|
|
|
'SetPublishingModeCount:' + str(self.SetPublishingModeCount) + ', ' + \ |
13264
|
|
|
'PublishCount:' + str(self.PublishCount) + ', ' + \ |
13265
|
|
|
'RepublishCount:' + str(self.RepublishCount) + ', ' + \ |
13266
|
1 |
|
'TransferSubscriptionsCount:' + str(self.TransferSubscriptionsCount) + ', ' + \ |
13267
|
|
|
'DeleteSubscriptionsCount:' + str(self.DeleteSubscriptionsCount) + ', ' + \ |
13268
|
|
|
'AddNodesCount:' + str(self.AddNodesCount) + ', ' + \ |
13269
|
|
|
'AddReferencesCount:' + str(self.AddReferencesCount) + ', ' + \ |
13270
|
|
|
'DeleteNodesCount:' + str(self.DeleteNodesCount) + ', ' + \ |
13271
|
|
|
'DeleteReferencesCount:' + str(self.DeleteReferencesCount) + ', ' + \ |
13272
|
|
|
'BrowseCount:' + str(self.BrowseCount) + ', ' + \ |
13273
|
|
|
'BrowseNextCount:' + str(self.BrowseNextCount) + ', ' + \ |
13274
|
|
|
'TranslateBrowsePathsToNodeIdsCount:' + str(self.TranslateBrowsePathsToNodeIdsCount) + ', ' + \ |
13275
|
|
|
'QueryFirstCount:' + str(self.QueryFirstCount) + ', ' + \ |
13276
|
|
|
'QueryNextCount:' + str(self.QueryNextCount) + ', ' + \ |
13277
|
|
|
'RegisterNodesCount:' + str(self.RegisterNodesCount) + ', ' + \ |
13278
|
|
|
'UnregisterNodesCount:' + str(self.UnregisterNodesCount) + ')' |
13279
|
|
|
|
13280
|
|
|
__repr__ = __str__ |
13281
|
|
|
|
13282
|
|
|
|
13283
|
|
|
class SessionSecurityDiagnosticsDataType(FrozenClass): |
13284
|
|
|
''' |
13285
|
|
|
:ivar SessionId: |
13286
|
|
|
:vartype SessionId: NodeId |
13287
|
|
|
:ivar ClientUserIdOfSession: |
13288
|
|
|
:vartype ClientUserIdOfSession: String |
13289
|
|
|
:ivar ClientUserIdHistory: |
13290
|
|
|
:vartype ClientUserIdHistory: String |
13291
|
|
|
:ivar AuthenticationMechanism: |
13292
|
|
|
:vartype AuthenticationMechanism: String |
13293
|
|
|
:ivar Encoding: |
13294
|
|
|
:vartype Encoding: String |
13295
|
|
|
:ivar TransportProtocol: |
13296
|
|
|
:vartype TransportProtocol: String |
13297
|
|
|
:ivar SecurityMode: |
13298
|
|
|
:vartype SecurityMode: MessageSecurityMode |
13299
|
|
|
:ivar SecurityPolicyUri: |
13300
|
|
|
:vartype SecurityPolicyUri: String |
13301
|
|
|
:ivar ClientCertificate: |
13302
|
|
|
:vartype ClientCertificate: ByteString |
13303
|
|
|
''' |
13304
|
|
|
def __init__(self, binary=None): |
13305
|
|
|
if binary is not None: |
13306
|
|
|
self._binary_init(binary) |
13307
|
|
|
self._freeze = True |
13308
|
|
|
return |
13309
|
|
|
self.SessionId = NodeId() |
13310
|
|
|
self.ClientUserIdOfSession = '' |
13311
|
1 |
|
self.ClientUserIdHistory = [] |
13312
|
|
|
self.AuthenticationMechanism = '' |
13313
|
|
|
self.Encoding = '' |
13314
|
1 |
|
self.TransportProtocol = '' |
13315
|
|
|
self.SecurityMode = MessageSecurityMode(0) |
13316
|
|
|
self.SecurityPolicyUri = '' |
13317
|
|
|
self.ClientCertificate = b'' |
13318
|
|
|
self._freeze = True |
13319
|
|
|
|
13320
|
|
|
def to_binary(self): |
13321
|
|
|
packet = [] |
13322
|
|
|
packet.append(self.SessionId.to_binary()) |
13323
|
|
|
packet.append(pack_string(self.ClientUserIdOfSession)) |
13324
|
|
|
packet.append(uatype_Int32.pack(len(self.ClientUserIdHistory))) |
13325
|
|
|
for fieldname in self.ClientUserIdHistory: |
13326
|
|
|
packet.append(pack_string(fieldname)) |
13327
|
|
|
packet.append(pack_string(self.AuthenticationMechanism)) |
13328
|
|
|
packet.append(pack_string(self.Encoding)) |
13329
|
|
|
packet.append(pack_string(self.TransportProtocol)) |
13330
|
|
|
packet.append(uatype_UInt32.pack(self.SecurityMode.value)) |
13331
|
|
|
packet.append(pack_string(self.SecurityPolicyUri)) |
13332
|
|
|
packet.append(pack_bytes(self.ClientCertificate)) |
13333
|
|
|
return b''.join(packet) |
13334
|
|
|
|
13335
|
1 |
|
@staticmethod |
13336
|
|
|
def from_binary(data): |
13337
|
|
|
return SessionSecurityDiagnosticsDataType(data) |
13338
|
|
|
|
13339
|
|
|
def _binary_init(self, data): |
13340
|
|
|
self.SessionId = NodeId.from_binary(data) |
13341
|
|
|
self.ClientUserIdOfSession = unpack_string(data) |
13342
|
|
|
self.ClientUserIdHistory = unpack_uatype_array('String', data) |
13343
|
|
|
self.AuthenticationMechanism = unpack_string(data) |
13344
|
|
|
self.Encoding = unpack_string(data) |
13345
|
|
|
self.TransportProtocol = unpack_string(data) |
13346
|
|
|
self.SecurityMode = MessageSecurityMode(uatype_UInt32.unpack(data.read(4))[0]) |
13347
|
|
|
self.SecurityPolicyUri = unpack_string(data) |
13348
|
|
|
self.ClientCertificate = unpack_bytes(data) |
13349
|
|
|
|
13350
|
|
|
def __str__(self): |
13351
|
1 |
|
return 'SessionSecurityDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ |
13352
|
|
|
'ClientUserIdOfSession:' + str(self.ClientUserIdOfSession) + ', ' + \ |
13353
|
|
|
'ClientUserIdHistory:' + str(self.ClientUserIdHistory) + ', ' + \ |
13354
|
|
|
'AuthenticationMechanism:' + str(self.AuthenticationMechanism) + ', ' + \ |
13355
|
|
|
'Encoding:' + str(self.Encoding) + ', ' + \ |
13356
|
|
|
'TransportProtocol:' + str(self.TransportProtocol) + ', ' + \ |
13357
|
|
|
'SecurityMode:' + str(self.SecurityMode) + ', ' + \ |
13358
|
|
|
'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \ |
13359
|
|
|
'ClientCertificate:' + str(self.ClientCertificate) + ')' |
13360
|
|
|
|
13361
|
|
|
__repr__ = __str__ |
13362
|
|
|
|
13363
|
|
|
|
13364
|
|
|
class ServiceCounterDataType(FrozenClass): |
13365
|
|
|
''' |
13366
|
1 |
|
:ivar TotalCount: |
13367
|
|
|
:vartype TotalCount: UInt32 |
13368
|
|
|
:ivar ErrorCount: |
13369
|
|
|
:vartype ErrorCount: UInt32 |
13370
|
1 |
|
''' |
13371
|
|
|
def __init__(self, binary=None): |
13372
|
|
|
if binary is not None: |
13373
|
|
|
self._binary_init(binary) |
13374
|
|
|
self._freeze = True |
13375
|
|
|
return |
13376
|
|
|
self.TotalCount = 0 |
13377
|
|
|
self.ErrorCount = 0 |
13378
|
|
|
self._freeze = True |
13379
|
|
|
|
13380
|
|
|
def to_binary(self): |
13381
|
1 |
|
packet = [] |
13382
|
|
|
packet.append(uatype_UInt32.pack(self.TotalCount)) |
13383
|
|
|
packet.append(uatype_UInt32.pack(self.ErrorCount)) |
13384
|
|
|
return b''.join(packet) |
13385
|
|
|
|
13386
|
|
|
@staticmethod |
13387
|
|
|
def from_binary(data): |
13388
|
|
|
return ServiceCounterDataType(data) |
13389
|
|
|
|
13390
|
|
|
def _binary_init(self, data): |
13391
|
|
|
self.TotalCount = uatype_UInt32.unpack(data.read(4))[0] |
13392
|
1 |
|
self.ErrorCount = uatype_UInt32.unpack(data.read(4))[0] |
13393
|
|
|
|
13394
|
|
|
def __str__(self): |
13395
|
1 |
|
return 'ServiceCounterDataType(' + 'TotalCount:' + str(self.TotalCount) + ', ' + \ |
13396
|
|
|
'ErrorCount:' + str(self.ErrorCount) + ')' |
13397
|
|
|
|
13398
|
|
|
__repr__ = __str__ |
13399
|
|
|
|
13400
|
|
|
|
13401
|
|
|
class StatusResult(FrozenClass): |
13402
|
1 |
|
''' |
13403
|
|
|
:ivar StatusCode: |
13404
|
|
|
:vartype StatusCode: StatusCode |
13405
|
|
|
:ivar DiagnosticInfo: |
13406
|
|
|
:vartype DiagnosticInfo: DiagnosticInfo |
13407
|
|
|
''' |
13408
|
|
|
def __init__(self, binary=None): |
13409
|
|
|
if binary is not None: |
13410
|
|
|
self._binary_init(binary) |
13411
|
1 |
|
self._freeze = True |
13412
|
|
|
return |
13413
|
|
|
self.StatusCode = StatusCode() |
13414
|
|
|
self.DiagnosticInfo = DiagnosticInfo() |
13415
|
|
|
self._freeze = True |
13416
|
|
|
|
13417
|
1 |
|
def to_binary(self): |
13418
|
|
|
packet = [] |
13419
|
|
|
packet.append(self.StatusCode.to_binary()) |
13420
|
|
|
packet.append(self.DiagnosticInfo.to_binary()) |
13421
|
1 |
|
return b''.join(packet) |
13422
|
|
|
|
13423
|
|
|
@staticmethod |
13424
|
|
|
def from_binary(data): |
13425
|
1 |
|
return StatusResult(data) |
13426
|
|
|
|
13427
|
|
|
def _binary_init(self, data): |
13428
|
|
|
self.StatusCode = StatusCode.from_binary(data) |
13429
|
1 |
|
self.DiagnosticInfo = DiagnosticInfo.from_binary(data) |
13430
|
|
|
|
13431
|
|
|
def __str__(self): |
13432
|
1 |
|
return 'StatusResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
13433
|
|
|
'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')' |
13434
|
|
|
|
13435
|
|
|
__repr__ = __str__ |
13436
|
|
|
|
13437
|
|
|
|
13438
|
|
|
class SubscriptionDiagnosticsDataType(FrozenClass): |
13439
|
1 |
|
''' |
13440
|
|
|
:ivar SessionId: |
13441
|
|
|
:vartype SessionId: NodeId |
13442
|
|
|
:ivar SubscriptionId: |
13443
|
|
|
:vartype SubscriptionId: UInt32 |
13444
|
|
|
:ivar Priority: |
13445
|
|
|
:vartype Priority: Byte |
13446
|
|
|
:ivar PublishingInterval: |
13447
|
|
|
:vartype PublishingInterval: Double |
13448
|
1 |
|
:ivar MaxKeepAliveCount: |
13449
|
|
|
:vartype MaxKeepAliveCount: UInt32 |
13450
|
|
|
:ivar MaxLifetimeCount: |
13451
|
|
|
:vartype MaxLifetimeCount: UInt32 |
13452
|
|
|
:ivar MaxNotificationsPerPublish: |
13453
|
|
|
:vartype MaxNotificationsPerPublish: UInt32 |
13454
|
1 |
|
:ivar PublishingEnabled: |
13455
|
|
|
:vartype PublishingEnabled: Boolean |
13456
|
|
|
:ivar ModifyCount: |
13457
|
|
|
:vartype ModifyCount: UInt32 |
13458
|
1 |
|
:ivar EnableCount: |
13459
|
|
|
:vartype EnableCount: UInt32 |
13460
|
|
|
:ivar DisableCount: |
13461
|
|
|
:vartype DisableCount: UInt32 |
13462
|
1 |
|
:ivar RepublishRequestCount: |
13463
|
|
|
:vartype RepublishRequestCount: UInt32 |
13464
|
|
|
:ivar RepublishMessageRequestCount: |
13465
|
|
|
:vartype RepublishMessageRequestCount: UInt32 |
13466
|
1 |
|
:ivar RepublishMessageCount: |
13467
|
|
|
:vartype RepublishMessageCount: UInt32 |
13468
|
|
|
:ivar TransferRequestCount: |
13469
|
1 |
|
:vartype TransferRequestCount: UInt32 |
13470
|
|
|
:ivar TransferredToAltClientCount: |
13471
|
|
|
:vartype TransferredToAltClientCount: UInt32 |
13472
|
|
|
:ivar TransferredToSameClientCount: |
13473
|
|
|
:vartype TransferredToSameClientCount: UInt32 |
13474
|
|
|
:ivar PublishRequestCount: |
13475
|
|
|
:vartype PublishRequestCount: UInt32 |
13476
|
|
|
:ivar DataChangeNotificationsCount: |
13477
|
|
|
:vartype DataChangeNotificationsCount: UInt32 |
13478
|
|
|
:ivar EventNotificationsCount: |
13479
|
|
|
:vartype EventNotificationsCount: UInt32 |
13480
|
|
|
:ivar NotificationsCount: |
13481
|
|
|
:vartype NotificationsCount: UInt32 |
13482
|
|
|
:ivar LatePublishRequestCount: |
13483
|
|
|
:vartype LatePublishRequestCount: UInt32 |
13484
|
|
|
:ivar CurrentKeepAliveCount: |
13485
|
|
|
:vartype CurrentKeepAliveCount: UInt32 |
13486
|
|
|
:ivar CurrentLifetimeCount: |
13487
|
|
|
:vartype CurrentLifetimeCount: UInt32 |
13488
|
|
|
:ivar UnacknowledgedMessageCount: |
13489
|
|
|
:vartype UnacknowledgedMessageCount: UInt32 |
13490
|
|
|
:ivar DiscardedMessageCount: |
13491
|
|
|
:vartype DiscardedMessageCount: UInt32 |
13492
|
|
|
:ivar MonitoredItemCount: |
13493
|
|
|
:vartype MonitoredItemCount: UInt32 |
13494
|
|
|
:ivar DisabledMonitoredItemCount: |
13495
|
|
|
:vartype DisabledMonitoredItemCount: UInt32 |
13496
|
|
|
:ivar MonitoringQueueOverflowCount: |
13497
|
|
|
:vartype MonitoringQueueOverflowCount: UInt32 |
13498
|
|
|
:ivar NextSequenceNumber: |
13499
|
|
|
:vartype NextSequenceNumber: UInt32 |
13500
|
|
|
:ivar EventQueueOverFlowCount: |
13501
|
|
|
:vartype EventQueueOverFlowCount: UInt32 |
13502
|
|
|
''' |
13503
|
|
|
def __init__(self, binary=None): |
13504
|
|
|
if binary is not None: |
13505
|
|
|
self._binary_init(binary) |
13506
|
|
|
self._freeze = True |
13507
|
|
|
return |
13508
|
|
|
self.SessionId = NodeId() |
13509
|
|
|
self.SubscriptionId = 0 |
13510
|
|
|
self.Priority = 0 |
13511
|
|
|
self.PublishingInterval = 0 |
13512
|
|
|
self.MaxKeepAliveCount = 0 |
13513
|
|
|
self.MaxLifetimeCount = 0 |
13514
|
|
|
self.MaxNotificationsPerPublish = 0 |
13515
|
|
|
self.PublishingEnabled = True |
13516
|
|
|
self.ModifyCount = 0 |
13517
|
|
|
self.EnableCount = 0 |
13518
|
|
|
self.DisableCount = 0 |
13519
|
|
|
self.RepublishRequestCount = 0 |
13520
|
|
|
self.RepublishMessageRequestCount = 0 |
13521
|
|
|
self.RepublishMessageCount = 0 |
13522
|
|
|
self.TransferRequestCount = 0 |
13523
|
|
|
self.TransferredToAltClientCount = 0 |
13524
|
|
|
self.TransferredToSameClientCount = 0 |
13525
|
|
|
self.PublishRequestCount = 0 |
13526
|
|
|
self.DataChangeNotificationsCount = 0 |
13527
|
|
|
self.EventNotificationsCount = 0 |
13528
|
|
|
self.NotificationsCount = 0 |
13529
|
|
|
self.LatePublishRequestCount = 0 |
13530
|
|
|
self.CurrentKeepAliveCount = 0 |
13531
|
|
|
self.CurrentLifetimeCount = 0 |
13532
|
|
|
self.UnacknowledgedMessageCount = 0 |
13533
|
|
|
self.DiscardedMessageCount = 0 |
13534
|
1 |
|
self.MonitoredItemCount = 0 |
13535
|
|
|
self.DisabledMonitoredItemCount = 0 |
13536
|
|
|
self.MonitoringQueueOverflowCount = 0 |
13537
|
|
|
self.NextSequenceNumber = 0 |
13538
|
|
|
self.EventQueueOverFlowCount = 0 |
13539
|
|
|
self._freeze = True |
13540
|
|
|
|
13541
|
|
|
def to_binary(self): |
13542
|
|
|
packet = [] |
13543
|
|
|
packet.append(self.SessionId.to_binary()) |
13544
|
|
|
packet.append(uatype_UInt32.pack(self.SubscriptionId)) |
13545
|
|
|
packet.append(uatype_Byte.pack(self.Priority)) |
13546
|
|
|
packet.append(uatype_Double.pack(self.PublishingInterval)) |
13547
|
|
|
packet.append(uatype_UInt32.pack(self.MaxKeepAliveCount)) |
13548
|
|
|
packet.append(uatype_UInt32.pack(self.MaxLifetimeCount)) |
13549
|
|
|
packet.append(uatype_UInt32.pack(self.MaxNotificationsPerPublish)) |
13550
|
|
|
packet.append(uatype_Boolean.pack(self.PublishingEnabled)) |
13551
|
|
|
packet.append(uatype_UInt32.pack(self.ModifyCount)) |
13552
|
|
|
packet.append(uatype_UInt32.pack(self.EnableCount)) |
13553
|
|
|
packet.append(uatype_UInt32.pack(self.DisableCount)) |
13554
|
|
|
packet.append(uatype_UInt32.pack(self.RepublishRequestCount)) |
13555
|
|
|
packet.append(uatype_UInt32.pack(self.RepublishMessageRequestCount)) |
13556
|
|
|
packet.append(uatype_UInt32.pack(self.RepublishMessageCount)) |
13557
|
|
|
packet.append(uatype_UInt32.pack(self.TransferRequestCount)) |
13558
|
|
|
packet.append(uatype_UInt32.pack(self.TransferredToAltClientCount)) |
13559
|
|
|
packet.append(uatype_UInt32.pack(self.TransferredToSameClientCount)) |
13560
|
|
|
packet.append(uatype_UInt32.pack(self.PublishRequestCount)) |
13561
|
|
|
packet.append(uatype_UInt32.pack(self.DataChangeNotificationsCount)) |
13562
|
|
|
packet.append(uatype_UInt32.pack(self.EventNotificationsCount)) |
13563
|
|
|
packet.append(uatype_UInt32.pack(self.NotificationsCount)) |
13564
|
|
|
packet.append(uatype_UInt32.pack(self.LatePublishRequestCount)) |
13565
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentKeepAliveCount)) |
13566
|
|
|
packet.append(uatype_UInt32.pack(self.CurrentLifetimeCount)) |
13567
|
|
|
packet.append(uatype_UInt32.pack(self.UnacknowledgedMessageCount)) |
13568
|
|
|
packet.append(uatype_UInt32.pack(self.DiscardedMessageCount)) |
13569
|
|
|
packet.append(uatype_UInt32.pack(self.MonitoredItemCount)) |
13570
|
|
|
packet.append(uatype_UInt32.pack(self.DisabledMonitoredItemCount)) |
13571
|
|
|
packet.append(uatype_UInt32.pack(self.MonitoringQueueOverflowCount)) |
13572
|
1 |
|
packet.append(uatype_UInt32.pack(self.NextSequenceNumber)) |
13573
|
|
|
packet.append(uatype_UInt32.pack(self.EventQueueOverFlowCount)) |
13574
|
|
|
return b''.join(packet) |
13575
|
|
|
|
13576
|
|
|
@staticmethod |
13577
|
|
|
def from_binary(data): |
13578
|
|
|
return SubscriptionDiagnosticsDataType(data) |
13579
|
|
|
|
13580
|
|
|
def _binary_init(self, data): |
13581
|
|
|
self.SessionId = NodeId.from_binary(data) |
13582
|
|
|
self.SubscriptionId = uatype_UInt32.unpack(data.read(4))[0] |
13583
|
|
|
self.Priority = uatype_Byte.unpack(data.read(1))[0] |
13584
|
|
|
self.PublishingInterval = uatype_Double.unpack(data.read(8))[0] |
13585
|
|
|
self.MaxKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
13586
|
|
|
self.MaxLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
13587
|
|
|
self.MaxNotificationsPerPublish = uatype_UInt32.unpack(data.read(4))[0] |
13588
|
|
|
self.PublishingEnabled = uatype_Boolean.unpack(data.read(1))[0] |
13589
|
|
|
self.ModifyCount = uatype_UInt32.unpack(data.read(4))[0] |
13590
|
|
|
self.EnableCount = uatype_UInt32.unpack(data.read(4))[0] |
13591
|
|
|
self.DisableCount = uatype_UInt32.unpack(data.read(4))[0] |
13592
|
|
|
self.RepublishRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13593
|
|
|
self.RepublishMessageRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13594
|
|
|
self.RepublishMessageCount = uatype_UInt32.unpack(data.read(4))[0] |
13595
|
|
|
self.TransferRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13596
|
|
|
self.TransferredToAltClientCount = uatype_UInt32.unpack(data.read(4))[0] |
13597
|
|
|
self.TransferredToSameClientCount = uatype_UInt32.unpack(data.read(4))[0] |
13598
|
|
|
self.PublishRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13599
|
|
|
self.DataChangeNotificationsCount = uatype_UInt32.unpack(data.read(4))[0] |
13600
|
|
|
self.EventNotificationsCount = uatype_UInt32.unpack(data.read(4))[0] |
13601
|
|
|
self.NotificationsCount = uatype_UInt32.unpack(data.read(4))[0] |
13602
|
|
|
self.LatePublishRequestCount = uatype_UInt32.unpack(data.read(4))[0] |
13603
|
|
|
self.CurrentKeepAliveCount = uatype_UInt32.unpack(data.read(4))[0] |
13604
|
|
|
self.CurrentLifetimeCount = uatype_UInt32.unpack(data.read(4))[0] |
13605
|
|
|
self.UnacknowledgedMessageCount = uatype_UInt32.unpack(data.read(4))[0] |
13606
|
|
|
self.DiscardedMessageCount = uatype_UInt32.unpack(data.read(4))[0] |
13607
|
1 |
|
self.MonitoredItemCount = uatype_UInt32.unpack(data.read(4))[0] |
13608
|
|
|
self.DisabledMonitoredItemCount = uatype_UInt32.unpack(data.read(4))[0] |
13609
|
|
|
self.MonitoringQueueOverflowCount = uatype_UInt32.unpack(data.read(4))[0] |
13610
|
|
|
self.NextSequenceNumber = uatype_UInt32.unpack(data.read(4))[0] |
13611
|
1 |
|
self.EventQueueOverFlowCount = uatype_UInt32.unpack(data.read(4))[0] |
13612
|
|
|
|
13613
|
|
|
def __str__(self): |
13614
|
|
|
return 'SubscriptionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ |
13615
|
|
|
'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
13616
|
|
|
'Priority:' + str(self.Priority) + ', ' + \ |
13617
|
|
|
'PublishingInterval:' + str(self.PublishingInterval) + ', ' + \ |
13618
|
|
|
'MaxKeepAliveCount:' + str(self.MaxKeepAliveCount) + ', ' + \ |
13619
|
|
|
'MaxLifetimeCount:' + str(self.MaxLifetimeCount) + ', ' + \ |
13620
|
|
|
'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ |
13621
|
|
|
'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ |
13622
|
|
|
'ModifyCount:' + str(self.ModifyCount) + ', ' + \ |
13623
|
|
|
'EnableCount:' + str(self.EnableCount) + ', ' + \ |
13624
|
|
|
'DisableCount:' + str(self.DisableCount) + ', ' + \ |
13625
|
|
|
'RepublishRequestCount:' + str(self.RepublishRequestCount) + ', ' + \ |
13626
|
|
|
'RepublishMessageRequestCount:' + str(self.RepublishMessageRequestCount) + ', ' + \ |
13627
|
|
|
'RepublishMessageCount:' + str(self.RepublishMessageCount) + ', ' + \ |
13628
|
|
|
'TransferRequestCount:' + str(self.TransferRequestCount) + ', ' + \ |
13629
|
|
|
'TransferredToAltClientCount:' + str(self.TransferredToAltClientCount) + ', ' + \ |
13630
|
|
|
'TransferredToSameClientCount:' + str(self.TransferredToSameClientCount) + ', ' + \ |
13631
|
|
|
'PublishRequestCount:' + str(self.PublishRequestCount) + ', ' + \ |
13632
|
|
|
'DataChangeNotificationsCount:' + str(self.DataChangeNotificationsCount) + ', ' + \ |
13633
|
|
|
'EventNotificationsCount:' + str(self.EventNotificationsCount) + ', ' + \ |
13634
|
|
|
'NotificationsCount:' + str(self.NotificationsCount) + ', ' + \ |
13635
|
|
|
'LatePublishRequestCount:' + str(self.LatePublishRequestCount) + ', ' + \ |
13636
|
|
|
'CurrentKeepAliveCount:' + str(self.CurrentKeepAliveCount) + ', ' + \ |
13637
|
|
|
'CurrentLifetimeCount:' + str(self.CurrentLifetimeCount) + ', ' + \ |
13638
|
|
|
'UnacknowledgedMessageCount:' + str(self.UnacknowledgedMessageCount) + ', ' + \ |
13639
|
|
|
'DiscardedMessageCount:' + str(self.DiscardedMessageCount) + ', ' + \ |
13640
|
|
|
'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \ |
13641
|
|
|
'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ', ' + \ |
13642
|
|
|
'MonitoringQueueOverflowCount:' + str(self.MonitoringQueueOverflowCount) + ', ' + \ |
13643
|
|
|
'NextSequenceNumber:' + str(self.NextSequenceNumber) + ', ' + \ |
13644
|
1 |
|
'EventQueueOverFlowCount:' + str(self.EventQueueOverFlowCount) + ')' |
13645
|
|
|
|
13646
|
|
|
__repr__ = __str__ |
13647
|
|
|
|
13648
|
|
|
|
13649
|
|
|
class ModelChangeStructureDataType(FrozenClass): |
13650
|
|
|
''' |
13651
|
|
|
:ivar Affected: |
13652
|
|
|
:vartype Affected: NodeId |
13653
|
|
|
:ivar AffectedType: |
13654
|
|
|
:vartype AffectedType: NodeId |
13655
|
|
|
:ivar Verb: |
13656
|
|
|
:vartype Verb: Byte |
13657
|
|
|
''' |
13658
|
|
|
def __init__(self, binary=None): |
13659
|
|
|
if binary is not None: |
13660
|
|
|
self._binary_init(binary) |
13661
|
|
|
self._freeze = True |
13662
|
|
|
return |
13663
|
|
|
self.Affected = NodeId() |
13664
|
|
|
self.AffectedType = NodeId() |
13665
|
|
|
self.Verb = 0 |
13666
|
|
|
self._freeze = True |
13667
|
|
|
|
13668
|
|
|
def to_binary(self): |
13669
|
|
|
packet = [] |
13670
|
|
|
packet.append(self.Affected.to_binary()) |
13671
|
|
|
packet.append(self.AffectedType.to_binary()) |
13672
|
|
|
packet.append(uatype_Byte.pack(self.Verb)) |
13673
|
|
|
return b''.join(packet) |
13674
|
|
|
|
13675
|
|
|
@staticmethod |
13676
|
|
|
def from_binary(data): |
13677
|
1 |
|
return ModelChangeStructureDataType(data) |
13678
|
|
|
|
13679
|
|
|
def _binary_init(self, data): |
13680
|
1 |
|
self.Affected = NodeId.from_binary(data) |
13681
|
|
|
self.AffectedType = NodeId.from_binary(data) |
13682
|
|
|
self.Verb = uatype_Byte.unpack(data.read(1))[0] |
13683
|
|
|
|
13684
|
|
|
def __str__(self): |
13685
|
|
|
return 'ModelChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \ |
13686
|
|
|
'AffectedType:' + str(self.AffectedType) + ', ' + \ |
13687
|
|
|
'Verb:' + str(self.Verb) + ')' |
13688
|
|
|
|
13689
|
1 |
|
__repr__ = __str__ |
13690
|
|
|
|
13691
|
|
|
|
13692
|
|
|
class SemanticChangeStructureDataType(FrozenClass): |
13693
|
|
|
''' |
13694
|
|
|
:ivar Affected: |
13695
|
|
|
:vartype Affected: NodeId |
13696
|
|
|
:ivar AffectedType: |
13697
|
|
|
:vartype AffectedType: NodeId |
13698
|
|
|
''' |
13699
|
1 |
|
def __init__(self, binary=None): |
13700
|
|
|
if binary is not None: |
13701
|
|
|
self._binary_init(binary) |
13702
|
|
|
self._freeze = True |
13703
|
|
|
return |
13704
|
|
|
self.Affected = NodeId() |
13705
|
|
|
self.AffectedType = NodeId() |
13706
|
1 |
|
self._freeze = True |
13707
|
|
|
|
13708
|
|
|
def to_binary(self): |
13709
|
|
|
packet = [] |
13710
|
1 |
|
packet.append(self.Affected.to_binary()) |
13711
|
|
|
packet.append(self.AffectedType.to_binary()) |
13712
|
|
|
return b''.join(packet) |
13713
|
|
|
|
13714
|
|
|
@staticmethod |
13715
|
1 |
|
def from_binary(data): |
13716
|
|
|
return SemanticChangeStructureDataType(data) |
13717
|
|
|
|
13718
|
|
|
def _binary_init(self, data): |
13719
|
|
|
self.Affected = NodeId.from_binary(data) |
13720
|
1 |
|
self.AffectedType = NodeId.from_binary(data) |
13721
|
|
|
|
13722
|
|
|
def __str__(self): |
13723
|
1 |
|
return 'SemanticChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \ |
13724
|
|
|
'AffectedType:' + str(self.AffectedType) + ')' |
13725
|
|
|
|
13726
|
|
|
__repr__ = __str__ |
13727
|
|
|
|
13728
|
|
|
|
13729
|
|
|
class Range(FrozenClass): |
13730
|
1 |
|
''' |
13731
|
|
|
:ivar Low: |
13732
|
|
|
:vartype Low: Double |
13733
|
|
|
:ivar High: |
13734
|
|
|
:vartype High: Double |
13735
|
|
|
''' |
13736
|
|
|
def __init__(self, binary=None): |
13737
|
|
|
if binary is not None: |
13738
|
|
|
self._binary_init(binary) |
13739
|
1 |
|
self._freeze = True |
13740
|
|
|
return |
13741
|
|
|
self.Low = 0 |
13742
|
|
|
self.High = 0 |
13743
|
|
|
self._freeze = True |
13744
|
|
|
|
13745
|
1 |
|
def to_binary(self): |
13746
|
|
|
packet = [] |
13747
|
|
|
packet.append(uatype_Double.pack(self.Low)) |
13748
|
|
|
packet.append(uatype_Double.pack(self.High)) |
13749
|
1 |
|
return b''.join(packet) |
13750
|
|
|
|
13751
|
|
|
@staticmethod |
13752
|
|
|
def from_binary(data): |
13753
|
1 |
|
return Range(data) |
13754
|
|
|
|
13755
|
|
|
def _binary_init(self, data): |
13756
|
|
|
self.Low = uatype_Double.unpack(data.read(8))[0] |
13757
|
1 |
|
self.High = uatype_Double.unpack(data.read(8))[0] |
13758
|
|
|
|
13759
|
|
|
def __str__(self): |
13760
|
1 |
|
return 'Range(' + 'Low:' + str(self.Low) + ', ' + \ |
13761
|
|
|
'High:' + str(self.High) + ')' |
13762
|
|
|
|
13763
|
|
|
__repr__ = __str__ |
13764
|
|
|
|
13765
|
|
|
|
13766
|
|
|
class EUInformation(FrozenClass): |
13767
|
1 |
|
''' |
13768
|
|
|
:ivar NamespaceUri: |
13769
|
|
|
:vartype NamespaceUri: String |
13770
|
|
|
:ivar UnitId: |
13771
|
|
|
:vartype UnitId: Int32 |
13772
|
|
|
:ivar DisplayName: |
13773
|
|
|
:vartype DisplayName: LocalizedText |
13774
|
|
|
:ivar Description: |
13775
|
|
|
:vartype Description: LocalizedText |
13776
|
1 |
|
''' |
13777
|
|
|
def __init__(self, binary=None): |
13778
|
|
|
if binary is not None: |
13779
|
|
|
self._binary_init(binary) |
13780
|
|
|
self._freeze = True |
13781
|
|
|
return |
13782
|
1 |
|
self.NamespaceUri = '' |
13783
|
|
|
self.UnitId = 0 |
13784
|
|
|
self.DisplayName = LocalizedText() |
13785
|
|
|
self.Description = LocalizedText() |
13786
|
1 |
|
self._freeze = True |
13787
|
|
|
|
13788
|
|
|
def to_binary(self): |
13789
|
|
|
packet = [] |
13790
|
1 |
|
packet.append(pack_string(self.NamespaceUri)) |
13791
|
|
|
packet.append(uatype_Int32.pack(self.UnitId)) |
13792
|
|
|
packet.append(self.DisplayName.to_binary()) |
13793
|
|
|
packet.append(self.Description.to_binary()) |
13794
|
1 |
|
return b''.join(packet) |
13795
|
|
|
|
13796
|
|
|
@staticmethod |
13797
|
1 |
|
def from_binary(data): |
13798
|
|
|
return EUInformation(data) |
13799
|
|
|
|
13800
|
|
|
def _binary_init(self, data): |
13801
|
|
|
self.NamespaceUri = unpack_string(data) |
13802
|
|
|
self.UnitId = uatype_Int32.unpack(data.read(4))[0] |
13803
|
|
|
self.DisplayName = LocalizedText.from_binary(data) |
13804
|
|
|
self.Description = LocalizedText.from_binary(data) |
13805
|
|
|
|
13806
|
|
|
def __str__(self): |
13807
|
|
|
return 'EUInformation(' + 'NamespaceUri:' + str(self.NamespaceUri) + ', ' + \ |
13808
|
1 |
|
'UnitId:' + str(self.UnitId) + ', ' + \ |
13809
|
|
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
13810
|
|
|
'Description:' + str(self.Description) + ')' |
13811
|
|
|
|
13812
|
|
|
__repr__ = __str__ |
13813
|
|
|
|
13814
|
|
|
|
13815
|
|
|
class ComplexNumberType(FrozenClass): |
13816
|
|
|
''' |
13817
|
|
|
:ivar Real: |
13818
|
|
|
:vartype Real: Float |
13819
|
1 |
|
:ivar Imaginary: |
13820
|
|
|
:vartype Imaginary: Float |
13821
|
|
|
''' |
13822
|
|
|
def __init__(self, binary=None): |
13823
|
|
|
if binary is not None: |
13824
|
|
|
self._binary_init(binary) |
13825
|
|
|
self._freeze = True |
13826
|
|
|
return |
13827
|
1 |
|
self.Real = 0 |
13828
|
|
|
self.Imaginary = 0 |
13829
|
|
|
self._freeze = True |
13830
|
|
|
|
13831
|
1 |
|
def to_binary(self): |
13832
|
|
|
packet = [] |
13833
|
|
|
packet.append(uatype_Float.pack(self.Real)) |
13834
|
|
|
packet.append(uatype_Float.pack(self.Imaginary)) |
13835
|
|
|
return b''.join(packet) |
13836
|
|
|
|
13837
|
1 |
|
@staticmethod |
13838
|
|
|
def from_binary(data): |
13839
|
|
|
return ComplexNumberType(data) |
13840
|
|
|
|
13841
|
|
|
def _binary_init(self, data): |
13842
|
|
|
self.Real = uatype_Float.unpack(data.read(4))[0] |
13843
|
1 |
|
self.Imaginary = uatype_Float.unpack(data.read(4))[0] |
13844
|
|
|
|
13845
|
|
|
def __str__(self): |
13846
|
1 |
|
return 'ComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \ |
13847
|
|
|
'Imaginary:' + str(self.Imaginary) + ')' |
13848
|
|
|
|
13849
|
|
|
__repr__ = __str__ |
13850
|
|
|
|
13851
|
|
|
|
13852
|
|
|
class DoubleComplexNumberType(FrozenClass): |
13853
|
1 |
|
''' |
13854
|
|
|
:ivar Real: |
13855
|
|
|
:vartype Real: Double |
13856
|
|
|
:ivar Imaginary: |
13857
|
|
|
:vartype Imaginary: Double |
13858
|
|
|
''' |
13859
|
|
|
def __init__(self, binary=None): |
13860
|
|
|
if binary is not None: |
13861
|
|
|
self._binary_init(binary) |
13862
|
1 |
|
self._freeze = True |
13863
|
|
|
return |
13864
|
|
|
self.Real = 0 |
13865
|
|
|
self.Imaginary = 0 |
13866
|
|
|
self._freeze = True |
13867
|
|
|
|
13868
|
1 |
|
def to_binary(self): |
13869
|
|
|
packet = [] |
13870
|
|
|
packet.append(uatype_Double.pack(self.Real)) |
13871
|
|
|
packet.append(uatype_Double.pack(self.Imaginary)) |
13872
|
1 |
|
return b''.join(packet) |
13873
|
|
|
|
13874
|
|
|
@staticmethod |
13875
|
|
|
def from_binary(data): |
13876
|
1 |
|
return DoubleComplexNumberType(data) |
13877
|
|
|
|
13878
|
|
|
def _binary_init(self, data): |
13879
|
|
|
self.Real = uatype_Double.unpack(data.read(8))[0] |
13880
|
1 |
|
self.Imaginary = uatype_Double.unpack(data.read(8))[0] |
13881
|
|
|
|
13882
|
|
|
def __str__(self): |
13883
|
1 |
|
return 'DoubleComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \ |
13884
|
|
|
'Imaginary:' + str(self.Imaginary) + ')' |
13885
|
|
|
|
13886
|
|
|
__repr__ = __str__ |
13887
|
|
|
|
13888
|
|
|
|
13889
|
|
|
class AxisInformation(FrozenClass): |
13890
|
1 |
|
''' |
13891
|
|
|
:ivar EngineeringUnits: |
13892
|
|
|
:vartype EngineeringUnits: EUInformation |
13893
|
|
|
:ivar EURange: |
13894
|
|
|
:vartype EURange: Range |
13895
|
|
|
:ivar Title: |
13896
|
|
|
:vartype Title: LocalizedText |
13897
|
|
|
:ivar AxisScaleType: |
13898
|
|
|
:vartype AxisScaleType: AxisScaleEnumeration |
13899
|
1 |
|
:ivar AxisSteps: |
13900
|
|
|
:vartype AxisSteps: Double |
13901
|
|
|
''' |
13902
|
|
|
def __init__(self, binary=None): |
13903
|
|
|
if binary is not None: |
13904
|
|
|
self._binary_init(binary) |
13905
|
1 |
|
self._freeze = True |
13906
|
|
|
return |
13907
|
|
|
self.EngineeringUnits = EUInformation() |
13908
|
|
|
self.EURange = Range() |
13909
|
1 |
|
self.Title = LocalizedText() |
13910
|
|
|
self.AxisScaleType = AxisScaleEnumeration(0) |
13911
|
|
|
self.AxisSteps = [] |
13912
|
|
|
self._freeze = True |
13913
|
1 |
|
|
13914
|
|
|
def to_binary(self): |
13915
|
|
|
packet = [] |
13916
|
|
|
packet.append(self.EngineeringUnits.to_binary()) |
13917
|
1 |
|
packet.append(self.EURange.to_binary()) |
13918
|
|
|
packet.append(self.Title.to_binary()) |
13919
|
|
|
packet.append(uatype_UInt32.pack(self.AxisScaleType.value)) |
13920
|
1 |
|
packet.append(uatype_Int32.pack(len(self.AxisSteps))) |
13921
|
|
|
for fieldname in self.AxisSteps: |
13922
|
|
|
packet.append(uatype_Double.pack(fieldname)) |
13923
|
|
|
return b''.join(packet) |
13924
|
|
|
|
13925
|
|
|
@staticmethod |
13926
|
|
|
def from_binary(data): |
13927
|
|
|
return AxisInformation(data) |
13928
|
|
|
|
13929
|
|
|
def _binary_init(self, data): |
13930
|
|
|
self.EngineeringUnits = EUInformation.from_binary(data) |
13931
|
|
|
self.EURange = Range.from_binary(data) |
13932
|
|
|
self.Title = LocalizedText.from_binary(data) |
13933
|
1 |
|
self.AxisScaleType = AxisScaleEnumeration(uatype_UInt32.unpack(data.read(4))[0]) |
13934
|
|
|
self.AxisSteps = unpack_uatype_array('Double', data) |
13935
|
|
|
|
13936
|
|
|
def __str__(self): |
13937
|
|
|
return 'AxisInformation(' + 'EngineeringUnits:' + str(self.EngineeringUnits) + ', ' + \ |
13938
|
|
|
'EURange:' + str(self.EURange) + ', ' + \ |
13939
|
|
|
'Title:' + str(self.Title) + ', ' + \ |
13940
|
|
|
'AxisScaleType:' + str(self.AxisScaleType) + ', ' + \ |
13941
|
|
|
'AxisSteps:' + str(self.AxisSteps) + ')' |
13942
|
|
|
|
13943
|
|
|
__repr__ = __str__ |
13944
|
|
|
|
13945
|
1 |
|
|
13946
|
|
|
class XVType(FrozenClass): |
13947
|
|
|
''' |
13948
|
|
|
:ivar X: |
13949
|
|
|
:vartype X: Double |
13950
|
|
|
:ivar Value: |
13951
|
|
|
:vartype Value: Float |
13952
|
|
|
''' |
13953
|
|
|
def __init__(self, binary=None): |
13954
|
|
|
if binary is not None: |
13955
|
|
|
self._binary_init(binary) |
13956
|
1 |
|
self._freeze = True |
13957
|
|
|
return |
13958
|
|
|
self.X = 0 |
13959
|
|
|
self.Value = 0 |
13960
|
1 |
|
self._freeze = True |
13961
|
|
|
|
13962
|
|
|
def to_binary(self): |
13963
|
|
|
packet = [] |
13964
|
|
|
packet.append(uatype_Double.pack(self.X)) |
13965
|
|
|
packet.append(uatype_Float.pack(self.Value)) |
13966
|
|
|
return b''.join(packet) |
13967
|
1 |
|
|
13968
|
|
|
@staticmethod |
13969
|
|
|
def from_binary(data): |
13970
|
|
|
return XVType(data) |
13971
|
|
|
|
13972
|
|
|
def _binary_init(self, data): |
13973
|
|
|
self.X = uatype_Double.unpack(data.read(8))[0] |
13974
|
1 |
|
self.Value = uatype_Float.unpack(data.read(4))[0] |
13975
|
|
|
|
13976
|
|
|
def __str__(self): |
13977
|
1 |
|
return 'XVType(' + 'X:' + str(self.X) + ', ' + \ |
13978
|
|
|
'Value:' + str(self.Value) + ')' |
13979
|
|
|
|
13980
|
|
|
__repr__ = __str__ |
13981
|
|
|
|
13982
|
|
|
|
13983
|
|
|
class ProgramDiagnosticDataType(FrozenClass): |
13984
|
1 |
|
''' |
13985
|
|
|
:ivar CreateSessionId: |
13986
|
|
|
:vartype CreateSessionId: NodeId |
13987
|
|
|
:ivar CreateClientName: |
13988
|
|
|
:vartype CreateClientName: String |
13989
|
|
|
:ivar InvocationCreationTime: |
13990
|
|
|
:vartype InvocationCreationTime: DateTime |
13991
|
|
|
:ivar LastTransitionTime: |
13992
|
|
|
:vartype LastTransitionTime: DateTime |
13993
|
1 |
|
:ivar LastMethodCall: |
13994
|
|
|
:vartype LastMethodCall: String |
13995
|
|
|
:ivar LastMethodSessionId: |
13996
|
|
|
:vartype LastMethodSessionId: NodeId |
13997
|
|
|
:ivar LastMethodInputArguments: |
13998
|
|
|
:vartype LastMethodInputArguments: Argument |
13999
|
1 |
|
:ivar LastMethodOutputArguments: |
14000
|
|
|
:vartype LastMethodOutputArguments: Argument |
14001
|
|
|
:ivar LastMethodCallTime: |
14002
|
|
|
:vartype LastMethodCallTime: DateTime |
14003
|
1 |
|
:ivar LastMethodReturnStatus: |
14004
|
|
|
:vartype LastMethodReturnStatus: StatusResult |
14005
|
|
|
''' |
14006
|
|
|
def __init__(self, binary=None): |
14007
|
1 |
|
if binary is not None: |
14008
|
|
|
self._binary_init(binary) |
14009
|
|
|
self._freeze = True |
14010
|
|
|
return |
14011
|
1 |
|
self.CreateSessionId = NodeId() |
14012
|
|
|
self.CreateClientName = '' |
14013
|
|
|
self.InvocationCreationTime = datetime.now() |
14014
|
1 |
|
self.LastTransitionTime = datetime.now() |
14015
|
|
|
self.LastMethodCall = '' |
14016
|
|
|
self.LastMethodSessionId = NodeId() |
14017
|
|
|
self.LastMethodInputArguments = [] |
14018
|
|
|
self.LastMethodOutputArguments = [] |
14019
|
|
|
self.LastMethodCallTime = datetime.now() |
14020
|
|
|
self.LastMethodReturnStatus = StatusResult() |
14021
|
|
|
self._freeze = True |
14022
|
|
|
|
14023
|
|
|
def to_binary(self): |
14024
|
|
|
packet = [] |
14025
|
|
|
packet.append(self.CreateSessionId.to_binary()) |
14026
|
|
|
packet.append(pack_string(self.CreateClientName)) |
14027
|
|
|
packet.append(pack_datetime(self.InvocationCreationTime)) |
14028
|
|
|
packet.append(pack_datetime(self.LastTransitionTime)) |
14029
|
|
|
packet.append(pack_string(self.LastMethodCall)) |
14030
|
|
|
packet.append(self.LastMethodSessionId.to_binary()) |
14031
|
|
|
packet.append(uatype_Int32.pack(len(self.LastMethodInputArguments))) |
14032
|
|
|
for fieldname in self.LastMethodInputArguments: |
14033
|
|
|
packet.append(fieldname.to_binary()) |
14034
|
|
|
packet.append(uatype_Int32.pack(len(self.LastMethodOutputArguments))) |
14035
|
|
|
for fieldname in self.LastMethodOutputArguments: |
14036
|
|
|
packet.append(fieldname.to_binary()) |
14037
|
1 |
|
packet.append(pack_datetime(self.LastMethodCallTime)) |
14038
|
|
|
packet.append(self.LastMethodReturnStatus.to_binary()) |
14039
|
|
|
return b''.join(packet) |
14040
|
|
|
|
14041
|
|
|
@staticmethod |
14042
|
|
|
def from_binary(data): |
14043
|
|
|
return ProgramDiagnosticDataType(data) |
14044
|
|
|
|
14045
|
|
|
def _binary_init(self, data): |
14046
|
|
|
self.CreateSessionId = NodeId.from_binary(data) |
14047
|
|
|
self.CreateClientName = unpack_string(data) |
14048
|
|
|
self.InvocationCreationTime = unpack_datetime(data) |
14049
|
|
|
self.LastTransitionTime = unpack_datetime(data) |
14050
|
|
|
self.LastMethodCall = unpack_string(data) |
14051
|
|
|
self.LastMethodSessionId = NodeId.from_binary(data) |
14052
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
14053
|
|
|
array = [] |
14054
|
1 |
|
if length != -1: |
14055
|
|
|
for _ in range(0, length): |
14056
|
|
|
array.append(Argument.from_binary(data)) |
14057
|
|
|
self.LastMethodInputArguments = array |
14058
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
14059
|
|
|
array = [] |
14060
|
|
|
if length != -1: |
14061
|
|
|
for _ in range(0, length): |
14062
|
|
|
array.append(Argument.from_binary(data)) |
14063
|
|
|
self.LastMethodOutputArguments = array |
14064
|
|
|
self.LastMethodCallTime = unpack_datetime(data) |
14065
|
|
|
self.LastMethodReturnStatus = StatusResult.from_binary(data) |
14066
|
|
|
|
14067
|
|
|
def __str__(self): |
14068
|
|
|
return 'ProgramDiagnosticDataType(' + 'CreateSessionId:' + str(self.CreateSessionId) + ', ' + \ |
14069
|
|
|
'CreateClientName:' + str(self.CreateClientName) + ', ' + \ |
14070
|
|
|
'InvocationCreationTime:' + str(self.InvocationCreationTime) + ', ' + \ |
14071
|
|
|
'LastTransitionTime:' + str(self.LastTransitionTime) + ', ' + \ |
14072
|
1 |
|
'LastMethodCall:' + str(self.LastMethodCall) + ', ' + \ |
14073
|
|
|
'LastMethodSessionId:' + str(self.LastMethodSessionId) + ', ' + \ |
14074
|
|
|
'LastMethodInputArguments:' + str(self.LastMethodInputArguments) + ', ' + \ |
14075
|
|
|
'LastMethodOutputArguments:' + str(self.LastMethodOutputArguments) + ', ' + \ |
14076
|
1 |
|
'LastMethodCallTime:' + str(self.LastMethodCallTime) + ', ' + \ |
14077
|
|
|
'LastMethodReturnStatus:' + str(self.LastMethodReturnStatus) + ')' |
14078
|
|
|
|
14079
|
|
|
__repr__ = __str__ |
14080
|
|
|
|
14081
|
|
|
|
14082
|
|
|
class Annotation(FrozenClass): |
14083
|
|
|
''' |
14084
|
|
|
:ivar Message: |
14085
|
|
|
:vartype Message: String |
14086
|
|
|
:ivar UserName: |
14087
|
|
|
:vartype UserName: String |
14088
|
|
|
:ivar AnnotationTime: |
14089
|
|
|
:vartype AnnotationTime: DateTime |
14090
|
|
|
''' |
14091
|
|
|
def __init__(self, binary=None): |
14092
|
|
|
if binary is not None: |
14093
|
|
|
self._binary_init(binary) |
14094
|
|
|
self._freeze = True |
14095
|
|
|
return |
14096
|
|
|
self.Message = '' |
14097
|
|
|
self.UserName = '' |
14098
|
1 |
|
self.AnnotationTime = datetime.now() |
14099
|
|
|
self._freeze = True |
14100
|
|
|
|
14101
|
|
|
def to_binary(self): |
14102
|
|
|
packet = [] |
14103
|
|
|
packet.append(pack_string(self.Message)) |
14104
|
|
|
packet.append(pack_string(self.UserName)) |
14105
|
|
|
packet.append(pack_datetime(self.AnnotationTime)) |
14106
|
|
|
return b''.join(packet) |
14107
|
|
|
|
14108
|
|
|
@staticmethod |
14109
|
|
|
def from_binary(data): |
14110
|
1 |
|
return Annotation(data) |
14111
|
|
|
|
14112
|
|
|
def _binary_init(self, data): |
14113
|
1 |
|
self.Message = unpack_string(data) |
14114
|
|
|
self.UserName = unpack_string(data) |
14115
|
|
|
self.AnnotationTime = unpack_datetime(data) |
14116
|
|
|
|
14117
|
|
|
def __str__(self): |
14118
|
|
|
return 'Annotation(' + 'Message:' + str(self.Message) + ', ' + \ |
14119
|
|
|
'UserName:' + str(self.UserName) + ', ' + \ |
14120
|
|
|
'AnnotationTime:' + str(self.AnnotationTime) + ')' |
14121
|
|
|
|
14122
|
1 |
|
__repr__ = __str__ |
14123
|
|
|
|
14124
|
|
|
|
14125
|
|
|
ExtensionClasses = { |
14126
|
|
|
ObjectIds.TrustListDataType_Encoding_DefaultBinary: TrustListDataType, |
14127
|
|
|
ObjectIds.Argument_Encoding_DefaultBinary: Argument, |
14128
|
|
|
ObjectIds.EnumValueType_Encoding_DefaultBinary: EnumValueType, |
14129
|
|
|
ObjectIds.OptionSet_Encoding_DefaultBinary: OptionSet, |
14130
|
|
|
ObjectIds.Union_Encoding_DefaultBinary: Union, |
14131
|
|
|
ObjectIds.TimeZoneDataType_Encoding_DefaultBinary: TimeZoneDataType, |
14132
|
1 |
|
ObjectIds.ApplicationDescription_Encoding_DefaultBinary: ApplicationDescription, |
14133
|
|
|
ObjectIds.RequestHeader_Encoding_DefaultBinary: RequestHeader, |
14134
|
|
|
ObjectIds.ResponseHeader_Encoding_DefaultBinary: ResponseHeader, |
14135
|
|
|
ObjectIds.ServiceFault_Encoding_DefaultBinary: ServiceFault, |
14136
|
|
|
ObjectIds.FindServersRequest_Encoding_DefaultBinary: FindServersRequest, |
14137
|
|
|
ObjectIds.FindServersResponse_Encoding_DefaultBinary: FindServersResponse, |
14138
|
|
|
ObjectIds.ServerOnNetwork_Encoding_DefaultBinary: ServerOnNetwork, |
14139
|
1 |
|
ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary: FindServersOnNetworkRequest, |
14140
|
|
|
ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary: FindServersOnNetworkResponse, |
14141
|
|
|
ObjectIds.UserTokenPolicy_Encoding_DefaultBinary: UserTokenPolicy, |
14142
|
|
|
ObjectIds.EndpointDescription_Encoding_DefaultBinary: EndpointDescription, |
14143
|
1 |
|
ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary: GetEndpointsRequest, |
14144
|
|
|
ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary: GetEndpointsResponse, |
14145
|
|
|
ObjectIds.RegisteredServer_Encoding_DefaultBinary: RegisteredServer, |
14146
|
|
|
ObjectIds.RegisterServerRequest_Encoding_DefaultBinary: RegisterServerRequest, |
14147
|
|
|
ObjectIds.RegisterServerResponse_Encoding_DefaultBinary: RegisterServerResponse, |
14148
|
1 |
|
ObjectIds.DiscoveryConfiguration_Encoding_DefaultBinary: DiscoveryConfiguration, |
14149
|
|
|
ObjectIds.MdnsDiscoveryConfiguration_Encoding_DefaultBinary: MdnsDiscoveryConfiguration, |
14150
|
|
|
ObjectIds.RegisterServer2Request_Encoding_DefaultBinary: RegisterServer2Request, |
14151
|
|
|
ObjectIds.RegisterServer2Response_Encoding_DefaultBinary: RegisterServer2Response, |
14152
|
|
|
ObjectIds.ChannelSecurityToken_Encoding_DefaultBinary: ChannelSecurityToken, |
14153
|
1 |
|
ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary: OpenSecureChannelRequest, |
14154
|
|
|
ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary: OpenSecureChannelResponse, |
14155
|
|
|
ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary: CloseSecureChannelRequest, |
14156
|
1 |
|
ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary: CloseSecureChannelResponse, |
14157
|
|
|
ObjectIds.SignedSoftwareCertificate_Encoding_DefaultBinary: SignedSoftwareCertificate, |
14158
|
|
|
ObjectIds.SignatureData_Encoding_DefaultBinary: SignatureData, |
14159
|
|
|
ObjectIds.CreateSessionRequest_Encoding_DefaultBinary: CreateSessionRequest, |
14160
|
|
|
ObjectIds.CreateSessionResponse_Encoding_DefaultBinary: CreateSessionResponse, |
14161
|
|
|
ObjectIds.UserIdentityToken_Encoding_DefaultBinary: UserIdentityToken, |
14162
|
|
|
ObjectIds.AnonymousIdentityToken_Encoding_DefaultBinary: AnonymousIdentityToken, |
14163
|
|
|
ObjectIds.UserNameIdentityToken_Encoding_DefaultBinary: UserNameIdentityToken, |
14164
|
|
|
ObjectIds.X509IdentityToken_Encoding_DefaultBinary: X509IdentityToken, |
14165
|
|
|
ObjectIds.KerberosIdentityToken_Encoding_DefaultBinary: KerberosIdentityToken, |
14166
|
|
|
ObjectIds.IssuedIdentityToken_Encoding_DefaultBinary: IssuedIdentityToken, |
14167
|
|
|
ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary: ActivateSessionRequest, |
14168
|
|
|
ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary: ActivateSessionResponse, |
14169
|
|
|
ObjectIds.CloseSessionRequest_Encoding_DefaultBinary: CloseSessionRequest, |
14170
|
|
|
ObjectIds.CloseSessionResponse_Encoding_DefaultBinary: CloseSessionResponse, |
14171
|
|
|
ObjectIds.CancelRequest_Encoding_DefaultBinary: CancelRequest, |
14172
|
|
|
ObjectIds.CancelResponse_Encoding_DefaultBinary: CancelResponse, |
14173
|
|
|
ObjectIds.NodeAttributes_Encoding_DefaultBinary: NodeAttributes, |
14174
|
|
|
ObjectIds.ObjectAttributes_Encoding_DefaultBinary: ObjectAttributes, |
14175
|
|
|
ObjectIds.VariableAttributes_Encoding_DefaultBinary: VariableAttributes, |
14176
|
|
|
ObjectIds.MethodAttributes_Encoding_DefaultBinary: MethodAttributes, |
14177
|
|
|
ObjectIds.ObjectTypeAttributes_Encoding_DefaultBinary: ObjectTypeAttributes, |
14178
|
|
|
ObjectIds.VariableTypeAttributes_Encoding_DefaultBinary: VariableTypeAttributes, |
14179
|
|
|
ObjectIds.ReferenceTypeAttributes_Encoding_DefaultBinary: ReferenceTypeAttributes, |
14180
|
|
|
ObjectIds.DataTypeAttributes_Encoding_DefaultBinary: DataTypeAttributes, |
14181
|
|
|
ObjectIds.ViewAttributes_Encoding_DefaultBinary: ViewAttributes, |
14182
|
|
|
ObjectIds.AddNodesItem_Encoding_DefaultBinary: AddNodesItem, |
14183
|
|
|
ObjectIds.AddNodesResult_Encoding_DefaultBinary: AddNodesResult, |
14184
|
|
|
ObjectIds.AddNodesRequest_Encoding_DefaultBinary: AddNodesRequest, |
14185
|
|
|
ObjectIds.AddNodesResponse_Encoding_DefaultBinary: AddNodesResponse, |
14186
|
|
|
ObjectIds.AddReferencesItem_Encoding_DefaultBinary: AddReferencesItem, |
14187
|
|
|
ObjectIds.AddReferencesRequest_Encoding_DefaultBinary: AddReferencesRequest, |
14188
|
|
|
ObjectIds.AddReferencesResponse_Encoding_DefaultBinary: AddReferencesResponse, |
14189
|
|
|
ObjectIds.DeleteNodesItem_Encoding_DefaultBinary: DeleteNodesItem, |
14190
|
|
|
ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary: DeleteNodesRequest, |
14191
|
|
|
ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary: DeleteNodesResponse, |
14192
|
|
|
ObjectIds.DeleteReferencesItem_Encoding_DefaultBinary: DeleteReferencesItem, |
14193
|
|
|
ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary: DeleteReferencesRequest, |
14194
|
|
|
ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary: DeleteReferencesResponse, |
14195
|
|
|
ObjectIds.ViewDescription_Encoding_DefaultBinary: ViewDescription, |
14196
|
|
|
ObjectIds.BrowseDescription_Encoding_DefaultBinary: BrowseDescription, |
14197
|
|
|
ObjectIds.ReferenceDescription_Encoding_DefaultBinary: ReferenceDescription, |
14198
|
|
|
ObjectIds.BrowseResult_Encoding_DefaultBinary: BrowseResult, |
14199
|
|
|
ObjectIds.BrowseRequest_Encoding_DefaultBinary: BrowseRequest, |
14200
|
|
|
ObjectIds.BrowseResponse_Encoding_DefaultBinary: BrowseResponse, |
14201
|
|
|
ObjectIds.BrowseNextRequest_Encoding_DefaultBinary: BrowseNextRequest, |
14202
|
|
|
ObjectIds.BrowseNextResponse_Encoding_DefaultBinary: BrowseNextResponse, |
14203
|
|
|
ObjectIds.RelativePathElement_Encoding_DefaultBinary: RelativePathElement, |
14204
|
|
|
ObjectIds.RelativePath_Encoding_DefaultBinary: RelativePath, |
14205
|
|
|
ObjectIds.BrowsePath_Encoding_DefaultBinary: BrowsePath, |
14206
|
|
|
ObjectIds.BrowsePathTarget_Encoding_DefaultBinary: BrowsePathTarget, |
14207
|
|
|
ObjectIds.BrowsePathResult_Encoding_DefaultBinary: BrowsePathResult, |
14208
|
|
|
ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary: TranslateBrowsePathsToNodeIdsRequest, |
14209
|
|
|
ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary: TranslateBrowsePathsToNodeIdsResponse, |
14210
|
|
|
ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary: RegisterNodesRequest, |
14211
|
|
|
ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary: RegisterNodesResponse, |
14212
|
|
|
ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary: UnregisterNodesRequest, |
14213
|
|
|
ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary: UnregisterNodesResponse, |
14214
|
|
|
ObjectIds.EndpointConfiguration_Encoding_DefaultBinary: EndpointConfiguration, |
14215
|
|
|
ObjectIds.SupportedProfile_Encoding_DefaultBinary: SupportedProfile, |
14216
|
|
|
ObjectIds.SoftwareCertificate_Encoding_DefaultBinary: SoftwareCertificate, |
14217
|
|
|
ObjectIds.QueryDataDescription_Encoding_DefaultBinary: QueryDataDescription, |
14218
|
|
|
ObjectIds.NodeTypeDescription_Encoding_DefaultBinary: NodeTypeDescription, |
14219
|
|
|
ObjectIds.QueryDataSet_Encoding_DefaultBinary: QueryDataSet, |
14220
|
|
|
ObjectIds.NodeReference_Encoding_DefaultBinary: NodeReference, |
14221
|
|
|
ObjectIds.ContentFilterElement_Encoding_DefaultBinary: ContentFilterElement, |
14222
|
|
|
ObjectIds.ContentFilter_Encoding_DefaultBinary: ContentFilter, |
14223
|
|
|
ObjectIds.ElementOperand_Encoding_DefaultBinary: ElementOperand, |
14224
|
|
|
ObjectIds.LiteralOperand_Encoding_DefaultBinary: LiteralOperand, |
14225
|
|
|
ObjectIds.AttributeOperand_Encoding_DefaultBinary: AttributeOperand, |
14226
|
|
|
ObjectIds.SimpleAttributeOperand_Encoding_DefaultBinary: SimpleAttributeOperand, |
14227
|
|
|
ObjectIds.ContentFilterElementResult_Encoding_DefaultBinary: ContentFilterElementResult, |
14228
|
|
|
ObjectIds.ContentFilterResult_Encoding_DefaultBinary: ContentFilterResult, |
14229
|
|
|
ObjectIds.ParsingResult_Encoding_DefaultBinary: ParsingResult, |
14230
|
|
|
ObjectIds.QueryFirstRequest_Encoding_DefaultBinary: QueryFirstRequest, |
14231
|
|
|
ObjectIds.QueryFirstResponse_Encoding_DefaultBinary: QueryFirstResponse, |
14232
|
|
|
ObjectIds.QueryNextRequest_Encoding_DefaultBinary: QueryNextRequest, |
14233
|
|
|
ObjectIds.QueryNextResponse_Encoding_DefaultBinary: QueryNextResponse, |
14234
|
|
|
ObjectIds.ReadValueId_Encoding_DefaultBinary: ReadValueId, |
14235
|
|
|
ObjectIds.ReadRequest_Encoding_DefaultBinary: ReadRequest, |
14236
|
|
|
ObjectIds.ReadResponse_Encoding_DefaultBinary: ReadResponse, |
14237
|
|
|
ObjectIds.HistoryReadValueId_Encoding_DefaultBinary: HistoryReadValueId, |
14238
|
|
|
ObjectIds.HistoryReadResult_Encoding_DefaultBinary: HistoryReadResult, |
14239
|
|
|
ObjectIds.HistoryReadDetails_Encoding_DefaultBinary: HistoryReadDetails, |
14240
|
|
|
ObjectIds.ReadEventDetails_Encoding_DefaultBinary: ReadEventDetails, |
14241
|
|
|
ObjectIds.ReadRawModifiedDetails_Encoding_DefaultBinary: ReadRawModifiedDetails, |
14242
|
|
|
ObjectIds.ReadProcessedDetails_Encoding_DefaultBinary: ReadProcessedDetails, |
14243
|
|
|
ObjectIds.ReadAtTimeDetails_Encoding_DefaultBinary: ReadAtTimeDetails, |
14244
|
|
|
ObjectIds.HistoryData_Encoding_DefaultBinary: HistoryData, |
14245
|
|
|
ObjectIds.ModificationInfo_Encoding_DefaultBinary: ModificationInfo, |
14246
|
|
|
ObjectIds.HistoryModifiedData_Encoding_DefaultBinary: HistoryModifiedData, |
14247
|
|
|
ObjectIds.HistoryEvent_Encoding_DefaultBinary: HistoryEvent, |
14248
|
|
|
ObjectIds.HistoryReadRequest_Encoding_DefaultBinary: HistoryReadRequest, |
14249
|
|
|
ObjectIds.HistoryReadResponse_Encoding_DefaultBinary: HistoryReadResponse, |
14250
|
|
|
ObjectIds.WriteValue_Encoding_DefaultBinary: WriteValue, |
14251
|
|
|
ObjectIds.WriteRequest_Encoding_DefaultBinary: WriteRequest, |
14252
|
|
|
ObjectIds.WriteResponse_Encoding_DefaultBinary: WriteResponse, |
14253
|
|
|
ObjectIds.HistoryUpdateDetails_Encoding_DefaultBinary: HistoryUpdateDetails, |
14254
|
|
|
ObjectIds.UpdateDataDetails_Encoding_DefaultBinary: UpdateDataDetails, |
14255
|
|
|
ObjectIds.UpdateStructureDataDetails_Encoding_DefaultBinary: UpdateStructureDataDetails, |
14256
|
|
|
ObjectIds.UpdateEventDetails_Encoding_DefaultBinary: UpdateEventDetails, |
14257
|
|
|
ObjectIds.DeleteRawModifiedDetails_Encoding_DefaultBinary: DeleteRawModifiedDetails, |
14258
|
|
|
ObjectIds.DeleteAtTimeDetails_Encoding_DefaultBinary: DeleteAtTimeDetails, |
14259
|
|
|
ObjectIds.DeleteEventDetails_Encoding_DefaultBinary: DeleteEventDetails, |
14260
|
|
|
ObjectIds.HistoryUpdateResult_Encoding_DefaultBinary: HistoryUpdateResult, |
14261
|
|
|
ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary: HistoryUpdateRequest, |
14262
|
|
|
ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary: HistoryUpdateResponse, |
14263
|
|
|
ObjectIds.CallMethodRequest_Encoding_DefaultBinary: CallMethodRequest, |
14264
|
|
|
ObjectIds.CallMethodResult_Encoding_DefaultBinary: CallMethodResult, |
14265
|
|
|
ObjectIds.CallRequest_Encoding_DefaultBinary: CallRequest, |
14266
|
|
|
ObjectIds.CallResponse_Encoding_DefaultBinary: CallResponse, |
14267
|
|
|
ObjectIds.MonitoringFilter_Encoding_DefaultBinary: MonitoringFilter, |
14268
|
|
|
ObjectIds.DataChangeFilter_Encoding_DefaultBinary: DataChangeFilter, |
14269
|
|
|
ObjectIds.EventFilter_Encoding_DefaultBinary: EventFilter, |
14270
|
|
|
ObjectIds.AggregateConfiguration_Encoding_DefaultBinary: AggregateConfiguration, |
14271
|
|
|
ObjectIds.AggregateFilter_Encoding_DefaultBinary: AggregateFilter, |
14272
|
|
|
ObjectIds.MonitoringFilterResult_Encoding_DefaultBinary: MonitoringFilterResult, |
14273
|
|
|
ObjectIds.EventFilterResult_Encoding_DefaultBinary: EventFilterResult, |
14274
|
|
|
ObjectIds.AggregateFilterResult_Encoding_DefaultBinary: AggregateFilterResult, |
14275
|
|
|
ObjectIds.MonitoringParameters_Encoding_DefaultBinary: MonitoringParameters, |
14276
|
|
|
ObjectIds.MonitoredItemCreateRequest_Encoding_DefaultBinary: MonitoredItemCreateRequest, |
14277
|
|
|
ObjectIds.MonitoredItemCreateResult_Encoding_DefaultBinary: MonitoredItemCreateResult, |
14278
|
|
|
ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary: CreateMonitoredItemsRequest, |
14279
|
|
|
ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary: CreateMonitoredItemsResponse, |
14280
|
|
|
ObjectIds.MonitoredItemModifyRequest_Encoding_DefaultBinary: MonitoredItemModifyRequest, |
14281
|
|
|
ObjectIds.MonitoredItemModifyResult_Encoding_DefaultBinary: MonitoredItemModifyResult, |
14282
|
|
|
ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary: ModifyMonitoredItemsRequest, |
14283
|
|
|
ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary: ModifyMonitoredItemsResponse, |
14284
|
|
|
ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary: SetMonitoringModeRequest, |
14285
|
|
|
ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary: SetMonitoringModeResponse, |
14286
|
|
|
ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary: SetTriggeringRequest, |
14287
|
|
|
ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary: SetTriggeringResponse, |
14288
|
|
|
ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary: DeleteMonitoredItemsRequest, |
14289
|
|
|
ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary: DeleteMonitoredItemsResponse, |
14290
|
|
|
ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary: CreateSubscriptionRequest, |
14291
|
|
|
ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary: CreateSubscriptionResponse, |
14292
|
|
|
ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary: ModifySubscriptionRequest, |
14293
|
|
|
ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary: ModifySubscriptionResponse, |
14294
|
|
|
ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary: SetPublishingModeRequest, |
14295
|
|
|
ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary: SetPublishingModeResponse, |
14296
|
|
|
ObjectIds.NotificationMessage_Encoding_DefaultBinary: NotificationMessage, |
14297
|
|
|
ObjectIds.NotificationData_Encoding_DefaultBinary: NotificationData, |
14298
|
|
|
ObjectIds.DataChangeNotification_Encoding_DefaultBinary: DataChangeNotification, |
14299
|
|
|
ObjectIds.MonitoredItemNotification_Encoding_DefaultBinary: MonitoredItemNotification, |
14300
|
|
|
ObjectIds.EventNotificationList_Encoding_DefaultBinary: EventNotificationList, |
14301
|
|
|
ObjectIds.EventFieldList_Encoding_DefaultBinary: EventFieldList, |
14302
|
|
|
ObjectIds.HistoryEventFieldList_Encoding_DefaultBinary: HistoryEventFieldList, |
14303
|
|
|
ObjectIds.StatusChangeNotification_Encoding_DefaultBinary: StatusChangeNotification, |
14304
|
|
|
ObjectIds.SubscriptionAcknowledgement_Encoding_DefaultBinary: SubscriptionAcknowledgement, |
14305
|
|
|
ObjectIds.PublishRequest_Encoding_DefaultBinary: PublishRequest, |
14306
|
|
|
ObjectIds.PublishResponse_Encoding_DefaultBinary: PublishResponse, |
14307
|
|
|
ObjectIds.RepublishRequest_Encoding_DefaultBinary: RepublishRequest, |
14308
|
|
|
ObjectIds.RepublishResponse_Encoding_DefaultBinary: RepublishResponse, |
14309
|
|
|
ObjectIds.TransferResult_Encoding_DefaultBinary: TransferResult, |
14310
|
|
|
ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary: TransferSubscriptionsRequest, |
14311
|
|
|
ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary: TransferSubscriptionsResponse, |
14312
|
|
|
ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary: DeleteSubscriptionsRequest, |
14313
|
|
|
ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary: DeleteSubscriptionsResponse, |
14314
|
|
|
ObjectIds.BuildInfo_Encoding_DefaultBinary: BuildInfo, |
14315
|
|
|
ObjectIds.RedundantServerDataType_Encoding_DefaultBinary: RedundantServerDataType, |
14316
|
|
|
ObjectIds.EndpointUrlListDataType_Encoding_DefaultBinary: EndpointUrlListDataType, |
14317
|
|
|
ObjectIds.NetworkGroupDataType_Encoding_DefaultBinary: NetworkGroupDataType, |
14318
|
|
|
ObjectIds.SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary: SamplingIntervalDiagnosticsDataType, |
14319
|
|
|
ObjectIds.ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary: ServerDiagnosticsSummaryDataType, |
14320
|
|
|
ObjectIds.ServerStatusDataType_Encoding_DefaultBinary: ServerStatusDataType, |
14321
|
|
|
ObjectIds.SessionDiagnosticsDataType_Encoding_DefaultBinary: SessionDiagnosticsDataType, |
14322
|
|
|
ObjectIds.SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary: SessionSecurityDiagnosticsDataType, |
14323
|
|
|
ObjectIds.ServiceCounterDataType_Encoding_DefaultBinary: ServiceCounterDataType, |
14324
|
|
|
ObjectIds.StatusResult_Encoding_DefaultBinary: StatusResult, |
14325
|
|
|
ObjectIds.SubscriptionDiagnosticsDataType_Encoding_DefaultBinary: SubscriptionDiagnosticsDataType, |
14326
|
|
|
ObjectIds.ModelChangeStructureDataType_Encoding_DefaultBinary: ModelChangeStructureDataType, |
14327
|
|
|
ObjectIds.SemanticChangeStructureDataType_Encoding_DefaultBinary: SemanticChangeStructureDataType, |
14328
|
|
|
ObjectIds.Range_Encoding_DefaultBinary: Range, |
14329
|
|
|
ObjectIds.EUInformation_Encoding_DefaultBinary: EUInformation, |
14330
|
|
|
ObjectIds.ComplexNumberType_Encoding_DefaultBinary: ComplexNumberType, |
14331
|
|
|
ObjectIds.DoubleComplexNumberType_Encoding_DefaultBinary: DoubleComplexNumberType, |
14332
|
|
|
ObjectIds.AxisInformation_Encoding_DefaultBinary: AxisInformation, |
14333
|
|
|
ObjectIds.XVType_Encoding_DefaultBinary: XVType, |
14334
|
|
|
ObjectIds.ProgramDiagnosticDataType_Encoding_DefaultBinary: ProgramDiagnosticDataType, |
14335
|
|
|
ObjectIds.Annotation_Encoding_DefaultBinary: Annotation, |
14336
|
|
|
} |
14337
|
|
|
|
14338
|
|
|
|
14339
|
|
|
def extensionobject_from_binary(data): |
14340
|
|
|
""" |
14341
|
|
|
Convert binary-coded ExtensionObject to a Python object. |
14342
|
|
|
Returns an object, or None if TypeId is zero |
14343
|
|
|
""" |
14344
|
|
|
TypeId = NodeId.from_binary(data) |
14345
|
|
|
Encoding = ord(data.read(1)) |
14346
|
|
|
body = None |
14347
|
|
|
if Encoding & (1 << 0): |
14348
|
|
|
length = uatype_Int32.unpack(data.read(4))[0] |
14349
|
|
|
if length < 1: |
14350
|
|
|
body = Buffer(b"") |
14351
|
|
|
else: |
14352
|
|
|
body = data.copy(length) |
14353
|
|
|
data.skip(length) |
14354
|
|
|
if TypeId.Identifier == 0: |
14355
|
|
|
return None |
14356
|
|
|
elif TypeId.Identifier not in ExtensionClasses: |
14357
|
|
|
raise UAError("unknown ExtensionObject Type: {}".format(TypeId)) |
14358
|
|
|
klass = ExtensionClasses[TypeId.Identifier] |
14359
|
|
|
if body is None: |
14360
|
|
|
raise UAError("parsing ExtensionObject {} without data".format(klass.__name__)) |
14361
|
|
|
return klass.from_binary(body) |
14362
|
|
|
|
14363
|
|
|
|
14364
|
|
|
def extensionobject_to_binary(obj): |
14365
|
|
|
""" |
14366
|
|
|
Convert Python object to binary-coded ExtensionObject. |
14367
|
|
|
If obj is None, convert to empty ExtensionObject (TypeId = 0, no Body). |
14368
|
|
|
Returns a binary string |
14369
|
|
|
""" |
14370
|
1 |
|
TypeId = NodeId() |
14371
|
|
|
Encoding = 0 |
14372
|
|
|
Body = None |
14373
|
|
|
if obj is not None: |
14374
|
|
|
TypeId = FourByteNodeId(getattr(ObjectIds, "{}_Encoding_DefaultBinary".format(obj.__class__.__name__))) |
14375
|
1 |
|
Encoding |= (1 << 0) |
14376
|
1 |
|
Body = obj.to_binary() |
14377
|
1 |
|
packet = [] |
14378
|
1 |
|
packet.append(TypeId.to_binary()) |
14379
|
1 |
|
packet.append(uatype_UInt8.pack(Encoding)) |
14380
|
1 |
|
if Body: |
14381
|
|
|
packet.append(pack_bytes(Body)) |
14382
|
|
|
return b''.join(packet) |
14383
|
|
|
|