Completed
Pull Request — master (#494)
by Olivier
03:37
created

VariableAttributes.__str__()   A

Complexity

Conditions 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 14
ccs 1
cts 2
cp 0.5
crap 1.125
rs 9.4285
1
'''
2
Autogenerate code from xml spec
3
'''
4
5 1
from datetime import datetime
6 1
from enum import IntEnum
7
8 1
from opcua.ua.uatypes import *
9 1
from opcua.ua import ua_binary as uabin
10 1
from opcua.ua.object_ids import ObjectIds
11
12
13 1
class NamingRuleType(IntEnum):
14
    '''
15
    :ivar Mandatory:
16
    :vartype Mandatory: 1
17
    :ivar Optional:
18
    :vartype Optional: 2
19
    :ivar Constraint:
20
    :vartype Constraint: 3
21
    '''
22 1
    Mandatory = 1
23 1
    Optional = 2
24 1
    Constraint = 3
25
26
27 1
class OpenFileMode(IntEnum):
28
    '''
29
    :ivar Read:
30
    :vartype Read: 1
31
    :ivar Write:
32
    :vartype Write: 2
33
    :ivar EraseExisting:
34
    :vartype EraseExisting: 4
35
    :ivar Append:
36
    :vartype Append: 8
37
    '''
38 1
    Read = 1
39 1
    Write = 2
40 1
    EraseExisting = 4
41 1
    Append = 8
42
43
44 1
class TrustListMasks(IntEnum):
45
    '''
46
    :ivar None_:
47
    :vartype None_: 0
48
    :ivar TrustedCertificates:
49
    :vartype TrustedCertificates: 1
50
    :ivar TrustedCrls:
51
    :vartype TrustedCrls: 2
52
    :ivar IssuerCertificates:
53
    :vartype IssuerCertificates: 4
54
    :ivar IssuerCrls:
55
    :vartype IssuerCrls: 8
56
    :ivar All:
57
    :vartype All: 15
58
    '''
59 1
    None_ = 0
60 1
    TrustedCertificates = 1
61 1
    TrustedCrls = 2
62 1
    IssuerCertificates = 4
63 1
    IssuerCrls = 8
64 1
    All = 15
65
66
67 1
class IdType(IntEnum):
68
    '''
69
    The type of identifier used in a node id.
70
71
    :ivar Numeric:
72
    :vartype Numeric: 0
73
    :ivar String:
74
    :vartype String: 1
75
    :ivar Guid:
76
    :vartype Guid: 2
77
    :ivar Opaque:
78
    :vartype Opaque: 3
79
    '''
80 1
    Numeric = 0
81 1
    String = 1
82 1
    Guid = 2
83 1
    Opaque = 3
84
85
86 1
class NodeClass(IntEnum):
87
    '''
88
    A mask specifying the class of the node.
89
90
    :ivar Unspecified:
91
    :vartype Unspecified: 0
92
    :ivar Object:
93
    :vartype Object: 1
94
    :ivar Variable:
95
    :vartype Variable: 2
96
    :ivar Method:
97
    :vartype Method: 4
98
    :ivar ObjectType:
99
    :vartype ObjectType: 8
100
    :ivar VariableType:
101
    :vartype VariableType: 16
102
    :ivar ReferenceType:
103
    :vartype ReferenceType: 32
104
    :ivar DataType:
105
    :vartype DataType: 64
106
    :ivar View:
107
    :vartype View: 128
108
    '''
109 1
    Unspecified = 0
110 1
    Object = 1
111 1
    Variable = 2
112 1
    Method = 4
113 1
    ObjectType = 8
114 1
    VariableType = 16
115 1
    ReferenceType = 32
116 1
    DataType = 64
117 1
    View = 128
118
119
120 1
class ApplicationType(IntEnum):
121
    '''
122
    The types of applications.
123
124
    :ivar Server:
125
    :vartype Server: 0
126
    :ivar Client:
127
    :vartype Client: 1
128
    :ivar ClientAndServer:
129
    :vartype ClientAndServer: 2
130
    :ivar DiscoveryServer:
131
    :vartype DiscoveryServer: 3
132
    '''
133 1
    Server = 0
134 1
    Client = 1
135 1
    ClientAndServer = 2
136 1
    DiscoveryServer = 3
137
138
139 1
class MessageSecurityMode(IntEnum):
140
    '''
141
    The type of security to use on a message.
142
143
    :ivar Invalid:
144
    :vartype Invalid: 0
145
    :ivar None_:
146
    :vartype None_: 1
147
    :ivar Sign:
148
    :vartype Sign: 2
149
    :ivar SignAndEncrypt:
150
    :vartype SignAndEncrypt: 3
151
    '''
152 1
    Invalid = 0
153 1
    None_ = 1
154 1
    Sign = 2
155 1
    SignAndEncrypt = 3
156
157
158 1
class UserTokenType(IntEnum):
159
    '''
160
    The possible user token types.
161
162
    :ivar Anonymous:
163
    :vartype Anonymous: 0
164
    :ivar UserName:
165
    :vartype UserName: 1
166
    :ivar Certificate:
167
    :vartype Certificate: 2
168
    :ivar IssuedToken:
169
    :vartype IssuedToken: 3
170
    :ivar Kerberos:
171
    :vartype Kerberos: 4
172
    '''
173 1
    Anonymous = 0
174 1
    UserName = 1
175 1
    Certificate = 2
176 1
    IssuedToken = 3
177 1
    Kerberos = 4
178
179
180 1
class SecurityTokenRequestType(IntEnum):
181
    '''
182
    Indicates whether a token if being created or renewed.
183
184
    :ivar Issue:
185
    :vartype Issue: 0
186
    :ivar Renew:
187
    :vartype Renew: 1
188
    '''
189 1
    Issue = 0
190 1
    Renew = 1
191
192
193 1
class NodeAttributesMask(IntEnum):
194
    '''
195
    The bits used to specify default attributes for a new node.
196
197
    :ivar None_:
198
    :vartype None_: 0
199
    :ivar AccessLevel:
200
    :vartype AccessLevel: 1
201
    :ivar ArrayDimensions:
202
    :vartype ArrayDimensions: 2
203
    :ivar BrowseName:
204
    :vartype BrowseName: 4
205
    :ivar ContainsNoLoops:
206
    :vartype ContainsNoLoops: 8
207
    :ivar DataType:
208
    :vartype DataType: 16
209
    :ivar Description:
210
    :vartype Description: 32
211
    :ivar DisplayName:
212
    :vartype DisplayName: 64
213
    :ivar EventNotifier:
214
    :vartype EventNotifier: 128
215
    :ivar Executable:
216
    :vartype Executable: 256
217
    :ivar Historizing:
218
    :vartype Historizing: 512
219
    :ivar InverseName:
220
    :vartype InverseName: 1024
221
    :ivar IsAbstract:
222
    :vartype IsAbstract: 2048
223
    :ivar MinimumSamplingInterval:
224
    :vartype MinimumSamplingInterval: 4096
225
    :ivar NodeClass:
226
    :vartype NodeClass: 8192
227
    :ivar NodeId:
228
    :vartype NodeId: 16384
229
    :ivar Symmetric:
230
    :vartype Symmetric: 32768
231
    :ivar UserAccessLevel:
232
    :vartype UserAccessLevel: 65536
233
    :ivar UserExecutable:
234
    :vartype UserExecutable: 131072
235
    :ivar UserWriteMask:
236
    :vartype UserWriteMask: 262144
237
    :ivar ValueRank:
238
    :vartype ValueRank: 524288
239
    :ivar WriteMask:
240
    :vartype WriteMask: 1048576
241
    :ivar Value:
242
    :vartype Value: 2097152
243
    :ivar All:
244
    :vartype All: 4194303
245
    :ivar BaseNode:
246
    :vartype BaseNode: 1335396
247
    :ivar Object:
248
    :vartype Object: 1335524
249
    :ivar ObjectTypeOrDataType:
250
    :vartype ObjectTypeOrDataType: 1337444
251
    :ivar Variable:
252
    :vartype Variable: 4026999
253
    :ivar VariableType:
254
    :vartype VariableType: 3958902
255
    :ivar Method:
256
    :vartype Method: 1466724
257
    :ivar ReferenceType:
258
    :vartype ReferenceType: 1371236
259
    :ivar View:
260
    :vartype View: 1335532
261
    '''
262 1
    None_ = 0
263 1
    AccessLevel = 1
264 1
    ArrayDimensions = 2
265 1
    BrowseName = 4
266 1
    ContainsNoLoops = 8
267 1
    DataType = 16
268 1
    Description = 32
269 1
    DisplayName = 64
270 1
    EventNotifier = 128
271 1
    Executable = 256
272 1
    Historizing = 512
273 1
    InverseName = 1024
274 1
    IsAbstract = 2048
275 1
    MinimumSamplingInterval = 4096
276 1
    NodeClass = 8192
277 1
    NodeId = 16384
278 1
    Symmetric = 32768
279 1
    UserAccessLevel = 65536
280 1
    UserExecutable = 131072
281 1
    UserWriteMask = 262144
282 1
    ValueRank = 524288
283 1
    WriteMask = 1048576
284 1
    Value = 2097152
285 1
    All = 4194303
286 1
    BaseNode = 1335396
287 1
    Object = 1335524
288 1
    ObjectTypeOrDataType = 1337444
289 1
    Variable = 4026999
290 1
    VariableType = 3958902
291 1
    Method = 1466724
292 1
    ReferenceType = 1371236
293 1
    View = 1335532
294
295
296 1
class AttributeWriteMask(IntEnum):
297 View Code Duplication
    '''
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
298
    Define bits used to indicate which attributes are writable.
299
300
    :ivar None_:
301
    :vartype None_: 0
302
    :ivar AccessLevel:
303
    :vartype AccessLevel: 1
304
    :ivar ArrayDimensions:
305
    :vartype ArrayDimensions: 2
306
    :ivar BrowseName:
307
    :vartype BrowseName: 4
308
    :ivar ContainsNoLoops:
309
    :vartype ContainsNoLoops: 8
310
    :ivar DataType:
311
    :vartype DataType: 16
312
    :ivar Description:
313
    :vartype Description: 32
314
    :ivar DisplayName:
315
    :vartype DisplayName: 64
316
    :ivar EventNotifier:
317
    :vartype EventNotifier: 128
318
    :ivar Executable:
319
    :vartype Executable: 256
320
    :ivar Historizing:
321
    :vartype Historizing: 512
322
    :ivar InverseName:
323
    :vartype InverseName: 1024
324
    :ivar IsAbstract:
325
    :vartype IsAbstract: 2048
326
    :ivar MinimumSamplingInterval:
327
    :vartype MinimumSamplingInterval: 4096
328
    :ivar NodeClass:
329
    :vartype NodeClass: 8192
330
    :ivar NodeId:
331
    :vartype NodeId: 16384
332
    :ivar Symmetric:
333
    :vartype Symmetric: 32768
334
    :ivar UserAccessLevel:
335
    :vartype UserAccessLevel: 65536
336
    :ivar UserExecutable:
337
    :vartype UserExecutable: 131072
338
    :ivar UserWriteMask:
339
    :vartype UserWriteMask: 262144
340
    :ivar ValueRank:
341
    :vartype ValueRank: 524288
342
    :ivar WriteMask:
343
    :vartype WriteMask: 1048576
344
    :ivar ValueForVariableType:
345
    :vartype ValueForVariableType: 2097152
346
    '''
347 1
    None_ = 0
348 1
    AccessLevel = 1
349 1
    ArrayDimensions = 2
350 1
    BrowseName = 4
351 1
    ContainsNoLoops = 8
352 1
    DataType = 16
353 1
    Description = 32
354 1
    DisplayName = 64
355 1
    EventNotifier = 128
356 1
    Executable = 256
357 1
    Historizing = 512
358 1
    InverseName = 1024
359 1
    IsAbstract = 2048
360 1
    MinimumSamplingInterval = 4096
361 1
    NodeClass = 8192
362 1
    NodeId = 16384
363 1
    Symmetric = 32768
364 1
    UserAccessLevel = 65536
365 1
    UserExecutable = 131072
366 1
    UserWriteMask = 262144
367 1
    ValueRank = 524288
368 1
    WriteMask = 1048576
369 1
    ValueForVariableType = 2097152
370
371
372 1
class BrowseDirection(IntEnum):
373
    '''
374
    The directions of the references to return.
375
376
    :ivar Forward:
377
    :vartype Forward: 0
378
    :ivar Inverse:
379
    :vartype Inverse: 1
380
    :ivar Both:
381
    :vartype Both: 2
382
    '''
383 1
    Forward = 0
384 1
    Inverse = 1
385 1
    Both = 2
386
387
388 1
class BrowseResultMask(IntEnum):
389
    '''
390
    A bit mask which specifies what should be returned in a browse response.
391
392
    :ivar None_:
393
    :vartype None_: 0
394
    :ivar ReferenceTypeId:
395
    :vartype ReferenceTypeId: 1
396
    :ivar IsForward:
397
    :vartype IsForward: 2
398
    :ivar NodeClass:
399
    :vartype NodeClass: 4
400
    :ivar BrowseName:
401
    :vartype BrowseName: 8
402
    :ivar DisplayName:
403
    :vartype DisplayName: 16
404
    :ivar TypeDefinition:
405
    :vartype TypeDefinition: 32
406
    :ivar All:
407
    :vartype All: 63
408
    :ivar ReferenceTypeInfo:
409
    :vartype ReferenceTypeInfo: 3
410
    :ivar TargetInfo:
411
    :vartype TargetInfo: 60
412
    '''
413 1
    None_ = 0
414 1
    ReferenceTypeId = 1
415 1
    IsForward = 2
416 1
    NodeClass = 4
417 1
    BrowseName = 8
418 1
    DisplayName = 16
419 1
    TypeDefinition = 32
420 1
    All = 63
421 1
    ReferenceTypeInfo = 3
422 1
    TargetInfo = 60
423
424
425 1
class ComplianceLevel(IntEnum):
426
    '''
427
    :ivar Untested:
428
    :vartype Untested: 0
429
    :ivar Partial:
430
    :vartype Partial: 1
431
    :ivar SelfTested:
432
    :vartype SelfTested: 2
433
    :ivar Certified:
434
    :vartype Certified: 3
435
    '''
436 1
    Untested = 0
437 1
    Partial = 1
438 1
    SelfTested = 2
439 1
    Certified = 3
440
441
442 1
class FilterOperator(IntEnum):
443
    '''
444
    :ivar Equals:
445
    :vartype Equals: 0
446
    :ivar IsNull:
447
    :vartype IsNull: 1
448
    :ivar GreaterThan:
449
    :vartype GreaterThan: 2
450
    :ivar LessThan:
451
    :vartype LessThan: 3
452
    :ivar GreaterThanOrEqual:
453
    :vartype GreaterThanOrEqual: 4
454
    :ivar LessThanOrEqual:
455
    :vartype LessThanOrEqual: 5
456
    :ivar Like:
457
    :vartype Like: 6
458
    :ivar Not:
459
    :vartype Not: 7
460
    :ivar Between:
461
    :vartype Between: 8
462
    :ivar InList:
463
    :vartype InList: 9
464
    :ivar And:
465
    :vartype And: 10
466
    :ivar Or:
467
    :vartype Or: 11
468
    :ivar Cast:
469
    :vartype Cast: 12
470
    :ivar InView:
471
    :vartype InView: 13
472
    :ivar OfType:
473
    :vartype OfType: 14
474
    :ivar RelatedTo:
475
    :vartype RelatedTo: 15
476
    :ivar BitwiseAnd:
477
    :vartype BitwiseAnd: 16
478
    :ivar BitwiseOr:
479
    :vartype BitwiseOr: 17
480
    '''
481 1
    Equals = 0
482 1
    IsNull = 1
483 1
    GreaterThan = 2
484 1
    LessThan = 3
485 1
    GreaterThanOrEqual = 4
486 1
    LessThanOrEqual = 5
487 1
    Like = 6
488 1
    Not = 7
489 1
    Between = 8
490 1
    InList = 9
491 1
    And = 10
492 1
    Or = 11
493 1
    Cast = 12
494 1
    InView = 13
495 1
    OfType = 14
496 1
    RelatedTo = 15
497 1
    BitwiseAnd = 16
498 1
    BitwiseOr = 17
499
500
501 1
class TimestampsToReturn(IntEnum):
502
    '''
503
    :ivar Source:
504
    :vartype Source: 0
505
    :ivar Server:
506
    :vartype Server: 1
507
    :ivar Both:
508
    :vartype Both: 2
509
    :ivar Neither:
510
    :vartype Neither: 3
511
    '''
512 1
    Source = 0
513 1
    Server = 1
514 1
    Both = 2
515 1
    Neither = 3
516
517
518 1
class HistoryUpdateType(IntEnum):
519
    '''
520
    :ivar Insert:
521
    :vartype Insert: 1
522
    :ivar Replace:
523
    :vartype Replace: 2
524
    :ivar Update:
525
    :vartype Update: 3
526
    :ivar Delete:
527
    :vartype Delete: 4
528
    '''
529 1
    Insert = 1
530 1
    Replace = 2
531 1
    Update = 3
532 1
    Delete = 4
533
534
535 1
class PerformUpdateType(IntEnum):
536
    '''
537
    :ivar Insert:
538
    :vartype Insert: 1
539
    :ivar Replace:
540
    :vartype Replace: 2
541
    :ivar Update:
542
    :vartype Update: 3
543
    :ivar Remove:
544
    :vartype Remove: 4
545
    '''
546 1
    Insert = 1
547 1
    Replace = 2
548 1
    Update = 3
549 1
    Remove = 4
550
551
552 1
class MonitoringMode(IntEnum):
553
    '''
554
    :ivar Disabled:
555
    :vartype Disabled: 0
556
    :ivar Sampling:
557
    :vartype Sampling: 1
558
    :ivar Reporting:
559
    :vartype Reporting: 2
560
    '''
561 1
    Disabled = 0
562 1
    Sampling = 1
563 1
    Reporting = 2
564
565
566 1
class DataChangeTrigger(IntEnum):
567
    '''
568
    :ivar Status:
569
    :vartype Status: 0
570
    :ivar StatusValue:
571
    :vartype StatusValue: 1
572
    :ivar StatusValueTimestamp:
573
    :vartype StatusValueTimestamp: 2
574
    '''
575 1
    Status = 0
576 1
    StatusValue = 1
577 1
    StatusValueTimestamp = 2
578
579
580 1
class DeadbandType(IntEnum):
581
    '''
582
    :ivar None_:
583
    :vartype None_: 0
584
    :ivar Absolute:
585
    :vartype Absolute: 1
586
    :ivar Percent:
587
    :vartype Percent: 2
588
    '''
589 1
    None_ = 0
590 1
    Absolute = 1
591 1
    Percent = 2
592
593
594 1
class EnumeratedTestType(IntEnum):
595
    '''
596
    A simple enumerated type used for testing.
597
598
    :ivar Red:
599
    :vartype Red: 1
600
    :ivar Yellow:
601
    :vartype Yellow: 4
602
    :ivar Green:
603
    :vartype Green: 5
604
    '''
605 1
    Red = 1
606 1
    Yellow = 4
607 1
    Green = 5
608
609
610 1
class RedundancySupport(IntEnum):
611
    '''
612
    :ivar None_:
613
    :vartype None_: 0
614
    :ivar Cold:
615
    :vartype Cold: 1
616
    :ivar Warm:
617
    :vartype Warm: 2
618
    :ivar Hot:
619
    :vartype Hot: 3
620
    :ivar Transparent:
621
    :vartype Transparent: 4
622
    :ivar HotAndMirrored:
623
    :vartype HotAndMirrored: 5
624
    '''
625 1
    None_ = 0
626 1
    Cold = 1
627 1
    Warm = 2
628 1
    Hot = 3
629 1
    Transparent = 4
630 1
    HotAndMirrored = 5
631
632
633 1
class ServerState(IntEnum):
634
    '''
635
    :ivar Running:
636
    :vartype Running: 0
637
    :ivar Failed:
638
    :vartype Failed: 1
639
    :ivar NoConfiguration:
640
    :vartype NoConfiguration: 2
641
    :ivar Suspended:
642
    :vartype Suspended: 3
643
    :ivar Shutdown:
644
    :vartype Shutdown: 4
645
    :ivar Test:
646
    :vartype Test: 5
647
    :ivar CommunicationFault:
648
    :vartype CommunicationFault: 6
649
    :ivar Unknown:
650
    :vartype Unknown: 7
651
    '''
652 1
    Running = 0
653 1
    Failed = 1
654 1
    NoConfiguration = 2
655 1
    Suspended = 3
656 1
    Shutdown = 4
657 1
    Test = 5
658 1
    CommunicationFault = 6
659 1
    Unknown = 7
660
661
662 1
class ModelChangeStructureVerbMask(IntEnum):
663
    '''
664
    :ivar NodeAdded:
665
    :vartype NodeAdded: 1
666
    :ivar NodeDeleted:
667
    :vartype NodeDeleted: 2
668
    :ivar ReferenceAdded:
669
    :vartype ReferenceAdded: 4
670
    :ivar ReferenceDeleted:
671
    :vartype ReferenceDeleted: 8
672
    :ivar DataTypeChanged:
673
    :vartype DataTypeChanged: 16
674
    '''
675 1
    NodeAdded = 1
676 1
    NodeDeleted = 2
677 1
    ReferenceAdded = 4
678 1
    ReferenceDeleted = 8
679 1
    DataTypeChanged = 16
680
681
682 1
class AxisScaleEnumeration(IntEnum):
683
    '''
684
    :ivar Linear:
685
    :vartype Linear: 0
686
    :ivar Log:
687
    :vartype Log: 1
688
    :ivar Ln:
689
    :vartype Ln: 2
690
    '''
691 1
    Linear = 0
692 1
    Log = 1
693 1
    Ln = 2
694
695
696 1
class ExceptionDeviationFormat(IntEnum):
697
    '''
698
    :ivar AbsoluteValue:
699
    :vartype AbsoluteValue: 0
700
    :ivar PercentOfValue:
701
    :vartype PercentOfValue: 1
702
    :ivar PercentOfRange:
703
    :vartype PercentOfRange: 2
704
    :ivar PercentOfEURange:
705
    :vartype PercentOfEURange: 3
706
    :ivar Unknown:
707
    :vartype Unknown: 4
708
    '''
709 1
    AbsoluteValue = 0
710 1
    PercentOfValue = 1
711 1
    PercentOfRange = 2
712 1
    PercentOfEURange = 3
713 1
    Unknown = 4
714
715
716 1
class DiagnosticInfo(FrozenClass):
717
    '''
718
    A recursive structure containing diagnostic information associated with a status code.
719
720
    :ivar Encoding:
721
    :vartype Encoding: UInt8
722
    :ivar SymbolicId:
723
    :vartype SymbolicId: Int32
724
    :ivar NamespaceURI:
725
    :vartype NamespaceURI: Int32
726
    :ivar Locale:
727
    :vartype Locale: Int32
728
    :ivar LocalizedText:
729
    :vartype LocalizedText: Int32
730
    :ivar AdditionalInfo:
731
    :vartype AdditionalInfo: CharArray
732
    :ivar InnerStatusCode:
733
    :vartype InnerStatusCode: StatusCode
734
    :ivar InnerDiagnosticInfo:
735
    :vartype InnerDiagnosticInfo: DiagnosticInfo
736
    '''
737
738 1
    ua_types = {
739
        'Encoding': 'UInt8',
740
        'SymbolicId': 'Int32',
741
        'NamespaceURI': 'Int32',
742
        'Locale': 'Int32',
743
        'LocalizedText': 'Int32',
744
        'AdditionalInfo': 'CharArray',
745
        'InnerStatusCode': 'StatusCode',
746
        'InnerDiagnosticInfo': 'DiagnosticInfo',
747
               }
748
749 1
    def __init__(self, binary=None):
750
        if binary is not None:
751
            self._binary_init(binary)
752
            self._freeze = True
753
            return
754
        self.Encoding = 0
755
        self.SymbolicId = 0
756
        self.NamespaceURI = 0
757
        self.Locale = 0
758
        self.LocalizedText = 0
759
        self.AdditionalInfo = None
760
        self.InnerStatusCode = StatusCode()
761
        self.InnerDiagnosticInfo = None
762
        self._freeze = True
763
764 1
    def to_binary(self):
765
        packet = []
766
        if self.SymbolicId: self.Encoding |= (1 << 0)
767
        if self.NamespaceURI: self.Encoding |= (1 << 1)
768
        if self.Locale: self.Encoding |= (1 << 2)
769
        if self.LocalizedText: self.Encoding |= (1 << 3)
770
        if self.AdditionalInfo: self.Encoding |= (1 << 4)
771
        if self.InnerStatusCode: self.Encoding |= (1 << 5)
772
        if self.InnerDiagnosticInfo: self.Encoding |= (1 << 6)
773
        packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
774
        if self.SymbolicId: 
775
            packet.append(uabin.Primitives.Int32.pack(self.SymbolicId))
776
        if self.NamespaceURI: 
777
            packet.append(uabin.Primitives.Int32.pack(self.NamespaceURI))
778
        if self.Locale: 
779
            packet.append(uabin.Primitives.Int32.pack(self.Locale))
780
        if self.LocalizedText: 
781
            packet.append(uabin.Primitives.Int32.pack(self.LocalizedText))
782
        if self.AdditionalInfo: 
783
            packet.append(uabin.Primitives.CharArray.pack(self.AdditionalInfo))
784
        if self.InnerStatusCode: 
785
            packet.append(self.InnerStatusCode.to_binary())
786
        if self.InnerDiagnosticInfo: 
787
            packet.append(self.InnerDiagnosticInfo.to_binary())
788
        return b''.join(packet)
789
790 1
    @staticmethod
791
    def from_binary(data):
792
        return DiagnosticInfo(data)
793
794 1
    def _binary_init(self, data):
795
        self.Encoding = uabin.Primitives.UInt8.unpack(data)
796
        if self.Encoding & (1 << 0):
797
            self.SymbolicId = uabin.Primitives.Int32.unpack(data)
798
        else:
799
            self.SymbolicId = 0
800
        if self.Encoding & (1 << 1):
801
            self.NamespaceURI = uabin.Primitives.Int32.unpack(data)
802
        else:
803
            self.NamespaceURI = 0
804
        if self.Encoding & (1 << 2):
805
            self.Locale = uabin.Primitives.Int32.unpack(data)
806
        else:
807
            self.Locale = 0
808
        if self.Encoding & (1 << 3):
809
            self.LocalizedText = uabin.Primitives.Int32.unpack(data)
810
        else:
811
            self.LocalizedText = 0
812
        if self.Encoding & (1 << 4):
813
            self.AdditionalInfo = uabin.Primitives.CharArray.unpack(data)
814
        else:
815
            self.AdditionalInfo = None
816
        if self.Encoding & (1 << 5):
817
            self.InnerStatusCode = StatusCode.from_binary(data)
818
        else:
819
            self.InnerStatusCode = StatusCode()
820
        if self.Encoding & (1 << 6):
821
            self.InnerDiagnosticInfo = DiagnosticInfo.from_binary(data)
822
        else:
823
            self.InnerDiagnosticInfo = None
824
825 1
    def __str__(self):
826
        return 'DiagnosticInfo(' + 'Encoding:' + str(self.Encoding) + ', ' + \
827
               'SymbolicId:' + str(self.SymbolicId) + ', ' + \
828
               'NamespaceURI:' + str(self.NamespaceURI) + ', ' + \
829
               'Locale:' + str(self.Locale) + ', ' + \
830
               'LocalizedText:' + str(self.LocalizedText) + ', ' + \
831
               'AdditionalInfo:' + str(self.AdditionalInfo) + ', ' + \
832
               'InnerStatusCode:' + str(self.InnerStatusCode) + ', ' + \
833
               'InnerDiagnosticInfo:' + str(self.InnerDiagnosticInfo) + ')'
834
835 1
    __repr__ = __str__
836
837
838 1
class TrustListDataType(FrozenClass):
839
    '''
840
    :ivar SpecifiedLists:
841
    :vartype SpecifiedLists: UInt32
842
    :ivar TrustedCertificates:
843
    :vartype TrustedCertificates: ByteString
844
    :ivar TrustedCrls:
845
    :vartype TrustedCrls: ByteString
846
    :ivar IssuerCertificates:
847
    :vartype IssuerCertificates: ByteString
848
    :ivar IssuerCrls:
849
    :vartype IssuerCrls: ByteString
850
    '''
851
852 1
    ua_types = {
853
        'SpecifiedLists': 'UInt32',
854
        'TrustedCertificates': 'ByteString',
855
        'TrustedCrls': 'ByteString',
856
        'IssuerCertificates': 'ByteString',
857
        'IssuerCrls': 'ByteString',
858
               }
859
860 1
    def __init__(self, binary=None):
861
        if binary is not None:
862
            self._binary_init(binary)
863
            self._freeze = True
864
            return
865
        self.SpecifiedLists = 0
866
        self.TrustedCertificates = []
867
        self.TrustedCrls = []
868
        self.IssuerCertificates = []
869
        self.IssuerCrls = []
870
        self._freeze = True
871
872 1
    def to_binary(self):
873
        packet = []
874
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedLists))
875
        packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCertificates)))
876
        for fieldname in self.TrustedCertificates:
877
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
878
        packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCrls)))
879
        for fieldname in self.TrustedCrls:
880
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
881
        packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCertificates)))
882
        for fieldname in self.IssuerCertificates:
883
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
884
        packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCrls)))
885
        for fieldname in self.IssuerCrls:
886
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
887
        return b''.join(packet)
888
889 1
    @staticmethod
890
    def from_binary(data):
891
        return TrustListDataType(data)
892
893 1
    def _binary_init(self, data):
894
        self.SpecifiedLists = uabin.Primitives.UInt32.unpack(data)
895
        self.TrustedCertificates = uabin.Primitives.ByteString.unpack_array(data)
896
        self.TrustedCrls = uabin.Primitives.ByteString.unpack_array(data)
897
        self.IssuerCertificates = uabin.Primitives.ByteString.unpack_array(data)
898
        self.IssuerCrls = uabin.Primitives.ByteString.unpack_array(data)
899
900 1
    def __str__(self):
901
        return 'TrustListDataType(' + 'SpecifiedLists:' + str(self.SpecifiedLists) + ', ' + \
902
               'TrustedCertificates:' + str(self.TrustedCertificates) + ', ' + \
903
               'TrustedCrls:' + str(self.TrustedCrls) + ', ' + \
904
               'IssuerCertificates:' + str(self.IssuerCertificates) + ', ' + \
905
               'IssuerCrls:' + str(self.IssuerCrls) + ')'
906
907 1
    __repr__ = __str__
908
909
910 1 View Code Duplication
class Argument(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
911
    '''
912
    An argument for a method.
913
914
    :ivar Name:
915
    :vartype Name: String
916
    :ivar DataType:
917
    :vartype DataType: NodeId
918
    :ivar ValueRank:
919
    :vartype ValueRank: Int32
920
    :ivar ArrayDimensions:
921
    :vartype ArrayDimensions: UInt32
922
    :ivar Description:
923
    :vartype Description: LocalizedText
924
    '''
925
926 1
    ua_types = {
927
        'Name': 'String',
928
        'DataType': 'NodeId',
929
        'ValueRank': 'Int32',
930
        'ArrayDimensions': 'UInt32',
931
        'Description': 'LocalizedText',
932
               }
933
934 1
    def __init__(self, binary=None):
935
        if binary is not None:
936
            self._binary_init(binary)
937
            self._freeze = True
938
            return
939
        self.Name = None
940
        self.DataType = NodeId()
941
        self.ValueRank = 0
942
        self.ArrayDimensions = []
943
        self.Description = LocalizedText()
944
        self._freeze = True
945
946 1
    def to_binary(self):
947
        packet = []
948
        packet.append(uabin.Primitives.String.pack(self.Name))
949
        packet.append(self.DataType.to_binary())
950
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
951
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
952
        for fieldname in self.ArrayDimensions:
953
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
954
        packet.append(self.Description.to_binary())
955
        return b''.join(packet)
956
957 1
    @staticmethod
958
    def from_binary(data):
959
        return Argument(data)
960
961 1
    def _binary_init(self, data):
962
        self.Name = uabin.Primitives.String.unpack(data)
963
        self.DataType = NodeId.from_binary(data)
964
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
965
        self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
966
        self.Description = LocalizedText.from_binary(data)
967
968 1
    def __str__(self):
969
        return 'Argument(' + 'Name:' + str(self.Name) + ', ' + \
970
               'DataType:' + str(self.DataType) + ', ' + \
971
               'ValueRank:' + str(self.ValueRank) + ', ' + \
972
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
973
               'Description:' + str(self.Description) + ')'
974
975 1
    __repr__ = __str__
976
977
978 1
class EnumValueType(FrozenClass):
979
    '''
980
    A mapping between a value of an enumerated type and a name and description.
981
982
    :ivar Value:
983
    :vartype Value: Int64
984
    :ivar DisplayName:
985
    :vartype DisplayName: LocalizedText
986
    :ivar Description:
987
    :vartype Description: LocalizedText
988
    '''
989
990 1
    ua_types = {
991
        'Value': 'Int64',
992
        'DisplayName': 'LocalizedText',
993
        'Description': 'LocalizedText',
994
               }
995
996 1
    def __init__(self, binary=None):
997
        if binary is not None:
998
            self._binary_init(binary)
999
            self._freeze = True
1000
            return
1001
        self.Value = 0
1002
        self.DisplayName = LocalizedText()
1003
        self.Description = LocalizedText()
1004
        self._freeze = True
1005
1006 1
    def to_binary(self):
1007
        packet = []
1008
        packet.append(uabin.Primitives.Int64.pack(self.Value))
1009
        packet.append(self.DisplayName.to_binary())
1010
        packet.append(self.Description.to_binary())
1011
        return b''.join(packet)
1012
1013 1
    @staticmethod
1014
    def from_binary(data):
1015
        return EnumValueType(data)
1016
1017 1
    def _binary_init(self, data):
1018
        self.Value = uabin.Primitives.Int64.unpack(data)
1019
        self.DisplayName = LocalizedText.from_binary(data)
1020
        self.Description = LocalizedText.from_binary(data)
1021
1022 1
    def __str__(self):
1023
        return 'EnumValueType(' + 'Value:' + str(self.Value) + ', ' + \
1024
               'DisplayName:' + str(self.DisplayName) + ', ' + \
1025
               'Description:' + str(self.Description) + ')'
1026
1027 1
    __repr__ = __str__
1028
1029
1030 1 View Code Duplication
class OptionSet(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1031
    '''
1032
    This abstract Structured DataType is the base DataType for all DataTypes representing a bit mask.
1033
1034
    :ivar Value:
1035
    :vartype Value: ByteString
1036
    :ivar ValidBits:
1037
    :vartype ValidBits: ByteString
1038
    '''
1039
1040 1
    ua_types = {
1041
        'Value': 'ByteString',
1042
        'ValidBits': 'ByteString',
1043
               }
1044
1045 1
    def __init__(self, binary=None):
1046
        if binary is not None:
1047
            self._binary_init(binary)
1048
            self._freeze = True
1049
            return
1050
        self.Value = None
1051
        self.ValidBits = None
1052
        self._freeze = True
1053
1054 1
    def to_binary(self):
1055
        packet = []
1056
        packet.append(uabin.Primitives.ByteString.pack(self.Value))
1057
        packet.append(uabin.Primitives.ByteString.pack(self.ValidBits))
1058
        return b''.join(packet)
1059
1060 1
    @staticmethod
1061
    def from_binary(data):
1062
        return OptionSet(data)
1063
1064 1
    def _binary_init(self, data):
1065
        self.Value = uabin.Primitives.ByteString.unpack(data)
1066
        self.ValidBits = uabin.Primitives.ByteString.unpack(data)
1067
1068 1
    def __str__(self):
1069
        return 'OptionSet(' + 'Value:' + str(self.Value) + ', ' + \
1070
               'ValidBits:' + str(self.ValidBits) + ')'
1071
1072 1
    __repr__ = __str__
1073
1074
1075 1 View Code Duplication
class Union(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1076
    '''
1077
    This abstract DataType is the base DataType for all union DataTypes.
1078
1079
    '''
1080
1081 1
    ua_types = {
1082
               }
1083
1084 1
    def __init__(self, binary=None):
1085
        if binary is not None:
1086
            self._binary_init(binary)
1087
            self._freeze = True
1088
            return
1089
        self._freeze = True
1090
1091 1
    def to_binary(self):
1092
        packet = []
1093
        return b''.join(packet)
1094
1095 1
    @staticmethod
1096
    def from_binary(data):
1097
        return Union(data)
1098
1099 1
    def _binary_init(self, data):
1100
        pass
1101
1102 1
    def __str__(self):
1103
        return 'Union(' +  + ')'
1104
1105 1
    __repr__ = __str__
1106
1107
1108 1 View Code Duplication
class TimeZoneDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1109
    '''
1110
    :ivar Offset:
1111
    :vartype Offset: Int16
1112
    :ivar DaylightSavingInOffset:
1113
    :vartype DaylightSavingInOffset: Boolean
1114
    '''
1115
1116 1
    ua_types = {
1117
        'Offset': 'Int16',
1118
        'DaylightSavingInOffset': 'Boolean',
1119
               }
1120
1121 1
    def __init__(self, binary=None):
1122
        if binary is not None:
1123
            self._binary_init(binary)
1124
            self._freeze = True
1125
            return
1126
        self.Offset = 0
1127
        self.DaylightSavingInOffset = True
1128
        self._freeze = True
1129
1130 1
    def to_binary(self):
1131
        packet = []
1132
        packet.append(uabin.Primitives.Int16.pack(self.Offset))
1133
        packet.append(uabin.Primitives.Boolean.pack(self.DaylightSavingInOffset))
1134
        return b''.join(packet)
1135
1136 1
    @staticmethod
1137
    def from_binary(data):
1138
        return TimeZoneDataType(data)
1139
1140 1
    def _binary_init(self, data):
1141
        self.Offset = uabin.Primitives.Int16.unpack(data)
1142
        self.DaylightSavingInOffset = uabin.Primitives.Boolean.unpack(data)
1143
1144 1
    def __str__(self):
1145
        return 'TimeZoneDataType(' + 'Offset:' + str(self.Offset) + ', ' + \
1146
               'DaylightSavingInOffset:' + str(self.DaylightSavingInOffset) + ')'
1147
1148 1
    __repr__ = __str__
1149
1150
1151 1
class ApplicationDescription(FrozenClass):
1152
    '''
1153
    Describes an application and how to find it.
1154
1155
    :ivar ApplicationUri:
1156
    :vartype ApplicationUri: String
1157
    :ivar ProductUri:
1158
    :vartype ProductUri: String
1159
    :ivar ApplicationName:
1160
    :vartype ApplicationName: LocalizedText
1161
    :ivar ApplicationType:
1162
    :vartype ApplicationType: ApplicationType
1163
    :ivar GatewayServerUri:
1164
    :vartype GatewayServerUri: String
1165
    :ivar DiscoveryProfileUri:
1166
    :vartype DiscoveryProfileUri: String
1167
    :ivar DiscoveryUrls:
1168
    :vartype DiscoveryUrls: String
1169
    '''
1170
1171 1
    ua_types = {
1172
        'ApplicationUri': 'String',
1173
        'ProductUri': 'String',
1174
        'ApplicationName': 'LocalizedText',
1175
        'ApplicationType': 'ApplicationType',
1176
        'GatewayServerUri': 'String',
1177
        'DiscoveryProfileUri': 'String',
1178
        'DiscoveryUrls': 'String',
1179
               }
1180
1181 1
    def __init__(self, binary=None):
1182
        if binary is not None:
1183
            self._binary_init(binary)
1184
            self._freeze = True
1185
            return
1186
        self.ApplicationUri = None
1187
        self.ProductUri = None
1188
        self.ApplicationName = LocalizedText()
1189
        self.ApplicationType = ApplicationType(0)
1190
        self.GatewayServerUri = None
1191
        self.DiscoveryProfileUri = None
1192
        self.DiscoveryUrls = []
1193
        self._freeze = True
1194
1195 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1196
        packet = []
1197
        packet.append(uabin.Primitives.String.pack(self.ApplicationUri))
1198
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
1199
        packet.append(self.ApplicationName.to_binary())
1200
        packet.append(uabin.Primitives.UInt32.pack(self.ApplicationType.value))
1201
        packet.append(uabin.Primitives.String.pack(self.GatewayServerUri))
1202
        packet.append(uabin.Primitives.String.pack(self.DiscoveryProfileUri))
1203
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls)))
1204
        for fieldname in self.DiscoveryUrls:
1205
            packet.append(uabin.Primitives.String.pack(fieldname))
1206
        return b''.join(packet)
1207
1208 1
    @staticmethod
1209
    def from_binary(data):
1210
        return ApplicationDescription(data)
1211
1212 1
    def _binary_init(self, data):
1213
        self.ApplicationUri = uabin.Primitives.String.unpack(data)
1214
        self.ProductUri = uabin.Primitives.String.unpack(data)
1215
        self.ApplicationName = LocalizedText.from_binary(data)
1216
        self.ApplicationType = ApplicationType(uabin.Primitives.UInt32.unpack(data))
1217
        self.GatewayServerUri = uabin.Primitives.String.unpack(data)
1218
        self.DiscoveryProfileUri = uabin.Primitives.String.unpack(data)
1219
        self.DiscoveryUrls = uabin.Primitives.String.unpack_array(data)
1220
1221 1
    def __str__(self):
1222
        return 'ApplicationDescription(' + 'ApplicationUri:' + str(self.ApplicationUri) + ', ' + \
1223
               'ProductUri:' + str(self.ProductUri) + ', ' + \
1224
               'ApplicationName:' + str(self.ApplicationName) + ', ' + \
1225
               'ApplicationType:' + str(self.ApplicationType) + ', ' + \
1226
               'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \
1227
               'DiscoveryProfileUri:' + str(self.DiscoveryProfileUri) + ', ' + \
1228
               'DiscoveryUrls:' + str(self.DiscoveryUrls) + ')'
1229
1230 1
    __repr__ = __str__
1231
1232
1233 1
class RequestHeader(FrozenClass):
1234
    '''
1235
    The header passed with every server request.
1236
1237
    :ivar AuthenticationToken:
1238
    :vartype AuthenticationToken: NodeId
1239
    :ivar Timestamp:
1240
    :vartype Timestamp: DateTime
1241
    :ivar RequestHandle:
1242
    :vartype RequestHandle: UInt32
1243
    :ivar ReturnDiagnostics:
1244
    :vartype ReturnDiagnostics: UInt32
1245
    :ivar AuditEntryId:
1246
    :vartype AuditEntryId: String
1247
    :ivar TimeoutHint:
1248
    :vartype TimeoutHint: UInt32
1249
    :ivar AdditionalHeader:
1250
    :vartype AdditionalHeader: ExtensionObject
1251
    '''
1252
1253 1
    ua_types = {
1254
        'AuthenticationToken': 'NodeId',
1255
        'Timestamp': 'DateTime',
1256
        'RequestHandle': 'UInt32',
1257
        'ReturnDiagnostics': 'UInt32',
1258
        'AuditEntryId': 'String',
1259
        'TimeoutHint': 'UInt32',
1260
        'AdditionalHeader': 'ExtensionObject',
1261
               }
1262
1263 1
    def __init__(self, binary=None):
1264
        if binary is not None:
1265
            self._binary_init(binary)
1266
            self._freeze = True
1267
            return
1268
        self.AuthenticationToken = NodeId()
1269
        self.Timestamp = datetime.utcnow()
1270
        self.RequestHandle = 0
1271
        self.ReturnDiagnostics = 0
1272
        self.AuditEntryId = None
1273
        self.TimeoutHint = 0
1274
        self.AdditionalHeader = None
1275
        self._freeze = True
1276
1277 1
    def to_binary(self):
1278
        packet = []
1279
        packet.append(self.AuthenticationToken.to_binary())
1280
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
1281
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
1282
        packet.append(uabin.Primitives.UInt32.pack(self.ReturnDiagnostics))
1283
        packet.append(uabin.Primitives.String.pack(self.AuditEntryId))
1284
        packet.append(uabin.Primitives.UInt32.pack(self.TimeoutHint))
1285
        packet.append(extensionobject_to_binary(self.AdditionalHeader))
1286
        return b''.join(packet)
1287
1288 1
    @staticmethod
1289
    def from_binary(data):
1290
        return RequestHeader(data)
1291
1292 1
    def _binary_init(self, data):
1293
        self.AuthenticationToken = NodeId.from_binary(data)
1294
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
1295
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
1296
        self.ReturnDiagnostics = uabin.Primitives.UInt32.unpack(data)
1297
        self.AuditEntryId = uabin.Primitives.String.unpack(data)
1298
        self.TimeoutHint = uabin.Primitives.UInt32.unpack(data)
1299
        self.AdditionalHeader = extensionobject_from_binary(data)
1300
1301 1
    def __str__(self):
1302
        return 'RequestHeader(' + 'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \
1303
               'Timestamp:' + str(self.Timestamp) + ', ' + \
1304
               'RequestHandle:' + str(self.RequestHandle) + ', ' + \
1305
               'ReturnDiagnostics:' + str(self.ReturnDiagnostics) + ', ' + \
1306
               'AuditEntryId:' + str(self.AuditEntryId) + ', ' + \
1307
               'TimeoutHint:' + str(self.TimeoutHint) + ', ' + \
1308
               'AdditionalHeader:' + str(self.AdditionalHeader) + ')'
1309
1310 1
    __repr__ = __str__
1311
1312
1313 1
class ResponseHeader(FrozenClass):
1314
    '''
1315
    The header passed with every server response.
1316
1317
    :ivar Timestamp:
1318
    :vartype Timestamp: DateTime
1319
    :ivar RequestHandle:
1320
    :vartype RequestHandle: UInt32
1321
    :ivar ServiceResult:
1322
    :vartype ServiceResult: StatusCode
1323
    :ivar ServiceDiagnostics:
1324
    :vartype ServiceDiagnostics: DiagnosticInfo
1325
    :ivar StringTable:
1326
    :vartype StringTable: String
1327
    :ivar AdditionalHeader:
1328
    :vartype AdditionalHeader: ExtensionObject
1329
    '''
1330
1331 1
    ua_types = {
1332
        'Timestamp': 'DateTime',
1333
        'RequestHandle': 'UInt32',
1334
        'ServiceResult': 'StatusCode',
1335
        'ServiceDiagnostics': 'DiagnosticInfo',
1336
        'StringTable': 'String',
1337
        'AdditionalHeader': 'ExtensionObject',
1338
               }
1339
1340 1
    def __init__(self, binary=None):
1341
        if binary is not None:
1342
            self._binary_init(binary)
1343
            self._freeze = True
1344
            return
1345
        self.Timestamp = datetime.utcnow()
1346
        self.RequestHandle = 0
1347
        self.ServiceResult = StatusCode()
1348
        self.ServiceDiagnostics = DiagnosticInfo()
1349
        self.StringTable = []
1350
        self.AdditionalHeader = None
1351
        self._freeze = True
1352
1353 1
    def to_binary(self):
1354
        packet = []
1355
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
1356
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
1357
        packet.append(self.ServiceResult.to_binary())
1358
        packet.append(self.ServiceDiagnostics.to_binary())
1359
        packet.append(uabin.Primitives.Int32.pack(len(self.StringTable)))
1360
        for fieldname in self.StringTable:
1361
            packet.append(uabin.Primitives.String.pack(fieldname))
1362
        packet.append(extensionobject_to_binary(self.AdditionalHeader))
1363
        return b''.join(packet)
1364
1365 1
    @staticmethod
1366
    def from_binary(data):
1367
        return ResponseHeader(data)
1368
1369 1
    def _binary_init(self, data):
1370
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
1371
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
1372
        self.ServiceResult = StatusCode.from_binary(data)
1373
        self.ServiceDiagnostics = DiagnosticInfo.from_binary(data)
1374
        self.StringTable = uabin.Primitives.String.unpack_array(data)
1375
        self.AdditionalHeader = extensionobject_from_binary(data)
1376
1377 1
    def __str__(self):
1378
        return 'ResponseHeader(' + 'Timestamp:' + str(self.Timestamp) + ', ' + \
1379
               'RequestHandle:' + str(self.RequestHandle) + ', ' + \
1380
               'ServiceResult:' + str(self.ServiceResult) + ', ' + \
1381
               'ServiceDiagnostics:' + str(self.ServiceDiagnostics) + ', ' + \
1382
               'StringTable:' + str(self.StringTable) + ', ' + \
1383
               'AdditionalHeader:' + str(self.AdditionalHeader) + ')'
1384
1385 1
    __repr__ = __str__
1386
1387
1388 1
class ServiceFault(FrozenClass):
1389
    '''
1390
    The response returned by all services when there is a service level error.
1391
1392
    :ivar TypeId:
1393
    :vartype TypeId: NodeId
1394
    :ivar ResponseHeader:
1395
    :vartype ResponseHeader: ResponseHeader
1396
    '''
1397
1398 1
    ua_types = {
1399
        'TypeId': 'NodeId',
1400
        'ResponseHeader': 'ResponseHeader',
1401
               }
1402
1403 1
    def __init__(self, binary=None):
1404
        if binary is not None:
1405
            self._binary_init(binary)
1406
            self._freeze = True
1407
            return
1408
        self.TypeId = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary)
1409
        self.ResponseHeader = ResponseHeader()
1410
        self._freeze = True
1411
1412 1
    def to_binary(self):
1413
        packet = []
1414
        packet.append(self.TypeId.to_binary())
1415
        packet.append(self.ResponseHeader.to_binary())
1416
        return b''.join(packet)
1417
1418 1
    @staticmethod
1419
    def from_binary(data):
1420
        return ServiceFault(data)
1421
1422 1
    def _binary_init(self, data):
1423
        self.TypeId = NodeId.from_binary(data)
1424
        self.ResponseHeader = ResponseHeader.from_binary(data)
1425
1426 1
    def __str__(self):
1427
        return 'ServiceFault(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1428
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
1429
1430 1
    __repr__ = __str__
1431
1432
1433 1
class FindServersParameters(FrozenClass):
1434
    '''
1435
    :ivar EndpointUrl:
1436
    :vartype EndpointUrl: String
1437
    :ivar LocaleIds:
1438
    :vartype LocaleIds: String
1439
    :ivar ServerUris:
1440
    :vartype ServerUris: String
1441
    '''
1442
1443 1
    ua_types = {
1444
        'EndpointUrl': 'String',
1445
        'LocaleIds': 'String',
1446
        'ServerUris': 'String',
1447
               }
1448
1449 1
    def __init__(self, binary=None):
1450
        if binary is not None:
1451
            self._binary_init(binary)
1452
            self._freeze = True
1453
            return
1454
        self.EndpointUrl = None
1455
        self.LocaleIds = []
1456
        self.ServerUris = []
1457
        self._freeze = True
1458
1459 1
    def to_binary(self):
1460
        packet = []
1461
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
1462
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
1463
        for fieldname in self.LocaleIds:
1464
            packet.append(uabin.Primitives.String.pack(fieldname))
1465
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerUris)))
1466
        for fieldname in self.ServerUris:
1467
            packet.append(uabin.Primitives.String.pack(fieldname))
1468
        return b''.join(packet)
1469
1470 1
    @staticmethod
1471
    def from_binary(data):
1472
        return FindServersParameters(data)
1473
1474 1
    def _binary_init(self, data):
1475
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
1476
        self.LocaleIds = uabin.Primitives.String.unpack_array(data)
1477
        self.ServerUris = uabin.Primitives.String.unpack_array(data)
1478
1479 1
    def __str__(self):
1480
        return 'FindServersParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
1481
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
1482
               'ServerUris:' + str(self.ServerUris) + ')'
1483
1484 1
    __repr__ = __str__
1485
1486
1487 1
class FindServersRequest(FrozenClass):
1488
    '''
1489
    Finds the servers known to the discovery server.
1490
1491
    :ivar TypeId:
1492
    :vartype TypeId: NodeId
1493
    :ivar RequestHeader:
1494
    :vartype RequestHeader: RequestHeader
1495
    :ivar Parameters:
1496
    :vartype Parameters: FindServersParameters
1497
    '''
1498
1499 1
    ua_types = {
1500
        'TypeId': 'NodeId',
1501
        'RequestHeader': 'RequestHeader',
1502
        'Parameters': 'FindServersParameters',
1503
               }
1504
1505 1
    def __init__(self, binary=None):
1506
        if binary is not None:
1507
            self._binary_init(binary)
1508
            self._freeze = True
1509
            return
1510
        self.TypeId = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary)
1511
        self.RequestHeader = RequestHeader()
1512
        self.Parameters = FindServersParameters()
1513
        self._freeze = True
1514
1515 1
    def to_binary(self):
1516
        packet = []
1517
        packet.append(self.TypeId.to_binary())
1518
        packet.append(self.RequestHeader.to_binary())
1519
        packet.append(self.Parameters.to_binary())
1520
        return b''.join(packet)
1521
1522 1
    @staticmethod
1523
    def from_binary(data):
1524
        return FindServersRequest(data)
1525
1526 1
    def _binary_init(self, data):
1527
        self.TypeId = NodeId.from_binary(data)
1528
        self.RequestHeader = RequestHeader.from_binary(data)
1529
        self.Parameters = FindServersParameters.from_binary(data)
1530
1531 1
    def __str__(self):
1532
        return 'FindServersRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1533
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
1534
               'Parameters:' + str(self.Parameters) + ')'
1535
1536 1
    __repr__ = __str__
1537
1538
1539 1
class FindServersResponse(FrozenClass):
1540
    '''
1541
    Finds the servers known to the discovery server.
1542
1543
    :ivar TypeId:
1544
    :vartype TypeId: NodeId
1545
    :ivar ResponseHeader:
1546
    :vartype ResponseHeader: ResponseHeader
1547
    :ivar Servers:
1548
    :vartype Servers: ApplicationDescription
1549
    '''
1550
1551 1
    ua_types = {
1552
        'TypeId': 'NodeId',
1553
        'ResponseHeader': 'ResponseHeader',
1554
        'Servers': 'ApplicationDescription',
1555
               }
1556
1557 1
    def __init__(self, binary=None):
1558
        if binary is not None:
1559
            self._binary_init(binary)
1560
            self._freeze = True
1561
            return
1562
        self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary)
1563
        self.ResponseHeader = ResponseHeader()
1564
        self.Servers = []
1565
        self._freeze = True
1566
1567 1
    def to_binary(self):
1568
        packet = []
1569
        packet.append(self.TypeId.to_binary())
1570
        packet.append(self.ResponseHeader.to_binary())
1571
        packet.append(uabin.Primitives.Int32.pack(len(self.Servers)))
1572
        for fieldname in self.Servers:
1573
            packet.append(fieldname.to_binary())
1574
        return b''.join(packet)
1575
1576 1
    @staticmethod
1577
    def from_binary(data):
1578
        return FindServersResponse(data)
1579
1580 1
    def _binary_init(self, data):
1581
        self.TypeId = NodeId.from_binary(data)
1582
        self.ResponseHeader = ResponseHeader.from_binary(data)
1583
        length = uabin.Primitives.Int32.unpack(data)
1584
        array = []
1585
        if length != -1:
1586
            for _ in range(0, length):
1587
                array.append(ApplicationDescription.from_binary(data))
1588
        self.Servers = array
1589
1590 1
    def __str__(self):
1591
        return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1592
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
1593
               'Servers:' + str(self.Servers) + ')'
1594
1595 1
    __repr__ = __str__
1596
1597
1598 1 View Code Duplication
class ServerOnNetwork(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1599
    '''
1600
    :ivar RecordId:
1601
    :vartype RecordId: UInt32
1602
    :ivar ServerName:
1603
    :vartype ServerName: String
1604
    :ivar DiscoveryUrl:
1605
    :vartype DiscoveryUrl: String
1606
    :ivar ServerCapabilities:
1607
    :vartype ServerCapabilities: String
1608
    '''
1609
1610 1
    ua_types = {
1611
        'RecordId': 'UInt32',
1612
        'ServerName': 'String',
1613
        'DiscoveryUrl': 'String',
1614
        'ServerCapabilities': 'String',
1615
               }
1616
1617 1
    def __init__(self, binary=None):
1618
        if binary is not None:
1619
            self._binary_init(binary)
1620
            self._freeze = True
1621
            return
1622
        self.RecordId = 0
1623
        self.ServerName = None
1624
        self.DiscoveryUrl = None
1625
        self.ServerCapabilities = []
1626
        self._freeze = True
1627
1628 1
    def to_binary(self):
1629
        packet = []
1630
        packet.append(uabin.Primitives.UInt32.pack(self.RecordId))
1631
        packet.append(uabin.Primitives.String.pack(self.ServerName))
1632
        packet.append(uabin.Primitives.String.pack(self.DiscoveryUrl))
1633
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities)))
1634
        for fieldname in self.ServerCapabilities:
1635
            packet.append(uabin.Primitives.String.pack(fieldname))
1636
        return b''.join(packet)
1637
1638 1
    @staticmethod
1639
    def from_binary(data):
1640
        return ServerOnNetwork(data)
1641
1642 1
    def _binary_init(self, data):
1643
        self.RecordId = uabin.Primitives.UInt32.unpack(data)
1644
        self.ServerName = uabin.Primitives.String.unpack(data)
1645
        self.DiscoveryUrl = uabin.Primitives.String.unpack(data)
1646
        self.ServerCapabilities = uabin.Primitives.String.unpack_array(data)
1647
1648 1
    def __str__(self):
1649
        return 'ServerOnNetwork(' + 'RecordId:' + str(self.RecordId) + ', ' + \
1650
               'ServerName:' + str(self.ServerName) + ', ' + \
1651
               'DiscoveryUrl:' + str(self.DiscoveryUrl) + ', ' + \
1652
               'ServerCapabilities:' + str(self.ServerCapabilities) + ')'
1653
1654 1
    __repr__ = __str__
1655
1656
1657 1
class FindServersOnNetworkParameters(FrozenClass):
1658
    '''
1659
    :ivar StartingRecordId:
1660
    :vartype StartingRecordId: UInt32
1661
    :ivar MaxRecordsToReturn:
1662
    :vartype MaxRecordsToReturn: UInt32
1663
    :ivar ServerCapabilityFilter:
1664
    :vartype ServerCapabilityFilter: String
1665
    '''
1666
1667 1
    ua_types = {
1668
        'StartingRecordId': 'UInt32',
1669
        'MaxRecordsToReturn': 'UInt32',
1670
        'ServerCapabilityFilter': 'String',
1671
               }
1672
1673 1
    def __init__(self, binary=None):
1674
        if binary is not None:
1675
            self._binary_init(binary)
1676
            self._freeze = True
1677
            return
1678
        self.StartingRecordId = 0
1679
        self.MaxRecordsToReturn = 0
1680
        self.ServerCapabilityFilter = []
1681
        self._freeze = True
1682
1683 1
    def to_binary(self):
1684
        packet = []
1685
        packet.append(uabin.Primitives.UInt32.pack(self.StartingRecordId))
1686
        packet.append(uabin.Primitives.UInt32.pack(self.MaxRecordsToReturn))
1687
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilityFilter)))
1688
        for fieldname in self.ServerCapabilityFilter:
1689
            packet.append(uabin.Primitives.String.pack(fieldname))
1690
        return b''.join(packet)
1691
1692 1
    @staticmethod
1693
    def from_binary(data):
1694
        return FindServersOnNetworkParameters(data)
1695
1696 1
    def _binary_init(self, data):
1697
        self.StartingRecordId = uabin.Primitives.UInt32.unpack(data)
1698
        self.MaxRecordsToReturn = uabin.Primitives.UInt32.unpack(data)
1699
        self.ServerCapabilityFilter = uabin.Primitives.String.unpack_array(data)
1700
1701 1
    def __str__(self):
1702
        return 'FindServersOnNetworkParameters(' + 'StartingRecordId:' + str(self.StartingRecordId) + ', ' + \
1703
               'MaxRecordsToReturn:' + str(self.MaxRecordsToReturn) + ', ' + \
1704
               'ServerCapabilityFilter:' + str(self.ServerCapabilityFilter) + ')'
1705
1706 1
    __repr__ = __str__
1707
1708
1709 1
class FindServersOnNetworkRequest(FrozenClass):
1710
    '''
1711
    :ivar TypeId:
1712
    :vartype TypeId: NodeId
1713
    :ivar RequestHeader:
1714
    :vartype RequestHeader: RequestHeader
1715
    :ivar Parameters:
1716
    :vartype Parameters: FindServersOnNetworkParameters
1717
    '''
1718
1719 1
    ua_types = {
1720
        'TypeId': 'NodeId',
1721
        'RequestHeader': 'RequestHeader',
1722
        'Parameters': 'FindServersOnNetworkParameters',
1723
               }
1724
1725 1
    def __init__(self, binary=None):
1726
        if binary is not None:
1727
            self._binary_init(binary)
1728
            self._freeze = True
1729
            return
1730
        self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary)
1731
        self.RequestHeader = RequestHeader()
1732
        self.Parameters = FindServersOnNetworkParameters()
1733
        self._freeze = True
1734
1735 1
    def to_binary(self):
1736
        packet = []
1737
        packet.append(self.TypeId.to_binary())
1738
        packet.append(self.RequestHeader.to_binary())
1739
        packet.append(self.Parameters.to_binary())
1740
        return b''.join(packet)
1741
1742 1
    @staticmethod
1743
    def from_binary(data):
1744
        return FindServersOnNetworkRequest(data)
1745
1746 1
    def _binary_init(self, data):
1747
        self.TypeId = NodeId.from_binary(data)
1748
        self.RequestHeader = RequestHeader.from_binary(data)
1749
        self.Parameters = FindServersOnNetworkParameters.from_binary(data)
1750
1751 1
    def __str__(self):
1752
        return 'FindServersOnNetworkRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1753
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
1754
               'Parameters:' + str(self.Parameters) + ')'
1755
1756 1
    __repr__ = __str__
1757
1758
1759 1 View Code Duplication
class FindServersOnNetworkResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1760
    '''
1761
    :ivar LastCounterResetTime:
1762
    :vartype LastCounterResetTime: DateTime
1763
    :ivar Servers:
1764
    :vartype Servers: ServerOnNetwork
1765
    '''
1766
1767 1
    ua_types = {
1768
        'LastCounterResetTime': 'DateTime',
1769
        'Servers': 'ServerOnNetwork',
1770
               }
1771
1772 1
    def __init__(self, binary=None):
1773
        if binary is not None:
1774
            self._binary_init(binary)
1775
            self._freeze = True
1776
            return
1777
        self.LastCounterResetTime = datetime.utcnow()
1778
        self.Servers = []
1779
        self._freeze = True
1780
1781 1
    def to_binary(self):
1782
        packet = []
1783
        packet.append(uabin.Primitives.DateTime.pack(self.LastCounterResetTime))
1784
        packet.append(uabin.Primitives.Int32.pack(len(self.Servers)))
1785
        for fieldname in self.Servers:
1786
            packet.append(fieldname.to_binary())
1787
        return b''.join(packet)
1788
1789 1
    @staticmethod
1790
    def from_binary(data):
1791
        return FindServersOnNetworkResult(data)
1792
1793 1
    def _binary_init(self, data):
1794
        self.LastCounterResetTime = uabin.Primitives.DateTime.unpack(data)
1795
        length = uabin.Primitives.Int32.unpack(data)
1796
        array = []
1797
        if length != -1:
1798
            for _ in range(0, length):
1799
                array.append(ServerOnNetwork.from_binary(data))
1800
        self.Servers = array
1801
1802 1
    def __str__(self):
1803
        return 'FindServersOnNetworkResult(' + 'LastCounterResetTime:' + str(self.LastCounterResetTime) + ', ' + \
1804
               'Servers:' + str(self.Servers) + ')'
1805
1806 1
    __repr__ = __str__
1807
1808
1809 1
class FindServersOnNetworkResponse(FrozenClass):
1810
    '''
1811
    :ivar TypeId:
1812
    :vartype TypeId: NodeId
1813
    :ivar ResponseHeader:
1814
    :vartype ResponseHeader: ResponseHeader
1815
    :ivar Parameters:
1816
    :vartype Parameters: FindServersOnNetworkResult
1817
    '''
1818
1819 1
    ua_types = {
1820
        'TypeId': 'NodeId',
1821
        'ResponseHeader': 'ResponseHeader',
1822
        'Parameters': 'FindServersOnNetworkResult',
1823
               }
1824
1825 1
    def __init__(self, binary=None):
1826
        if binary is not None:
1827
            self._binary_init(binary)
1828
            self._freeze = True
1829
            return
1830
        self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary)
1831
        self.ResponseHeader = ResponseHeader()
1832
        self.Parameters = FindServersOnNetworkResult()
1833
        self._freeze = True
1834
1835 1
    def to_binary(self):
1836
        packet = []
1837
        packet.append(self.TypeId.to_binary())
1838
        packet.append(self.ResponseHeader.to_binary())
1839
        packet.append(self.Parameters.to_binary())
1840
        return b''.join(packet)
1841
1842 1
    @staticmethod
1843
    def from_binary(data):
1844
        return FindServersOnNetworkResponse(data)
1845
1846 1
    def _binary_init(self, data):
1847
        self.TypeId = NodeId.from_binary(data)
1848
        self.ResponseHeader = ResponseHeader.from_binary(data)
1849
        self.Parameters = FindServersOnNetworkResult.from_binary(data)
1850
1851 1
    def __str__(self):
1852
        return 'FindServersOnNetworkResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1853
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
1854
               'Parameters:' + str(self.Parameters) + ')'
1855
1856 1
    __repr__ = __str__
1857
1858
1859 1 View Code Duplication
class UserTokenPolicy(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1860
    '''
1861
    Describes a user token that can be used with a server.
1862
1863
    :ivar PolicyId:
1864
    :vartype PolicyId: String
1865
    :ivar TokenType:
1866
    :vartype TokenType: UserTokenType
1867
    :ivar IssuedTokenType:
1868
    :vartype IssuedTokenType: String
1869
    :ivar IssuerEndpointUrl:
1870
    :vartype IssuerEndpointUrl: String
1871
    :ivar SecurityPolicyUri:
1872
    :vartype SecurityPolicyUri: String
1873
    '''
1874
1875 1
    ua_types = {
1876
        'PolicyId': 'String',
1877
        'TokenType': 'UserTokenType',
1878
        'IssuedTokenType': 'String',
1879
        'IssuerEndpointUrl': 'String',
1880
        'SecurityPolicyUri': 'String',
1881
               }
1882
1883 1
    def __init__(self, binary=None):
1884
        if binary is not None:
1885
            self._binary_init(binary)
1886
            self._freeze = True
1887
            return
1888
        self.PolicyId = None
1889
        self.TokenType = UserTokenType(0)
1890
        self.IssuedTokenType = None
1891
        self.IssuerEndpointUrl = None
1892
        self.SecurityPolicyUri = None
1893
        self._freeze = True
1894
1895 1
    def to_binary(self):
1896
        packet = []
1897
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
1898
        packet.append(uabin.Primitives.UInt32.pack(self.TokenType.value))
1899
        packet.append(uabin.Primitives.String.pack(self.IssuedTokenType))
1900
        packet.append(uabin.Primitives.String.pack(self.IssuerEndpointUrl))
1901
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
1902
        return b''.join(packet)
1903
1904 1
    @staticmethod
1905
    def from_binary(data):
1906
        return UserTokenPolicy(data)
1907
1908 1
    def _binary_init(self, data):
1909
        self.PolicyId = uabin.Primitives.String.unpack(data)
1910
        self.TokenType = UserTokenType(uabin.Primitives.UInt32.unpack(data))
1911
        self.IssuedTokenType = uabin.Primitives.String.unpack(data)
1912
        self.IssuerEndpointUrl = uabin.Primitives.String.unpack(data)
1913
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
1914
1915 1
    def __str__(self):
1916
        return 'UserTokenPolicy(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
1917
               'TokenType:' + str(self.TokenType) + ', ' + \
1918
               'IssuedTokenType:' + str(self.IssuedTokenType) + ', ' + \
1919
               'IssuerEndpointUrl:' + str(self.IssuerEndpointUrl) + ', ' + \
1920
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ')'
1921
1922 1
    __repr__ = __str__
1923
1924
1925 1
class EndpointDescription(FrozenClass):
1926
    '''
1927
    The description of a endpoint that can be used to access a server.
1928
1929
    :ivar EndpointUrl:
1930
    :vartype EndpointUrl: String
1931
    :ivar Server:
1932
    :vartype Server: ApplicationDescription
1933
    :ivar ServerCertificate:
1934
    :vartype ServerCertificate: ByteString
1935
    :ivar SecurityMode:
1936
    :vartype SecurityMode: MessageSecurityMode
1937
    :ivar SecurityPolicyUri:
1938
    :vartype SecurityPolicyUri: String
1939
    :ivar UserIdentityTokens:
1940
    :vartype UserIdentityTokens: UserTokenPolicy
1941
    :ivar TransportProfileUri:
1942
    :vartype TransportProfileUri: String
1943
    :ivar SecurityLevel:
1944
    :vartype SecurityLevel: Byte
1945
    '''
1946
1947 1
    ua_types = {
1948
        'EndpointUrl': 'String',
1949
        'Server': 'ApplicationDescription',
1950
        'ServerCertificate': 'ByteString',
1951
        'SecurityMode': 'MessageSecurityMode',
1952
        'SecurityPolicyUri': 'String',
1953
        'UserIdentityTokens': 'UserTokenPolicy',
1954
        'TransportProfileUri': 'String',
1955
        'SecurityLevel': 'Byte',
1956
               }
1957
1958 1
    def __init__(self, binary=None):
1959
        if binary is not None:
1960
            self._binary_init(binary)
1961
            self._freeze = True
1962
            return
1963
        self.EndpointUrl = None
1964
        self.Server = ApplicationDescription()
1965
        self.ServerCertificate = None
1966
        self.SecurityMode = MessageSecurityMode(0)
1967
        self.SecurityPolicyUri = None
1968
        self.UserIdentityTokens = []
1969
        self.TransportProfileUri = None
1970
        self.SecurityLevel = 0
1971
        self._freeze = True
1972
1973 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1974
        packet = []
1975
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
1976
        packet.append(self.Server.to_binary())
1977
        packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate))
1978
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
1979
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
1980
        packet.append(uabin.Primitives.Int32.pack(len(self.UserIdentityTokens)))
1981
        for fieldname in self.UserIdentityTokens:
1982
            packet.append(fieldname.to_binary())
1983
        packet.append(uabin.Primitives.String.pack(self.TransportProfileUri))
1984
        packet.append(uabin.Primitives.Byte.pack(self.SecurityLevel))
1985
        return b''.join(packet)
1986
1987 1
    @staticmethod
1988
    def from_binary(data):
1989
        return EndpointDescription(data)
1990
1991 1
    def _binary_init(self, data):
1992
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
1993
        self.Server = ApplicationDescription.from_binary(data)
1994
        self.ServerCertificate = uabin.Primitives.ByteString.unpack(data)
1995
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
1996
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
1997
        length = uabin.Primitives.Int32.unpack(data)
1998
        array = []
1999
        if length != -1:
2000
            for _ in range(0, length):
2001
                array.append(UserTokenPolicy.from_binary(data))
2002
        self.UserIdentityTokens = array
2003
        self.TransportProfileUri = uabin.Primitives.String.unpack(data)
2004
        self.SecurityLevel = uabin.Primitives.Byte.unpack(data)
2005
2006 1
    def __str__(self):
2007
        return 'EndpointDescription(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
2008
               'Server:' + str(self.Server) + ', ' + \
2009
               'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \
2010
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
2011
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \
2012
               'UserIdentityTokens:' + str(self.UserIdentityTokens) + ', ' + \
2013
               'TransportProfileUri:' + str(self.TransportProfileUri) + ', ' + \
2014
               'SecurityLevel:' + str(self.SecurityLevel) + ')'
2015
2016 1
    __repr__ = __str__
2017
2018
2019 1
class GetEndpointsParameters(FrozenClass):
2020
    '''
2021
    :ivar EndpointUrl:
2022
    :vartype EndpointUrl: String
2023
    :ivar LocaleIds:
2024
    :vartype LocaleIds: String
2025
    :ivar ProfileUris:
2026
    :vartype ProfileUris: String
2027
    '''
2028
2029 1
    ua_types = {
2030
        'EndpointUrl': 'String',
2031
        'LocaleIds': 'String',
2032
        'ProfileUris': 'String',
2033
               }
2034
2035 1
    def __init__(self, binary=None):
2036
        if binary is not None:
2037
            self._binary_init(binary)
2038
            self._freeze = True
2039
            return
2040
        self.EndpointUrl = None
2041
        self.LocaleIds = []
2042
        self.ProfileUris = []
2043
        self._freeze = True
2044
2045 1
    def to_binary(self):
2046
        packet = []
2047
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
2048
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
2049
        for fieldname in self.LocaleIds:
2050
            packet.append(uabin.Primitives.String.pack(fieldname))
2051
        packet.append(uabin.Primitives.Int32.pack(len(self.ProfileUris)))
2052
        for fieldname in self.ProfileUris:
2053
            packet.append(uabin.Primitives.String.pack(fieldname))
2054
        return b''.join(packet)
2055
2056 1
    @staticmethod
2057
    def from_binary(data):
2058
        return GetEndpointsParameters(data)
2059
2060 1
    def _binary_init(self, data):
2061
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
2062
        self.LocaleIds = uabin.Primitives.String.unpack_array(data)
2063
        self.ProfileUris = uabin.Primitives.String.unpack_array(data)
2064
2065 1
    def __str__(self):
2066
        return 'GetEndpointsParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
2067
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
2068
               'ProfileUris:' + str(self.ProfileUris) + ')'
2069
2070 1
    __repr__ = __str__
2071
2072
2073 1
class GetEndpointsRequest(FrozenClass):
2074
    '''
2075
    Gets the endpoints used by the server.
2076
2077
    :ivar TypeId:
2078
    :vartype TypeId: NodeId
2079
    :ivar RequestHeader:
2080
    :vartype RequestHeader: RequestHeader
2081
    :ivar Parameters:
2082
    :vartype Parameters: GetEndpointsParameters
2083
    '''
2084
2085 1
    ua_types = {
2086
        'TypeId': 'NodeId',
2087
        'RequestHeader': 'RequestHeader',
2088
        'Parameters': 'GetEndpointsParameters',
2089
               }
2090
2091 1
    def __init__(self, binary=None):
2092
        if binary is not None:
2093
            self._binary_init(binary)
2094
            self._freeze = True
2095
            return
2096
        self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)
2097
        self.RequestHeader = RequestHeader()
2098
        self.Parameters = GetEndpointsParameters()
2099
        self._freeze = True
2100
2101 1
    def to_binary(self):
2102
        packet = []
2103
        packet.append(self.TypeId.to_binary())
2104
        packet.append(self.RequestHeader.to_binary())
2105
        packet.append(self.Parameters.to_binary())
2106
        return b''.join(packet)
2107
2108 1
    @staticmethod
2109
    def from_binary(data):
2110
        return GetEndpointsRequest(data)
2111
2112 1
    def _binary_init(self, data):
2113
        self.TypeId = NodeId.from_binary(data)
2114
        self.RequestHeader = RequestHeader.from_binary(data)
2115
        self.Parameters = GetEndpointsParameters.from_binary(data)
2116
2117 1
    def __str__(self):
2118
        return 'GetEndpointsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2119
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2120
               'Parameters:' + str(self.Parameters) + ')'
2121
2122 1
    __repr__ = __str__
2123
2124
2125 1
class GetEndpointsResponse(FrozenClass):
2126
    '''
2127
    Gets the endpoints used by the server.
2128
2129
    :ivar TypeId:
2130
    :vartype TypeId: NodeId
2131
    :ivar ResponseHeader:
2132
    :vartype ResponseHeader: ResponseHeader
2133
    :ivar Endpoints:
2134
    :vartype Endpoints: EndpointDescription
2135
    '''
2136
2137 1
    ua_types = {
2138
        'TypeId': 'NodeId',
2139
        'ResponseHeader': 'ResponseHeader',
2140
        'Endpoints': 'EndpointDescription',
2141
               }
2142
2143 1
    def __init__(self, binary=None):
2144
        if binary is not None:
2145
            self._binary_init(binary)
2146
            self._freeze = True
2147
            return
2148
        self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary)
2149
        self.ResponseHeader = ResponseHeader()
2150
        self.Endpoints = []
2151
        self._freeze = True
2152
2153 1
    def to_binary(self):
2154
        packet = []
2155
        packet.append(self.TypeId.to_binary())
2156
        packet.append(self.ResponseHeader.to_binary())
2157
        packet.append(uabin.Primitives.Int32.pack(len(self.Endpoints)))
2158
        for fieldname in self.Endpoints:
2159
            packet.append(fieldname.to_binary())
2160
        return b''.join(packet)
2161
2162 1
    @staticmethod
2163
    def from_binary(data):
2164
        return GetEndpointsResponse(data)
2165
2166 1
    def _binary_init(self, data):
2167
        self.TypeId = NodeId.from_binary(data)
2168
        self.ResponseHeader = ResponseHeader.from_binary(data)
2169
        length = uabin.Primitives.Int32.unpack(data)
2170
        array = []
2171
        if length != -1:
2172
            for _ in range(0, length):
2173
                array.append(EndpointDescription.from_binary(data))
2174
        self.Endpoints = array
2175
2176 1
    def __str__(self):
2177
        return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2178
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2179
               'Endpoints:' + str(self.Endpoints) + ')'
2180
2181 1
    __repr__ = __str__
2182
2183
2184 1
class RegisteredServer(FrozenClass):
2185
    '''
2186
    The information required to register a server with a discovery server.
2187
2188
    :ivar ServerUri:
2189
    :vartype ServerUri: String
2190
    :ivar ProductUri:
2191
    :vartype ProductUri: String
2192
    :ivar ServerNames:
2193
    :vartype ServerNames: LocalizedText
2194
    :ivar ServerType:
2195
    :vartype ServerType: ApplicationType
2196
    :ivar GatewayServerUri:
2197
    :vartype GatewayServerUri: String
2198
    :ivar DiscoveryUrls:
2199
    :vartype DiscoveryUrls: String
2200
    :ivar SemaphoreFilePath:
2201
    :vartype SemaphoreFilePath: String
2202
    :ivar IsOnline:
2203
    :vartype IsOnline: Boolean
2204
    '''
2205
2206 1
    ua_types = {
2207
        'ServerUri': 'String',
2208
        'ProductUri': 'String',
2209
        'ServerNames': 'LocalizedText',
2210
        'ServerType': 'ApplicationType',
2211
        'GatewayServerUri': 'String',
2212
        'DiscoveryUrls': 'String',
2213
        'SemaphoreFilePath': 'String',
2214
        'IsOnline': 'Boolean',
2215
               }
2216
2217 1
    def __init__(self, binary=None):
2218
        if binary is not None:
2219
            self._binary_init(binary)
2220
            self._freeze = True
2221
            return
2222
        self.ServerUri = None
2223
        self.ProductUri = None
2224
        self.ServerNames = []
2225
        self.ServerType = ApplicationType(0)
2226
        self.GatewayServerUri = None
2227
        self.DiscoveryUrls = []
2228
        self.SemaphoreFilePath = None
2229
        self.IsOnline = True
2230
        self._freeze = True
2231
2232 1
    def to_binary(self):
2233
        packet = []
2234
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
2235
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
2236
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerNames)))
2237
        for fieldname in self.ServerNames:
2238
            packet.append(fieldname.to_binary())
2239
        packet.append(uabin.Primitives.UInt32.pack(self.ServerType.value))
2240
        packet.append(uabin.Primitives.String.pack(self.GatewayServerUri))
2241
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls)))
2242
        for fieldname in self.DiscoveryUrls:
2243
            packet.append(uabin.Primitives.String.pack(fieldname))
2244
        packet.append(uabin.Primitives.String.pack(self.SemaphoreFilePath))
2245
        packet.append(uabin.Primitives.Boolean.pack(self.IsOnline))
2246
        return b''.join(packet)
2247
2248 1
    @staticmethod
2249
    def from_binary(data):
2250
        return RegisteredServer(data)
2251
2252 1 View Code Duplication
    def _binary_init(self, data):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2253
        self.ServerUri = uabin.Primitives.String.unpack(data)
2254
        self.ProductUri = uabin.Primitives.String.unpack(data)
2255
        length = uabin.Primitives.Int32.unpack(data)
2256
        array = []
2257
        if length != -1:
2258
            for _ in range(0, length):
2259
                array.append(LocalizedText.from_binary(data))
2260
        self.ServerNames = array
2261
        self.ServerType = ApplicationType(uabin.Primitives.UInt32.unpack(data))
2262
        self.GatewayServerUri = uabin.Primitives.String.unpack(data)
2263
        self.DiscoveryUrls = uabin.Primitives.String.unpack_array(data)
2264
        self.SemaphoreFilePath = uabin.Primitives.String.unpack(data)
2265
        self.IsOnline = uabin.Primitives.Boolean.unpack(data)
2266
2267 1
    def __str__(self):
2268
        return 'RegisteredServer(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \
2269
               'ProductUri:' + str(self.ProductUri) + ', ' + \
2270
               'ServerNames:' + str(self.ServerNames) + ', ' + \
2271
               'ServerType:' + str(self.ServerType) + ', ' + \
2272
               'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \
2273
               'DiscoveryUrls:' + str(self.DiscoveryUrls) + ', ' + \
2274
               'SemaphoreFilePath:' + str(self.SemaphoreFilePath) + ', ' + \
2275
               'IsOnline:' + str(self.IsOnline) + ')'
2276
2277 1
    __repr__ = __str__
2278
2279
2280 1
class RegisterServerRequest(FrozenClass):
2281
    '''
2282
    Registers a server with the discovery server.
2283
2284
    :ivar TypeId:
2285
    :vartype TypeId: NodeId
2286
    :ivar RequestHeader:
2287
    :vartype RequestHeader: RequestHeader
2288
    :ivar Server:
2289
    :vartype Server: RegisteredServer
2290
    '''
2291
2292 1
    ua_types = {
2293
        'TypeId': 'NodeId',
2294
        'RequestHeader': 'RequestHeader',
2295
        'Server': 'RegisteredServer',
2296
               }
2297
2298 1
    def __init__(self, binary=None):
2299
        if binary is not None:
2300
            self._binary_init(binary)
2301
            self._freeze = True
2302
            return
2303
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary)
2304
        self.RequestHeader = RequestHeader()
2305
        self.Server = RegisteredServer()
2306
        self._freeze = True
2307
2308 1
    def to_binary(self):
2309
        packet = []
2310
        packet.append(self.TypeId.to_binary())
2311
        packet.append(self.RequestHeader.to_binary())
2312
        packet.append(self.Server.to_binary())
2313
        return b''.join(packet)
2314
2315 1
    @staticmethod
2316
    def from_binary(data):
2317
        return RegisterServerRequest(data)
2318
2319 1
    def _binary_init(self, data):
2320
        self.TypeId = NodeId.from_binary(data)
2321
        self.RequestHeader = RequestHeader.from_binary(data)
2322
        self.Server = RegisteredServer.from_binary(data)
2323
2324 1
    def __str__(self):
2325
        return 'RegisterServerRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2326
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2327
               'Server:' + str(self.Server) + ')'
2328
2329 1
    __repr__ = __str__
2330
2331
2332 1
class RegisterServerResponse(FrozenClass):
2333
    '''
2334
    Registers a server with the discovery server.
2335
2336
    :ivar TypeId:
2337
    :vartype TypeId: NodeId
2338
    :ivar ResponseHeader:
2339
    :vartype ResponseHeader: ResponseHeader
2340
    '''
2341
2342 1
    ua_types = {
2343
        'TypeId': 'NodeId',
2344
        'ResponseHeader': 'ResponseHeader',
2345
               }
2346
2347 1
    def __init__(self, binary=None):
2348
        if binary is not None:
2349
            self._binary_init(binary)
2350
            self._freeze = True
2351
            return
2352
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary)
2353
        self.ResponseHeader = ResponseHeader()
2354
        self._freeze = True
2355
2356 1
    def to_binary(self):
2357
        packet = []
2358
        packet.append(self.TypeId.to_binary())
2359
        packet.append(self.ResponseHeader.to_binary())
2360
        return b''.join(packet)
2361
2362 1
    @staticmethod
2363
    def from_binary(data):
2364
        return RegisterServerResponse(data)
2365
2366 1
    def _binary_init(self, data):
2367
        self.TypeId = NodeId.from_binary(data)
2368
        self.ResponseHeader = ResponseHeader.from_binary(data)
2369
2370 1
    def __str__(self):
2371
        return 'RegisterServerResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2372
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
2373
2374 1
    __repr__ = __str__
2375
2376
2377 1 View Code Duplication
class DiscoveryConfiguration(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2378
    '''
2379
    A base type for discovery configuration information.
2380
2381
    '''
2382
2383 1
    ua_types = {
2384
               }
2385
2386 1
    def __init__(self, binary=None):
2387
        if binary is not None:
2388
            self._binary_init(binary)
2389
            self._freeze = True
2390
            return
2391
        self._freeze = True
2392
2393 1
    def to_binary(self):
2394
        packet = []
2395
        return b''.join(packet)
2396
2397 1
    @staticmethod
2398
    def from_binary(data):
2399
        return DiscoveryConfiguration(data)
2400
2401 1
    def _binary_init(self, data):
2402
        pass
2403
2404 1
    def __str__(self):
2405
        return 'DiscoveryConfiguration(' +  + ')'
2406
2407 1
    __repr__ = __str__
2408
2409
2410 1 View Code Duplication
class MdnsDiscoveryConfiguration(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2411
    '''
2412
    The discovery information needed for mDNS registration.
2413
2414
    :ivar MdnsServerName:
2415
    :vartype MdnsServerName: String
2416
    :ivar ServerCapabilities:
2417
    :vartype ServerCapabilities: String
2418
    '''
2419
2420 1
    ua_types = {
2421
        'MdnsServerName': 'String',
2422
        'ServerCapabilities': 'String',
2423
               }
2424
2425 1
    def __init__(self, binary=None):
2426
        if binary is not None:
2427
            self._binary_init(binary)
2428
            self._freeze = True
2429
            return
2430
        self.MdnsServerName = None
2431
        self.ServerCapabilities = []
2432
        self._freeze = True
2433
2434 1
    def to_binary(self):
2435
        packet = []
2436
        packet.append(uabin.Primitives.String.pack(self.MdnsServerName))
2437
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities)))
2438
        for fieldname in self.ServerCapabilities:
2439
            packet.append(uabin.Primitives.String.pack(fieldname))
2440
        return b''.join(packet)
2441
2442 1
    @staticmethod
2443
    def from_binary(data):
2444
        return MdnsDiscoveryConfiguration(data)
2445
2446 1
    def _binary_init(self, data):
2447
        self.MdnsServerName = uabin.Primitives.String.unpack(data)
2448
        self.ServerCapabilities = uabin.Primitives.String.unpack_array(data)
2449
2450 1
    def __str__(self):
2451
        return 'MdnsDiscoveryConfiguration(' + 'MdnsServerName:' + str(self.MdnsServerName) + ', ' + \
2452
               'ServerCapabilities:' + str(self.ServerCapabilities) + ')'
2453
2454 1
    __repr__ = __str__
2455
2456
2457 1
class RegisterServer2Parameters(FrozenClass):
2458
    '''
2459
    :ivar Server:
2460
    :vartype Server: RegisteredServer
2461
    :ivar DiscoveryConfiguration:
2462
    :vartype DiscoveryConfiguration: ExtensionObject
2463
    '''
2464
2465 1
    ua_types = {
2466
        'Server': 'RegisteredServer',
2467
        'DiscoveryConfiguration': 'ExtensionObject',
2468
               }
2469
2470 1
    def __init__(self, binary=None):
2471
        if binary is not None:
2472
            self._binary_init(binary)
2473
            self._freeze = True
2474
            return
2475
        self.Server = RegisteredServer()
2476
        self.DiscoveryConfiguration = []
2477
        self._freeze = True
2478
2479 1
    def to_binary(self):
2480
        packet = []
2481
        packet.append(self.Server.to_binary())
2482
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryConfiguration)))
2483
        for fieldname in self.DiscoveryConfiguration:
2484
            packet.append(extensionobject_to_binary(fieldname))
2485
        return b''.join(packet)
2486
2487 1
    @staticmethod
2488
    def from_binary(data):
2489
        return RegisterServer2Parameters(data)
2490
2491 1
    def _binary_init(self, data):
2492
        self.Server = RegisteredServer.from_binary(data)
2493
        length = uabin.Primitives.Int32.unpack(data)
2494
        array = []
2495
        if length != -1:
2496
            for _ in range(0, length):
2497
                array.append(extensionobject_from_binary(data))
2498
        self.DiscoveryConfiguration = array
2499
2500 1
    def __str__(self):
2501
        return 'RegisterServer2Parameters(' + 'Server:' + str(self.Server) + ', ' + \
2502
               'DiscoveryConfiguration:' + str(self.DiscoveryConfiguration) + ')'
2503
2504 1
    __repr__ = __str__
2505
2506
2507 1
class RegisterServer2Request(FrozenClass):
2508
    '''
2509
    :ivar TypeId:
2510
    :vartype TypeId: NodeId
2511
    :ivar RequestHeader:
2512
    :vartype RequestHeader: RequestHeader
2513
    :ivar Parameters:
2514
    :vartype Parameters: RegisterServer2Parameters
2515
    '''
2516
2517 1
    ua_types = {
2518
        'TypeId': 'NodeId',
2519
        'RequestHeader': 'RequestHeader',
2520
        'Parameters': 'RegisterServer2Parameters',
2521
               }
2522
2523 1
    def __init__(self, binary=None):
2524
        if binary is not None:
2525
            self._binary_init(binary)
2526
            self._freeze = True
2527
            return
2528
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary)
2529
        self.RequestHeader = RequestHeader()
2530
        self.Parameters = RegisterServer2Parameters()
2531
        self._freeze = True
2532
2533 1
    def to_binary(self):
2534
        packet = []
2535
        packet.append(self.TypeId.to_binary())
2536
        packet.append(self.RequestHeader.to_binary())
2537
        packet.append(self.Parameters.to_binary())
2538
        return b''.join(packet)
2539
2540 1
    @staticmethod
2541
    def from_binary(data):
2542
        return RegisterServer2Request(data)
2543
2544 1
    def _binary_init(self, data):
2545
        self.TypeId = NodeId.from_binary(data)
2546
        self.RequestHeader = RequestHeader.from_binary(data)
2547
        self.Parameters = RegisterServer2Parameters.from_binary(data)
2548
2549 1
    def __str__(self):
2550
        return 'RegisterServer2Request(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2551
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2552
               'Parameters:' + str(self.Parameters) + ')'
2553
2554 1
    __repr__ = __str__
2555
2556
2557 1 View Code Duplication
class RegisterServer2Response(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2558
    '''
2559
    :ivar TypeId:
2560
    :vartype TypeId: NodeId
2561
    :ivar ResponseHeader:
2562
    :vartype ResponseHeader: ResponseHeader
2563
    :ivar ConfigurationResults:
2564
    :vartype ConfigurationResults: StatusCode
2565
    :ivar DiagnosticInfos:
2566
    :vartype DiagnosticInfos: DiagnosticInfo
2567
    '''
2568
2569 1
    ua_types = {
2570
        'TypeId': 'NodeId',
2571
        'ResponseHeader': 'ResponseHeader',
2572
        'ConfigurationResults': 'StatusCode',
2573
        'DiagnosticInfos': 'DiagnosticInfo',
2574
               }
2575
2576 1
    def __init__(self, binary=None):
2577
        if binary is not None:
2578
            self._binary_init(binary)
2579
            self._freeze = True
2580
            return
2581
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary)
2582
        self.ResponseHeader = ResponseHeader()
2583
        self.ConfigurationResults = []
2584
        self.DiagnosticInfos = []
2585
        self._freeze = True
2586
2587 1
    def to_binary(self):
2588
        packet = []
2589
        packet.append(self.TypeId.to_binary())
2590
        packet.append(self.ResponseHeader.to_binary())
2591
        packet.append(uabin.Primitives.Int32.pack(len(self.ConfigurationResults)))
2592
        for fieldname in self.ConfigurationResults:
2593
            packet.append(fieldname.to_binary())
2594
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
2595
        for fieldname in self.DiagnosticInfos:
2596
            packet.append(fieldname.to_binary())
2597
        return b''.join(packet)
2598
2599 1
    @staticmethod
2600
    def from_binary(data):
2601
        return RegisterServer2Response(data)
2602
2603 1
    def _binary_init(self, data):
2604
        self.TypeId = NodeId.from_binary(data)
2605
        self.ResponseHeader = ResponseHeader.from_binary(data)
2606
        length = uabin.Primitives.Int32.unpack(data)
2607
        array = []
2608
        if length != -1:
2609
            for _ in range(0, length):
2610
                array.append(StatusCode.from_binary(data))
2611
        self.ConfigurationResults = array
2612
        length = uabin.Primitives.Int32.unpack(data)
2613
        array = []
2614
        if length != -1:
2615
            for _ in range(0, length):
2616
                array.append(DiagnosticInfo.from_binary(data))
2617
        self.DiagnosticInfos = array
2618
2619 1
    def __str__(self):
2620
        return 'RegisterServer2Response(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2621
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2622
               'ConfigurationResults:' + str(self.ConfigurationResults) + ', ' + \
2623
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
2624
2625 1
    __repr__ = __str__
2626
2627
2628 1
class ChannelSecurityToken(FrozenClass):
2629
    '''
2630
    The token that identifies a set of keys for an active secure channel.
2631
2632
    :ivar ChannelId:
2633
    :vartype ChannelId: UInt32
2634
    :ivar TokenId:
2635
    :vartype TokenId: UInt32
2636
    :ivar CreatedAt:
2637
    :vartype CreatedAt: DateTime
2638
    :ivar RevisedLifetime:
2639
    :vartype RevisedLifetime: UInt32
2640
    '''
2641
2642 1
    ua_types = {
2643
        'ChannelId': 'UInt32',
2644
        'TokenId': 'UInt32',
2645
        'CreatedAt': 'DateTime',
2646
        'RevisedLifetime': 'UInt32',
2647
               }
2648
2649 1
    def __init__(self, binary=None):
2650
        if binary is not None:
2651
            self._binary_init(binary)
2652
            self._freeze = True
2653
            return
2654
        self.ChannelId = 0
2655
        self.TokenId = 0
2656
        self.CreatedAt = datetime.utcnow()
2657
        self.RevisedLifetime = 0
2658
        self._freeze = True
2659
2660 1
    def to_binary(self):
2661
        packet = []
2662
        packet.append(uabin.Primitives.UInt32.pack(self.ChannelId))
2663
        packet.append(uabin.Primitives.UInt32.pack(self.TokenId))
2664
        packet.append(uabin.Primitives.DateTime.pack(self.CreatedAt))
2665
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetime))
2666
        return b''.join(packet)
2667
2668 1
    @staticmethod
2669
    def from_binary(data):
2670
        return ChannelSecurityToken(data)
2671
2672 1
    def _binary_init(self, data):
2673
        self.ChannelId = uabin.Primitives.UInt32.unpack(data)
2674
        self.TokenId = uabin.Primitives.UInt32.unpack(data)
2675
        self.CreatedAt = uabin.Primitives.DateTime.unpack(data)
2676
        self.RevisedLifetime = uabin.Primitives.UInt32.unpack(data)
2677
2678 1
    def __str__(self):
2679
        return 'ChannelSecurityToken(' + 'ChannelId:' + str(self.ChannelId) + ', ' + \
2680
               'TokenId:' + str(self.TokenId) + ', ' + \
2681
               'CreatedAt:' + str(self.CreatedAt) + ', ' + \
2682
               'RevisedLifetime:' + str(self.RevisedLifetime) + ')'
2683
2684 1
    __repr__ = __str__
2685
2686
2687 1 View Code Duplication
class OpenSecureChannelParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2688
    '''
2689
    :ivar ClientProtocolVersion:
2690
    :vartype ClientProtocolVersion: UInt32
2691
    :ivar RequestType:
2692
    :vartype RequestType: SecurityTokenRequestType
2693
    :ivar SecurityMode:
2694
    :vartype SecurityMode: MessageSecurityMode
2695
    :ivar ClientNonce:
2696
    :vartype ClientNonce: ByteString
2697
    :ivar RequestedLifetime:
2698
    :vartype RequestedLifetime: UInt32
2699
    '''
2700
2701 1
    ua_types = {
2702
        'ClientProtocolVersion': 'UInt32',
2703
        'RequestType': 'SecurityTokenRequestType',
2704
        'SecurityMode': 'MessageSecurityMode',
2705
        'ClientNonce': 'ByteString',
2706
        'RequestedLifetime': 'UInt32',
2707
               }
2708
2709 1
    def __init__(self, binary=None):
2710
        if binary is not None:
2711
            self._binary_init(binary)
2712
            self._freeze = True
2713
            return
2714
        self.ClientProtocolVersion = 0
2715
        self.RequestType = SecurityTokenRequestType(0)
2716
        self.SecurityMode = MessageSecurityMode(0)
2717
        self.ClientNonce = None
2718
        self.RequestedLifetime = 0
2719
        self._freeze = True
2720
2721 1
    def to_binary(self):
2722
        packet = []
2723
        packet.append(uabin.Primitives.UInt32.pack(self.ClientProtocolVersion))
2724
        packet.append(uabin.Primitives.UInt32.pack(self.RequestType.value))
2725
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
2726
        packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce))
2727
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetime))
2728
        return b''.join(packet)
2729
2730 1
    @staticmethod
2731
    def from_binary(data):
2732
        return OpenSecureChannelParameters(data)
2733
2734 1
    def _binary_init(self, data):
2735
        self.ClientProtocolVersion = uabin.Primitives.UInt32.unpack(data)
2736
        self.RequestType = SecurityTokenRequestType(uabin.Primitives.UInt32.unpack(data))
2737
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
2738
        self.ClientNonce = uabin.Primitives.ByteString.unpack(data)
2739
        self.RequestedLifetime = uabin.Primitives.UInt32.unpack(data)
2740
2741 1
    def __str__(self):
2742
        return 'OpenSecureChannelParameters(' + 'ClientProtocolVersion:' + str(self.ClientProtocolVersion) + ', ' + \
2743
               'RequestType:' + str(self.RequestType) + ', ' + \
2744
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
2745
               'ClientNonce:' + str(self.ClientNonce) + ', ' + \
2746
               'RequestedLifetime:' + str(self.RequestedLifetime) + ')'
2747
2748 1
    __repr__ = __str__
2749
2750
2751 1
class OpenSecureChannelRequest(FrozenClass):
2752
    '''
2753
    Creates a secure channel with a server.
2754
2755
    :ivar TypeId:
2756
    :vartype TypeId: NodeId
2757
    :ivar RequestHeader:
2758
    :vartype RequestHeader: RequestHeader
2759
    :ivar Parameters:
2760
    :vartype Parameters: OpenSecureChannelParameters
2761
    '''
2762
2763 1
    ua_types = {
2764
        'TypeId': 'NodeId',
2765
        'RequestHeader': 'RequestHeader',
2766
        'Parameters': 'OpenSecureChannelParameters',
2767
               }
2768
2769 1
    def __init__(self, binary=None):
2770
        if binary is not None:
2771
            self._binary_init(binary)
2772
            self._freeze = True
2773
            return
2774
        self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary)
2775
        self.RequestHeader = RequestHeader()
2776
        self.Parameters = OpenSecureChannelParameters()
2777
        self._freeze = True
2778
2779 1
    def to_binary(self):
2780
        packet = []
2781
        packet.append(self.TypeId.to_binary())
2782
        packet.append(self.RequestHeader.to_binary())
2783
        packet.append(self.Parameters.to_binary())
2784
        return b''.join(packet)
2785
2786 1
    @staticmethod
2787
    def from_binary(data):
2788
        return OpenSecureChannelRequest(data)
2789
2790 1
    def _binary_init(self, data):
2791
        self.TypeId = NodeId.from_binary(data)
2792
        self.RequestHeader = RequestHeader.from_binary(data)
2793
        self.Parameters = OpenSecureChannelParameters.from_binary(data)
2794
2795 1
    def __str__(self):
2796
        return 'OpenSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2797
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2798
               'Parameters:' + str(self.Parameters) + ')'
2799
2800 1
    __repr__ = __str__
2801
2802
2803 1
class OpenSecureChannelResult(FrozenClass):
2804
    '''
2805
    :ivar ServerProtocolVersion:
2806
    :vartype ServerProtocolVersion: UInt32
2807
    :ivar SecurityToken:
2808
    :vartype SecurityToken: ChannelSecurityToken
2809
    :ivar ServerNonce:
2810
    :vartype ServerNonce: ByteString
2811
    '''
2812
2813 1
    ua_types = {
2814
        'ServerProtocolVersion': 'UInt32',
2815
        'SecurityToken': 'ChannelSecurityToken',
2816
        'ServerNonce': 'ByteString',
2817
               }
2818
2819 1
    def __init__(self, binary=None):
2820
        if binary is not None:
2821
            self._binary_init(binary)
2822
            self._freeze = True
2823
            return
2824
        self.ServerProtocolVersion = 0
2825
        self.SecurityToken = ChannelSecurityToken()
2826
        self.ServerNonce = None
2827
        self._freeze = True
2828
2829 1
    def to_binary(self):
2830
        packet = []
2831
        packet.append(uabin.Primitives.UInt32.pack(self.ServerProtocolVersion))
2832
        packet.append(self.SecurityToken.to_binary())
2833
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
2834
        return b''.join(packet)
2835
2836 1
    @staticmethod
2837
    def from_binary(data):
2838
        return OpenSecureChannelResult(data)
2839
2840 1
    def _binary_init(self, data):
2841
        self.ServerProtocolVersion = uabin.Primitives.UInt32.unpack(data)
2842
        self.SecurityToken = ChannelSecurityToken.from_binary(data)
2843
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
2844
2845 1
    def __str__(self):
2846
        return 'OpenSecureChannelResult(' + 'ServerProtocolVersion:' + str(self.ServerProtocolVersion) + ', ' + \
2847
               'SecurityToken:' + str(self.SecurityToken) + ', ' + \
2848
               'ServerNonce:' + str(self.ServerNonce) + ')'
2849
2850 1
    __repr__ = __str__
2851
2852
2853 1
class OpenSecureChannelResponse(FrozenClass):
2854
    '''
2855
    Creates a secure channel with a server.
2856
2857
    :ivar TypeId:
2858
    :vartype TypeId: NodeId
2859
    :ivar ResponseHeader:
2860
    :vartype ResponseHeader: ResponseHeader
2861
    :ivar Parameters:
2862
    :vartype Parameters: OpenSecureChannelResult
2863
    '''
2864
2865 1
    ua_types = {
2866
        'TypeId': 'NodeId',
2867
        'ResponseHeader': 'ResponseHeader',
2868
        'Parameters': 'OpenSecureChannelResult',
2869
               }
2870
2871 1
    def __init__(self, binary=None):
2872
        if binary is not None:
2873
            self._binary_init(binary)
2874
            self._freeze = True
2875
            return
2876
        self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary)
2877
        self.ResponseHeader = ResponseHeader()
2878
        self.Parameters = OpenSecureChannelResult()
2879
        self._freeze = True
2880
2881 1
    def to_binary(self):
2882
        packet = []
2883
        packet.append(self.TypeId.to_binary())
2884
        packet.append(self.ResponseHeader.to_binary())
2885
        packet.append(self.Parameters.to_binary())
2886
        return b''.join(packet)
2887
2888 1
    @staticmethod
2889
    def from_binary(data):
2890
        return OpenSecureChannelResponse(data)
2891
2892 1
    def _binary_init(self, data):
2893
        self.TypeId = NodeId.from_binary(data)
2894
        self.ResponseHeader = ResponseHeader.from_binary(data)
2895
        self.Parameters = OpenSecureChannelResult.from_binary(data)
2896
2897 1
    def __str__(self):
2898
        return 'OpenSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2899
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2900
               'Parameters:' + str(self.Parameters) + ')'
2901
2902 1
    __repr__ = __str__
2903
2904
2905 1
class CloseSecureChannelRequest(FrozenClass):
2906
    '''
2907
    Closes a secure channel.
2908
2909
    :ivar TypeId:
2910
    :vartype TypeId: NodeId
2911
    :ivar RequestHeader:
2912
    :vartype RequestHeader: RequestHeader
2913
    '''
2914
2915 1
    ua_types = {
2916
        'TypeId': 'NodeId',
2917
        'RequestHeader': 'RequestHeader',
2918
               }
2919
2920 1
    def __init__(self, binary=None):
2921
        if binary is not None:
2922
            self._binary_init(binary)
2923
            self._freeze = True
2924
            return
2925
        self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary)
2926
        self.RequestHeader = RequestHeader()
2927
        self._freeze = True
2928
2929 1
    def to_binary(self):
2930
        packet = []
2931
        packet.append(self.TypeId.to_binary())
2932
        packet.append(self.RequestHeader.to_binary())
2933
        return b''.join(packet)
2934
2935 1
    @staticmethod
2936
    def from_binary(data):
2937
        return CloseSecureChannelRequest(data)
2938
2939 1
    def _binary_init(self, data):
2940
        self.TypeId = NodeId.from_binary(data)
2941
        self.RequestHeader = RequestHeader.from_binary(data)
2942
2943 1
    def __str__(self):
2944
        return 'CloseSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2945
               'RequestHeader:' + str(self.RequestHeader) + ')'
2946
2947 1
    __repr__ = __str__
2948
2949
2950 1
class CloseSecureChannelResponse(FrozenClass):
2951
    '''
2952
    Closes a secure channel.
2953
2954
    :ivar TypeId:
2955
    :vartype TypeId: NodeId
2956
    :ivar ResponseHeader:
2957
    :vartype ResponseHeader: ResponseHeader
2958
    '''
2959
2960 1
    ua_types = {
2961
        'TypeId': 'NodeId',
2962
        'ResponseHeader': 'ResponseHeader',
2963
               }
2964
2965 1
    def __init__(self, binary=None):
2966
        if binary is not None:
2967
            self._binary_init(binary)
2968
            self._freeze = True
2969
            return
2970
        self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary)
2971
        self.ResponseHeader = ResponseHeader()
2972
        self._freeze = True
2973
2974 1
    def to_binary(self):
2975
        packet = []
2976
        packet.append(self.TypeId.to_binary())
2977
        packet.append(self.ResponseHeader.to_binary())
2978
        return b''.join(packet)
2979
2980 1
    @staticmethod
2981
    def from_binary(data):
2982
        return CloseSecureChannelResponse(data)
2983
2984 1
    def _binary_init(self, data):
2985
        self.TypeId = NodeId.from_binary(data)
2986
        self.ResponseHeader = ResponseHeader.from_binary(data)
2987
2988 1
    def __str__(self):
2989
        return 'CloseSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2990
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
2991
2992 1
    __repr__ = __str__
2993
2994
2995 1 View Code Duplication
class SignedSoftwareCertificate(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2996
    '''
2997
    A software certificate with a digital signature.
2998
2999
    :ivar CertificateData:
3000
    :vartype CertificateData: ByteString
3001
    :ivar Signature:
3002
    :vartype Signature: ByteString
3003
    '''
3004
3005 1
    ua_types = {
3006
        'CertificateData': 'ByteString',
3007
        'Signature': 'ByteString',
3008
               }
3009
3010 1
    def __init__(self, binary=None):
3011
        if binary is not None:
3012
            self._binary_init(binary)
3013
            self._freeze = True
3014
            return
3015
        self.CertificateData = None
3016
        self.Signature = None
3017
        self._freeze = True
3018
3019 1
    def to_binary(self):
3020
        packet = []
3021
        packet.append(uabin.Primitives.ByteString.pack(self.CertificateData))
3022
        packet.append(uabin.Primitives.ByteString.pack(self.Signature))
3023
        return b''.join(packet)
3024
3025 1
    @staticmethod
3026
    def from_binary(data):
3027
        return SignedSoftwareCertificate(data)
3028
3029 1
    def _binary_init(self, data):
3030
        self.CertificateData = uabin.Primitives.ByteString.unpack(data)
3031
        self.Signature = uabin.Primitives.ByteString.unpack(data)
3032
3033 1
    def __str__(self):
3034
        return 'SignedSoftwareCertificate(' + 'CertificateData:' + str(self.CertificateData) + ', ' + \
3035
               'Signature:' + str(self.Signature) + ')'
3036
3037 1
    __repr__ = __str__
3038
3039
3040 1 View Code Duplication
class SignatureData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3041
    '''
3042
    A digital signature.
3043
3044
    :ivar Algorithm:
3045
    :vartype Algorithm: String
3046
    :ivar Signature:
3047
    :vartype Signature: ByteString
3048
    '''
3049
3050 1
    ua_types = {
3051
        'Algorithm': 'String',
3052
        'Signature': 'ByteString',
3053
               }
3054
3055 1
    def __init__(self, binary=None):
3056
        if binary is not None:
3057
            self._binary_init(binary)
3058
            self._freeze = True
3059
            return
3060
        self.Algorithm = None
3061
        self.Signature = None
3062
        self._freeze = True
3063
3064 1
    def to_binary(self):
3065
        packet = []
3066
        packet.append(uabin.Primitives.String.pack(self.Algorithm))
3067
        packet.append(uabin.Primitives.ByteString.pack(self.Signature))
3068
        return b''.join(packet)
3069
3070 1
    @staticmethod
3071
    def from_binary(data):
3072
        return SignatureData(data)
3073
3074 1
    def _binary_init(self, data):
3075
        self.Algorithm = uabin.Primitives.String.unpack(data)
3076
        self.Signature = uabin.Primitives.ByteString.unpack(data)
3077
3078 1
    def __str__(self):
3079
        return 'SignatureData(' + 'Algorithm:' + str(self.Algorithm) + ', ' + \
3080
               'Signature:' + str(self.Signature) + ')'
3081
3082 1
    __repr__ = __str__
3083
3084
3085 1
class CreateSessionParameters(FrozenClass):
3086
    '''
3087
    :ivar ClientDescription:
3088
    :vartype ClientDescription: ApplicationDescription
3089
    :ivar ServerUri:
3090
    :vartype ServerUri: String
3091
    :ivar EndpointUrl:
3092
    :vartype EndpointUrl: String
3093
    :ivar SessionName:
3094
    :vartype SessionName: String
3095
    :ivar ClientNonce:
3096
    :vartype ClientNonce: ByteString
3097
    :ivar ClientCertificate:
3098
    :vartype ClientCertificate: ByteString
3099
    :ivar RequestedSessionTimeout:
3100
    :vartype RequestedSessionTimeout: Double
3101
    :ivar MaxResponseMessageSize:
3102
    :vartype MaxResponseMessageSize: UInt32
3103
    '''
3104
3105 1
    ua_types = {
3106
        'ClientDescription': 'ApplicationDescription',
3107
        'ServerUri': 'String',
3108
        'EndpointUrl': 'String',
3109
        'SessionName': 'String',
3110
        'ClientNonce': 'ByteString',
3111
        'ClientCertificate': 'ByteString',
3112
        'RequestedSessionTimeout': 'Double',
3113
        'MaxResponseMessageSize': 'UInt32',
3114
               }
3115
3116 1
    def __init__(self, binary=None):
3117
        if binary is not None:
3118
            self._binary_init(binary)
3119
            self._freeze = True
3120
            return
3121
        self.ClientDescription = ApplicationDescription()
3122
        self.ServerUri = None
3123
        self.EndpointUrl = None
3124
        self.SessionName = None
3125
        self.ClientNonce = None
3126
        self.ClientCertificate = None
3127
        self.RequestedSessionTimeout = 0
3128
        self.MaxResponseMessageSize = 0
3129
        self._freeze = True
3130
3131 1
    def to_binary(self):
3132
        packet = []
3133
        packet.append(self.ClientDescription.to_binary())
3134
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
3135
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
3136
        packet.append(uabin.Primitives.String.pack(self.SessionName))
3137
        packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce))
3138
        packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate))
3139
        packet.append(uabin.Primitives.Double.pack(self.RequestedSessionTimeout))
3140
        packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize))
3141
        return b''.join(packet)
3142
3143 1
    @staticmethod
3144
    def from_binary(data):
3145
        return CreateSessionParameters(data)
3146
3147 1
    def _binary_init(self, data):
3148
        self.ClientDescription = ApplicationDescription.from_binary(data)
3149
        self.ServerUri = uabin.Primitives.String.unpack(data)
3150
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
3151
        self.SessionName = uabin.Primitives.String.unpack(data)
3152
        self.ClientNonce = uabin.Primitives.ByteString.unpack(data)
3153
        self.ClientCertificate = uabin.Primitives.ByteString.unpack(data)
3154
        self.RequestedSessionTimeout = uabin.Primitives.Double.unpack(data)
3155
        self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data)
3156
3157 1
    def __str__(self):
3158
        return 'CreateSessionParameters(' + 'ClientDescription:' + str(self.ClientDescription) + ', ' + \
3159
               'ServerUri:' + str(self.ServerUri) + ', ' + \
3160
               'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
3161
               'SessionName:' + str(self.SessionName) + ', ' + \
3162
               'ClientNonce:' + str(self.ClientNonce) + ', ' + \
3163
               'ClientCertificate:' + str(self.ClientCertificate) + ', ' + \
3164
               'RequestedSessionTimeout:' + str(self.RequestedSessionTimeout) + ', ' + \
3165
               'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ')'
3166
3167 1
    __repr__ = __str__
3168
3169
3170 1
class CreateSessionRequest(FrozenClass):
3171
    '''
3172
    Creates a new session with the server.
3173
3174
    :ivar TypeId:
3175
    :vartype TypeId: NodeId
3176
    :ivar RequestHeader:
3177
    :vartype RequestHeader: RequestHeader
3178
    :ivar Parameters:
3179
    :vartype Parameters: CreateSessionParameters
3180
    '''
3181
3182 1
    ua_types = {
3183
        'TypeId': 'NodeId',
3184
        'RequestHeader': 'RequestHeader',
3185
        'Parameters': 'CreateSessionParameters',
3186
               }
3187
3188 1
    def __init__(self, binary=None):
3189
        if binary is not None:
3190
            self._binary_init(binary)
3191
            self._freeze = True
3192
            return
3193
        self.TypeId = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary)
3194
        self.RequestHeader = RequestHeader()
3195
        self.Parameters = CreateSessionParameters()
3196
        self._freeze = True
3197
3198 1
    def to_binary(self):
3199
        packet = []
3200
        packet.append(self.TypeId.to_binary())
3201
        packet.append(self.RequestHeader.to_binary())
3202
        packet.append(self.Parameters.to_binary())
3203
        return b''.join(packet)
3204
3205 1
    @staticmethod
3206
    def from_binary(data):
3207
        return CreateSessionRequest(data)
3208
3209 1
    def _binary_init(self, data):
3210
        self.TypeId = NodeId.from_binary(data)
3211
        self.RequestHeader = RequestHeader.from_binary(data)
3212
        self.Parameters = CreateSessionParameters.from_binary(data)
3213
3214 1
    def __str__(self):
3215
        return 'CreateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3216
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3217
               'Parameters:' + str(self.Parameters) + ')'
3218
3219 1
    __repr__ = __str__
3220
3221
3222 1
class CreateSessionResult(FrozenClass):
3223
    '''
3224
    :ivar SessionId:
3225
    :vartype SessionId: NodeId
3226
    :ivar AuthenticationToken:
3227
    :vartype AuthenticationToken: NodeId
3228
    :ivar RevisedSessionTimeout:
3229
    :vartype RevisedSessionTimeout: Double
3230
    :ivar ServerNonce:
3231
    :vartype ServerNonce: ByteString
3232
    :ivar ServerCertificate:
3233
    :vartype ServerCertificate: ByteString
3234
    :ivar ServerEndpoints:
3235
    :vartype ServerEndpoints: EndpointDescription
3236
    :ivar ServerSoftwareCertificates:
3237
    :vartype ServerSoftwareCertificates: SignedSoftwareCertificate
3238
    :ivar ServerSignature:
3239
    :vartype ServerSignature: SignatureData
3240
    :ivar MaxRequestMessageSize:
3241
    :vartype MaxRequestMessageSize: UInt32
3242
    '''
3243
3244 1
    ua_types = {
3245
        'SessionId': 'NodeId',
3246
        'AuthenticationToken': 'NodeId',
3247
        'RevisedSessionTimeout': 'Double',
3248
        'ServerNonce': 'ByteString',
3249
        'ServerCertificate': 'ByteString',
3250
        'ServerEndpoints': 'EndpointDescription',
3251
        'ServerSoftwareCertificates': 'SignedSoftwareCertificate',
3252
        'ServerSignature': 'SignatureData',
3253
        'MaxRequestMessageSize': 'UInt32',
3254
               }
3255
3256 1
    def __init__(self, binary=None):
3257
        if binary is not None:
3258
            self._binary_init(binary)
3259
            self._freeze = True
3260
            return
3261
        self.SessionId = NodeId()
3262
        self.AuthenticationToken = NodeId()
3263
        self.RevisedSessionTimeout = 0
3264
        self.ServerNonce = None
3265
        self.ServerCertificate = None
3266
        self.ServerEndpoints = []
3267
        self.ServerSoftwareCertificates = []
3268
        self.ServerSignature = SignatureData()
3269
        self.MaxRequestMessageSize = 0
3270
        self._freeze = True
3271
3272 1
    def to_binary(self):
3273
        packet = []
3274
        packet.append(self.SessionId.to_binary())
3275
        packet.append(self.AuthenticationToken.to_binary())
3276
        packet.append(uabin.Primitives.Double.pack(self.RevisedSessionTimeout))
3277
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
3278
        packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate))
3279
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerEndpoints)))
3280
        for fieldname in self.ServerEndpoints:
3281
            packet.append(fieldname.to_binary())
3282
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerSoftwareCertificates)))
3283
        for fieldname in self.ServerSoftwareCertificates:
3284
            packet.append(fieldname.to_binary())
3285
        packet.append(self.ServerSignature.to_binary())
3286
        packet.append(uabin.Primitives.UInt32.pack(self.MaxRequestMessageSize))
3287
        return b''.join(packet)
3288
3289 1
    @staticmethod
3290
    def from_binary(data):
3291
        return CreateSessionResult(data)
3292
3293 1
    def _binary_init(self, data):
3294
        self.SessionId = NodeId.from_binary(data)
3295
        self.AuthenticationToken = NodeId.from_binary(data)
3296
        self.RevisedSessionTimeout = uabin.Primitives.Double.unpack(data)
3297
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
3298
        self.ServerCertificate = uabin.Primitives.ByteString.unpack(data)
3299
        length = uabin.Primitives.Int32.unpack(data)
3300
        array = []
3301
        if length != -1:
3302
            for _ in range(0, length):
3303
                array.append(EndpointDescription.from_binary(data))
3304
        self.ServerEndpoints = array
3305
        length = uabin.Primitives.Int32.unpack(data)
3306
        array = []
3307
        if length != -1:
3308
            for _ in range(0, length):
3309
                array.append(SignedSoftwareCertificate.from_binary(data))
3310
        self.ServerSoftwareCertificates = array
3311
        self.ServerSignature = SignatureData.from_binary(data)
3312
        self.MaxRequestMessageSize = uabin.Primitives.UInt32.unpack(data)
3313
3314 1
    def __str__(self):
3315
        return 'CreateSessionResult(' + 'SessionId:' + str(self.SessionId) + ', ' + \
3316
               'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \
3317
               'RevisedSessionTimeout:' + str(self.RevisedSessionTimeout) + ', ' + \
3318
               'ServerNonce:' + str(self.ServerNonce) + ', ' + \
3319
               'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \
3320
               'ServerEndpoints:' + str(self.ServerEndpoints) + ', ' + \
3321
               'ServerSoftwareCertificates:' + str(self.ServerSoftwareCertificates) + ', ' + \
3322
               'ServerSignature:' + str(self.ServerSignature) + ', ' + \
3323
               'MaxRequestMessageSize:' + str(self.MaxRequestMessageSize) + ')'
3324
3325 1
    __repr__ = __str__
3326
3327
3328 1
class CreateSessionResponse(FrozenClass):
3329
    '''
3330
    Creates a new session with the server.
3331
3332
    :ivar TypeId:
3333
    :vartype TypeId: NodeId
3334
    :ivar ResponseHeader:
3335
    :vartype ResponseHeader: ResponseHeader
3336
    :ivar Parameters:
3337
    :vartype Parameters: CreateSessionResult
3338
    '''
3339
3340 1
    ua_types = {
3341
        'TypeId': 'NodeId',
3342
        'ResponseHeader': 'ResponseHeader',
3343
        'Parameters': 'CreateSessionResult',
3344
               }
3345
3346 1
    def __init__(self, binary=None):
3347
        if binary is not None:
3348
            self._binary_init(binary)
3349
            self._freeze = True
3350
            return
3351
        self.TypeId = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary)
3352
        self.ResponseHeader = ResponseHeader()
3353
        self.Parameters = CreateSessionResult()
3354
        self._freeze = True
3355
3356 1
    def to_binary(self):
3357
        packet = []
3358
        packet.append(self.TypeId.to_binary())
3359
        packet.append(self.ResponseHeader.to_binary())
3360
        packet.append(self.Parameters.to_binary())
3361
        return b''.join(packet)
3362
3363 1
    @staticmethod
3364
    def from_binary(data):
3365
        return CreateSessionResponse(data)
3366
3367 1
    def _binary_init(self, data):
3368
        self.TypeId = NodeId.from_binary(data)
3369
        self.ResponseHeader = ResponseHeader.from_binary(data)
3370
        self.Parameters = CreateSessionResult.from_binary(data)
3371
3372 1
    def __str__(self):
3373
        return 'CreateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3374
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
3375
               'Parameters:' + str(self.Parameters) + ')'
3376
3377 1
    __repr__ = __str__
3378
3379
3380 1 View Code Duplication
class UserIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3381
    '''
3382
    A base type for a user identity token.
3383
3384
    :ivar PolicyId:
3385
    :vartype PolicyId: String
3386
    '''
3387
3388 1
    ua_types = {
3389
        'PolicyId': 'String',
3390
               }
3391
3392 1
    def __init__(self, binary=None):
3393
        if binary is not None:
3394
            self._binary_init(binary)
3395
            self._freeze = True
3396
            return
3397
        self.PolicyId = None
3398
        self._freeze = True
3399
3400 1
    def to_binary(self):
3401
        packet = []
3402
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3403
        return b''.join(packet)
3404
3405 1
    @staticmethod
3406
    def from_binary(data):
3407
        return UserIdentityToken(data)
3408
3409 1
    def _binary_init(self, data):
3410
        self.PolicyId = uabin.Primitives.String.unpack(data)
3411
3412 1
    def __str__(self):
3413
        return 'UserIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')'
3414
3415 1
    __repr__ = __str__
3416
3417
3418 1 View Code Duplication
class AnonymousIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3419
    '''
3420
    A token representing an anonymous user.
3421
3422
    :ivar PolicyId:
3423
    :vartype PolicyId: String
3424
    '''
3425
3426 1
    ua_types = {
3427
        'PolicyId': 'String',
3428
               }
3429
3430 1
    def __init__(self, binary=None):
3431
        if binary is not None:
3432
            self._binary_init(binary)
3433
            self._freeze = True
3434
            return
3435
        self.PolicyId = None
3436
        self._freeze = True
3437
3438 1
    def to_binary(self):
3439
        packet = []
3440
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3441
        return b''.join(packet)
3442
3443 1
    @staticmethod
3444
    def from_binary(data):
3445
        return AnonymousIdentityToken(data)
3446
3447 1
    def _binary_init(self, data):
3448
        self.PolicyId = uabin.Primitives.String.unpack(data)
3449
3450 1
    def __str__(self):
3451
        return 'AnonymousIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')'
3452
3453 1
    __repr__ = __str__
3454
3455
3456 1
class UserNameIdentityToken(FrozenClass):
3457
    '''
3458
    A token representing a user identified by a user name and password.
3459
3460
    :ivar PolicyId:
3461
    :vartype PolicyId: String
3462
    :ivar UserName:
3463
    :vartype UserName: String
3464
    :ivar Password:
3465
    :vartype Password: ByteString
3466
    :ivar EncryptionAlgorithm:
3467
    :vartype EncryptionAlgorithm: String
3468
    '''
3469
3470 1
    ua_types = {
3471
        'PolicyId': 'String',
3472
        'UserName': 'String',
3473
        'Password': 'ByteString',
3474
        'EncryptionAlgorithm': 'String',
3475
               }
3476
3477 1
    def __init__(self, binary=None):
3478
        if binary is not None:
3479
            self._binary_init(binary)
3480
            self._freeze = True
3481
            return
3482
        self.PolicyId = None
3483
        self.UserName = None
3484
        self.Password = None
3485
        self.EncryptionAlgorithm = None
3486
        self._freeze = True
3487
3488 1
    def to_binary(self):
3489
        packet = []
3490
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3491
        packet.append(uabin.Primitives.String.pack(self.UserName))
3492
        packet.append(uabin.Primitives.ByteString.pack(self.Password))
3493
        packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm))
3494
        return b''.join(packet)
3495
3496 1
    @staticmethod
3497
    def from_binary(data):
3498
        return UserNameIdentityToken(data)
3499
3500 1
    def _binary_init(self, data):
3501
        self.PolicyId = uabin.Primitives.String.unpack(data)
3502
        self.UserName = uabin.Primitives.String.unpack(data)
3503
        self.Password = uabin.Primitives.ByteString.unpack(data)
3504
        self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data)
3505
3506 1
    def __str__(self):
3507
        return 'UserNameIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3508
               'UserName:' + str(self.UserName) + ', ' + \
3509
               'Password:' + str(self.Password) + ', ' + \
3510
               'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')'
3511
3512 1
    __repr__ = __str__
3513
3514
3515 1 View Code Duplication
class X509IdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3516
    '''
3517
    A token representing a user identified by an X509 certificate.
3518
3519
    :ivar PolicyId:
3520
    :vartype PolicyId: String
3521
    :ivar CertificateData:
3522
    :vartype CertificateData: ByteString
3523
    '''
3524
3525 1
    ua_types = {
3526
        'PolicyId': 'String',
3527
        'CertificateData': 'ByteString',
3528
               }
3529
3530 1
    def __init__(self, binary=None):
3531
        if binary is not None:
3532
            self._binary_init(binary)
3533
            self._freeze = True
3534
            return
3535
        self.PolicyId = None
3536
        self.CertificateData = None
3537
        self._freeze = True
3538
3539 1
    def to_binary(self):
3540
        packet = []
3541
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3542
        packet.append(uabin.Primitives.ByteString.pack(self.CertificateData))
3543
        return b''.join(packet)
3544
3545 1
    @staticmethod
3546
    def from_binary(data):
3547
        return X509IdentityToken(data)
3548
3549 1
    def _binary_init(self, data):
3550
        self.PolicyId = uabin.Primitives.String.unpack(data)
3551
        self.CertificateData = uabin.Primitives.ByteString.unpack(data)
3552
3553 1
    def __str__(self):
3554
        return 'X509IdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3555
               'CertificateData:' + str(self.CertificateData) + ')'
3556
3557 1
    __repr__ = __str__
3558
3559
3560 1 View Code Duplication
class KerberosIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3561
    '''
3562
    :ivar PolicyId:
3563
    :vartype PolicyId: String
3564
    :ivar TicketData:
3565
    :vartype TicketData: ByteString
3566
    '''
3567
3568 1
    ua_types = {
3569
        'PolicyId': 'String',
3570
        'TicketData': 'ByteString',
3571
               }
3572
3573 1
    def __init__(self, binary=None):
3574
        if binary is not None:
3575
            self._binary_init(binary)
3576
            self._freeze = True
3577
            return
3578
        self.PolicyId = None
3579
        self.TicketData = None
3580
        self._freeze = True
3581
3582 1
    def to_binary(self):
3583
        packet = []
3584
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3585
        packet.append(uabin.Primitives.ByteString.pack(self.TicketData))
3586
        return b''.join(packet)
3587
3588 1
    @staticmethod
3589
    def from_binary(data):
3590
        return KerberosIdentityToken(data)
3591
3592 1
    def _binary_init(self, data):
3593
        self.PolicyId = uabin.Primitives.String.unpack(data)
3594
        self.TicketData = uabin.Primitives.ByteString.unpack(data)
3595
3596 1
    def __str__(self):
3597
        return 'KerberosIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3598
               'TicketData:' + str(self.TicketData) + ')'
3599
3600 1
    __repr__ = __str__
3601
3602
3603 1
class IssuedIdentityToken(FrozenClass):
3604
    '''
3605
    A token representing a user identified by a WS-Security XML token.
3606
3607
    :ivar PolicyId:
3608
    :vartype PolicyId: String
3609
    :ivar TokenData:
3610
    :vartype TokenData: ByteString
3611
    :ivar EncryptionAlgorithm:
3612
    :vartype EncryptionAlgorithm: String
3613
    '''
3614
3615 1
    ua_types = {
3616
        'PolicyId': 'String',
3617
        'TokenData': 'ByteString',
3618
        'EncryptionAlgorithm': 'String',
3619
               }
3620
3621 1
    def __init__(self, binary=None):
3622
        if binary is not None:
3623
            self._binary_init(binary)
3624
            self._freeze = True
3625
            return
3626
        self.PolicyId = None
3627
        self.TokenData = None
3628
        self.EncryptionAlgorithm = None
3629
        self._freeze = True
3630
3631 1
    def to_binary(self):
3632
        packet = []
3633
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3634
        packet.append(uabin.Primitives.ByteString.pack(self.TokenData))
3635
        packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm))
3636
        return b''.join(packet)
3637
3638 1
    @staticmethod
3639
    def from_binary(data):
3640
        return IssuedIdentityToken(data)
3641
3642 1
    def _binary_init(self, data):
3643
        self.PolicyId = uabin.Primitives.String.unpack(data)
3644
        self.TokenData = uabin.Primitives.ByteString.unpack(data)
3645
        self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data)
3646
3647 1
    def __str__(self):
3648
        return 'IssuedIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3649
               'TokenData:' + str(self.TokenData) + ', ' + \
3650
               'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')'
3651
3652 1
    __repr__ = __str__
3653
3654
3655 1 View Code Duplication
class ActivateSessionParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3656
    '''
3657
    :ivar ClientSignature:
3658
    :vartype ClientSignature: SignatureData
3659
    :ivar ClientSoftwareCertificates:
3660
    :vartype ClientSoftwareCertificates: SignedSoftwareCertificate
3661
    :ivar LocaleIds:
3662
    :vartype LocaleIds: String
3663
    :ivar UserIdentityToken:
3664
    :vartype UserIdentityToken: ExtensionObject
3665
    :ivar UserTokenSignature:
3666
    :vartype UserTokenSignature: SignatureData
3667
    '''
3668
3669 1
    ua_types = {
3670
        'ClientSignature': 'SignatureData',
3671
        'ClientSoftwareCertificates': 'SignedSoftwareCertificate',
3672
        'LocaleIds': 'String',
3673
        'UserIdentityToken': 'ExtensionObject',
3674
        'UserTokenSignature': 'SignatureData',
3675
               }
3676
3677 1
    def __init__(self, binary=None):
3678
        if binary is not None:
3679
            self._binary_init(binary)
3680
            self._freeze = True
3681
            return
3682
        self.ClientSignature = SignatureData()
3683
        self.ClientSoftwareCertificates = []
3684
        self.LocaleIds = []
3685
        self.UserIdentityToken = None
3686
        self.UserTokenSignature = SignatureData()
3687
        self._freeze = True
3688
3689 1
    def to_binary(self):
3690
        packet = []
3691
        packet.append(self.ClientSignature.to_binary())
3692
        packet.append(uabin.Primitives.Int32.pack(len(self.ClientSoftwareCertificates)))
3693
        for fieldname in self.ClientSoftwareCertificates:
3694
            packet.append(fieldname.to_binary())
3695
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
3696
        for fieldname in self.LocaleIds:
3697
            packet.append(uabin.Primitives.String.pack(fieldname))
3698
        packet.append(extensionobject_to_binary(self.UserIdentityToken))
3699
        packet.append(self.UserTokenSignature.to_binary())
3700
        return b''.join(packet)
3701
3702 1
    @staticmethod
3703
    def from_binary(data):
3704
        return ActivateSessionParameters(data)
3705
3706 1
    def _binary_init(self, data):
3707
        self.ClientSignature = SignatureData.from_binary(data)
3708
        length = uabin.Primitives.Int32.unpack(data)
3709
        array = []
3710
        if length != -1:
3711
            for _ in range(0, length):
3712
                array.append(SignedSoftwareCertificate.from_binary(data))
3713
        self.ClientSoftwareCertificates = array
3714
        self.LocaleIds = uabin.Primitives.String.unpack_array(data)
3715
        self.UserIdentityToken = extensionobject_from_binary(data)
3716
        self.UserTokenSignature = SignatureData.from_binary(data)
3717
3718 1
    def __str__(self):
3719
        return 'ActivateSessionParameters(' + 'ClientSignature:' + str(self.ClientSignature) + ', ' + \
3720
               'ClientSoftwareCertificates:' + str(self.ClientSoftwareCertificates) + ', ' + \
3721
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
3722
               'UserIdentityToken:' + str(self.UserIdentityToken) + ', ' + \
3723
               'UserTokenSignature:' + str(self.UserTokenSignature) + ')'
3724
3725 1
    __repr__ = __str__
3726
3727
3728 1
class ActivateSessionRequest(FrozenClass):
3729
    '''
3730
    Activates a session with the server.
3731
3732
    :ivar TypeId:
3733
    :vartype TypeId: NodeId
3734
    :ivar RequestHeader:
3735
    :vartype RequestHeader: RequestHeader
3736
    :ivar Parameters:
3737
    :vartype Parameters: ActivateSessionParameters
3738
    '''
3739
3740 1
    ua_types = {
3741
        'TypeId': 'NodeId',
3742
        'RequestHeader': 'RequestHeader',
3743
        'Parameters': 'ActivateSessionParameters',
3744
               }
3745
3746 1
    def __init__(self, binary=None):
3747
        if binary is not None:
3748
            self._binary_init(binary)
3749
            self._freeze = True
3750
            return
3751
        self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary)
3752
        self.RequestHeader = RequestHeader()
3753
        self.Parameters = ActivateSessionParameters()
3754
        self._freeze = True
3755
3756 1
    def to_binary(self):
3757
        packet = []
3758
        packet.append(self.TypeId.to_binary())
3759
        packet.append(self.RequestHeader.to_binary())
3760
        packet.append(self.Parameters.to_binary())
3761
        return b''.join(packet)
3762
3763 1
    @staticmethod
3764
    def from_binary(data):
3765
        return ActivateSessionRequest(data)
3766
3767 1
    def _binary_init(self, data):
3768
        self.TypeId = NodeId.from_binary(data)
3769
        self.RequestHeader = RequestHeader.from_binary(data)
3770
        self.Parameters = ActivateSessionParameters.from_binary(data)
3771
3772 1
    def __str__(self):
3773
        return 'ActivateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3774
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3775
               'Parameters:' + str(self.Parameters) + ')'
3776
3777 1
    __repr__ = __str__
3778
3779
3780 1 View Code Duplication
class ActivateSessionResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3781
    '''
3782
    :ivar ServerNonce:
3783
    :vartype ServerNonce: ByteString
3784
    :ivar Results:
3785
    :vartype Results: StatusCode
3786
    :ivar DiagnosticInfos:
3787
    :vartype DiagnosticInfos: DiagnosticInfo
3788
    '''
3789
3790 1
    ua_types = {
3791
        'ServerNonce': 'ByteString',
3792
        'Results': 'StatusCode',
3793
        'DiagnosticInfos': 'DiagnosticInfo',
3794
               }
3795
3796 1
    def __init__(self, binary=None):
3797
        if binary is not None:
3798
            self._binary_init(binary)
3799
            self._freeze = True
3800
            return
3801
        self.ServerNonce = None
3802
        self.Results = []
3803
        self.DiagnosticInfos = []
3804
        self._freeze = True
3805
3806 1
    def to_binary(self):
3807
        packet = []
3808
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
3809
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
3810
        for fieldname in self.Results:
3811
            packet.append(fieldname.to_binary())
3812
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
3813
        for fieldname in self.DiagnosticInfos:
3814
            packet.append(fieldname.to_binary())
3815
        return b''.join(packet)
3816
3817 1
    @staticmethod
3818
    def from_binary(data):
3819
        return ActivateSessionResult(data)
3820
3821 1
    def _binary_init(self, data):
3822
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
3823
        length = uabin.Primitives.Int32.unpack(data)
3824
        array = []
3825
        if length != -1:
3826
            for _ in range(0, length):
3827
                array.append(StatusCode.from_binary(data))
3828
        self.Results = array
3829
        length = uabin.Primitives.Int32.unpack(data)
3830
        array = []
3831
        if length != -1:
3832
            for _ in range(0, length):
3833
                array.append(DiagnosticInfo.from_binary(data))
3834
        self.DiagnosticInfos = array
3835
3836 1
    def __str__(self):
3837
        return 'ActivateSessionResult(' + 'ServerNonce:' + str(self.ServerNonce) + ', ' + \
3838
               'Results:' + str(self.Results) + ', ' + \
3839
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
3840
3841 1
    __repr__ = __str__
3842
3843
3844 1
class ActivateSessionResponse(FrozenClass):
3845
    '''
3846
    Activates a session with the server.
3847
3848
    :ivar TypeId:
3849
    :vartype TypeId: NodeId
3850
    :ivar ResponseHeader:
3851
    :vartype ResponseHeader: ResponseHeader
3852
    :ivar Parameters:
3853
    :vartype Parameters: ActivateSessionResult
3854
    '''
3855
3856 1
    ua_types = {
3857
        'TypeId': 'NodeId',
3858
        'ResponseHeader': 'ResponseHeader',
3859
        'Parameters': 'ActivateSessionResult',
3860
               }
3861
3862 1
    def __init__(self, binary=None):
3863
        if binary is not None:
3864
            self._binary_init(binary)
3865
            self._freeze = True
3866
            return
3867
        self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary)
3868
        self.ResponseHeader = ResponseHeader()
3869
        self.Parameters = ActivateSessionResult()
3870
        self._freeze = True
3871
3872 1
    def to_binary(self):
3873
        packet = []
3874
        packet.append(self.TypeId.to_binary())
3875
        packet.append(self.ResponseHeader.to_binary())
3876
        packet.append(self.Parameters.to_binary())
3877
        return b''.join(packet)
3878
3879 1
    @staticmethod
3880
    def from_binary(data):
3881
        return ActivateSessionResponse(data)
3882
3883 1
    def _binary_init(self, data):
3884
        self.TypeId = NodeId.from_binary(data)
3885
        self.ResponseHeader = ResponseHeader.from_binary(data)
3886
        self.Parameters = ActivateSessionResult.from_binary(data)
3887
3888 1
    def __str__(self):
3889
        return 'ActivateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3890
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
3891
               'Parameters:' + str(self.Parameters) + ')'
3892
3893 1
    __repr__ = __str__
3894
3895
3896 1
class CloseSessionRequest(FrozenClass):
3897
    '''
3898
    Closes a session with the server.
3899
3900
    :ivar TypeId:
3901
    :vartype TypeId: NodeId
3902
    :ivar RequestHeader:
3903
    :vartype RequestHeader: RequestHeader
3904
    :ivar DeleteSubscriptions:
3905
    :vartype DeleteSubscriptions: Boolean
3906
    '''
3907
3908 1
    ua_types = {
3909
        'TypeId': 'NodeId',
3910
        'RequestHeader': 'RequestHeader',
3911
        'DeleteSubscriptions': 'Boolean',
3912
               }
3913
3914 1
    def __init__(self, binary=None):
3915
        if binary is not None:
3916
            self._binary_init(binary)
3917
            self._freeze = True
3918
            return
3919
        self.TypeId = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary)
3920
        self.RequestHeader = RequestHeader()
3921
        self.DeleteSubscriptions = True
3922
        self._freeze = True
3923
3924 1
    def to_binary(self):
3925
        packet = []
3926
        packet.append(self.TypeId.to_binary())
3927
        packet.append(self.RequestHeader.to_binary())
3928
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteSubscriptions))
3929
        return b''.join(packet)
3930
3931 1
    @staticmethod
3932
    def from_binary(data):
3933
        return CloseSessionRequest(data)
3934
3935 1
    def _binary_init(self, data):
3936
        self.TypeId = NodeId.from_binary(data)
3937
        self.RequestHeader = RequestHeader.from_binary(data)
3938
        self.DeleteSubscriptions = uabin.Primitives.Boolean.unpack(data)
3939
3940 1
    def __str__(self):
3941
        return 'CloseSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3942
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3943
               'DeleteSubscriptions:' + str(self.DeleteSubscriptions) + ')'
3944
3945 1
    __repr__ = __str__
3946
3947
3948 1
class CloseSessionResponse(FrozenClass):
3949
    '''
3950
    Closes a session with the server.
3951
3952
    :ivar TypeId:
3953
    :vartype TypeId: NodeId
3954
    :ivar ResponseHeader:
3955
    :vartype ResponseHeader: ResponseHeader
3956
    '''
3957
3958 1
    ua_types = {
3959
        'TypeId': 'NodeId',
3960
        'ResponseHeader': 'ResponseHeader',
3961
               }
3962
3963 1
    def __init__(self, binary=None):
3964
        if binary is not None:
3965
            self._binary_init(binary)
3966
            self._freeze = True
3967
            return
3968
        self.TypeId = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary)
3969
        self.ResponseHeader = ResponseHeader()
3970
        self._freeze = True
3971
3972 1
    def to_binary(self):
3973
        packet = []
3974
        packet.append(self.TypeId.to_binary())
3975
        packet.append(self.ResponseHeader.to_binary())
3976
        return b''.join(packet)
3977
3978 1
    @staticmethod
3979
    def from_binary(data):
3980
        return CloseSessionResponse(data)
3981
3982 1
    def _binary_init(self, data):
3983
        self.TypeId = NodeId.from_binary(data)
3984
        self.ResponseHeader = ResponseHeader.from_binary(data)
3985
3986 1
    def __str__(self):
3987
        return 'CloseSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3988
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
3989
3990 1
    __repr__ = __str__
3991
3992
3993 1 View Code Duplication
class CancelParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3994
    '''
3995
    :ivar RequestHandle:
3996
    :vartype RequestHandle: UInt32
3997
    '''
3998
3999 1
    ua_types = {
4000
        'RequestHandle': 'UInt32',
4001
               }
4002
4003 1
    def __init__(self, binary=None):
4004
        if binary is not None:
4005
            self._binary_init(binary)
4006
            self._freeze = True
4007
            return
4008
        self.RequestHandle = 0
4009
        self._freeze = True
4010
4011 1
    def to_binary(self):
4012
        packet = []
4013
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
4014
        return b''.join(packet)
4015
4016 1
    @staticmethod
4017
    def from_binary(data):
4018
        return CancelParameters(data)
4019
4020 1
    def _binary_init(self, data):
4021
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
4022
4023 1
    def __str__(self):
4024
        return 'CancelParameters(' + 'RequestHandle:' + str(self.RequestHandle) + ')'
4025
4026 1
    __repr__ = __str__
4027
4028
4029 1
class CancelRequest(FrozenClass):
4030
    '''
4031
    Cancels an outstanding request.
4032
4033
    :ivar TypeId:
4034
    :vartype TypeId: NodeId
4035
    :ivar RequestHeader:
4036
    :vartype RequestHeader: RequestHeader
4037
    :ivar Parameters:
4038
    :vartype Parameters: CancelParameters
4039
    '''
4040
4041 1
    ua_types = {
4042
        'TypeId': 'NodeId',
4043
        'RequestHeader': 'RequestHeader',
4044
        'Parameters': 'CancelParameters',
4045
               }
4046
4047 1
    def __init__(self, binary=None):
4048
        if binary is not None:
4049
            self._binary_init(binary)
4050
            self._freeze = True
4051
            return
4052
        self.TypeId = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary)
4053
        self.RequestHeader = RequestHeader()
4054
        self.Parameters = CancelParameters()
4055
        self._freeze = True
4056
4057 1
    def to_binary(self):
4058
        packet = []
4059
        packet.append(self.TypeId.to_binary())
4060
        packet.append(self.RequestHeader.to_binary())
4061
        packet.append(self.Parameters.to_binary())
4062
        return b''.join(packet)
4063
4064 1
    @staticmethod
4065
    def from_binary(data):
4066
        return CancelRequest(data)
4067
4068 1
    def _binary_init(self, data):
4069
        self.TypeId = NodeId.from_binary(data)
4070
        self.RequestHeader = RequestHeader.from_binary(data)
4071
        self.Parameters = CancelParameters.from_binary(data)
4072
4073 1
    def __str__(self):
4074
        return 'CancelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4075
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
4076
               'Parameters:' + str(self.Parameters) + ')'
4077
4078 1
    __repr__ = __str__
4079
4080
4081 1 View Code Duplication
class CancelResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4082
    '''
4083
    :ivar CancelCount:
4084
    :vartype CancelCount: UInt32
4085
    '''
4086
4087 1
    ua_types = {
4088
        'CancelCount': 'UInt32',
4089
               }
4090
4091 1
    def __init__(self, binary=None):
4092
        if binary is not None:
4093
            self._binary_init(binary)
4094
            self._freeze = True
4095
            return
4096
        self.CancelCount = 0
4097
        self._freeze = True
4098
4099 1
    def to_binary(self):
4100
        packet = []
4101
        packet.append(uabin.Primitives.UInt32.pack(self.CancelCount))
4102
        return b''.join(packet)
4103
4104 1
    @staticmethod
4105
    def from_binary(data):
4106
        return CancelResult(data)
4107
4108 1
    def _binary_init(self, data):
4109
        self.CancelCount = uabin.Primitives.UInt32.unpack(data)
4110
4111 1
    def __str__(self):
4112
        return 'CancelResult(' + 'CancelCount:' + str(self.CancelCount) + ')'
4113
4114 1
    __repr__ = __str__
4115
4116
4117 1
class CancelResponse(FrozenClass):
4118
    '''
4119
    Cancels an outstanding request.
4120
4121
    :ivar TypeId:
4122
    :vartype TypeId: NodeId
4123
    :ivar ResponseHeader:
4124
    :vartype ResponseHeader: ResponseHeader
4125
    :ivar Parameters:
4126
    :vartype Parameters: CancelResult
4127
    '''
4128
4129 1
    ua_types = {
4130
        'TypeId': 'NodeId',
4131
        'ResponseHeader': 'ResponseHeader',
4132
        'Parameters': 'CancelResult',
4133
               }
4134
4135 1
    def __init__(self, binary=None):
4136
        if binary is not None:
4137
            self._binary_init(binary)
4138
            self._freeze = True
4139
            return
4140
        self.TypeId = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary)
4141
        self.ResponseHeader = ResponseHeader()
4142
        self.Parameters = CancelResult()
4143
        self._freeze = True
4144
4145 1
    def to_binary(self):
4146
        packet = []
4147
        packet.append(self.TypeId.to_binary())
4148
        packet.append(self.ResponseHeader.to_binary())
4149
        packet.append(self.Parameters.to_binary())
4150
        return b''.join(packet)
4151
4152 1
    @staticmethod
4153
    def from_binary(data):
4154
        return CancelResponse(data)
4155
4156 1
    def _binary_init(self, data):
4157
        self.TypeId = NodeId.from_binary(data)
4158
        self.ResponseHeader = ResponseHeader.from_binary(data)
4159
        self.Parameters = CancelResult.from_binary(data)
4160
4161 1
    def __str__(self):
4162
        return 'CancelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4163
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
4164
               'Parameters:' + str(self.Parameters) + ')'
4165
4166 1
    __repr__ = __str__
4167
4168
4169 1 View Code Duplication
class NodeAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4170
    '''
4171
    The base attributes for all nodes.
4172
4173
    :ivar SpecifiedAttributes:
4174
    :vartype SpecifiedAttributes: UInt32
4175
    :ivar DisplayName:
4176
    :vartype DisplayName: LocalizedText
4177
    :ivar Description:
4178
    :vartype Description: LocalizedText
4179
    :ivar WriteMask:
4180
    :vartype WriteMask: UInt32
4181
    :ivar UserWriteMask:
4182
    :vartype UserWriteMask: UInt32
4183
    '''
4184
4185 1
    ua_types = {
4186
        'SpecifiedAttributes': 'UInt32',
4187
        'DisplayName': 'LocalizedText',
4188
        'Description': 'LocalizedText',
4189
        'WriteMask': 'UInt32',
4190
        'UserWriteMask': 'UInt32',
4191
               }
4192
4193 1
    def __init__(self, binary=None):
4194
        if binary is not None:
4195
            self._binary_init(binary)
4196
            self._freeze = True
4197
            return
4198
        self.SpecifiedAttributes = 0
4199
        self.DisplayName = LocalizedText()
4200
        self.Description = LocalizedText()
4201
        self.WriteMask = 0
4202
        self.UserWriteMask = 0
4203
        self._freeze = True
4204
4205 1
    def to_binary(self):
4206
        packet = []
4207
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4208
        packet.append(self.DisplayName.to_binary())
4209
        packet.append(self.Description.to_binary())
4210
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4211
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4212
        return b''.join(packet)
4213
4214 1
    @staticmethod
4215
    def from_binary(data):
4216
        return NodeAttributes(data)
4217
4218 1
    def _binary_init(self, data):
4219
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4220
        self.DisplayName = LocalizedText.from_binary(data)
4221
        self.Description = LocalizedText.from_binary(data)
4222
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4223
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4224
4225 1
    def __str__(self):
4226
        return 'NodeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4227
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4228
               'Description:' + str(self.Description) + ', ' + \
4229
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4230
               'UserWriteMask:' + str(self.UserWriteMask) + ')'
4231
4232 1
    __repr__ = __str__
4233
4234
4235 1 View Code Duplication
class ObjectAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4236
    '''
4237
    The attributes for an object node.
4238
4239
    :ivar SpecifiedAttributes:
4240
    :vartype SpecifiedAttributes: UInt32
4241
    :ivar DisplayName:
4242
    :vartype DisplayName: LocalizedText
4243
    :ivar Description:
4244
    :vartype Description: LocalizedText
4245
    :ivar WriteMask:
4246
    :vartype WriteMask: UInt32
4247
    :ivar UserWriteMask:
4248
    :vartype UserWriteMask: UInt32
4249
    :ivar EventNotifier:
4250
    :vartype EventNotifier: Byte
4251
    '''
4252
4253 1
    ua_types = {
4254
        'SpecifiedAttributes': 'UInt32',
4255
        'DisplayName': 'LocalizedText',
4256
        'Description': 'LocalizedText',
4257
        'WriteMask': 'UInt32',
4258
        'UserWriteMask': 'UInt32',
4259
        'EventNotifier': 'Byte',
4260
               }
4261
4262 1
    def __init__(self, binary=None):
4263
        if binary is not None:
4264
            self._binary_init(binary)
4265
            self._freeze = True
4266
            return
4267
        self.SpecifiedAttributes = 0
4268
        self.DisplayName = LocalizedText()
4269
        self.Description = LocalizedText()
4270
        self.WriteMask = 0
4271
        self.UserWriteMask = 0
4272
        self.EventNotifier = 0
4273
        self._freeze = True
4274
4275 1
    def to_binary(self):
4276
        packet = []
4277
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4278
        packet.append(self.DisplayName.to_binary())
4279
        packet.append(self.Description.to_binary())
4280
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4281
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4282
        packet.append(uabin.Primitives.Byte.pack(self.EventNotifier))
4283
        return b''.join(packet)
4284
4285 1
    @staticmethod
4286
    def from_binary(data):
4287
        return ObjectAttributes(data)
4288
4289 1
    def _binary_init(self, data):
4290
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4291
        self.DisplayName = LocalizedText.from_binary(data)
4292
        self.Description = LocalizedText.from_binary(data)
4293
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4294
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4295
        self.EventNotifier = uabin.Primitives.Byte.unpack(data)
4296
4297 1
    def __str__(self):
4298
        return 'ObjectAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4299
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4300
               'Description:' + str(self.Description) + ', ' + \
4301
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4302
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4303
               'EventNotifier:' + str(self.EventNotifier) + ')'
4304
4305 1
    __repr__ = __str__
4306
4307
4308 1
class VariableAttributes(FrozenClass):
4309
    '''
4310
    The attributes for a variable node.
4311
4312
    :ivar SpecifiedAttributes:
4313
    :vartype SpecifiedAttributes: UInt32
4314
    :ivar DisplayName:
4315
    :vartype DisplayName: LocalizedText
4316
    :ivar Description:
4317
    :vartype Description: LocalizedText
4318
    :ivar WriteMask:
4319
    :vartype WriteMask: UInt32
4320
    :ivar UserWriteMask:
4321
    :vartype UserWriteMask: UInt32
4322
    :ivar Value:
4323
    :vartype Value: Variant
4324
    :ivar DataType:
4325
    :vartype DataType: NodeId
4326
    :ivar ValueRank:
4327
    :vartype ValueRank: Int32
4328
    :ivar ArrayDimensions:
4329
    :vartype ArrayDimensions: UInt32
4330
    :ivar AccessLevel:
4331
    :vartype AccessLevel: Byte
4332
    :ivar UserAccessLevel:
4333
    :vartype UserAccessLevel: Byte
4334
    :ivar MinimumSamplingInterval:
4335
    :vartype MinimumSamplingInterval: Double
4336
    :ivar Historizing:
4337
    :vartype Historizing: Boolean
4338
    '''
4339
4340 1
    ua_types = {
4341
        'SpecifiedAttributes': 'UInt32',
4342
        'DisplayName': 'LocalizedText',
4343
        'Description': 'LocalizedText',
4344
        'WriteMask': 'UInt32',
4345
        'UserWriteMask': 'UInt32',
4346
        'Value': 'Variant',
4347
        'DataType': 'NodeId',
4348
        'ValueRank': 'Int32',
4349
        'ArrayDimensions': 'UInt32',
4350
        'AccessLevel': 'Byte',
4351
        'UserAccessLevel': 'Byte',
4352
        'MinimumSamplingInterval': 'Double',
4353
        'Historizing': 'Boolean',
4354
               }
4355
4356 1
    def __init__(self, binary=None):
4357
        if binary is not None:
4358
            self._binary_init(binary)
4359
            self._freeze = True
4360
            return
4361
        self.SpecifiedAttributes = 0
4362
        self.DisplayName = LocalizedText()
4363
        self.Description = LocalizedText()
4364
        self.WriteMask = 0
4365
        self.UserWriteMask = 0
4366
        self.Value = Variant()
4367
        self.DataType = NodeId()
4368
        self.ValueRank = 0
4369
        self.ArrayDimensions = []
4370
        self.AccessLevel = 0
4371
        self.UserAccessLevel = 0
4372
        self.MinimumSamplingInterval = 0
4373
        self.Historizing = True
4374
        self._freeze = True
4375
4376 1
    def to_binary(self):
4377
        packet = []
4378
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4379
        packet.append(self.DisplayName.to_binary())
4380
        packet.append(self.Description.to_binary())
4381
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4382
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4383
        packet.append(self.Value.to_binary())
4384
        packet.append(self.DataType.to_binary())
4385
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
4386
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
4387
        for fieldname in self.ArrayDimensions:
4388
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
4389
        packet.append(uabin.Primitives.Byte.pack(self.AccessLevel))
4390
        packet.append(uabin.Primitives.Byte.pack(self.UserAccessLevel))
4391
        packet.append(uabin.Primitives.Double.pack(self.MinimumSamplingInterval))
4392
        packet.append(uabin.Primitives.Boolean.pack(self.Historizing))
4393
        return b''.join(packet)
4394
4395 1
    @staticmethod
4396
    def from_binary(data):
4397
        return VariableAttributes(data)
4398
4399 1
    def _binary_init(self, data):
4400
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4401
        self.DisplayName = LocalizedText.from_binary(data)
4402
        self.Description = LocalizedText.from_binary(data)
4403
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4404
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4405
        self.Value = Variant.from_binary(data)
4406
        self.DataType = NodeId.from_binary(data)
4407
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
4408
        self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
4409
        self.AccessLevel = uabin.Primitives.Byte.unpack(data)
4410
        self.UserAccessLevel = uabin.Primitives.Byte.unpack(data)
4411
        self.MinimumSamplingInterval = uabin.Primitives.Double.unpack(data)
4412
        self.Historizing = uabin.Primitives.Boolean.unpack(data)
4413
4414 1
    def __str__(self):
4415
        return 'VariableAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4416
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4417
               'Description:' + str(self.Description) + ', ' + \
4418
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4419
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4420
               'Value:' + str(self.Value) + ', ' + \
4421
               'DataType:' + str(self.DataType) + ', ' + \
4422
               'ValueRank:' + str(self.ValueRank) + ', ' + \
4423
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
4424
               'AccessLevel:' + str(self.AccessLevel) + ', ' + \
4425
               'UserAccessLevel:' + str(self.UserAccessLevel) + ', ' + \
4426
               'MinimumSamplingInterval:' + str(self.MinimumSamplingInterval) + ', ' + \
4427
               'Historizing:' + str(self.Historizing) + ')'
4428
4429 1
    __repr__ = __str__
4430
4431
4432 1 View Code Duplication
class MethodAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4433
    '''
4434
    The attributes for a method node.
4435
4436
    :ivar SpecifiedAttributes:
4437
    :vartype SpecifiedAttributes: UInt32
4438
    :ivar DisplayName:
4439
    :vartype DisplayName: LocalizedText
4440
    :ivar Description:
4441
    :vartype Description: LocalizedText
4442
    :ivar WriteMask:
4443
    :vartype WriteMask: UInt32
4444
    :ivar UserWriteMask:
4445
    :vartype UserWriteMask: UInt32
4446
    :ivar Executable:
4447
    :vartype Executable: Boolean
4448
    :ivar UserExecutable:
4449
    :vartype UserExecutable: Boolean
4450
    '''
4451
4452 1
    ua_types = {
4453
        'SpecifiedAttributes': 'UInt32',
4454
        'DisplayName': 'LocalizedText',
4455
        'Description': 'LocalizedText',
4456
        'WriteMask': 'UInt32',
4457
        'UserWriteMask': 'UInt32',
4458
        'Executable': 'Boolean',
4459
        'UserExecutable': 'Boolean',
4460
               }
4461
4462 1
    def __init__(self, binary=None):
4463
        if binary is not None:
4464
            self._binary_init(binary)
4465
            self._freeze = True
4466
            return
4467
        self.SpecifiedAttributes = 0
4468
        self.DisplayName = LocalizedText()
4469
        self.Description = LocalizedText()
4470
        self.WriteMask = 0
4471
        self.UserWriteMask = 0
4472
        self.Executable = True
4473
        self.UserExecutable = True
4474
        self._freeze = True
4475
4476 1
    def to_binary(self):
4477
        packet = []
4478
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4479
        packet.append(self.DisplayName.to_binary())
4480
        packet.append(self.Description.to_binary())
4481
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4482
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4483
        packet.append(uabin.Primitives.Boolean.pack(self.Executable))
4484
        packet.append(uabin.Primitives.Boolean.pack(self.UserExecutable))
4485
        return b''.join(packet)
4486
4487 1
    @staticmethod
4488
    def from_binary(data):
4489
        return MethodAttributes(data)
4490
4491 1
    def _binary_init(self, data):
4492
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4493
        self.DisplayName = LocalizedText.from_binary(data)
4494
        self.Description = LocalizedText.from_binary(data)
4495
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4496
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4497
        self.Executable = uabin.Primitives.Boolean.unpack(data)
4498
        self.UserExecutable = uabin.Primitives.Boolean.unpack(data)
4499
4500 1
    def __str__(self):
4501
        return 'MethodAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4502
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4503
               'Description:' + str(self.Description) + ', ' + \
4504
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4505
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4506
               'Executable:' + str(self.Executable) + ', ' + \
4507
               'UserExecutable:' + str(self.UserExecutable) + ')'
4508
4509 1
    __repr__ = __str__
4510
4511
4512 1 View Code Duplication
class ObjectTypeAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4513
    '''
4514
    The attributes for an object type node.
4515
4516
    :ivar SpecifiedAttributes:
4517
    :vartype SpecifiedAttributes: UInt32
4518
    :ivar DisplayName:
4519
    :vartype DisplayName: LocalizedText
4520
    :ivar Description:
4521
    :vartype Description: LocalizedText
4522
    :ivar WriteMask:
4523
    :vartype WriteMask: UInt32
4524
    :ivar UserWriteMask:
4525
    :vartype UserWriteMask: UInt32
4526
    :ivar IsAbstract:
4527
    :vartype IsAbstract: Boolean
4528
    '''
4529
4530 1
    ua_types = {
4531
        'SpecifiedAttributes': 'UInt32',
4532
        'DisplayName': 'LocalizedText',
4533
        'Description': 'LocalizedText',
4534
        'WriteMask': 'UInt32',
4535
        'UserWriteMask': 'UInt32',
4536
        'IsAbstract': 'Boolean',
4537
               }
4538
4539 1
    def __init__(self, binary=None):
4540
        if binary is not None:
4541
            self._binary_init(binary)
4542
            self._freeze = True
4543
            return
4544
        self.SpecifiedAttributes = 0
4545
        self.DisplayName = LocalizedText()
4546
        self.Description = LocalizedText()
4547
        self.WriteMask = 0
4548
        self.UserWriteMask = 0
4549
        self.IsAbstract = True
4550
        self._freeze = True
4551
4552 1
    def to_binary(self):
4553
        packet = []
4554
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4555
        packet.append(self.DisplayName.to_binary())
4556
        packet.append(self.Description.to_binary())
4557
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4558
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4559
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4560
        return b''.join(packet)
4561
4562 1
    @staticmethod
4563
    def from_binary(data):
4564
        return ObjectTypeAttributes(data)
4565
4566 1
    def _binary_init(self, data):
4567
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4568
        self.DisplayName = LocalizedText.from_binary(data)
4569
        self.Description = LocalizedText.from_binary(data)
4570
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4571
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4572
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4573
4574 1
    def __str__(self):
4575
        return 'ObjectTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4576
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4577
               'Description:' + str(self.Description) + ', ' + \
4578
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4579
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4580
               'IsAbstract:' + str(self.IsAbstract) + ')'
4581
4582 1
    __repr__ = __str__
4583
4584
4585 1
class VariableTypeAttributes(FrozenClass):
4586
    '''
4587
    The attributes for a variable type node.
4588
4589
    :ivar SpecifiedAttributes:
4590
    :vartype SpecifiedAttributes: UInt32
4591
    :ivar DisplayName:
4592
    :vartype DisplayName: LocalizedText
4593
    :ivar Description:
4594
    :vartype Description: LocalizedText
4595
    :ivar WriteMask:
4596
    :vartype WriteMask: UInt32
4597
    :ivar UserWriteMask:
4598
    :vartype UserWriteMask: UInt32
4599
    :ivar Value:
4600
    :vartype Value: Variant
4601
    :ivar DataType:
4602
    :vartype DataType: NodeId
4603
    :ivar ValueRank:
4604
    :vartype ValueRank: Int32
4605
    :ivar ArrayDimensions:
4606
    :vartype ArrayDimensions: UInt32
4607
    :ivar IsAbstract:
4608
    :vartype IsAbstract: Boolean
4609
    '''
4610
4611 1
    ua_types = {
4612
        'SpecifiedAttributes': 'UInt32',
4613
        'DisplayName': 'LocalizedText',
4614
        'Description': 'LocalizedText',
4615
        'WriteMask': 'UInt32',
4616
        'UserWriteMask': 'UInt32',
4617
        'Value': 'Variant',
4618
        'DataType': 'NodeId',
4619
        'ValueRank': 'Int32',
4620
        'ArrayDimensions': 'UInt32',
4621
        'IsAbstract': 'Boolean',
4622
               }
4623
4624 1 View Code Duplication
    def __init__(self, binary=None):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4625
        if binary is not None:
4626
            self._binary_init(binary)
4627
            self._freeze = True
4628
            return
4629
        self.SpecifiedAttributes = 0
4630
        self.DisplayName = LocalizedText()
4631
        self.Description = LocalizedText()
4632
        self.WriteMask = 0
4633
        self.UserWriteMask = 0
4634
        self.Value = Variant()
4635
        self.DataType = NodeId()
4636
        self.ValueRank = 0
4637
        self.ArrayDimensions = []
4638
        self.IsAbstract = True
4639
        self._freeze = True
4640
4641 1
    def to_binary(self):
4642
        packet = []
4643
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4644
        packet.append(self.DisplayName.to_binary())
4645
        packet.append(self.Description.to_binary())
4646
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4647
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4648
        packet.append(self.Value.to_binary())
4649
        packet.append(self.DataType.to_binary())
4650
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
4651
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
4652
        for fieldname in self.ArrayDimensions:
4653
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
4654
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4655
        return b''.join(packet)
4656
4657 1
    @staticmethod
4658
    def from_binary(data):
4659
        return VariableTypeAttributes(data)
4660
4661 1 View Code Duplication
    def _binary_init(self, data):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4662
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4663
        self.DisplayName = LocalizedText.from_binary(data)
4664
        self.Description = LocalizedText.from_binary(data)
4665
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4666
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4667
        self.Value = Variant.from_binary(data)
4668
        self.DataType = NodeId.from_binary(data)
4669
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
4670
        self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
4671
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4672
4673 1
    def __str__(self):
4674
        return 'VariableTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4675
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4676
               'Description:' + str(self.Description) + ', ' + \
4677
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4678
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4679
               'Value:' + str(self.Value) + ', ' + \
4680
               'DataType:' + str(self.DataType) + ', ' + \
4681
               'ValueRank:' + str(self.ValueRank) + ', ' + \
4682
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
4683
               'IsAbstract:' + str(self.IsAbstract) + ')'
4684
4685 1
    __repr__ = __str__
4686
4687
4688 1
class ReferenceTypeAttributes(FrozenClass):
4689
    '''
4690
    The attributes for a reference type node.
4691
4692
    :ivar SpecifiedAttributes:
4693
    :vartype SpecifiedAttributes: UInt32
4694
    :ivar DisplayName:
4695
    :vartype DisplayName: LocalizedText
4696
    :ivar Description:
4697
    :vartype Description: LocalizedText
4698
    :ivar WriteMask:
4699
    :vartype WriteMask: UInt32
4700
    :ivar UserWriteMask:
4701
    :vartype UserWriteMask: UInt32
4702
    :ivar IsAbstract:
4703
    :vartype IsAbstract: Boolean
4704
    :ivar Symmetric:
4705
    :vartype Symmetric: Boolean
4706
    :ivar InverseName:
4707
    :vartype InverseName: LocalizedText
4708
    '''
4709
4710 1
    ua_types = {
4711
        'SpecifiedAttributes': 'UInt32',
4712
        'DisplayName': 'LocalizedText',
4713
        'Description': 'LocalizedText',
4714
        'WriteMask': 'UInt32',
4715
        'UserWriteMask': 'UInt32',
4716
        'IsAbstract': 'Boolean',
4717
        'Symmetric': 'Boolean',
4718
        'InverseName': 'LocalizedText',
4719
               }
4720
4721 1 View Code Duplication
    def __init__(self, binary=None):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4722
        if binary is not None:
4723
            self._binary_init(binary)
4724
            self._freeze = True
4725
            return
4726
        self.SpecifiedAttributes = 0
4727
        self.DisplayName = LocalizedText()
4728
        self.Description = LocalizedText()
4729
        self.WriteMask = 0
4730
        self.UserWriteMask = 0
4731
        self.IsAbstract = True
4732
        self.Symmetric = True
4733
        self.InverseName = LocalizedText()
4734
        self._freeze = True
4735
4736 1
    def to_binary(self):
4737
        packet = []
4738
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4739
        packet.append(self.DisplayName.to_binary())
4740
        packet.append(self.Description.to_binary())
4741
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4742
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4743
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4744
        packet.append(uabin.Primitives.Boolean.pack(self.Symmetric))
4745
        packet.append(self.InverseName.to_binary())
4746
        return b''.join(packet)
4747
4748 1
    @staticmethod
4749
    def from_binary(data):
4750
        return ReferenceTypeAttributes(data)
4751
4752 1
    def _binary_init(self, data):
4753
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4754
        self.DisplayName = LocalizedText.from_binary(data)
4755
        self.Description = LocalizedText.from_binary(data)
4756
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4757
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4758
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4759
        self.Symmetric = uabin.Primitives.Boolean.unpack(data)
4760
        self.InverseName = LocalizedText.from_binary(data)
4761
4762 1
    def __str__(self):
4763
        return 'ReferenceTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4764
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4765
               'Description:' + str(self.Description) + ', ' + \
4766
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4767
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4768
               'IsAbstract:' + str(self.IsAbstract) + ', ' + \
4769
               'Symmetric:' + str(self.Symmetric) + ', ' + \
4770
               'InverseName:' + str(self.InverseName) + ')'
4771
4772 1
    __repr__ = __str__
4773
4774
4775 1 View Code Duplication
class DataTypeAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4776
    '''
4777
    The attributes for a data type node.
4778
4779
    :ivar SpecifiedAttributes:
4780
    :vartype SpecifiedAttributes: UInt32
4781
    :ivar DisplayName:
4782
    :vartype DisplayName: LocalizedText
4783
    :ivar Description:
4784
    :vartype Description: LocalizedText
4785
    :ivar WriteMask:
4786
    :vartype WriteMask: UInt32
4787
    :ivar UserWriteMask:
4788
    :vartype UserWriteMask: UInt32
4789
    :ivar IsAbstract:
4790
    :vartype IsAbstract: Boolean
4791
    '''
4792
4793 1
    ua_types = {
4794
        'SpecifiedAttributes': 'UInt32',
4795
        'DisplayName': 'LocalizedText',
4796
        'Description': 'LocalizedText',
4797
        'WriteMask': 'UInt32',
4798
        'UserWriteMask': 'UInt32',
4799
        'IsAbstract': 'Boolean',
4800
               }
4801
4802 1
    def __init__(self, binary=None):
4803
        if binary is not None:
4804
            self._binary_init(binary)
4805
            self._freeze = True
4806
            return
4807
        self.SpecifiedAttributes = 0
4808
        self.DisplayName = LocalizedText()
4809
        self.Description = LocalizedText()
4810
        self.WriteMask = 0
4811
        self.UserWriteMask = 0
4812
        self.IsAbstract = True
4813
        self._freeze = True
4814
4815 1
    def to_binary(self):
4816
        packet = []
4817
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4818
        packet.append(self.DisplayName.to_binary())
4819
        packet.append(self.Description.to_binary())
4820
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4821
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4822
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4823
        return b''.join(packet)
4824
4825 1
    @staticmethod
4826
    def from_binary(data):
4827
        return DataTypeAttributes(data)
4828
4829 1
    def _binary_init(self, data):
4830
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4831
        self.DisplayName = LocalizedText.from_binary(data)
4832
        self.Description = LocalizedText.from_binary(data)
4833
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4834
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4835
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4836
4837 1
    def __str__(self):
4838
        return 'DataTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4839
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4840
               'Description:' + str(self.Description) + ', ' + \
4841
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4842
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4843
               'IsAbstract:' + str(self.IsAbstract) + ')'
4844
4845 1
    __repr__ = __str__
4846
4847
4848 1 View Code Duplication
class ViewAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4849
    '''
4850
    The attributes for a view node.
4851
4852
    :ivar SpecifiedAttributes:
4853
    :vartype SpecifiedAttributes: UInt32
4854
    :ivar DisplayName:
4855
    :vartype DisplayName: LocalizedText
4856
    :ivar Description:
4857
    :vartype Description: LocalizedText
4858
    :ivar WriteMask:
4859
    :vartype WriteMask: UInt32
4860
    :ivar UserWriteMask:
4861
    :vartype UserWriteMask: UInt32
4862
    :ivar ContainsNoLoops:
4863
    :vartype ContainsNoLoops: Boolean
4864
    :ivar EventNotifier:
4865
    :vartype EventNotifier: Byte
4866
    '''
4867
4868 1
    ua_types = {
4869
        'SpecifiedAttributes': 'UInt32',
4870
        'DisplayName': 'LocalizedText',
4871
        'Description': 'LocalizedText',
4872
        'WriteMask': 'UInt32',
4873
        'UserWriteMask': 'UInt32',
4874
        'ContainsNoLoops': 'Boolean',
4875
        'EventNotifier': 'Byte',
4876
               }
4877
4878 1
    def __init__(self, binary=None):
4879
        if binary is not None:
4880
            self._binary_init(binary)
4881
            self._freeze = True
4882
            return
4883
        self.SpecifiedAttributes = 0
4884
        self.DisplayName = LocalizedText()
4885
        self.Description = LocalizedText()
4886
        self.WriteMask = 0
4887
        self.UserWriteMask = 0
4888
        self.ContainsNoLoops = True
4889
        self.EventNotifier = 0
4890
        self._freeze = True
4891
4892 1
    def to_binary(self):
4893
        packet = []
4894
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4895
        packet.append(self.DisplayName.to_binary())
4896
        packet.append(self.Description.to_binary())
4897
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4898
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4899
        packet.append(uabin.Primitives.Boolean.pack(self.ContainsNoLoops))
4900
        packet.append(uabin.Primitives.Byte.pack(self.EventNotifier))
4901
        return b''.join(packet)
4902
4903 1
    @staticmethod
4904
    def from_binary(data):
4905
        return ViewAttributes(data)
4906
4907 1
    def _binary_init(self, data):
4908
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4909
        self.DisplayName = LocalizedText.from_binary(data)
4910
        self.Description = LocalizedText.from_binary(data)
4911
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4912
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4913
        self.ContainsNoLoops = uabin.Primitives.Boolean.unpack(data)
4914
        self.EventNotifier = uabin.Primitives.Byte.unpack(data)
4915
4916 1
    def __str__(self):
4917
        return 'ViewAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4918
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4919
               'Description:' + str(self.Description) + ', ' + \
4920
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4921
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4922
               'ContainsNoLoops:' + str(self.ContainsNoLoops) + ', ' + \
4923
               'EventNotifier:' + str(self.EventNotifier) + ')'
4924
4925 1
    __repr__ = __str__
4926
4927
4928 1 View Code Duplication
class AddNodesItem(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4929
    '''
4930
    A request to add a node to the server address space.
4931
4932
    :ivar ParentNodeId:
4933
    :vartype ParentNodeId: ExpandedNodeId
4934
    :ivar ReferenceTypeId:
4935
    :vartype ReferenceTypeId: NodeId
4936
    :ivar RequestedNewNodeId:
4937
    :vartype RequestedNewNodeId: ExpandedNodeId
4938
    :ivar BrowseName:
4939
    :vartype BrowseName: QualifiedName
4940
    :ivar NodeClass:
4941
    :vartype NodeClass: NodeClass
4942
    :ivar NodeAttributes:
4943
    :vartype NodeAttributes: ExtensionObject
4944
    :ivar TypeDefinition:
4945
    :vartype TypeDefinition: ExpandedNodeId
4946
    '''
4947
4948 1
    ua_types = {
4949
        'ParentNodeId': 'ExpandedNodeId',
4950
        'ReferenceTypeId': 'NodeId',
4951
        'RequestedNewNodeId': 'ExpandedNodeId',
4952
        'BrowseName': 'QualifiedName',
4953
        'NodeClass': 'NodeClass',
4954
        'NodeAttributes': 'ExtensionObject',
4955
        'TypeDefinition': 'ExpandedNodeId',
4956
               }
4957
4958 1
    def __init__(self, binary=None):
4959
        if binary is not None:
4960
            self._binary_init(binary)
4961
            self._freeze = True
4962
            return
4963
        self.ParentNodeId = ExpandedNodeId()
4964
        self.ReferenceTypeId = NodeId()
4965
        self.RequestedNewNodeId = ExpandedNodeId()
4966
        self.BrowseName = QualifiedName()
4967
        self.NodeClass = NodeClass(0)
4968
        self.NodeAttributes = None
4969
        self.TypeDefinition = ExpandedNodeId()
4970
        self._freeze = True
4971
4972 1
    def to_binary(self):
4973
        packet = []
4974
        packet.append(self.ParentNodeId.to_binary())
4975
        packet.append(self.ReferenceTypeId.to_binary())
4976
        packet.append(self.RequestedNewNodeId.to_binary())
4977
        packet.append(self.BrowseName.to_binary())
4978
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value))
4979
        packet.append(extensionobject_to_binary(self.NodeAttributes))
4980
        packet.append(self.TypeDefinition.to_binary())
4981
        return b''.join(packet)
4982
4983 1
    @staticmethod
4984
    def from_binary(data):
4985
        return AddNodesItem(data)
4986
4987 1
    def _binary_init(self, data):
4988
        self.ParentNodeId = ExpandedNodeId.from_binary(data)
4989
        self.ReferenceTypeId = NodeId.from_binary(data)
4990
        self.RequestedNewNodeId = ExpandedNodeId.from_binary(data)
4991
        self.BrowseName = QualifiedName.from_binary(data)
4992
        self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
4993
        self.NodeAttributes = extensionobject_from_binary(data)
4994
        self.TypeDefinition = ExpandedNodeId.from_binary(data)
4995
4996 1
    def __str__(self):
4997
        return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \
4998
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
4999
               'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \
5000
               'BrowseName:' + str(self.BrowseName) + ', ' + \
5001
               'NodeClass:' + str(self.NodeClass) + ', ' + \
5002
               'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \
5003
               'TypeDefinition:' + str(self.TypeDefinition) + ')'
5004
5005 1
    __repr__ = __str__
5006
5007
5008 1
class AddNodesResult(FrozenClass):
5009
    '''
5010
    A result of an add node operation.
5011
5012
    :ivar StatusCode:
5013
    :vartype StatusCode: StatusCode
5014
    :ivar AddedNodeId:
5015
    :vartype AddedNodeId: NodeId
5016
    '''
5017
5018 1
    ua_types = {
5019
        'StatusCode': 'StatusCode',
5020
        'AddedNodeId': 'NodeId',
5021
               }
5022
5023 1
    def __init__(self, binary=None):
5024
        if binary is not None:
5025
            self._binary_init(binary)
5026
            self._freeze = True
5027
            return
5028
        self.StatusCode = StatusCode()
5029
        self.AddedNodeId = NodeId()
5030
        self._freeze = True
5031
5032 1
    def to_binary(self):
5033
        packet = []
5034
        packet.append(self.StatusCode.to_binary())
5035
        packet.append(self.AddedNodeId.to_binary())
5036
        return b''.join(packet)
5037
5038 1
    @staticmethod
5039
    def from_binary(data):
5040
        return AddNodesResult(data)
5041
5042 1
    def _binary_init(self, data):
5043
        self.StatusCode = StatusCode.from_binary(data)
5044
        self.AddedNodeId = NodeId.from_binary(data)
5045
5046 1
    def __str__(self):
5047
        return 'AddNodesResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
5048
               'AddedNodeId:' + str(self.AddedNodeId) + ')'
5049
5050 1
    __repr__ = __str__
5051
5052
5053 1 View Code Duplication
class AddNodesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5054
    '''
5055
    :ivar NodesToAdd:
5056
    :vartype NodesToAdd: AddNodesItem
5057
    '''
5058
5059 1
    ua_types = {
5060
        'NodesToAdd': 'AddNodesItem',
5061
               }
5062
5063 1
    def __init__(self, binary=None):
5064
        if binary is not None:
5065
            self._binary_init(binary)
5066
            self._freeze = True
5067
            return
5068
        self.NodesToAdd = []
5069
        self._freeze = True
5070
5071 1
    def to_binary(self):
5072
        packet = []
5073
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToAdd)))
5074
        for fieldname in self.NodesToAdd:
5075
            packet.append(fieldname.to_binary())
5076
        return b''.join(packet)
5077
5078 1
    @staticmethod
5079
    def from_binary(data):
5080
        return AddNodesParameters(data)
5081
5082 1
    def _binary_init(self, data):
5083
        length = uabin.Primitives.Int32.unpack(data)
5084
        array = []
5085
        if length != -1:
5086
            for _ in range(0, length):
5087
                array.append(AddNodesItem.from_binary(data))
5088
        self.NodesToAdd = array
5089
5090 1
    def __str__(self):
5091
        return 'AddNodesParameters(' + 'NodesToAdd:' + str(self.NodesToAdd) + ')'
5092
5093 1
    __repr__ = __str__
5094
5095
5096 1
class AddNodesRequest(FrozenClass):
5097
    '''
5098
    Adds one or more nodes to the server address space.
5099
5100
    :ivar TypeId:
5101
    :vartype TypeId: NodeId
5102
    :ivar RequestHeader:
5103
    :vartype RequestHeader: RequestHeader
5104
    :ivar Parameters:
5105
    :vartype Parameters: AddNodesParameters
5106
    '''
5107
5108 1
    ua_types = {
5109
        'TypeId': 'NodeId',
5110
        'RequestHeader': 'RequestHeader',
5111
        'Parameters': 'AddNodesParameters',
5112
               }
5113
5114 1
    def __init__(self, binary=None):
5115
        if binary is not None:
5116
            self._binary_init(binary)
5117
            self._freeze = True
5118
            return
5119
        self.TypeId = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary)
5120
        self.RequestHeader = RequestHeader()
5121
        self.Parameters = AddNodesParameters()
5122
        self._freeze = True
5123
5124 1
    def to_binary(self):
5125
        packet = []
5126
        packet.append(self.TypeId.to_binary())
5127
        packet.append(self.RequestHeader.to_binary())
5128
        packet.append(self.Parameters.to_binary())
5129
        return b''.join(packet)
5130
5131 1
    @staticmethod
5132
    def from_binary(data):
5133
        return AddNodesRequest(data)
5134
5135 1
    def _binary_init(self, data):
5136
        self.TypeId = NodeId.from_binary(data)
5137
        self.RequestHeader = RequestHeader.from_binary(data)
5138
        self.Parameters = AddNodesParameters.from_binary(data)
5139
5140 1
    def __str__(self):
5141
        return 'AddNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5142
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5143
               'Parameters:' + str(self.Parameters) + ')'
5144
5145 1
    __repr__ = __str__
5146
5147
5148 1 View Code Duplication
class AddNodesResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5149
    '''
5150
    Adds one or more nodes to the server address space.
5151
5152
    :ivar TypeId:
5153
    :vartype TypeId: NodeId
5154
    :ivar ResponseHeader:
5155
    :vartype ResponseHeader: ResponseHeader
5156
    :ivar Results:
5157
    :vartype Results: AddNodesResult
5158
    :ivar DiagnosticInfos:
5159
    :vartype DiagnosticInfos: DiagnosticInfo
5160
    '''
5161
5162 1
    ua_types = {
5163
        'TypeId': 'NodeId',
5164
        'ResponseHeader': 'ResponseHeader',
5165
        'Results': 'AddNodesResult',
5166
        'DiagnosticInfos': 'DiagnosticInfo',
5167
               }
5168
5169 1
    def __init__(self, binary=None):
5170
        if binary is not None:
5171
            self._binary_init(binary)
5172
            self._freeze = True
5173
            return
5174
        self.TypeId = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary)
5175
        self.ResponseHeader = ResponseHeader()
5176
        self.Results = []
5177
        self.DiagnosticInfos = []
5178
        self._freeze = True
5179
5180 1
    def to_binary(self):
5181
        packet = []
5182
        packet.append(self.TypeId.to_binary())
5183
        packet.append(self.ResponseHeader.to_binary())
5184
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5185
        for fieldname in self.Results:
5186
            packet.append(fieldname.to_binary())
5187
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5188
        for fieldname in self.DiagnosticInfos:
5189
            packet.append(fieldname.to_binary())
5190
        return b''.join(packet)
5191
5192 1
    @staticmethod
5193
    def from_binary(data):
5194
        return AddNodesResponse(data)
5195
5196 1
    def _binary_init(self, data):
5197
        self.TypeId = NodeId.from_binary(data)
5198
        self.ResponseHeader = ResponseHeader.from_binary(data)
5199
        length = uabin.Primitives.Int32.unpack(data)
5200
        array = []
5201
        if length != -1:
5202
            for _ in range(0, length):
5203
                array.append(AddNodesResult.from_binary(data))
5204
        self.Results = array
5205
        length = uabin.Primitives.Int32.unpack(data)
5206
        array = []
5207
        if length != -1:
5208
            for _ in range(0, length):
5209
                array.append(DiagnosticInfo.from_binary(data))
5210
        self.DiagnosticInfos = array
5211
5212 1
    def __str__(self):
5213
        return 'AddNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5214
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5215
               'Results:' + str(self.Results) + ', ' + \
5216
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5217
5218 1
    __repr__ = __str__
5219
5220
5221 1 View Code Duplication
class AddReferencesItem(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5222
    '''
5223
    A request to add a reference to the server address space.
5224
5225
    :ivar SourceNodeId:
5226
    :vartype SourceNodeId: NodeId
5227
    :ivar ReferenceTypeId:
5228
    :vartype ReferenceTypeId: NodeId
5229
    :ivar IsForward:
5230
    :vartype IsForward: Boolean
5231
    :ivar TargetServerUri:
5232
    :vartype TargetServerUri: String
5233
    :ivar TargetNodeId:
5234
    :vartype TargetNodeId: ExpandedNodeId
5235
    :ivar TargetNodeClass:
5236
    :vartype TargetNodeClass: NodeClass
5237
    '''
5238
5239 1
    ua_types = {
5240
        'SourceNodeId': 'NodeId',
5241
        'ReferenceTypeId': 'NodeId',
5242
        'IsForward': 'Boolean',
5243
        'TargetServerUri': 'String',
5244
        'TargetNodeId': 'ExpandedNodeId',
5245
        'TargetNodeClass': 'NodeClass',
5246
               }
5247
5248 1
    def __init__(self, binary=None):
5249
        if binary is not None:
5250
            self._binary_init(binary)
5251
            self._freeze = True
5252
            return
5253
        self.SourceNodeId = NodeId()
5254
        self.ReferenceTypeId = NodeId()
5255
        self.IsForward = True
5256
        self.TargetServerUri = None
5257
        self.TargetNodeId = ExpandedNodeId()
5258
        self.TargetNodeClass = NodeClass(0)
5259
        self._freeze = True
5260
5261 1
    def to_binary(self):
5262
        packet = []
5263
        packet.append(self.SourceNodeId.to_binary())
5264
        packet.append(self.ReferenceTypeId.to_binary())
5265
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
5266
        packet.append(uabin.Primitives.String.pack(self.TargetServerUri))
5267
        packet.append(self.TargetNodeId.to_binary())
5268
        packet.append(uabin.Primitives.UInt32.pack(self.TargetNodeClass.value))
5269
        return b''.join(packet)
5270
5271 1
    @staticmethod
5272
    def from_binary(data):
5273
        return AddReferencesItem(data)
5274
5275 1
    def _binary_init(self, data):
5276
        self.SourceNodeId = NodeId.from_binary(data)
5277
        self.ReferenceTypeId = NodeId.from_binary(data)
5278
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
5279
        self.TargetServerUri = uabin.Primitives.String.unpack(data)
5280
        self.TargetNodeId = ExpandedNodeId.from_binary(data)
5281
        self.TargetNodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
5282
5283 1
    def __str__(self):
5284
        return 'AddReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \
5285
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
5286
               'IsForward:' + str(self.IsForward) + ', ' + \
5287
               'TargetServerUri:' + str(self.TargetServerUri) + ', ' + \
5288
               'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \
5289
               'TargetNodeClass:' + str(self.TargetNodeClass) + ')'
5290
5291 1
    __repr__ = __str__
5292
5293
5294 1 View Code Duplication
class AddReferencesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5295
    '''
5296
    :ivar ReferencesToAdd:
5297
    :vartype ReferencesToAdd: AddReferencesItem
5298
    '''
5299
5300 1
    ua_types = {
5301
        'ReferencesToAdd': 'AddReferencesItem',
5302
               }
5303
5304 1
    def __init__(self, binary=None):
5305
        if binary is not None:
5306
            self._binary_init(binary)
5307
            self._freeze = True
5308
            return
5309
        self.ReferencesToAdd = []
5310
        self._freeze = True
5311
5312 1
    def to_binary(self):
5313
        packet = []
5314
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToAdd)))
5315
        for fieldname in self.ReferencesToAdd:
5316
            packet.append(fieldname.to_binary())
5317
        return b''.join(packet)
5318
5319 1
    @staticmethod
5320
    def from_binary(data):
5321
        return AddReferencesParameters(data)
5322
5323 1
    def _binary_init(self, data):
5324
        length = uabin.Primitives.Int32.unpack(data)
5325
        array = []
5326
        if length != -1:
5327
            for _ in range(0, length):
5328
                array.append(AddReferencesItem.from_binary(data))
5329
        self.ReferencesToAdd = array
5330
5331 1
    def __str__(self):
5332
        return 'AddReferencesParameters(' + 'ReferencesToAdd:' + str(self.ReferencesToAdd) + ')'
5333
5334 1
    __repr__ = __str__
5335
5336
5337 1
class AddReferencesRequest(FrozenClass):
5338
    '''
5339
    Adds one or more references to the server address space.
5340
5341
    :ivar TypeId:
5342
    :vartype TypeId: NodeId
5343
    :ivar RequestHeader:
5344
    :vartype RequestHeader: RequestHeader
5345
    :ivar Parameters:
5346
    :vartype Parameters: AddReferencesParameters
5347
    '''
5348
5349 1
    ua_types = {
5350
        'TypeId': 'NodeId',
5351
        'RequestHeader': 'RequestHeader',
5352
        'Parameters': 'AddReferencesParameters',
5353
               }
5354
5355 1
    def __init__(self, binary=None):
5356
        if binary is not None:
5357
            self._binary_init(binary)
5358
            self._freeze = True
5359
            return
5360
        self.TypeId = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary)
5361
        self.RequestHeader = RequestHeader()
5362
        self.Parameters = AddReferencesParameters()
5363
        self._freeze = True
5364
5365 1
    def to_binary(self):
5366
        packet = []
5367
        packet.append(self.TypeId.to_binary())
5368
        packet.append(self.RequestHeader.to_binary())
5369
        packet.append(self.Parameters.to_binary())
5370
        return b''.join(packet)
5371
5372 1
    @staticmethod
5373
    def from_binary(data):
5374
        return AddReferencesRequest(data)
5375
5376 1
    def _binary_init(self, data):
5377
        self.TypeId = NodeId.from_binary(data)
5378
        self.RequestHeader = RequestHeader.from_binary(data)
5379
        self.Parameters = AddReferencesParameters.from_binary(data)
5380
5381 1
    def __str__(self):
5382
        return 'AddReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5383
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5384
               'Parameters:' + str(self.Parameters) + ')'
5385
5386 1
    __repr__ = __str__
5387
5388
5389 1 View Code Duplication
class AddReferencesResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5390
    '''
5391
    Adds one or more references to the server address space.
5392
5393
    :ivar TypeId:
5394
    :vartype TypeId: NodeId
5395
    :ivar ResponseHeader:
5396
    :vartype ResponseHeader: ResponseHeader
5397
    :ivar Results:
5398
    :vartype Results: StatusCode
5399
    :ivar DiagnosticInfos:
5400
    :vartype DiagnosticInfos: DiagnosticInfo
5401
    '''
5402
5403 1
    ua_types = {
5404
        'TypeId': 'NodeId',
5405
        'ResponseHeader': 'ResponseHeader',
5406
        'Results': 'StatusCode',
5407
        'DiagnosticInfos': 'DiagnosticInfo',
5408
               }
5409
5410 1
    def __init__(self, binary=None):
5411
        if binary is not None:
5412
            self._binary_init(binary)
5413
            self._freeze = True
5414
            return
5415
        self.TypeId = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary)
5416
        self.ResponseHeader = ResponseHeader()
5417
        self.Results = []
5418
        self.DiagnosticInfos = []
5419
        self._freeze = True
5420
5421 1
    def to_binary(self):
5422
        packet = []
5423
        packet.append(self.TypeId.to_binary())
5424
        packet.append(self.ResponseHeader.to_binary())
5425
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5426
        for fieldname in self.Results:
5427
            packet.append(fieldname.to_binary())
5428
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5429
        for fieldname in self.DiagnosticInfos:
5430
            packet.append(fieldname.to_binary())
5431
        return b''.join(packet)
5432
5433 1
    @staticmethod
5434
    def from_binary(data):
5435
        return AddReferencesResponse(data)
5436
5437 1
    def _binary_init(self, data):
5438
        self.TypeId = NodeId.from_binary(data)
5439
        self.ResponseHeader = ResponseHeader.from_binary(data)
5440
        length = uabin.Primitives.Int32.unpack(data)
5441
        array = []
5442
        if length != -1:
5443
            for _ in range(0, length):
5444
                array.append(StatusCode.from_binary(data))
5445
        self.Results = array
5446
        length = uabin.Primitives.Int32.unpack(data)
5447
        array = []
5448
        if length != -1:
5449
            for _ in range(0, length):
5450
                array.append(DiagnosticInfo.from_binary(data))
5451
        self.DiagnosticInfos = array
5452
5453 1
    def __str__(self):
5454
        return 'AddReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5455
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5456
               'Results:' + str(self.Results) + ', ' + \
5457
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5458
5459 1
    __repr__ = __str__
5460
5461
5462 1 View Code Duplication
class DeleteNodesItem(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5463
    '''
5464
    A request to delete a node to the server address space.
5465
5466
    :ivar NodeId:
5467
    :vartype NodeId: NodeId
5468
    :ivar DeleteTargetReferences:
5469
    :vartype DeleteTargetReferences: Boolean
5470
    '''
5471
5472 1
    ua_types = {
5473
        'NodeId': 'NodeId',
5474
        'DeleteTargetReferences': 'Boolean',
5475
               }
5476
5477 1
    def __init__(self, binary=None):
5478
        if binary is not None:
5479
            self._binary_init(binary)
5480
            self._freeze = True
5481
            return
5482
        self.NodeId = NodeId()
5483
        self.DeleteTargetReferences = True
5484
        self._freeze = True
5485
5486 1
    def to_binary(self):
5487
        packet = []
5488
        packet.append(self.NodeId.to_binary())
5489
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteTargetReferences))
5490
        return b''.join(packet)
5491
5492 1
    @staticmethod
5493
    def from_binary(data):
5494
        return DeleteNodesItem(data)
5495
5496 1
    def _binary_init(self, data):
5497
        self.NodeId = NodeId.from_binary(data)
5498
        self.DeleteTargetReferences = uabin.Primitives.Boolean.unpack(data)
5499
5500 1
    def __str__(self):
5501
        return 'DeleteNodesItem(' + 'NodeId:' + str(self.NodeId) + ', ' + \
5502
               'DeleteTargetReferences:' + str(self.DeleteTargetReferences) + ')'
5503
5504 1
    __repr__ = __str__
5505
5506
5507 1 View Code Duplication
class DeleteNodesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5508
    '''
5509
    :ivar NodesToDelete:
5510
    :vartype NodesToDelete: DeleteNodesItem
5511
    '''
5512
5513 1
    ua_types = {
5514
        'NodesToDelete': 'DeleteNodesItem',
5515
               }
5516
5517 1
    def __init__(self, binary=None):
5518
        if binary is not None:
5519
            self._binary_init(binary)
5520
            self._freeze = True
5521
            return
5522
        self.NodesToDelete = []
5523
        self._freeze = True
5524
5525 1
    def to_binary(self):
5526
        packet = []
5527
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToDelete)))
5528
        for fieldname in self.NodesToDelete:
5529
            packet.append(fieldname.to_binary())
5530
        return b''.join(packet)
5531
5532 1
    @staticmethod
5533
    def from_binary(data):
5534
        return DeleteNodesParameters(data)
5535
5536 1
    def _binary_init(self, data):
5537
        length = uabin.Primitives.Int32.unpack(data)
5538
        array = []
5539
        if length != -1:
5540
            for _ in range(0, length):
5541
                array.append(DeleteNodesItem.from_binary(data))
5542
        self.NodesToDelete = array
5543
5544 1
    def __str__(self):
5545
        return 'DeleteNodesParameters(' + 'NodesToDelete:' + str(self.NodesToDelete) + ')'
5546
5547 1
    __repr__ = __str__
5548
5549
5550 1
class DeleteNodesRequest(FrozenClass):
5551
    '''
5552
    Delete one or more nodes from the server address space.
5553
5554
    :ivar TypeId:
5555
    :vartype TypeId: NodeId
5556
    :ivar RequestHeader:
5557
    :vartype RequestHeader: RequestHeader
5558
    :ivar Parameters:
5559
    :vartype Parameters: DeleteNodesParameters
5560
    '''
5561
5562 1
    ua_types = {
5563
        'TypeId': 'NodeId',
5564
        'RequestHeader': 'RequestHeader',
5565
        'Parameters': 'DeleteNodesParameters',
5566
               }
5567
5568 1
    def __init__(self, binary=None):
5569
        if binary is not None:
5570
            self._binary_init(binary)
5571
            self._freeze = True
5572
            return
5573
        self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary)
5574
        self.RequestHeader = RequestHeader()
5575
        self.Parameters = DeleteNodesParameters()
5576
        self._freeze = True
5577
5578 1
    def to_binary(self):
5579
        packet = []
5580
        packet.append(self.TypeId.to_binary())
5581
        packet.append(self.RequestHeader.to_binary())
5582
        packet.append(self.Parameters.to_binary())
5583
        return b''.join(packet)
5584
5585 1
    @staticmethod
5586
    def from_binary(data):
5587
        return DeleteNodesRequest(data)
5588
5589 1
    def _binary_init(self, data):
5590
        self.TypeId = NodeId.from_binary(data)
5591
        self.RequestHeader = RequestHeader.from_binary(data)
5592
        self.Parameters = DeleteNodesParameters.from_binary(data)
5593
5594 1
    def __str__(self):
5595
        return 'DeleteNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5596
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5597
               'Parameters:' + str(self.Parameters) + ')'
5598
5599 1
    __repr__ = __str__
5600
5601
5602 1 View Code Duplication
class DeleteNodesResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5603
    '''
5604
    Delete one or more nodes from the server address space.
5605
5606
    :ivar TypeId:
5607
    :vartype TypeId: NodeId
5608
    :ivar ResponseHeader:
5609
    :vartype ResponseHeader: ResponseHeader
5610
    :ivar Results:
5611
    :vartype Results: StatusCode
5612
    :ivar DiagnosticInfos:
5613
    :vartype DiagnosticInfos: DiagnosticInfo
5614
    '''
5615
5616 1
    ua_types = {
5617
        'TypeId': 'NodeId',
5618
        'ResponseHeader': 'ResponseHeader',
5619
        'Results': 'StatusCode',
5620
        'DiagnosticInfos': 'DiagnosticInfo',
5621
               }
5622
5623 1
    def __init__(self, binary=None):
5624
        if binary is not None:
5625
            self._binary_init(binary)
5626
            self._freeze = True
5627
            return
5628
        self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary)
5629
        self.ResponseHeader = ResponseHeader()
5630
        self.Results = []
5631
        self.DiagnosticInfos = []
5632
        self._freeze = True
5633
5634 1
    def to_binary(self):
5635
        packet = []
5636
        packet.append(self.TypeId.to_binary())
5637
        packet.append(self.ResponseHeader.to_binary())
5638
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5639
        for fieldname in self.Results:
5640
            packet.append(fieldname.to_binary())
5641
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5642
        for fieldname in self.DiagnosticInfos:
5643
            packet.append(fieldname.to_binary())
5644
        return b''.join(packet)
5645
5646 1
    @staticmethod
5647
    def from_binary(data):
5648
        return DeleteNodesResponse(data)
5649
5650 1
    def _binary_init(self, data):
5651
        self.TypeId = NodeId.from_binary(data)
5652
        self.ResponseHeader = ResponseHeader.from_binary(data)
5653
        length = uabin.Primitives.Int32.unpack(data)
5654
        array = []
5655
        if length != -1:
5656
            for _ in range(0, length):
5657
                array.append(StatusCode.from_binary(data))
5658
        self.Results = array
5659
        length = uabin.Primitives.Int32.unpack(data)
5660
        array = []
5661
        if length != -1:
5662
            for _ in range(0, length):
5663
                array.append(DiagnosticInfo.from_binary(data))
5664
        self.DiagnosticInfos = array
5665
5666 1
    def __str__(self):
5667
        return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5668
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5669
               'Results:' + str(self.Results) + ', ' + \
5670
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5671
5672 1
    __repr__ = __str__
5673
5674
5675 1
class DeleteReferencesItem(FrozenClass):
5676
    '''
5677
    A request to delete a node from the server address space.
5678
5679
    :ivar SourceNodeId:
5680
    :vartype SourceNodeId: NodeId
5681
    :ivar ReferenceTypeId:
5682
    :vartype ReferenceTypeId: NodeId
5683
    :ivar IsForward:
5684
    :vartype IsForward: Boolean
5685
    :ivar TargetNodeId:
5686
    :vartype TargetNodeId: ExpandedNodeId
5687
    :ivar DeleteBidirectional:
5688
    :vartype DeleteBidirectional: Boolean
5689
    '''
5690
5691 1
    ua_types = {
5692
        'SourceNodeId': 'NodeId',
5693
        'ReferenceTypeId': 'NodeId',
5694
        'IsForward': 'Boolean',
5695
        'TargetNodeId': 'ExpandedNodeId',
5696
        'DeleteBidirectional': 'Boolean',
5697
               }
5698
5699 1
    def __init__(self, binary=None):
5700
        if binary is not None:
5701
            self._binary_init(binary)
5702
            self._freeze = True
5703
            return
5704
        self.SourceNodeId = NodeId()
5705
        self.ReferenceTypeId = NodeId()
5706
        self.IsForward = True
5707
        self.TargetNodeId = ExpandedNodeId()
5708
        self.DeleteBidirectional = True
5709
        self._freeze = True
5710
5711 1
    def to_binary(self):
5712
        packet = []
5713
        packet.append(self.SourceNodeId.to_binary())
5714
        packet.append(self.ReferenceTypeId.to_binary())
5715
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
5716
        packet.append(self.TargetNodeId.to_binary())
5717
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteBidirectional))
5718
        return b''.join(packet)
5719
5720 1
    @staticmethod
5721
    def from_binary(data):
5722
        return DeleteReferencesItem(data)
5723
5724 1
    def _binary_init(self, data):
5725
        self.SourceNodeId = NodeId.from_binary(data)
5726
        self.ReferenceTypeId = NodeId.from_binary(data)
5727
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
5728
        self.TargetNodeId = ExpandedNodeId.from_binary(data)
5729
        self.DeleteBidirectional = uabin.Primitives.Boolean.unpack(data)
5730
5731 1
    def __str__(self):
5732
        return 'DeleteReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \
5733
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
5734
               'IsForward:' + str(self.IsForward) + ', ' + \
5735
               'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \
5736
               'DeleteBidirectional:' + str(self.DeleteBidirectional) + ')'
5737
5738 1
    __repr__ = __str__
5739
5740
5741 1 View Code Duplication
class DeleteReferencesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5742
    '''
5743
    :ivar ReferencesToDelete:
5744
    :vartype ReferencesToDelete: DeleteReferencesItem
5745
    '''
5746
5747 1
    ua_types = {
5748
        'ReferencesToDelete': 'DeleteReferencesItem',
5749
               }
5750
5751 1
    def __init__(self, binary=None):
5752
        if binary is not None:
5753
            self._binary_init(binary)
5754
            self._freeze = True
5755
            return
5756
        self.ReferencesToDelete = []
5757
        self._freeze = True
5758
5759 1
    def to_binary(self):
5760
        packet = []
5761
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToDelete)))
5762
        for fieldname in self.ReferencesToDelete:
5763
            packet.append(fieldname.to_binary())
5764
        return b''.join(packet)
5765
5766 1
    @staticmethod
5767
    def from_binary(data):
5768
        return DeleteReferencesParameters(data)
5769
5770 1
    def _binary_init(self, data):
5771
        length = uabin.Primitives.Int32.unpack(data)
5772
        array = []
5773
        if length != -1:
5774
            for _ in range(0, length):
5775
                array.append(DeleteReferencesItem.from_binary(data))
5776
        self.ReferencesToDelete = array
5777
5778 1
    def __str__(self):
5779
        return 'DeleteReferencesParameters(' + 'ReferencesToDelete:' + str(self.ReferencesToDelete) + ')'
5780
5781 1
    __repr__ = __str__
5782
5783
5784 1
class DeleteReferencesRequest(FrozenClass):
5785
    '''
5786
    Delete one or more references from the server address space.
5787
5788
    :ivar TypeId:
5789
    :vartype TypeId: NodeId
5790
    :ivar RequestHeader:
5791
    :vartype RequestHeader: RequestHeader
5792
    :ivar Parameters:
5793
    :vartype Parameters: DeleteReferencesParameters
5794
    '''
5795
5796 1
    ua_types = {
5797
        'TypeId': 'NodeId',
5798
        'RequestHeader': 'RequestHeader',
5799
        'Parameters': 'DeleteReferencesParameters',
5800
               }
5801
5802 1
    def __init__(self, binary=None):
5803
        if binary is not None:
5804
            self._binary_init(binary)
5805
            self._freeze = True
5806
            return
5807
        self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary)
5808
        self.RequestHeader = RequestHeader()
5809
        self.Parameters = DeleteReferencesParameters()
5810
        self._freeze = True
5811
5812 1
    def to_binary(self):
5813
        packet = []
5814
        packet.append(self.TypeId.to_binary())
5815
        packet.append(self.RequestHeader.to_binary())
5816
        packet.append(self.Parameters.to_binary())
5817
        return b''.join(packet)
5818
5819 1
    @staticmethod
5820
    def from_binary(data):
5821
        return DeleteReferencesRequest(data)
5822
5823 1
    def _binary_init(self, data):
5824
        self.TypeId = NodeId.from_binary(data)
5825
        self.RequestHeader = RequestHeader.from_binary(data)
5826
        self.Parameters = DeleteReferencesParameters.from_binary(data)
5827
5828 1
    def __str__(self):
5829
        return 'DeleteReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5830
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5831
               'Parameters:' + str(self.Parameters) + ')'
5832
5833 1
    __repr__ = __str__
5834
5835
5836 1 View Code Duplication
class DeleteReferencesResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5837
    '''
5838
    :ivar Results:
5839
    :vartype Results: StatusCode
5840
    :ivar DiagnosticInfos:
5841
    :vartype DiagnosticInfos: DiagnosticInfo
5842
    '''
5843
5844 1
    ua_types = {
5845
        'Results': 'StatusCode',
5846
        'DiagnosticInfos': 'DiagnosticInfo',
5847
               }
5848
5849 1
    def __init__(self, binary=None):
5850
        if binary is not None:
5851
            self._binary_init(binary)
5852
            self._freeze = True
5853
            return
5854
        self.Results = []
5855
        self.DiagnosticInfos = []
5856
        self._freeze = True
5857
5858 1
    def to_binary(self):
5859
        packet = []
5860
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5861
        for fieldname in self.Results:
5862
            packet.append(fieldname.to_binary())
5863
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5864
        for fieldname in self.DiagnosticInfos:
5865
            packet.append(fieldname.to_binary())
5866
        return b''.join(packet)
5867
5868 1
    @staticmethod
5869
    def from_binary(data):
5870
        return DeleteReferencesResult(data)
5871
5872 1
    def _binary_init(self, data):
5873
        length = uabin.Primitives.Int32.unpack(data)
5874
        array = []
5875
        if length != -1:
5876
            for _ in range(0, length):
5877
                array.append(StatusCode.from_binary(data))
5878
        self.Results = array
5879
        length = uabin.Primitives.Int32.unpack(data)
5880
        array = []
5881
        if length != -1:
5882
            for _ in range(0, length):
5883
                array.append(DiagnosticInfo.from_binary(data))
5884
        self.DiagnosticInfos = array
5885
5886 1
    def __str__(self):
5887
        return 'DeleteReferencesResult(' + 'Results:' + str(self.Results) + ', ' + \
5888
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5889
5890 1
    __repr__ = __str__
5891
5892
5893 1
class DeleteReferencesResponse(FrozenClass):
5894
    '''
5895
    Delete one or more references from the server address space.
5896
5897
    :ivar TypeId:
5898
    :vartype TypeId: NodeId
5899
    :ivar ResponseHeader:
5900
    :vartype ResponseHeader: ResponseHeader
5901
    :ivar Parameters:
5902
    :vartype Parameters: DeleteReferencesResult
5903
    '''
5904
5905 1
    ua_types = {
5906
        'TypeId': 'NodeId',
5907
        'ResponseHeader': 'ResponseHeader',
5908
        'Parameters': 'DeleteReferencesResult',
5909
               }
5910
5911 1
    def __init__(self, binary=None):
5912
        if binary is not None:
5913
            self._binary_init(binary)
5914
            self._freeze = True
5915
            return
5916
        self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary)
5917
        self.ResponseHeader = ResponseHeader()
5918
        self.Parameters = DeleteReferencesResult()
5919
        self._freeze = True
5920
5921 1
    def to_binary(self):
5922
        packet = []
5923
        packet.append(self.TypeId.to_binary())
5924
        packet.append(self.ResponseHeader.to_binary())
5925
        packet.append(self.Parameters.to_binary())
5926
        return b''.join(packet)
5927
5928 1
    @staticmethod
5929
    def from_binary(data):
5930
        return DeleteReferencesResponse(data)
5931
5932 1
    def _binary_init(self, data):
5933
        self.TypeId = NodeId.from_binary(data)
5934
        self.ResponseHeader = ResponseHeader.from_binary(data)
5935
        self.Parameters = DeleteReferencesResult.from_binary(data)
5936
5937 1
    def __str__(self):
5938
        return 'DeleteReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5939
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5940
               'Parameters:' + str(self.Parameters) + ')'
5941
5942 1
    __repr__ = __str__
5943
5944
5945 1
class ViewDescription(FrozenClass):
5946
    '''
5947
    The view to browse.
5948
5949
    :ivar ViewId:
5950
    :vartype ViewId: NodeId
5951
    :ivar Timestamp:
5952
    :vartype Timestamp: DateTime
5953
    :ivar ViewVersion:
5954
    :vartype ViewVersion: UInt32
5955
    '''
5956
5957 1
    ua_types = {
5958
        'ViewId': 'NodeId',
5959
        'Timestamp': 'DateTime',
5960
        'ViewVersion': 'UInt32',
5961
               }
5962
5963 1
    def __init__(self, binary=None):
5964
        if binary is not None:
5965
            self._binary_init(binary)
5966
            self._freeze = True
5967
            return
5968
        self.ViewId = NodeId()
5969
        self.Timestamp = datetime.utcnow()
5970
        self.ViewVersion = 0
5971
        self._freeze = True
5972
5973 1
    def to_binary(self):
5974
        packet = []
5975
        packet.append(self.ViewId.to_binary())
5976
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
5977
        packet.append(uabin.Primitives.UInt32.pack(self.ViewVersion))
5978
        return b''.join(packet)
5979
5980 1
    @staticmethod
5981
    def from_binary(data):
5982
        return ViewDescription(data)
5983
5984 1
    def _binary_init(self, data):
5985
        self.ViewId = NodeId.from_binary(data)
5986
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
5987
        self.ViewVersion = uabin.Primitives.UInt32.unpack(data)
5988
5989 1
    def __str__(self):
5990
        return 'ViewDescription(' + 'ViewId:' + str(self.ViewId) + ', ' + \
5991
               'Timestamp:' + str(self.Timestamp) + ', ' + \
5992
               'ViewVersion:' + str(self.ViewVersion) + ')'
5993
5994 1
    __repr__ = __str__
5995
5996
5997 1 View Code Duplication
class BrowseDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5998
    '''
5999
    A request to browse the the references from a node.
6000
6001
    :ivar NodeId:
6002
    :vartype NodeId: NodeId
6003
    :ivar BrowseDirection:
6004
    :vartype BrowseDirection: BrowseDirection
6005
    :ivar ReferenceTypeId:
6006
    :vartype ReferenceTypeId: NodeId
6007
    :ivar IncludeSubtypes:
6008
    :vartype IncludeSubtypes: Boolean
6009
    :ivar NodeClassMask:
6010
    :vartype NodeClassMask: UInt32
6011
    :ivar ResultMask:
6012
    :vartype ResultMask: UInt32
6013
    '''
6014
6015 1
    ua_types = {
6016
        'NodeId': 'NodeId',
6017
        'BrowseDirection': 'BrowseDirection',
6018
        'ReferenceTypeId': 'NodeId',
6019
        'IncludeSubtypes': 'Boolean',
6020
        'NodeClassMask': 'UInt32',
6021
        'ResultMask': 'UInt32',
6022
               }
6023
6024 1
    def __init__(self, binary=None):
6025
        if binary is not None:
6026
            self._binary_init(binary)
6027
            self._freeze = True
6028
            return
6029
        self.NodeId = NodeId()
6030
        self.BrowseDirection = BrowseDirection(0)
6031
        self.ReferenceTypeId = NodeId()
6032
        self.IncludeSubtypes = True
6033
        self.NodeClassMask = 0
6034
        self.ResultMask = 0
6035
        self._freeze = True
6036
6037 1
    def to_binary(self):
6038
        packet = []
6039
        packet.append(self.NodeId.to_binary())
6040
        packet.append(uabin.Primitives.UInt32.pack(self.BrowseDirection.value))
6041
        packet.append(self.ReferenceTypeId.to_binary())
6042
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes))
6043
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClassMask))
6044
        packet.append(uabin.Primitives.UInt32.pack(self.ResultMask))
6045
        return b''.join(packet)
6046
6047 1
    @staticmethod
6048
    def from_binary(data):
6049
        return BrowseDescription(data)
6050
6051 1
    def _binary_init(self, data):
6052
        self.NodeId = NodeId.from_binary(data)
6053
        self.BrowseDirection = BrowseDirection(uabin.Primitives.UInt32.unpack(data))
6054
        self.ReferenceTypeId = NodeId.from_binary(data)
6055
        self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data)
6056
        self.NodeClassMask = uabin.Primitives.UInt32.unpack(data)
6057
        self.ResultMask = uabin.Primitives.UInt32.unpack(data)
6058
6059 1
    def __str__(self):
6060
        return 'BrowseDescription(' + 'NodeId:' + str(self.NodeId) + ', ' + \
6061
               'BrowseDirection:' + str(self.BrowseDirection) + ', ' + \
6062
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6063
               'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \
6064
               'NodeClassMask:' + str(self.NodeClassMask) + ', ' + \
6065
               'ResultMask:' + str(self.ResultMask) + ')'
6066
6067 1
    __repr__ = __str__
6068
6069
6070 1 View Code Duplication
class ReferenceDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6071
    '''
6072
    The description of a reference.
6073
6074
    :ivar ReferenceTypeId:
6075
    :vartype ReferenceTypeId: NodeId
6076
    :ivar IsForward:
6077
    :vartype IsForward: Boolean
6078
    :ivar NodeId:
6079
    :vartype NodeId: ExpandedNodeId
6080
    :ivar BrowseName:
6081
    :vartype BrowseName: QualifiedName
6082
    :ivar DisplayName:
6083
    :vartype DisplayName: LocalizedText
6084
    :ivar NodeClass:
6085
    :vartype NodeClass: NodeClass
6086
    :ivar TypeDefinition:
6087
    :vartype TypeDefinition: ExpandedNodeId
6088
    '''
6089
6090 1
    ua_types = {
6091
        'ReferenceTypeId': 'NodeId',
6092
        'IsForward': 'Boolean',
6093
        'NodeId': 'ExpandedNodeId',
6094
        'BrowseName': 'QualifiedName',
6095
        'DisplayName': 'LocalizedText',
6096
        'NodeClass': 'NodeClass',
6097
        'TypeDefinition': 'ExpandedNodeId',
6098
               }
6099
6100 1
    def __init__(self, binary=None):
6101
        if binary is not None:
6102
            self._binary_init(binary)
6103
            self._freeze = True
6104
            return
6105
        self.ReferenceTypeId = NodeId()
6106
        self.IsForward = True
6107
        self.NodeId = ExpandedNodeId()
6108
        self.BrowseName = QualifiedName()
6109
        self.DisplayName = LocalizedText()
6110
        self.NodeClass = NodeClass(0)
6111
        self.TypeDefinition = ExpandedNodeId()
6112
        self._freeze = True
6113
6114 1
    def to_binary(self):
6115
        packet = []
6116
        packet.append(self.ReferenceTypeId.to_binary())
6117
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
6118
        packet.append(self.NodeId.to_binary())
6119
        packet.append(self.BrowseName.to_binary())
6120
        packet.append(self.DisplayName.to_binary())
6121
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value))
6122
        packet.append(self.TypeDefinition.to_binary())
6123
        return b''.join(packet)
6124
6125 1
    @staticmethod
6126
    def from_binary(data):
6127
        return ReferenceDescription(data)
6128
6129 1
    def _binary_init(self, data):
6130
        self.ReferenceTypeId = NodeId.from_binary(data)
6131
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
6132
        self.NodeId = ExpandedNodeId.from_binary(data)
6133
        self.BrowseName = QualifiedName.from_binary(data)
6134
        self.DisplayName = LocalizedText.from_binary(data)
6135
        self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
6136
        self.TypeDefinition = ExpandedNodeId.from_binary(data)
6137
6138 1
    def __str__(self):
6139
        return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6140
               'IsForward:' + str(self.IsForward) + ', ' + \
6141
               'NodeId:' + str(self.NodeId) + ', ' + \
6142
               'BrowseName:' + str(self.BrowseName) + ', ' + \
6143
               'DisplayName:' + str(self.DisplayName) + ', ' + \
6144
               'NodeClass:' + str(self.NodeClass) + ', ' + \
6145
               'TypeDefinition:' + str(self.TypeDefinition) + ')'
6146
6147 1
    __repr__ = __str__
6148
6149
6150 1 View Code Duplication
class BrowseResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6151
    '''
6152
    The result of a browse operation.
6153
6154
    :ivar StatusCode:
6155
    :vartype StatusCode: StatusCode
6156
    :ivar ContinuationPoint:
6157
    :vartype ContinuationPoint: ByteString
6158
    :ivar References:
6159
    :vartype References: ReferenceDescription
6160
    '''
6161
6162 1
    ua_types = {
6163
        'StatusCode': 'StatusCode',
6164
        'ContinuationPoint': 'ByteString',
6165
        'References': 'ReferenceDescription',
6166
               }
6167
6168 1
    def __init__(self, binary=None):
6169
        if binary is not None:
6170
            self._binary_init(binary)
6171
            self._freeze = True
6172
            return
6173
        self.StatusCode = StatusCode()
6174
        self.ContinuationPoint = None
6175
        self.References = []
6176
        self._freeze = True
6177
6178 1
    def to_binary(self):
6179
        packet = []
6180
        packet.append(self.StatusCode.to_binary())
6181
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
6182
        packet.append(uabin.Primitives.Int32.pack(len(self.References)))
6183
        for fieldname in self.References:
6184
            packet.append(fieldname.to_binary())
6185
        return b''.join(packet)
6186
6187 1
    @staticmethod
6188
    def from_binary(data):
6189
        return BrowseResult(data)
6190
6191 1
    def _binary_init(self, data):
6192
        self.StatusCode = StatusCode.from_binary(data)
6193
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
6194
        length = uabin.Primitives.Int32.unpack(data)
6195
        array = []
6196
        if length != -1:
6197
            for _ in range(0, length):
6198
                array.append(ReferenceDescription.from_binary(data))
6199
        self.References = array
6200
6201 1
    def __str__(self):
6202
        return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
6203
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
6204
               'References:' + str(self.References) + ')'
6205
6206 1
    __repr__ = __str__
6207
6208
6209 1 View Code Duplication
class BrowseParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6210
    '''
6211
    :ivar View:
6212
    :vartype View: ViewDescription
6213
    :ivar RequestedMaxReferencesPerNode:
6214
    :vartype RequestedMaxReferencesPerNode: UInt32
6215
    :ivar NodesToBrowse:
6216
    :vartype NodesToBrowse: BrowseDescription
6217
    '''
6218
6219 1
    ua_types = {
6220
        'View': 'ViewDescription',
6221
        'RequestedMaxReferencesPerNode': 'UInt32',
6222
        'NodesToBrowse': 'BrowseDescription',
6223
               }
6224
6225 1
    def __init__(self, binary=None):
6226
        if binary is not None:
6227
            self._binary_init(binary)
6228
            self._freeze = True
6229
            return
6230
        self.View = ViewDescription()
6231
        self.RequestedMaxReferencesPerNode = 0
6232
        self.NodesToBrowse = []
6233
        self._freeze = True
6234
6235 1
    def to_binary(self):
6236
        packet = []
6237
        packet.append(self.View.to_binary())
6238
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxReferencesPerNode))
6239
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToBrowse)))
6240
        for fieldname in self.NodesToBrowse:
6241
            packet.append(fieldname.to_binary())
6242
        return b''.join(packet)
6243
6244 1
    @staticmethod
6245
    def from_binary(data):
6246
        return BrowseParameters(data)
6247
6248 1
    def _binary_init(self, data):
6249
        self.View = ViewDescription.from_binary(data)
6250
        self.RequestedMaxReferencesPerNode = uabin.Primitives.UInt32.unpack(data)
6251
        length = uabin.Primitives.Int32.unpack(data)
6252
        array = []
6253
        if length != -1:
6254
            for _ in range(0, length):
6255
                array.append(BrowseDescription.from_binary(data))
6256
        self.NodesToBrowse = array
6257
6258 1
    def __str__(self):
6259
        return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \
6260
               'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \
6261
               'NodesToBrowse:' + str(self.NodesToBrowse) + ')'
6262
6263 1
    __repr__ = __str__
6264
6265
6266 1
class BrowseRequest(FrozenClass):
6267
    '''
6268
    Browse the references for one or more nodes from the server address space.
6269
6270
    :ivar TypeId:
6271
    :vartype TypeId: NodeId
6272
    :ivar RequestHeader:
6273
    :vartype RequestHeader: RequestHeader
6274
    :ivar Parameters:
6275
    :vartype Parameters: BrowseParameters
6276
    '''
6277
6278 1
    ua_types = {
6279
        'TypeId': 'NodeId',
6280
        'RequestHeader': 'RequestHeader',
6281
        'Parameters': 'BrowseParameters',
6282
               }
6283
6284 1
    def __init__(self, binary=None):
6285
        if binary is not None:
6286
            self._binary_init(binary)
6287
            self._freeze = True
6288
            return
6289
        self.TypeId = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary)
6290
        self.RequestHeader = RequestHeader()
6291
        self.Parameters = BrowseParameters()
6292
        self._freeze = True
6293
6294 1
    def to_binary(self):
6295
        packet = []
6296
        packet.append(self.TypeId.to_binary())
6297
        packet.append(self.RequestHeader.to_binary())
6298
        packet.append(self.Parameters.to_binary())
6299
        return b''.join(packet)
6300
6301 1
    @staticmethod
6302
    def from_binary(data):
6303
        return BrowseRequest(data)
6304
6305 1
    def _binary_init(self, data):
6306
        self.TypeId = NodeId.from_binary(data)
6307
        self.RequestHeader = RequestHeader.from_binary(data)
6308
        self.Parameters = BrowseParameters.from_binary(data)
6309
6310 1
    def __str__(self):
6311
        return 'BrowseRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6312
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6313
               'Parameters:' + str(self.Parameters) + ')'
6314
6315 1
    __repr__ = __str__
6316
6317
6318 1 View Code Duplication
class BrowseResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6319
    '''
6320
    Browse the references for one or more nodes from the server address space.
6321
6322
    :ivar TypeId:
6323
    :vartype TypeId: NodeId
6324
    :ivar ResponseHeader:
6325
    :vartype ResponseHeader: ResponseHeader
6326
    :ivar Results:
6327
    :vartype Results: BrowseResult
6328
    :ivar DiagnosticInfos:
6329
    :vartype DiagnosticInfos: DiagnosticInfo
6330
    '''
6331
6332 1
    ua_types = {
6333
        'TypeId': 'NodeId',
6334
        'ResponseHeader': 'ResponseHeader',
6335
        'Results': 'BrowseResult',
6336
        'DiagnosticInfos': 'DiagnosticInfo',
6337
               }
6338
6339 1
    def __init__(self, binary=None):
6340
        if binary is not None:
6341
            self._binary_init(binary)
6342
            self._freeze = True
6343
            return
6344
        self.TypeId = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary)
6345
        self.ResponseHeader = ResponseHeader()
6346
        self.Results = []
6347
        self.DiagnosticInfos = []
6348
        self._freeze = True
6349
6350 1
    def to_binary(self):
6351
        packet = []
6352
        packet.append(self.TypeId.to_binary())
6353
        packet.append(self.ResponseHeader.to_binary())
6354
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6355
        for fieldname in self.Results:
6356
            packet.append(fieldname.to_binary())
6357
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6358
        for fieldname in self.DiagnosticInfos:
6359
            packet.append(fieldname.to_binary())
6360
        return b''.join(packet)
6361
6362 1
    @staticmethod
6363
    def from_binary(data):
6364
        return BrowseResponse(data)
6365
6366 1
    def _binary_init(self, data):
6367
        self.TypeId = NodeId.from_binary(data)
6368
        self.ResponseHeader = ResponseHeader.from_binary(data)
6369
        length = uabin.Primitives.Int32.unpack(data)
6370
        array = []
6371
        if length != -1:
6372
            for _ in range(0, length):
6373
                array.append(BrowseResult.from_binary(data))
6374
        self.Results = array
6375
        length = uabin.Primitives.Int32.unpack(data)
6376
        array = []
6377
        if length != -1:
6378
            for _ in range(0, length):
6379
                array.append(DiagnosticInfo.from_binary(data))
6380
        self.DiagnosticInfos = array
6381
6382 1
    def __str__(self):
6383
        return 'BrowseResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6384
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6385
               'Results:' + str(self.Results) + ', ' + \
6386
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6387
6388 1
    __repr__ = __str__
6389
6390
6391 1 View Code Duplication
class BrowseNextParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6392
    '''
6393
    :ivar ReleaseContinuationPoints:
6394
    :vartype ReleaseContinuationPoints: Boolean
6395
    :ivar ContinuationPoints:
6396
    :vartype ContinuationPoints: ByteString
6397
    '''
6398
6399 1
    ua_types = {
6400
        'ReleaseContinuationPoints': 'Boolean',
6401
        'ContinuationPoints': 'ByteString',
6402
               }
6403
6404 1
    def __init__(self, binary=None):
6405
        if binary is not None:
6406
            self._binary_init(binary)
6407
            self._freeze = True
6408
            return
6409
        self.ReleaseContinuationPoints = True
6410
        self.ContinuationPoints = []
6411
        self._freeze = True
6412
6413 1
    def to_binary(self):
6414
        packet = []
6415
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints))
6416
        packet.append(uabin.Primitives.Int32.pack(len(self.ContinuationPoints)))
6417
        for fieldname in self.ContinuationPoints:
6418
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
6419
        return b''.join(packet)
6420
6421 1
    @staticmethod
6422
    def from_binary(data):
6423
        return BrowseNextParameters(data)
6424
6425 1
    def _binary_init(self, data):
6426
        self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data)
6427
        self.ContinuationPoints = uabin.Primitives.ByteString.unpack_array(data)
6428
6429 1
    def __str__(self):
6430
        return 'BrowseNextParameters(' + 'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \
6431
               'ContinuationPoints:' + str(self.ContinuationPoints) + ')'
6432
6433 1
    __repr__ = __str__
6434
6435
6436 1
class BrowseNextRequest(FrozenClass):
6437
    '''
6438
    Continues one or more browse operations.
6439
6440
    :ivar TypeId:
6441
    :vartype TypeId: NodeId
6442
    :ivar RequestHeader:
6443
    :vartype RequestHeader: RequestHeader
6444
    :ivar Parameters:
6445
    :vartype Parameters: BrowseNextParameters
6446
    '''
6447
6448 1
    ua_types = {
6449
        'TypeId': 'NodeId',
6450
        'RequestHeader': 'RequestHeader',
6451
        'Parameters': 'BrowseNextParameters',
6452
               }
6453
6454 1
    def __init__(self, binary=None):
6455
        if binary is not None:
6456
            self._binary_init(binary)
6457
            self._freeze = True
6458
            return
6459
        self.TypeId = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary)
6460
        self.RequestHeader = RequestHeader()
6461
        self.Parameters = BrowseNextParameters()
6462
        self._freeze = True
6463
6464 1
    def to_binary(self):
6465
        packet = []
6466
        packet.append(self.TypeId.to_binary())
6467
        packet.append(self.RequestHeader.to_binary())
6468
        packet.append(self.Parameters.to_binary())
6469
        return b''.join(packet)
6470
6471 1
    @staticmethod
6472
    def from_binary(data):
6473
        return BrowseNextRequest(data)
6474
6475 1
    def _binary_init(self, data):
6476
        self.TypeId = NodeId.from_binary(data)
6477
        self.RequestHeader = RequestHeader.from_binary(data)
6478
        self.Parameters = BrowseNextParameters.from_binary(data)
6479
6480 1
    def __str__(self):
6481
        return 'BrowseNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6482
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6483
               'Parameters:' + str(self.Parameters) + ')'
6484
6485 1
    __repr__ = __str__
6486
6487
6488 1 View Code Duplication
class BrowseNextResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6489
    '''
6490
    :ivar Results:
6491
    :vartype Results: BrowseResult
6492
    :ivar DiagnosticInfos:
6493
    :vartype DiagnosticInfos: DiagnosticInfo
6494
    '''
6495
6496 1
    ua_types = {
6497
        'Results': 'BrowseResult',
6498
        'DiagnosticInfos': 'DiagnosticInfo',
6499
               }
6500
6501 1
    def __init__(self, binary=None):
6502
        if binary is not None:
6503
            self._binary_init(binary)
6504
            self._freeze = True
6505
            return
6506
        self.Results = []
6507
        self.DiagnosticInfos = []
6508
        self._freeze = True
6509
6510 1
    def to_binary(self):
6511
        packet = []
6512
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6513
        for fieldname in self.Results:
6514
            packet.append(fieldname.to_binary())
6515
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6516
        for fieldname in self.DiagnosticInfos:
6517
            packet.append(fieldname.to_binary())
6518
        return b''.join(packet)
6519
6520 1
    @staticmethod
6521
    def from_binary(data):
6522
        return BrowseNextResult(data)
6523
6524 1
    def _binary_init(self, data):
6525
        length = uabin.Primitives.Int32.unpack(data)
6526
        array = []
6527
        if length != -1:
6528
            for _ in range(0, length):
6529
                array.append(BrowseResult.from_binary(data))
6530
        self.Results = array
6531
        length = uabin.Primitives.Int32.unpack(data)
6532
        array = []
6533
        if length != -1:
6534
            for _ in range(0, length):
6535
                array.append(DiagnosticInfo.from_binary(data))
6536
        self.DiagnosticInfos = array
6537
6538 1
    def __str__(self):
6539
        return 'BrowseNextResult(' + 'Results:' + str(self.Results) + ', ' + \
6540
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6541
6542 1
    __repr__ = __str__
6543
6544
6545 1
class BrowseNextResponse(FrozenClass):
6546
    '''
6547
    Continues one or more browse operations.
6548
6549
    :ivar TypeId:
6550
    :vartype TypeId: NodeId
6551
    :ivar ResponseHeader:
6552
    :vartype ResponseHeader: ResponseHeader
6553
    :ivar Parameters:
6554
    :vartype Parameters: BrowseNextResult
6555
    '''
6556
6557 1
    ua_types = {
6558
        'TypeId': 'NodeId',
6559
        'ResponseHeader': 'ResponseHeader',
6560
        'Parameters': 'BrowseNextResult',
6561
               }
6562
6563 1
    def __init__(self, binary=None):
6564
        if binary is not None:
6565
            self._binary_init(binary)
6566
            self._freeze = True
6567
            return
6568
        self.TypeId = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary)
6569
        self.ResponseHeader = ResponseHeader()
6570
        self.Parameters = BrowseNextResult()
6571
        self._freeze = True
6572
6573 1
    def to_binary(self):
6574
        packet = []
6575
        packet.append(self.TypeId.to_binary())
6576
        packet.append(self.ResponseHeader.to_binary())
6577
        packet.append(self.Parameters.to_binary())
6578
        return b''.join(packet)
6579
6580 1
    @staticmethod
6581
    def from_binary(data):
6582
        return BrowseNextResponse(data)
6583
6584 1
    def _binary_init(self, data):
6585
        self.TypeId = NodeId.from_binary(data)
6586
        self.ResponseHeader = ResponseHeader.from_binary(data)
6587
        self.Parameters = BrowseNextResult.from_binary(data)
6588
6589 1
    def __str__(self):
6590
        return 'BrowseNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6591
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6592
               'Parameters:' + str(self.Parameters) + ')'
6593
6594 1
    __repr__ = __str__
6595
6596
6597 1
class RelativePathElement(FrozenClass):
6598
    '''
6599
    An element in a relative path.
6600
6601
    :ivar ReferenceTypeId:
6602
    :vartype ReferenceTypeId: NodeId
6603
    :ivar IsInverse:
6604
    :vartype IsInverse: Boolean
6605
    :ivar IncludeSubtypes:
6606
    :vartype IncludeSubtypes: Boolean
6607
    :ivar TargetName:
6608
    :vartype TargetName: QualifiedName
6609
    '''
6610
6611 1
    ua_types = {
6612
        'ReferenceTypeId': 'NodeId',
6613
        'IsInverse': 'Boolean',
6614
        'IncludeSubtypes': 'Boolean',
6615
        'TargetName': 'QualifiedName',
6616
               }
6617
6618 1
    def __init__(self, binary=None):
6619
        if binary is not None:
6620
            self._binary_init(binary)
6621
            self._freeze = True
6622
            return
6623
        self.ReferenceTypeId = NodeId()
6624
        self.IsInverse = True
6625
        self.IncludeSubtypes = True
6626
        self.TargetName = QualifiedName()
6627
        self._freeze = True
6628
6629 1
    def to_binary(self):
6630
        packet = []
6631
        packet.append(self.ReferenceTypeId.to_binary())
6632
        packet.append(uabin.Primitives.Boolean.pack(self.IsInverse))
6633
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes))
6634
        packet.append(self.TargetName.to_binary())
6635
        return b''.join(packet)
6636
6637 1
    @staticmethod
6638
    def from_binary(data):
6639
        return RelativePathElement(data)
6640
6641 1
    def _binary_init(self, data):
6642
        self.ReferenceTypeId = NodeId.from_binary(data)
6643
        self.IsInverse = uabin.Primitives.Boolean.unpack(data)
6644
        self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data)
6645
        self.TargetName = QualifiedName.from_binary(data)
6646
6647 1
    def __str__(self):
6648
        return 'RelativePathElement(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6649
               'IsInverse:' + str(self.IsInverse) + ', ' + \
6650
               'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \
6651
               'TargetName:' + str(self.TargetName) + ')'
6652
6653 1
    __repr__ = __str__
6654
6655
6656 1 View Code Duplication
class RelativePath(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6657
    '''
6658
    A relative path constructed from reference types and browse names.
6659
6660
    :ivar Elements:
6661
    :vartype Elements: RelativePathElement
6662
    '''
6663
6664 1
    ua_types = {
6665
        'Elements': 'RelativePathElement',
6666
               }
6667
6668 1
    def __init__(self, binary=None):
6669
        if binary is not None:
6670
            self._binary_init(binary)
6671
            self._freeze = True
6672
            return
6673
        self.Elements = []
6674
        self._freeze = True
6675
6676 1
    def to_binary(self):
6677
        packet = []
6678
        packet.append(uabin.Primitives.Int32.pack(len(self.Elements)))
6679
        for fieldname in self.Elements:
6680
            packet.append(fieldname.to_binary())
6681
        return b''.join(packet)
6682
6683 1
    @staticmethod
6684
    def from_binary(data):
6685
        return RelativePath(data)
6686
6687 1
    def _binary_init(self, data):
6688
        length = uabin.Primitives.Int32.unpack(data)
6689
        array = []
6690
        if length != -1:
6691
            for _ in range(0, length):
6692
                array.append(RelativePathElement.from_binary(data))
6693
        self.Elements = array
6694
6695 1
    def __str__(self):
6696
        return 'RelativePath(' + 'Elements:' + str(self.Elements) + ')'
6697
6698 1
    __repr__ = __str__
6699
6700
6701 1
class BrowsePath(FrozenClass):
6702
    '''
6703
    A request to translate a path into a node id.
6704
6705
    :ivar StartingNode:
6706
    :vartype StartingNode: NodeId
6707
    :ivar RelativePath:
6708
    :vartype RelativePath: RelativePath
6709
    '''
6710
6711 1
    ua_types = {
6712
        'StartingNode': 'NodeId',
6713
        'RelativePath': 'RelativePath',
6714
               }
6715
6716 1
    def __init__(self, binary=None):
6717
        if binary is not None:
6718
            self._binary_init(binary)
6719
            self._freeze = True
6720
            return
6721
        self.StartingNode = NodeId()
6722
        self.RelativePath = RelativePath()
6723
        self._freeze = True
6724
6725 1
    def to_binary(self):
6726
        packet = []
6727
        packet.append(self.StartingNode.to_binary())
6728
        packet.append(self.RelativePath.to_binary())
6729
        return b''.join(packet)
6730
6731 1
    @staticmethod
6732
    def from_binary(data):
6733
        return BrowsePath(data)
6734
6735 1
    def _binary_init(self, data):
6736
        self.StartingNode = NodeId.from_binary(data)
6737
        self.RelativePath = RelativePath.from_binary(data)
6738
6739 1
    def __str__(self):
6740
        return 'BrowsePath(' + 'StartingNode:' + str(self.StartingNode) + ', ' + \
6741
               'RelativePath:' + str(self.RelativePath) + ')'
6742
6743 1
    __repr__ = __str__
6744
6745
6746 1 View Code Duplication
class BrowsePathTarget(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6747
    '''
6748
    The target of the translated path.
6749
6750
    :ivar TargetId:
6751
    :vartype TargetId: ExpandedNodeId
6752
    :ivar RemainingPathIndex:
6753
    :vartype RemainingPathIndex: UInt32
6754
    '''
6755
6756 1
    ua_types = {
6757
        'TargetId': 'ExpandedNodeId',
6758
        'RemainingPathIndex': 'UInt32',
6759
               }
6760
6761 1
    def __init__(self, binary=None):
6762
        if binary is not None:
6763
            self._binary_init(binary)
6764
            self._freeze = True
6765
            return
6766
        self.TargetId = ExpandedNodeId()
6767
        self.RemainingPathIndex = 0
6768
        self._freeze = True
6769
6770 1
    def to_binary(self):
6771
        packet = []
6772
        packet.append(self.TargetId.to_binary())
6773
        packet.append(uabin.Primitives.UInt32.pack(self.RemainingPathIndex))
6774
        return b''.join(packet)
6775
6776 1
    @staticmethod
6777
    def from_binary(data):
6778
        return BrowsePathTarget(data)
6779
6780 1
    def _binary_init(self, data):
6781
        self.TargetId = ExpandedNodeId.from_binary(data)
6782
        self.RemainingPathIndex = uabin.Primitives.UInt32.unpack(data)
6783
6784 1
    def __str__(self):
6785
        return 'BrowsePathTarget(' + 'TargetId:' + str(self.TargetId) + ', ' + \
6786
               'RemainingPathIndex:' + str(self.RemainingPathIndex) + ')'
6787
6788 1
    __repr__ = __str__
6789
6790
6791 1 View Code Duplication
class BrowsePathResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6792
    '''
6793
    The result of a translate opearation.
6794
6795
    :ivar StatusCode:
6796
    :vartype StatusCode: StatusCode
6797
    :ivar Targets:
6798
    :vartype Targets: BrowsePathTarget
6799
    '''
6800
6801 1
    ua_types = {
6802
        'StatusCode': 'StatusCode',
6803
        'Targets': 'BrowsePathTarget',
6804
               }
6805
6806 1
    def __init__(self, binary=None):
6807
        if binary is not None:
6808
            self._binary_init(binary)
6809
            self._freeze = True
6810
            return
6811
        self.StatusCode = StatusCode()
6812
        self.Targets = []
6813
        self._freeze = True
6814
6815 1
    def to_binary(self):
6816
        packet = []
6817
        packet.append(self.StatusCode.to_binary())
6818
        packet.append(uabin.Primitives.Int32.pack(len(self.Targets)))
6819
        for fieldname in self.Targets:
6820
            packet.append(fieldname.to_binary())
6821
        return b''.join(packet)
6822
6823 1
    @staticmethod
6824
    def from_binary(data):
6825
        return BrowsePathResult(data)
6826
6827 1
    def _binary_init(self, data):
6828
        self.StatusCode = StatusCode.from_binary(data)
6829
        length = uabin.Primitives.Int32.unpack(data)
6830
        array = []
6831
        if length != -1:
6832
            for _ in range(0, length):
6833
                array.append(BrowsePathTarget.from_binary(data))
6834
        self.Targets = array
6835
6836 1
    def __str__(self):
6837
        return 'BrowsePathResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
6838
               'Targets:' + str(self.Targets) + ')'
6839
6840 1
    __repr__ = __str__
6841
6842
6843 1 View Code Duplication
class TranslateBrowsePathsToNodeIdsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6844
    '''
6845
    :ivar BrowsePaths:
6846
    :vartype BrowsePaths: BrowsePath
6847
    '''
6848
6849 1
    ua_types = {
6850
        'BrowsePaths': 'BrowsePath',
6851
               }
6852
6853 1
    def __init__(self, binary=None):
6854
        if binary is not None:
6855
            self._binary_init(binary)
6856
            self._freeze = True
6857
            return
6858
        self.BrowsePaths = []
6859
        self._freeze = True
6860
6861 1
    def to_binary(self):
6862
        packet = []
6863
        packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePaths)))
6864
        for fieldname in self.BrowsePaths:
6865
            packet.append(fieldname.to_binary())
6866
        return b''.join(packet)
6867
6868 1
    @staticmethod
6869
    def from_binary(data):
6870
        return TranslateBrowsePathsToNodeIdsParameters(data)
6871
6872 1
    def _binary_init(self, data):
6873
        length = uabin.Primitives.Int32.unpack(data)
6874
        array = []
6875
        if length != -1:
6876
            for _ in range(0, length):
6877
                array.append(BrowsePath.from_binary(data))
6878
        self.BrowsePaths = array
6879
6880 1
    def __str__(self):
6881
        return 'TranslateBrowsePathsToNodeIdsParameters(' + 'BrowsePaths:' + str(self.BrowsePaths) + ')'
6882
6883 1
    __repr__ = __str__
6884
6885
6886 1
class TranslateBrowsePathsToNodeIdsRequest(FrozenClass):
6887
    '''
6888
    Translates one or more paths in the server address space.
6889
6890
    :ivar TypeId:
6891
    :vartype TypeId: NodeId
6892
    :ivar RequestHeader:
6893
    :vartype RequestHeader: RequestHeader
6894
    :ivar Parameters:
6895
    :vartype Parameters: TranslateBrowsePathsToNodeIdsParameters
6896
    '''
6897
6898 1
    ua_types = {
6899
        'TypeId': 'NodeId',
6900
        'RequestHeader': 'RequestHeader',
6901
        'Parameters': 'TranslateBrowsePathsToNodeIdsParameters',
6902
               }
6903
6904 1
    def __init__(self, binary=None):
6905
        if binary is not None:
6906
            self._binary_init(binary)
6907
            self._freeze = True
6908
            return
6909
        self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary)
6910
        self.RequestHeader = RequestHeader()
6911
        self.Parameters = TranslateBrowsePathsToNodeIdsParameters()
6912
        self._freeze = True
6913
6914 1
    def to_binary(self):
6915
        packet = []
6916
        packet.append(self.TypeId.to_binary())
6917
        packet.append(self.RequestHeader.to_binary())
6918
        packet.append(self.Parameters.to_binary())
6919
        return b''.join(packet)
6920
6921 1
    @staticmethod
6922
    def from_binary(data):
6923
        return TranslateBrowsePathsToNodeIdsRequest(data)
6924
6925 1
    def _binary_init(self, data):
6926
        self.TypeId = NodeId.from_binary(data)
6927
        self.RequestHeader = RequestHeader.from_binary(data)
6928
        self.Parameters = TranslateBrowsePathsToNodeIdsParameters.from_binary(data)
6929
6930 1
    def __str__(self):
6931
        return 'TranslateBrowsePathsToNodeIdsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6932
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6933
               'Parameters:' + str(self.Parameters) + ')'
6934
6935 1
    __repr__ = __str__
6936
6937
6938 1 View Code Duplication
class TranslateBrowsePathsToNodeIdsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6939
    '''
6940
    Translates one or more paths in the server address space.
6941
6942
    :ivar TypeId:
6943
    :vartype TypeId: NodeId
6944
    :ivar ResponseHeader:
6945
    :vartype ResponseHeader: ResponseHeader
6946
    :ivar Results:
6947
    :vartype Results: BrowsePathResult
6948
    :ivar DiagnosticInfos:
6949
    :vartype DiagnosticInfos: DiagnosticInfo
6950
    '''
6951
6952 1
    ua_types = {
6953
        'TypeId': 'NodeId',
6954
        'ResponseHeader': 'ResponseHeader',
6955
        'Results': 'BrowsePathResult',
6956
        'DiagnosticInfos': 'DiagnosticInfo',
6957
               }
6958
6959 1
    def __init__(self, binary=None):
6960
        if binary is not None:
6961
            self._binary_init(binary)
6962
            self._freeze = True
6963
            return
6964
        self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary)
6965
        self.ResponseHeader = ResponseHeader()
6966
        self.Results = []
6967
        self.DiagnosticInfos = []
6968
        self._freeze = True
6969
6970 1
    def to_binary(self):
6971
        packet = []
6972
        packet.append(self.TypeId.to_binary())
6973
        packet.append(self.ResponseHeader.to_binary())
6974
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6975
        for fieldname in self.Results:
6976
            packet.append(fieldname.to_binary())
6977
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6978
        for fieldname in self.DiagnosticInfos:
6979
            packet.append(fieldname.to_binary())
6980
        return b''.join(packet)
6981
6982 1
    @staticmethod
6983
    def from_binary(data):
6984
        return TranslateBrowsePathsToNodeIdsResponse(data)
6985
6986 1
    def _binary_init(self, data):
6987
        self.TypeId = NodeId.from_binary(data)
6988
        self.ResponseHeader = ResponseHeader.from_binary(data)
6989
        length = uabin.Primitives.Int32.unpack(data)
6990
        array = []
6991
        if length != -1:
6992
            for _ in range(0, length):
6993
                array.append(BrowsePathResult.from_binary(data))
6994
        self.Results = array
6995
        length = uabin.Primitives.Int32.unpack(data)
6996
        array = []
6997
        if length != -1:
6998
            for _ in range(0, length):
6999
                array.append(DiagnosticInfo.from_binary(data))
7000
        self.DiagnosticInfos = array
7001
7002 1
    def __str__(self):
7003
        return 'TranslateBrowsePathsToNodeIdsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7004
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
7005
               'Results:' + str(self.Results) + ', ' + \
7006
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
7007
7008 1
    __repr__ = __str__
7009
7010
7011 1 View Code Duplication
class RegisterNodesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7012
    '''
7013
    :ivar NodesToRegister:
7014
    :vartype NodesToRegister: NodeId
7015
    '''
7016
7017 1
    ua_types = {
7018
        'NodesToRegister': 'NodeId',
7019
               }
7020
7021 1
    def __init__(self, binary=None):
7022
        if binary is not None:
7023
            self._binary_init(binary)
7024
            self._freeze = True
7025
            return
7026
        self.NodesToRegister = []
7027
        self._freeze = True
7028
7029 1
    def to_binary(self):
7030
        packet = []
7031
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRegister)))
7032
        for fieldname in self.NodesToRegister:
7033
            packet.append(fieldname.to_binary())
7034
        return b''.join(packet)
7035
7036 1
    @staticmethod
7037
    def from_binary(data):
7038
        return RegisterNodesParameters(data)
7039
7040 1
    def _binary_init(self, data):
7041
        length = uabin.Primitives.Int32.unpack(data)
7042
        array = []
7043
        if length != -1:
7044
            for _ in range(0, length):
7045
                array.append(NodeId.from_binary(data))
7046
        self.NodesToRegister = array
7047
7048 1
    def __str__(self):
7049
        return 'RegisterNodesParameters(' + 'NodesToRegister:' + str(self.NodesToRegister) + ')'
7050
7051 1
    __repr__ = __str__
7052
7053
7054 1
class RegisterNodesRequest(FrozenClass):
7055
    '''
7056
    Registers one or more nodes for repeated use within a session.
7057
7058
    :ivar TypeId:
7059
    :vartype TypeId: NodeId
7060
    :ivar RequestHeader:
7061
    :vartype RequestHeader: RequestHeader
7062
    :ivar Parameters:
7063
    :vartype Parameters: RegisterNodesParameters
7064
    '''
7065
7066 1
    ua_types = {
7067
        'TypeId': 'NodeId',
7068
        'RequestHeader': 'RequestHeader',
7069
        'Parameters': 'RegisterNodesParameters',
7070
               }
7071
7072 1
    def __init__(self, binary=None):
7073
        if binary is not None:
7074
            self._binary_init(binary)
7075
            self._freeze = True
7076
            return
7077
        self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary)
7078
        self.RequestHeader = RequestHeader()
7079
        self.Parameters = RegisterNodesParameters()
7080
        self._freeze = True
7081
7082 1
    def to_binary(self):
7083
        packet = []
7084
        packet.append(self.TypeId.to_binary())
7085
        packet.append(self.RequestHeader.to_binary())
7086
        packet.append(self.Parameters.to_binary())
7087
        return b''.join(packet)
7088
7089 1
    @staticmethod
7090
    def from_binary(data):
7091
        return RegisterNodesRequest(data)
7092
7093 1
    def _binary_init(self, data):
7094
        self.TypeId = NodeId.from_binary(data)
7095
        self.RequestHeader = RequestHeader.from_binary(data)
7096
        self.Parameters = RegisterNodesParameters.from_binary(data)
7097
7098 1
    def __str__(self):
7099
        return 'RegisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7100
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
7101
               'Parameters:' + str(self.Parameters) + ')'
7102
7103 1
    __repr__ = __str__
7104
7105
7106 1 View Code Duplication
class RegisterNodesResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7107
    '''
7108
    :ivar RegisteredNodeIds:
7109
    :vartype RegisteredNodeIds: NodeId
7110
    '''
7111
7112 1
    ua_types = {
7113
        'RegisteredNodeIds': 'NodeId',
7114
               }
7115
7116 1
    def __init__(self, binary=None):
7117
        if binary is not None:
7118
            self._binary_init(binary)
7119
            self._freeze = True
7120
            return
7121
        self.RegisteredNodeIds = []
7122
        self._freeze = True
7123
7124 1
    def to_binary(self):
7125
        packet = []
7126
        packet.append(uabin.Primitives.Int32.pack(len(self.RegisteredNodeIds)))
7127
        for fieldname in self.RegisteredNodeIds:
7128
            packet.append(fieldname.to_binary())
7129
        return b''.join(packet)
7130
7131 1
    @staticmethod
7132
    def from_binary(data):
7133
        return RegisterNodesResult(data)
7134
7135 1
    def _binary_init(self, data):
7136
        length = uabin.Primitives.Int32.unpack(data)
7137
        array = []
7138
        if length != -1:
7139
            for _ in range(0, length):
7140
                array.append(NodeId.from_binary(data))
7141
        self.RegisteredNodeIds = array
7142
7143 1
    def __str__(self):
7144
        return 'RegisterNodesResult(' + 'RegisteredNodeIds:' + str(self.RegisteredNodeIds) + ')'
7145
7146 1
    __repr__ = __str__
7147
7148
7149 1
class RegisterNodesResponse(FrozenClass):
7150
    '''
7151
    Registers one or more nodes for repeated use within a session.
7152
7153
    :ivar TypeId:
7154
    :vartype TypeId: NodeId
7155
    :ivar ResponseHeader:
7156
    :vartype ResponseHeader: ResponseHeader
7157
    :ivar Parameters:
7158
    :vartype Parameters: RegisterNodesResult
7159
    '''
7160
7161 1
    ua_types = {
7162
        'TypeId': 'NodeId',
7163
        'ResponseHeader': 'ResponseHeader',
7164
        'Parameters': 'RegisterNodesResult',
7165
               }
7166
7167 1
    def __init__(self, binary=None):
7168
        if binary is not None:
7169
            self._binary_init(binary)
7170
            self._freeze = True
7171
            return
7172
        self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary)
7173
        self.ResponseHeader = ResponseHeader()
7174
        self.Parameters = RegisterNodesResult()
7175
        self._freeze = True
7176
7177 1
    def to_binary(self):
7178
        packet = []
7179
        packet.append(self.TypeId.to_binary())
7180
        packet.append(self.ResponseHeader.to_binary())
7181
        packet.append(self.Parameters.to_binary())
7182
        return b''.join(packet)
7183
7184 1
    @staticmethod
7185
    def from_binary(data):
7186
        return RegisterNodesResponse(data)
7187
7188 1
    def _binary_init(self, data):
7189
        self.TypeId = NodeId.from_binary(data)
7190
        self.ResponseHeader = ResponseHeader.from_binary(data)
7191
        self.Parameters = RegisterNodesResult.from_binary(data)
7192
7193 1
    def __str__(self):
7194
        return 'RegisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7195
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
7196
               'Parameters:' + str(self.Parameters) + ')'
7197
7198 1
    __repr__ = __str__
7199
7200
7201 1 View Code Duplication
class UnregisterNodesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7202
    '''
7203
    :ivar NodesToUnregister:
7204
    :vartype NodesToUnregister: NodeId
7205
    '''
7206
7207 1
    ua_types = {
7208
        'NodesToUnregister': 'NodeId',
7209
               }
7210
7211 1
    def __init__(self, binary=None):
7212
        if binary is not None:
7213
            self._binary_init(binary)
7214
            self._freeze = True
7215
            return
7216
        self.NodesToUnregister = []
7217
        self._freeze = True
7218
7219 1
    def to_binary(self):
7220
        packet = []
7221
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToUnregister)))
7222
        for fieldname in self.NodesToUnregister:
7223
            packet.append(fieldname.to_binary())
7224
        return b''.join(packet)
7225
7226 1
    @staticmethod
7227
    def from_binary(data):
7228
        return UnregisterNodesParameters(data)
7229
7230 1
    def _binary_init(self, data):
7231
        length = uabin.Primitives.Int32.unpack(data)
7232
        array = []
7233
        if length != -1:
7234
            for _ in range(0, length):
7235
                array.append(NodeId.from_binary(data))
7236
        self.NodesToUnregister = array
7237
7238 1
    def __str__(self):
7239
        return 'UnregisterNodesParameters(' + 'NodesToUnregister:' + str(self.NodesToUnregister) + ')'
7240
7241 1
    __repr__ = __str__
7242
7243
7244 1
class UnregisterNodesRequest(FrozenClass):
7245
    '''
7246
    Unregisters one or more previously registered nodes.
7247
7248
    :ivar TypeId:
7249
    :vartype TypeId: NodeId
7250
    :ivar RequestHeader:
7251
    :vartype RequestHeader: RequestHeader
7252
    :ivar Parameters:
7253
    :vartype Parameters: UnregisterNodesParameters
7254
    '''
7255
7256 1
    ua_types = {
7257
        'TypeId': 'NodeId',
7258
        'RequestHeader': 'RequestHeader',
7259
        'Parameters': 'UnregisterNodesParameters',
7260
               }
7261
7262 1
    def __init__(self, binary=None):
7263
        if binary is not None:
7264
            self._binary_init(binary)
7265
            self._freeze = True
7266
            return
7267
        self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary)
7268
        self.RequestHeader = RequestHeader()
7269
        self.Parameters = UnregisterNodesParameters()
7270
        self._freeze = True
7271
7272 1
    def to_binary(self):
7273
        packet = []
7274
        packet.append(self.TypeId.to_binary())
7275
        packet.append(self.RequestHeader.to_binary())
7276
        packet.append(self.Parameters.to_binary())
7277
        return b''.join(packet)
7278
7279 1
    @staticmethod
7280
    def from_binary(data):
7281
        return UnregisterNodesRequest(data)
7282
7283 1
    def _binary_init(self, data):
7284
        self.TypeId = NodeId.from_binary(data)
7285
        self.RequestHeader = RequestHeader.from_binary(data)
7286
        self.Parameters = UnregisterNodesParameters.from_binary(data)
7287
7288 1
    def __str__(self):
7289
        return 'UnregisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7290
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
7291
               'Parameters:' + str(self.Parameters) + ')'
7292
7293 1
    __repr__ = __str__
7294
7295
7296 1
class UnregisterNodesResponse(FrozenClass):
7297
    '''
7298
    Unregisters one or more previously registered nodes.
7299
7300
    :ivar TypeId:
7301
    :vartype TypeId: NodeId
7302
    :ivar ResponseHeader:
7303
    :vartype ResponseHeader: ResponseHeader
7304
    '''
7305
7306 1
    ua_types = {
7307
        'TypeId': 'NodeId',
7308
        'ResponseHeader': 'ResponseHeader',
7309
               }
7310
7311 1
    def __init__(self, binary=None):
7312
        if binary is not None:
7313
            self._binary_init(binary)
7314
            self._freeze = True
7315
            return
7316
        self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary)
7317
        self.ResponseHeader = ResponseHeader()
7318
        self._freeze = True
7319
7320 1
    def to_binary(self):
7321
        packet = []
7322
        packet.append(self.TypeId.to_binary())
7323
        packet.append(self.ResponseHeader.to_binary())
7324
        return b''.join(packet)
7325
7326 1
    @staticmethod
7327
    def from_binary(data):
7328
        return UnregisterNodesResponse(data)
7329
7330 1
    def _binary_init(self, data):
7331
        self.TypeId = NodeId.from_binary(data)
7332
        self.ResponseHeader = ResponseHeader.from_binary(data)
7333
7334 1
    def __str__(self):
7335
        return 'UnregisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7336
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
7337
7338 1
    __repr__ = __str__
7339
7340
7341 1
class EndpointConfiguration(FrozenClass):
7342
    '''
7343
    :ivar OperationTimeout:
7344
    :vartype OperationTimeout: Int32
7345
    :ivar UseBinaryEncoding:
7346
    :vartype UseBinaryEncoding: Boolean
7347
    :ivar MaxStringLength:
7348
    :vartype MaxStringLength: Int32
7349
    :ivar MaxByteStringLength:
7350
    :vartype MaxByteStringLength: Int32
7351
    :ivar MaxArrayLength:
7352
    :vartype MaxArrayLength: Int32
7353
    :ivar MaxMessageSize:
7354
    :vartype MaxMessageSize: Int32
7355
    :ivar MaxBufferSize:
7356
    :vartype MaxBufferSize: Int32
7357
    :ivar ChannelLifetime:
7358
    :vartype ChannelLifetime: Int32
7359
    :ivar SecurityTokenLifetime:
7360
    :vartype SecurityTokenLifetime: Int32
7361
    '''
7362
7363 1
    ua_types = {
7364
        'OperationTimeout': 'Int32',
7365
        'UseBinaryEncoding': 'Boolean',
7366
        'MaxStringLength': 'Int32',
7367
        'MaxByteStringLength': 'Int32',
7368
        'MaxArrayLength': 'Int32',
7369
        'MaxMessageSize': 'Int32',
7370
        'MaxBufferSize': 'Int32',
7371
        'ChannelLifetime': 'Int32',
7372
        'SecurityTokenLifetime': 'Int32',
7373
               }
7374
7375 1
    def __init__(self, binary=None):
7376
        if binary is not None:
7377
            self._binary_init(binary)
7378
            self._freeze = True
7379
            return
7380
        self.OperationTimeout = 0
7381
        self.UseBinaryEncoding = True
7382
        self.MaxStringLength = 0
7383
        self.MaxByteStringLength = 0
7384
        self.MaxArrayLength = 0
7385
        self.MaxMessageSize = 0
7386
        self.MaxBufferSize = 0
7387
        self.ChannelLifetime = 0
7388
        self.SecurityTokenLifetime = 0
7389
        self._freeze = True
7390
7391 1
    def to_binary(self):
7392
        packet = []
7393
        packet.append(uabin.Primitives.Int32.pack(self.OperationTimeout))
7394
        packet.append(uabin.Primitives.Boolean.pack(self.UseBinaryEncoding))
7395
        packet.append(uabin.Primitives.Int32.pack(self.MaxStringLength))
7396
        packet.append(uabin.Primitives.Int32.pack(self.MaxByteStringLength))
7397
        packet.append(uabin.Primitives.Int32.pack(self.MaxArrayLength))
7398
        packet.append(uabin.Primitives.Int32.pack(self.MaxMessageSize))
7399
        packet.append(uabin.Primitives.Int32.pack(self.MaxBufferSize))
7400
        packet.append(uabin.Primitives.Int32.pack(self.ChannelLifetime))
7401
        packet.append(uabin.Primitives.Int32.pack(self.SecurityTokenLifetime))
7402
        return b''.join(packet)
7403
7404 1
    @staticmethod
7405
    def from_binary(data):
7406
        return EndpointConfiguration(data)
7407
7408 1
    def _binary_init(self, data):
7409
        self.OperationTimeout = uabin.Primitives.Int32.unpack(data)
7410
        self.UseBinaryEncoding = uabin.Primitives.Boolean.unpack(data)
7411
        self.MaxStringLength = uabin.Primitives.Int32.unpack(data)
7412
        self.MaxByteStringLength = uabin.Primitives.Int32.unpack(data)
7413
        self.MaxArrayLength = uabin.Primitives.Int32.unpack(data)
7414
        self.MaxMessageSize = uabin.Primitives.Int32.unpack(data)
7415
        self.MaxBufferSize = uabin.Primitives.Int32.unpack(data)
7416
        self.ChannelLifetime = uabin.Primitives.Int32.unpack(data)
7417
        self.SecurityTokenLifetime = uabin.Primitives.Int32.unpack(data)
7418
7419 1
    def __str__(self):
7420
        return 'EndpointConfiguration(' + 'OperationTimeout:' + str(self.OperationTimeout) + ', ' + \
7421
               'UseBinaryEncoding:' + str(self.UseBinaryEncoding) + ', ' + \
7422
               'MaxStringLength:' + str(self.MaxStringLength) + ', ' + \
7423
               'MaxByteStringLength:' + str(self.MaxByteStringLength) + ', ' + \
7424
               'MaxArrayLength:' + str(self.MaxArrayLength) + ', ' + \
7425
               'MaxMessageSize:' + str(self.MaxMessageSize) + ', ' + \
7426
               'MaxBufferSize:' + str(self.MaxBufferSize) + ', ' + \
7427
               'ChannelLifetime:' + str(self.ChannelLifetime) + ', ' + \
7428
               'SecurityTokenLifetime:' + str(self.SecurityTokenLifetime) + ')'
7429
7430 1
    __repr__ = __str__
7431
7432
7433 1
class SupportedProfile(FrozenClass):
7434
    '''
7435
    :ivar OrganizationUri:
7436
    :vartype OrganizationUri: String
7437
    :ivar ProfileId:
7438
    :vartype ProfileId: String
7439
    :ivar ComplianceTool:
7440
    :vartype ComplianceTool: String
7441
    :ivar ComplianceDate:
7442
    :vartype ComplianceDate: DateTime
7443
    :ivar ComplianceLevel:
7444
    :vartype ComplianceLevel: ComplianceLevel
7445
    :ivar UnsupportedUnitIds:
7446
    :vartype UnsupportedUnitIds: String
7447
    '''
7448
7449 1
    ua_types = {
7450
        'OrganizationUri': 'String',
7451
        'ProfileId': 'String',
7452
        'ComplianceTool': 'String',
7453
        'ComplianceDate': 'DateTime',
7454
        'ComplianceLevel': 'ComplianceLevel',
7455
        'UnsupportedUnitIds': 'String',
7456
               }
7457
7458 1
    def __init__(self, binary=None):
7459
        if binary is not None:
7460
            self._binary_init(binary)
7461
            self._freeze = True
7462
            return
7463
        self.OrganizationUri = None
7464
        self.ProfileId = None
7465
        self.ComplianceTool = None
7466
        self.ComplianceDate = datetime.utcnow()
7467
        self.ComplianceLevel = ComplianceLevel(0)
7468
        self.UnsupportedUnitIds = []
7469
        self._freeze = True
7470
7471 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7472
        packet = []
7473
        packet.append(uabin.Primitives.String.pack(self.OrganizationUri))
7474
        packet.append(uabin.Primitives.String.pack(self.ProfileId))
7475
        packet.append(uabin.Primitives.String.pack(self.ComplianceTool))
7476
        packet.append(uabin.Primitives.DateTime.pack(self.ComplianceDate))
7477
        packet.append(uabin.Primitives.UInt32.pack(self.ComplianceLevel.value))
7478
        packet.append(uabin.Primitives.Int32.pack(len(self.UnsupportedUnitIds)))
7479
        for fieldname in self.UnsupportedUnitIds:
7480
            packet.append(uabin.Primitives.String.pack(fieldname))
7481
        return b''.join(packet)
7482
7483 1
    @staticmethod
7484
    def from_binary(data):
7485
        return SupportedProfile(data)
7486
7487 1
    def _binary_init(self, data):
7488
        self.OrganizationUri = uabin.Primitives.String.unpack(data)
7489
        self.ProfileId = uabin.Primitives.String.unpack(data)
7490
        self.ComplianceTool = uabin.Primitives.String.unpack(data)
7491
        self.ComplianceDate = uabin.Primitives.DateTime.unpack(data)
7492
        self.ComplianceLevel = ComplianceLevel(uabin.Primitives.UInt32.unpack(data))
7493
        self.UnsupportedUnitIds = uabin.Primitives.String.unpack_array(data)
7494
7495 1
    def __str__(self):
7496
        return 'SupportedProfile(' + 'OrganizationUri:' + str(self.OrganizationUri) + ', ' + \
7497
               'ProfileId:' + str(self.ProfileId) + ', ' + \
7498
               'ComplianceTool:' + str(self.ComplianceTool) + ', ' + \
7499
               'ComplianceDate:' + str(self.ComplianceDate) + ', ' + \
7500
               'ComplianceLevel:' + str(self.ComplianceLevel) + ', ' + \
7501
               'UnsupportedUnitIds:' + str(self.UnsupportedUnitIds) + ')'
7502
7503 1
    __repr__ = __str__
7504
7505
7506 1
class SoftwareCertificate(FrozenClass):
7507
    '''
7508
    :ivar ProductName:
7509
    :vartype ProductName: String
7510
    :ivar ProductUri:
7511
    :vartype ProductUri: String
7512
    :ivar VendorName:
7513
    :vartype VendorName: String
7514
    :ivar VendorProductCertificate:
7515
    :vartype VendorProductCertificate: ByteString
7516
    :ivar SoftwareVersion:
7517
    :vartype SoftwareVersion: String
7518
    :ivar BuildNumber:
7519
    :vartype BuildNumber: String
7520
    :ivar BuildDate:
7521
    :vartype BuildDate: DateTime
7522
    :ivar IssuedBy:
7523
    :vartype IssuedBy: String
7524
    :ivar IssueDate:
7525
    :vartype IssueDate: DateTime
7526
    :ivar SupportedProfiles:
7527
    :vartype SupportedProfiles: SupportedProfile
7528
    '''
7529
7530 1
    ua_types = {
7531
        'ProductName': 'String',
7532
        'ProductUri': 'String',
7533
        'VendorName': 'String',
7534
        'VendorProductCertificate': 'ByteString',
7535
        'SoftwareVersion': 'String',
7536
        'BuildNumber': 'String',
7537
        'BuildDate': 'DateTime',
7538
        'IssuedBy': 'String',
7539
        'IssueDate': 'DateTime',
7540
        'SupportedProfiles': 'SupportedProfile',
7541
               }
7542
7543 1
    def __init__(self, binary=None):
7544
        if binary is not None:
7545
            self._binary_init(binary)
7546
            self._freeze = True
7547
            return
7548
        self.ProductName = None
7549
        self.ProductUri = None
7550
        self.VendorName = None
7551
        self.VendorProductCertificate = None
7552
        self.SoftwareVersion = None
7553
        self.BuildNumber = None
7554
        self.BuildDate = datetime.utcnow()
7555
        self.IssuedBy = None
7556
        self.IssueDate = datetime.utcnow()
7557
        self.SupportedProfiles = []
7558
        self._freeze = True
7559
7560 1
    def to_binary(self):
7561
        packet = []
7562
        packet.append(uabin.Primitives.String.pack(self.ProductName))
7563
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
7564
        packet.append(uabin.Primitives.String.pack(self.VendorName))
7565
        packet.append(uabin.Primitives.ByteString.pack(self.VendorProductCertificate))
7566
        packet.append(uabin.Primitives.String.pack(self.SoftwareVersion))
7567
        packet.append(uabin.Primitives.String.pack(self.BuildNumber))
7568
        packet.append(uabin.Primitives.DateTime.pack(self.BuildDate))
7569
        packet.append(uabin.Primitives.String.pack(self.IssuedBy))
7570
        packet.append(uabin.Primitives.DateTime.pack(self.IssueDate))
7571
        packet.append(uabin.Primitives.Int32.pack(len(self.SupportedProfiles)))
7572
        for fieldname in self.SupportedProfiles:
7573
            packet.append(fieldname.to_binary())
7574
        return b''.join(packet)
7575
7576 1
    @staticmethod
7577
    def from_binary(data):
7578
        return SoftwareCertificate(data)
7579
7580 1
    def _binary_init(self, data):
7581
        self.ProductName = uabin.Primitives.String.unpack(data)
7582
        self.ProductUri = uabin.Primitives.String.unpack(data)
7583
        self.VendorName = uabin.Primitives.String.unpack(data)
7584
        self.VendorProductCertificate = uabin.Primitives.ByteString.unpack(data)
7585
        self.SoftwareVersion = uabin.Primitives.String.unpack(data)
7586
        self.BuildNumber = uabin.Primitives.String.unpack(data)
7587
        self.BuildDate = uabin.Primitives.DateTime.unpack(data)
7588
        self.IssuedBy = uabin.Primitives.String.unpack(data)
7589
        self.IssueDate = uabin.Primitives.DateTime.unpack(data)
7590
        length = uabin.Primitives.Int32.unpack(data)
7591
        array = []
7592
        if length != -1:
7593
            for _ in range(0, length):
7594
                array.append(SupportedProfile.from_binary(data))
7595
        self.SupportedProfiles = array
7596
7597 1
    def __str__(self):
7598
        return 'SoftwareCertificate(' + 'ProductName:' + str(self.ProductName) + ', ' + \
7599
               'ProductUri:' + str(self.ProductUri) + ', ' + \
7600
               'VendorName:' + str(self.VendorName) + ', ' + \
7601
               'VendorProductCertificate:' + str(self.VendorProductCertificate) + ', ' + \
7602
               'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \
7603
               'BuildNumber:' + str(self.BuildNumber) + ', ' + \
7604
               'BuildDate:' + str(self.BuildDate) + ', ' + \
7605
               'IssuedBy:' + str(self.IssuedBy) + ', ' + \
7606
               'IssueDate:' + str(self.IssueDate) + ', ' + \
7607
               'SupportedProfiles:' + str(self.SupportedProfiles) + ')'
7608
7609 1
    __repr__ = __str__
7610
7611
7612 1
class QueryDataDescription(FrozenClass):
7613
    '''
7614
    :ivar RelativePath:
7615
    :vartype RelativePath: RelativePath
7616
    :ivar AttributeId:
7617
    :vartype AttributeId: UInt32
7618
    :ivar IndexRange:
7619
    :vartype IndexRange: String
7620
    '''
7621
7622 1
    ua_types = {
7623
        'RelativePath': 'RelativePath',
7624
        'AttributeId': 'UInt32',
7625
        'IndexRange': 'String',
7626
               }
7627
7628 1
    def __init__(self, binary=None):
7629
        if binary is not None:
7630
            self._binary_init(binary)
7631
            self._freeze = True
7632
            return
7633
        self.RelativePath = RelativePath()
7634
        self.AttributeId = 0
7635
        self.IndexRange = None
7636
        self._freeze = True
7637
7638 1
    def to_binary(self):
7639
        packet = []
7640
        packet.append(self.RelativePath.to_binary())
7641
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
7642
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
7643
        return b''.join(packet)
7644
7645 1
    @staticmethod
7646
    def from_binary(data):
7647
        return QueryDataDescription(data)
7648
7649 1
    def _binary_init(self, data):
7650
        self.RelativePath = RelativePath.from_binary(data)
7651
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
7652
        self.IndexRange = uabin.Primitives.String.unpack(data)
7653
7654 1
    def __str__(self):
7655
        return 'QueryDataDescription(' + 'RelativePath:' + str(self.RelativePath) + ', ' + \
7656
               'AttributeId:' + str(self.AttributeId) + ', ' + \
7657
               'IndexRange:' + str(self.IndexRange) + ')'
7658
7659 1
    __repr__ = __str__
7660
7661
7662 1 View Code Duplication
class NodeTypeDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7663
    '''
7664
    :ivar TypeDefinitionNode:
7665
    :vartype TypeDefinitionNode: ExpandedNodeId
7666
    :ivar IncludeSubTypes:
7667
    :vartype IncludeSubTypes: Boolean
7668
    :ivar DataToReturn:
7669
    :vartype DataToReturn: QueryDataDescription
7670
    '''
7671
7672 1
    ua_types = {
7673
        'TypeDefinitionNode': 'ExpandedNodeId',
7674
        'IncludeSubTypes': 'Boolean',
7675
        'DataToReturn': 'QueryDataDescription',
7676
               }
7677
7678 1
    def __init__(self, binary=None):
7679
        if binary is not None:
7680
            self._binary_init(binary)
7681
            self._freeze = True
7682
            return
7683
        self.TypeDefinitionNode = ExpandedNodeId()
7684
        self.IncludeSubTypes = True
7685
        self.DataToReturn = []
7686
        self._freeze = True
7687
7688 1
    def to_binary(self):
7689
        packet = []
7690
        packet.append(self.TypeDefinitionNode.to_binary())
7691
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubTypes))
7692
        packet.append(uabin.Primitives.Int32.pack(len(self.DataToReturn)))
7693
        for fieldname in self.DataToReturn:
7694
            packet.append(fieldname.to_binary())
7695
        return b''.join(packet)
7696
7697 1
    @staticmethod
7698
    def from_binary(data):
7699
        return NodeTypeDescription(data)
7700
7701 1
    def _binary_init(self, data):
7702
        self.TypeDefinitionNode = ExpandedNodeId.from_binary(data)
7703
        self.IncludeSubTypes = uabin.Primitives.Boolean.unpack(data)
7704
        length = uabin.Primitives.Int32.unpack(data)
7705
        array = []
7706
        if length != -1:
7707
            for _ in range(0, length):
7708
                array.append(QueryDataDescription.from_binary(data))
7709
        self.DataToReturn = array
7710
7711 1
    def __str__(self):
7712
        return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \
7713
               'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \
7714
               'DataToReturn:' + str(self.DataToReturn) + ')'
7715
7716 1
    __repr__ = __str__
7717
7718
7719 1
class QueryDataSet(FrozenClass):
7720
    '''
7721
    :ivar NodeId:
7722
    :vartype NodeId: ExpandedNodeId
7723
    :ivar TypeDefinitionNode:
7724
    :vartype TypeDefinitionNode: ExpandedNodeId
7725
    :ivar Values:
7726
    :vartype Values: Variant
7727
    '''
7728
7729 1
    ua_types = {
7730
        'NodeId': 'ExpandedNodeId',
7731
        'TypeDefinitionNode': 'ExpandedNodeId',
7732
        'Values': 'Variant',
7733
               }
7734
7735 1
    def __init__(self, binary=None):
7736
        if binary is not None:
7737
            self._binary_init(binary)
7738
            self._freeze = True
7739
            return
7740
        self.NodeId = ExpandedNodeId()
7741
        self.TypeDefinitionNode = ExpandedNodeId()
7742
        self.Values = []
7743
        self._freeze = True
7744
7745 1
    def to_binary(self):
7746
        packet = []
7747
        packet.append(self.NodeId.to_binary())
7748
        packet.append(self.TypeDefinitionNode.to_binary())
7749
        packet.append(uabin.Primitives.Int32.pack(len(self.Values)))
7750
        for fieldname in self.Values:
7751
            packet.append(fieldname.to_binary())
7752
        return b''.join(packet)
7753
7754 1
    @staticmethod
7755
    def from_binary(data):
7756
        return QueryDataSet(data)
7757
7758 1
    def _binary_init(self, data):
7759
        self.NodeId = ExpandedNodeId.from_binary(data)
7760
        self.TypeDefinitionNode = ExpandedNodeId.from_binary(data)
7761
        length = uabin.Primitives.Int32.unpack(data)
7762
        array = []
7763
        if length != -1:
7764
            for _ in range(0, length):
7765
                array.append(Variant.from_binary(data))
7766
        self.Values = array
7767
7768 1
    def __str__(self):
7769
        return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \
7770
               'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \
7771
               'Values:' + str(self.Values) + ')'
7772
7773 1
    __repr__ = __str__
7774
7775
7776 1
class NodeReference(FrozenClass):
7777
    '''
7778
    :ivar NodeId:
7779
    :vartype NodeId: NodeId
7780
    :ivar ReferenceTypeId:
7781
    :vartype ReferenceTypeId: NodeId
7782
    :ivar IsForward:
7783
    :vartype IsForward: Boolean
7784
    :ivar ReferencedNodeIds:
7785
    :vartype ReferencedNodeIds: NodeId
7786
    '''
7787
7788 1
    ua_types = {
7789
        'NodeId': 'NodeId',
7790
        'ReferenceTypeId': 'NodeId',
7791
        'IsForward': 'Boolean',
7792
        'ReferencedNodeIds': 'NodeId',
7793
               }
7794
7795 1
    def __init__(self, binary=None):
7796
        if binary is not None:
7797
            self._binary_init(binary)
7798
            self._freeze = True
7799
            return
7800
        self.NodeId = NodeId()
7801
        self.ReferenceTypeId = NodeId()
7802
        self.IsForward = True
7803
        self.ReferencedNodeIds = []
7804
        self._freeze = True
7805
7806 1
    def to_binary(self):
7807
        packet = []
7808
        packet.append(self.NodeId.to_binary())
7809
        packet.append(self.ReferenceTypeId.to_binary())
7810
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
7811
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencedNodeIds)))
7812
        for fieldname in self.ReferencedNodeIds:
7813
            packet.append(fieldname.to_binary())
7814
        return b''.join(packet)
7815
7816 1
    @staticmethod
7817
    def from_binary(data):
7818
        return NodeReference(data)
7819
7820 1
    def _binary_init(self, data):
7821
        self.NodeId = NodeId.from_binary(data)
7822
        self.ReferenceTypeId = NodeId.from_binary(data)
7823
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
7824
        length = uabin.Primitives.Int32.unpack(data)
7825
        array = []
7826
        if length != -1:
7827
            for _ in range(0, length):
7828
                array.append(NodeId.from_binary(data))
7829
        self.ReferencedNodeIds = array
7830
7831 1
    def __str__(self):
7832
        return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \
7833
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
7834
               'IsForward:' + str(self.IsForward) + ', ' + \
7835
               'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')'
7836
7837 1
    __repr__ = __str__
7838
7839
7840 1
class ContentFilterElement(FrozenClass):
7841
    '''
7842
    :ivar FilterOperator:
7843
    :vartype FilterOperator: FilterOperator
7844
    :ivar FilterOperands:
7845
    :vartype FilterOperands: ExtensionObject
7846
    '''
7847
7848 1
    ua_types = {
7849
        'FilterOperator': 'FilterOperator',
7850
        'FilterOperands': 'ExtensionObject',
7851
               }
7852
7853 1
    def __init__(self, binary=None):
7854
        if binary is not None:
7855
            self._binary_init(binary)
7856
            self._freeze = True
7857
            return
7858
        self.FilterOperator = FilterOperator(0)
7859
        self.FilterOperands = []
7860
        self._freeze = True
7861
7862 1
    def to_binary(self):
7863
        packet = []
7864
        packet.append(uabin.Primitives.UInt32.pack(self.FilterOperator.value))
7865
        packet.append(uabin.Primitives.Int32.pack(len(self.FilterOperands)))
7866
        for fieldname in self.FilterOperands:
7867
            packet.append(extensionobject_to_binary(fieldname))
7868
        return b''.join(packet)
7869
7870 1
    @staticmethod
7871
    def from_binary(data):
7872
        return ContentFilterElement(data)
7873
7874 1
    def _binary_init(self, data):
7875
        self.FilterOperator = FilterOperator(uabin.Primitives.UInt32.unpack(data))
7876
        length = uabin.Primitives.Int32.unpack(data)
7877
        array = []
7878
        if length != -1:
7879
            for _ in range(0, length):
7880
                array.append(extensionobject_from_binary(data))
7881
        self.FilterOperands = array
7882
7883 1
    def __str__(self):
7884
        return 'ContentFilterElement(' + 'FilterOperator:' + str(self.FilterOperator) + ', ' + \
7885
               'FilterOperands:' + str(self.FilterOperands) + ')'
7886
7887 1
    __repr__ = __str__
7888
7889
7890 1 View Code Duplication
class ContentFilter(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7891
    '''
7892
    :ivar Elements:
7893
    :vartype Elements: ContentFilterElement
7894
    '''
7895
7896 1
    ua_types = {
7897
        'Elements': 'ContentFilterElement',
7898
               }
7899
7900 1
    def __init__(self, binary=None):
7901
        if binary is not None:
7902
            self._binary_init(binary)
7903
            self._freeze = True
7904
            return
7905
        self.Elements = []
7906
        self._freeze = True
7907
7908 1
    def to_binary(self):
7909
        packet = []
7910
        packet.append(uabin.Primitives.Int32.pack(len(self.Elements)))
7911
        for fieldname in self.Elements:
7912
            packet.append(fieldname.to_binary())
7913
        return b''.join(packet)
7914
7915 1
    @staticmethod
7916
    def from_binary(data):
7917
        return ContentFilter(data)
7918
7919 1
    def _binary_init(self, data):
7920
        length = uabin.Primitives.Int32.unpack(data)
7921
        array = []
7922
        if length != -1:
7923
            for _ in range(0, length):
7924
                array.append(ContentFilterElement.from_binary(data))
7925
        self.Elements = array
7926
7927 1
    def __str__(self):
7928
        return 'ContentFilter(' + 'Elements:' + str(self.Elements) + ')'
7929
7930 1
    __repr__ = __str__
7931
7932
7933 1 View Code Duplication
class ElementOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7934
    '''
7935
    :ivar Index:
7936
    :vartype Index: UInt32
7937
    '''
7938
7939 1
    ua_types = {
7940
        'Index': 'UInt32',
7941
               }
7942
7943 1
    def __init__(self, binary=None):
7944
        if binary is not None:
7945
            self._binary_init(binary)
7946
            self._freeze = True
7947
            return
7948
        self.Index = 0
7949
        self._freeze = True
7950
7951 1
    def to_binary(self):
7952
        packet = []
7953
        packet.append(uabin.Primitives.UInt32.pack(self.Index))
7954
        return b''.join(packet)
7955
7956 1
    @staticmethod
7957
    def from_binary(data):
7958
        return ElementOperand(data)
7959
7960 1
    def _binary_init(self, data):
7961
        self.Index = uabin.Primitives.UInt32.unpack(data)
7962
7963 1
    def __str__(self):
7964
        return 'ElementOperand(' + 'Index:' + str(self.Index) + ')'
7965
7966 1
    __repr__ = __str__
7967
7968
7969 1 View Code Duplication
class LiteralOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7970
    '''
7971
    :ivar Value:
7972
    :vartype Value: Variant
7973
    '''
7974
7975 1
    ua_types = {
7976
        'Value': 'Variant',
7977
               }
7978
7979 1
    def __init__(self, binary=None):
7980
        if binary is not None:
7981
            self._binary_init(binary)
7982
            self._freeze = True
7983
            return
7984
        self.Value = Variant()
7985
        self._freeze = True
7986
7987 1
    def to_binary(self):
7988
        packet = []
7989
        packet.append(self.Value.to_binary())
7990
        return b''.join(packet)
7991
7992 1
    @staticmethod
7993
    def from_binary(data):
7994
        return LiteralOperand(data)
7995
7996 1
    def _binary_init(self, data):
7997
        self.Value = Variant.from_binary(data)
7998
7999 1
    def __str__(self):
8000
        return 'LiteralOperand(' + 'Value:' + str(self.Value) + ')'
8001
8002 1
    __repr__ = __str__
8003
8004
8005 1 View Code Duplication
class AttributeOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8006
    '''
8007
    :ivar NodeId:
8008
    :vartype NodeId: NodeId
8009
    :ivar Alias:
8010
    :vartype Alias: String
8011
    :ivar BrowsePath:
8012
    :vartype BrowsePath: RelativePath
8013
    :ivar AttributeId:
8014
    :vartype AttributeId: UInt32
8015
    :ivar IndexRange:
8016
    :vartype IndexRange: String
8017
    '''
8018
8019 1
    ua_types = {
8020
        'NodeId': 'NodeId',
8021
        'Alias': 'String',
8022
        'BrowsePath': 'RelativePath',
8023
        'AttributeId': 'UInt32',
8024
        'IndexRange': 'String',
8025
               }
8026
8027 1
    def __init__(self, binary=None):
8028
        if binary is not None:
8029
            self._binary_init(binary)
8030
            self._freeze = True
8031
            return
8032
        self.NodeId = NodeId()
8033
        self.Alias = None
8034
        self.BrowsePath = RelativePath()
8035
        self.AttributeId = 0
8036
        self.IndexRange = None
8037
        self._freeze = True
8038
8039 1
    def to_binary(self):
8040
        packet = []
8041
        packet.append(self.NodeId.to_binary())
8042
        packet.append(uabin.Primitives.String.pack(self.Alias))
8043
        packet.append(self.BrowsePath.to_binary())
8044
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
8045
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
8046
        return b''.join(packet)
8047
8048 1
    @staticmethod
8049
    def from_binary(data):
8050
        return AttributeOperand(data)
8051
8052 1
    def _binary_init(self, data):
8053
        self.NodeId = NodeId.from_binary(data)
8054
        self.Alias = uabin.Primitives.String.unpack(data)
8055
        self.BrowsePath = RelativePath.from_binary(data)
8056
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
8057
        self.IndexRange = uabin.Primitives.String.unpack(data)
8058
8059 1
    def __str__(self):
8060
        return 'AttributeOperand(' + 'NodeId:' + str(self.NodeId) + ', ' + \
8061
               'Alias:' + str(self.Alias) + ', ' + \
8062
               'BrowsePath:' + str(self.BrowsePath) + ', ' + \
8063
               'AttributeId:' + str(self.AttributeId) + ', ' + \
8064
               'IndexRange:' + str(self.IndexRange) + ')'
8065
8066 1
    __repr__ = __str__
8067
8068
8069 1
class SimpleAttributeOperand(FrozenClass):
8070
    '''
8071
    :ivar TypeDefinitionId:
8072
    :vartype TypeDefinitionId: NodeId
8073
    :ivar BrowsePath:
8074
    :vartype BrowsePath: QualifiedName
8075
    :ivar AttributeId:
8076
    :vartype AttributeId: UInt32
8077
    :ivar IndexRange:
8078
    :vartype IndexRange: String
8079
    '''
8080
8081 1
    ua_types = {
8082
        'TypeDefinitionId': 'NodeId',
8083
        'BrowsePath': 'QualifiedName',
8084
        'AttributeId': 'UInt32',
8085
        'IndexRange': 'String',
8086
               }
8087
8088 1
    def __init__(self, binary=None):
8089
        if binary is not None:
8090
            self._binary_init(binary)
8091
            self._freeze = True
8092
            return
8093
        self.TypeDefinitionId = NodeId()
8094
        self.BrowsePath = []
8095
        self.AttributeId = 0
8096
        self.IndexRange = None
8097
        self._freeze = True
8098
8099 1
    def to_binary(self):
8100
        packet = []
8101
        packet.append(self.TypeDefinitionId.to_binary())
8102
        packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePath)))
8103
        for fieldname in self.BrowsePath:
8104
            packet.append(fieldname.to_binary())
8105
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
8106
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
8107
        return b''.join(packet)
8108
8109 1
    @staticmethod
8110
    def from_binary(data):
8111
        return SimpleAttributeOperand(data)
8112
8113 1
    def _binary_init(self, data):
8114
        self.TypeDefinitionId = NodeId.from_binary(data)
8115
        length = uabin.Primitives.Int32.unpack(data)
8116
        array = []
8117
        if length != -1:
8118
            for _ in range(0, length):
8119
                array.append(QualifiedName.from_binary(data))
8120
        self.BrowsePath = array
8121
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
8122
        self.IndexRange = uabin.Primitives.String.unpack(data)
8123
8124 1
    def __str__(self):
8125
        return 'SimpleAttributeOperand(' + 'TypeDefinitionId:' + str(self.TypeDefinitionId) + ', ' + \
8126
               'BrowsePath:' + str(self.BrowsePath) + ', ' + \
8127
               'AttributeId:' + str(self.AttributeId) + ', ' + \
8128
               'IndexRange:' + str(self.IndexRange) + ')'
8129
8130 1
    __repr__ = __str__
8131
8132
8133 1 View Code Duplication
class ContentFilterElementResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8134
    '''
8135
    :ivar StatusCode:
8136
    :vartype StatusCode: StatusCode
8137
    :ivar OperandStatusCodes:
8138
    :vartype OperandStatusCodes: StatusCode
8139
    :ivar OperandDiagnosticInfos:
8140
    :vartype OperandDiagnosticInfos: DiagnosticInfo
8141
    '''
8142
8143 1
    ua_types = {
8144
        'StatusCode': 'StatusCode',
8145
        'OperandStatusCodes': 'StatusCode',
8146
        'OperandDiagnosticInfos': 'DiagnosticInfo',
8147
               }
8148
8149 1
    def __init__(self, binary=None):
8150
        if binary is not None:
8151
            self._binary_init(binary)
8152
            self._freeze = True
8153
            return
8154
        self.StatusCode = StatusCode()
8155
        self.OperandStatusCodes = []
8156
        self.OperandDiagnosticInfos = []
8157
        self._freeze = True
8158
8159 1
    def to_binary(self):
8160
        packet = []
8161
        packet.append(self.StatusCode.to_binary())
8162
        packet.append(uabin.Primitives.Int32.pack(len(self.OperandStatusCodes)))
8163
        for fieldname in self.OperandStatusCodes:
8164
            packet.append(fieldname.to_binary())
8165
        packet.append(uabin.Primitives.Int32.pack(len(self.OperandDiagnosticInfos)))
8166
        for fieldname in self.OperandDiagnosticInfos:
8167
            packet.append(fieldname.to_binary())
8168
        return b''.join(packet)
8169
8170 1
    @staticmethod
8171
    def from_binary(data):
8172
        return ContentFilterElementResult(data)
8173
8174 1
    def _binary_init(self, data):
8175
        self.StatusCode = StatusCode.from_binary(data)
8176
        length = uabin.Primitives.Int32.unpack(data)
8177
        array = []
8178
        if length != -1:
8179
            for _ in range(0, length):
8180
                array.append(StatusCode.from_binary(data))
8181
        self.OperandStatusCodes = array
8182
        length = uabin.Primitives.Int32.unpack(data)
8183
        array = []
8184
        if length != -1:
8185
            for _ in range(0, length):
8186
                array.append(DiagnosticInfo.from_binary(data))
8187
        self.OperandDiagnosticInfos = array
8188
8189 1
    def __str__(self):
8190
        return 'ContentFilterElementResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
8191
               'OperandStatusCodes:' + str(self.OperandStatusCodes) + ', ' + \
8192
               'OperandDiagnosticInfos:' + str(self.OperandDiagnosticInfos) + ')'
8193
8194 1
    __repr__ = __str__
8195
8196
8197 1 View Code Duplication
class ContentFilterResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8198
    '''
8199
    :ivar ElementResults:
8200
    :vartype ElementResults: ContentFilterElementResult
8201
    :ivar ElementDiagnosticInfos:
8202
    :vartype ElementDiagnosticInfos: DiagnosticInfo
8203
    '''
8204
8205 1
    ua_types = {
8206
        'ElementResults': 'ContentFilterElementResult',
8207
        'ElementDiagnosticInfos': 'DiagnosticInfo',
8208
               }
8209
8210 1
    def __init__(self, binary=None):
8211
        if binary is not None:
8212
            self._binary_init(binary)
8213
            self._freeze = True
8214
            return
8215
        self.ElementResults = []
8216
        self.ElementDiagnosticInfos = []
8217
        self._freeze = True
8218
8219 1
    def to_binary(self):
8220
        packet = []
8221
        packet.append(uabin.Primitives.Int32.pack(len(self.ElementResults)))
8222
        for fieldname in self.ElementResults:
8223
            packet.append(fieldname.to_binary())
8224
        packet.append(uabin.Primitives.Int32.pack(len(self.ElementDiagnosticInfos)))
8225
        for fieldname in self.ElementDiagnosticInfos:
8226
            packet.append(fieldname.to_binary())
8227
        return b''.join(packet)
8228
8229 1
    @staticmethod
8230
    def from_binary(data):
8231
        return ContentFilterResult(data)
8232
8233 1
    def _binary_init(self, data):
8234
        length = uabin.Primitives.Int32.unpack(data)
8235
        array = []
8236
        if length != -1:
8237
            for _ in range(0, length):
8238
                array.append(ContentFilterElementResult.from_binary(data))
8239
        self.ElementResults = array
8240
        length = uabin.Primitives.Int32.unpack(data)
8241
        array = []
8242
        if length != -1:
8243
            for _ in range(0, length):
8244
                array.append(DiagnosticInfo.from_binary(data))
8245
        self.ElementDiagnosticInfos = array
8246
8247 1
    def __str__(self):
8248
        return 'ContentFilterResult(' + 'ElementResults:' + str(self.ElementResults) + ', ' + \
8249
               'ElementDiagnosticInfos:' + str(self.ElementDiagnosticInfos) + ')'
8250
8251 1
    __repr__ = __str__
8252
8253
8254 1 View Code Duplication
class ParsingResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8255
    '''
8256
    :ivar StatusCode:
8257
    :vartype StatusCode: StatusCode
8258
    :ivar DataStatusCodes:
8259
    :vartype DataStatusCodes: StatusCode
8260
    :ivar DataDiagnosticInfos:
8261
    :vartype DataDiagnosticInfos: DiagnosticInfo
8262
    '''
8263
8264 1
    ua_types = {
8265
        'StatusCode': 'StatusCode',
8266
        'DataStatusCodes': 'StatusCode',
8267
        'DataDiagnosticInfos': 'DiagnosticInfo',
8268
               }
8269
8270 1
    def __init__(self, binary=None):
8271
        if binary is not None:
8272
            self._binary_init(binary)
8273
            self._freeze = True
8274
            return
8275
        self.StatusCode = StatusCode()
8276
        self.DataStatusCodes = []
8277
        self.DataDiagnosticInfos = []
8278
        self._freeze = True
8279
8280 1
    def to_binary(self):
8281
        packet = []
8282
        packet.append(self.StatusCode.to_binary())
8283
        packet.append(uabin.Primitives.Int32.pack(len(self.DataStatusCodes)))
8284
        for fieldname in self.DataStatusCodes:
8285
            packet.append(fieldname.to_binary())
8286
        packet.append(uabin.Primitives.Int32.pack(len(self.DataDiagnosticInfos)))
8287
        for fieldname in self.DataDiagnosticInfos:
8288
            packet.append(fieldname.to_binary())
8289
        return b''.join(packet)
8290
8291 1
    @staticmethod
8292
    def from_binary(data):
8293
        return ParsingResult(data)
8294
8295 1
    def _binary_init(self, data):
8296
        self.StatusCode = StatusCode.from_binary(data)
8297
        length = uabin.Primitives.Int32.unpack(data)
8298
        array = []
8299
        if length != -1:
8300
            for _ in range(0, length):
8301
                array.append(StatusCode.from_binary(data))
8302
        self.DataStatusCodes = array
8303
        length = uabin.Primitives.Int32.unpack(data)
8304
        array = []
8305
        if length != -1:
8306
            for _ in range(0, length):
8307
                array.append(DiagnosticInfo.from_binary(data))
8308
        self.DataDiagnosticInfos = array
8309
8310 1
    def __str__(self):
8311
        return 'ParsingResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
8312
               'DataStatusCodes:' + str(self.DataStatusCodes) + ', ' + \
8313
               'DataDiagnosticInfos:' + str(self.DataDiagnosticInfos) + ')'
8314
8315 1
    __repr__ = __str__
8316
8317
8318 1 View Code Duplication
class QueryFirstParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8319
    '''
8320
    :ivar View:
8321
    :vartype View: ViewDescription
8322
    :ivar NodeTypes:
8323
    :vartype NodeTypes: NodeTypeDescription
8324
    :ivar Filter:
8325
    :vartype Filter: ContentFilter
8326
    :ivar MaxDataSetsToReturn:
8327
    :vartype MaxDataSetsToReturn: UInt32
8328
    :ivar MaxReferencesToReturn:
8329
    :vartype MaxReferencesToReturn: UInt32
8330
    '''
8331
8332 1
    ua_types = {
8333
        'View': 'ViewDescription',
8334
        'NodeTypes': 'NodeTypeDescription',
8335
        'Filter': 'ContentFilter',
8336
        'MaxDataSetsToReturn': 'UInt32',
8337
        'MaxReferencesToReturn': 'UInt32',
8338
               }
8339
8340 1
    def __init__(self, binary=None):
8341
        if binary is not None:
8342
            self._binary_init(binary)
8343
            self._freeze = True
8344
            return
8345
        self.View = ViewDescription()
8346
        self.NodeTypes = []
8347
        self.Filter = ContentFilter()
8348
        self.MaxDataSetsToReturn = 0
8349
        self.MaxReferencesToReturn = 0
8350
        self._freeze = True
8351
8352 1
    def to_binary(self):
8353
        packet = []
8354
        packet.append(self.View.to_binary())
8355
        packet.append(uabin.Primitives.Int32.pack(len(self.NodeTypes)))
8356
        for fieldname in self.NodeTypes:
8357
            packet.append(fieldname.to_binary())
8358
        packet.append(self.Filter.to_binary())
8359
        packet.append(uabin.Primitives.UInt32.pack(self.MaxDataSetsToReturn))
8360
        packet.append(uabin.Primitives.UInt32.pack(self.MaxReferencesToReturn))
8361
        return b''.join(packet)
8362
8363 1
    @staticmethod
8364
    def from_binary(data):
8365
        return QueryFirstParameters(data)
8366
8367 1
    def _binary_init(self, data):
8368
        self.View = ViewDescription.from_binary(data)
8369
        length = uabin.Primitives.Int32.unpack(data)
8370
        array = []
8371
        if length != -1:
8372
            for _ in range(0, length):
8373
                array.append(NodeTypeDescription.from_binary(data))
8374
        self.NodeTypes = array
8375
        self.Filter = ContentFilter.from_binary(data)
8376
        self.MaxDataSetsToReturn = uabin.Primitives.UInt32.unpack(data)
8377
        self.MaxReferencesToReturn = uabin.Primitives.UInt32.unpack(data)
8378
8379 1
    def __str__(self):
8380
        return 'QueryFirstParameters(' + 'View:' + str(self.View) + ', ' + \
8381
               'NodeTypes:' + str(self.NodeTypes) + ', ' + \
8382
               'Filter:' + str(self.Filter) + ', ' + \
8383
               'MaxDataSetsToReturn:' + str(self.MaxDataSetsToReturn) + ', ' + \
8384
               'MaxReferencesToReturn:' + str(self.MaxReferencesToReturn) + ')'
8385
8386 1
    __repr__ = __str__
8387
8388
8389 1
class QueryFirstRequest(FrozenClass):
8390
    '''
8391
    :ivar TypeId:
8392
    :vartype TypeId: NodeId
8393
    :ivar RequestHeader:
8394
    :vartype RequestHeader: RequestHeader
8395
    :ivar Parameters:
8396
    :vartype Parameters: QueryFirstParameters
8397
    '''
8398
8399 1
    ua_types = {
8400
        'TypeId': 'NodeId',
8401
        'RequestHeader': 'RequestHeader',
8402
        'Parameters': 'QueryFirstParameters',
8403
               }
8404
8405 1
    def __init__(self, binary=None):
8406
        if binary is not None:
8407
            self._binary_init(binary)
8408
            self._freeze = True
8409
            return
8410
        self.TypeId = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary)
8411
        self.RequestHeader = RequestHeader()
8412
        self.Parameters = QueryFirstParameters()
8413
        self._freeze = True
8414
8415 1
    def to_binary(self):
8416
        packet = []
8417
        packet.append(self.TypeId.to_binary())
8418
        packet.append(self.RequestHeader.to_binary())
8419
        packet.append(self.Parameters.to_binary())
8420
        return b''.join(packet)
8421
8422 1
    @staticmethod
8423
    def from_binary(data):
8424
        return QueryFirstRequest(data)
8425
8426 1
    def _binary_init(self, data):
8427
        self.TypeId = NodeId.from_binary(data)
8428
        self.RequestHeader = RequestHeader.from_binary(data)
8429
        self.Parameters = QueryFirstParameters.from_binary(data)
8430
8431 1
    def __str__(self):
8432
        return 'QueryFirstRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8433
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8434
               'Parameters:' + str(self.Parameters) + ')'
8435
8436 1
    __repr__ = __str__
8437
8438
8439 1
class QueryFirstResult(FrozenClass):
8440
    '''
8441
    :ivar QueryDataSets:
8442
    :vartype QueryDataSets: QueryDataSet
8443
    :ivar ContinuationPoint:
8444
    :vartype ContinuationPoint: ByteString
8445
    :ivar ParsingResults:
8446
    :vartype ParsingResults: ParsingResult
8447
    :ivar DiagnosticInfos:
8448
    :vartype DiagnosticInfos: DiagnosticInfo
8449
    :ivar FilterResult:
8450
    :vartype FilterResult: ContentFilterResult
8451
    '''
8452
8453 1
    ua_types = {
8454
        'QueryDataSets': 'QueryDataSet',
8455
        'ContinuationPoint': 'ByteString',
8456
        'ParsingResults': 'ParsingResult',
8457
        'DiagnosticInfos': 'DiagnosticInfo',
8458
        'FilterResult': 'ContentFilterResult',
8459
               }
8460
8461 1
    def __init__(self, binary=None):
8462
        if binary is not None:
8463
            self._binary_init(binary)
8464
            self._freeze = True
8465
            return
8466
        self.QueryDataSets = []
8467
        self.ContinuationPoint = None
8468
        self.ParsingResults = []
8469
        self.DiagnosticInfos = []
8470
        self.FilterResult = ContentFilterResult()
8471
        self._freeze = True
8472
8473 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8474
        packet = []
8475
        packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets)))
8476
        for fieldname in self.QueryDataSets:
8477
            packet.append(fieldname.to_binary())
8478
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8479
        packet.append(uabin.Primitives.Int32.pack(len(self.ParsingResults)))
8480
        for fieldname in self.ParsingResults:
8481
            packet.append(fieldname.to_binary())
8482
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
8483
        for fieldname in self.DiagnosticInfos:
8484
            packet.append(fieldname.to_binary())
8485
        packet.append(self.FilterResult.to_binary())
8486
        return b''.join(packet)
8487
8488 1
    @staticmethod
8489
    def from_binary(data):
8490
        return QueryFirstResult(data)
8491
8492 1 View Code Duplication
    def _binary_init(self, data):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8493
        length = uabin.Primitives.Int32.unpack(data)
8494
        array = []
8495
        if length != -1:
8496
            for _ in range(0, length):
8497
                array.append(QueryDataSet.from_binary(data))
8498
        self.QueryDataSets = array
8499
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8500
        length = uabin.Primitives.Int32.unpack(data)
8501
        array = []
8502
        if length != -1:
8503
            for _ in range(0, length):
8504
                array.append(ParsingResult.from_binary(data))
8505
        self.ParsingResults = array
8506
        length = uabin.Primitives.Int32.unpack(data)
8507
        array = []
8508
        if length != -1:
8509
            for _ in range(0, length):
8510
                array.append(DiagnosticInfo.from_binary(data))
8511
        self.DiagnosticInfos = array
8512
        self.FilterResult = ContentFilterResult.from_binary(data)
8513
8514 1
    def __str__(self):
8515
        return 'QueryFirstResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \
8516
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
8517
               'ParsingResults:' + str(self.ParsingResults) + ', ' + \
8518
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ', ' + \
8519
               'FilterResult:' + str(self.FilterResult) + ')'
8520
8521 1
    __repr__ = __str__
8522
8523
8524 1
class QueryFirstResponse(FrozenClass):
8525
    '''
8526
    :ivar TypeId:
8527
    :vartype TypeId: NodeId
8528
    :ivar ResponseHeader:
8529
    :vartype ResponseHeader: ResponseHeader
8530
    :ivar Parameters:
8531
    :vartype Parameters: QueryFirstResult
8532
    '''
8533
8534 1
    ua_types = {
8535
        'TypeId': 'NodeId',
8536
        'ResponseHeader': 'ResponseHeader',
8537
        'Parameters': 'QueryFirstResult',
8538
               }
8539
8540 1
    def __init__(self, binary=None):
8541
        if binary is not None:
8542
            self._binary_init(binary)
8543
            self._freeze = True
8544
            return
8545
        self.TypeId = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary)
8546
        self.ResponseHeader = ResponseHeader()
8547
        self.Parameters = QueryFirstResult()
8548
        self._freeze = True
8549
8550 1
    def to_binary(self):
8551
        packet = []
8552
        packet.append(self.TypeId.to_binary())
8553
        packet.append(self.ResponseHeader.to_binary())
8554
        packet.append(self.Parameters.to_binary())
8555
        return b''.join(packet)
8556
8557 1
    @staticmethod
8558
    def from_binary(data):
8559
        return QueryFirstResponse(data)
8560
8561 1
    def _binary_init(self, data):
8562
        self.TypeId = NodeId.from_binary(data)
8563
        self.ResponseHeader = ResponseHeader.from_binary(data)
8564
        self.Parameters = QueryFirstResult.from_binary(data)
8565
8566 1
    def __str__(self):
8567
        return 'QueryFirstResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8568
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8569
               'Parameters:' + str(self.Parameters) + ')'
8570
8571 1
    __repr__ = __str__
8572
8573
8574 1 View Code Duplication
class QueryNextParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8575
    '''
8576
    :ivar ReleaseContinuationPoint:
8577
    :vartype ReleaseContinuationPoint: Boolean
8578
    :ivar ContinuationPoint:
8579
    :vartype ContinuationPoint: ByteString
8580
    '''
8581
8582 1
    ua_types = {
8583
        'ReleaseContinuationPoint': 'Boolean',
8584
        'ContinuationPoint': 'ByteString',
8585
               }
8586
8587 1
    def __init__(self, binary=None):
8588
        if binary is not None:
8589
            self._binary_init(binary)
8590
            self._freeze = True
8591
            return
8592
        self.ReleaseContinuationPoint = True
8593
        self.ContinuationPoint = None
8594
        self._freeze = True
8595
8596 1
    def to_binary(self):
8597
        packet = []
8598
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoint))
8599
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8600
        return b''.join(packet)
8601
8602 1
    @staticmethod
8603
    def from_binary(data):
8604
        return QueryNextParameters(data)
8605
8606 1
    def _binary_init(self, data):
8607
        self.ReleaseContinuationPoint = uabin.Primitives.Boolean.unpack(data)
8608
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8609
8610 1
    def __str__(self):
8611
        return 'QueryNextParameters(' + 'ReleaseContinuationPoint:' + str(self.ReleaseContinuationPoint) + ', ' + \
8612
               'ContinuationPoint:' + str(self.ContinuationPoint) + ')'
8613
8614 1
    __repr__ = __str__
8615
8616
8617 1
class QueryNextRequest(FrozenClass):
8618
    '''
8619
    :ivar TypeId:
8620
    :vartype TypeId: NodeId
8621
    :ivar RequestHeader:
8622
    :vartype RequestHeader: RequestHeader
8623
    :ivar Parameters:
8624
    :vartype Parameters: QueryNextParameters
8625
    '''
8626
8627 1
    ua_types = {
8628
        'TypeId': 'NodeId',
8629
        'RequestHeader': 'RequestHeader',
8630
        'Parameters': 'QueryNextParameters',
8631
               }
8632
8633 1
    def __init__(self, binary=None):
8634
        if binary is not None:
8635
            self._binary_init(binary)
8636
            self._freeze = True
8637
            return
8638
        self.TypeId = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary)
8639
        self.RequestHeader = RequestHeader()
8640
        self.Parameters = QueryNextParameters()
8641
        self._freeze = True
8642
8643 1
    def to_binary(self):
8644
        packet = []
8645
        packet.append(self.TypeId.to_binary())
8646
        packet.append(self.RequestHeader.to_binary())
8647
        packet.append(self.Parameters.to_binary())
8648
        return b''.join(packet)
8649
8650 1
    @staticmethod
8651
    def from_binary(data):
8652
        return QueryNextRequest(data)
8653
8654 1
    def _binary_init(self, data):
8655
        self.TypeId = NodeId.from_binary(data)
8656
        self.RequestHeader = RequestHeader.from_binary(data)
8657
        self.Parameters = QueryNextParameters.from_binary(data)
8658
8659 1
    def __str__(self):
8660
        return 'QueryNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8661
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8662
               'Parameters:' + str(self.Parameters) + ')'
8663
8664 1
    __repr__ = __str__
8665
8666
8667 1 View Code Duplication
class QueryNextResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8668
    '''
8669
    :ivar QueryDataSets:
8670
    :vartype QueryDataSets: QueryDataSet
8671
    :ivar RevisedContinuationPoint:
8672
    :vartype RevisedContinuationPoint: ByteString
8673
    '''
8674
8675 1
    ua_types = {
8676
        'QueryDataSets': 'QueryDataSet',
8677
        'RevisedContinuationPoint': 'ByteString',
8678
               }
8679
8680 1
    def __init__(self, binary=None):
8681
        if binary is not None:
8682
            self._binary_init(binary)
8683
            self._freeze = True
8684
            return
8685
        self.QueryDataSets = []
8686
        self.RevisedContinuationPoint = None
8687
        self._freeze = True
8688
8689 1
    def to_binary(self):
8690
        packet = []
8691
        packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets)))
8692
        for fieldname in self.QueryDataSets:
8693
            packet.append(fieldname.to_binary())
8694
        packet.append(uabin.Primitives.ByteString.pack(self.RevisedContinuationPoint))
8695
        return b''.join(packet)
8696
8697 1
    @staticmethod
8698
    def from_binary(data):
8699
        return QueryNextResult(data)
8700
8701 1
    def _binary_init(self, data):
8702
        length = uabin.Primitives.Int32.unpack(data)
8703
        array = []
8704
        if length != -1:
8705
            for _ in range(0, length):
8706
                array.append(QueryDataSet.from_binary(data))
8707
        self.QueryDataSets = array
8708
        self.RevisedContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8709
8710 1
    def __str__(self):
8711
        return 'QueryNextResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \
8712
               'RevisedContinuationPoint:' + str(self.RevisedContinuationPoint) + ')'
8713
8714 1
    __repr__ = __str__
8715
8716
8717 1
class QueryNextResponse(FrozenClass):
8718
    '''
8719
    :ivar TypeId:
8720
    :vartype TypeId: NodeId
8721
    :ivar ResponseHeader:
8722
    :vartype ResponseHeader: ResponseHeader
8723
    :ivar Parameters:
8724
    :vartype Parameters: QueryNextResult
8725
    '''
8726
8727 1
    ua_types = {
8728
        'TypeId': 'NodeId',
8729
        'ResponseHeader': 'ResponseHeader',
8730
        'Parameters': 'QueryNextResult',
8731
               }
8732
8733 1
    def __init__(self, binary=None):
8734
        if binary is not None:
8735
            self._binary_init(binary)
8736
            self._freeze = True
8737
            return
8738
        self.TypeId = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary)
8739
        self.ResponseHeader = ResponseHeader()
8740
        self.Parameters = QueryNextResult()
8741
        self._freeze = True
8742
8743 1
    def to_binary(self):
8744
        packet = []
8745
        packet.append(self.TypeId.to_binary())
8746
        packet.append(self.ResponseHeader.to_binary())
8747
        packet.append(self.Parameters.to_binary())
8748
        return b''.join(packet)
8749
8750 1
    @staticmethod
8751
    def from_binary(data):
8752
        return QueryNextResponse(data)
8753
8754 1
    def _binary_init(self, data):
8755
        self.TypeId = NodeId.from_binary(data)
8756
        self.ResponseHeader = ResponseHeader.from_binary(data)
8757
        self.Parameters = QueryNextResult.from_binary(data)
8758
8759 1
    def __str__(self):
8760
        return 'QueryNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8761
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8762
               'Parameters:' + str(self.Parameters) + ')'
8763
8764 1
    __repr__ = __str__
8765
8766
8767 1
class ReadValueId(FrozenClass):
8768
    '''
8769
    :ivar NodeId:
8770
    :vartype NodeId: NodeId
8771
    :ivar AttributeId:
8772
    :vartype AttributeId: UInt32
8773
    :ivar IndexRange:
8774
    :vartype IndexRange: String
8775
    :ivar DataEncoding:
8776
    :vartype DataEncoding: QualifiedName
8777
    '''
8778
8779 1
    ua_types = {
8780
        'NodeId': 'NodeId',
8781
        'AttributeId': 'UInt32',
8782
        'IndexRange': 'String',
8783
        'DataEncoding': 'QualifiedName',
8784
               }
8785
8786 1
    def __init__(self, binary=None):
8787
        if binary is not None:
8788
            self._binary_init(binary)
8789
            self._freeze = True
8790
            return
8791
        self.NodeId = NodeId()
8792
        self.AttributeId = 0
8793
        self.IndexRange = None
8794
        self.DataEncoding = QualifiedName()
8795
        self._freeze = True
8796
8797 1
    def to_binary(self):
8798
        packet = []
8799
        packet.append(self.NodeId.to_binary())
8800
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
8801
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
8802
        packet.append(self.DataEncoding.to_binary())
8803
        return b''.join(packet)
8804
8805 1
    @staticmethod
8806
    def from_binary(data):
8807
        return ReadValueId(data)
8808
8809 1
    def _binary_init(self, data):
8810
        self.NodeId = NodeId.from_binary(data)
8811
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
8812
        self.IndexRange = uabin.Primitives.String.unpack(data)
8813
        self.DataEncoding = QualifiedName.from_binary(data)
8814
8815 1
    def __str__(self):
8816
        return 'ReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \
8817
               'AttributeId:' + str(self.AttributeId) + ', ' + \
8818
               'IndexRange:' + str(self.IndexRange) + ', ' + \
8819
               'DataEncoding:' + str(self.DataEncoding) + ')'
8820
8821 1
    __repr__ = __str__
8822
8823
8824 1 View Code Duplication
class ReadParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8825
    '''
8826
    :ivar MaxAge:
8827
    :vartype MaxAge: Double
8828
    :ivar TimestampsToReturn:
8829
    :vartype TimestampsToReturn: TimestampsToReturn
8830
    :ivar NodesToRead:
8831
    :vartype NodesToRead: ReadValueId
8832
    '''
8833
8834 1
    ua_types = {
8835
        'MaxAge': 'Double',
8836
        'TimestampsToReturn': 'TimestampsToReturn',
8837
        'NodesToRead': 'ReadValueId',
8838
               }
8839
8840 1
    def __init__(self, binary=None):
8841
        if binary is not None:
8842
            self._binary_init(binary)
8843
            self._freeze = True
8844
            return
8845
        self.MaxAge = 0
8846
        self.TimestampsToReturn = TimestampsToReturn(0)
8847
        self.NodesToRead = []
8848
        self._freeze = True
8849
8850 1
    def to_binary(self):
8851
        packet = []
8852
        packet.append(uabin.Primitives.Double.pack(self.MaxAge))
8853
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
8854
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead)))
8855
        for fieldname in self.NodesToRead:
8856
            packet.append(fieldname.to_binary())
8857
        return b''.join(packet)
8858
8859 1
    @staticmethod
8860
    def from_binary(data):
8861
        return ReadParameters(data)
8862
8863 1
    def _binary_init(self, data):
8864
        self.MaxAge = uabin.Primitives.Double.unpack(data)
8865
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
8866
        length = uabin.Primitives.Int32.unpack(data)
8867
        array = []
8868
        if length != -1:
8869
            for _ in range(0, length):
8870
                array.append(ReadValueId.from_binary(data))
8871
        self.NodesToRead = array
8872
8873 1
    def __str__(self):
8874
        return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \
8875
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
8876
               'NodesToRead:' + str(self.NodesToRead) + ')'
8877
8878 1
    __repr__ = __str__
8879
8880
8881 1
class ReadRequest(FrozenClass):
8882
    '''
8883
    :ivar TypeId:
8884
    :vartype TypeId: NodeId
8885
    :ivar RequestHeader:
8886
    :vartype RequestHeader: RequestHeader
8887
    :ivar Parameters:
8888
    :vartype Parameters: ReadParameters
8889
    '''
8890
8891 1
    ua_types = {
8892
        'TypeId': 'NodeId',
8893
        'RequestHeader': 'RequestHeader',
8894
        'Parameters': 'ReadParameters',
8895
               }
8896
8897 1
    def __init__(self, binary=None):
8898
        if binary is not None:
8899
            self._binary_init(binary)
8900
            self._freeze = True
8901
            return
8902
        self.TypeId = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary)
8903
        self.RequestHeader = RequestHeader()
8904
        self.Parameters = ReadParameters()
8905
        self._freeze = True
8906
8907 1
    def to_binary(self):
8908
        packet = []
8909
        packet.append(self.TypeId.to_binary())
8910
        packet.append(self.RequestHeader.to_binary())
8911
        packet.append(self.Parameters.to_binary())
8912
        return b''.join(packet)
8913
8914 1
    @staticmethod
8915
    def from_binary(data):
8916
        return ReadRequest(data)
8917
8918 1
    def _binary_init(self, data):
8919
        self.TypeId = NodeId.from_binary(data)
8920
        self.RequestHeader = RequestHeader.from_binary(data)
8921
        self.Parameters = ReadParameters.from_binary(data)
8922
8923 1
    def __str__(self):
8924
        return 'ReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8925
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8926
               'Parameters:' + str(self.Parameters) + ')'
8927
8928 1
    __repr__ = __str__
8929
8930
8931 1 View Code Duplication
class ReadResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8932
    '''
8933
    :ivar TypeId:
8934
    :vartype TypeId: NodeId
8935
    :ivar ResponseHeader:
8936
    :vartype ResponseHeader: ResponseHeader
8937
    :ivar Results:
8938
    :vartype Results: DataValue
8939
    :ivar DiagnosticInfos:
8940
    :vartype DiagnosticInfos: DiagnosticInfo
8941
    '''
8942
8943 1
    ua_types = {
8944
        'TypeId': 'NodeId',
8945
        'ResponseHeader': 'ResponseHeader',
8946
        'Results': 'DataValue',
8947
        'DiagnosticInfos': 'DiagnosticInfo',
8948
               }
8949
8950 1
    def __init__(self, binary=None):
8951
        if binary is not None:
8952
            self._binary_init(binary)
8953
            self._freeze = True
8954
            return
8955
        self.TypeId = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary)
8956
        self.ResponseHeader = ResponseHeader()
8957
        self.Results = []
8958
        self.DiagnosticInfos = []
8959
        self._freeze = True
8960
8961 1
    def to_binary(self):
8962
        packet = []
8963
        packet.append(self.TypeId.to_binary())
8964
        packet.append(self.ResponseHeader.to_binary())
8965
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
8966
        for fieldname in self.Results:
8967
            packet.append(fieldname.to_binary())
8968
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
8969
        for fieldname in self.DiagnosticInfos:
8970
            packet.append(fieldname.to_binary())
8971
        return b''.join(packet)
8972
8973 1
    @staticmethod
8974
    def from_binary(data):
8975
        return ReadResponse(data)
8976
8977 1
    def _binary_init(self, data):
8978
        self.TypeId = NodeId.from_binary(data)
8979
        self.ResponseHeader = ResponseHeader.from_binary(data)
8980
        length = uabin.Primitives.Int32.unpack(data)
8981
        array = []
8982
        if length != -1:
8983
            for _ in range(0, length):
8984
                array.append(DataValue.from_binary(data))
8985
        self.Results = array
8986
        length = uabin.Primitives.Int32.unpack(data)
8987
        array = []
8988
        if length != -1:
8989
            for _ in range(0, length):
8990
                array.append(DiagnosticInfo.from_binary(data))
8991
        self.DiagnosticInfos = array
8992
8993 1
    def __str__(self):
8994
        return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8995
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8996
               'Results:' + str(self.Results) + ', ' + \
8997
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
8998
8999 1
    __repr__ = __str__
9000
9001
9002 1
class HistoryReadValueId(FrozenClass):
9003
    '''
9004
    :ivar NodeId:
9005
    :vartype NodeId: NodeId
9006
    :ivar IndexRange:
9007
    :vartype IndexRange: String
9008
    :ivar DataEncoding:
9009
    :vartype DataEncoding: QualifiedName
9010
    :ivar ContinuationPoint:
9011
    :vartype ContinuationPoint: ByteString
9012
    '''
9013
9014 1
    ua_types = {
9015
        'NodeId': 'NodeId',
9016
        'IndexRange': 'String',
9017
        'DataEncoding': 'QualifiedName',
9018
        'ContinuationPoint': 'ByteString',
9019
               }
9020
9021 1
    def __init__(self, binary=None):
9022
        if binary is not None:
9023
            self._binary_init(binary)
9024
            self._freeze = True
9025
            return
9026
        self.NodeId = NodeId()
9027
        self.IndexRange = None
9028
        self.DataEncoding = QualifiedName()
9029
        self.ContinuationPoint = None
9030
        self._freeze = True
9031
9032 1
    def to_binary(self):
9033
        packet = []
9034
        packet.append(self.NodeId.to_binary())
9035
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
9036
        packet.append(self.DataEncoding.to_binary())
9037
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
9038
        return b''.join(packet)
9039
9040 1
    @staticmethod
9041
    def from_binary(data):
9042
        return HistoryReadValueId(data)
9043
9044 1
    def _binary_init(self, data):
9045
        self.NodeId = NodeId.from_binary(data)
9046
        self.IndexRange = uabin.Primitives.String.unpack(data)
9047
        self.DataEncoding = QualifiedName.from_binary(data)
9048
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
9049
9050 1
    def __str__(self):
9051
        return 'HistoryReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9052
               'IndexRange:' + str(self.IndexRange) + ', ' + \
9053
               'DataEncoding:' + str(self.DataEncoding) + ', ' + \
9054
               'ContinuationPoint:' + str(self.ContinuationPoint) + ')'
9055
9056 1
    __repr__ = __str__
9057
9058
9059 1
class HistoryReadResult(FrozenClass):
9060
    '''
9061
    :ivar StatusCode:
9062
    :vartype StatusCode: StatusCode
9063
    :ivar ContinuationPoint:
9064
    :vartype ContinuationPoint: ByteString
9065
    :ivar HistoryData:
9066
    :vartype HistoryData: ExtensionObject
9067
    '''
9068
9069 1
    ua_types = {
9070
        'StatusCode': 'StatusCode',
9071
        'ContinuationPoint': 'ByteString',
9072
        'HistoryData': 'ExtensionObject',
9073
               }
9074
9075 1
    def __init__(self, binary=None):
9076
        if binary is not None:
9077
            self._binary_init(binary)
9078
            self._freeze = True
9079
            return
9080
        self.StatusCode = StatusCode()
9081
        self.ContinuationPoint = None
9082
        self.HistoryData = None
9083
        self._freeze = True
9084
9085 1
    def to_binary(self):
9086
        packet = []
9087
        packet.append(self.StatusCode.to_binary())
9088
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
9089
        packet.append(extensionobject_to_binary(self.HistoryData))
9090
        return b''.join(packet)
9091
9092 1
    @staticmethod
9093
    def from_binary(data):
9094
        return HistoryReadResult(data)
9095
9096 1
    def _binary_init(self, data):
9097
        self.StatusCode = StatusCode.from_binary(data)
9098
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
9099
        self.HistoryData = extensionobject_from_binary(data)
9100
9101 1
    def __str__(self):
9102
        return 'HistoryReadResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
9103
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
9104
               'HistoryData:' + str(self.HistoryData) + ')'
9105
9106 1
    __repr__ = __str__
9107
9108
9109 1 View Code Duplication
class HistoryReadDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9110
    '''
9111
    '''
9112
9113 1
    ua_types = {
9114
               }
9115
9116 1
    def __init__(self, binary=None):
9117
        if binary is not None:
9118
            self._binary_init(binary)
9119
            self._freeze = True
9120
            return
9121
        self._freeze = True
9122
9123 1
    def to_binary(self):
9124
        packet = []
9125
        return b''.join(packet)
9126
9127 1
    @staticmethod
9128
    def from_binary(data):
9129
        return HistoryReadDetails(data)
9130
9131 1
    def _binary_init(self, data):
9132
        pass
9133
9134 1
    def __str__(self):
9135
        return 'HistoryReadDetails(' +  + ')'
9136
9137 1
    __repr__ = __str__
9138
9139
9140 1
class ReadEventDetails(FrozenClass):
9141
    '''
9142
    :ivar NumValuesPerNode:
9143
    :vartype NumValuesPerNode: UInt32
9144
    :ivar StartTime:
9145
    :vartype StartTime: DateTime
9146
    :ivar EndTime:
9147
    :vartype EndTime: DateTime
9148
    :ivar Filter:
9149
    :vartype Filter: EventFilter
9150
    '''
9151
9152 1
    ua_types = {
9153
        'NumValuesPerNode': 'UInt32',
9154
        'StartTime': 'DateTime',
9155
        'EndTime': 'DateTime',
9156
        'Filter': 'EventFilter',
9157
               }
9158
9159 1
    def __init__(self, binary=None):
9160
        if binary is not None:
9161
            self._binary_init(binary)
9162
            self._freeze = True
9163
            return
9164
        self.NumValuesPerNode = 0
9165
        self.StartTime = datetime.utcnow()
9166
        self.EndTime = datetime.utcnow()
9167
        self.Filter = EventFilter()
9168
        self._freeze = True
9169
9170 1
    def to_binary(self):
9171
        packet = []
9172
        packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode))
9173
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
9174
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
9175
        packet.append(self.Filter.to_binary())
9176
        return b''.join(packet)
9177
9178 1
    @staticmethod
9179
    def from_binary(data):
9180
        return ReadEventDetails(data)
9181
9182 1
    def _binary_init(self, data):
9183
        self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data)
9184
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
9185
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
9186
        self.Filter = EventFilter.from_binary(data)
9187
9188 1
    def __str__(self):
9189
        return 'ReadEventDetails(' + 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \
9190
               'StartTime:' + str(self.StartTime) + ', ' + \
9191
               'EndTime:' + str(self.EndTime) + ', ' + \
9192
               'Filter:' + str(self.Filter) + ')'
9193
9194 1
    __repr__ = __str__
9195
9196
9197 1 View Code Duplication
class ReadRawModifiedDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9198
    '''
9199
    :ivar IsReadModified:
9200
    :vartype IsReadModified: Boolean
9201
    :ivar StartTime:
9202
    :vartype StartTime: DateTime
9203
    :ivar EndTime:
9204
    :vartype EndTime: DateTime
9205
    :ivar NumValuesPerNode:
9206
    :vartype NumValuesPerNode: UInt32
9207
    :ivar ReturnBounds:
9208
    :vartype ReturnBounds: Boolean
9209
    '''
9210
9211 1
    ua_types = {
9212
        'IsReadModified': 'Boolean',
9213
        'StartTime': 'DateTime',
9214
        'EndTime': 'DateTime',
9215
        'NumValuesPerNode': 'UInt32',
9216
        'ReturnBounds': 'Boolean',
9217
               }
9218
9219 1
    def __init__(self, binary=None):
9220
        if binary is not None:
9221
            self._binary_init(binary)
9222
            self._freeze = True
9223
            return
9224
        self.IsReadModified = True
9225
        self.StartTime = datetime.utcnow()
9226
        self.EndTime = datetime.utcnow()
9227
        self.NumValuesPerNode = 0
9228
        self.ReturnBounds = True
9229
        self._freeze = True
9230
9231 1
    def to_binary(self):
9232
        packet = []
9233
        packet.append(uabin.Primitives.Boolean.pack(self.IsReadModified))
9234
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
9235
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
9236
        packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode))
9237
        packet.append(uabin.Primitives.Boolean.pack(self.ReturnBounds))
9238
        return b''.join(packet)
9239
9240 1
    @staticmethod
9241
    def from_binary(data):
9242
        return ReadRawModifiedDetails(data)
9243
9244 1
    def _binary_init(self, data):
9245
        self.IsReadModified = uabin.Primitives.Boolean.unpack(data)
9246
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
9247
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
9248
        self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data)
9249
        self.ReturnBounds = uabin.Primitives.Boolean.unpack(data)
9250
9251 1
    def __str__(self):
9252
        return 'ReadRawModifiedDetails(' + 'IsReadModified:' + str(self.IsReadModified) + ', ' + \
9253
               'StartTime:' + str(self.StartTime) + ', ' + \
9254
               'EndTime:' + str(self.EndTime) + ', ' + \
9255
               'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \
9256
               'ReturnBounds:' + str(self.ReturnBounds) + ')'
9257
9258 1
    __repr__ = __str__
9259
9260
9261 1 View Code Duplication
class ReadProcessedDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9262
    '''
9263
    :ivar StartTime:
9264
    :vartype StartTime: DateTime
9265
    :ivar EndTime:
9266
    :vartype EndTime: DateTime
9267
    :ivar ProcessingInterval:
9268
    :vartype ProcessingInterval: Double
9269
    :ivar AggregateType:
9270
    :vartype AggregateType: NodeId
9271
    :ivar AggregateConfiguration:
9272
    :vartype AggregateConfiguration: AggregateConfiguration
9273
    '''
9274
9275 1
    ua_types = {
9276
        'StartTime': 'DateTime',
9277
        'EndTime': 'DateTime',
9278
        'ProcessingInterval': 'Double',
9279
        'AggregateType': 'NodeId',
9280
        'AggregateConfiguration': 'AggregateConfiguration',
9281
               }
9282
9283 1
    def __init__(self, binary=None):
9284
        if binary is not None:
9285
            self._binary_init(binary)
9286
            self._freeze = True
9287
            return
9288
        self.StartTime = datetime.utcnow()
9289
        self.EndTime = datetime.utcnow()
9290
        self.ProcessingInterval = 0
9291
        self.AggregateType = []
9292
        self.AggregateConfiguration = AggregateConfiguration()
9293
        self._freeze = True
9294
9295 1
    def to_binary(self):
9296
        packet = []
9297
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
9298
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
9299
        packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval))
9300
        packet.append(uabin.Primitives.Int32.pack(len(self.AggregateType)))
9301
        for fieldname in self.AggregateType:
9302
            packet.append(fieldname.to_binary())
9303
        packet.append(self.AggregateConfiguration.to_binary())
9304
        return b''.join(packet)
9305
9306 1
    @staticmethod
9307
    def from_binary(data):
9308
        return ReadProcessedDetails(data)
9309
9310 1
    def _binary_init(self, data):
9311
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
9312
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
9313
        self.ProcessingInterval = uabin.Primitives.Double.unpack(data)
9314
        length = uabin.Primitives.Int32.unpack(data)
9315
        array = []
9316
        if length != -1:
9317
            for _ in range(0, length):
9318
                array.append(NodeId.from_binary(data))
9319
        self.AggregateType = array
9320
        self.AggregateConfiguration = AggregateConfiguration.from_binary(data)
9321
9322 1
    def __str__(self):
9323
        return 'ReadProcessedDetails(' + 'StartTime:' + str(self.StartTime) + ', ' + \
9324
               'EndTime:' + str(self.EndTime) + ', ' + \
9325
               'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \
9326
               'AggregateType:' + str(self.AggregateType) + ', ' + \
9327
               'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')'
9328
9329 1
    __repr__ = __str__
9330
9331
9332 1 View Code Duplication
class ReadAtTimeDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9333
    '''
9334
    :ivar ReqTimes:
9335
    :vartype ReqTimes: DateTime
9336
    :ivar UseSimpleBounds:
9337
    :vartype UseSimpleBounds: Boolean
9338
    '''
9339
9340 1
    ua_types = {
9341
        'ReqTimes': 'DateTime',
9342
        'UseSimpleBounds': 'Boolean',
9343
               }
9344
9345 1
    def __init__(self, binary=None):
9346
        if binary is not None:
9347
            self._binary_init(binary)
9348
            self._freeze = True
9349
            return
9350
        self.ReqTimes = []
9351
        self.UseSimpleBounds = True
9352
        self._freeze = True
9353
9354 1
    def to_binary(self):
9355
        packet = []
9356
        packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes)))
9357
        for fieldname in self.ReqTimes:
9358
            packet.append(uabin.Primitives.DateTime.pack(fieldname))
9359
        packet.append(uabin.Primitives.Boolean.pack(self.UseSimpleBounds))
9360
        return b''.join(packet)
9361
9362 1
    @staticmethod
9363
    def from_binary(data):
9364
        return ReadAtTimeDetails(data)
9365
9366 1
    def _binary_init(self, data):
9367
        self.ReqTimes = uabin.Primitives.DateTime.unpack_array(data)
9368
        self.UseSimpleBounds = uabin.Primitives.Boolean.unpack(data)
9369
9370 1
    def __str__(self):
9371
        return 'ReadAtTimeDetails(' + 'ReqTimes:' + str(self.ReqTimes) + ', ' + \
9372
               'UseSimpleBounds:' + str(self.UseSimpleBounds) + ')'
9373
9374 1
    __repr__ = __str__
9375
9376
9377 1 View Code Duplication
class HistoryData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9378
    '''
9379
    :ivar DataValues:
9380
    :vartype DataValues: DataValue
9381
    '''
9382
9383 1
    ua_types = {
9384
        'DataValues': 'DataValue',
9385
               }
9386
9387 1
    def __init__(self, binary=None):
9388
        if binary is not None:
9389
            self._binary_init(binary)
9390
            self._freeze = True
9391
            return
9392
        self.DataValues = []
9393
        self._freeze = True
9394
9395 1
    def to_binary(self):
9396
        packet = []
9397
        packet.append(uabin.Primitives.Int32.pack(len(self.DataValues)))
9398
        for fieldname in self.DataValues:
9399
            packet.append(fieldname.to_binary())
9400
        return b''.join(packet)
9401
9402 1
    @staticmethod
9403
    def from_binary(data):
9404
        return HistoryData(data)
9405
9406 1
    def _binary_init(self, data):
9407
        length = uabin.Primitives.Int32.unpack(data)
9408
        array = []
9409
        if length != -1:
9410
            for _ in range(0, length):
9411
                array.append(DataValue.from_binary(data))
9412
        self.DataValues = array
9413
9414 1
    def __str__(self):
9415
        return 'HistoryData(' + 'DataValues:' + str(self.DataValues) + ')'
9416
9417 1
    __repr__ = __str__
9418
9419
9420 1
class ModificationInfo(FrozenClass):
9421
    '''
9422
    :ivar ModificationTime:
9423
    :vartype ModificationTime: DateTime
9424
    :ivar UpdateType:
9425
    :vartype UpdateType: HistoryUpdateType
9426
    :ivar UserName:
9427
    :vartype UserName: String
9428
    '''
9429
9430 1
    ua_types = {
9431
        'ModificationTime': 'DateTime',
9432
        'UpdateType': 'HistoryUpdateType',
9433
        'UserName': 'String',
9434
               }
9435
9436 1
    def __init__(self, binary=None):
9437
        if binary is not None:
9438
            self._binary_init(binary)
9439
            self._freeze = True
9440
            return
9441
        self.ModificationTime = datetime.utcnow()
9442
        self.UpdateType = HistoryUpdateType(0)
9443
        self.UserName = None
9444
        self._freeze = True
9445
9446 1
    def to_binary(self):
9447
        packet = []
9448
        packet.append(uabin.Primitives.DateTime.pack(self.ModificationTime))
9449
        packet.append(uabin.Primitives.UInt32.pack(self.UpdateType.value))
9450
        packet.append(uabin.Primitives.String.pack(self.UserName))
9451
        return b''.join(packet)
9452
9453 1
    @staticmethod
9454
    def from_binary(data):
9455
        return ModificationInfo(data)
9456
9457 1
    def _binary_init(self, data):
9458
        self.ModificationTime = uabin.Primitives.DateTime.unpack(data)
9459
        self.UpdateType = HistoryUpdateType(uabin.Primitives.UInt32.unpack(data))
9460
        self.UserName = uabin.Primitives.String.unpack(data)
9461
9462 1
    def __str__(self):
9463
        return 'ModificationInfo(' + 'ModificationTime:' + str(self.ModificationTime) + ', ' + \
9464
               'UpdateType:' + str(self.UpdateType) + ', ' + \
9465
               'UserName:' + str(self.UserName) + ')'
9466
9467 1
    __repr__ = __str__
9468
9469
9470 1 View Code Duplication
class HistoryModifiedData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9471
    '''
9472
    :ivar DataValues:
9473
    :vartype DataValues: DataValue
9474
    :ivar ModificationInfos:
9475
    :vartype ModificationInfos: ModificationInfo
9476
    '''
9477
9478 1
    ua_types = {
9479
        'DataValues': 'DataValue',
9480
        'ModificationInfos': 'ModificationInfo',
9481
               }
9482
9483 1
    def __init__(self, binary=None):
9484
        if binary is not None:
9485
            self._binary_init(binary)
9486
            self._freeze = True
9487
            return
9488
        self.DataValues = []
9489
        self.ModificationInfos = []
9490
        self._freeze = True
9491
9492 1
    def to_binary(self):
9493
        packet = []
9494
        packet.append(uabin.Primitives.Int32.pack(len(self.DataValues)))
9495
        for fieldname in self.DataValues:
9496
            packet.append(fieldname.to_binary())
9497
        packet.append(uabin.Primitives.Int32.pack(len(self.ModificationInfos)))
9498
        for fieldname in self.ModificationInfos:
9499
            packet.append(fieldname.to_binary())
9500
        return b''.join(packet)
9501
9502 1
    @staticmethod
9503
    def from_binary(data):
9504
        return HistoryModifiedData(data)
9505
9506 1
    def _binary_init(self, data):
9507
        length = uabin.Primitives.Int32.unpack(data)
9508
        array = []
9509
        if length != -1:
9510
            for _ in range(0, length):
9511
                array.append(DataValue.from_binary(data))
9512
        self.DataValues = array
9513
        length = uabin.Primitives.Int32.unpack(data)
9514
        array = []
9515
        if length != -1:
9516
            for _ in range(0, length):
9517
                array.append(ModificationInfo.from_binary(data))
9518
        self.ModificationInfos = array
9519
9520 1
    def __str__(self):
9521
        return 'HistoryModifiedData(' + 'DataValues:' + str(self.DataValues) + ', ' + \
9522
               'ModificationInfos:' + str(self.ModificationInfos) + ')'
9523
9524 1
    __repr__ = __str__
9525
9526
9527 1 View Code Duplication
class HistoryEvent(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9528
    '''
9529
    :ivar Events:
9530
    :vartype Events: HistoryEventFieldList
9531
    '''
9532
9533 1
    ua_types = {
9534
        'Events': 'HistoryEventFieldList',
9535
               }
9536
9537 1
    def __init__(self, binary=None):
9538
        if binary is not None:
9539
            self._binary_init(binary)
9540
            self._freeze = True
9541
            return
9542
        self.Events = []
9543
        self._freeze = True
9544
9545 1
    def to_binary(self):
9546
        packet = []
9547
        packet.append(uabin.Primitives.Int32.pack(len(self.Events)))
9548
        for fieldname in self.Events:
9549
            packet.append(fieldname.to_binary())
9550
        return b''.join(packet)
9551
9552 1
    @staticmethod
9553
    def from_binary(data):
9554
        return HistoryEvent(data)
9555
9556 1
    def _binary_init(self, data):
9557
        length = uabin.Primitives.Int32.unpack(data)
9558
        array = []
9559
        if length != -1:
9560
            for _ in range(0, length):
9561
                array.append(HistoryEventFieldList.from_binary(data))
9562
        self.Events = array
9563
9564 1
    def __str__(self):
9565
        return 'HistoryEvent(' + 'Events:' + str(self.Events) + ')'
9566
9567 1
    __repr__ = __str__
9568
9569
9570 1
class HistoryReadParameters(FrozenClass):
9571
    '''
9572
    :ivar HistoryReadDetails:
9573
    :vartype HistoryReadDetails: ExtensionObject
9574
    :ivar TimestampsToReturn:
9575
    :vartype TimestampsToReturn: TimestampsToReturn
9576
    :ivar ReleaseContinuationPoints:
9577
    :vartype ReleaseContinuationPoints: Boolean
9578
    :ivar NodesToRead:
9579
    :vartype NodesToRead: HistoryReadValueId
9580
    '''
9581
9582 1
    ua_types = {
9583
        'HistoryReadDetails': 'ExtensionObject',
9584
        'TimestampsToReturn': 'TimestampsToReturn',
9585
        'ReleaseContinuationPoints': 'Boolean',
9586
        'NodesToRead': 'HistoryReadValueId',
9587
               }
9588
9589 1
    def __init__(self, binary=None):
9590
        if binary is not None:
9591
            self._binary_init(binary)
9592
            self._freeze = True
9593
            return
9594
        self.HistoryReadDetails = None
9595
        self.TimestampsToReturn = TimestampsToReturn(0)
9596
        self.ReleaseContinuationPoints = True
9597
        self.NodesToRead = []
9598
        self._freeze = True
9599
9600 1
    def to_binary(self):
9601
        packet = []
9602
        packet.append(extensionobject_to_binary(self.HistoryReadDetails))
9603
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
9604
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints))
9605
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead)))
9606
        for fieldname in self.NodesToRead:
9607
            packet.append(fieldname.to_binary())
9608
        return b''.join(packet)
9609
9610 1
    @staticmethod
9611
    def from_binary(data):
9612
        return HistoryReadParameters(data)
9613
9614 1
    def _binary_init(self, data):
9615
        self.HistoryReadDetails = extensionobject_from_binary(data)
9616
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
9617
        self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data)
9618
        length = uabin.Primitives.Int32.unpack(data)
9619
        array = []
9620
        if length != -1:
9621
            for _ in range(0, length):
9622
                array.append(HistoryReadValueId.from_binary(data))
9623
        self.NodesToRead = array
9624
9625 1
    def __str__(self):
9626
        return 'HistoryReadParameters(' + 'HistoryReadDetails:' + str(self.HistoryReadDetails) + ', ' + \
9627
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
9628
               'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \
9629
               'NodesToRead:' + str(self.NodesToRead) + ')'
9630
9631 1
    __repr__ = __str__
9632
9633
9634 1
class HistoryReadRequest(FrozenClass):
9635
    '''
9636
    :ivar TypeId:
9637
    :vartype TypeId: NodeId
9638
    :ivar RequestHeader:
9639
    :vartype RequestHeader: RequestHeader
9640
    :ivar Parameters:
9641
    :vartype Parameters: HistoryReadParameters
9642
    '''
9643
9644 1
    ua_types = {
9645
        'TypeId': 'NodeId',
9646
        'RequestHeader': 'RequestHeader',
9647
        'Parameters': 'HistoryReadParameters',
9648
               }
9649
9650 1
    def __init__(self, binary=None):
9651
        if binary is not None:
9652
            self._binary_init(binary)
9653
            self._freeze = True
9654
            return
9655
        self.TypeId = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary)
9656
        self.RequestHeader = RequestHeader()
9657
        self.Parameters = HistoryReadParameters()
9658
        self._freeze = True
9659
9660 1
    def to_binary(self):
9661
        packet = []
9662
        packet.append(self.TypeId.to_binary())
9663
        packet.append(self.RequestHeader.to_binary())
9664
        packet.append(self.Parameters.to_binary())
9665
        return b''.join(packet)
9666
9667 1
    @staticmethod
9668
    def from_binary(data):
9669
        return HistoryReadRequest(data)
9670
9671 1
    def _binary_init(self, data):
9672
        self.TypeId = NodeId.from_binary(data)
9673
        self.RequestHeader = RequestHeader.from_binary(data)
9674
        self.Parameters = HistoryReadParameters.from_binary(data)
9675
9676 1
    def __str__(self):
9677
        return 'HistoryReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9678
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
9679
               'Parameters:' + str(self.Parameters) + ')'
9680
9681 1
    __repr__ = __str__
9682
9683
9684 1 View Code Duplication
class HistoryReadResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9685
    '''
9686
    :ivar TypeId:
9687
    :vartype TypeId: NodeId
9688
    :ivar ResponseHeader:
9689
    :vartype ResponseHeader: ResponseHeader
9690
    :ivar Results:
9691
    :vartype Results: HistoryReadResult
9692
    :ivar DiagnosticInfos:
9693
    :vartype DiagnosticInfos: DiagnosticInfo
9694
    '''
9695
9696 1
    ua_types = {
9697
        'TypeId': 'NodeId',
9698
        'ResponseHeader': 'ResponseHeader',
9699
        'Results': 'HistoryReadResult',
9700
        'DiagnosticInfos': 'DiagnosticInfo',
9701
               }
9702
9703 1
    def __init__(self, binary=None):
9704
        if binary is not None:
9705
            self._binary_init(binary)
9706
            self._freeze = True
9707
            return
9708
        self.TypeId = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary)
9709
        self.ResponseHeader = ResponseHeader()
9710
        self.Results = []
9711
        self.DiagnosticInfos = []
9712
        self._freeze = True
9713
9714 1
    def to_binary(self):
9715
        packet = []
9716
        packet.append(self.TypeId.to_binary())
9717
        packet.append(self.ResponseHeader.to_binary())
9718
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
9719
        for fieldname in self.Results:
9720
            packet.append(fieldname.to_binary())
9721
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9722
        for fieldname in self.DiagnosticInfos:
9723
            packet.append(fieldname.to_binary())
9724
        return b''.join(packet)
9725
9726 1
    @staticmethod
9727
    def from_binary(data):
9728
        return HistoryReadResponse(data)
9729
9730 1
    def _binary_init(self, data):
9731
        self.TypeId = NodeId.from_binary(data)
9732
        self.ResponseHeader = ResponseHeader.from_binary(data)
9733
        length = uabin.Primitives.Int32.unpack(data)
9734
        array = []
9735
        if length != -1:
9736
            for _ in range(0, length):
9737
                array.append(HistoryReadResult.from_binary(data))
9738
        self.Results = array
9739
        length = uabin.Primitives.Int32.unpack(data)
9740
        array = []
9741
        if length != -1:
9742
            for _ in range(0, length):
9743
                array.append(DiagnosticInfo.from_binary(data))
9744
        self.DiagnosticInfos = array
9745
9746 1
    def __str__(self):
9747
        return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9748
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9749
               'Results:' + str(self.Results) + ', ' + \
9750
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9751
9752 1
    __repr__ = __str__
9753
9754
9755 1
class WriteValue(FrozenClass):
9756
    '''
9757
    :ivar NodeId:
9758
    :vartype NodeId: NodeId
9759
    :ivar AttributeId:
9760
    :vartype AttributeId: UInt32
9761
    :ivar IndexRange:
9762
    :vartype IndexRange: String
9763
    :ivar Value:
9764
    :vartype Value: DataValue
9765
    '''
9766
9767 1
    ua_types = {
9768
        'NodeId': 'NodeId',
9769
        'AttributeId': 'UInt32',
9770
        'IndexRange': 'String',
9771
        'Value': 'DataValue',
9772
               }
9773
9774 1
    def __init__(self, binary=None):
9775
        if binary is not None:
9776
            self._binary_init(binary)
9777
            self._freeze = True
9778
            return
9779
        self.NodeId = NodeId()
9780
        self.AttributeId = 0
9781
        self.IndexRange = None
9782
        self.Value = DataValue()
9783
        self._freeze = True
9784
9785 1
    def to_binary(self):
9786
        packet = []
9787
        packet.append(self.NodeId.to_binary())
9788
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
9789
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
9790
        packet.append(self.Value.to_binary())
9791
        return b''.join(packet)
9792
9793 1
    @staticmethod
9794
    def from_binary(data):
9795
        return WriteValue(data)
9796
9797 1
    def _binary_init(self, data):
9798
        self.NodeId = NodeId.from_binary(data)
9799
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
9800
        self.IndexRange = uabin.Primitives.String.unpack(data)
9801
        self.Value = DataValue.from_binary(data)
9802
9803 1
    def __str__(self):
9804
        return 'WriteValue(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9805
               'AttributeId:' + str(self.AttributeId) + ', ' + \
9806
               'IndexRange:' + str(self.IndexRange) + ', ' + \
9807
               'Value:' + str(self.Value) + ')'
9808
9809 1
    __repr__ = __str__
9810
9811
9812 1 View Code Duplication
class WriteParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9813
    '''
9814
    :ivar NodesToWrite:
9815
    :vartype NodesToWrite: WriteValue
9816
    '''
9817
9818 1
    ua_types = {
9819
        'NodesToWrite': 'WriteValue',
9820
               }
9821
9822 1
    def __init__(self, binary=None):
9823
        if binary is not None:
9824
            self._binary_init(binary)
9825
            self._freeze = True
9826
            return
9827
        self.NodesToWrite = []
9828
        self._freeze = True
9829
9830 1
    def to_binary(self):
9831
        packet = []
9832
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToWrite)))
9833
        for fieldname in self.NodesToWrite:
9834
            packet.append(fieldname.to_binary())
9835
        return b''.join(packet)
9836
9837 1
    @staticmethod
9838
    def from_binary(data):
9839
        return WriteParameters(data)
9840
9841 1
    def _binary_init(self, data):
9842
        length = uabin.Primitives.Int32.unpack(data)
9843
        array = []
9844
        if length != -1:
9845
            for _ in range(0, length):
9846
                array.append(WriteValue.from_binary(data))
9847
        self.NodesToWrite = array
9848
9849 1
    def __str__(self):
9850
        return 'WriteParameters(' + 'NodesToWrite:' + str(self.NodesToWrite) + ')'
9851
9852 1
    __repr__ = __str__
9853
9854
9855 1
class WriteRequest(FrozenClass):
9856
    '''
9857
    :ivar TypeId:
9858
    :vartype TypeId: NodeId
9859
    :ivar RequestHeader:
9860
    :vartype RequestHeader: RequestHeader
9861
    :ivar Parameters:
9862
    :vartype Parameters: WriteParameters
9863
    '''
9864
9865 1
    ua_types = {
9866
        'TypeId': 'NodeId',
9867
        'RequestHeader': 'RequestHeader',
9868
        'Parameters': 'WriteParameters',
9869
               }
9870
9871 1
    def __init__(self, binary=None):
9872
        if binary is not None:
9873
            self._binary_init(binary)
9874
            self._freeze = True
9875
            return
9876
        self.TypeId = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary)
9877
        self.RequestHeader = RequestHeader()
9878
        self.Parameters = WriteParameters()
9879
        self._freeze = True
9880
9881 1
    def to_binary(self):
9882
        packet = []
9883
        packet.append(self.TypeId.to_binary())
9884
        packet.append(self.RequestHeader.to_binary())
9885
        packet.append(self.Parameters.to_binary())
9886
        return b''.join(packet)
9887
9888 1
    @staticmethod
9889
    def from_binary(data):
9890
        return WriteRequest(data)
9891
9892 1
    def _binary_init(self, data):
9893
        self.TypeId = NodeId.from_binary(data)
9894
        self.RequestHeader = RequestHeader.from_binary(data)
9895
        self.Parameters = WriteParameters.from_binary(data)
9896
9897 1
    def __str__(self):
9898
        return 'WriteRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9899
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
9900
               'Parameters:' + str(self.Parameters) + ')'
9901
9902 1
    __repr__ = __str__
9903
9904
9905 1 View Code Duplication
class WriteResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9906
    '''
9907
    :ivar TypeId:
9908
    :vartype TypeId: NodeId
9909
    :ivar ResponseHeader:
9910
    :vartype ResponseHeader: ResponseHeader
9911
    :ivar Results:
9912
    :vartype Results: StatusCode
9913
    :ivar DiagnosticInfos:
9914
    :vartype DiagnosticInfos: DiagnosticInfo
9915
    '''
9916
9917 1
    ua_types = {
9918
        'TypeId': 'NodeId',
9919
        'ResponseHeader': 'ResponseHeader',
9920
        'Results': 'StatusCode',
9921
        'DiagnosticInfos': 'DiagnosticInfo',
9922
               }
9923
9924 1
    def __init__(self, binary=None):
9925
        if binary is not None:
9926
            self._binary_init(binary)
9927
            self._freeze = True
9928
            return
9929
        self.TypeId = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary)
9930
        self.ResponseHeader = ResponseHeader()
9931
        self.Results = []
9932
        self.DiagnosticInfos = []
9933
        self._freeze = True
9934
9935 1
    def to_binary(self):
9936
        packet = []
9937
        packet.append(self.TypeId.to_binary())
9938
        packet.append(self.ResponseHeader.to_binary())
9939
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
9940
        for fieldname in self.Results:
9941
            packet.append(fieldname.to_binary())
9942
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9943
        for fieldname in self.DiagnosticInfos:
9944
            packet.append(fieldname.to_binary())
9945
        return b''.join(packet)
9946
9947 1
    @staticmethod
9948
    def from_binary(data):
9949
        return WriteResponse(data)
9950
9951 1
    def _binary_init(self, data):
9952
        self.TypeId = NodeId.from_binary(data)
9953
        self.ResponseHeader = ResponseHeader.from_binary(data)
9954
        length = uabin.Primitives.Int32.unpack(data)
9955
        array = []
9956
        if length != -1:
9957
            for _ in range(0, length):
9958
                array.append(StatusCode.from_binary(data))
9959
        self.Results = array
9960
        length = uabin.Primitives.Int32.unpack(data)
9961
        array = []
9962
        if length != -1:
9963
            for _ in range(0, length):
9964
                array.append(DiagnosticInfo.from_binary(data))
9965
        self.DiagnosticInfos = array
9966
9967 1
    def __str__(self):
9968
        return 'WriteResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9969
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9970
               'Results:' + str(self.Results) + ', ' + \
9971
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9972
9973 1
    __repr__ = __str__
9974
9975
9976 1 View Code Duplication
class HistoryUpdateDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9977
    '''
9978
    :ivar NodeId:
9979
    :vartype NodeId: NodeId
9980
    '''
9981
9982 1
    ua_types = {
9983
        'NodeId': 'NodeId',
9984
               }
9985
9986 1
    def __init__(self, binary=None):
9987
        if binary is not None:
9988
            self._binary_init(binary)
9989
            self._freeze = True
9990
            return
9991
        self.NodeId = NodeId()
9992
        self._freeze = True
9993
9994 1
    def to_binary(self):
9995
        packet = []
9996
        packet.append(self.NodeId.to_binary())
9997
        return b''.join(packet)
9998
9999 1
    @staticmethod
10000
    def from_binary(data):
10001
        return HistoryUpdateDetails(data)
10002
10003 1
    def _binary_init(self, data):
10004
        self.NodeId = NodeId.from_binary(data)
10005
10006 1
    def __str__(self):
10007
        return 'HistoryUpdateDetails(' + 'NodeId:' + str(self.NodeId) + ')'
10008
10009 1
    __repr__ = __str__
10010
10011
10012 1 View Code Duplication
class UpdateDataDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10013
    '''
10014
    :ivar NodeId:
10015
    :vartype NodeId: NodeId
10016
    :ivar PerformInsertReplace:
10017
    :vartype PerformInsertReplace: PerformUpdateType
10018
    :ivar UpdateValues:
10019
    :vartype UpdateValues: DataValue
10020
    '''
10021
10022 1
    ua_types = {
10023
        'NodeId': 'NodeId',
10024
        'PerformInsertReplace': 'PerformUpdateType',
10025
        'UpdateValues': 'DataValue',
10026
               }
10027
10028 1
    def __init__(self, binary=None):
10029
        if binary is not None:
10030
            self._binary_init(binary)
10031
            self._freeze = True
10032
            return
10033
        self.NodeId = NodeId()
10034
        self.PerformInsertReplace = PerformUpdateType(0)
10035
        self.UpdateValues = []
10036
        self._freeze = True
10037
10038 1
    def to_binary(self):
10039
        packet = []
10040
        packet.append(self.NodeId.to_binary())
10041
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
10042
        packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues)))
10043
        for fieldname in self.UpdateValues:
10044
            packet.append(fieldname.to_binary())
10045
        return b''.join(packet)
10046
10047 1
    @staticmethod
10048
    def from_binary(data):
10049
        return UpdateDataDetails(data)
10050
10051 1
    def _binary_init(self, data):
10052
        self.NodeId = NodeId.from_binary(data)
10053
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
10054
        length = uabin.Primitives.Int32.unpack(data)
10055
        array = []
10056
        if length != -1:
10057
            for _ in range(0, length):
10058
                array.append(DataValue.from_binary(data))
10059
        self.UpdateValues = array
10060
10061 1
    def __str__(self):
10062
        return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10063
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
10064
               'UpdateValues:' + str(self.UpdateValues) + ')'
10065
10066 1
    __repr__ = __str__
10067
10068
10069 1 View Code Duplication
class UpdateStructureDataDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10070
    '''
10071
    :ivar NodeId:
10072
    :vartype NodeId: NodeId
10073
    :ivar PerformInsertReplace:
10074
    :vartype PerformInsertReplace: PerformUpdateType
10075
    :ivar UpdateValues:
10076
    :vartype UpdateValues: DataValue
10077
    '''
10078
10079 1
    ua_types = {
10080
        'NodeId': 'NodeId',
10081
        'PerformInsertReplace': 'PerformUpdateType',
10082
        'UpdateValues': 'DataValue',
10083
               }
10084
10085 1
    def __init__(self, binary=None):
10086
        if binary is not None:
10087
            self._binary_init(binary)
10088
            self._freeze = True
10089
            return
10090
        self.NodeId = NodeId()
10091
        self.PerformInsertReplace = PerformUpdateType(0)
10092
        self.UpdateValues = []
10093
        self._freeze = True
10094
10095 1
    def to_binary(self):
10096
        packet = []
10097
        packet.append(self.NodeId.to_binary())
10098
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
10099
        packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues)))
10100
        for fieldname in self.UpdateValues:
10101
            packet.append(fieldname.to_binary())
10102
        return b''.join(packet)
10103
10104 1
    @staticmethod
10105
    def from_binary(data):
10106
        return UpdateStructureDataDetails(data)
10107
10108 1
    def _binary_init(self, data):
10109
        self.NodeId = NodeId.from_binary(data)
10110
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
10111
        length = uabin.Primitives.Int32.unpack(data)
10112
        array = []
10113
        if length != -1:
10114
            for _ in range(0, length):
10115
                array.append(DataValue.from_binary(data))
10116
        self.UpdateValues = array
10117
10118 1
    def __str__(self):
10119
        return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10120
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
10121
               'UpdateValues:' + str(self.UpdateValues) + ')'
10122
10123 1
    __repr__ = __str__
10124
10125
10126 1
class UpdateEventDetails(FrozenClass):
10127
    '''
10128
    :ivar NodeId:
10129
    :vartype NodeId: NodeId
10130
    :ivar PerformInsertReplace:
10131
    :vartype PerformInsertReplace: PerformUpdateType
10132
    :ivar Filter:
10133
    :vartype Filter: EventFilter
10134
    :ivar EventData:
10135
    :vartype EventData: HistoryEventFieldList
10136
    '''
10137
10138 1
    ua_types = {
10139
        'NodeId': 'NodeId',
10140
        'PerformInsertReplace': 'PerformUpdateType',
10141
        'Filter': 'EventFilter',
10142
        'EventData': 'HistoryEventFieldList',
10143
               }
10144
10145 1
    def __init__(self, binary=None):
10146
        if binary is not None:
10147
            self._binary_init(binary)
10148
            self._freeze = True
10149
            return
10150
        self.NodeId = NodeId()
10151
        self.PerformInsertReplace = PerformUpdateType(0)
10152
        self.Filter = EventFilter()
10153
        self.EventData = []
10154
        self._freeze = True
10155
10156 1
    def to_binary(self):
10157
        packet = []
10158
        packet.append(self.NodeId.to_binary())
10159
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
10160
        packet.append(self.Filter.to_binary())
10161
        packet.append(uabin.Primitives.Int32.pack(len(self.EventData)))
10162
        for fieldname in self.EventData:
10163
            packet.append(fieldname.to_binary())
10164
        return b''.join(packet)
10165
10166 1
    @staticmethod
10167
    def from_binary(data):
10168
        return UpdateEventDetails(data)
10169
10170 1
    def _binary_init(self, data):
10171
        self.NodeId = NodeId.from_binary(data)
10172
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
10173
        self.Filter = EventFilter.from_binary(data)
10174
        length = uabin.Primitives.Int32.unpack(data)
10175
        array = []
10176
        if length != -1:
10177
            for _ in range(0, length):
10178
                array.append(HistoryEventFieldList.from_binary(data))
10179
        self.EventData = array
10180
10181 1
    def __str__(self):
10182
        return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10183
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
10184
               'Filter:' + str(self.Filter) + ', ' + \
10185
               'EventData:' + str(self.EventData) + ')'
10186
10187 1
    __repr__ = __str__
10188
10189
10190 1
class DeleteRawModifiedDetails(FrozenClass):
10191
    '''
10192
    :ivar NodeId:
10193
    :vartype NodeId: NodeId
10194
    :ivar IsDeleteModified:
10195
    :vartype IsDeleteModified: Boolean
10196
    :ivar StartTime:
10197
    :vartype StartTime: DateTime
10198
    :ivar EndTime:
10199
    :vartype EndTime: DateTime
10200
    '''
10201
10202 1
    ua_types = {
10203
        'NodeId': 'NodeId',
10204
        'IsDeleteModified': 'Boolean',
10205
        'StartTime': 'DateTime',
10206
        'EndTime': 'DateTime',
10207
               }
10208
10209 1
    def __init__(self, binary=None):
10210
        if binary is not None:
10211
            self._binary_init(binary)
10212
            self._freeze = True
10213
            return
10214
        self.NodeId = NodeId()
10215
        self.IsDeleteModified = True
10216
        self.StartTime = datetime.utcnow()
10217
        self.EndTime = datetime.utcnow()
10218
        self._freeze = True
10219
10220 1
    def to_binary(self):
10221
        packet = []
10222
        packet.append(self.NodeId.to_binary())
10223
        packet.append(uabin.Primitives.Boolean.pack(self.IsDeleteModified))
10224
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
10225
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
10226
        return b''.join(packet)
10227
10228 1
    @staticmethod
10229
    def from_binary(data):
10230
        return DeleteRawModifiedDetails(data)
10231
10232 1
    def _binary_init(self, data):
10233
        self.NodeId = NodeId.from_binary(data)
10234
        self.IsDeleteModified = uabin.Primitives.Boolean.unpack(data)
10235
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
10236
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
10237
10238 1
    def __str__(self):
10239
        return 'DeleteRawModifiedDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10240
               'IsDeleteModified:' + str(self.IsDeleteModified) + ', ' + \
10241
               'StartTime:' + str(self.StartTime) + ', ' + \
10242
               'EndTime:' + str(self.EndTime) + ')'
10243
10244 1
    __repr__ = __str__
10245
10246
10247 1
class DeleteAtTimeDetails(FrozenClass):
10248
    '''
10249
    :ivar NodeId:
10250
    :vartype NodeId: NodeId
10251
    :ivar ReqTimes:
10252
    :vartype ReqTimes: DateTime
10253
    '''
10254
10255 1
    ua_types = {
10256
        'NodeId': 'NodeId',
10257
        'ReqTimes': 'DateTime',
10258
               }
10259
10260 1
    def __init__(self, binary=None):
10261
        if binary is not None:
10262
            self._binary_init(binary)
10263
            self._freeze = True
10264
            return
10265
        self.NodeId = NodeId()
10266
        self.ReqTimes = []
10267
        self._freeze = True
10268
10269 1
    def to_binary(self):
10270
        packet = []
10271
        packet.append(self.NodeId.to_binary())
10272
        packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes)))
10273
        for fieldname in self.ReqTimes:
10274
            packet.append(uabin.Primitives.DateTime.pack(fieldname))
10275
        return b''.join(packet)
10276
10277 1
    @staticmethod
10278
    def from_binary(data):
10279
        return DeleteAtTimeDetails(data)
10280
10281 1
    def _binary_init(self, data):
10282
        self.NodeId = NodeId.from_binary(data)
10283
        self.ReqTimes = uabin.Primitives.DateTime.unpack_array(data)
10284
10285 1
    def __str__(self):
10286
        return 'DeleteAtTimeDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10287
               'ReqTimes:' + str(self.ReqTimes) + ')'
10288
10289 1
    __repr__ = __str__
10290
10291
10292 1 View Code Duplication
class DeleteEventDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10293
    '''
10294
    :ivar NodeId:
10295
    :vartype NodeId: NodeId
10296
    :ivar EventIds:
10297
    :vartype EventIds: ByteString
10298
    '''
10299
10300 1
    ua_types = {
10301
        'NodeId': 'NodeId',
10302
        'EventIds': 'ByteString',
10303
               }
10304
10305 1
    def __init__(self, binary=None):
10306
        if binary is not None:
10307
            self._binary_init(binary)
10308
            self._freeze = True
10309
            return
10310
        self.NodeId = NodeId()
10311
        self.EventIds = []
10312
        self._freeze = True
10313
10314 1
    def to_binary(self):
10315
        packet = []
10316
        packet.append(self.NodeId.to_binary())
10317
        packet.append(uabin.Primitives.Int32.pack(len(self.EventIds)))
10318
        for fieldname in self.EventIds:
10319
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
10320
        return b''.join(packet)
10321
10322 1
    @staticmethod
10323
    def from_binary(data):
10324
        return DeleteEventDetails(data)
10325
10326 1
    def _binary_init(self, data):
10327
        self.NodeId = NodeId.from_binary(data)
10328
        self.EventIds = uabin.Primitives.ByteString.unpack_array(data)
10329
10330 1
    def __str__(self):
10331
        return 'DeleteEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10332
               'EventIds:' + str(self.EventIds) + ')'
10333
10334 1
    __repr__ = __str__
10335
10336
10337 1 View Code Duplication
class HistoryUpdateResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10338
    '''
10339
    :ivar StatusCode:
10340
    :vartype StatusCode: StatusCode
10341
    :ivar OperationResults:
10342
    :vartype OperationResults: StatusCode
10343
    :ivar DiagnosticInfos:
10344
    :vartype DiagnosticInfos: DiagnosticInfo
10345
    '''
10346
10347 1
    ua_types = {
10348
        'StatusCode': 'StatusCode',
10349
        'OperationResults': 'StatusCode',
10350
        'DiagnosticInfos': 'DiagnosticInfo',
10351
               }
10352
10353 1
    def __init__(self, binary=None):
10354
        if binary is not None:
10355
            self._binary_init(binary)
10356
            self._freeze = True
10357
            return
10358
        self.StatusCode = StatusCode()
10359
        self.OperationResults = []
10360
        self.DiagnosticInfos = []
10361
        self._freeze = True
10362
10363 1
    def to_binary(self):
10364
        packet = []
10365
        packet.append(self.StatusCode.to_binary())
10366
        packet.append(uabin.Primitives.Int32.pack(len(self.OperationResults)))
10367
        for fieldname in self.OperationResults:
10368
            packet.append(fieldname.to_binary())
10369
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
10370
        for fieldname in self.DiagnosticInfos:
10371
            packet.append(fieldname.to_binary())
10372
        return b''.join(packet)
10373
10374 1
    @staticmethod
10375
    def from_binary(data):
10376
        return HistoryUpdateResult(data)
10377
10378 1
    def _binary_init(self, data):
10379
        self.StatusCode = StatusCode.from_binary(data)
10380
        length = uabin.Primitives.Int32.unpack(data)
10381
        array = []
10382
        if length != -1:
10383
            for _ in range(0, length):
10384
                array.append(StatusCode.from_binary(data))
10385
        self.OperationResults = array
10386
        length = uabin.Primitives.Int32.unpack(data)
10387
        array = []
10388
        if length != -1:
10389
            for _ in range(0, length):
10390
                array.append(DiagnosticInfo.from_binary(data))
10391
        self.DiagnosticInfos = array
10392
10393 1
    def __str__(self):
10394
        return 'HistoryUpdateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
10395
               'OperationResults:' + str(self.OperationResults) + ', ' + \
10396
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10397
10398 1
    __repr__ = __str__
10399
10400
10401 1 View Code Duplication
class HistoryUpdateParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10402
    '''
10403
    :ivar HistoryUpdateDetails:
10404
    :vartype HistoryUpdateDetails: ExtensionObject
10405
    '''
10406
10407 1
    ua_types = {
10408
        'HistoryUpdateDetails': 'ExtensionObject',
10409
               }
10410
10411 1
    def __init__(self, binary=None):
10412
        if binary is not None:
10413
            self._binary_init(binary)
10414
            self._freeze = True
10415
            return
10416
        self.HistoryUpdateDetails = []
10417
        self._freeze = True
10418
10419 1
    def to_binary(self):
10420
        packet = []
10421
        packet.append(uabin.Primitives.Int32.pack(len(self.HistoryUpdateDetails)))
10422
        for fieldname in self.HistoryUpdateDetails:
10423
            packet.append(extensionobject_to_binary(fieldname))
10424
        return b''.join(packet)
10425
10426 1
    @staticmethod
10427
    def from_binary(data):
10428
        return HistoryUpdateParameters(data)
10429
10430 1
    def _binary_init(self, data):
10431
        length = uabin.Primitives.Int32.unpack(data)
10432
        array = []
10433
        if length != -1:
10434
            for _ in range(0, length):
10435
                array.append(extensionobject_from_binary(data))
10436
        self.HistoryUpdateDetails = array
10437
10438 1
    def __str__(self):
10439
        return 'HistoryUpdateParameters(' + 'HistoryUpdateDetails:' + str(self.HistoryUpdateDetails) + ')'
10440
10441 1
    __repr__ = __str__
10442
10443
10444 1
class HistoryUpdateRequest(FrozenClass):
10445
    '''
10446
    :ivar TypeId:
10447
    :vartype TypeId: NodeId
10448
    :ivar RequestHeader:
10449
    :vartype RequestHeader: RequestHeader
10450
    :ivar Parameters:
10451
    :vartype Parameters: HistoryUpdateParameters
10452
    '''
10453
10454 1
    ua_types = {
10455
        'TypeId': 'NodeId',
10456
        'RequestHeader': 'RequestHeader',
10457
        'Parameters': 'HistoryUpdateParameters',
10458
               }
10459
10460 1
    def __init__(self, binary=None):
10461
        if binary is not None:
10462
            self._binary_init(binary)
10463
            self._freeze = True
10464
            return
10465
        self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary)
10466
        self.RequestHeader = RequestHeader()
10467
        self.Parameters = HistoryUpdateParameters()
10468
        self._freeze = True
10469
10470 1
    def to_binary(self):
10471
        packet = []
10472
        packet.append(self.TypeId.to_binary())
10473
        packet.append(self.RequestHeader.to_binary())
10474
        packet.append(self.Parameters.to_binary())
10475
        return b''.join(packet)
10476
10477 1
    @staticmethod
10478
    def from_binary(data):
10479
        return HistoryUpdateRequest(data)
10480
10481 1
    def _binary_init(self, data):
10482
        self.TypeId = NodeId.from_binary(data)
10483
        self.RequestHeader = RequestHeader.from_binary(data)
10484
        self.Parameters = HistoryUpdateParameters.from_binary(data)
10485
10486 1
    def __str__(self):
10487
        return 'HistoryUpdateRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10488
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
10489
               'Parameters:' + str(self.Parameters) + ')'
10490
10491 1
    __repr__ = __str__
10492
10493
10494 1 View Code Duplication
class HistoryUpdateResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10495
    '''
10496
    :ivar TypeId:
10497
    :vartype TypeId: NodeId
10498
    :ivar ResponseHeader:
10499
    :vartype ResponseHeader: ResponseHeader
10500
    :ivar Results:
10501
    :vartype Results: HistoryUpdateResult
10502
    :ivar DiagnosticInfos:
10503
    :vartype DiagnosticInfos: DiagnosticInfo
10504
    '''
10505
10506 1
    ua_types = {
10507
        'TypeId': 'NodeId',
10508
        'ResponseHeader': 'ResponseHeader',
10509
        'Results': 'HistoryUpdateResult',
10510
        'DiagnosticInfos': 'DiagnosticInfo',
10511
               }
10512
10513 1
    def __init__(self, binary=None):
10514
        if binary is not None:
10515
            self._binary_init(binary)
10516
            self._freeze = True
10517
            return
10518
        self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary)
10519
        self.ResponseHeader = ResponseHeader()
10520
        self.Results = []
10521
        self.DiagnosticInfos = []
10522
        self._freeze = True
10523
10524 1
    def to_binary(self):
10525
        packet = []
10526
        packet.append(self.TypeId.to_binary())
10527
        packet.append(self.ResponseHeader.to_binary())
10528
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
10529
        for fieldname in self.Results:
10530
            packet.append(fieldname.to_binary())
10531
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
10532
        for fieldname in self.DiagnosticInfos:
10533
            packet.append(fieldname.to_binary())
10534
        return b''.join(packet)
10535
10536 1
    @staticmethod
10537
    def from_binary(data):
10538
        return HistoryUpdateResponse(data)
10539
10540 1
    def _binary_init(self, data):
10541
        self.TypeId = NodeId.from_binary(data)
10542
        self.ResponseHeader = ResponseHeader.from_binary(data)
10543
        length = uabin.Primitives.Int32.unpack(data)
10544
        array = []
10545
        if length != -1:
10546
            for _ in range(0, length):
10547
                array.append(HistoryUpdateResult.from_binary(data))
10548
        self.Results = array
10549
        length = uabin.Primitives.Int32.unpack(data)
10550
        array = []
10551
        if length != -1:
10552
            for _ in range(0, length):
10553
                array.append(DiagnosticInfo.from_binary(data))
10554
        self.DiagnosticInfos = array
10555
10556 1
    def __str__(self):
10557
        return 'HistoryUpdateResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10558
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10559
               'Results:' + str(self.Results) + ', ' + \
10560
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10561
10562 1
    __repr__ = __str__
10563
10564
10565 1
class CallMethodRequest(FrozenClass):
10566
    '''
10567
    :ivar ObjectId:
10568
    :vartype ObjectId: NodeId
10569
    :ivar MethodId:
10570
    :vartype MethodId: NodeId
10571
    :ivar InputArguments:
10572
    :vartype InputArguments: Variant
10573
    '''
10574
10575 1
    ua_types = {
10576
        'ObjectId': 'NodeId',
10577
        'MethodId': 'NodeId',
10578
        'InputArguments': 'Variant',
10579
               }
10580
10581 1
    def __init__(self, binary=None):
10582
        if binary is not None:
10583
            self._binary_init(binary)
10584
            self._freeze = True
10585
            return
10586
        self.ObjectId = NodeId()
10587
        self.MethodId = NodeId()
10588
        self.InputArguments = []
10589
        self._freeze = True
10590
10591 1
    def to_binary(self):
10592
        packet = []
10593
        packet.append(self.ObjectId.to_binary())
10594
        packet.append(self.MethodId.to_binary())
10595
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArguments)))
10596
        for fieldname in self.InputArguments:
10597
            packet.append(fieldname.to_binary())
10598
        return b''.join(packet)
10599
10600 1
    @staticmethod
10601
    def from_binary(data):
10602
        return CallMethodRequest(data)
10603
10604 1
    def _binary_init(self, data):
10605
        self.ObjectId = NodeId.from_binary(data)
10606
        self.MethodId = NodeId.from_binary(data)
10607
        length = uabin.Primitives.Int32.unpack(data)
10608
        array = []
10609
        if length != -1:
10610
            for _ in range(0, length):
10611
                array.append(Variant.from_binary(data))
10612
        self.InputArguments = array
10613
10614 1
    def __str__(self):
10615
        return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \
10616
               'MethodId:' + str(self.MethodId) + ', ' + \
10617
               'InputArguments:' + str(self.InputArguments) + ')'
10618
10619 1
    __repr__ = __str__
10620
10621
10622 1
class CallMethodResult(FrozenClass):
10623
    '''
10624
    :ivar StatusCode:
10625
    :vartype StatusCode: StatusCode
10626
    :ivar InputArgumentResults:
10627
    :vartype InputArgumentResults: StatusCode
10628
    :ivar InputArgumentDiagnosticInfos:
10629
    :vartype InputArgumentDiagnosticInfos: DiagnosticInfo
10630
    :ivar OutputArguments:
10631
    :vartype OutputArguments: Variant
10632
    '''
10633
10634 1
    ua_types = {
10635
        'StatusCode': 'StatusCode',
10636
        'InputArgumentResults': 'StatusCode',
10637
        'InputArgumentDiagnosticInfos': 'DiagnosticInfo',
10638
        'OutputArguments': 'Variant',
10639
               }
10640
10641 1
    def __init__(self, binary=None):
10642
        if binary is not None:
10643
            self._binary_init(binary)
10644
            self._freeze = True
10645
            return
10646
        self.StatusCode = StatusCode()
10647
        self.InputArgumentResults = []
10648
        self.InputArgumentDiagnosticInfos = []
10649
        self.OutputArguments = []
10650
        self._freeze = True
10651
10652 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10653
        packet = []
10654
        packet.append(self.StatusCode.to_binary())
10655
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentResults)))
10656
        for fieldname in self.InputArgumentResults:
10657
            packet.append(fieldname.to_binary())
10658
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentDiagnosticInfos)))
10659
        for fieldname in self.InputArgumentDiagnosticInfos:
10660
            packet.append(fieldname.to_binary())
10661
        packet.append(uabin.Primitives.Int32.pack(len(self.OutputArguments)))
10662
        for fieldname in self.OutputArguments:
10663
            packet.append(fieldname.to_binary())
10664
        return b''.join(packet)
10665
10666 1
    @staticmethod
10667
    def from_binary(data):
10668
        return CallMethodResult(data)
10669
10670 1
    def _binary_init(self, data):
10671
        self.StatusCode = StatusCode.from_binary(data)
10672
        length = uabin.Primitives.Int32.unpack(data)
10673
        array = []
10674
        if length != -1:
10675
            for _ in range(0, length):
10676
                array.append(StatusCode.from_binary(data))
10677
        self.InputArgumentResults = array
10678
        length = uabin.Primitives.Int32.unpack(data)
10679
        array = []
10680
        if length != -1:
10681
            for _ in range(0, length):
10682
                array.append(DiagnosticInfo.from_binary(data))
10683
        self.InputArgumentDiagnosticInfos = array
10684
        length = uabin.Primitives.Int32.unpack(data)
10685
        array = []
10686
        if length != -1:
10687
            for _ in range(0, length):
10688
                array.append(Variant.from_binary(data))
10689
        self.OutputArguments = array
10690
10691 1
    def __str__(self):
10692
        return 'CallMethodResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
10693
               'InputArgumentResults:' + str(self.InputArgumentResults) + ', ' + \
10694
               'InputArgumentDiagnosticInfos:' + str(self.InputArgumentDiagnosticInfos) + ', ' + \
10695
               'OutputArguments:' + str(self.OutputArguments) + ')'
10696
10697 1
    __repr__ = __str__
10698
10699
10700 1 View Code Duplication
class CallParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10701
    '''
10702
    :ivar MethodsToCall:
10703
    :vartype MethodsToCall: CallMethodRequest
10704
    '''
10705
10706 1
    ua_types = {
10707
        'MethodsToCall': 'CallMethodRequest',
10708
               }
10709
10710 1
    def __init__(self, binary=None):
10711
        if binary is not None:
10712
            self._binary_init(binary)
10713
            self._freeze = True
10714
            return
10715
        self.MethodsToCall = []
10716
        self._freeze = True
10717
10718 1
    def to_binary(self):
10719
        packet = []
10720
        packet.append(uabin.Primitives.Int32.pack(len(self.MethodsToCall)))
10721
        for fieldname in self.MethodsToCall:
10722
            packet.append(fieldname.to_binary())
10723
        return b''.join(packet)
10724
10725 1
    @staticmethod
10726
    def from_binary(data):
10727
        return CallParameters(data)
10728
10729 1
    def _binary_init(self, data):
10730
        length = uabin.Primitives.Int32.unpack(data)
10731
        array = []
10732
        if length != -1:
10733
            for _ in range(0, length):
10734
                array.append(CallMethodRequest.from_binary(data))
10735
        self.MethodsToCall = array
10736
10737 1
    def __str__(self):
10738
        return 'CallParameters(' + 'MethodsToCall:' + str(self.MethodsToCall) + ')'
10739
10740 1
    __repr__ = __str__
10741
10742
10743 1
class CallRequest(FrozenClass):
10744
    '''
10745
    :ivar TypeId:
10746
    :vartype TypeId: NodeId
10747
    :ivar RequestHeader:
10748
    :vartype RequestHeader: RequestHeader
10749
    :ivar Parameters:
10750
    :vartype Parameters: CallParameters
10751
    '''
10752
10753 1
    ua_types = {
10754
        'TypeId': 'NodeId',
10755
        'RequestHeader': 'RequestHeader',
10756
        'Parameters': 'CallParameters',
10757
               }
10758
10759 1
    def __init__(self, binary=None):
10760
        if binary is not None:
10761
            self._binary_init(binary)
10762
            self._freeze = True
10763
            return
10764
        self.TypeId = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary)
10765
        self.RequestHeader = RequestHeader()
10766
        self.Parameters = CallParameters()
10767
        self._freeze = True
10768
10769 1
    def to_binary(self):
10770
        packet = []
10771
        packet.append(self.TypeId.to_binary())
10772
        packet.append(self.RequestHeader.to_binary())
10773
        packet.append(self.Parameters.to_binary())
10774
        return b''.join(packet)
10775
10776 1
    @staticmethod
10777
    def from_binary(data):
10778
        return CallRequest(data)
10779
10780 1
    def _binary_init(self, data):
10781
        self.TypeId = NodeId.from_binary(data)
10782
        self.RequestHeader = RequestHeader.from_binary(data)
10783
        self.Parameters = CallParameters.from_binary(data)
10784
10785 1
    def __str__(self):
10786
        return 'CallRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10787
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
10788
               'Parameters:' + str(self.Parameters) + ')'
10789
10790 1
    __repr__ = __str__
10791
10792
10793 1 View Code Duplication
class CallResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10794
    '''
10795
    :ivar TypeId:
10796
    :vartype TypeId: NodeId
10797
    :ivar ResponseHeader:
10798
    :vartype ResponseHeader: ResponseHeader
10799
    :ivar Results:
10800
    :vartype Results: CallMethodResult
10801
    :ivar DiagnosticInfos:
10802
    :vartype DiagnosticInfos: DiagnosticInfo
10803
    '''
10804
10805 1
    ua_types = {
10806
        'TypeId': 'NodeId',
10807
        'ResponseHeader': 'ResponseHeader',
10808
        'Results': 'CallMethodResult',
10809
        'DiagnosticInfos': 'DiagnosticInfo',
10810
               }
10811
10812 1
    def __init__(self, binary=None):
10813
        if binary is not None:
10814
            self._binary_init(binary)
10815
            self._freeze = True
10816
            return
10817
        self.TypeId = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary)
10818
        self.ResponseHeader = ResponseHeader()
10819
        self.Results = []
10820
        self.DiagnosticInfos = []
10821
        self._freeze = True
10822
10823 1
    def to_binary(self):
10824
        packet = []
10825
        packet.append(self.TypeId.to_binary())
10826
        packet.append(self.ResponseHeader.to_binary())
10827
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
10828
        for fieldname in self.Results:
10829
            packet.append(fieldname.to_binary())
10830
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
10831
        for fieldname in self.DiagnosticInfos:
10832
            packet.append(fieldname.to_binary())
10833
        return b''.join(packet)
10834
10835 1
    @staticmethod
10836
    def from_binary(data):
10837
        return CallResponse(data)
10838
10839 1
    def _binary_init(self, data):
10840
        self.TypeId = NodeId.from_binary(data)
10841
        self.ResponseHeader = ResponseHeader.from_binary(data)
10842
        length = uabin.Primitives.Int32.unpack(data)
10843
        array = []
10844
        if length != -1:
10845
            for _ in range(0, length):
10846
                array.append(CallMethodResult.from_binary(data))
10847
        self.Results = array
10848
        length = uabin.Primitives.Int32.unpack(data)
10849
        array = []
10850
        if length != -1:
10851
            for _ in range(0, length):
10852
                array.append(DiagnosticInfo.from_binary(data))
10853
        self.DiagnosticInfos = array
10854
10855 1
    def __str__(self):
10856
        return 'CallResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10857
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10858
               'Results:' + str(self.Results) + ', ' + \
10859
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10860
10861 1
    __repr__ = __str__
10862
10863
10864 1 View Code Duplication
class MonitoringFilter(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10865
    '''
10866
    '''
10867
10868 1
    ua_types = {
10869
               }
10870
10871 1
    def __init__(self, binary=None):
10872
        if binary is not None:
10873
            self._binary_init(binary)
10874
            self._freeze = True
10875
            return
10876
        self._freeze = True
10877
10878 1
    def to_binary(self):
10879
        packet = []
10880
        return b''.join(packet)
10881
10882 1
    @staticmethod
10883
    def from_binary(data):
10884
        return MonitoringFilter(data)
10885
10886 1
    def _binary_init(self, data):
10887
        pass
10888
10889 1
    def __str__(self):
10890
        return 'MonitoringFilter(' +  + ')'
10891
10892 1
    __repr__ = __str__
10893
10894
10895 1
class DataChangeFilter(FrozenClass):
10896
    '''
10897
    :ivar Trigger:
10898
    :vartype Trigger: DataChangeTrigger
10899
    :ivar DeadbandType:
10900
    :vartype DeadbandType: UInt32
10901
    :ivar DeadbandValue:
10902
    :vartype DeadbandValue: Double
10903
    '''
10904
10905 1
    ua_types = {
10906
        'Trigger': 'DataChangeTrigger',
10907
        'DeadbandType': 'UInt32',
10908
        'DeadbandValue': 'Double',
10909
               }
10910
10911 1
    def __init__(self, binary=None):
10912
        if binary is not None:
10913
            self._binary_init(binary)
10914
            self._freeze = True
10915
            return
10916
        self.Trigger = DataChangeTrigger(0)
10917
        self.DeadbandType = 0
10918
        self.DeadbandValue = 0
10919
        self._freeze = True
10920
10921 1
    def to_binary(self):
10922
        packet = []
10923
        packet.append(uabin.Primitives.UInt32.pack(self.Trigger.value))
10924
        packet.append(uabin.Primitives.UInt32.pack(self.DeadbandType))
10925
        packet.append(uabin.Primitives.Double.pack(self.DeadbandValue))
10926
        return b''.join(packet)
10927
10928 1
    @staticmethod
10929
    def from_binary(data):
10930
        return DataChangeFilter(data)
10931
10932 1
    def _binary_init(self, data):
10933
        self.Trigger = DataChangeTrigger(uabin.Primitives.UInt32.unpack(data))
10934
        self.DeadbandType = uabin.Primitives.UInt32.unpack(data)
10935
        self.DeadbandValue = uabin.Primitives.Double.unpack(data)
10936
10937 1
    def __str__(self):
10938
        return 'DataChangeFilter(' + 'Trigger:' + str(self.Trigger) + ', ' + \
10939
               'DeadbandType:' + str(self.DeadbandType) + ', ' + \
10940
               'DeadbandValue:' + str(self.DeadbandValue) + ')'
10941
10942 1
    __repr__ = __str__
10943
10944
10945 1 View Code Duplication
class EventFilter(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10946
    '''
10947
    :ivar SelectClauses:
10948
    :vartype SelectClauses: SimpleAttributeOperand
10949
    :ivar WhereClause:
10950
    :vartype WhereClause: ContentFilter
10951
    '''
10952
10953 1
    ua_types = {
10954
        'SelectClauses': 'SimpleAttributeOperand',
10955
        'WhereClause': 'ContentFilter',
10956
               }
10957
10958 1
    def __init__(self, binary=None):
10959
        if binary is not None:
10960
            self._binary_init(binary)
10961
            self._freeze = True
10962
            return
10963
        self.SelectClauses = []
10964
        self.WhereClause = ContentFilter()
10965
        self._freeze = True
10966
10967 1
    def to_binary(self):
10968
        packet = []
10969
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauses)))
10970
        for fieldname in self.SelectClauses:
10971
            packet.append(fieldname.to_binary())
10972
        packet.append(self.WhereClause.to_binary())
10973
        return b''.join(packet)
10974
10975 1
    @staticmethod
10976
    def from_binary(data):
10977
        return EventFilter(data)
10978
10979 1
    def _binary_init(self, data):
10980
        length = uabin.Primitives.Int32.unpack(data)
10981
        array = []
10982
        if length != -1:
10983
            for _ in range(0, length):
10984
                array.append(SimpleAttributeOperand.from_binary(data))
10985
        self.SelectClauses = array
10986
        self.WhereClause = ContentFilter.from_binary(data)
10987
10988 1
    def __str__(self):
10989
        return 'EventFilter(' + 'SelectClauses:' + str(self.SelectClauses) + ', ' + \
10990
               'WhereClause:' + str(self.WhereClause) + ')'
10991
10992 1
    __repr__ = __str__
10993
10994
10995 1 View Code Duplication
class AggregateConfiguration(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10996
    '''
10997
    :ivar UseServerCapabilitiesDefaults:
10998
    :vartype UseServerCapabilitiesDefaults: Boolean
10999
    :ivar TreatUncertainAsBad:
11000
    :vartype TreatUncertainAsBad: Boolean
11001
    :ivar PercentDataBad:
11002
    :vartype PercentDataBad: Byte
11003
    :ivar PercentDataGood:
11004
    :vartype PercentDataGood: Byte
11005
    :ivar UseSlopedExtrapolation:
11006
    :vartype UseSlopedExtrapolation: Boolean
11007
    '''
11008
11009 1
    ua_types = {
11010
        'UseServerCapabilitiesDefaults': 'Boolean',
11011
        'TreatUncertainAsBad': 'Boolean',
11012
        'PercentDataBad': 'Byte',
11013
        'PercentDataGood': 'Byte',
11014
        'UseSlopedExtrapolation': 'Boolean',
11015
               }
11016
11017 1
    def __init__(self, binary=None):
11018
        if binary is not None:
11019
            self._binary_init(binary)
11020
            self._freeze = True
11021
            return
11022
        self.UseServerCapabilitiesDefaults = True
11023
        self.TreatUncertainAsBad = True
11024
        self.PercentDataBad = 0
11025
        self.PercentDataGood = 0
11026
        self.UseSlopedExtrapolation = True
11027
        self._freeze = True
11028
11029 1
    def to_binary(self):
11030
        packet = []
11031
        packet.append(uabin.Primitives.Boolean.pack(self.UseServerCapabilitiesDefaults))
11032
        packet.append(uabin.Primitives.Boolean.pack(self.TreatUncertainAsBad))
11033
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataBad))
11034
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataGood))
11035
        packet.append(uabin.Primitives.Boolean.pack(self.UseSlopedExtrapolation))
11036
        return b''.join(packet)
11037
11038 1
    @staticmethod
11039
    def from_binary(data):
11040
        return AggregateConfiguration(data)
11041
11042 1
    def _binary_init(self, data):
11043
        self.UseServerCapabilitiesDefaults = uabin.Primitives.Boolean.unpack(data)
11044
        self.TreatUncertainAsBad = uabin.Primitives.Boolean.unpack(data)
11045
        self.PercentDataBad = uabin.Primitives.Byte.unpack(data)
11046
        self.PercentDataGood = uabin.Primitives.Byte.unpack(data)
11047
        self.UseSlopedExtrapolation = uabin.Primitives.Boolean.unpack(data)
11048
11049 1
    def __str__(self):
11050
        return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \
11051
               'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \
11052
               'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \
11053
               'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \
11054
               'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')'
11055
11056 1
    __repr__ = __str__
11057
11058
11059 1
class AggregateFilter(FrozenClass):
11060
    '''
11061
    :ivar StartTime:
11062
    :vartype StartTime: DateTime
11063
    :ivar AggregateType:
11064
    :vartype AggregateType: NodeId
11065
    :ivar ProcessingInterval:
11066
    :vartype ProcessingInterval: Double
11067
    :ivar AggregateConfiguration:
11068
    :vartype AggregateConfiguration: AggregateConfiguration
11069
    '''
11070
11071 1
    ua_types = {
11072
        'StartTime': 'DateTime',
11073
        'AggregateType': 'NodeId',
11074
        'ProcessingInterval': 'Double',
11075
        'AggregateConfiguration': 'AggregateConfiguration',
11076
               }
11077
11078 1
    def __init__(self, binary=None):
11079
        if binary is not None:
11080
            self._binary_init(binary)
11081
            self._freeze = True
11082
            return
11083
        self.StartTime = datetime.utcnow()
11084
        self.AggregateType = NodeId()
11085
        self.ProcessingInterval = 0
11086
        self.AggregateConfiguration = AggregateConfiguration()
11087
        self._freeze = True
11088
11089 1
    def to_binary(self):
11090
        packet = []
11091
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
11092
        packet.append(self.AggregateType.to_binary())
11093
        packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval))
11094
        packet.append(self.AggregateConfiguration.to_binary())
11095
        return b''.join(packet)
11096
11097 1
    @staticmethod
11098
    def from_binary(data):
11099
        return AggregateFilter(data)
11100
11101 1
    def _binary_init(self, data):
11102
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
11103
        self.AggregateType = NodeId.from_binary(data)
11104
        self.ProcessingInterval = uabin.Primitives.Double.unpack(data)
11105
        self.AggregateConfiguration = AggregateConfiguration.from_binary(data)
11106
11107 1
    def __str__(self):
11108
        return 'AggregateFilter(' + 'StartTime:' + str(self.StartTime) + ', ' + \
11109
               'AggregateType:' + str(self.AggregateType) + ', ' + \
11110
               'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \
11111
               'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')'
11112
11113 1
    __repr__ = __str__
11114
11115
11116 1 View Code Duplication
class MonitoringFilterResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11117
    '''
11118
    '''
11119
11120 1
    ua_types = {
11121
               }
11122
11123 1
    def __init__(self, binary=None):
11124
        if binary is not None:
11125
            self._binary_init(binary)
11126
            self._freeze = True
11127
            return
11128
        self._freeze = True
11129
11130 1
    def to_binary(self):
11131
        packet = []
11132
        return b''.join(packet)
11133
11134 1
    @staticmethod
11135
    def from_binary(data):
11136
        return MonitoringFilterResult(data)
11137
11138 1
    def _binary_init(self, data):
11139
        pass
11140
11141 1
    def __str__(self):
11142
        return 'MonitoringFilterResult(' +  + ')'
11143
11144 1
    __repr__ = __str__
11145
11146
11147 1 View Code Duplication
class EventFilterResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11148
    '''
11149
    :ivar SelectClauseResults:
11150
    :vartype SelectClauseResults: StatusCode
11151
    :ivar SelectClauseDiagnosticInfos:
11152
    :vartype SelectClauseDiagnosticInfos: DiagnosticInfo
11153
    :ivar WhereClauseResult:
11154
    :vartype WhereClauseResult: ContentFilterResult
11155
    '''
11156
11157 1
    ua_types = {
11158
        'SelectClauseResults': 'StatusCode',
11159
        'SelectClauseDiagnosticInfos': 'DiagnosticInfo',
11160
        'WhereClauseResult': 'ContentFilterResult',
11161
               }
11162
11163 1
    def __init__(self, binary=None):
11164
        if binary is not None:
11165
            self._binary_init(binary)
11166
            self._freeze = True
11167
            return
11168
        self.SelectClauseResults = []
11169
        self.SelectClauseDiagnosticInfos = []
11170
        self.WhereClauseResult = ContentFilterResult()
11171
        self._freeze = True
11172
11173 1
    def to_binary(self):
11174
        packet = []
11175
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseResults)))
11176
        for fieldname in self.SelectClauseResults:
11177
            packet.append(fieldname.to_binary())
11178
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseDiagnosticInfos)))
11179
        for fieldname in self.SelectClauseDiagnosticInfos:
11180
            packet.append(fieldname.to_binary())
11181
        packet.append(self.WhereClauseResult.to_binary())
11182
        return b''.join(packet)
11183
11184 1
    @staticmethod
11185
    def from_binary(data):
11186
        return EventFilterResult(data)
11187
11188 1
    def _binary_init(self, data):
11189
        length = uabin.Primitives.Int32.unpack(data)
11190
        array = []
11191
        if length != -1:
11192
            for _ in range(0, length):
11193
                array.append(StatusCode.from_binary(data))
11194
        self.SelectClauseResults = array
11195
        length = uabin.Primitives.Int32.unpack(data)
11196
        array = []
11197
        if length != -1:
11198
            for _ in range(0, length):
11199
                array.append(DiagnosticInfo.from_binary(data))
11200
        self.SelectClauseDiagnosticInfos = array
11201
        self.WhereClauseResult = ContentFilterResult.from_binary(data)
11202
11203 1
    def __str__(self):
11204
        return 'EventFilterResult(' + 'SelectClauseResults:' + str(self.SelectClauseResults) + ', ' + \
11205
               'SelectClauseDiagnosticInfos:' + str(self.SelectClauseDiagnosticInfos) + ', ' + \
11206
               'WhereClauseResult:' + str(self.WhereClauseResult) + ')'
11207
11208 1
    __repr__ = __str__
11209
11210
11211 1
class AggregateFilterResult(FrozenClass):
11212
    '''
11213
    :ivar RevisedStartTime:
11214
    :vartype RevisedStartTime: DateTime
11215
    :ivar RevisedProcessingInterval:
11216
    :vartype RevisedProcessingInterval: Double
11217
    :ivar RevisedAggregateConfiguration:
11218
    :vartype RevisedAggregateConfiguration: AggregateConfiguration
11219
    '''
11220
11221 1
    ua_types = {
11222
        'RevisedStartTime': 'DateTime',
11223
        'RevisedProcessingInterval': 'Double',
11224
        'RevisedAggregateConfiguration': 'AggregateConfiguration',
11225
               }
11226
11227 1
    def __init__(self, binary=None):
11228
        if binary is not None:
11229
            self._binary_init(binary)
11230
            self._freeze = True
11231
            return
11232
        self.RevisedStartTime = datetime.utcnow()
11233
        self.RevisedProcessingInterval = 0
11234
        self.RevisedAggregateConfiguration = AggregateConfiguration()
11235
        self._freeze = True
11236
11237 1
    def to_binary(self):
11238
        packet = []
11239
        packet.append(uabin.Primitives.DateTime.pack(self.RevisedStartTime))
11240
        packet.append(uabin.Primitives.Double.pack(self.RevisedProcessingInterval))
11241
        packet.append(self.RevisedAggregateConfiguration.to_binary())
11242
        return b''.join(packet)
11243
11244 1
    @staticmethod
11245
    def from_binary(data):
11246
        return AggregateFilterResult(data)
11247
11248 1
    def _binary_init(self, data):
11249
        self.RevisedStartTime = uabin.Primitives.DateTime.unpack(data)
11250
        self.RevisedProcessingInterval = uabin.Primitives.Double.unpack(data)
11251
        self.RevisedAggregateConfiguration = AggregateConfiguration.from_binary(data)
11252
11253 1
    def __str__(self):
11254
        return 'AggregateFilterResult(' + 'RevisedStartTime:' + str(self.RevisedStartTime) + ', ' + \
11255
               'RevisedProcessingInterval:' + str(self.RevisedProcessingInterval) + ', ' + \
11256
               'RevisedAggregateConfiguration:' + str(self.RevisedAggregateConfiguration) + ')'
11257
11258 1
    __repr__ = __str__
11259
11260
11261 1 View Code Duplication
class MonitoringParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11262
    '''
11263
    :ivar ClientHandle:
11264
    :vartype ClientHandle: UInt32
11265
    :ivar SamplingInterval:
11266
    :vartype SamplingInterval: Double
11267
    :ivar Filter:
11268
    :vartype Filter: ExtensionObject
11269
    :ivar QueueSize:
11270
    :vartype QueueSize: UInt32
11271
    :ivar DiscardOldest:
11272
    :vartype DiscardOldest: Boolean
11273
    '''
11274
11275 1
    ua_types = {
11276
        'ClientHandle': 'UInt32',
11277
        'SamplingInterval': 'Double',
11278
        'Filter': 'ExtensionObject',
11279
        'QueueSize': 'UInt32',
11280
        'DiscardOldest': 'Boolean',
11281
               }
11282
11283 1
    def __init__(self, binary=None):
11284
        if binary is not None:
11285
            self._binary_init(binary)
11286
            self._freeze = True
11287
            return
11288
        self.ClientHandle = 0
11289
        self.SamplingInterval = 0
11290
        self.Filter = None
11291
        self.QueueSize = 0
11292
        self.DiscardOldest = True
11293
        self._freeze = True
11294
11295 1
    def to_binary(self):
11296
        packet = []
11297
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
11298
        packet.append(uabin.Primitives.Double.pack(self.SamplingInterval))
11299
        packet.append(extensionobject_to_binary(self.Filter))
11300
        packet.append(uabin.Primitives.UInt32.pack(self.QueueSize))
11301
        packet.append(uabin.Primitives.Boolean.pack(self.DiscardOldest))
11302
        return b''.join(packet)
11303
11304 1
    @staticmethod
11305
    def from_binary(data):
11306
        return MonitoringParameters(data)
11307
11308 1
    def _binary_init(self, data):
11309
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
11310
        self.SamplingInterval = uabin.Primitives.Double.unpack(data)
11311
        self.Filter = extensionobject_from_binary(data)
11312
        self.QueueSize = uabin.Primitives.UInt32.unpack(data)
11313
        self.DiscardOldest = uabin.Primitives.Boolean.unpack(data)
11314
11315 1
    def __str__(self):
11316
        return 'MonitoringParameters(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
11317
               'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \
11318
               'Filter:' + str(self.Filter) + ', ' + \
11319
               'QueueSize:' + str(self.QueueSize) + ', ' + \
11320
               'DiscardOldest:' + str(self.DiscardOldest) + ')'
11321
11322 1
    __repr__ = __str__
11323
11324
11325 1
class MonitoredItemCreateRequest(FrozenClass):
11326
    '''
11327
    :ivar ItemToMonitor:
11328
    :vartype ItemToMonitor: ReadValueId
11329
    :ivar MonitoringMode:
11330
    :vartype MonitoringMode: MonitoringMode
11331
    :ivar RequestedParameters:
11332
    :vartype RequestedParameters: MonitoringParameters
11333
    '''
11334
11335 1
    ua_types = {
11336
        'ItemToMonitor': 'ReadValueId',
11337
        'MonitoringMode': 'MonitoringMode',
11338
        'RequestedParameters': 'MonitoringParameters',
11339
               }
11340
11341 1
    def __init__(self, binary=None):
11342
        if binary is not None:
11343
            self._binary_init(binary)
11344
            self._freeze = True
11345
            return
11346
        self.ItemToMonitor = ReadValueId()
11347
        self.MonitoringMode = MonitoringMode(0)
11348
        self.RequestedParameters = MonitoringParameters()
11349
        self._freeze = True
11350
11351 1
    def to_binary(self):
11352
        packet = []
11353
        packet.append(self.ItemToMonitor.to_binary())
11354
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value))
11355
        packet.append(self.RequestedParameters.to_binary())
11356
        return b''.join(packet)
11357
11358 1
    @staticmethod
11359
    def from_binary(data):
11360
        return MonitoredItemCreateRequest(data)
11361
11362 1
    def _binary_init(self, data):
11363
        self.ItemToMonitor = ReadValueId.from_binary(data)
11364
        self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data))
11365
        self.RequestedParameters = MonitoringParameters.from_binary(data)
11366
11367 1
    def __str__(self):
11368
        return 'MonitoredItemCreateRequest(' + 'ItemToMonitor:' + str(self.ItemToMonitor) + ', ' + \
11369
               'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \
11370
               'RequestedParameters:' + str(self.RequestedParameters) + ')'
11371
11372 1
    __repr__ = __str__
11373
11374
11375 1 View Code Duplication
class MonitoredItemCreateResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11376
    '''
11377
    :ivar StatusCode:
11378
    :vartype StatusCode: StatusCode
11379
    :ivar MonitoredItemId:
11380
    :vartype MonitoredItemId: UInt32
11381
    :ivar RevisedSamplingInterval:
11382
    :vartype RevisedSamplingInterval: Double
11383
    :ivar RevisedQueueSize:
11384
    :vartype RevisedQueueSize: UInt32
11385
    :ivar FilterResult:
11386
    :vartype FilterResult: ExtensionObject
11387
    '''
11388
11389 1
    ua_types = {
11390
        'StatusCode': 'StatusCode',
11391
        'MonitoredItemId': 'UInt32',
11392
        'RevisedSamplingInterval': 'Double',
11393
        'RevisedQueueSize': 'UInt32',
11394
        'FilterResult': 'ExtensionObject',
11395
               }
11396
11397 1
    def __init__(self, binary=None):
11398
        if binary is not None:
11399
            self._binary_init(binary)
11400
            self._freeze = True
11401
            return
11402
        self.StatusCode = StatusCode()
11403
        self.MonitoredItemId = 0
11404
        self.RevisedSamplingInterval = 0
11405
        self.RevisedQueueSize = 0
11406
        self.FilterResult = None
11407
        self._freeze = True
11408
11409 1
    def to_binary(self):
11410
        packet = []
11411
        packet.append(self.StatusCode.to_binary())
11412
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId))
11413
        packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval))
11414
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize))
11415
        packet.append(extensionobject_to_binary(self.FilterResult))
11416
        return b''.join(packet)
11417
11418 1
    @staticmethod
11419
    def from_binary(data):
11420
        return MonitoredItemCreateResult(data)
11421
11422 1
    def _binary_init(self, data):
11423
        self.StatusCode = StatusCode.from_binary(data)
11424
        self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data)
11425
        self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data)
11426
        self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data)
11427
        self.FilterResult = extensionobject_from_binary(data)
11428
11429 1
    def __str__(self):
11430
        return 'MonitoredItemCreateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
11431
               'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \
11432
               'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \
11433
               'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \
11434
               'FilterResult:' + str(self.FilterResult) + ')'
11435
11436 1
    __repr__ = __str__
11437
11438
11439 1 View Code Duplication
class CreateMonitoredItemsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11440
    '''
11441
    :ivar SubscriptionId:
11442
    :vartype SubscriptionId: UInt32
11443
    :ivar TimestampsToReturn:
11444
    :vartype TimestampsToReturn: TimestampsToReturn
11445
    :ivar ItemsToCreate:
11446
    :vartype ItemsToCreate: MonitoredItemCreateRequest
11447
    '''
11448
11449 1
    ua_types = {
11450
        'SubscriptionId': 'UInt32',
11451
        'TimestampsToReturn': 'TimestampsToReturn',
11452
        'ItemsToCreate': 'MonitoredItemCreateRequest',
11453
               }
11454
11455 1
    def __init__(self, binary=None):
11456
        if binary is not None:
11457
            self._binary_init(binary)
11458
            self._freeze = True
11459
            return
11460
        self.SubscriptionId = 0
11461
        self.TimestampsToReturn = TimestampsToReturn(0)
11462
        self.ItemsToCreate = []
11463
        self._freeze = True
11464
11465 1
    def to_binary(self):
11466
        packet = []
11467
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11468
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
11469
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate)))
11470
        for fieldname in self.ItemsToCreate:
11471
            packet.append(fieldname.to_binary())
11472
        return b''.join(packet)
11473
11474 1
    @staticmethod
11475
    def from_binary(data):
11476
        return CreateMonitoredItemsParameters(data)
11477
11478 1
    def _binary_init(self, data):
11479
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11480
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
11481
        length = uabin.Primitives.Int32.unpack(data)
11482
        array = []
11483
        if length != -1:
11484
            for _ in range(0, length):
11485
                array.append(MonitoredItemCreateRequest.from_binary(data))
11486
        self.ItemsToCreate = array
11487
11488 1
    def __str__(self):
11489
        return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11490
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
11491
               'ItemsToCreate:' + str(self.ItemsToCreate) + ')'
11492
11493 1
    __repr__ = __str__
11494
11495
11496 1
class CreateMonitoredItemsRequest(FrozenClass):
11497
    '''
11498
    :ivar TypeId:
11499
    :vartype TypeId: NodeId
11500
    :ivar RequestHeader:
11501
    :vartype RequestHeader: RequestHeader
11502
    :ivar Parameters:
11503
    :vartype Parameters: CreateMonitoredItemsParameters
11504
    '''
11505
11506 1
    ua_types = {
11507
        'TypeId': 'NodeId',
11508
        'RequestHeader': 'RequestHeader',
11509
        'Parameters': 'CreateMonitoredItemsParameters',
11510
               }
11511
11512 1
    def __init__(self, binary=None):
11513
        if binary is not None:
11514
            self._binary_init(binary)
11515
            self._freeze = True
11516
            return
11517
        self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary)
11518
        self.RequestHeader = RequestHeader()
11519
        self.Parameters = CreateMonitoredItemsParameters()
11520
        self._freeze = True
11521
11522 1
    def to_binary(self):
11523
        packet = []
11524
        packet.append(self.TypeId.to_binary())
11525
        packet.append(self.RequestHeader.to_binary())
11526
        packet.append(self.Parameters.to_binary())
11527
        return b''.join(packet)
11528
11529 1
    @staticmethod
11530
    def from_binary(data):
11531
        return CreateMonitoredItemsRequest(data)
11532
11533 1
    def _binary_init(self, data):
11534
        self.TypeId = NodeId.from_binary(data)
11535
        self.RequestHeader = RequestHeader.from_binary(data)
11536
        self.Parameters = CreateMonitoredItemsParameters.from_binary(data)
11537
11538 1
    def __str__(self):
11539
        return 'CreateMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11540
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11541
               'Parameters:' + str(self.Parameters) + ')'
11542
11543 1
    __repr__ = __str__
11544
11545
11546 1 View Code Duplication
class CreateMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11547
    '''
11548
    :ivar TypeId:
11549
    :vartype TypeId: NodeId
11550
    :ivar ResponseHeader:
11551
    :vartype ResponseHeader: ResponseHeader
11552
    :ivar Results:
11553
    :vartype Results: MonitoredItemCreateResult
11554
    :ivar DiagnosticInfos:
11555
    :vartype DiagnosticInfos: DiagnosticInfo
11556
    '''
11557
11558 1
    ua_types = {
11559
        'TypeId': 'NodeId',
11560
        'ResponseHeader': 'ResponseHeader',
11561
        'Results': 'MonitoredItemCreateResult',
11562
        'DiagnosticInfos': 'DiagnosticInfo',
11563
               }
11564
11565 1
    def __init__(self, binary=None):
11566
        if binary is not None:
11567
            self._binary_init(binary)
11568
            self._freeze = True
11569
            return
11570
        self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary)
11571
        self.ResponseHeader = ResponseHeader()
11572
        self.Results = []
11573
        self.DiagnosticInfos = []
11574
        self._freeze = True
11575
11576 1
    def to_binary(self):
11577
        packet = []
11578
        packet.append(self.TypeId.to_binary())
11579
        packet.append(self.ResponseHeader.to_binary())
11580
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11581
        for fieldname in self.Results:
11582
            packet.append(fieldname.to_binary())
11583
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11584
        for fieldname in self.DiagnosticInfos:
11585
            packet.append(fieldname.to_binary())
11586
        return b''.join(packet)
11587
11588 1
    @staticmethod
11589
    def from_binary(data):
11590
        return CreateMonitoredItemsResponse(data)
11591
11592 1
    def _binary_init(self, data):
11593
        self.TypeId = NodeId.from_binary(data)
11594
        self.ResponseHeader = ResponseHeader.from_binary(data)
11595
        length = uabin.Primitives.Int32.unpack(data)
11596
        array = []
11597
        if length != -1:
11598
            for _ in range(0, length):
11599
                array.append(MonitoredItemCreateResult.from_binary(data))
11600
        self.Results = array
11601
        length = uabin.Primitives.Int32.unpack(data)
11602
        array = []
11603
        if length != -1:
11604
            for _ in range(0, length):
11605
                array.append(DiagnosticInfo.from_binary(data))
11606
        self.DiagnosticInfos = array
11607
11608 1
    def __str__(self):
11609
        return 'CreateMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11610
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11611
               'Results:' + str(self.Results) + ', ' + \
11612
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11613
11614 1
    __repr__ = __str__
11615
11616
11617 1 View Code Duplication
class MonitoredItemModifyRequest(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11618
    '''
11619
    :ivar MonitoredItemId:
11620
    :vartype MonitoredItemId: UInt32
11621
    :ivar RequestedParameters:
11622
    :vartype RequestedParameters: MonitoringParameters
11623
    '''
11624
11625 1
    ua_types = {
11626
        'MonitoredItemId': 'UInt32',
11627
        'RequestedParameters': 'MonitoringParameters',
11628
               }
11629
11630 1
    def __init__(self, binary=None):
11631
        if binary is not None:
11632
            self._binary_init(binary)
11633
            self._freeze = True
11634
            return
11635
        self.MonitoredItemId = 0
11636
        self.RequestedParameters = MonitoringParameters()
11637
        self._freeze = True
11638
11639 1
    def to_binary(self):
11640
        packet = []
11641
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId))
11642
        packet.append(self.RequestedParameters.to_binary())
11643
        return b''.join(packet)
11644
11645 1
    @staticmethod
11646
    def from_binary(data):
11647
        return MonitoredItemModifyRequest(data)
11648
11649 1
    def _binary_init(self, data):
11650
        self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data)
11651
        self.RequestedParameters = MonitoringParameters.from_binary(data)
11652
11653 1
    def __str__(self):
11654
        return 'MonitoredItemModifyRequest(' + 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \
11655
               'RequestedParameters:' + str(self.RequestedParameters) + ')'
11656
11657 1
    __repr__ = __str__
11658
11659
11660 1
class MonitoredItemModifyResult(FrozenClass):
11661
    '''
11662
    :ivar StatusCode:
11663
    :vartype StatusCode: StatusCode
11664
    :ivar RevisedSamplingInterval:
11665
    :vartype RevisedSamplingInterval: Double
11666
    :ivar RevisedQueueSize:
11667
    :vartype RevisedQueueSize: UInt32
11668
    :ivar FilterResult:
11669
    :vartype FilterResult: ExtensionObject
11670
    '''
11671
11672 1
    ua_types = {
11673
        'StatusCode': 'StatusCode',
11674
        'RevisedSamplingInterval': 'Double',
11675
        'RevisedQueueSize': 'UInt32',
11676
        'FilterResult': 'ExtensionObject',
11677
               }
11678
11679 1
    def __init__(self, binary=None):
11680
        if binary is not None:
11681
            self._binary_init(binary)
11682
            self._freeze = True
11683
            return
11684
        self.StatusCode = StatusCode()
11685
        self.RevisedSamplingInterval = 0
11686
        self.RevisedQueueSize = 0
11687
        self.FilterResult = None
11688
        self._freeze = True
11689
11690 1
    def to_binary(self):
11691
        packet = []
11692
        packet.append(self.StatusCode.to_binary())
11693
        packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval))
11694
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize))
11695
        packet.append(extensionobject_to_binary(self.FilterResult))
11696
        return b''.join(packet)
11697
11698 1
    @staticmethod
11699
    def from_binary(data):
11700
        return MonitoredItemModifyResult(data)
11701
11702 1
    def _binary_init(self, data):
11703
        self.StatusCode = StatusCode.from_binary(data)
11704
        self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data)
11705
        self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data)
11706
        self.FilterResult = extensionobject_from_binary(data)
11707
11708 1
    def __str__(self):
11709
        return 'MonitoredItemModifyResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
11710
               'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \
11711
               'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \
11712
               'FilterResult:' + str(self.FilterResult) + ')'
11713
11714 1
    __repr__ = __str__
11715
11716
11717 1 View Code Duplication
class ModifyMonitoredItemsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11718
    '''
11719
    :ivar SubscriptionId:
11720
    :vartype SubscriptionId: UInt32
11721
    :ivar TimestampsToReturn:
11722
    :vartype TimestampsToReturn: TimestampsToReturn
11723
    :ivar ItemsToModify:
11724
    :vartype ItemsToModify: MonitoredItemModifyRequest
11725
    '''
11726
11727 1
    ua_types = {
11728
        'SubscriptionId': 'UInt32',
11729
        'TimestampsToReturn': 'TimestampsToReturn',
11730
        'ItemsToModify': 'MonitoredItemModifyRequest',
11731
               }
11732
11733 1
    def __init__(self, binary=None):
11734
        if binary is not None:
11735
            self._binary_init(binary)
11736
            self._freeze = True
11737
            return
11738
        self.SubscriptionId = 0
11739
        self.TimestampsToReturn = TimestampsToReturn(0)
11740
        self.ItemsToModify = []
11741
        self._freeze = True
11742
11743 1
    def to_binary(self):
11744
        packet = []
11745
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11746
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
11747
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify)))
11748
        for fieldname in self.ItemsToModify:
11749
            packet.append(fieldname.to_binary())
11750
        return b''.join(packet)
11751
11752 1
    @staticmethod
11753
    def from_binary(data):
11754
        return ModifyMonitoredItemsParameters(data)
11755
11756 1
    def _binary_init(self, data):
11757
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11758
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
11759
        length = uabin.Primitives.Int32.unpack(data)
11760
        array = []
11761
        if length != -1:
11762
            for _ in range(0, length):
11763
                array.append(MonitoredItemModifyRequest.from_binary(data))
11764
        self.ItemsToModify = array
11765
11766 1
    def __str__(self):
11767
        return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11768
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
11769
               'ItemsToModify:' + str(self.ItemsToModify) + ')'
11770
11771 1
    __repr__ = __str__
11772
11773
11774 1
class ModifyMonitoredItemsRequest(FrozenClass):
11775
    '''
11776
    :ivar TypeId:
11777
    :vartype TypeId: NodeId
11778
    :ivar RequestHeader:
11779
    :vartype RequestHeader: RequestHeader
11780
    :ivar Parameters:
11781
    :vartype Parameters: ModifyMonitoredItemsParameters
11782
    '''
11783
11784 1
    ua_types = {
11785
        'TypeId': 'NodeId',
11786
        'RequestHeader': 'RequestHeader',
11787
        'Parameters': 'ModifyMonitoredItemsParameters',
11788
               }
11789
11790 1
    def __init__(self, binary=None):
11791
        if binary is not None:
11792
            self._binary_init(binary)
11793
            self._freeze = True
11794
            return
11795
        self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary)
11796
        self.RequestHeader = RequestHeader()
11797
        self.Parameters = ModifyMonitoredItemsParameters()
11798
        self._freeze = True
11799
11800 1
    def to_binary(self):
11801
        packet = []
11802
        packet.append(self.TypeId.to_binary())
11803
        packet.append(self.RequestHeader.to_binary())
11804
        packet.append(self.Parameters.to_binary())
11805
        return b''.join(packet)
11806
11807 1
    @staticmethod
11808
    def from_binary(data):
11809
        return ModifyMonitoredItemsRequest(data)
11810
11811 1
    def _binary_init(self, data):
11812
        self.TypeId = NodeId.from_binary(data)
11813
        self.RequestHeader = RequestHeader.from_binary(data)
11814
        self.Parameters = ModifyMonitoredItemsParameters.from_binary(data)
11815
11816 1
    def __str__(self):
11817
        return 'ModifyMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11818
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11819
               'Parameters:' + str(self.Parameters) + ')'
11820
11821 1
    __repr__ = __str__
11822
11823
11824 1 View Code Duplication
class ModifyMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11825
    '''
11826
    :ivar TypeId:
11827
    :vartype TypeId: NodeId
11828
    :ivar ResponseHeader:
11829
    :vartype ResponseHeader: ResponseHeader
11830
    :ivar Results:
11831
    :vartype Results: MonitoredItemModifyResult
11832
    :ivar DiagnosticInfos:
11833
    :vartype DiagnosticInfos: DiagnosticInfo
11834
    '''
11835
11836 1
    ua_types = {
11837
        'TypeId': 'NodeId',
11838
        'ResponseHeader': 'ResponseHeader',
11839
        'Results': 'MonitoredItemModifyResult',
11840
        'DiagnosticInfos': 'DiagnosticInfo',
11841
               }
11842
11843 1
    def __init__(self, binary=None):
11844
        if binary is not None:
11845
            self._binary_init(binary)
11846
            self._freeze = True
11847
            return
11848
        self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary)
11849
        self.ResponseHeader = ResponseHeader()
11850
        self.Results = []
11851
        self.DiagnosticInfos = []
11852
        self._freeze = True
11853
11854 1
    def to_binary(self):
11855
        packet = []
11856
        packet.append(self.TypeId.to_binary())
11857
        packet.append(self.ResponseHeader.to_binary())
11858
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11859
        for fieldname in self.Results:
11860
            packet.append(fieldname.to_binary())
11861
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11862
        for fieldname in self.DiagnosticInfos:
11863
            packet.append(fieldname.to_binary())
11864
        return b''.join(packet)
11865
11866 1
    @staticmethod
11867
    def from_binary(data):
11868
        return ModifyMonitoredItemsResponse(data)
11869
11870 1
    def _binary_init(self, data):
11871
        self.TypeId = NodeId.from_binary(data)
11872
        self.ResponseHeader = ResponseHeader.from_binary(data)
11873
        length = uabin.Primitives.Int32.unpack(data)
11874
        array = []
11875
        if length != -1:
11876
            for _ in range(0, length):
11877
                array.append(MonitoredItemModifyResult.from_binary(data))
11878
        self.Results = array
11879
        length = uabin.Primitives.Int32.unpack(data)
11880
        array = []
11881
        if length != -1:
11882
            for _ in range(0, length):
11883
                array.append(DiagnosticInfo.from_binary(data))
11884
        self.DiagnosticInfos = array
11885
11886 1
    def __str__(self):
11887
        return 'ModifyMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11888
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11889
               'Results:' + str(self.Results) + ', ' + \
11890
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11891
11892 1
    __repr__ = __str__
11893
11894
11895 1
class SetMonitoringModeParameters(FrozenClass):
11896
    '''
11897
    :ivar SubscriptionId:
11898
    :vartype SubscriptionId: UInt32
11899
    :ivar MonitoringMode:
11900
    :vartype MonitoringMode: MonitoringMode
11901
    :ivar MonitoredItemIds:
11902
    :vartype MonitoredItemIds: UInt32
11903
    '''
11904
11905 1
    ua_types = {
11906
        'SubscriptionId': 'UInt32',
11907
        'MonitoringMode': 'MonitoringMode',
11908
        'MonitoredItemIds': 'UInt32',
11909
               }
11910
11911 1
    def __init__(self, binary=None):
11912
        if binary is not None:
11913
            self._binary_init(binary)
11914
            self._freeze = True
11915
            return
11916
        self.SubscriptionId = 0
11917
        self.MonitoringMode = MonitoringMode(0)
11918
        self.MonitoredItemIds = []
11919
        self._freeze = True
11920
11921 1
    def to_binary(self):
11922
        packet = []
11923
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11924
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value))
11925
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds)))
11926
        for fieldname in self.MonitoredItemIds:
11927
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11928
        return b''.join(packet)
11929
11930 1
    @staticmethod
11931
    def from_binary(data):
11932
        return SetMonitoringModeParameters(data)
11933
11934 1
    def _binary_init(self, data):
11935
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11936
        self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data))
11937
        self.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data)
11938
11939 1
    def __str__(self):
11940
        return 'SetMonitoringModeParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11941
               'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \
11942
               'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')'
11943
11944 1
    __repr__ = __str__
11945
11946
11947 1
class SetMonitoringModeRequest(FrozenClass):
11948
    '''
11949
    :ivar TypeId:
11950
    :vartype TypeId: NodeId
11951
    :ivar RequestHeader:
11952
    :vartype RequestHeader: RequestHeader
11953
    :ivar Parameters:
11954
    :vartype Parameters: SetMonitoringModeParameters
11955
    '''
11956
11957 1
    ua_types = {
11958
        'TypeId': 'NodeId',
11959
        'RequestHeader': 'RequestHeader',
11960
        'Parameters': 'SetMonitoringModeParameters',
11961
               }
11962
11963 1
    def __init__(self, binary=None):
11964
        if binary is not None:
11965
            self._binary_init(binary)
11966
            self._freeze = True
11967
            return
11968
        self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary)
11969
        self.RequestHeader = RequestHeader()
11970
        self.Parameters = SetMonitoringModeParameters()
11971
        self._freeze = True
11972
11973 1
    def to_binary(self):
11974
        packet = []
11975
        packet.append(self.TypeId.to_binary())
11976
        packet.append(self.RequestHeader.to_binary())
11977
        packet.append(self.Parameters.to_binary())
11978
        return b''.join(packet)
11979
11980 1
    @staticmethod
11981
    def from_binary(data):
11982
        return SetMonitoringModeRequest(data)
11983
11984 1
    def _binary_init(self, data):
11985
        self.TypeId = NodeId.from_binary(data)
11986
        self.RequestHeader = RequestHeader.from_binary(data)
11987
        self.Parameters = SetMonitoringModeParameters.from_binary(data)
11988
11989 1
    def __str__(self):
11990
        return 'SetMonitoringModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11991
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11992
               'Parameters:' + str(self.Parameters) + ')'
11993
11994 1
    __repr__ = __str__
11995
11996
11997 1 View Code Duplication
class SetMonitoringModeResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11998
    '''
11999
    :ivar Results:
12000
    :vartype Results: StatusCode
12001
    :ivar DiagnosticInfos:
12002
    :vartype DiagnosticInfos: DiagnosticInfo
12003
    '''
12004
12005 1
    ua_types = {
12006
        'Results': 'StatusCode',
12007
        'DiagnosticInfos': 'DiagnosticInfo',
12008
               }
12009
12010 1
    def __init__(self, binary=None):
12011
        if binary is not None:
12012
            self._binary_init(binary)
12013
            self._freeze = True
12014
            return
12015
        self.Results = []
12016
        self.DiagnosticInfos = []
12017
        self._freeze = True
12018
12019 1
    def to_binary(self):
12020
        packet = []
12021
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
12022
        for fieldname in self.Results:
12023
            packet.append(fieldname.to_binary())
12024
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
12025
        for fieldname in self.DiagnosticInfos:
12026
            packet.append(fieldname.to_binary())
12027
        return b''.join(packet)
12028
12029 1
    @staticmethod
12030
    def from_binary(data):
12031
        return SetMonitoringModeResult(data)
12032
12033 1
    def _binary_init(self, data):
12034
        length = uabin.Primitives.Int32.unpack(data)
12035
        array = []
12036
        if length != -1:
12037
            for _ in range(0, length):
12038
                array.append(StatusCode.from_binary(data))
12039
        self.Results = array
12040
        length = uabin.Primitives.Int32.unpack(data)
12041
        array = []
12042
        if length != -1:
12043
            for _ in range(0, length):
12044
                array.append(DiagnosticInfo.from_binary(data))
12045
        self.DiagnosticInfos = array
12046
12047 1
    def __str__(self):
12048
        return 'SetMonitoringModeResult(' + 'Results:' + str(self.Results) + ', ' + \
12049
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
12050
12051 1
    __repr__ = __str__
12052
12053
12054 1
class SetMonitoringModeResponse(FrozenClass):
12055
    '''
12056
    :ivar TypeId:
12057
    :vartype TypeId: NodeId
12058
    :ivar ResponseHeader:
12059
    :vartype ResponseHeader: ResponseHeader
12060
    :ivar Parameters:
12061
    :vartype Parameters: SetMonitoringModeResult
12062
    '''
12063
12064 1
    ua_types = {
12065
        'TypeId': 'NodeId',
12066
        'ResponseHeader': 'ResponseHeader',
12067
        'Parameters': 'SetMonitoringModeResult',
12068
               }
12069
12070 1
    def __init__(self, binary=None):
12071
        if binary is not None:
12072
            self._binary_init(binary)
12073
            self._freeze = True
12074
            return
12075
        self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary)
12076
        self.ResponseHeader = ResponseHeader()
12077
        self.Parameters = SetMonitoringModeResult()
12078
        self._freeze = True
12079
12080 1
    def to_binary(self):
12081
        packet = []
12082
        packet.append(self.TypeId.to_binary())
12083
        packet.append(self.ResponseHeader.to_binary())
12084
        packet.append(self.Parameters.to_binary())
12085
        return b''.join(packet)
12086
12087 1
    @staticmethod
12088
    def from_binary(data):
12089
        return SetMonitoringModeResponse(data)
12090
12091 1
    def _binary_init(self, data):
12092
        self.TypeId = NodeId.from_binary(data)
12093
        self.ResponseHeader = ResponseHeader.from_binary(data)
12094
        self.Parameters = SetMonitoringModeResult.from_binary(data)
12095
12096 1
    def __str__(self):
12097
        return 'SetMonitoringModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12098
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12099
               'Parameters:' + str(self.Parameters) + ')'
12100
12101 1
    __repr__ = __str__
12102
12103
12104 1 View Code Duplication
class SetTriggeringParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12105
    '''
12106
    :ivar SubscriptionId:
12107
    :vartype SubscriptionId: UInt32
12108
    :ivar TriggeringItemId:
12109
    :vartype TriggeringItemId: UInt32
12110
    :ivar LinksToAdd:
12111
    :vartype LinksToAdd: UInt32
12112
    :ivar LinksToRemove:
12113
    :vartype LinksToRemove: UInt32
12114
    '''
12115
12116 1
    ua_types = {
12117
        'SubscriptionId': 'UInt32',
12118
        'TriggeringItemId': 'UInt32',
12119
        'LinksToAdd': 'UInt32',
12120
        'LinksToRemove': 'UInt32',
12121
               }
12122
12123 1
    def __init__(self, binary=None):
12124
        if binary is not None:
12125
            self._binary_init(binary)
12126
            self._freeze = True
12127
            return
12128
        self.SubscriptionId = 0
12129
        self.TriggeringItemId = 0
12130
        self.LinksToAdd = []
12131
        self.LinksToRemove = []
12132
        self._freeze = True
12133
12134 1
    def to_binary(self):
12135
        packet = []
12136
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12137
        packet.append(uabin.Primitives.UInt32.pack(self.TriggeringItemId))
12138
        packet.append(uabin.Primitives.Int32.pack(len(self.LinksToAdd)))
12139
        for fieldname in self.LinksToAdd:
12140
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
12141
        packet.append(uabin.Primitives.Int32.pack(len(self.LinksToRemove)))
12142
        for fieldname in self.LinksToRemove:
12143
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
12144
        return b''.join(packet)
12145
12146 1
    @staticmethod
12147
    def from_binary(data):
12148
        return SetTriggeringParameters(data)
12149
12150 1
    def _binary_init(self, data):
12151
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12152
        self.TriggeringItemId = uabin.Primitives.UInt32.unpack(data)
12153
        self.LinksToAdd = uabin.Primitives.UInt32.unpack_array(data)
12154
        self.LinksToRemove = uabin.Primitives.UInt32.unpack_array(data)
12155
12156 1
    def __str__(self):
12157
        return 'SetTriggeringParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12158
               'TriggeringItemId:' + str(self.TriggeringItemId) + ', ' + \
12159
               'LinksToAdd:' + str(self.LinksToAdd) + ', ' + \
12160
               'LinksToRemove:' + str(self.LinksToRemove) + ')'
12161
12162 1
    __repr__ = __str__
12163
12164
12165 1
class SetTriggeringRequest(FrozenClass):
12166
    '''
12167
    :ivar TypeId:
12168
    :vartype TypeId: NodeId
12169
    :ivar RequestHeader:
12170
    :vartype RequestHeader: RequestHeader
12171
    :ivar Parameters:
12172
    :vartype Parameters: SetTriggeringParameters
12173
    '''
12174
12175 1
    ua_types = {
12176
        'TypeId': 'NodeId',
12177
        'RequestHeader': 'RequestHeader',
12178
        'Parameters': 'SetTriggeringParameters',
12179
               }
12180
12181 1
    def __init__(self, binary=None):
12182
        if binary is not None:
12183
            self._binary_init(binary)
12184
            self._freeze = True
12185
            return
12186
        self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary)
12187
        self.RequestHeader = RequestHeader()
12188
        self.Parameters = SetTriggeringParameters()
12189
        self._freeze = True
12190
12191 1
    def to_binary(self):
12192
        packet = []
12193
        packet.append(self.TypeId.to_binary())
12194
        packet.append(self.RequestHeader.to_binary())
12195
        packet.append(self.Parameters.to_binary())
12196
        return b''.join(packet)
12197
12198 1
    @staticmethod
12199
    def from_binary(data):
12200
        return SetTriggeringRequest(data)
12201
12202 1
    def _binary_init(self, data):
12203
        self.TypeId = NodeId.from_binary(data)
12204
        self.RequestHeader = RequestHeader.from_binary(data)
12205
        self.Parameters = SetTriggeringParameters.from_binary(data)
12206
12207 1
    def __str__(self):
12208
        return 'SetTriggeringRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12209
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12210
               'Parameters:' + str(self.Parameters) + ')'
12211
12212 1
    __repr__ = __str__
12213
12214
12215 1
class SetTriggeringResult(FrozenClass):
12216
    '''
12217
    :ivar AddResults:
12218
    :vartype AddResults: StatusCode
12219
    :ivar AddDiagnosticInfos:
12220
    :vartype AddDiagnosticInfos: DiagnosticInfo
12221
    :ivar RemoveResults:
12222
    :vartype RemoveResults: StatusCode
12223
    :ivar RemoveDiagnosticInfos:
12224
    :vartype RemoveDiagnosticInfos: DiagnosticInfo
12225
    '''
12226
12227 1
    ua_types = {
12228
        'AddResults': 'StatusCode',
12229
        'AddDiagnosticInfos': 'DiagnosticInfo',
12230
        'RemoveResults': 'StatusCode',
12231
        'RemoveDiagnosticInfos': 'DiagnosticInfo',
12232
               }
12233
12234 1
    def __init__(self, binary=None):
12235
        if binary is not None:
12236
            self._binary_init(binary)
12237
            self._freeze = True
12238
            return
12239
        self.AddResults = []
12240
        self.AddDiagnosticInfos = []
12241
        self.RemoveResults = []
12242
        self.RemoveDiagnosticInfos = []
12243
        self._freeze = True
12244
12245 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12246
        packet = []
12247
        packet.append(uabin.Primitives.Int32.pack(len(self.AddResults)))
12248
        for fieldname in self.AddResults:
12249
            packet.append(fieldname.to_binary())
12250
        packet.append(uabin.Primitives.Int32.pack(len(self.AddDiagnosticInfos)))
12251
        for fieldname in self.AddDiagnosticInfos:
12252
            packet.append(fieldname.to_binary())
12253
        packet.append(uabin.Primitives.Int32.pack(len(self.RemoveResults)))
12254
        for fieldname in self.RemoveResults:
12255
            packet.append(fieldname.to_binary())
12256
        packet.append(uabin.Primitives.Int32.pack(len(self.RemoveDiagnosticInfos)))
12257
        for fieldname in self.RemoveDiagnosticInfos:
12258
            packet.append(fieldname.to_binary())
12259
        return b''.join(packet)
12260
12261 1
    @staticmethod
12262
    def from_binary(data):
12263
        return SetTriggeringResult(data)
12264
12265 1 View Code Duplication
    def _binary_init(self, data):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12266
        length = uabin.Primitives.Int32.unpack(data)
12267
        array = []
12268
        if length != -1:
12269
            for _ in range(0, length):
12270
                array.append(StatusCode.from_binary(data))
12271
        self.AddResults = array
12272
        length = uabin.Primitives.Int32.unpack(data)
12273
        array = []
12274
        if length != -1:
12275
            for _ in range(0, length):
12276
                array.append(DiagnosticInfo.from_binary(data))
12277
        self.AddDiagnosticInfos = array
12278
        length = uabin.Primitives.Int32.unpack(data)
12279
        array = []
12280
        if length != -1:
12281
            for _ in range(0, length):
12282
                array.append(StatusCode.from_binary(data))
12283
        self.RemoveResults = array
12284
        length = uabin.Primitives.Int32.unpack(data)
12285
        array = []
12286
        if length != -1:
12287
            for _ in range(0, length):
12288
                array.append(DiagnosticInfo.from_binary(data))
12289
        self.RemoveDiagnosticInfos = array
12290
12291 1
    def __str__(self):
12292
        return 'SetTriggeringResult(' + 'AddResults:' + str(self.AddResults) + ', ' + \
12293
               'AddDiagnosticInfos:' + str(self.AddDiagnosticInfos) + ', ' + \
12294
               'RemoveResults:' + str(self.RemoveResults) + ', ' + \
12295
               'RemoveDiagnosticInfos:' + str(self.RemoveDiagnosticInfos) + ')'
12296
12297 1
    __repr__ = __str__
12298
12299
12300 1
class SetTriggeringResponse(FrozenClass):
12301
    '''
12302
    :ivar TypeId:
12303
    :vartype TypeId: NodeId
12304
    :ivar ResponseHeader:
12305
    :vartype ResponseHeader: ResponseHeader
12306
    :ivar Parameters:
12307
    :vartype Parameters: SetTriggeringResult
12308
    '''
12309
12310 1
    ua_types = {
12311
        'TypeId': 'NodeId',
12312
        'ResponseHeader': 'ResponseHeader',
12313
        'Parameters': 'SetTriggeringResult',
12314
               }
12315
12316 1
    def __init__(self, binary=None):
12317
        if binary is not None:
12318
            self._binary_init(binary)
12319
            self._freeze = True
12320
            return
12321
        self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary)
12322
        self.ResponseHeader = ResponseHeader()
12323
        self.Parameters = SetTriggeringResult()
12324
        self._freeze = True
12325
12326 1
    def to_binary(self):
12327
        packet = []
12328
        packet.append(self.TypeId.to_binary())
12329
        packet.append(self.ResponseHeader.to_binary())
12330
        packet.append(self.Parameters.to_binary())
12331
        return b''.join(packet)
12332
12333 1
    @staticmethod
12334
    def from_binary(data):
12335
        return SetTriggeringResponse(data)
12336
12337 1
    def _binary_init(self, data):
12338
        self.TypeId = NodeId.from_binary(data)
12339
        self.ResponseHeader = ResponseHeader.from_binary(data)
12340
        self.Parameters = SetTriggeringResult.from_binary(data)
12341
12342 1
    def __str__(self):
12343
        return 'SetTriggeringResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12344
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12345
               'Parameters:' + str(self.Parameters) + ')'
12346
12347 1
    __repr__ = __str__
12348
12349
12350 1 View Code Duplication
class DeleteMonitoredItemsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12351
    '''
12352
    :ivar SubscriptionId:
12353
    :vartype SubscriptionId: UInt32
12354
    :ivar MonitoredItemIds:
12355
    :vartype MonitoredItemIds: UInt32
12356
    '''
12357
12358 1
    ua_types = {
12359
        'SubscriptionId': 'UInt32',
12360
        'MonitoredItemIds': 'UInt32',
12361
               }
12362
12363 1
    def __init__(self, binary=None):
12364
        if binary is not None:
12365
            self._binary_init(binary)
12366
            self._freeze = True
12367
            return
12368
        self.SubscriptionId = 0
12369
        self.MonitoredItemIds = []
12370
        self._freeze = True
12371
12372 1
    def to_binary(self):
12373
        packet = []
12374
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12375
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds)))
12376
        for fieldname in self.MonitoredItemIds:
12377
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
12378
        return b''.join(packet)
12379
12380 1
    @staticmethod
12381
    def from_binary(data):
12382
        return DeleteMonitoredItemsParameters(data)
12383
12384 1
    def _binary_init(self, data):
12385
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12386
        self.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data)
12387
12388 1
    def __str__(self):
12389
        return 'DeleteMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12390
               'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')'
12391
12392 1
    __repr__ = __str__
12393
12394
12395 1
class DeleteMonitoredItemsRequest(FrozenClass):
12396
    '''
12397
    :ivar TypeId:
12398
    :vartype TypeId: NodeId
12399
    :ivar RequestHeader:
12400
    :vartype RequestHeader: RequestHeader
12401
    :ivar Parameters:
12402
    :vartype Parameters: DeleteMonitoredItemsParameters
12403
    '''
12404
12405 1
    ua_types = {
12406
        'TypeId': 'NodeId',
12407
        'RequestHeader': 'RequestHeader',
12408
        'Parameters': 'DeleteMonitoredItemsParameters',
12409
               }
12410
12411 1
    def __init__(self, binary=None):
12412
        if binary is not None:
12413
            self._binary_init(binary)
12414
            self._freeze = True
12415
            return
12416
        self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary)
12417
        self.RequestHeader = RequestHeader()
12418
        self.Parameters = DeleteMonitoredItemsParameters()
12419
        self._freeze = True
12420
12421 1
    def to_binary(self):
12422
        packet = []
12423
        packet.append(self.TypeId.to_binary())
12424
        packet.append(self.RequestHeader.to_binary())
12425
        packet.append(self.Parameters.to_binary())
12426
        return b''.join(packet)
12427
12428 1
    @staticmethod
12429
    def from_binary(data):
12430
        return DeleteMonitoredItemsRequest(data)
12431
12432 1
    def _binary_init(self, data):
12433
        self.TypeId = NodeId.from_binary(data)
12434
        self.RequestHeader = RequestHeader.from_binary(data)
12435
        self.Parameters = DeleteMonitoredItemsParameters.from_binary(data)
12436
12437 1
    def __str__(self):
12438
        return 'DeleteMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12439
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12440
               'Parameters:' + str(self.Parameters) + ')'
12441
12442 1
    __repr__ = __str__
12443
12444
12445 1 View Code Duplication
class DeleteMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12446
    '''
12447
    :ivar TypeId:
12448
    :vartype TypeId: NodeId
12449
    :ivar ResponseHeader:
12450
    :vartype ResponseHeader: ResponseHeader
12451
    :ivar Results:
12452
    :vartype Results: StatusCode
12453
    :ivar DiagnosticInfos:
12454
    :vartype DiagnosticInfos: DiagnosticInfo
12455
    '''
12456
12457 1
    ua_types = {
12458
        'TypeId': 'NodeId',
12459
        'ResponseHeader': 'ResponseHeader',
12460
        'Results': 'StatusCode',
12461
        'DiagnosticInfos': 'DiagnosticInfo',
12462
               }
12463
12464 1
    def __init__(self, binary=None):
12465
        if binary is not None:
12466
            self._binary_init(binary)
12467
            self._freeze = True
12468
            return
12469
        self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary)
12470
        self.ResponseHeader = ResponseHeader()
12471
        self.Results = []
12472
        self.DiagnosticInfos = []
12473
        self._freeze = True
12474
12475 1
    def to_binary(self):
12476
        packet = []
12477
        packet.append(self.TypeId.to_binary())
12478
        packet.append(self.ResponseHeader.to_binary())
12479
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
12480
        for fieldname in self.Results:
12481
            packet.append(fieldname.to_binary())
12482
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
12483
        for fieldname in self.DiagnosticInfos:
12484
            packet.append(fieldname.to_binary())
12485
        return b''.join(packet)
12486
12487 1
    @staticmethod
12488
    def from_binary(data):
12489
        return DeleteMonitoredItemsResponse(data)
12490
12491 1
    def _binary_init(self, data):
12492
        self.TypeId = NodeId.from_binary(data)
12493
        self.ResponseHeader = ResponseHeader.from_binary(data)
12494
        length = uabin.Primitives.Int32.unpack(data)
12495
        array = []
12496
        if length != -1:
12497
            for _ in range(0, length):
12498
                array.append(StatusCode.from_binary(data))
12499
        self.Results = array
12500
        length = uabin.Primitives.Int32.unpack(data)
12501
        array = []
12502
        if length != -1:
12503
            for _ in range(0, length):
12504
                array.append(DiagnosticInfo.from_binary(data))
12505
        self.DiagnosticInfos = array
12506
12507 1
    def __str__(self):
12508
        return 'DeleteMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12509
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12510
               'Results:' + str(self.Results) + ', ' + \
12511
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
12512
12513 1
    __repr__ = __str__
12514
12515
12516 1 View Code Duplication
class CreateSubscriptionParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12517
    '''
12518
    :ivar RequestedPublishingInterval:
12519
    :vartype RequestedPublishingInterval: Double
12520
    :ivar RequestedLifetimeCount:
12521
    :vartype RequestedLifetimeCount: UInt32
12522
    :ivar RequestedMaxKeepAliveCount:
12523
    :vartype RequestedMaxKeepAliveCount: UInt32
12524
    :ivar MaxNotificationsPerPublish:
12525
    :vartype MaxNotificationsPerPublish: UInt32
12526
    :ivar PublishingEnabled:
12527
    :vartype PublishingEnabled: Boolean
12528
    :ivar Priority:
12529
    :vartype Priority: Byte
12530
    '''
12531
12532 1
    ua_types = {
12533
        'RequestedPublishingInterval': 'Double',
12534
        'RequestedLifetimeCount': 'UInt32',
12535
        'RequestedMaxKeepAliveCount': 'UInt32',
12536
        'MaxNotificationsPerPublish': 'UInt32',
12537
        'PublishingEnabled': 'Boolean',
12538
        'Priority': 'Byte',
12539
               }
12540
12541 1
    def __init__(self, binary=None):
12542
        if binary is not None:
12543
            self._binary_init(binary)
12544
            self._freeze = True
12545
            return
12546
        self.RequestedPublishingInterval = 0
12547
        self.RequestedLifetimeCount = 0
12548
        self.RequestedMaxKeepAliveCount = 0
12549
        self.MaxNotificationsPerPublish = 0
12550
        self.PublishingEnabled = True
12551
        self.Priority = 0
12552
        self._freeze = True
12553
12554 1
    def to_binary(self):
12555
        packet = []
12556
        packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval))
12557
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount))
12558
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount))
12559
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
12560
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
12561
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
12562
        return b''.join(packet)
12563
12564 1
    @staticmethod
12565
    def from_binary(data):
12566
        return CreateSubscriptionParameters(data)
12567
12568 1
    def _binary_init(self, data):
12569
        self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data)
12570
        self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12571
        self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12572
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
12573
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
12574
        self.Priority = uabin.Primitives.Byte.unpack(data)
12575
12576 1
    def __str__(self):
12577
        return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
12578
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
12579
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
12580
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
12581
               'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
12582
               'Priority:' + str(self.Priority) + ')'
12583
12584 1
    __repr__ = __str__
12585
12586
12587 1
class CreateSubscriptionRequest(FrozenClass):
12588
    '''
12589
    :ivar TypeId:
12590
    :vartype TypeId: NodeId
12591
    :ivar RequestHeader:
12592
    :vartype RequestHeader: RequestHeader
12593
    :ivar Parameters:
12594
    :vartype Parameters: CreateSubscriptionParameters
12595
    '''
12596
12597 1
    ua_types = {
12598
        'TypeId': 'NodeId',
12599
        'RequestHeader': 'RequestHeader',
12600
        'Parameters': 'CreateSubscriptionParameters',
12601
               }
12602
12603 1
    def __init__(self, binary=None):
12604
        if binary is not None:
12605
            self._binary_init(binary)
12606
            self._freeze = True
12607
            return
12608
        self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary)
12609
        self.RequestHeader = RequestHeader()
12610
        self.Parameters = CreateSubscriptionParameters()
12611
        self._freeze = True
12612
12613 1
    def to_binary(self):
12614
        packet = []
12615
        packet.append(self.TypeId.to_binary())
12616
        packet.append(self.RequestHeader.to_binary())
12617
        packet.append(self.Parameters.to_binary())
12618
        return b''.join(packet)
12619
12620 1
    @staticmethod
12621
    def from_binary(data):
12622
        return CreateSubscriptionRequest(data)
12623
12624 1
    def _binary_init(self, data):
12625
        self.TypeId = NodeId.from_binary(data)
12626
        self.RequestHeader = RequestHeader.from_binary(data)
12627
        self.Parameters = CreateSubscriptionParameters.from_binary(data)
12628
12629 1
    def __str__(self):
12630
        return 'CreateSubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12631
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12632
               'Parameters:' + str(self.Parameters) + ')'
12633
12634 1
    __repr__ = __str__
12635
12636
12637 1
class CreateSubscriptionResult(FrozenClass):
12638
    '''
12639
    :ivar SubscriptionId:
12640
    :vartype SubscriptionId: UInt32
12641
    :ivar RevisedPublishingInterval:
12642
    :vartype RevisedPublishingInterval: Double
12643
    :ivar RevisedLifetimeCount:
12644
    :vartype RevisedLifetimeCount: UInt32
12645
    :ivar RevisedMaxKeepAliveCount:
12646
    :vartype RevisedMaxKeepAliveCount: UInt32
12647
    '''
12648
12649 1
    ua_types = {
12650
        'SubscriptionId': 'UInt32',
12651
        'RevisedPublishingInterval': 'Double',
12652
        'RevisedLifetimeCount': 'UInt32',
12653
        'RevisedMaxKeepAliveCount': 'UInt32',
12654
               }
12655
12656 1
    def __init__(self, binary=None):
12657
        if binary is not None:
12658
            self._binary_init(binary)
12659
            self._freeze = True
12660
            return
12661
        self.SubscriptionId = 0
12662
        self.RevisedPublishingInterval = 0
12663
        self.RevisedLifetimeCount = 0
12664
        self.RevisedMaxKeepAliveCount = 0
12665
        self._freeze = True
12666
12667 1
    def to_binary(self):
12668
        packet = []
12669
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12670
        packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval))
12671
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount))
12672
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount))
12673
        return b''.join(packet)
12674
12675 1
    @staticmethod
12676
    def from_binary(data):
12677
        return CreateSubscriptionResult(data)
12678
12679 1
    def _binary_init(self, data):
12680
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12681
        self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data)
12682
        self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12683
        self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12684
12685 1
    def __str__(self):
12686
        return 'CreateSubscriptionResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12687
               'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \
12688
               'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \
12689
               'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')'
12690
12691 1
    __repr__ = __str__
12692
12693
12694 1
class CreateSubscriptionResponse(FrozenClass):
12695
    '''
12696
    :ivar TypeId:
12697
    :vartype TypeId: NodeId
12698
    :ivar ResponseHeader:
12699
    :vartype ResponseHeader: ResponseHeader
12700
    :ivar Parameters:
12701
    :vartype Parameters: CreateSubscriptionResult
12702
    '''
12703
12704 1
    ua_types = {
12705
        'TypeId': 'NodeId',
12706
        'ResponseHeader': 'ResponseHeader',
12707
        'Parameters': 'CreateSubscriptionResult',
12708
               }
12709
12710 1
    def __init__(self, binary=None):
12711
        if binary is not None:
12712
            self._binary_init(binary)
12713
            self._freeze = True
12714
            return
12715
        self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary)
12716
        self.ResponseHeader = ResponseHeader()
12717
        self.Parameters = CreateSubscriptionResult()
12718
        self._freeze = True
12719
12720 1
    def to_binary(self):
12721
        packet = []
12722
        packet.append(self.TypeId.to_binary())
12723
        packet.append(self.ResponseHeader.to_binary())
12724
        packet.append(self.Parameters.to_binary())
12725
        return b''.join(packet)
12726
12727 1
    @staticmethod
12728
    def from_binary(data):
12729
        return CreateSubscriptionResponse(data)
12730
12731 1
    def _binary_init(self, data):
12732
        self.TypeId = NodeId.from_binary(data)
12733
        self.ResponseHeader = ResponseHeader.from_binary(data)
12734
        self.Parameters = CreateSubscriptionResult.from_binary(data)
12735
12736 1
    def __str__(self):
12737
        return 'CreateSubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12738
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12739
               'Parameters:' + str(self.Parameters) + ')'
12740
12741 1
    __repr__ = __str__
12742
12743
12744 1 View Code Duplication
class ModifySubscriptionParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12745
    '''
12746
    :ivar SubscriptionId:
12747
    :vartype SubscriptionId: UInt32
12748
    :ivar RequestedPublishingInterval:
12749
    :vartype RequestedPublishingInterval: Double
12750
    :ivar RequestedLifetimeCount:
12751
    :vartype RequestedLifetimeCount: UInt32
12752
    :ivar RequestedMaxKeepAliveCount:
12753
    :vartype RequestedMaxKeepAliveCount: UInt32
12754
    :ivar MaxNotificationsPerPublish:
12755
    :vartype MaxNotificationsPerPublish: UInt32
12756
    :ivar Priority:
12757
    :vartype Priority: Byte
12758
    '''
12759
12760 1
    ua_types = {
12761
        'SubscriptionId': 'UInt32',
12762
        'RequestedPublishingInterval': 'Double',
12763
        'RequestedLifetimeCount': 'UInt32',
12764
        'RequestedMaxKeepAliveCount': 'UInt32',
12765
        'MaxNotificationsPerPublish': 'UInt32',
12766
        'Priority': 'Byte',
12767
               }
12768
12769 1
    def __init__(self, binary=None):
12770
        if binary is not None:
12771
            self._binary_init(binary)
12772
            self._freeze = True
12773
            return
12774
        self.SubscriptionId = 0
12775
        self.RequestedPublishingInterval = 0
12776
        self.RequestedLifetimeCount = 0
12777
        self.RequestedMaxKeepAliveCount = 0
12778
        self.MaxNotificationsPerPublish = 0
12779
        self.Priority = 0
12780
        self._freeze = True
12781
12782 1
    def to_binary(self):
12783
        packet = []
12784
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12785
        packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval))
12786
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount))
12787
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount))
12788
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
12789
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
12790
        return b''.join(packet)
12791
12792 1
    @staticmethod
12793
    def from_binary(data):
12794
        return ModifySubscriptionParameters(data)
12795
12796 1
    def _binary_init(self, data):
12797
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12798
        self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data)
12799
        self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12800
        self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12801
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
12802
        self.Priority = uabin.Primitives.Byte.unpack(data)
12803
12804 1
    def __str__(self):
12805
        return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12806
               'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
12807
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
12808
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
12809
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
12810
               'Priority:' + str(self.Priority) + ')'
12811
12812 1
    __repr__ = __str__
12813
12814
12815 1
class ModifySubscriptionRequest(FrozenClass):
12816
    '''
12817
    :ivar TypeId:
12818
    :vartype TypeId: NodeId
12819
    :ivar RequestHeader:
12820
    :vartype RequestHeader: RequestHeader
12821
    :ivar Parameters:
12822
    :vartype Parameters: ModifySubscriptionParameters
12823
    '''
12824
12825 1
    ua_types = {
12826
        'TypeId': 'NodeId',
12827
        'RequestHeader': 'RequestHeader',
12828
        'Parameters': 'ModifySubscriptionParameters',
12829
               }
12830
12831 1
    def __init__(self, binary=None):
12832
        if binary is not None:
12833
            self._binary_init(binary)
12834
            self._freeze = True
12835
            return
12836
        self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary)
12837
        self.RequestHeader = RequestHeader()
12838
        self.Parameters = ModifySubscriptionParameters()
12839
        self._freeze = True
12840
12841 1
    def to_binary(self):
12842
        packet = []
12843
        packet.append(self.TypeId.to_binary())
12844
        packet.append(self.RequestHeader.to_binary())
12845
        packet.append(self.Parameters.to_binary())
12846
        return b''.join(packet)
12847
12848 1
    @staticmethod
12849
    def from_binary(data):
12850
        return ModifySubscriptionRequest(data)
12851
12852 1
    def _binary_init(self, data):
12853
        self.TypeId = NodeId.from_binary(data)
12854
        self.RequestHeader = RequestHeader.from_binary(data)
12855
        self.Parameters = ModifySubscriptionParameters.from_binary(data)
12856
12857 1
    def __str__(self):
12858
        return 'ModifySubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12859
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12860
               'Parameters:' + str(self.Parameters) + ')'
12861
12862 1
    __repr__ = __str__
12863
12864
12865 1
class ModifySubscriptionResult(FrozenClass):
12866
    '''
12867
    :ivar RevisedPublishingInterval:
12868
    :vartype RevisedPublishingInterval: Double
12869
    :ivar RevisedLifetimeCount:
12870
    :vartype RevisedLifetimeCount: UInt32
12871
    :ivar RevisedMaxKeepAliveCount:
12872
    :vartype RevisedMaxKeepAliveCount: UInt32
12873
    '''
12874
12875 1
    ua_types = {
12876
        'RevisedPublishingInterval': 'Double',
12877
        'RevisedLifetimeCount': 'UInt32',
12878
        'RevisedMaxKeepAliveCount': 'UInt32',
12879
               }
12880
12881 1
    def __init__(self, binary=None):
12882
        if binary is not None:
12883
            self._binary_init(binary)
12884
            self._freeze = True
12885
            return
12886
        self.RevisedPublishingInterval = 0
12887
        self.RevisedLifetimeCount = 0
12888
        self.RevisedMaxKeepAliveCount = 0
12889
        self._freeze = True
12890
12891 1
    def to_binary(self):
12892
        packet = []
12893
        packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval))
12894
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount))
12895
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount))
12896
        return b''.join(packet)
12897
12898 1
    @staticmethod
12899
    def from_binary(data):
12900
        return ModifySubscriptionResult(data)
12901
12902 1
    def _binary_init(self, data):
12903
        self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data)
12904
        self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12905
        self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12906
12907 1
    def __str__(self):
12908
        return 'ModifySubscriptionResult(' + 'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \
12909
               'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \
12910
               'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')'
12911
12912 1
    __repr__ = __str__
12913
12914
12915 1
class ModifySubscriptionResponse(FrozenClass):
12916
    '''
12917
    :ivar TypeId:
12918
    :vartype TypeId: NodeId
12919
    :ivar ResponseHeader:
12920
    :vartype ResponseHeader: ResponseHeader
12921
    :ivar Parameters:
12922
    :vartype Parameters: ModifySubscriptionResult
12923
    '''
12924
12925 1
    ua_types = {
12926
        'TypeId': 'NodeId',
12927
        'ResponseHeader': 'ResponseHeader',
12928
        'Parameters': 'ModifySubscriptionResult',
12929
               }
12930
12931 1
    def __init__(self, binary=None):
12932
        if binary is not None:
12933
            self._binary_init(binary)
12934
            self._freeze = True
12935
            return
12936
        self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary)
12937
        self.ResponseHeader = ResponseHeader()
12938
        self.Parameters = ModifySubscriptionResult()
12939
        self._freeze = True
12940
12941 1
    def to_binary(self):
12942
        packet = []
12943
        packet.append(self.TypeId.to_binary())
12944
        packet.append(self.ResponseHeader.to_binary())
12945
        packet.append(self.Parameters.to_binary())
12946
        return b''.join(packet)
12947
12948 1
    @staticmethod
12949
    def from_binary(data):
12950
        return ModifySubscriptionResponse(data)
12951
12952 1
    def _binary_init(self, data):
12953
        self.TypeId = NodeId.from_binary(data)
12954
        self.ResponseHeader = ResponseHeader.from_binary(data)
12955
        self.Parameters = ModifySubscriptionResult.from_binary(data)
12956
12957 1
    def __str__(self):
12958
        return 'ModifySubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12959
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12960
               'Parameters:' + str(self.Parameters) + ')'
12961
12962 1
    __repr__ = __str__
12963
12964
12965 1 View Code Duplication
class SetPublishingModeParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12966
    '''
12967
    :ivar PublishingEnabled:
12968
    :vartype PublishingEnabled: Boolean
12969
    :ivar SubscriptionIds:
12970
    :vartype SubscriptionIds: UInt32
12971
    '''
12972
12973 1
    ua_types = {
12974
        'PublishingEnabled': 'Boolean',
12975
        'SubscriptionIds': 'UInt32',
12976
               }
12977
12978 1
    def __init__(self, binary=None):
12979
        if binary is not None:
12980
            self._binary_init(binary)
12981
            self._freeze = True
12982
            return
12983
        self.PublishingEnabled = True
12984
        self.SubscriptionIds = []
12985
        self._freeze = True
12986
12987 1
    def to_binary(self):
12988
        packet = []
12989
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
12990
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
12991
        for fieldname in self.SubscriptionIds:
12992
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
12993
        return b''.join(packet)
12994
12995 1
    @staticmethod
12996
    def from_binary(data):
12997
        return SetPublishingModeParameters(data)
12998
12999 1
    def _binary_init(self, data):
13000
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
13001
        self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
13002
13003 1
    def __str__(self):
13004
        return 'SetPublishingModeParameters(' + 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
13005
               'SubscriptionIds:' + str(self.SubscriptionIds) + ')'
13006
13007 1
    __repr__ = __str__
13008
13009
13010 1
class SetPublishingModeRequest(FrozenClass):
13011
    '''
13012
    :ivar TypeId:
13013
    :vartype TypeId: NodeId
13014
    :ivar RequestHeader:
13015
    :vartype RequestHeader: RequestHeader
13016
    :ivar Parameters:
13017
    :vartype Parameters: SetPublishingModeParameters
13018
    '''
13019
13020 1
    ua_types = {
13021
        'TypeId': 'NodeId',
13022
        'RequestHeader': 'RequestHeader',
13023
        'Parameters': 'SetPublishingModeParameters',
13024
               }
13025
13026 1
    def __init__(self, binary=None):
13027
        if binary is not None:
13028
            self._binary_init(binary)
13029
            self._freeze = True
13030
            return
13031
        self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary)
13032
        self.RequestHeader = RequestHeader()
13033
        self.Parameters = SetPublishingModeParameters()
13034
        self._freeze = True
13035
13036 1
    def to_binary(self):
13037
        packet = []
13038
        packet.append(self.TypeId.to_binary())
13039
        packet.append(self.RequestHeader.to_binary())
13040
        packet.append(self.Parameters.to_binary())
13041
        return b''.join(packet)
13042
13043 1
    @staticmethod
13044
    def from_binary(data):
13045
        return SetPublishingModeRequest(data)
13046
13047 1
    def _binary_init(self, data):
13048
        self.TypeId = NodeId.from_binary(data)
13049
        self.RequestHeader = RequestHeader.from_binary(data)
13050
        self.Parameters = SetPublishingModeParameters.from_binary(data)
13051
13052 1
    def __str__(self):
13053
        return 'SetPublishingModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13054
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13055
               'Parameters:' + str(self.Parameters) + ')'
13056
13057 1
    __repr__ = __str__
13058
13059
13060 1 View Code Duplication
class SetPublishingModeResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13061
    '''
13062
    :ivar Results:
13063
    :vartype Results: StatusCode
13064
    :ivar DiagnosticInfos:
13065
    :vartype DiagnosticInfos: DiagnosticInfo
13066
    '''
13067
13068 1
    ua_types = {
13069
        'Results': 'StatusCode',
13070
        'DiagnosticInfos': 'DiagnosticInfo',
13071
               }
13072
13073 1
    def __init__(self, binary=None):
13074
        if binary is not None:
13075
            self._binary_init(binary)
13076
            self._freeze = True
13077
            return
13078
        self.Results = []
13079
        self.DiagnosticInfos = []
13080
        self._freeze = True
13081
13082 1
    def to_binary(self):
13083
        packet = []
13084
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
13085
        for fieldname in self.Results:
13086
            packet.append(fieldname.to_binary())
13087
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13088
        for fieldname in self.DiagnosticInfos:
13089
            packet.append(fieldname.to_binary())
13090
        return b''.join(packet)
13091
13092 1
    @staticmethod
13093
    def from_binary(data):
13094
        return SetPublishingModeResult(data)
13095
13096 1
    def _binary_init(self, data):
13097
        length = uabin.Primitives.Int32.unpack(data)
13098
        array = []
13099
        if length != -1:
13100
            for _ in range(0, length):
13101
                array.append(StatusCode.from_binary(data))
13102
        self.Results = array
13103
        length = uabin.Primitives.Int32.unpack(data)
13104
        array = []
13105
        if length != -1:
13106
            for _ in range(0, length):
13107
                array.append(DiagnosticInfo.from_binary(data))
13108
        self.DiagnosticInfos = array
13109
13110 1
    def __str__(self):
13111
        return 'SetPublishingModeResult(' + 'Results:' + str(self.Results) + ', ' + \
13112
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13113
13114 1
    __repr__ = __str__
13115
13116
13117 1
class SetPublishingModeResponse(FrozenClass):
13118
    '''
13119
    :ivar TypeId:
13120
    :vartype TypeId: NodeId
13121
    :ivar ResponseHeader:
13122
    :vartype ResponseHeader: ResponseHeader
13123
    :ivar Parameters:
13124
    :vartype Parameters: SetPublishingModeResult
13125
    '''
13126
13127 1
    ua_types = {
13128
        'TypeId': 'NodeId',
13129
        'ResponseHeader': 'ResponseHeader',
13130
        'Parameters': 'SetPublishingModeResult',
13131
               }
13132
13133 1
    def __init__(self, binary=None):
13134
        if binary is not None:
13135
            self._binary_init(binary)
13136
            self._freeze = True
13137
            return
13138
        self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary)
13139
        self.ResponseHeader = ResponseHeader()
13140
        self.Parameters = SetPublishingModeResult()
13141
        self._freeze = True
13142
13143 1
    def to_binary(self):
13144
        packet = []
13145
        packet.append(self.TypeId.to_binary())
13146
        packet.append(self.ResponseHeader.to_binary())
13147
        packet.append(self.Parameters.to_binary())
13148
        return b''.join(packet)
13149
13150 1
    @staticmethod
13151
    def from_binary(data):
13152
        return SetPublishingModeResponse(data)
13153
13154 1
    def _binary_init(self, data):
13155
        self.TypeId = NodeId.from_binary(data)
13156
        self.ResponseHeader = ResponseHeader.from_binary(data)
13157
        self.Parameters = SetPublishingModeResult.from_binary(data)
13158
13159 1
    def __str__(self):
13160
        return 'SetPublishingModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13161
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13162
               'Parameters:' + str(self.Parameters) + ')'
13163
13164 1
    __repr__ = __str__
13165
13166
13167 1 View Code Duplication
class NotificationMessage(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13168
    '''
13169
    :ivar SequenceNumber:
13170
    :vartype SequenceNumber: UInt32
13171
    :ivar PublishTime:
13172
    :vartype PublishTime: DateTime
13173
    :ivar NotificationData:
13174
    :vartype NotificationData: ExtensionObject
13175
    '''
13176
13177 1
    ua_types = {
13178
        'SequenceNumber': 'UInt32',
13179
        'PublishTime': 'DateTime',
13180
        'NotificationData': 'ExtensionObject',
13181
               }
13182
13183 1
    def __init__(self, binary=None):
13184
        if binary is not None:
13185
            self._binary_init(binary)
13186
            self._freeze = True
13187
            return
13188
        self.SequenceNumber = 0
13189
        self.PublishTime = datetime.utcnow()
13190
        self.NotificationData = []
13191
        self._freeze = True
13192
13193 1
    def to_binary(self):
13194
        packet = []
13195
        packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber))
13196
        packet.append(uabin.Primitives.DateTime.pack(self.PublishTime))
13197
        packet.append(uabin.Primitives.Int32.pack(len(self.NotificationData)))
13198
        for fieldname in self.NotificationData:
13199
            packet.append(extensionobject_to_binary(fieldname))
13200
        return b''.join(packet)
13201
13202 1
    @staticmethod
13203
    def from_binary(data):
13204
        return NotificationMessage(data)
13205
13206 1
    def _binary_init(self, data):
13207
        self.SequenceNumber = uabin.Primitives.UInt32.unpack(data)
13208
        self.PublishTime = uabin.Primitives.DateTime.unpack(data)
13209
        length = uabin.Primitives.Int32.unpack(data)
13210
        array = []
13211
        if length != -1:
13212
            for _ in range(0, length):
13213
                array.append(extensionobject_from_binary(data))
13214
        self.NotificationData = array
13215
13216 1
    def __str__(self):
13217
        return 'NotificationMessage(' + 'SequenceNumber:' + str(self.SequenceNumber) + ', ' + \
13218
               'PublishTime:' + str(self.PublishTime) + ', ' + \
13219
               'NotificationData:' + str(self.NotificationData) + ')'
13220
13221 1
    __repr__ = __str__
13222
13223
13224 1 View Code Duplication
class NotificationData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13225
    '''
13226
    '''
13227
13228 1
    ua_types = {
13229
               }
13230
13231 1
    def __init__(self, binary=None):
13232
        if binary is not None:
13233
            self._binary_init(binary)
13234
            self._freeze = True
13235
            return
13236
        self._freeze = True
13237
13238 1
    def to_binary(self):
13239
        packet = []
13240
        return b''.join(packet)
13241
13242 1
    @staticmethod
13243
    def from_binary(data):
13244
        return NotificationData(data)
13245
13246 1
    def _binary_init(self, data):
13247
        pass
13248
13249 1
    def __str__(self):
13250
        return 'NotificationData(' +  + ')'
13251
13252 1
    __repr__ = __str__
13253
13254
13255 1 View Code Duplication
class DataChangeNotification(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13256
    '''
13257
    :ivar MonitoredItems:
13258
    :vartype MonitoredItems: MonitoredItemNotification
13259
    :ivar DiagnosticInfos:
13260
    :vartype DiagnosticInfos: DiagnosticInfo
13261
    '''
13262
13263 1
    ua_types = {
13264
        'MonitoredItems': 'MonitoredItemNotification',
13265
        'DiagnosticInfos': 'DiagnosticInfo',
13266
               }
13267
13268 1
    def __init__(self, binary=None):
13269
        if binary is not None:
13270
            self._binary_init(binary)
13271
            self._freeze = True
13272
            return
13273
        self.MonitoredItems = []
13274
        self.DiagnosticInfos = []
13275
        self._freeze = True
13276
13277 1
    def to_binary(self):
13278
        packet = []
13279
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItems)))
13280
        for fieldname in self.MonitoredItems:
13281
            packet.append(fieldname.to_binary())
13282
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13283
        for fieldname in self.DiagnosticInfos:
13284
            packet.append(fieldname.to_binary())
13285
        return b''.join(packet)
13286
13287 1
    @staticmethod
13288
    def from_binary(data):
13289
        return DataChangeNotification(data)
13290
13291 1
    def _binary_init(self, data):
13292
        length = uabin.Primitives.Int32.unpack(data)
13293
        array = []
13294
        if length != -1:
13295
            for _ in range(0, length):
13296
                array.append(MonitoredItemNotification.from_binary(data))
13297
        self.MonitoredItems = array
13298
        length = uabin.Primitives.Int32.unpack(data)
13299
        array = []
13300
        if length != -1:
13301
            for _ in range(0, length):
13302
                array.append(DiagnosticInfo.from_binary(data))
13303
        self.DiagnosticInfos = array
13304
13305 1
    def __str__(self):
13306
        return 'DataChangeNotification(' + 'MonitoredItems:' + str(self.MonitoredItems) + ', ' + \
13307
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13308
13309 1
    __repr__ = __str__
13310
13311
13312 1 View Code Duplication
class MonitoredItemNotification(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13313
    '''
13314
    :ivar ClientHandle:
13315
    :vartype ClientHandle: UInt32
13316
    :ivar Value:
13317
    :vartype Value: DataValue
13318
    '''
13319
13320 1
    ua_types = {
13321
        'ClientHandle': 'UInt32',
13322
        'Value': 'DataValue',
13323
               }
13324
13325 1
    def __init__(self, binary=None):
13326
        if binary is not None:
13327
            self._binary_init(binary)
13328
            self._freeze = True
13329
            return
13330
        self.ClientHandle = 0
13331
        self.Value = DataValue()
13332
        self._freeze = True
13333
13334 1
    def to_binary(self):
13335
        packet = []
13336
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
13337
        packet.append(self.Value.to_binary())
13338
        return b''.join(packet)
13339
13340 1
    @staticmethod
13341
    def from_binary(data):
13342
        return MonitoredItemNotification(data)
13343
13344 1
    def _binary_init(self, data):
13345
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
13346
        self.Value = DataValue.from_binary(data)
13347
13348 1
    def __str__(self):
13349
        return 'MonitoredItemNotification(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
13350
               'Value:' + str(self.Value) + ')'
13351
13352 1
    __repr__ = __str__
13353
13354
13355 1 View Code Duplication
class EventNotificationList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13356
    '''
13357
    :ivar Events:
13358
    :vartype Events: EventFieldList
13359
    '''
13360
13361 1
    ua_types = {
13362
        'Events': 'EventFieldList',
13363
               }
13364
13365 1
    def __init__(self, binary=None):
13366
        if binary is not None:
13367
            self._binary_init(binary)
13368
            self._freeze = True
13369
            return
13370
        self.Events = []
13371
        self._freeze = True
13372
13373 1
    def to_binary(self):
13374
        packet = []
13375
        packet.append(uabin.Primitives.Int32.pack(len(self.Events)))
13376
        for fieldname in self.Events:
13377
            packet.append(fieldname.to_binary())
13378
        return b''.join(packet)
13379
13380 1
    @staticmethod
13381
    def from_binary(data):
13382
        return EventNotificationList(data)
13383
13384 1
    def _binary_init(self, data):
13385
        length = uabin.Primitives.Int32.unpack(data)
13386
        array = []
13387
        if length != -1:
13388
            for _ in range(0, length):
13389
                array.append(EventFieldList.from_binary(data))
13390
        self.Events = array
13391
13392 1
    def __str__(self):
13393
        return 'EventNotificationList(' + 'Events:' + str(self.Events) + ')'
13394
13395 1
    __repr__ = __str__
13396
13397
13398 1 View Code Duplication
class EventFieldList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13399
    '''
13400
    :ivar ClientHandle:
13401
    :vartype ClientHandle: UInt32
13402
    :ivar EventFields:
13403
    :vartype EventFields: Variant
13404
    '''
13405
13406 1
    ua_types = {
13407
        'ClientHandle': 'UInt32',
13408
        'EventFields': 'Variant',
13409
               }
13410
13411 1
    def __init__(self, binary=None):
13412
        if binary is not None:
13413
            self._binary_init(binary)
13414
            self._freeze = True
13415
            return
13416
        self.ClientHandle = 0
13417
        self.EventFields = []
13418
        self._freeze = True
13419
13420 1
    def to_binary(self):
13421
        packet = []
13422
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
13423
        packet.append(uabin.Primitives.Int32.pack(len(self.EventFields)))
13424
        for fieldname in self.EventFields:
13425
            packet.append(fieldname.to_binary())
13426
        return b''.join(packet)
13427
13428 1
    @staticmethod
13429
    def from_binary(data):
13430
        return EventFieldList(data)
13431
13432 1
    def _binary_init(self, data):
13433
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
13434
        length = uabin.Primitives.Int32.unpack(data)
13435
        array = []
13436
        if length != -1:
13437
            for _ in range(0, length):
13438
                array.append(Variant.from_binary(data))
13439
        self.EventFields = array
13440
13441 1
    def __str__(self):
13442
        return 'EventFieldList(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
13443
               'EventFields:' + str(self.EventFields) + ')'
13444
13445 1
    __repr__ = __str__
13446
13447
13448 1 View Code Duplication
class HistoryEventFieldList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13449
    '''
13450
    :ivar EventFields:
13451
    :vartype EventFields: Variant
13452
    '''
13453
13454 1
    ua_types = {
13455
        'EventFields': 'Variant',
13456
               }
13457
13458 1
    def __init__(self, binary=None):
13459
        if binary is not None:
13460
            self._binary_init(binary)
13461
            self._freeze = True
13462
            return
13463
        self.EventFields = []
13464
        self._freeze = True
13465
13466 1
    def to_binary(self):
13467
        packet = []
13468
        packet.append(uabin.Primitives.Int32.pack(len(self.EventFields)))
13469
        for fieldname in self.EventFields:
13470
            packet.append(fieldname.to_binary())
13471
        return b''.join(packet)
13472
13473 1
    @staticmethod
13474
    def from_binary(data):
13475
        return HistoryEventFieldList(data)
13476
13477 1
    def _binary_init(self, data):
13478
        length = uabin.Primitives.Int32.unpack(data)
13479
        array = []
13480
        if length != -1:
13481
            for _ in range(0, length):
13482
                array.append(Variant.from_binary(data))
13483
        self.EventFields = array
13484
13485 1
    def __str__(self):
13486
        return 'HistoryEventFieldList(' + 'EventFields:' + str(self.EventFields) + ')'
13487
13488 1
    __repr__ = __str__
13489
13490
13491 1
class StatusChangeNotification(FrozenClass):
13492
    '''
13493
    :ivar Status:
13494
    :vartype Status: StatusCode
13495
    :ivar DiagnosticInfo:
13496
    :vartype DiagnosticInfo: DiagnosticInfo
13497
    '''
13498
13499 1
    ua_types = {
13500
        'Status': 'StatusCode',
13501
        'DiagnosticInfo': 'DiagnosticInfo',
13502
               }
13503
13504 1
    def __init__(self, binary=None):
13505
        if binary is not None:
13506
            self._binary_init(binary)
13507
            self._freeze = True
13508
            return
13509
        self.Status = StatusCode()
13510
        self.DiagnosticInfo = DiagnosticInfo()
13511
        self._freeze = True
13512
13513 1
    def to_binary(self):
13514
        packet = []
13515
        packet.append(self.Status.to_binary())
13516
        packet.append(self.DiagnosticInfo.to_binary())
13517
        return b''.join(packet)
13518
13519 1
    @staticmethod
13520
    def from_binary(data):
13521
        return StatusChangeNotification(data)
13522
13523 1
    def _binary_init(self, data):
13524
        self.Status = StatusCode.from_binary(data)
13525
        self.DiagnosticInfo = DiagnosticInfo.from_binary(data)
13526
13527 1
    def __str__(self):
13528
        return 'StatusChangeNotification(' + 'Status:' + str(self.Status) + ', ' + \
13529
               'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')'
13530
13531 1
    __repr__ = __str__
13532
13533
13534 1 View Code Duplication
class SubscriptionAcknowledgement(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13535
    '''
13536
    :ivar SubscriptionId:
13537
    :vartype SubscriptionId: UInt32
13538
    :ivar SequenceNumber:
13539
    :vartype SequenceNumber: UInt32
13540
    '''
13541
13542 1
    ua_types = {
13543
        'SubscriptionId': 'UInt32',
13544
        'SequenceNumber': 'UInt32',
13545
               }
13546
13547 1
    def __init__(self, binary=None):
13548
        if binary is not None:
13549
            self._binary_init(binary)
13550
            self._freeze = True
13551
            return
13552
        self.SubscriptionId = 0
13553
        self.SequenceNumber = 0
13554
        self._freeze = True
13555
13556 1
    def to_binary(self):
13557
        packet = []
13558
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
13559
        packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber))
13560
        return b''.join(packet)
13561
13562 1
    @staticmethod
13563
    def from_binary(data):
13564
        return SubscriptionAcknowledgement(data)
13565
13566 1
    def _binary_init(self, data):
13567
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
13568
        self.SequenceNumber = uabin.Primitives.UInt32.unpack(data)
13569
13570 1
    def __str__(self):
13571
        return 'SubscriptionAcknowledgement(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
13572
               'SequenceNumber:' + str(self.SequenceNumber) + ')'
13573
13574 1
    __repr__ = __str__
13575
13576
13577 1 View Code Duplication
class PublishParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13578
    '''
13579
    :ivar SubscriptionAcknowledgements:
13580
    :vartype SubscriptionAcknowledgements: SubscriptionAcknowledgement
13581
    '''
13582
13583 1
    ua_types = {
13584
        'SubscriptionAcknowledgements': 'SubscriptionAcknowledgement',
13585
               }
13586
13587 1
    def __init__(self, binary=None):
13588
        if binary is not None:
13589
            self._binary_init(binary)
13590
            self._freeze = True
13591
            return
13592
        self.SubscriptionAcknowledgements = []
13593
        self._freeze = True
13594
13595 1
    def to_binary(self):
13596
        packet = []
13597
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionAcknowledgements)))
13598
        for fieldname in self.SubscriptionAcknowledgements:
13599
            packet.append(fieldname.to_binary())
13600
        return b''.join(packet)
13601
13602 1
    @staticmethod
13603
    def from_binary(data):
13604
        return PublishParameters(data)
13605
13606 1
    def _binary_init(self, data):
13607
        length = uabin.Primitives.Int32.unpack(data)
13608
        array = []
13609
        if length != -1:
13610
            for _ in range(0, length):
13611
                array.append(SubscriptionAcknowledgement.from_binary(data))
13612
        self.SubscriptionAcknowledgements = array
13613
13614 1
    def __str__(self):
13615
        return 'PublishParameters(' + 'SubscriptionAcknowledgements:' + str(self.SubscriptionAcknowledgements) + ')'
13616
13617 1
    __repr__ = __str__
13618
13619
13620 1
class PublishRequest(FrozenClass):
13621
    '''
13622
    :ivar TypeId:
13623
    :vartype TypeId: NodeId
13624
    :ivar RequestHeader:
13625
    :vartype RequestHeader: RequestHeader
13626
    :ivar Parameters:
13627
    :vartype Parameters: PublishParameters
13628
    '''
13629
13630 1
    ua_types = {
13631
        'TypeId': 'NodeId',
13632
        'RequestHeader': 'RequestHeader',
13633
        'Parameters': 'PublishParameters',
13634
               }
13635
13636 1
    def __init__(self, binary=None):
13637
        if binary is not None:
13638
            self._binary_init(binary)
13639
            self._freeze = True
13640
            return
13641
        self.TypeId = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary)
13642
        self.RequestHeader = RequestHeader()
13643
        self.Parameters = PublishParameters()
13644
        self._freeze = True
13645
13646 1
    def to_binary(self):
13647
        packet = []
13648
        packet.append(self.TypeId.to_binary())
13649
        packet.append(self.RequestHeader.to_binary())
13650
        packet.append(self.Parameters.to_binary())
13651
        return b''.join(packet)
13652
13653 1
    @staticmethod
13654
    def from_binary(data):
13655
        return PublishRequest(data)
13656
13657 1
    def _binary_init(self, data):
13658
        self.TypeId = NodeId.from_binary(data)
13659
        self.RequestHeader = RequestHeader.from_binary(data)
13660
        self.Parameters = PublishParameters.from_binary(data)
13661
13662 1
    def __str__(self):
13663
        return 'PublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13664
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13665
               'Parameters:' + str(self.Parameters) + ')'
13666
13667 1
    __repr__ = __str__
13668
13669
13670 1
class PublishResult(FrozenClass):
13671
    '''
13672
    :ivar SubscriptionId:
13673
    :vartype SubscriptionId: UInt32
13674
    :ivar AvailableSequenceNumbers:
13675
    :vartype AvailableSequenceNumbers: UInt32
13676
    :ivar MoreNotifications:
13677
    :vartype MoreNotifications: Boolean
13678
    :ivar NotificationMessage:
13679
    :vartype NotificationMessage: NotificationMessage
13680
    :ivar Results:
13681
    :vartype Results: StatusCode
13682
    :ivar DiagnosticInfos:
13683
    :vartype DiagnosticInfos: DiagnosticInfo
13684
    '''
13685
13686 1
    ua_types = {
13687
        'SubscriptionId': 'UInt32',
13688
        'AvailableSequenceNumbers': 'UInt32',
13689
        'MoreNotifications': 'Boolean',
13690
        'NotificationMessage': 'NotificationMessage',
13691
        'Results': 'StatusCode',
13692
        'DiagnosticInfos': 'DiagnosticInfo',
13693
               }
13694
13695 1
    def __init__(self, binary=None):
13696
        if binary is not None:
13697
            self._binary_init(binary)
13698
            self._freeze = True
13699
            return
13700
        self.SubscriptionId = 0
13701
        self.AvailableSequenceNumbers = []
13702
        self.MoreNotifications = True
13703
        self.NotificationMessage = NotificationMessage()
13704
        self.Results = []
13705
        self.DiagnosticInfos = []
13706
        self._freeze = True
13707
13708 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13709
        packet = []
13710
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
13711
        packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers)))
13712
        for fieldname in self.AvailableSequenceNumbers:
13713
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13714
        packet.append(uabin.Primitives.Boolean.pack(self.MoreNotifications))
13715
        packet.append(self.NotificationMessage.to_binary())
13716
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
13717
        for fieldname in self.Results:
13718
            packet.append(fieldname.to_binary())
13719
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13720
        for fieldname in self.DiagnosticInfos:
13721
            packet.append(fieldname.to_binary())
13722
        return b''.join(packet)
13723
13724 1
    @staticmethod
13725
    def from_binary(data):
13726
        return PublishResult(data)
13727
13728 1
    def _binary_init(self, data):
13729
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
13730
        self.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data)
13731
        self.MoreNotifications = uabin.Primitives.Boolean.unpack(data)
13732
        self.NotificationMessage = NotificationMessage.from_binary(data)
13733
        length = uabin.Primitives.Int32.unpack(data)
13734
        array = []
13735
        if length != -1:
13736
            for _ in range(0, length):
13737
                array.append(StatusCode.from_binary(data))
13738
        self.Results = array
13739
        length = uabin.Primitives.Int32.unpack(data)
13740
        array = []
13741
        if length != -1:
13742
            for _ in range(0, length):
13743
                array.append(DiagnosticInfo.from_binary(data))
13744
        self.DiagnosticInfos = array
13745
13746 1
    def __str__(self):
13747
        return 'PublishResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
13748
               'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ', ' + \
13749
               'MoreNotifications:' + str(self.MoreNotifications) + ', ' + \
13750
               'NotificationMessage:' + str(self.NotificationMessage) + ', ' + \
13751
               'Results:' + str(self.Results) + ', ' + \
13752
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13753
13754 1
    __repr__ = __str__
13755
13756
13757 1
class PublishResponse(FrozenClass):
13758
    '''
13759
    :ivar TypeId:
13760
    :vartype TypeId: NodeId
13761
    :ivar ResponseHeader:
13762
    :vartype ResponseHeader: ResponseHeader
13763
    :ivar Parameters:
13764
    :vartype Parameters: PublishResult
13765
    '''
13766
13767 1
    ua_types = {
13768
        'TypeId': 'NodeId',
13769
        'ResponseHeader': 'ResponseHeader',
13770
        'Parameters': 'PublishResult',
13771
               }
13772
13773 1
    def __init__(self, binary=None):
13774
        if binary is not None:
13775
            self._binary_init(binary)
13776
            self._freeze = True
13777
            return
13778
        self.TypeId = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary)
13779
        self.ResponseHeader = ResponseHeader()
13780
        self.Parameters = PublishResult()
13781
        self._freeze = True
13782
13783 1
    def to_binary(self):
13784
        packet = []
13785
        packet.append(self.TypeId.to_binary())
13786
        packet.append(self.ResponseHeader.to_binary())
13787
        packet.append(self.Parameters.to_binary())
13788
        return b''.join(packet)
13789
13790 1
    @staticmethod
13791
    def from_binary(data):
13792
        return PublishResponse(data)
13793
13794 1
    def _binary_init(self, data):
13795
        self.TypeId = NodeId.from_binary(data)
13796
        self.ResponseHeader = ResponseHeader.from_binary(data)
13797
        self.Parameters = PublishResult.from_binary(data)
13798
13799 1
    def __str__(self):
13800
        return 'PublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13801
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13802
               'Parameters:' + str(self.Parameters) + ')'
13803
13804 1
    __repr__ = __str__
13805
13806
13807 1 View Code Duplication
class RepublishParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13808
    '''
13809
    :ivar SubscriptionId:
13810
    :vartype SubscriptionId: UInt32
13811
    :ivar RetransmitSequenceNumber:
13812
    :vartype RetransmitSequenceNumber: UInt32
13813
    '''
13814
13815 1
    ua_types = {
13816
        'SubscriptionId': 'UInt32',
13817
        'RetransmitSequenceNumber': 'UInt32',
13818
               }
13819
13820 1
    def __init__(self, binary=None):
13821
        if binary is not None:
13822
            self._binary_init(binary)
13823
            self._freeze = True
13824
            return
13825
        self.SubscriptionId = 0
13826
        self.RetransmitSequenceNumber = 0
13827
        self._freeze = True
13828
13829 1
    def to_binary(self):
13830
        packet = []
13831
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
13832
        packet.append(uabin.Primitives.UInt32.pack(self.RetransmitSequenceNumber))
13833
        return b''.join(packet)
13834
13835 1
    @staticmethod
13836
    def from_binary(data):
13837
        return RepublishParameters(data)
13838
13839 1
    def _binary_init(self, data):
13840
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
13841
        self.RetransmitSequenceNumber = uabin.Primitives.UInt32.unpack(data)
13842
13843 1
    def __str__(self):
13844
        return 'RepublishParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
13845
               'RetransmitSequenceNumber:' + str(self.RetransmitSequenceNumber) + ')'
13846
13847 1
    __repr__ = __str__
13848
13849
13850 1
class RepublishRequest(FrozenClass):
13851
    '''
13852
    :ivar TypeId:
13853
    :vartype TypeId: NodeId
13854
    :ivar RequestHeader:
13855
    :vartype RequestHeader: RequestHeader
13856
    :ivar Parameters:
13857
    :vartype Parameters: RepublishParameters
13858
    '''
13859
13860 1
    ua_types = {
13861
        'TypeId': 'NodeId',
13862
        'RequestHeader': 'RequestHeader',
13863
        'Parameters': 'RepublishParameters',
13864
               }
13865
13866 1
    def __init__(self, binary=None):
13867
        if binary is not None:
13868
            self._binary_init(binary)
13869
            self._freeze = True
13870
            return
13871
        self.TypeId = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary)
13872
        self.RequestHeader = RequestHeader()
13873
        self.Parameters = RepublishParameters()
13874
        self._freeze = True
13875
13876 1
    def to_binary(self):
13877
        packet = []
13878
        packet.append(self.TypeId.to_binary())
13879
        packet.append(self.RequestHeader.to_binary())
13880
        packet.append(self.Parameters.to_binary())
13881
        return b''.join(packet)
13882
13883 1
    @staticmethod
13884
    def from_binary(data):
13885
        return RepublishRequest(data)
13886
13887 1
    def _binary_init(self, data):
13888
        self.TypeId = NodeId.from_binary(data)
13889
        self.RequestHeader = RequestHeader.from_binary(data)
13890
        self.Parameters = RepublishParameters.from_binary(data)
13891
13892 1
    def __str__(self):
13893
        return 'RepublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13894
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13895
               'Parameters:' + str(self.Parameters) + ')'
13896
13897 1
    __repr__ = __str__
13898
13899
13900 1
class RepublishResponse(FrozenClass):
13901
    '''
13902
    :ivar TypeId:
13903
    :vartype TypeId: NodeId
13904
    :ivar ResponseHeader:
13905
    :vartype ResponseHeader: ResponseHeader
13906
    :ivar NotificationMessage:
13907
    :vartype NotificationMessage: NotificationMessage
13908
    '''
13909
13910 1
    ua_types = {
13911
        'TypeId': 'NodeId',
13912
        'ResponseHeader': 'ResponseHeader',
13913
        'NotificationMessage': 'NotificationMessage',
13914
               }
13915
13916 1
    def __init__(self, binary=None):
13917
        if binary is not None:
13918
            self._binary_init(binary)
13919
            self._freeze = True
13920
            return
13921
        self.TypeId = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary)
13922
        self.ResponseHeader = ResponseHeader()
13923
        self.NotificationMessage = NotificationMessage()
13924
        self._freeze = True
13925
13926 1
    def to_binary(self):
13927
        packet = []
13928
        packet.append(self.TypeId.to_binary())
13929
        packet.append(self.ResponseHeader.to_binary())
13930
        packet.append(self.NotificationMessage.to_binary())
13931
        return b''.join(packet)
13932
13933 1
    @staticmethod
13934
    def from_binary(data):
13935
        return RepublishResponse(data)
13936
13937 1
    def _binary_init(self, data):
13938
        self.TypeId = NodeId.from_binary(data)
13939
        self.ResponseHeader = ResponseHeader.from_binary(data)
13940
        self.NotificationMessage = NotificationMessage.from_binary(data)
13941
13942 1
    def __str__(self):
13943
        return 'RepublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13944
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13945
               'NotificationMessage:' + str(self.NotificationMessage) + ')'
13946
13947 1
    __repr__ = __str__
13948
13949
13950 1
class TransferResult(FrozenClass):
13951
    '''
13952
    :ivar StatusCode:
13953
    :vartype StatusCode: StatusCode
13954
    :ivar AvailableSequenceNumbers:
13955
    :vartype AvailableSequenceNumbers: UInt32
13956
    '''
13957
13958 1
    ua_types = {
13959
        'StatusCode': 'StatusCode',
13960
        'AvailableSequenceNumbers': 'UInt32',
13961
               }
13962
13963 1
    def __init__(self, binary=None):
13964
        if binary is not None:
13965
            self._binary_init(binary)
13966
            self._freeze = True
13967
            return
13968
        self.StatusCode = StatusCode()
13969
        self.AvailableSequenceNumbers = []
13970
        self._freeze = True
13971
13972 1
    def to_binary(self):
13973
        packet = []
13974
        packet.append(self.StatusCode.to_binary())
13975
        packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers)))
13976
        for fieldname in self.AvailableSequenceNumbers:
13977
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13978
        return b''.join(packet)
13979
13980 1
    @staticmethod
13981
    def from_binary(data):
13982
        return TransferResult(data)
13983
13984 1
    def _binary_init(self, data):
13985
        self.StatusCode = StatusCode.from_binary(data)
13986
        self.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data)
13987
13988 1
    def __str__(self):
13989
        return 'TransferResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
13990
               'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ')'
13991
13992 1
    __repr__ = __str__
13993
13994
13995 1 View Code Duplication
class TransferSubscriptionsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13996
    '''
13997
    :ivar SubscriptionIds:
13998
    :vartype SubscriptionIds: UInt32
13999
    :ivar SendInitialValues:
14000
    :vartype SendInitialValues: Boolean
14001
    '''
14002
14003 1
    ua_types = {
14004
        'SubscriptionIds': 'UInt32',
14005
        'SendInitialValues': 'Boolean',
14006
               }
14007
14008 1
    def __init__(self, binary=None):
14009
        if binary is not None:
14010
            self._binary_init(binary)
14011
            self._freeze = True
14012
            return
14013
        self.SubscriptionIds = []
14014
        self.SendInitialValues = True
14015
        self._freeze = True
14016
14017 1
    def to_binary(self):
14018
        packet = []
14019
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
14020
        for fieldname in self.SubscriptionIds:
14021
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
14022
        packet.append(uabin.Primitives.Boolean.pack(self.SendInitialValues))
14023
        return b''.join(packet)
14024
14025 1
    @staticmethod
14026
    def from_binary(data):
14027
        return TransferSubscriptionsParameters(data)
14028
14029 1
    def _binary_init(self, data):
14030
        self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
14031
        self.SendInitialValues = uabin.Primitives.Boolean.unpack(data)
14032
14033 1
    def __str__(self):
14034
        return 'TransferSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ', ' + \
14035
               'SendInitialValues:' + str(self.SendInitialValues) + ')'
14036
14037 1
    __repr__ = __str__
14038
14039
14040 1
class TransferSubscriptionsRequest(FrozenClass):
14041
    '''
14042
    :ivar TypeId:
14043
    :vartype TypeId: NodeId
14044
    :ivar RequestHeader:
14045
    :vartype RequestHeader: RequestHeader
14046
    :ivar Parameters:
14047
    :vartype Parameters: TransferSubscriptionsParameters
14048
    '''
14049
14050 1
    ua_types = {
14051
        'TypeId': 'NodeId',
14052
        'RequestHeader': 'RequestHeader',
14053
        'Parameters': 'TransferSubscriptionsParameters',
14054
               }
14055
14056 1
    def __init__(self, binary=None):
14057
        if binary is not None:
14058
            self._binary_init(binary)
14059
            self._freeze = True
14060
            return
14061
        self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary)
14062
        self.RequestHeader = RequestHeader()
14063
        self.Parameters = TransferSubscriptionsParameters()
14064
        self._freeze = True
14065
14066 1
    def to_binary(self):
14067
        packet = []
14068
        packet.append(self.TypeId.to_binary())
14069
        packet.append(self.RequestHeader.to_binary())
14070
        packet.append(self.Parameters.to_binary())
14071
        return b''.join(packet)
14072
14073 1
    @staticmethod
14074
    def from_binary(data):
14075
        return TransferSubscriptionsRequest(data)
14076
14077 1
    def _binary_init(self, data):
14078
        self.TypeId = NodeId.from_binary(data)
14079
        self.RequestHeader = RequestHeader.from_binary(data)
14080
        self.Parameters = TransferSubscriptionsParameters.from_binary(data)
14081
14082 1
    def __str__(self):
14083
        return 'TransferSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
14084
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
14085
               'Parameters:' + str(self.Parameters) + ')'
14086
14087 1
    __repr__ = __str__
14088
14089
14090 1 View Code Duplication
class TransferSubscriptionsResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14091
    '''
14092
    :ivar Results:
14093
    :vartype Results: TransferResult
14094
    :ivar DiagnosticInfos:
14095
    :vartype DiagnosticInfos: DiagnosticInfo
14096
    '''
14097
14098 1
    ua_types = {
14099
        'Results': 'TransferResult',
14100
        'DiagnosticInfos': 'DiagnosticInfo',
14101
               }
14102
14103 1
    def __init__(self, binary=None):
14104
        if binary is not None:
14105
            self._binary_init(binary)
14106
            self._freeze = True
14107
            return
14108
        self.Results = []
14109
        self.DiagnosticInfos = []
14110
        self._freeze = True
14111
14112 1
    def to_binary(self):
14113
        packet = []
14114
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
14115
        for fieldname in self.Results:
14116
            packet.append(fieldname.to_binary())
14117
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
14118
        for fieldname in self.DiagnosticInfos:
14119
            packet.append(fieldname.to_binary())
14120
        return b''.join(packet)
14121
14122 1
    @staticmethod
14123
    def from_binary(data):
14124
        return TransferSubscriptionsResult(data)
14125
14126 1
    def _binary_init(self, data):
14127
        length = uabin.Primitives.Int32.unpack(data)
14128
        array = []
14129
        if length != -1:
14130
            for _ in range(0, length):
14131
                array.append(TransferResult.from_binary(data))
14132
        self.Results = array
14133
        length = uabin.Primitives.Int32.unpack(data)
14134
        array = []
14135
        if length != -1:
14136
            for _ in range(0, length):
14137
                array.append(DiagnosticInfo.from_binary(data))
14138
        self.DiagnosticInfos = array
14139
14140 1
    def __str__(self):
14141
        return 'TransferSubscriptionsResult(' + 'Results:' + str(self.Results) + ', ' + \
14142
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
14143
14144 1
    __repr__ = __str__
14145
14146
14147 1
class TransferSubscriptionsResponse(FrozenClass):
14148
    '''
14149
    :ivar TypeId:
14150
    :vartype TypeId: NodeId
14151
    :ivar ResponseHeader:
14152
    :vartype ResponseHeader: ResponseHeader
14153
    :ivar Parameters:
14154
    :vartype Parameters: TransferSubscriptionsResult
14155
    '''
14156
14157 1
    ua_types = {
14158
        'TypeId': 'NodeId',
14159
        'ResponseHeader': 'ResponseHeader',
14160
        'Parameters': 'TransferSubscriptionsResult',
14161
               }
14162
14163 1
    def __init__(self, binary=None):
14164
        if binary is not None:
14165
            self._binary_init(binary)
14166
            self._freeze = True
14167
            return
14168
        self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary)
14169
        self.ResponseHeader = ResponseHeader()
14170
        self.Parameters = TransferSubscriptionsResult()
14171
        self._freeze = True
14172
14173 1
    def to_binary(self):
14174
        packet = []
14175
        packet.append(self.TypeId.to_binary())
14176
        packet.append(self.ResponseHeader.to_binary())
14177
        packet.append(self.Parameters.to_binary())
14178
        return b''.join(packet)
14179
14180 1
    @staticmethod
14181
    def from_binary(data):
14182
        return TransferSubscriptionsResponse(data)
14183
14184 1
    def _binary_init(self, data):
14185
        self.TypeId = NodeId.from_binary(data)
14186
        self.ResponseHeader = ResponseHeader.from_binary(data)
14187
        self.Parameters = TransferSubscriptionsResult.from_binary(data)
14188
14189 1
    def __str__(self):
14190
        return 'TransferSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
14191
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
14192
               'Parameters:' + str(self.Parameters) + ')'
14193
14194 1
    __repr__ = __str__
14195
14196
14197 1 View Code Duplication
class DeleteSubscriptionsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14198
    '''
14199
    :ivar SubscriptionIds:
14200
    :vartype SubscriptionIds: UInt32
14201
    '''
14202
14203 1
    ua_types = {
14204
        'SubscriptionIds': 'UInt32',
14205
               }
14206
14207 1
    def __init__(self, binary=None):
14208
        if binary is not None:
14209
            self._binary_init(binary)
14210
            self._freeze = True
14211
            return
14212
        self.SubscriptionIds = []
14213
        self._freeze = True
14214
14215 1
    def to_binary(self):
14216
        packet = []
14217
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
14218
        for fieldname in self.SubscriptionIds:
14219
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
14220
        return b''.join(packet)
14221
14222 1
    @staticmethod
14223
    def from_binary(data):
14224
        return DeleteSubscriptionsParameters(data)
14225
14226 1
    def _binary_init(self, data):
14227
        self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
14228
14229 1
    def __str__(self):
14230
        return 'DeleteSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ')'
14231
14232 1
    __repr__ = __str__
14233
14234
14235 1
class DeleteSubscriptionsRequest(FrozenClass):
14236
    '''
14237
    :ivar TypeId:
14238
    :vartype TypeId: NodeId
14239
    :ivar RequestHeader:
14240
    :vartype RequestHeader: RequestHeader
14241
    :ivar Parameters:
14242
    :vartype Parameters: DeleteSubscriptionsParameters
14243
    '''
14244
14245 1
    ua_types = {
14246
        'TypeId': 'NodeId',
14247
        'RequestHeader': 'RequestHeader',
14248
        'Parameters': 'DeleteSubscriptionsParameters',
14249
               }
14250
14251 1
    def __init__(self, binary=None):
14252
        if binary is not None:
14253
            self._binary_init(binary)
14254
            self._freeze = True
14255
            return
14256
        self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary)
14257
        self.RequestHeader = RequestHeader()
14258
        self.Parameters = DeleteSubscriptionsParameters()
14259
        self._freeze = True
14260
14261 1
    def to_binary(self):
14262
        packet = []
14263
        packet.append(self.TypeId.to_binary())
14264
        packet.append(self.RequestHeader.to_binary())
14265
        packet.append(self.Parameters.to_binary())
14266
        return b''.join(packet)
14267
14268 1
    @staticmethod
14269
    def from_binary(data):
14270
        return DeleteSubscriptionsRequest(data)
14271
14272 1
    def _binary_init(self, data):
14273
        self.TypeId = NodeId.from_binary(data)
14274
        self.RequestHeader = RequestHeader.from_binary(data)
14275
        self.Parameters = DeleteSubscriptionsParameters.from_binary(data)
14276
14277 1
    def __str__(self):
14278
        return 'DeleteSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
14279
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
14280
               'Parameters:' + str(self.Parameters) + ')'
14281
14282 1
    __repr__ = __str__
14283
14284
14285 1 View Code Duplication
class DeleteSubscriptionsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14286
    '''
14287
    :ivar TypeId:
14288
    :vartype TypeId: NodeId
14289
    :ivar ResponseHeader:
14290
    :vartype ResponseHeader: ResponseHeader
14291
    :ivar Results:
14292
    :vartype Results: StatusCode
14293
    :ivar DiagnosticInfos:
14294
    :vartype DiagnosticInfos: DiagnosticInfo
14295
    '''
14296
14297 1
    ua_types = {
14298
        'TypeId': 'NodeId',
14299
        'ResponseHeader': 'ResponseHeader',
14300
        'Results': 'StatusCode',
14301
        'DiagnosticInfos': 'DiagnosticInfo',
14302
               }
14303
14304 1
    def __init__(self, binary=None):
14305
        if binary is not None:
14306
            self._binary_init(binary)
14307
            self._freeze = True
14308
            return
14309
        self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary)
14310
        self.ResponseHeader = ResponseHeader()
14311
        self.Results = []
14312
        self.DiagnosticInfos = []
14313
        self._freeze = True
14314
14315 1
    def to_binary(self):
14316
        packet = []
14317
        packet.append(self.TypeId.to_binary())
14318
        packet.append(self.ResponseHeader.to_binary())
14319
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
14320
        for fieldname in self.Results:
14321
            packet.append(fieldname.to_binary())
14322
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
14323
        for fieldname in self.DiagnosticInfos:
14324
            packet.append(fieldname.to_binary())
14325
        return b''.join(packet)
14326
14327 1
    @staticmethod
14328
    def from_binary(data):
14329
        return DeleteSubscriptionsResponse(data)
14330
14331 1
    def _binary_init(self, data):
14332
        self.TypeId = NodeId.from_binary(data)
14333
        self.ResponseHeader = ResponseHeader.from_binary(data)
14334
        length = uabin.Primitives.Int32.unpack(data)
14335
        array = []
14336
        if length != -1:
14337
            for _ in range(0, length):
14338
                array.append(StatusCode.from_binary(data))
14339
        self.Results = array
14340
        length = uabin.Primitives.Int32.unpack(data)
14341
        array = []
14342
        if length != -1:
14343
            for _ in range(0, length):
14344
                array.append(DiagnosticInfo.from_binary(data))
14345
        self.DiagnosticInfos = array
14346
14347 1
    def __str__(self):
14348
        return 'DeleteSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
14349
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
14350
               'Results:' + str(self.Results) + ', ' + \
14351
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
14352
14353 1
    __repr__ = __str__
14354
14355
14356 1
class BuildInfo(FrozenClass):
14357
    '''
14358
    :ivar ProductUri:
14359
    :vartype ProductUri: String
14360
    :ivar ManufacturerName:
14361
    :vartype ManufacturerName: String
14362
    :ivar ProductName:
14363
    :vartype ProductName: String
14364
    :ivar SoftwareVersion:
14365
    :vartype SoftwareVersion: String
14366
    :ivar BuildNumber:
14367
    :vartype BuildNumber: String
14368
    :ivar BuildDate:
14369
    :vartype BuildDate: DateTime
14370
    '''
14371
14372 1
    ua_types = {
14373
        'ProductUri': 'String',
14374
        'ManufacturerName': 'String',
14375
        'ProductName': 'String',
14376
        'SoftwareVersion': 'String',
14377
        'BuildNumber': 'String',
14378
        'BuildDate': 'DateTime',
14379
               }
14380
14381 1
    def __init__(self, binary=None):
14382
        if binary is not None:
14383
            self._binary_init(binary)
14384
            self._freeze = True
14385
            return
14386
        self.ProductUri = None
14387
        self.ManufacturerName = None
14388
        self.ProductName = None
14389
        self.SoftwareVersion = None
14390
        self.BuildNumber = None
14391
        self.BuildDate = datetime.utcnow()
14392
        self._freeze = True
14393
14394 1
    def to_binary(self):
14395
        packet = []
14396
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
14397
        packet.append(uabin.Primitives.String.pack(self.ManufacturerName))
14398
        packet.append(uabin.Primitives.String.pack(self.ProductName))
14399
        packet.append(uabin.Primitives.String.pack(self.SoftwareVersion))
14400
        packet.append(uabin.Primitives.String.pack(self.BuildNumber))
14401
        packet.append(uabin.Primitives.DateTime.pack(self.BuildDate))
14402
        return b''.join(packet)
14403
14404 1
    @staticmethod
14405
    def from_binary(data):
14406
        return BuildInfo(data)
14407
14408 1
    def _binary_init(self, data):
14409
        self.ProductUri = uabin.Primitives.String.unpack(data)
14410
        self.ManufacturerName = uabin.Primitives.String.unpack(data)
14411
        self.ProductName = uabin.Primitives.String.unpack(data)
14412
        self.SoftwareVersion = uabin.Primitives.String.unpack(data)
14413
        self.BuildNumber = uabin.Primitives.String.unpack(data)
14414
        self.BuildDate = uabin.Primitives.DateTime.unpack(data)
14415
14416 1
    def __str__(self):
14417
        return 'BuildInfo(' + 'ProductUri:' + str(self.ProductUri) + ', ' + \
14418
               'ManufacturerName:' + str(self.ManufacturerName) + ', ' + \
14419
               'ProductName:' + str(self.ProductName) + ', ' + \
14420
               'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \
14421
               'BuildNumber:' + str(self.BuildNumber) + ', ' + \
14422
               'BuildDate:' + str(self.BuildDate) + ')'
14423
14424 1
    __repr__ = __str__
14425
14426
14427 1
class RedundantServerDataType(FrozenClass):
14428
    '''
14429
    :ivar ServerId:
14430
    :vartype ServerId: String
14431
    :ivar ServiceLevel:
14432
    :vartype ServiceLevel: Byte
14433
    :ivar ServerState:
14434
    :vartype ServerState: ServerState
14435
    '''
14436
14437 1
    ua_types = {
14438
        'ServerId': 'String',
14439
        'ServiceLevel': 'Byte',
14440
        'ServerState': 'ServerState',
14441
               }
14442
14443 1
    def __init__(self, binary=None):
14444
        if binary is not None:
14445
            self._binary_init(binary)
14446
            self._freeze = True
14447
            return
14448
        self.ServerId = None
14449
        self.ServiceLevel = 0
14450
        self.ServerState = ServerState(0)
14451
        self._freeze = True
14452
14453 1
    def to_binary(self):
14454
        packet = []
14455
        packet.append(uabin.Primitives.String.pack(self.ServerId))
14456
        packet.append(uabin.Primitives.Byte.pack(self.ServiceLevel))
14457
        packet.append(uabin.Primitives.UInt32.pack(self.ServerState.value))
14458
        return b''.join(packet)
14459
14460 1
    @staticmethod
14461
    def from_binary(data):
14462
        return RedundantServerDataType(data)
14463
14464 1
    def _binary_init(self, data):
14465
        self.ServerId = uabin.Primitives.String.unpack(data)
14466
        self.ServiceLevel = uabin.Primitives.Byte.unpack(data)
14467
        self.ServerState = ServerState(uabin.Primitives.UInt32.unpack(data))
14468
14469 1
    def __str__(self):
14470
        return 'RedundantServerDataType(' + 'ServerId:' + str(self.ServerId) + ', ' + \
14471
               'ServiceLevel:' + str(self.ServiceLevel) + ', ' + \
14472
               'ServerState:' + str(self.ServerState) + ')'
14473
14474 1
    __repr__ = __str__
14475
14476
14477 1 View Code Duplication
class EndpointUrlListDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14478
    '''
14479
    :ivar EndpointUrlList:
14480
    :vartype EndpointUrlList: String
14481
    '''
14482
14483 1
    ua_types = {
14484
        'EndpointUrlList': 'String',
14485
               }
14486
14487 1
    def __init__(self, binary=None):
14488
        if binary is not None:
14489
            self._binary_init(binary)
14490
            self._freeze = True
14491
            return
14492
        self.EndpointUrlList = []
14493
        self._freeze = True
14494
14495 1
    def to_binary(self):
14496
        packet = []
14497
        packet.append(uabin.Primitives.Int32.pack(len(self.EndpointUrlList)))
14498
        for fieldname in self.EndpointUrlList:
14499
            packet.append(uabin.Primitives.String.pack(fieldname))
14500
        return b''.join(packet)
14501
14502 1
    @staticmethod
14503
    def from_binary(data):
14504
        return EndpointUrlListDataType(data)
14505
14506 1
    def _binary_init(self, data):
14507
        self.EndpointUrlList = uabin.Primitives.String.unpack_array(data)
14508
14509 1
    def __str__(self):
14510
        return 'EndpointUrlListDataType(' + 'EndpointUrlList:' + str(self.EndpointUrlList) + ')'
14511
14512 1
    __repr__ = __str__
14513
14514
14515 1 View Code Duplication
class NetworkGroupDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14516
    '''
14517
    :ivar ServerUri:
14518
    :vartype ServerUri: String
14519
    :ivar NetworkPaths:
14520
    :vartype NetworkPaths: EndpointUrlListDataType
14521
    '''
14522
14523 1
    ua_types = {
14524
        'ServerUri': 'String',
14525
        'NetworkPaths': 'EndpointUrlListDataType',
14526
               }
14527
14528 1
    def __init__(self, binary=None):
14529
        if binary is not None:
14530
            self._binary_init(binary)
14531
            self._freeze = True
14532
            return
14533
        self.ServerUri = None
14534
        self.NetworkPaths = []
14535
        self._freeze = True
14536
14537 1
    def to_binary(self):
14538
        packet = []
14539
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
14540
        packet.append(uabin.Primitives.Int32.pack(len(self.NetworkPaths)))
14541
        for fieldname in self.NetworkPaths:
14542
            packet.append(fieldname.to_binary())
14543
        return b''.join(packet)
14544
14545 1
    @staticmethod
14546
    def from_binary(data):
14547
        return NetworkGroupDataType(data)
14548
14549 1
    def _binary_init(self, data):
14550
        self.ServerUri = uabin.Primitives.String.unpack(data)
14551
        length = uabin.Primitives.Int32.unpack(data)
14552
        array = []
14553
        if length != -1:
14554
            for _ in range(0, length):
14555
                array.append(EndpointUrlListDataType.from_binary(data))
14556
        self.NetworkPaths = array
14557
14558 1
    def __str__(self):
14559
        return 'NetworkGroupDataType(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \
14560
               'NetworkPaths:' + str(self.NetworkPaths) + ')'
14561
14562 1
    __repr__ = __str__
14563
14564
14565 1
class SamplingIntervalDiagnosticsDataType(FrozenClass):
14566
    '''
14567
    :ivar SamplingInterval:
14568
    :vartype SamplingInterval: Double
14569
    :ivar MonitoredItemCount:
14570
    :vartype MonitoredItemCount: UInt32
14571
    :ivar MaxMonitoredItemCount:
14572
    :vartype MaxMonitoredItemCount: UInt32
14573
    :ivar DisabledMonitoredItemCount:
14574
    :vartype DisabledMonitoredItemCount: UInt32
14575
    '''
14576
14577 1
    ua_types = {
14578
        'SamplingInterval': 'Double',
14579
        'MonitoredItemCount': 'UInt32',
14580
        'MaxMonitoredItemCount': 'UInt32',
14581
        'DisabledMonitoredItemCount': 'UInt32',
14582
               }
14583
14584 1
    def __init__(self, binary=None):
14585
        if binary is not None:
14586
            self._binary_init(binary)
14587
            self._freeze = True
14588
            return
14589
        self.SamplingInterval = 0
14590
        self.MonitoredItemCount = 0
14591
        self.MaxMonitoredItemCount = 0
14592
        self.DisabledMonitoredItemCount = 0
14593
        self._freeze = True
14594
14595 1
    def to_binary(self):
14596
        packet = []
14597
        packet.append(uabin.Primitives.Double.pack(self.SamplingInterval))
14598
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount))
14599
        packet.append(uabin.Primitives.UInt32.pack(self.MaxMonitoredItemCount))
14600
        packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount))
14601
        return b''.join(packet)
14602
14603 1
    @staticmethod
14604
    def from_binary(data):
14605
        return SamplingIntervalDiagnosticsDataType(data)
14606
14607 1
    def _binary_init(self, data):
14608
        self.SamplingInterval = uabin.Primitives.Double.unpack(data)
14609
        self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
14610
        self.MaxMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
14611
        self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
14612
14613 1
    def __str__(self):
14614
        return 'SamplingIntervalDiagnosticsDataType(' + 'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \
14615
               'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \
14616
               'MaxMonitoredItemCount:' + str(self.MaxMonitoredItemCount) + ', ' + \
14617
               'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ')'
14618
14619 1
    __repr__ = __str__
14620
14621
14622 1
class ServerDiagnosticsSummaryDataType(FrozenClass):
14623
    '''
14624
    :ivar ServerViewCount:
14625
    :vartype ServerViewCount: UInt32
14626
    :ivar CurrentSessionCount:
14627
    :vartype CurrentSessionCount: UInt32
14628
    :ivar CumulatedSessionCount:
14629
    :vartype CumulatedSessionCount: UInt32
14630
    :ivar SecurityRejectedSessionCount:
14631
    :vartype SecurityRejectedSessionCount: UInt32
14632
    :ivar RejectedSessionCount:
14633
    :vartype RejectedSessionCount: UInt32
14634
    :ivar SessionTimeoutCount:
14635
    :vartype SessionTimeoutCount: UInt32
14636
    :ivar SessionAbortCount:
14637
    :vartype SessionAbortCount: UInt32
14638
    :ivar CurrentSubscriptionCount:
14639
    :vartype CurrentSubscriptionCount: UInt32
14640
    :ivar CumulatedSubscriptionCount:
14641
    :vartype CumulatedSubscriptionCount: UInt32
14642
    :ivar PublishingIntervalCount:
14643
    :vartype PublishingIntervalCount: UInt32
14644
    :ivar SecurityRejectedRequestsCount:
14645
    :vartype SecurityRejectedRequestsCount: UInt32
14646
    :ivar RejectedRequestsCount:
14647
    :vartype RejectedRequestsCount: UInt32
14648
    '''
14649
14650 1
    ua_types = {
14651
        'ServerViewCount': 'UInt32',
14652
        'CurrentSessionCount': 'UInt32',
14653
        'CumulatedSessionCount': 'UInt32',
14654
        'SecurityRejectedSessionCount': 'UInt32',
14655
        'RejectedSessionCount': 'UInt32',
14656
        'SessionTimeoutCount': 'UInt32',
14657
        'SessionAbortCount': 'UInt32',
14658
        'CurrentSubscriptionCount': 'UInt32',
14659
        'CumulatedSubscriptionCount': 'UInt32',
14660
        'PublishingIntervalCount': 'UInt32',
14661
        'SecurityRejectedRequestsCount': 'UInt32',
14662
        'RejectedRequestsCount': 'UInt32',
14663
               }
14664
14665 1
    def __init__(self, binary=None):
14666
        if binary is not None:
14667
            self._binary_init(binary)
14668
            self._freeze = True
14669
            return
14670
        self.ServerViewCount = 0
14671
        self.CurrentSessionCount = 0
14672
        self.CumulatedSessionCount = 0
14673
        self.SecurityRejectedSessionCount = 0
14674
        self.RejectedSessionCount = 0
14675
        self.SessionTimeoutCount = 0
14676
        self.SessionAbortCount = 0
14677
        self.CurrentSubscriptionCount = 0
14678
        self.CumulatedSubscriptionCount = 0
14679
        self.PublishingIntervalCount = 0
14680
        self.SecurityRejectedRequestsCount = 0
14681
        self.RejectedRequestsCount = 0
14682
        self._freeze = True
14683
14684 1
    def to_binary(self):
14685
        packet = []
14686
        packet.append(uabin.Primitives.UInt32.pack(self.ServerViewCount))
14687
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSessionCount))
14688
        packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSessionCount))
14689
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedSessionCount))
14690
        packet.append(uabin.Primitives.UInt32.pack(self.RejectedSessionCount))
14691
        packet.append(uabin.Primitives.UInt32.pack(self.SessionTimeoutCount))
14692
        packet.append(uabin.Primitives.UInt32.pack(self.SessionAbortCount))
14693
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionCount))
14694
        packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSubscriptionCount))
14695
        packet.append(uabin.Primitives.UInt32.pack(self.PublishingIntervalCount))
14696
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedRequestsCount))
14697
        packet.append(uabin.Primitives.UInt32.pack(self.RejectedRequestsCount))
14698
        return b''.join(packet)
14699
14700 1
    @staticmethod
14701
    def from_binary(data):
14702
        return ServerDiagnosticsSummaryDataType(data)
14703
14704 1
    def _binary_init(self, data):
14705
        self.ServerViewCount = uabin.Primitives.UInt32.unpack(data)
14706
        self.CurrentSessionCount = uabin.Primitives.UInt32.unpack(data)
14707
        self.CumulatedSessionCount = uabin.Primitives.UInt32.unpack(data)
14708
        self.SecurityRejectedSessionCount = uabin.Primitives.UInt32.unpack(data)
14709
        self.RejectedSessionCount = uabin.Primitives.UInt32.unpack(data)
14710
        self.SessionTimeoutCount = uabin.Primitives.UInt32.unpack(data)
14711
        self.SessionAbortCount = uabin.Primitives.UInt32.unpack(data)
14712
        self.CurrentSubscriptionCount = uabin.Primitives.UInt32.unpack(data)
14713
        self.CumulatedSubscriptionCount = uabin.Primitives.UInt32.unpack(data)
14714
        self.PublishingIntervalCount = uabin.Primitives.UInt32.unpack(data)
14715
        self.SecurityRejectedRequestsCount = uabin.Primitives.UInt32.unpack(data)
14716
        self.RejectedRequestsCount = uabin.Primitives.UInt32.unpack(data)
14717
14718 1
    def __str__(self):
14719
        return 'ServerDiagnosticsSummaryDataType(' + 'ServerViewCount:' + str(self.ServerViewCount) + ', ' + \
14720
               'CurrentSessionCount:' + str(self.CurrentSessionCount) + ', ' + \
14721
               'CumulatedSessionCount:' + str(self.CumulatedSessionCount) + ', ' + \
14722
               'SecurityRejectedSessionCount:' + str(self.SecurityRejectedSessionCount) + ', ' + \
14723
               'RejectedSessionCount:' + str(self.RejectedSessionCount) + ', ' + \
14724
               'SessionTimeoutCount:' + str(self.SessionTimeoutCount) + ', ' + \
14725
               'SessionAbortCount:' + str(self.SessionAbortCount) + ', ' + \
14726
               'CurrentSubscriptionCount:' + str(self.CurrentSubscriptionCount) + ', ' + \
14727
               'CumulatedSubscriptionCount:' + str(self.CumulatedSubscriptionCount) + ', ' + \
14728
               'PublishingIntervalCount:' + str(self.PublishingIntervalCount) + ', ' + \
14729
               'SecurityRejectedRequestsCount:' + str(self.SecurityRejectedRequestsCount) + ', ' + \
14730
               'RejectedRequestsCount:' + str(self.RejectedRequestsCount) + ')'
14731
14732 1
    __repr__ = __str__
14733
14734
14735 1 View Code Duplication
class ServerStatusDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14736
    '''
14737
    :ivar StartTime:
14738
    :vartype StartTime: DateTime
14739
    :ivar CurrentTime:
14740
    :vartype CurrentTime: DateTime
14741
    :ivar State:
14742
    :vartype State: ServerState
14743
    :ivar BuildInfo:
14744
    :vartype BuildInfo: BuildInfo
14745
    :ivar SecondsTillShutdown:
14746
    :vartype SecondsTillShutdown: UInt32
14747
    :ivar ShutdownReason:
14748
    :vartype ShutdownReason: LocalizedText
14749
    '''
14750
14751 1
    ua_types = {
14752
        'StartTime': 'DateTime',
14753
        'CurrentTime': 'DateTime',
14754
        'State': 'ServerState',
14755
        'BuildInfo': 'BuildInfo',
14756
        'SecondsTillShutdown': 'UInt32',
14757
        'ShutdownReason': 'LocalizedText',
14758
               }
14759
14760 1
    def __init__(self, binary=None):
14761
        if binary is not None:
14762
            self._binary_init(binary)
14763
            self._freeze = True
14764
            return
14765
        self.StartTime = datetime.utcnow()
14766
        self.CurrentTime = datetime.utcnow()
14767
        self.State = ServerState(0)
14768
        self.BuildInfo = BuildInfo()
14769
        self.SecondsTillShutdown = 0
14770
        self.ShutdownReason = LocalizedText()
14771
        self._freeze = True
14772
14773 1
    def to_binary(self):
14774
        packet = []
14775
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
14776
        packet.append(uabin.Primitives.DateTime.pack(self.CurrentTime))
14777
        packet.append(uabin.Primitives.UInt32.pack(self.State.value))
14778
        packet.append(self.BuildInfo.to_binary())
14779
        packet.append(uabin.Primitives.UInt32.pack(self.SecondsTillShutdown))
14780
        packet.append(self.ShutdownReason.to_binary())
14781
        return b''.join(packet)
14782
14783 1
    @staticmethod
14784
    def from_binary(data):
14785
        return ServerStatusDataType(data)
14786
14787 1
    def _binary_init(self, data):
14788
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
14789
        self.CurrentTime = uabin.Primitives.DateTime.unpack(data)
14790
        self.State = ServerState(uabin.Primitives.UInt32.unpack(data))
14791
        self.BuildInfo = BuildInfo.from_binary(data)
14792
        self.SecondsTillShutdown = uabin.Primitives.UInt32.unpack(data)
14793
        self.ShutdownReason = LocalizedText.from_binary(data)
14794
14795 1
    def __str__(self):
14796
        return 'ServerStatusDataType(' + 'StartTime:' + str(self.StartTime) + ', ' + \
14797
               'CurrentTime:' + str(self.CurrentTime) + ', ' + \
14798
               'State:' + str(self.State) + ', ' + \
14799
               'BuildInfo:' + str(self.BuildInfo) + ', ' + \
14800
               'SecondsTillShutdown:' + str(self.SecondsTillShutdown) + ', ' + \
14801
               'ShutdownReason:' + str(self.ShutdownReason) + ')'
14802
14803 1
    __repr__ = __str__
14804
14805
14806 1
class SessionDiagnosticsDataType(FrozenClass):
14807
    '''
14808
    :ivar SessionId:
14809
    :vartype SessionId: NodeId
14810
    :ivar SessionName:
14811
    :vartype SessionName: String
14812
    :ivar ClientDescription:
14813
    :vartype ClientDescription: ApplicationDescription
14814
    :ivar ServerUri:
14815
    :vartype ServerUri: String
14816
    :ivar EndpointUrl:
14817
    :vartype EndpointUrl: String
14818
    :ivar LocaleIds:
14819
    :vartype LocaleIds: String
14820
    :ivar ActualSessionTimeout:
14821
    :vartype ActualSessionTimeout: Double
14822
    :ivar MaxResponseMessageSize:
14823
    :vartype MaxResponseMessageSize: UInt32
14824
    :ivar ClientConnectionTime:
14825
    :vartype ClientConnectionTime: DateTime
14826
    :ivar ClientLastContactTime:
14827
    :vartype ClientLastContactTime: DateTime
14828
    :ivar CurrentSubscriptionsCount:
14829
    :vartype CurrentSubscriptionsCount: UInt32
14830
    :ivar CurrentMonitoredItemsCount:
14831
    :vartype CurrentMonitoredItemsCount: UInt32
14832
    :ivar CurrentPublishRequestsInQueue:
14833
    :vartype CurrentPublishRequestsInQueue: UInt32
14834
    :ivar TotalRequestCount:
14835
    :vartype TotalRequestCount: ServiceCounterDataType
14836
    :ivar UnauthorizedRequestCount:
14837
    :vartype UnauthorizedRequestCount: UInt32
14838
    :ivar ReadCount:
14839
    :vartype ReadCount: ServiceCounterDataType
14840
    :ivar HistoryReadCount:
14841
    :vartype HistoryReadCount: ServiceCounterDataType
14842
    :ivar WriteCount:
14843
    :vartype WriteCount: ServiceCounterDataType
14844
    :ivar HistoryUpdateCount:
14845
    :vartype HistoryUpdateCount: ServiceCounterDataType
14846
    :ivar CallCount:
14847
    :vartype CallCount: ServiceCounterDataType
14848
    :ivar CreateMonitoredItemsCount:
14849
    :vartype CreateMonitoredItemsCount: ServiceCounterDataType
14850
    :ivar ModifyMonitoredItemsCount:
14851
    :vartype ModifyMonitoredItemsCount: ServiceCounterDataType
14852
    :ivar SetMonitoringModeCount:
14853
    :vartype SetMonitoringModeCount: ServiceCounterDataType
14854
    :ivar SetTriggeringCount:
14855
    :vartype SetTriggeringCount: ServiceCounterDataType
14856
    :ivar DeleteMonitoredItemsCount:
14857
    :vartype DeleteMonitoredItemsCount: ServiceCounterDataType
14858
    :ivar CreateSubscriptionCount:
14859
    :vartype CreateSubscriptionCount: ServiceCounterDataType
14860
    :ivar ModifySubscriptionCount:
14861
    :vartype ModifySubscriptionCount: ServiceCounterDataType
14862
    :ivar SetPublishingModeCount:
14863
    :vartype SetPublishingModeCount: ServiceCounterDataType
14864
    :ivar PublishCount:
14865
    :vartype PublishCount: ServiceCounterDataType
14866
    :ivar RepublishCount:
14867
    :vartype RepublishCount: ServiceCounterDataType
14868
    :ivar TransferSubscriptionsCount:
14869
    :vartype TransferSubscriptionsCount: ServiceCounterDataType
14870
    :ivar DeleteSubscriptionsCount:
14871
    :vartype DeleteSubscriptionsCount: ServiceCounterDataType
14872
    :ivar AddNodesCount:
14873
    :vartype AddNodesCount: ServiceCounterDataType
14874
    :ivar AddReferencesCount:
14875
    :vartype AddReferencesCount: ServiceCounterDataType
14876
    :ivar DeleteNodesCount:
14877
    :vartype DeleteNodesCount: ServiceCounterDataType
14878
    :ivar DeleteReferencesCount:
14879
    :vartype DeleteReferencesCount: ServiceCounterDataType
14880
    :ivar BrowseCount:
14881
    :vartype BrowseCount: ServiceCounterDataType
14882
    :ivar BrowseNextCount:
14883
    :vartype BrowseNextCount: ServiceCounterDataType
14884
    :ivar TranslateBrowsePathsToNodeIdsCount:
14885
    :vartype TranslateBrowsePathsToNodeIdsCount: ServiceCounterDataType
14886
    :ivar QueryFirstCount:
14887
    :vartype QueryFirstCount: ServiceCounterDataType
14888
    :ivar QueryNextCount:
14889
    :vartype QueryNextCount: ServiceCounterDataType
14890
    :ivar RegisterNodesCount:
14891
    :vartype RegisterNodesCount: ServiceCounterDataType
14892
    :ivar UnregisterNodesCount:
14893
    :vartype UnregisterNodesCount: ServiceCounterDataType
14894
    '''
14895
14896 1
    ua_types = {
14897
        'SessionId': 'NodeId',
14898
        'SessionName': 'String',
14899
        'ClientDescription': 'ApplicationDescription',
14900
        'ServerUri': 'String',
14901
        'EndpointUrl': 'String',
14902
        'LocaleIds': 'String',
14903
        'ActualSessionTimeout': 'Double',
14904
        'MaxResponseMessageSize': 'UInt32',
14905
        'ClientConnectionTime': 'DateTime',
14906
        'ClientLastContactTime': 'DateTime',
14907
        'CurrentSubscriptionsCount': 'UInt32',
14908
        'CurrentMonitoredItemsCount': 'UInt32',
14909
        'CurrentPublishRequestsInQueue': 'UInt32',
14910
        'TotalRequestCount': 'ServiceCounterDataType',
14911
        'UnauthorizedRequestCount': 'UInt32',
14912
        'ReadCount': 'ServiceCounterDataType',
14913
        'HistoryReadCount': 'ServiceCounterDataType',
14914
        'WriteCount': 'ServiceCounterDataType',
14915
        'HistoryUpdateCount': 'ServiceCounterDataType',
14916
        'CallCount': 'ServiceCounterDataType',
14917
        'CreateMonitoredItemsCount': 'ServiceCounterDataType',
14918
        'ModifyMonitoredItemsCount': 'ServiceCounterDataType',
14919
        'SetMonitoringModeCount': 'ServiceCounterDataType',
14920
        'SetTriggeringCount': 'ServiceCounterDataType',
14921
        'DeleteMonitoredItemsCount': 'ServiceCounterDataType',
14922
        'CreateSubscriptionCount': 'ServiceCounterDataType',
14923
        'ModifySubscriptionCount': 'ServiceCounterDataType',
14924
        'SetPublishingModeCount': 'ServiceCounterDataType',
14925
        'PublishCount': 'ServiceCounterDataType',
14926
        'RepublishCount': 'ServiceCounterDataType',
14927
        'TransferSubscriptionsCount': 'ServiceCounterDataType',
14928
        'DeleteSubscriptionsCount': 'ServiceCounterDataType',
14929
        'AddNodesCount': 'ServiceCounterDataType',
14930
        'AddReferencesCount': 'ServiceCounterDataType',
14931
        'DeleteNodesCount': 'ServiceCounterDataType',
14932
        'DeleteReferencesCount': 'ServiceCounterDataType',
14933
        'BrowseCount': 'ServiceCounterDataType',
14934
        'BrowseNextCount': 'ServiceCounterDataType',
14935
        'TranslateBrowsePathsToNodeIdsCount': 'ServiceCounterDataType',
14936
        'QueryFirstCount': 'ServiceCounterDataType',
14937
        'QueryNextCount': 'ServiceCounterDataType',
14938
        'RegisterNodesCount': 'ServiceCounterDataType',
14939
        'UnregisterNodesCount': 'ServiceCounterDataType',
14940
               }
14941
14942 1
    def __init__(self, binary=None):
14943
        if binary is not None:
14944
            self._binary_init(binary)
14945
            self._freeze = True
14946
            return
14947
        self.SessionId = NodeId()
14948
        self.SessionName = None
14949
        self.ClientDescription = ApplicationDescription()
14950
        self.ServerUri = None
14951
        self.EndpointUrl = None
14952
        self.LocaleIds = []
14953
        self.ActualSessionTimeout = 0
14954
        self.MaxResponseMessageSize = 0
14955
        self.ClientConnectionTime = datetime.utcnow()
14956
        self.ClientLastContactTime = datetime.utcnow()
14957
        self.CurrentSubscriptionsCount = 0
14958
        self.CurrentMonitoredItemsCount = 0
14959
        self.CurrentPublishRequestsInQueue = 0
14960
        self.TotalRequestCount = ServiceCounterDataType()
14961
        self.UnauthorizedRequestCount = 0
14962
        self.ReadCount = ServiceCounterDataType()
14963
        self.HistoryReadCount = ServiceCounterDataType()
14964
        self.WriteCount = ServiceCounterDataType()
14965
        self.HistoryUpdateCount = ServiceCounterDataType()
14966
        self.CallCount = ServiceCounterDataType()
14967
        self.CreateMonitoredItemsCount = ServiceCounterDataType()
14968
        self.ModifyMonitoredItemsCount = ServiceCounterDataType()
14969
        self.SetMonitoringModeCount = ServiceCounterDataType()
14970
        self.SetTriggeringCount = ServiceCounterDataType()
14971
        self.DeleteMonitoredItemsCount = ServiceCounterDataType()
14972
        self.CreateSubscriptionCount = ServiceCounterDataType()
14973
        self.ModifySubscriptionCount = ServiceCounterDataType()
14974
        self.SetPublishingModeCount = ServiceCounterDataType()
14975
        self.PublishCount = ServiceCounterDataType()
14976
        self.RepublishCount = ServiceCounterDataType()
14977
        self.TransferSubscriptionsCount = ServiceCounterDataType()
14978
        self.DeleteSubscriptionsCount = ServiceCounterDataType()
14979
        self.AddNodesCount = ServiceCounterDataType()
14980
        self.AddReferencesCount = ServiceCounterDataType()
14981
        self.DeleteNodesCount = ServiceCounterDataType()
14982
        self.DeleteReferencesCount = ServiceCounterDataType()
14983
        self.BrowseCount = ServiceCounterDataType()
14984
        self.BrowseNextCount = ServiceCounterDataType()
14985
        self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType()
14986
        self.QueryFirstCount = ServiceCounterDataType()
14987
        self.QueryNextCount = ServiceCounterDataType()
14988
        self.RegisterNodesCount = ServiceCounterDataType()
14989
        self.UnregisterNodesCount = ServiceCounterDataType()
14990
        self._freeze = True
14991
14992 1
    def to_binary(self):
14993
        packet = []
14994
        packet.append(self.SessionId.to_binary())
14995
        packet.append(uabin.Primitives.String.pack(self.SessionName))
14996
        packet.append(self.ClientDescription.to_binary())
14997
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
14998
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
14999
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
15000
        for fieldname in self.LocaleIds:
15001
            packet.append(uabin.Primitives.String.pack(fieldname))
15002
        packet.append(uabin.Primitives.Double.pack(self.ActualSessionTimeout))
15003
        packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize))
15004
        packet.append(uabin.Primitives.DateTime.pack(self.ClientConnectionTime))
15005
        packet.append(uabin.Primitives.DateTime.pack(self.ClientLastContactTime))
15006
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionsCount))
15007
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentMonitoredItemsCount))
15008
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentPublishRequestsInQueue))
15009
        packet.append(self.TotalRequestCount.to_binary())
15010
        packet.append(uabin.Primitives.UInt32.pack(self.UnauthorizedRequestCount))
15011
        packet.append(self.ReadCount.to_binary())
15012
        packet.append(self.HistoryReadCount.to_binary())
15013
        packet.append(self.WriteCount.to_binary())
15014
        packet.append(self.HistoryUpdateCount.to_binary())
15015
        packet.append(self.CallCount.to_binary())
15016
        packet.append(self.CreateMonitoredItemsCount.to_binary())
15017
        packet.append(self.ModifyMonitoredItemsCount.to_binary())
15018
        packet.append(self.SetMonitoringModeCount.to_binary())
15019
        packet.append(self.SetTriggeringCount.to_binary())
15020
        packet.append(self.DeleteMonitoredItemsCount.to_binary())
15021
        packet.append(self.CreateSubscriptionCount.to_binary())
15022
        packet.append(self.ModifySubscriptionCount.to_binary())
15023
        packet.append(self.SetPublishingModeCount.to_binary())
15024
        packet.append(self.PublishCount.to_binary())
15025
        packet.append(self.RepublishCount.to_binary())
15026
        packet.append(self.TransferSubscriptionsCount.to_binary())
15027
        packet.append(self.DeleteSubscriptionsCount.to_binary())
15028
        packet.append(self.AddNodesCount.to_binary())
15029
        packet.append(self.AddReferencesCount.to_binary())
15030
        packet.append(self.DeleteNodesCount.to_binary())
15031
        packet.append(self.DeleteReferencesCount.to_binary())
15032
        packet.append(self.BrowseCount.to_binary())
15033
        packet.append(self.BrowseNextCount.to_binary())
15034
        packet.append(self.TranslateBrowsePathsToNodeIdsCount.to_binary())
15035
        packet.append(self.QueryFirstCount.to_binary())
15036
        packet.append(self.QueryNextCount.to_binary())
15037
        packet.append(self.RegisterNodesCount.to_binary())
15038
        packet.append(self.UnregisterNodesCount.to_binary())
15039
        return b''.join(packet)
15040
15041 1
    @staticmethod
15042
    def from_binary(data):
15043
        return SessionDiagnosticsDataType(data)
15044
15045 1
    def _binary_init(self, data):
15046
        self.SessionId = NodeId.from_binary(data)
15047
        self.SessionName = uabin.Primitives.String.unpack(data)
15048
        self.ClientDescription = ApplicationDescription.from_binary(data)
15049
        self.ServerUri = uabin.Primitives.String.unpack(data)
15050
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
15051
        self.LocaleIds = uabin.Primitives.String.unpack_array(data)
15052
        self.ActualSessionTimeout = uabin.Primitives.Double.unpack(data)
15053
        self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data)
15054
        self.ClientConnectionTime = uabin.Primitives.DateTime.unpack(data)
15055
        self.ClientLastContactTime = uabin.Primitives.DateTime.unpack(data)
15056
        self.CurrentSubscriptionsCount = uabin.Primitives.UInt32.unpack(data)
15057
        self.CurrentMonitoredItemsCount = uabin.Primitives.UInt32.unpack(data)
15058
        self.CurrentPublishRequestsInQueue = uabin.Primitives.UInt32.unpack(data)
15059
        self.TotalRequestCount = ServiceCounterDataType.from_binary(data)
15060
        self.UnauthorizedRequestCount = uabin.Primitives.UInt32.unpack(data)
15061
        self.ReadCount = ServiceCounterDataType.from_binary(data)
15062
        self.HistoryReadCount = ServiceCounterDataType.from_binary(data)
15063
        self.WriteCount = ServiceCounterDataType.from_binary(data)
15064
        self.HistoryUpdateCount = ServiceCounterDataType.from_binary(data)
15065
        self.CallCount = ServiceCounterDataType.from_binary(data)
15066
        self.CreateMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
15067
        self.ModifyMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
15068
        self.SetMonitoringModeCount = ServiceCounterDataType.from_binary(data)
15069
        self.SetTriggeringCount = ServiceCounterDataType.from_binary(data)
15070
        self.DeleteMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
15071
        self.CreateSubscriptionCount = ServiceCounterDataType.from_binary(data)
15072
        self.ModifySubscriptionCount = ServiceCounterDataType.from_binary(data)
15073
        self.SetPublishingModeCount = ServiceCounterDataType.from_binary(data)
15074
        self.PublishCount = ServiceCounterDataType.from_binary(data)
15075
        self.RepublishCount = ServiceCounterDataType.from_binary(data)
15076
        self.TransferSubscriptionsCount = ServiceCounterDataType.from_binary(data)
15077
        self.DeleteSubscriptionsCount = ServiceCounterDataType.from_binary(data)
15078
        self.AddNodesCount = ServiceCounterDataType.from_binary(data)
15079
        self.AddReferencesCount = ServiceCounterDataType.from_binary(data)
15080
        self.DeleteNodesCount = ServiceCounterDataType.from_binary(data)
15081
        self.DeleteReferencesCount = ServiceCounterDataType.from_binary(data)
15082
        self.BrowseCount = ServiceCounterDataType.from_binary(data)
15083
        self.BrowseNextCount = ServiceCounterDataType.from_binary(data)
15084
        self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType.from_binary(data)
15085
        self.QueryFirstCount = ServiceCounterDataType.from_binary(data)
15086
        self.QueryNextCount = ServiceCounterDataType.from_binary(data)
15087
        self.RegisterNodesCount = ServiceCounterDataType.from_binary(data)
15088
        self.UnregisterNodesCount = ServiceCounterDataType.from_binary(data)
15089
15090 1
    def __str__(self):
15091
        return 'SessionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
15092
               'SessionName:' + str(self.SessionName) + ', ' + \
15093
               'ClientDescription:' + str(self.ClientDescription) + ', ' + \
15094
               'ServerUri:' + str(self.ServerUri) + ', ' + \
15095
               'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
15096
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
15097
               'ActualSessionTimeout:' + str(self.ActualSessionTimeout) + ', ' + \
15098
               'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ', ' + \
15099
               'ClientConnectionTime:' + str(self.ClientConnectionTime) + ', ' + \
15100
               'ClientLastContactTime:' + str(self.ClientLastContactTime) + ', ' + \
15101
               'CurrentSubscriptionsCount:' + str(self.CurrentSubscriptionsCount) + ', ' + \
15102
               'CurrentMonitoredItemsCount:' + str(self.CurrentMonitoredItemsCount) + ', ' + \
15103
               'CurrentPublishRequestsInQueue:' + str(self.CurrentPublishRequestsInQueue) + ', ' + \
15104
               'TotalRequestCount:' + str(self.TotalRequestCount) + ', ' + \
15105
               'UnauthorizedRequestCount:' + str(self.UnauthorizedRequestCount) + ', ' + \
15106
               'ReadCount:' + str(self.ReadCount) + ', ' + \
15107
               'HistoryReadCount:' + str(self.HistoryReadCount) + ', ' + \
15108
               'WriteCount:' + str(self.WriteCount) + ', ' + \
15109
               'HistoryUpdateCount:' + str(self.HistoryUpdateCount) + ', ' + \
15110
               'CallCount:' + str(self.CallCount) + ', ' + \
15111
               'CreateMonitoredItemsCount:' + str(self.CreateMonitoredItemsCount) + ', ' + \
15112
               'ModifyMonitoredItemsCount:' + str(self.ModifyMonitoredItemsCount) + ', ' + \
15113
               'SetMonitoringModeCount:' + str(self.SetMonitoringModeCount) + ', ' + \
15114
               'SetTriggeringCount:' + str(self.SetTriggeringCount) + ', ' + \
15115
               'DeleteMonitoredItemsCount:' + str(self.DeleteMonitoredItemsCount) + ', ' + \
15116
               'CreateSubscriptionCount:' + str(self.CreateSubscriptionCount) + ', ' + \
15117
               'ModifySubscriptionCount:' + str(self.ModifySubscriptionCount) + ', ' + \
15118
               'SetPublishingModeCount:' + str(self.SetPublishingModeCount) + ', ' + \
15119
               'PublishCount:' + str(self.PublishCount) + ', ' + \
15120
               'RepublishCount:' + str(self.RepublishCount) + ', ' + \
15121
               'TransferSubscriptionsCount:' + str(self.TransferSubscriptionsCount) + ', ' + \
15122
               'DeleteSubscriptionsCount:' + str(self.DeleteSubscriptionsCount) + ', ' + \
15123
               'AddNodesCount:' + str(self.AddNodesCount) + ', ' + \
15124
               'AddReferencesCount:' + str(self.AddReferencesCount) + ', ' + \
15125
               'DeleteNodesCount:' + str(self.DeleteNodesCount) + ', ' + \
15126
               'DeleteReferencesCount:' + str(self.DeleteReferencesCount) + ', ' + \
15127
               'BrowseCount:' + str(self.BrowseCount) + ', ' + \
15128
               'BrowseNextCount:' + str(self.BrowseNextCount) + ', ' + \
15129
               'TranslateBrowsePathsToNodeIdsCount:' + str(self.TranslateBrowsePathsToNodeIdsCount) + ', ' + \
15130
               'QueryFirstCount:' + str(self.QueryFirstCount) + ', ' + \
15131
               'QueryNextCount:' + str(self.QueryNextCount) + ', ' + \
15132
               'RegisterNodesCount:' + str(self.RegisterNodesCount) + ', ' + \
15133
               'UnregisterNodesCount:' + str(self.UnregisterNodesCount) + ')'
15134
15135 1
    __repr__ = __str__
15136
15137
15138 1
class SessionSecurityDiagnosticsDataType(FrozenClass):
15139
    '''
15140
    :ivar SessionId:
15141
    :vartype SessionId: NodeId
15142
    :ivar ClientUserIdOfSession:
15143
    :vartype ClientUserIdOfSession: String
15144
    :ivar ClientUserIdHistory:
15145
    :vartype ClientUserIdHistory: String
15146
    :ivar AuthenticationMechanism:
15147
    :vartype AuthenticationMechanism: String
15148
    :ivar Encoding:
15149
    :vartype Encoding: String
15150
    :ivar TransportProtocol:
15151
    :vartype TransportProtocol: String
15152
    :ivar SecurityMode:
15153
    :vartype SecurityMode: MessageSecurityMode
15154
    :ivar SecurityPolicyUri:
15155
    :vartype SecurityPolicyUri: String
15156
    :ivar ClientCertificate:
15157
    :vartype ClientCertificate: ByteString
15158
    '''
15159
15160 1
    ua_types = {
15161
        'SessionId': 'NodeId',
15162
        'ClientUserIdOfSession': 'String',
15163
        'ClientUserIdHistory': 'String',
15164
        'AuthenticationMechanism': 'String',
15165
        'Encoding': 'String',
15166
        'TransportProtocol': 'String',
15167
        'SecurityMode': 'MessageSecurityMode',
15168
        'SecurityPolicyUri': 'String',
15169
        'ClientCertificate': 'ByteString',
15170
               }
15171
15172 1
    def __init__(self, binary=None):
15173
        if binary is not None:
15174
            self._binary_init(binary)
15175
            self._freeze = True
15176
            return
15177
        self.SessionId = NodeId()
15178
        self.ClientUserIdOfSession = None
15179
        self.ClientUserIdHistory = []
15180
        self.AuthenticationMechanism = None
15181
        self.Encoding = None
15182
        self.TransportProtocol = None
15183
        self.SecurityMode = MessageSecurityMode(0)
15184
        self.SecurityPolicyUri = None
15185
        self.ClientCertificate = None
15186
        self._freeze = True
15187
15188 1 View Code Duplication
    def to_binary(self):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15189
        packet = []
15190
        packet.append(self.SessionId.to_binary())
15191
        packet.append(uabin.Primitives.String.pack(self.ClientUserIdOfSession))
15192
        packet.append(uabin.Primitives.Int32.pack(len(self.ClientUserIdHistory)))
15193
        for fieldname in self.ClientUserIdHistory:
15194
            packet.append(uabin.Primitives.String.pack(fieldname))
15195
        packet.append(uabin.Primitives.String.pack(self.AuthenticationMechanism))
15196
        packet.append(uabin.Primitives.String.pack(self.Encoding))
15197
        packet.append(uabin.Primitives.String.pack(self.TransportProtocol))
15198
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
15199
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
15200
        packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate))
15201
        return b''.join(packet)
15202
15203 1
    @staticmethod
15204
    def from_binary(data):
15205
        return SessionSecurityDiagnosticsDataType(data)
15206
15207 1
    def _binary_init(self, data):
15208
        self.SessionId = NodeId.from_binary(data)
15209
        self.ClientUserIdOfSession = uabin.Primitives.String.unpack(data)
15210
        self.ClientUserIdHistory = uabin.Primitives.String.unpack_array(data)
15211
        self.AuthenticationMechanism = uabin.Primitives.String.unpack(data)
15212
        self.Encoding = uabin.Primitives.String.unpack(data)
15213
        self.TransportProtocol = uabin.Primitives.String.unpack(data)
15214
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
15215
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
15216
        self.ClientCertificate = uabin.Primitives.ByteString.unpack(data)
15217
15218 1
    def __str__(self):
15219
        return 'SessionSecurityDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
15220
               'ClientUserIdOfSession:' + str(self.ClientUserIdOfSession) + ', ' + \
15221
               'ClientUserIdHistory:' + str(self.ClientUserIdHistory) + ', ' + \
15222
               'AuthenticationMechanism:' + str(self.AuthenticationMechanism) + ', ' + \
15223
               'Encoding:' + str(self.Encoding) + ', ' + \
15224
               'TransportProtocol:' + str(self.TransportProtocol) + ', ' + \
15225
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
15226
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \
15227
               'ClientCertificate:' + str(self.ClientCertificate) + ')'
15228
15229 1
    __repr__ = __str__
15230
15231
15232 1 View Code Duplication
class ServiceCounterDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15233
    '''
15234
    :ivar TotalCount:
15235
    :vartype TotalCount: UInt32
15236
    :ivar ErrorCount:
15237
    :vartype ErrorCount: UInt32
15238
    '''
15239
15240 1
    ua_types = {
15241
        'TotalCount': 'UInt32',
15242
        'ErrorCount': 'UInt32',
15243
               }
15244
15245 1
    def __init__(self, binary=None):
15246
        if binary is not None:
15247
            self._binary_init(binary)
15248
            self._freeze = True
15249
            return
15250
        self.TotalCount = 0
15251
        self.ErrorCount = 0
15252
        self._freeze = True
15253
15254 1
    def to_binary(self):
15255
        packet = []
15256
        packet.append(uabin.Primitives.UInt32.pack(self.TotalCount))
15257
        packet.append(uabin.Primitives.UInt32.pack(self.ErrorCount))
15258
        return b''.join(packet)
15259
15260 1
    @staticmethod
15261
    def from_binary(data):
15262
        return ServiceCounterDataType(data)
15263
15264 1
    def _binary_init(self, data):
15265
        self.TotalCount = uabin.Primitives.UInt32.unpack(data)
15266
        self.ErrorCount = uabin.Primitives.UInt32.unpack(data)
15267
15268 1
    def __str__(self):
15269
        return 'ServiceCounterDataType(' + 'TotalCount:' + str(self.TotalCount) + ', ' + \
15270
               'ErrorCount:' + str(self.ErrorCount) + ')'
15271
15272 1
    __repr__ = __str__
15273
15274
15275 1
class StatusResult(FrozenClass):
15276
    '''
15277
    :ivar StatusCode:
15278
    :vartype StatusCode: StatusCode
15279
    :ivar DiagnosticInfo:
15280
    :vartype DiagnosticInfo: DiagnosticInfo
15281
    '''
15282
15283 1
    ua_types = {
15284
        'StatusCode': 'StatusCode',
15285
        'DiagnosticInfo': 'DiagnosticInfo',
15286
               }
15287
15288 1
    def __init__(self, binary=None):
15289
        if binary is not None:
15290
            self._binary_init(binary)
15291
            self._freeze = True
15292
            return
15293
        self.StatusCode = StatusCode()
15294
        self.DiagnosticInfo = DiagnosticInfo()
15295
        self._freeze = True
15296
15297 1
    def to_binary(self):
15298
        packet = []
15299
        packet.append(self.StatusCode.to_binary())
15300
        packet.append(self.DiagnosticInfo.to_binary())
15301
        return b''.join(packet)
15302
15303 1
    @staticmethod
15304
    def from_binary(data):
15305
        return StatusResult(data)
15306
15307 1
    def _binary_init(self, data):
15308
        self.StatusCode = StatusCode.from_binary(data)
15309
        self.DiagnosticInfo = DiagnosticInfo.from_binary(data)
15310
15311 1
    def __str__(self):
15312
        return 'StatusResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
15313
               'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')'
15314
15315 1
    __repr__ = __str__
15316
15317
15318 1
class SubscriptionDiagnosticsDataType(FrozenClass):
15319
    '''
15320
    :ivar SessionId:
15321
    :vartype SessionId: NodeId
15322
    :ivar SubscriptionId:
15323
    :vartype SubscriptionId: UInt32
15324
    :ivar Priority:
15325
    :vartype Priority: Byte
15326
    :ivar PublishingInterval:
15327
    :vartype PublishingInterval: Double
15328
    :ivar MaxKeepAliveCount:
15329
    :vartype MaxKeepAliveCount: UInt32
15330
    :ivar MaxLifetimeCount:
15331
    :vartype MaxLifetimeCount: UInt32
15332
    :ivar MaxNotificationsPerPublish:
15333
    :vartype MaxNotificationsPerPublish: UInt32
15334
    :ivar PublishingEnabled:
15335
    :vartype PublishingEnabled: Boolean
15336
    :ivar ModifyCount:
15337
    :vartype ModifyCount: UInt32
15338
    :ivar EnableCount:
15339
    :vartype EnableCount: UInt32
15340
    :ivar DisableCount:
15341
    :vartype DisableCount: UInt32
15342
    :ivar RepublishRequestCount:
15343
    :vartype RepublishRequestCount: UInt32
15344
    :ivar RepublishMessageRequestCount:
15345
    :vartype RepublishMessageRequestCount: UInt32
15346
    :ivar RepublishMessageCount:
15347
    :vartype RepublishMessageCount: UInt32
15348
    :ivar TransferRequestCount:
15349
    :vartype TransferRequestCount: UInt32
15350
    :ivar TransferredToAltClientCount:
15351
    :vartype TransferredToAltClientCount: UInt32
15352
    :ivar TransferredToSameClientCount:
15353
    :vartype TransferredToSameClientCount: UInt32
15354
    :ivar PublishRequestCount:
15355
    :vartype PublishRequestCount: UInt32
15356
    :ivar DataChangeNotificationsCount:
15357
    :vartype DataChangeNotificationsCount: UInt32
15358
    :ivar EventNotificationsCount:
15359
    :vartype EventNotificationsCount: UInt32
15360
    :ivar NotificationsCount:
15361
    :vartype NotificationsCount: UInt32
15362
    :ivar LatePublishRequestCount:
15363
    :vartype LatePublishRequestCount: UInt32
15364
    :ivar CurrentKeepAliveCount:
15365
    :vartype CurrentKeepAliveCount: UInt32
15366
    :ivar CurrentLifetimeCount:
15367
    :vartype CurrentLifetimeCount: UInt32
15368
    :ivar UnacknowledgedMessageCount:
15369
    :vartype UnacknowledgedMessageCount: UInt32
15370
    :ivar DiscardedMessageCount:
15371
    :vartype DiscardedMessageCount: UInt32
15372
    :ivar MonitoredItemCount:
15373
    :vartype MonitoredItemCount: UInt32
15374
    :ivar DisabledMonitoredItemCount:
15375
    :vartype DisabledMonitoredItemCount: UInt32
15376
    :ivar MonitoringQueueOverflowCount:
15377
    :vartype MonitoringQueueOverflowCount: UInt32
15378
    :ivar NextSequenceNumber:
15379
    :vartype NextSequenceNumber: UInt32
15380
    :ivar EventQueueOverFlowCount:
15381
    :vartype EventQueueOverFlowCount: UInt32
15382
    '''
15383
15384 1
    ua_types = {
15385
        'SessionId': 'NodeId',
15386
        'SubscriptionId': 'UInt32',
15387
        'Priority': 'Byte',
15388
        'PublishingInterval': 'Double',
15389
        'MaxKeepAliveCount': 'UInt32',
15390
        'MaxLifetimeCount': 'UInt32',
15391
        'MaxNotificationsPerPublish': 'UInt32',
15392
        'PublishingEnabled': 'Boolean',
15393
        'ModifyCount': 'UInt32',
15394
        'EnableCount': 'UInt32',
15395
        'DisableCount': 'UInt32',
15396
        'RepublishRequestCount': 'UInt32',
15397
        'RepublishMessageRequestCount': 'UInt32',
15398
        'RepublishMessageCount': 'UInt32',
15399
        'TransferRequestCount': 'UInt32',
15400
        'TransferredToAltClientCount': 'UInt32',
15401
        'TransferredToSameClientCount': 'UInt32',
15402
        'PublishRequestCount': 'UInt32',
15403
        'DataChangeNotificationsCount': 'UInt32',
15404
        'EventNotificationsCount': 'UInt32',
15405
        'NotificationsCount': 'UInt32',
15406
        'LatePublishRequestCount': 'UInt32',
15407
        'CurrentKeepAliveCount': 'UInt32',
15408
        'CurrentLifetimeCount': 'UInt32',
15409
        'UnacknowledgedMessageCount': 'UInt32',
15410
        'DiscardedMessageCount': 'UInt32',
15411
        'MonitoredItemCount': 'UInt32',
15412
        'DisabledMonitoredItemCount': 'UInt32',
15413
        'MonitoringQueueOverflowCount': 'UInt32',
15414
        'NextSequenceNumber': 'UInt32',
15415
        'EventQueueOverFlowCount': 'UInt32',
15416
               }
15417
15418 1
    def __init__(self, binary=None):
15419
        if binary is not None:
15420
            self._binary_init(binary)
15421
            self._freeze = True
15422
            return
15423
        self.SessionId = NodeId()
15424
        self.SubscriptionId = 0
15425
        self.Priority = 0
15426
        self.PublishingInterval = 0
15427
        self.MaxKeepAliveCount = 0
15428
        self.MaxLifetimeCount = 0
15429
        self.MaxNotificationsPerPublish = 0
15430
        self.PublishingEnabled = True
15431
        self.ModifyCount = 0
15432
        self.EnableCount = 0
15433
        self.DisableCount = 0
15434
        self.RepublishRequestCount = 0
15435
        self.RepublishMessageRequestCount = 0
15436
        self.RepublishMessageCount = 0
15437
        self.TransferRequestCount = 0
15438
        self.TransferredToAltClientCount = 0
15439
        self.TransferredToSameClientCount = 0
15440
        self.PublishRequestCount = 0
15441
        self.DataChangeNotificationsCount = 0
15442
        self.EventNotificationsCount = 0
15443
        self.NotificationsCount = 0
15444
        self.LatePublishRequestCount = 0
15445
        self.CurrentKeepAliveCount = 0
15446
        self.CurrentLifetimeCount = 0
15447
        self.UnacknowledgedMessageCount = 0
15448
        self.DiscardedMessageCount = 0
15449
        self.MonitoredItemCount = 0
15450
        self.DisabledMonitoredItemCount = 0
15451
        self.MonitoringQueueOverflowCount = 0
15452
        self.NextSequenceNumber = 0
15453
        self.EventQueueOverFlowCount = 0
15454
        self._freeze = True
15455
15456 1
    def to_binary(self):
15457
        packet = []
15458
        packet.append(self.SessionId.to_binary())
15459
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
15460
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
15461
        packet.append(uabin.Primitives.Double.pack(self.PublishingInterval))
15462
        packet.append(uabin.Primitives.UInt32.pack(self.MaxKeepAliveCount))
15463
        packet.append(uabin.Primitives.UInt32.pack(self.MaxLifetimeCount))
15464
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
15465
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
15466
        packet.append(uabin.Primitives.UInt32.pack(self.ModifyCount))
15467
        packet.append(uabin.Primitives.UInt32.pack(self.EnableCount))
15468
        packet.append(uabin.Primitives.UInt32.pack(self.DisableCount))
15469
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishRequestCount))
15470
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageRequestCount))
15471
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageCount))
15472
        packet.append(uabin.Primitives.UInt32.pack(self.TransferRequestCount))
15473
        packet.append(uabin.Primitives.UInt32.pack(self.TransferredToAltClientCount))
15474
        packet.append(uabin.Primitives.UInt32.pack(self.TransferredToSameClientCount))
15475
        packet.append(uabin.Primitives.UInt32.pack(self.PublishRequestCount))
15476
        packet.append(uabin.Primitives.UInt32.pack(self.DataChangeNotificationsCount))
15477
        packet.append(uabin.Primitives.UInt32.pack(self.EventNotificationsCount))
15478
        packet.append(uabin.Primitives.UInt32.pack(self.NotificationsCount))
15479
        packet.append(uabin.Primitives.UInt32.pack(self.LatePublishRequestCount))
15480
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentKeepAliveCount))
15481
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentLifetimeCount))
15482
        packet.append(uabin.Primitives.UInt32.pack(self.UnacknowledgedMessageCount))
15483
        packet.append(uabin.Primitives.UInt32.pack(self.DiscardedMessageCount))
15484
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount))
15485
        packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount))
15486
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringQueueOverflowCount))
15487
        packet.append(uabin.Primitives.UInt32.pack(self.NextSequenceNumber))
15488
        packet.append(uabin.Primitives.UInt32.pack(self.EventQueueOverFlowCount))
15489
        return b''.join(packet)
15490
15491 1
    @staticmethod
15492
    def from_binary(data):
15493
        return SubscriptionDiagnosticsDataType(data)
15494
15495 1
    def _binary_init(self, data):
15496
        self.SessionId = NodeId.from_binary(data)
15497
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
15498
        self.Priority = uabin.Primitives.Byte.unpack(data)
15499
        self.PublishingInterval = uabin.Primitives.Double.unpack(data)
15500
        self.MaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
15501
        self.MaxLifetimeCount = uabin.Primitives.UInt32.unpack(data)
15502
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
15503
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
15504
        self.ModifyCount = uabin.Primitives.UInt32.unpack(data)
15505
        self.EnableCount = uabin.Primitives.UInt32.unpack(data)
15506
        self.DisableCount = uabin.Primitives.UInt32.unpack(data)
15507
        self.RepublishRequestCount = uabin.Primitives.UInt32.unpack(data)
15508
        self.RepublishMessageRequestCount = uabin.Primitives.UInt32.unpack(data)
15509
        self.RepublishMessageCount = uabin.Primitives.UInt32.unpack(data)
15510
        self.TransferRequestCount = uabin.Primitives.UInt32.unpack(data)
15511
        self.TransferredToAltClientCount = uabin.Primitives.UInt32.unpack(data)
15512
        self.TransferredToSameClientCount = uabin.Primitives.UInt32.unpack(data)
15513
        self.PublishRequestCount = uabin.Primitives.UInt32.unpack(data)
15514
        self.DataChangeNotificationsCount = uabin.Primitives.UInt32.unpack(data)
15515
        self.EventNotificationsCount = uabin.Primitives.UInt32.unpack(data)
15516
        self.NotificationsCount = uabin.Primitives.UInt32.unpack(data)
15517
        self.LatePublishRequestCount = uabin.Primitives.UInt32.unpack(data)
15518
        self.CurrentKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
15519
        self.CurrentLifetimeCount = uabin.Primitives.UInt32.unpack(data)
15520
        self.UnacknowledgedMessageCount = uabin.Primitives.UInt32.unpack(data)
15521
        self.DiscardedMessageCount = uabin.Primitives.UInt32.unpack(data)
15522
        self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
15523
        self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
15524
        self.MonitoringQueueOverflowCount = uabin.Primitives.UInt32.unpack(data)
15525
        self.NextSequenceNumber = uabin.Primitives.UInt32.unpack(data)
15526
        self.EventQueueOverFlowCount = uabin.Primitives.UInt32.unpack(data)
15527
15528 1
    def __str__(self):
15529
        return 'SubscriptionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
15530
               'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
15531
               'Priority:' + str(self.Priority) + ', ' + \
15532
               'PublishingInterval:' + str(self.PublishingInterval) + ', ' + \
15533
               'MaxKeepAliveCount:' + str(self.MaxKeepAliveCount) + ', ' + \
15534
               'MaxLifetimeCount:' + str(self.MaxLifetimeCount) + ', ' + \
15535
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
15536
               'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
15537
               'ModifyCount:' + str(self.ModifyCount) + ', ' + \
15538
               'EnableCount:' + str(self.EnableCount) + ', ' + \
15539
               'DisableCount:' + str(self.DisableCount) + ', ' + \
15540
               'RepublishRequestCount:' + str(self.RepublishRequestCount) + ', ' + \
15541
               'RepublishMessageRequestCount:' + str(self.RepublishMessageRequestCount) + ', ' + \
15542
               'RepublishMessageCount:' + str(self.RepublishMessageCount) + ', ' + \
15543
               'TransferRequestCount:' + str(self.TransferRequestCount) + ', ' + \
15544
               'TransferredToAltClientCount:' + str(self.TransferredToAltClientCount) + ', ' + \
15545
               'TransferredToSameClientCount:' + str(self.TransferredToSameClientCount) + ', ' + \
15546
               'PublishRequestCount:' + str(self.PublishRequestCount) + ', ' + \
15547
               'DataChangeNotificationsCount:' + str(self.DataChangeNotificationsCount) + ', ' + \
15548
               'EventNotificationsCount:' + str(self.EventNotificationsCount) + ', ' + \
15549
               'NotificationsCount:' + str(self.NotificationsCount) + ', ' + \
15550
               'LatePublishRequestCount:' + str(self.LatePublishRequestCount) + ', ' + \
15551
               'CurrentKeepAliveCount:' + str(self.CurrentKeepAliveCount) + ', ' + \
15552
               'CurrentLifetimeCount:' + str(self.CurrentLifetimeCount) + ', ' + \
15553
               'UnacknowledgedMessageCount:' + str(self.UnacknowledgedMessageCount) + ', ' + \
15554
               'DiscardedMessageCount:' + str(self.DiscardedMessageCount) + ', ' + \
15555
               'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \
15556
               'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ', ' + \
15557
               'MonitoringQueueOverflowCount:' + str(self.MonitoringQueueOverflowCount) + ', ' + \
15558
               'NextSequenceNumber:' + str(self.NextSequenceNumber) + ', ' + \
15559
               'EventQueueOverFlowCount:' + str(self.EventQueueOverFlowCount) + ')'
15560
15561 1
    __repr__ = __str__
15562
15563
15564 1
class ModelChangeStructureDataType(FrozenClass):
15565
    '''
15566
    :ivar Affected:
15567
    :vartype Affected: NodeId
15568
    :ivar AffectedType:
15569
    :vartype AffectedType: NodeId
15570
    :ivar Verb:
15571
    :vartype Verb: Byte
15572
    '''
15573
15574 1
    ua_types = {
15575
        'Affected': 'NodeId',
15576
        'AffectedType': 'NodeId',
15577
        'Verb': 'Byte',
15578
               }
15579
15580 1
    def __init__(self, binary=None):
15581
        if binary is not None:
15582
            self._binary_init(binary)
15583
            self._freeze = True
15584
            return
15585
        self.Affected = NodeId()
15586
        self.AffectedType = NodeId()
15587
        self.Verb = 0
15588
        self._freeze = True
15589
15590 1
    def to_binary(self):
15591
        packet = []
15592
        packet.append(self.Affected.to_binary())
15593
        packet.append(self.AffectedType.to_binary())
15594
        packet.append(uabin.Primitives.Byte.pack(self.Verb))
15595
        return b''.join(packet)
15596
15597 1
    @staticmethod
15598
    def from_binary(data):
15599
        return ModelChangeStructureDataType(data)
15600
15601 1
    def _binary_init(self, data):
15602
        self.Affected = NodeId.from_binary(data)
15603
        self.AffectedType = NodeId.from_binary(data)
15604
        self.Verb = uabin.Primitives.Byte.unpack(data)
15605
15606 1
    def __str__(self):
15607
        return 'ModelChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \
15608
               'AffectedType:' + str(self.AffectedType) + ', ' + \
15609
               'Verb:' + str(self.Verb) + ')'
15610
15611 1
    __repr__ = __str__
15612
15613
15614 1
class SemanticChangeStructureDataType(FrozenClass):
15615
    '''
15616
    :ivar Affected:
15617
    :vartype Affected: NodeId
15618
    :ivar AffectedType:
15619
    :vartype AffectedType: NodeId
15620
    '''
15621
15622 1
    ua_types = {
15623
        'Affected': 'NodeId',
15624
        'AffectedType': 'NodeId',
15625
               }
15626
15627 1
    def __init__(self, binary=None):
15628
        if binary is not None:
15629
            self._binary_init(binary)
15630
            self._freeze = True
15631
            return
15632
        self.Affected = NodeId()
15633
        self.AffectedType = NodeId()
15634
        self._freeze = True
15635
15636 1
    def to_binary(self):
15637
        packet = []
15638
        packet.append(self.Affected.to_binary())
15639
        packet.append(self.AffectedType.to_binary())
15640
        return b''.join(packet)
15641
15642 1
    @staticmethod
15643
    def from_binary(data):
15644
        return SemanticChangeStructureDataType(data)
15645
15646 1
    def _binary_init(self, data):
15647
        self.Affected = NodeId.from_binary(data)
15648
        self.AffectedType = NodeId.from_binary(data)
15649
15650 1
    def __str__(self):
15651
        return 'SemanticChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \
15652
               'AffectedType:' + str(self.AffectedType) + ')'
15653
15654 1
    __repr__ = __str__
15655
15656
15657 1 View Code Duplication
class Range(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15658
    '''
15659
    :ivar Low:
15660
    :vartype Low: Double
15661
    :ivar High:
15662
    :vartype High: Double
15663
    '''
15664
15665 1
    ua_types = {
15666
        'Low': 'Double',
15667
        'High': 'Double',
15668
               }
15669
15670 1
    def __init__(self, binary=None):
15671
        if binary is not None:
15672
            self._binary_init(binary)
15673
            self._freeze = True
15674
            return
15675
        self.Low = 0
15676
        self.High = 0
15677
        self._freeze = True
15678
15679 1
    def to_binary(self):
15680
        packet = []
15681
        packet.append(uabin.Primitives.Double.pack(self.Low))
15682
        packet.append(uabin.Primitives.Double.pack(self.High))
15683
        return b''.join(packet)
15684
15685 1
    @staticmethod
15686
    def from_binary(data):
15687
        return Range(data)
15688
15689 1
    def _binary_init(self, data):
15690
        self.Low = uabin.Primitives.Double.unpack(data)
15691
        self.High = uabin.Primitives.Double.unpack(data)
15692
15693 1
    def __str__(self):
15694
        return 'Range(' + 'Low:' + str(self.Low) + ', ' + \
15695
               'High:' + str(self.High) + ')'
15696
15697 1
    __repr__ = __str__
15698
15699
15700 1
class EUInformation(FrozenClass):
15701
    '''
15702
    :ivar NamespaceUri:
15703
    :vartype NamespaceUri: String
15704
    :ivar UnitId:
15705
    :vartype UnitId: Int32
15706
    :ivar DisplayName:
15707
    :vartype DisplayName: LocalizedText
15708
    :ivar Description:
15709
    :vartype Description: LocalizedText
15710
    '''
15711
15712 1
    ua_types = {
15713
        'NamespaceUri': 'String',
15714
        'UnitId': 'Int32',
15715
        'DisplayName': 'LocalizedText',
15716
        'Description': 'LocalizedText',
15717
               }
15718
15719 1
    def __init__(self, binary=None):
15720
        if binary is not None:
15721
            self._binary_init(binary)
15722
            self._freeze = True
15723
            return
15724
        self.NamespaceUri = None
15725
        self.UnitId = 0
15726
        self.DisplayName = LocalizedText()
15727
        self.Description = LocalizedText()
15728
        self._freeze = True
15729
15730 1
    def to_binary(self):
15731
        packet = []
15732
        packet.append(uabin.Primitives.String.pack(self.NamespaceUri))
15733
        packet.append(uabin.Primitives.Int32.pack(self.UnitId))
15734
        packet.append(self.DisplayName.to_binary())
15735
        packet.append(self.Description.to_binary())
15736
        return b''.join(packet)
15737
15738 1
    @staticmethod
15739
    def from_binary(data):
15740
        return EUInformation(data)
15741
15742 1
    def _binary_init(self, data):
15743
        self.NamespaceUri = uabin.Primitives.String.unpack(data)
15744
        self.UnitId = uabin.Primitives.Int32.unpack(data)
15745
        self.DisplayName = LocalizedText.from_binary(data)
15746
        self.Description = LocalizedText.from_binary(data)
15747
15748 1
    def __str__(self):
15749
        return 'EUInformation(' + 'NamespaceUri:' + str(self.NamespaceUri) + ', ' + \
15750
               'UnitId:' + str(self.UnitId) + ', ' + \
15751
               'DisplayName:' + str(self.DisplayName) + ', ' + \
15752
               'Description:' + str(self.Description) + ')'
15753
15754 1
    __repr__ = __str__
15755
15756
15757 1 View Code Duplication
class ComplexNumberType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15758
    '''
15759
    :ivar Real:
15760
    :vartype Real: Float
15761
    :ivar Imaginary:
15762
    :vartype Imaginary: Float
15763
    '''
15764
15765 1
    ua_types = {
15766
        'Real': 'Float',
15767
        'Imaginary': 'Float',
15768
               }
15769
15770 1
    def __init__(self, binary=None):
15771
        if binary is not None:
15772
            self._binary_init(binary)
15773
            self._freeze = True
15774
            return
15775
        self.Real = 0
15776
        self.Imaginary = 0
15777
        self._freeze = True
15778
15779 1
    def to_binary(self):
15780
        packet = []
15781
        packet.append(uabin.Primitives.Float.pack(self.Real))
15782
        packet.append(uabin.Primitives.Float.pack(self.Imaginary))
15783
        return b''.join(packet)
15784
15785 1
    @staticmethod
15786
    def from_binary(data):
15787
        return ComplexNumberType(data)
15788
15789 1
    def _binary_init(self, data):
15790
        self.Real = uabin.Primitives.Float.unpack(data)
15791
        self.Imaginary = uabin.Primitives.Float.unpack(data)
15792
15793 1
    def __str__(self):
15794
        return 'ComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \
15795
               'Imaginary:' + str(self.Imaginary) + ')'
15796
15797 1
    __repr__ = __str__
15798
15799
15800 1 View Code Duplication
class DoubleComplexNumberType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15801
    '''
15802
    :ivar Real:
15803
    :vartype Real: Double
15804
    :ivar Imaginary:
15805
    :vartype Imaginary: Double
15806
    '''
15807
15808 1
    ua_types = {
15809
        'Real': 'Double',
15810
        'Imaginary': 'Double',
15811
               }
15812
15813 1
    def __init__(self, binary=None):
15814
        if binary is not None:
15815
            self._binary_init(binary)
15816
            self._freeze = True
15817
            return
15818
        self.Real = 0
15819
        self.Imaginary = 0
15820
        self._freeze = True
15821
15822 1
    def to_binary(self):
15823
        packet = []
15824
        packet.append(uabin.Primitives.Double.pack(self.Real))
15825
        packet.append(uabin.Primitives.Double.pack(self.Imaginary))
15826
        return b''.join(packet)
15827
15828 1
    @staticmethod
15829
    def from_binary(data):
15830
        return DoubleComplexNumberType(data)
15831
15832 1
    def _binary_init(self, data):
15833
        self.Real = uabin.Primitives.Double.unpack(data)
15834
        self.Imaginary = uabin.Primitives.Double.unpack(data)
15835
15836 1
    def __str__(self):
15837
        return 'DoubleComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \
15838
               'Imaginary:' + str(self.Imaginary) + ')'
15839
15840 1
    __repr__ = __str__
15841
15842
15843 1 View Code Duplication
class AxisInformation(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15844
    '''
15845
    :ivar EngineeringUnits:
15846
    :vartype EngineeringUnits: EUInformation
15847
    :ivar EURange:
15848
    :vartype EURange: Range
15849
    :ivar Title:
15850
    :vartype Title: LocalizedText
15851
    :ivar AxisScaleType:
15852
    :vartype AxisScaleType: AxisScaleEnumeration
15853
    :ivar AxisSteps:
15854
    :vartype AxisSteps: Double
15855
    '''
15856
15857 1
    ua_types = {
15858
        'EngineeringUnits': 'EUInformation',
15859
        'EURange': 'Range',
15860
        'Title': 'LocalizedText',
15861
        'AxisScaleType': 'AxisScaleEnumeration',
15862
        'AxisSteps': 'Double',
15863
               }
15864
15865 1
    def __init__(self, binary=None):
15866
        if binary is not None:
15867
            self._binary_init(binary)
15868
            self._freeze = True
15869
            return
15870
        self.EngineeringUnits = EUInformation()
15871
        self.EURange = Range()
15872
        self.Title = LocalizedText()
15873
        self.AxisScaleType = AxisScaleEnumeration(0)
15874
        self.AxisSteps = []
15875
        self._freeze = True
15876
15877 1
    def to_binary(self):
15878
        packet = []
15879
        packet.append(self.EngineeringUnits.to_binary())
15880
        packet.append(self.EURange.to_binary())
15881
        packet.append(self.Title.to_binary())
15882
        packet.append(uabin.Primitives.UInt32.pack(self.AxisScaleType.value))
15883
        packet.append(uabin.Primitives.Int32.pack(len(self.AxisSteps)))
15884
        for fieldname in self.AxisSteps:
15885
            packet.append(uabin.Primitives.Double.pack(fieldname))
15886
        return b''.join(packet)
15887
15888 1
    @staticmethod
15889
    def from_binary(data):
15890
        return AxisInformation(data)
15891
15892 1
    def _binary_init(self, data):
15893
        self.EngineeringUnits = EUInformation.from_binary(data)
15894
        self.EURange = Range.from_binary(data)
15895
        self.Title = LocalizedText.from_binary(data)
15896
        self.AxisScaleType = AxisScaleEnumeration(uabin.Primitives.UInt32.unpack(data))
15897
        self.AxisSteps = uabin.Primitives.Double.unpack_array(data)
15898
15899 1
    def __str__(self):
15900
        return 'AxisInformation(' + 'EngineeringUnits:' + str(self.EngineeringUnits) + ', ' + \
15901
               'EURange:' + str(self.EURange) + ', ' + \
15902
               'Title:' + str(self.Title) + ', ' + \
15903
               'AxisScaleType:' + str(self.AxisScaleType) + ', ' + \
15904
               'AxisSteps:' + str(self.AxisSteps) + ')'
15905
15906 1
    __repr__ = __str__
15907
15908
15909 1 View Code Duplication
class XVType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15910
    '''
15911
    :ivar X:
15912
    :vartype X: Double
15913
    :ivar Value:
15914
    :vartype Value: Float
15915
    '''
15916
15917 1
    ua_types = {
15918
        'X': 'Double',
15919
        'Value': 'Float',
15920
               }
15921
15922 1
    def __init__(self, binary=None):
15923
        if binary is not None:
15924
            self._binary_init(binary)
15925
            self._freeze = True
15926
            return
15927
        self.X = 0
15928
        self.Value = 0
15929
        self._freeze = True
15930
15931 1
    def to_binary(self):
15932
        packet = []
15933
        packet.append(uabin.Primitives.Double.pack(self.X))
15934
        packet.append(uabin.Primitives.Float.pack(self.Value))
15935
        return b''.join(packet)
15936
15937 1
    @staticmethod
15938
    def from_binary(data):
15939
        return XVType(data)
15940
15941 1
    def _binary_init(self, data):
15942
        self.X = uabin.Primitives.Double.unpack(data)
15943
        self.Value = uabin.Primitives.Float.unpack(data)
15944
15945 1
    def __str__(self):
15946
        return 'XVType(' + 'X:' + str(self.X) + ', ' + \
15947
               'Value:' + str(self.Value) + ')'
15948
15949 1
    __repr__ = __str__
15950
15951
15952 1
class ProgramDiagnosticDataType(FrozenClass):
15953
    '''
15954
    :ivar CreateSessionId:
15955
    :vartype CreateSessionId: NodeId
15956
    :ivar CreateClientName:
15957
    :vartype CreateClientName: String
15958
    :ivar InvocationCreationTime:
15959
    :vartype InvocationCreationTime: DateTime
15960
    :ivar LastTransitionTime:
15961
    :vartype LastTransitionTime: DateTime
15962
    :ivar LastMethodCall:
15963
    :vartype LastMethodCall: String
15964
    :ivar LastMethodSessionId:
15965
    :vartype LastMethodSessionId: NodeId
15966
    :ivar LastMethodInputArguments:
15967
    :vartype LastMethodInputArguments: Argument
15968
    :ivar LastMethodOutputArguments:
15969
    :vartype LastMethodOutputArguments: Argument
15970
    :ivar LastMethodCallTime:
15971
    :vartype LastMethodCallTime: DateTime
15972
    :ivar LastMethodReturnStatus:
15973
    :vartype LastMethodReturnStatus: StatusResult
15974
    '''
15975
15976 1
    ua_types = {
15977
        'CreateSessionId': 'NodeId',
15978
        'CreateClientName': 'String',
15979
        'InvocationCreationTime': 'DateTime',
15980
        'LastTransitionTime': 'DateTime',
15981
        'LastMethodCall': 'String',
15982
        'LastMethodSessionId': 'NodeId',
15983
        'LastMethodInputArguments': 'Argument',
15984
        'LastMethodOutputArguments': 'Argument',
15985
        'LastMethodCallTime': 'DateTime',
15986
        'LastMethodReturnStatus': 'StatusResult',
15987
               }
15988
15989 1
    def __init__(self, binary=None):
15990
        if binary is not None:
15991
            self._binary_init(binary)
15992
            self._freeze = True
15993
            return
15994
        self.CreateSessionId = NodeId()
15995
        self.CreateClientName = None
15996
        self.InvocationCreationTime = datetime.utcnow()
15997
        self.LastTransitionTime = datetime.utcnow()
15998
        self.LastMethodCall = None
15999
        self.LastMethodSessionId = NodeId()
16000
        self.LastMethodInputArguments = []
16001
        self.LastMethodOutputArguments = []
16002
        self.LastMethodCallTime = datetime.utcnow()
16003
        self.LastMethodReturnStatus = StatusResult()
16004
        self._freeze = True
16005
16006 1
    def to_binary(self):
16007
        packet = []
16008
        packet.append(self.CreateSessionId.to_binary())
16009
        packet.append(uabin.Primitives.String.pack(self.CreateClientName))
16010
        packet.append(uabin.Primitives.DateTime.pack(self.InvocationCreationTime))
16011
        packet.append(uabin.Primitives.DateTime.pack(self.LastTransitionTime))
16012
        packet.append(uabin.Primitives.String.pack(self.LastMethodCall))
16013
        packet.append(self.LastMethodSessionId.to_binary())
16014
        packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodInputArguments)))
16015
        for fieldname in self.LastMethodInputArguments:
16016
            packet.append(fieldname.to_binary())
16017
        packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodOutputArguments)))
16018
        for fieldname in self.LastMethodOutputArguments:
16019
            packet.append(fieldname.to_binary())
16020
        packet.append(uabin.Primitives.DateTime.pack(self.LastMethodCallTime))
16021
        packet.append(self.LastMethodReturnStatus.to_binary())
16022
        return b''.join(packet)
16023
16024 1
    @staticmethod
16025
    def from_binary(data):
16026
        return ProgramDiagnosticDataType(data)
16027
16028 1
    def _binary_init(self, data):
16029
        self.CreateSessionId = NodeId.from_binary(data)
16030
        self.CreateClientName = uabin.Primitives.String.unpack(data)
16031
        self.InvocationCreationTime = uabin.Primitives.DateTime.unpack(data)
16032
        self.LastTransitionTime = uabin.Primitives.DateTime.unpack(data)
16033
        self.LastMethodCall = uabin.Primitives.String.unpack(data)
16034
        self.LastMethodSessionId = NodeId.from_binary(data)
16035
        length = uabin.Primitives.Int32.unpack(data)
16036
        array = []
16037
        if length != -1:
16038
            for _ in range(0, length):
16039
                array.append(Argument.from_binary(data))
16040
        self.LastMethodInputArguments = array
16041
        length = uabin.Primitives.Int32.unpack(data)
16042
        array = []
16043
        if length != -1:
16044
            for _ in range(0, length):
16045
                array.append(Argument.from_binary(data))
16046
        self.LastMethodOutputArguments = array
16047
        self.LastMethodCallTime = uabin.Primitives.DateTime.unpack(data)
16048
        self.LastMethodReturnStatus = StatusResult.from_binary(data)
16049
16050 1
    def __str__(self):
16051
        return 'ProgramDiagnosticDataType(' + 'CreateSessionId:' + str(self.CreateSessionId) + ', ' + \
16052
               'CreateClientName:' + str(self.CreateClientName) + ', ' + \
16053
               'InvocationCreationTime:' + str(self.InvocationCreationTime) + ', ' + \
16054
               'LastTransitionTime:' + str(self.LastTransitionTime) + ', ' + \
16055
               'LastMethodCall:' + str(self.LastMethodCall) + ', ' + \
16056
               'LastMethodSessionId:' + str(self.LastMethodSessionId) + ', ' + \
16057
               'LastMethodInputArguments:' + str(self.LastMethodInputArguments) + ', ' + \
16058
               'LastMethodOutputArguments:' + str(self.LastMethodOutputArguments) + ', ' + \
16059
               'LastMethodCallTime:' + str(self.LastMethodCallTime) + ', ' + \
16060
               'LastMethodReturnStatus:' + str(self.LastMethodReturnStatus) + ')'
16061
16062 1
    __repr__ = __str__
16063
16064
16065 1
class Annotation(FrozenClass):
16066
    '''
16067
    :ivar Message:
16068
    :vartype Message: String
16069
    :ivar UserName:
16070
    :vartype UserName: String
16071
    :ivar AnnotationTime:
16072
    :vartype AnnotationTime: DateTime
16073
    '''
16074
16075 1
    ua_types = {
16076
        'Message': 'String',
16077
        'UserName': 'String',
16078
        'AnnotationTime': 'DateTime',
16079
               }
16080
16081 1
    def __init__(self, binary=None):
16082
        if binary is not None:
16083
            self._binary_init(binary)
16084
            self._freeze = True
16085
            return
16086
        self.Message = None
16087
        self.UserName = None
16088
        self.AnnotationTime = datetime.utcnow()
16089
        self._freeze = True
16090
16091 1
    def to_binary(self):
16092
        packet = []
16093
        packet.append(uabin.Primitives.String.pack(self.Message))
16094
        packet.append(uabin.Primitives.String.pack(self.UserName))
16095
        packet.append(uabin.Primitives.DateTime.pack(self.AnnotationTime))
16096
        return b''.join(packet)
16097
16098 1
    @staticmethod
16099
    def from_binary(data):
16100
        return Annotation(data)
16101
16102 1
    def _binary_init(self, data):
16103
        self.Message = uabin.Primitives.String.unpack(data)
16104
        self.UserName = uabin.Primitives.String.unpack(data)
16105
        self.AnnotationTime = uabin.Primitives.DateTime.unpack(data)
16106
16107 1
    def __str__(self):
16108
        return 'Annotation(' + 'Message:' + str(self.Message) + ', ' + \
16109
               'UserName:' + str(self.UserName) + ', ' + \
16110
               'AnnotationTime:' + str(self.AnnotationTime) + ')'
16111
16112 1
    __repr__ = __str__
16113
16114
16115 1
nid = FourByteNodeId(ObjectIds.TrustListDataType_Encoding_DefaultBinary)
16116 1
extension_object_classes[nid] = TrustListDataType
16117 1
extension_object_ids['TrustListDataType'] = nid
16118 1
nid = FourByteNodeId(ObjectIds.Argument_Encoding_DefaultBinary)
16119 1
extension_object_classes[nid] = Argument
16120 1
extension_object_ids['Argument'] = nid
16121 1
nid = FourByteNodeId(ObjectIds.EnumValueType_Encoding_DefaultBinary)
16122 1
extension_object_classes[nid] = EnumValueType
16123 1
extension_object_ids['EnumValueType'] = nid
16124 1
nid = FourByteNodeId(ObjectIds.OptionSet_Encoding_DefaultBinary)
16125 1
extension_object_classes[nid] = OptionSet
16126 1
extension_object_ids['OptionSet'] = nid
16127 1
nid = FourByteNodeId(ObjectIds.Union_Encoding_DefaultBinary)
16128 1
extension_object_classes[nid] = Union
16129 1
extension_object_ids['Union'] = nid
16130 1
nid = FourByteNodeId(ObjectIds.TimeZoneDataType_Encoding_DefaultBinary)
16131 1
extension_object_classes[nid] = TimeZoneDataType
16132 1
extension_object_ids['TimeZoneDataType'] = nid
16133 1
nid = FourByteNodeId(ObjectIds.ApplicationDescription_Encoding_DefaultBinary)
16134 1
extension_object_classes[nid] = ApplicationDescription
16135 1
extension_object_ids['ApplicationDescription'] = nid
16136 1
nid = FourByteNodeId(ObjectIds.RequestHeader_Encoding_DefaultBinary)
16137 1
extension_object_classes[nid] = RequestHeader
16138 1
extension_object_ids['RequestHeader'] = nid
16139 1
nid = FourByteNodeId(ObjectIds.ResponseHeader_Encoding_DefaultBinary)
16140 1
extension_object_classes[nid] = ResponseHeader
16141 1
extension_object_ids['ResponseHeader'] = nid
16142 1
nid = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary)
16143 1
extension_object_classes[nid] = ServiceFault
16144 1
extension_object_ids['ServiceFault'] = nid
16145 1
nid = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary)
16146 1
extension_object_classes[nid] = FindServersRequest
16147 1
extension_object_ids['FindServersRequest'] = nid
16148 1
nid = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary)
16149 1
extension_object_classes[nid] = FindServersResponse
16150 1
extension_object_ids['FindServersResponse'] = nid
16151 1
nid = FourByteNodeId(ObjectIds.ServerOnNetwork_Encoding_DefaultBinary)
16152 1
extension_object_classes[nid] = ServerOnNetwork
16153 1
extension_object_ids['ServerOnNetwork'] = nid
16154 1
nid = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary)
16155 1
extension_object_classes[nid] = FindServersOnNetworkRequest
16156 1
extension_object_ids['FindServersOnNetworkRequest'] = nid
16157 1
nid = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary)
16158 1
extension_object_classes[nid] = FindServersOnNetworkResponse
16159 1
extension_object_ids['FindServersOnNetworkResponse'] = nid
16160 1
nid = FourByteNodeId(ObjectIds.UserTokenPolicy_Encoding_DefaultBinary)
16161 1
extension_object_classes[nid] = UserTokenPolicy
16162 1
extension_object_ids['UserTokenPolicy'] = nid
16163 1
nid = FourByteNodeId(ObjectIds.EndpointDescription_Encoding_DefaultBinary)
16164 1
extension_object_classes[nid] = EndpointDescription
16165 1
extension_object_ids['EndpointDescription'] = nid
16166 1
nid = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)
16167 1
extension_object_classes[nid] = GetEndpointsRequest
16168 1
extension_object_ids['GetEndpointsRequest'] = nid
16169 1
nid = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary)
16170 1
extension_object_classes[nid] = GetEndpointsResponse
16171 1
extension_object_ids['GetEndpointsResponse'] = nid
16172 1
nid = FourByteNodeId(ObjectIds.RegisteredServer_Encoding_DefaultBinary)
16173 1
extension_object_classes[nid] = RegisteredServer
16174 1
extension_object_ids['RegisteredServer'] = nid
16175 1
nid = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary)
16176 1
extension_object_classes[nid] = RegisterServerRequest
16177 1
extension_object_ids['RegisterServerRequest'] = nid
16178 1
nid = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary)
16179 1
extension_object_classes[nid] = RegisterServerResponse
16180 1
extension_object_ids['RegisterServerResponse'] = nid
16181 1
nid = FourByteNodeId(ObjectIds.DiscoveryConfiguration_Encoding_DefaultBinary)
16182 1
extension_object_classes[nid] = DiscoveryConfiguration
16183 1
extension_object_ids['DiscoveryConfiguration'] = nid
16184 1
nid = FourByteNodeId(ObjectIds.MdnsDiscoveryConfiguration_Encoding_DefaultBinary)
16185 1
extension_object_classes[nid] = MdnsDiscoveryConfiguration
16186 1
extension_object_ids['MdnsDiscoveryConfiguration'] = nid
16187 1
nid = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary)
16188 1
extension_object_classes[nid] = RegisterServer2Request
16189 1
extension_object_ids['RegisterServer2Request'] = nid
16190 1
nid = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary)
16191 1
extension_object_classes[nid] = RegisterServer2Response
16192 1
extension_object_ids['RegisterServer2Response'] = nid
16193 1
nid = FourByteNodeId(ObjectIds.ChannelSecurityToken_Encoding_DefaultBinary)
16194 1
extension_object_classes[nid] = ChannelSecurityToken
16195 1
extension_object_ids['ChannelSecurityToken'] = nid
16196 1
nid = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary)
16197 1
extension_object_classes[nid] = OpenSecureChannelRequest
16198 1
extension_object_ids['OpenSecureChannelRequest'] = nid
16199 1
nid = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary)
16200 1
extension_object_classes[nid] = OpenSecureChannelResponse
16201 1
extension_object_ids['OpenSecureChannelResponse'] = nid
16202 1
nid = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary)
16203 1
extension_object_classes[nid] = CloseSecureChannelRequest
16204 1
extension_object_ids['CloseSecureChannelRequest'] = nid
16205 1
nid = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary)
16206 1
extension_object_classes[nid] = CloseSecureChannelResponse
16207 1
extension_object_ids['CloseSecureChannelResponse'] = nid
16208 1
nid = FourByteNodeId(ObjectIds.SignedSoftwareCertificate_Encoding_DefaultBinary)
16209 1
extension_object_classes[nid] = SignedSoftwareCertificate
16210 1
extension_object_ids['SignedSoftwareCertificate'] = nid
16211 1
nid = FourByteNodeId(ObjectIds.SignatureData_Encoding_DefaultBinary)
16212 1
extension_object_classes[nid] = SignatureData
16213 1
extension_object_ids['SignatureData'] = nid
16214 1
nid = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary)
16215 1
extension_object_classes[nid] = CreateSessionRequest
16216 1
extension_object_ids['CreateSessionRequest'] = nid
16217 1
nid = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary)
16218 1
extension_object_classes[nid] = CreateSessionResponse
16219 1
extension_object_ids['CreateSessionResponse'] = nid
16220 1
nid = FourByteNodeId(ObjectIds.UserIdentityToken_Encoding_DefaultBinary)
16221 1
extension_object_classes[nid] = UserIdentityToken
16222 1
extension_object_ids['UserIdentityToken'] = nid
16223 1
nid = FourByteNodeId(ObjectIds.AnonymousIdentityToken_Encoding_DefaultBinary)
16224 1
extension_object_classes[nid] = AnonymousIdentityToken
16225 1
extension_object_ids['AnonymousIdentityToken'] = nid
16226 1
nid = FourByteNodeId(ObjectIds.UserNameIdentityToken_Encoding_DefaultBinary)
16227 1
extension_object_classes[nid] = UserNameIdentityToken
16228 1
extension_object_ids['UserNameIdentityToken'] = nid
16229 1
nid = FourByteNodeId(ObjectIds.X509IdentityToken_Encoding_DefaultBinary)
16230 1
extension_object_classes[nid] = X509IdentityToken
16231 1
extension_object_ids['X509IdentityToken'] = nid
16232 1
nid = FourByteNodeId(ObjectIds.KerberosIdentityToken_Encoding_DefaultBinary)
16233 1
extension_object_classes[nid] = KerberosIdentityToken
16234 1
extension_object_ids['KerberosIdentityToken'] = nid
16235 1
nid = FourByteNodeId(ObjectIds.IssuedIdentityToken_Encoding_DefaultBinary)
16236 1
extension_object_classes[nid] = IssuedIdentityToken
16237 1
extension_object_ids['IssuedIdentityToken'] = nid
16238 1
nid = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary)
16239 1
extension_object_classes[nid] = ActivateSessionRequest
16240 1
extension_object_ids['ActivateSessionRequest'] = nid
16241 1
nid = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary)
16242 1
extension_object_classes[nid] = ActivateSessionResponse
16243 1
extension_object_ids['ActivateSessionResponse'] = nid
16244 1
nid = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary)
16245 1
extension_object_classes[nid] = CloseSessionRequest
16246 1
extension_object_ids['CloseSessionRequest'] = nid
16247 1
nid = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary)
16248 1
extension_object_classes[nid] = CloseSessionResponse
16249 1
extension_object_ids['CloseSessionResponse'] = nid
16250 1
nid = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary)
16251 1
extension_object_classes[nid] = CancelRequest
16252 1
extension_object_ids['CancelRequest'] = nid
16253 1
nid = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary)
16254 1
extension_object_classes[nid] = CancelResponse
16255 1
extension_object_ids['CancelResponse'] = nid
16256 1
nid = FourByteNodeId(ObjectIds.NodeAttributes_Encoding_DefaultBinary)
16257 1
extension_object_classes[nid] = NodeAttributes
16258 1
extension_object_ids['NodeAttributes'] = nid
16259 1
nid = FourByteNodeId(ObjectIds.ObjectAttributes_Encoding_DefaultBinary)
16260 1
extension_object_classes[nid] = ObjectAttributes
16261 1
extension_object_ids['ObjectAttributes'] = nid
16262 1
nid = FourByteNodeId(ObjectIds.VariableAttributes_Encoding_DefaultBinary)
16263 1
extension_object_classes[nid] = VariableAttributes
16264 1
extension_object_ids['VariableAttributes'] = nid
16265 1
nid = FourByteNodeId(ObjectIds.MethodAttributes_Encoding_DefaultBinary)
16266 1
extension_object_classes[nid] = MethodAttributes
16267 1
extension_object_ids['MethodAttributes'] = nid
16268 1
nid = FourByteNodeId(ObjectIds.ObjectTypeAttributes_Encoding_DefaultBinary)
16269 1
extension_object_classes[nid] = ObjectTypeAttributes
16270 1
extension_object_ids['ObjectTypeAttributes'] = nid
16271 1
nid = FourByteNodeId(ObjectIds.VariableTypeAttributes_Encoding_DefaultBinary)
16272 1
extension_object_classes[nid] = VariableTypeAttributes
16273 1
extension_object_ids['VariableTypeAttributes'] = nid
16274 1
nid = FourByteNodeId(ObjectIds.ReferenceTypeAttributes_Encoding_DefaultBinary)
16275 1
extension_object_classes[nid] = ReferenceTypeAttributes
16276 1
extension_object_ids['ReferenceTypeAttributes'] = nid
16277 1
nid = FourByteNodeId(ObjectIds.DataTypeAttributes_Encoding_DefaultBinary)
16278 1
extension_object_classes[nid] = DataTypeAttributes
16279 1
extension_object_ids['DataTypeAttributes'] = nid
16280 1
nid = FourByteNodeId(ObjectIds.ViewAttributes_Encoding_DefaultBinary)
16281 1
extension_object_classes[nid] = ViewAttributes
16282 1
extension_object_ids['ViewAttributes'] = nid
16283 1
nid = FourByteNodeId(ObjectIds.AddNodesItem_Encoding_DefaultBinary)
16284 1
extension_object_classes[nid] = AddNodesItem
16285 1
extension_object_ids['AddNodesItem'] = nid
16286 1
nid = FourByteNodeId(ObjectIds.AddNodesResult_Encoding_DefaultBinary)
16287 1
extension_object_classes[nid] = AddNodesResult
16288 1
extension_object_ids['AddNodesResult'] = nid
16289 1
nid = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary)
16290 1
extension_object_classes[nid] = AddNodesRequest
16291 1
extension_object_ids['AddNodesRequest'] = nid
16292 1
nid = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary)
16293 1
extension_object_classes[nid] = AddNodesResponse
16294 1
extension_object_ids['AddNodesResponse'] = nid
16295 1
nid = FourByteNodeId(ObjectIds.AddReferencesItem_Encoding_DefaultBinary)
16296 1
extension_object_classes[nid] = AddReferencesItem
16297 1
extension_object_ids['AddReferencesItem'] = nid
16298 1
nid = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary)
16299 1
extension_object_classes[nid] = AddReferencesRequest
16300 1
extension_object_ids['AddReferencesRequest'] = nid
16301 1
nid = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary)
16302 1
extension_object_classes[nid] = AddReferencesResponse
16303 1
extension_object_ids['AddReferencesResponse'] = nid
16304 1
nid = FourByteNodeId(ObjectIds.DeleteNodesItem_Encoding_DefaultBinary)
16305 1
extension_object_classes[nid] = DeleteNodesItem
16306 1
extension_object_ids['DeleteNodesItem'] = nid
16307 1
nid = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary)
16308 1
extension_object_classes[nid] = DeleteNodesRequest
16309 1
extension_object_ids['DeleteNodesRequest'] = nid
16310 1
nid = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary)
16311 1
extension_object_classes[nid] = DeleteNodesResponse
16312 1
extension_object_ids['DeleteNodesResponse'] = nid
16313 1
nid = FourByteNodeId(ObjectIds.DeleteReferencesItem_Encoding_DefaultBinary)
16314 1
extension_object_classes[nid] = DeleteReferencesItem
16315 1
extension_object_ids['DeleteReferencesItem'] = nid
16316 1
nid = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary)
16317 1
extension_object_classes[nid] = DeleteReferencesRequest
16318 1
extension_object_ids['DeleteReferencesRequest'] = nid
16319 1
nid = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary)
16320 1
extension_object_classes[nid] = DeleteReferencesResponse
16321 1
extension_object_ids['DeleteReferencesResponse'] = nid
16322 1
nid = FourByteNodeId(ObjectIds.ViewDescription_Encoding_DefaultBinary)
16323 1
extension_object_classes[nid] = ViewDescription
16324 1
extension_object_ids['ViewDescription'] = nid
16325 1
nid = FourByteNodeId(ObjectIds.BrowseDescription_Encoding_DefaultBinary)
16326 1
extension_object_classes[nid] = BrowseDescription
16327 1
extension_object_ids['BrowseDescription'] = nid
16328 1
nid = FourByteNodeId(ObjectIds.ReferenceDescription_Encoding_DefaultBinary)
16329 1
extension_object_classes[nid] = ReferenceDescription
16330 1
extension_object_ids['ReferenceDescription'] = nid
16331 1
nid = FourByteNodeId(ObjectIds.BrowseResult_Encoding_DefaultBinary)
16332 1
extension_object_classes[nid] = BrowseResult
16333 1
extension_object_ids['BrowseResult'] = nid
16334 1
nid = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary)
16335 1
extension_object_classes[nid] = BrowseRequest
16336 1
extension_object_ids['BrowseRequest'] = nid
16337 1
nid = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary)
16338 1
extension_object_classes[nid] = BrowseResponse
16339 1
extension_object_ids['BrowseResponse'] = nid
16340 1
nid = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary)
16341 1
extension_object_classes[nid] = BrowseNextRequest
16342 1
extension_object_ids['BrowseNextRequest'] = nid
16343 1
nid = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary)
16344 1
extension_object_classes[nid] = BrowseNextResponse
16345 1
extension_object_ids['BrowseNextResponse'] = nid
16346 1
nid = FourByteNodeId(ObjectIds.RelativePathElement_Encoding_DefaultBinary)
16347 1
extension_object_classes[nid] = RelativePathElement
16348 1
extension_object_ids['RelativePathElement'] = nid
16349 1
nid = FourByteNodeId(ObjectIds.RelativePath_Encoding_DefaultBinary)
16350 1
extension_object_classes[nid] = RelativePath
16351 1
extension_object_ids['RelativePath'] = nid
16352 1
nid = FourByteNodeId(ObjectIds.BrowsePath_Encoding_DefaultBinary)
16353 1
extension_object_classes[nid] = BrowsePath
16354 1
extension_object_ids['BrowsePath'] = nid
16355 1
nid = FourByteNodeId(ObjectIds.BrowsePathTarget_Encoding_DefaultBinary)
16356 1
extension_object_classes[nid] = BrowsePathTarget
16357 1
extension_object_ids['BrowsePathTarget'] = nid
16358 1
nid = FourByteNodeId(ObjectIds.BrowsePathResult_Encoding_DefaultBinary)
16359 1
extension_object_classes[nid] = BrowsePathResult
16360 1
extension_object_ids['BrowsePathResult'] = nid
16361 1
nid = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary)
16362 1
extension_object_classes[nid] = TranslateBrowsePathsToNodeIdsRequest
16363 1
extension_object_ids['TranslateBrowsePathsToNodeIdsRequest'] = nid
16364 1
nid = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary)
16365 1
extension_object_classes[nid] = TranslateBrowsePathsToNodeIdsResponse
16366 1
extension_object_ids['TranslateBrowsePathsToNodeIdsResponse'] = nid
16367 1
nid = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary)
16368 1
extension_object_classes[nid] = RegisterNodesRequest
16369 1
extension_object_ids['RegisterNodesRequest'] = nid
16370 1
nid = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary)
16371 1
extension_object_classes[nid] = RegisterNodesResponse
16372 1
extension_object_ids['RegisterNodesResponse'] = nid
16373 1
nid = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary)
16374 1
extension_object_classes[nid] = UnregisterNodesRequest
16375 1
extension_object_ids['UnregisterNodesRequest'] = nid
16376 1
nid = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary)
16377 1
extension_object_classes[nid] = UnregisterNodesResponse
16378 1
extension_object_ids['UnregisterNodesResponse'] = nid
16379 1
nid = FourByteNodeId(ObjectIds.EndpointConfiguration_Encoding_DefaultBinary)
16380 1
extension_object_classes[nid] = EndpointConfiguration
16381 1
extension_object_ids['EndpointConfiguration'] = nid
16382 1
nid = FourByteNodeId(ObjectIds.SupportedProfile_Encoding_DefaultBinary)
16383 1
extension_object_classes[nid] = SupportedProfile
16384 1
extension_object_ids['SupportedProfile'] = nid
16385 1
nid = FourByteNodeId(ObjectIds.SoftwareCertificate_Encoding_DefaultBinary)
16386 1
extension_object_classes[nid] = SoftwareCertificate
16387 1
extension_object_ids['SoftwareCertificate'] = nid
16388 1
nid = FourByteNodeId(ObjectIds.QueryDataDescription_Encoding_DefaultBinary)
16389 1
extension_object_classes[nid] = QueryDataDescription
16390 1
extension_object_ids['QueryDataDescription'] = nid
16391 1
nid = FourByteNodeId(ObjectIds.NodeTypeDescription_Encoding_DefaultBinary)
16392 1
extension_object_classes[nid] = NodeTypeDescription
16393 1
extension_object_ids['NodeTypeDescription'] = nid
16394 1
nid = FourByteNodeId(ObjectIds.QueryDataSet_Encoding_DefaultBinary)
16395 1
extension_object_classes[nid] = QueryDataSet
16396 1
extension_object_ids['QueryDataSet'] = nid
16397 1
nid = FourByteNodeId(ObjectIds.NodeReference_Encoding_DefaultBinary)
16398 1
extension_object_classes[nid] = NodeReference
16399 1
extension_object_ids['NodeReference'] = nid
16400 1
nid = FourByteNodeId(ObjectIds.ContentFilterElement_Encoding_DefaultBinary)
16401 1
extension_object_classes[nid] = ContentFilterElement
16402 1
extension_object_ids['ContentFilterElement'] = nid
16403 1
nid = FourByteNodeId(ObjectIds.ContentFilter_Encoding_DefaultBinary)
16404 1
extension_object_classes[nid] = ContentFilter
16405 1
extension_object_ids['ContentFilter'] = nid
16406 1
nid = FourByteNodeId(ObjectIds.ElementOperand_Encoding_DefaultBinary)
16407 1
extension_object_classes[nid] = ElementOperand
16408 1
extension_object_ids['ElementOperand'] = nid
16409 1
nid = FourByteNodeId(ObjectIds.LiteralOperand_Encoding_DefaultBinary)
16410 1
extension_object_classes[nid] = LiteralOperand
16411 1
extension_object_ids['LiteralOperand'] = nid
16412 1
nid = FourByteNodeId(ObjectIds.AttributeOperand_Encoding_DefaultBinary)
16413 1
extension_object_classes[nid] = AttributeOperand
16414 1
extension_object_ids['AttributeOperand'] = nid
16415 1
nid = FourByteNodeId(ObjectIds.SimpleAttributeOperand_Encoding_DefaultBinary)
16416 1
extension_object_classes[nid] = SimpleAttributeOperand
16417 1
extension_object_ids['SimpleAttributeOperand'] = nid
16418 1
nid = FourByteNodeId(ObjectIds.ContentFilterElementResult_Encoding_DefaultBinary)
16419 1
extension_object_classes[nid] = ContentFilterElementResult
16420 1
extension_object_ids['ContentFilterElementResult'] = nid
16421 1
nid = FourByteNodeId(ObjectIds.ContentFilterResult_Encoding_DefaultBinary)
16422 1
extension_object_classes[nid] = ContentFilterResult
16423 1
extension_object_ids['ContentFilterResult'] = nid
16424 1
nid = FourByteNodeId(ObjectIds.ParsingResult_Encoding_DefaultBinary)
16425 1
extension_object_classes[nid] = ParsingResult
16426 1
extension_object_ids['ParsingResult'] = nid
16427 1
nid = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary)
16428 1
extension_object_classes[nid] = QueryFirstRequest
16429 1
extension_object_ids['QueryFirstRequest'] = nid
16430 1
nid = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary)
16431 1
extension_object_classes[nid] = QueryFirstResponse
16432 1
extension_object_ids['QueryFirstResponse'] = nid
16433 1
nid = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary)
16434 1
extension_object_classes[nid] = QueryNextRequest
16435 1
extension_object_ids['QueryNextRequest'] = nid
16436 1
nid = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary)
16437 1
extension_object_classes[nid] = QueryNextResponse
16438 1
extension_object_ids['QueryNextResponse'] = nid
16439 1
nid = FourByteNodeId(ObjectIds.ReadValueId_Encoding_DefaultBinary)
16440 1
extension_object_classes[nid] = ReadValueId
16441 1
extension_object_ids['ReadValueId'] = nid
16442 1
nid = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary)
16443 1
extension_object_classes[nid] = ReadRequest
16444 1
extension_object_ids['ReadRequest'] = nid
16445 1
nid = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary)
16446 1
extension_object_classes[nid] = ReadResponse
16447 1
extension_object_ids['ReadResponse'] = nid
16448 1
nid = FourByteNodeId(ObjectIds.HistoryReadValueId_Encoding_DefaultBinary)
16449 1
extension_object_classes[nid] = HistoryReadValueId
16450 1
extension_object_ids['HistoryReadValueId'] = nid
16451 1
nid = FourByteNodeId(ObjectIds.HistoryReadResult_Encoding_DefaultBinary)
16452 1
extension_object_classes[nid] = HistoryReadResult
16453 1
extension_object_ids['HistoryReadResult'] = nid
16454 1
nid = FourByteNodeId(ObjectIds.HistoryReadDetails_Encoding_DefaultBinary)
16455 1
extension_object_classes[nid] = HistoryReadDetails
16456 1
extension_object_ids['HistoryReadDetails'] = nid
16457 1
nid = FourByteNodeId(ObjectIds.ReadEventDetails_Encoding_DefaultBinary)
16458 1
extension_object_classes[nid] = ReadEventDetails
16459 1
extension_object_ids['ReadEventDetails'] = nid
16460 1
nid = FourByteNodeId(ObjectIds.ReadRawModifiedDetails_Encoding_DefaultBinary)
16461 1
extension_object_classes[nid] = ReadRawModifiedDetails
16462 1
extension_object_ids['ReadRawModifiedDetails'] = nid
16463 1
nid = FourByteNodeId(ObjectIds.ReadProcessedDetails_Encoding_DefaultBinary)
16464 1
extension_object_classes[nid] = ReadProcessedDetails
16465 1
extension_object_ids['ReadProcessedDetails'] = nid
16466 1
nid = FourByteNodeId(ObjectIds.ReadAtTimeDetails_Encoding_DefaultBinary)
16467 1
extension_object_classes[nid] = ReadAtTimeDetails
16468 1
extension_object_ids['ReadAtTimeDetails'] = nid
16469 1
nid = FourByteNodeId(ObjectIds.HistoryData_Encoding_DefaultBinary)
16470 1
extension_object_classes[nid] = HistoryData
16471 1
extension_object_ids['HistoryData'] = nid
16472 1
nid = FourByteNodeId(ObjectIds.ModificationInfo_Encoding_DefaultBinary)
16473 1
extension_object_classes[nid] = ModificationInfo
16474 1
extension_object_ids['ModificationInfo'] = nid
16475 1
nid = FourByteNodeId(ObjectIds.HistoryModifiedData_Encoding_DefaultBinary)
16476 1
extension_object_classes[nid] = HistoryModifiedData
16477 1
extension_object_ids['HistoryModifiedData'] = nid
16478 1
nid = FourByteNodeId(ObjectIds.HistoryEvent_Encoding_DefaultBinary)
16479 1
extension_object_classes[nid] = HistoryEvent
16480 1
extension_object_ids['HistoryEvent'] = nid
16481 1
nid = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary)
16482 1
extension_object_classes[nid] = HistoryReadRequest
16483 1
extension_object_ids['HistoryReadRequest'] = nid
16484 1
nid = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary)
16485 1
extension_object_classes[nid] = HistoryReadResponse
16486 1
extension_object_ids['HistoryReadResponse'] = nid
16487 1
nid = FourByteNodeId(ObjectIds.WriteValue_Encoding_DefaultBinary)
16488 1
extension_object_classes[nid] = WriteValue
16489 1
extension_object_ids['WriteValue'] = nid
16490 1
nid = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary)
16491 1
extension_object_classes[nid] = WriteRequest
16492 1
extension_object_ids['WriteRequest'] = nid
16493 1
nid = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary)
16494 1
extension_object_classes[nid] = WriteResponse
16495 1
extension_object_ids['WriteResponse'] = nid
16496 1
nid = FourByteNodeId(ObjectIds.HistoryUpdateDetails_Encoding_DefaultBinary)
16497 1
extension_object_classes[nid] = HistoryUpdateDetails
16498 1
extension_object_ids['HistoryUpdateDetails'] = nid
16499 1
nid = FourByteNodeId(ObjectIds.UpdateDataDetails_Encoding_DefaultBinary)
16500 1
extension_object_classes[nid] = UpdateDataDetails
16501 1
extension_object_ids['UpdateDataDetails'] = nid
16502 1
nid = FourByteNodeId(ObjectIds.UpdateStructureDataDetails_Encoding_DefaultBinary)
16503 1
extension_object_classes[nid] = UpdateStructureDataDetails
16504 1
extension_object_ids['UpdateStructureDataDetails'] = nid
16505 1
nid = FourByteNodeId(ObjectIds.UpdateEventDetails_Encoding_DefaultBinary)
16506 1
extension_object_classes[nid] = UpdateEventDetails
16507 1
extension_object_ids['UpdateEventDetails'] = nid
16508 1
nid = FourByteNodeId(ObjectIds.DeleteRawModifiedDetails_Encoding_DefaultBinary)
16509 1
extension_object_classes[nid] = DeleteRawModifiedDetails
16510 1
extension_object_ids['DeleteRawModifiedDetails'] = nid
16511 1
nid = FourByteNodeId(ObjectIds.DeleteAtTimeDetails_Encoding_DefaultBinary)
16512 1
extension_object_classes[nid] = DeleteAtTimeDetails
16513 1
extension_object_ids['DeleteAtTimeDetails'] = nid
16514 1
nid = FourByteNodeId(ObjectIds.DeleteEventDetails_Encoding_DefaultBinary)
16515 1
extension_object_classes[nid] = DeleteEventDetails
16516 1
extension_object_ids['DeleteEventDetails'] = nid
16517 1
nid = FourByteNodeId(ObjectIds.HistoryUpdateResult_Encoding_DefaultBinary)
16518 1
extension_object_classes[nid] = HistoryUpdateResult
16519 1
extension_object_ids['HistoryUpdateResult'] = nid
16520 1
nid = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary)
16521 1
extension_object_classes[nid] = HistoryUpdateRequest
16522 1
extension_object_ids['HistoryUpdateRequest'] = nid
16523 1
nid = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary)
16524 1
extension_object_classes[nid] = HistoryUpdateResponse
16525 1
extension_object_ids['HistoryUpdateResponse'] = nid
16526 1
nid = FourByteNodeId(ObjectIds.CallMethodRequest_Encoding_DefaultBinary)
16527 1
extension_object_classes[nid] = CallMethodRequest
16528 1
extension_object_ids['CallMethodRequest'] = nid
16529 1
nid = FourByteNodeId(ObjectIds.CallMethodResult_Encoding_DefaultBinary)
16530 1
extension_object_classes[nid] = CallMethodResult
16531 1
extension_object_ids['CallMethodResult'] = nid
16532 1
nid = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary)
16533 1
extension_object_classes[nid] = CallRequest
16534 1
extension_object_ids['CallRequest'] = nid
16535 1
nid = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary)
16536 1
extension_object_classes[nid] = CallResponse
16537 1
extension_object_ids['CallResponse'] = nid
16538 1
nid = FourByteNodeId(ObjectIds.MonitoringFilter_Encoding_DefaultBinary)
16539 1
extension_object_classes[nid] = MonitoringFilter
16540 1
extension_object_ids['MonitoringFilter'] = nid
16541 1
nid = FourByteNodeId(ObjectIds.DataChangeFilter_Encoding_DefaultBinary)
16542 1
extension_object_classes[nid] = DataChangeFilter
16543 1
extension_object_ids['DataChangeFilter'] = nid
16544 1
nid = FourByteNodeId(ObjectIds.EventFilter_Encoding_DefaultBinary)
16545 1
extension_object_classes[nid] = EventFilter
16546 1
extension_object_ids['EventFilter'] = nid
16547 1
nid = FourByteNodeId(ObjectIds.AggregateConfiguration_Encoding_DefaultBinary)
16548 1
extension_object_classes[nid] = AggregateConfiguration
16549 1
extension_object_ids['AggregateConfiguration'] = nid
16550 1
nid = FourByteNodeId(ObjectIds.AggregateFilter_Encoding_DefaultBinary)
16551 1
extension_object_classes[nid] = AggregateFilter
16552 1
extension_object_ids['AggregateFilter'] = nid
16553 1
nid = FourByteNodeId(ObjectIds.MonitoringFilterResult_Encoding_DefaultBinary)
16554 1
extension_object_classes[nid] = MonitoringFilterResult
16555 1
extension_object_ids['MonitoringFilterResult'] = nid
16556 1
nid = FourByteNodeId(ObjectIds.EventFilterResult_Encoding_DefaultBinary)
16557 1
extension_object_classes[nid] = EventFilterResult
16558 1
extension_object_ids['EventFilterResult'] = nid
16559 1
nid = FourByteNodeId(ObjectIds.AggregateFilterResult_Encoding_DefaultBinary)
16560 1
extension_object_classes[nid] = AggregateFilterResult
16561 1
extension_object_ids['AggregateFilterResult'] = nid
16562 1
nid = FourByteNodeId(ObjectIds.MonitoringParameters_Encoding_DefaultBinary)
16563 1
extension_object_classes[nid] = MonitoringParameters
16564 1
extension_object_ids['MonitoringParameters'] = nid
16565 1
nid = FourByteNodeId(ObjectIds.MonitoredItemCreateRequest_Encoding_DefaultBinary)
16566 1
extension_object_classes[nid] = MonitoredItemCreateRequest
16567 1
extension_object_ids['MonitoredItemCreateRequest'] = nid
16568 1
nid = FourByteNodeId(ObjectIds.MonitoredItemCreateResult_Encoding_DefaultBinary)
16569 1
extension_object_classes[nid] = MonitoredItemCreateResult
16570 1
extension_object_ids['MonitoredItemCreateResult'] = nid
16571 1
nid = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary)
16572 1
extension_object_classes[nid] = CreateMonitoredItemsRequest
16573 1
extension_object_ids['CreateMonitoredItemsRequest'] = nid
16574 1
nid = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary)
16575 1
extension_object_classes[nid] = CreateMonitoredItemsResponse
16576 1
extension_object_ids['CreateMonitoredItemsResponse'] = nid
16577 1
nid = FourByteNodeId(ObjectIds.MonitoredItemModifyRequest_Encoding_DefaultBinary)
16578 1
extension_object_classes[nid] = MonitoredItemModifyRequest
16579 1
extension_object_ids['MonitoredItemModifyRequest'] = nid
16580 1
nid = FourByteNodeId(ObjectIds.MonitoredItemModifyResult_Encoding_DefaultBinary)
16581 1
extension_object_classes[nid] = MonitoredItemModifyResult
16582 1
extension_object_ids['MonitoredItemModifyResult'] = nid
16583 1
nid = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary)
16584 1
extension_object_classes[nid] = ModifyMonitoredItemsRequest
16585 1
extension_object_ids['ModifyMonitoredItemsRequest'] = nid
16586 1
nid = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary)
16587 1
extension_object_classes[nid] = ModifyMonitoredItemsResponse
16588 1
extension_object_ids['ModifyMonitoredItemsResponse'] = nid
16589 1
nid = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary)
16590 1
extension_object_classes[nid] = SetMonitoringModeRequest
16591 1
extension_object_ids['SetMonitoringModeRequest'] = nid
16592 1
nid = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary)
16593 1
extension_object_classes[nid] = SetMonitoringModeResponse
16594 1
extension_object_ids['SetMonitoringModeResponse'] = nid
16595 1
nid = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary)
16596 1
extension_object_classes[nid] = SetTriggeringRequest
16597 1
extension_object_ids['SetTriggeringRequest'] = nid
16598 1
nid = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary)
16599 1
extension_object_classes[nid] = SetTriggeringResponse
16600 1
extension_object_ids['SetTriggeringResponse'] = nid
16601 1
nid = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary)
16602 1
extension_object_classes[nid] = DeleteMonitoredItemsRequest
16603 1
extension_object_ids['DeleteMonitoredItemsRequest'] = nid
16604 1
nid = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary)
16605 1
extension_object_classes[nid] = DeleteMonitoredItemsResponse
16606 1
extension_object_ids['DeleteMonitoredItemsResponse'] = nid
16607 1
nid = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary)
16608 1
extension_object_classes[nid] = CreateSubscriptionRequest
16609 1
extension_object_ids['CreateSubscriptionRequest'] = nid
16610 1
nid = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary)
16611 1
extension_object_classes[nid] = CreateSubscriptionResponse
16612 1
extension_object_ids['CreateSubscriptionResponse'] = nid
16613 1
nid = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary)
16614 1
extension_object_classes[nid] = ModifySubscriptionRequest
16615 1
extension_object_ids['ModifySubscriptionRequest'] = nid
16616 1
nid = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary)
16617 1
extension_object_classes[nid] = ModifySubscriptionResponse
16618 1
extension_object_ids['ModifySubscriptionResponse'] = nid
16619 1
nid = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary)
16620 1
extension_object_classes[nid] = SetPublishingModeRequest
16621 1
extension_object_ids['SetPublishingModeRequest'] = nid
16622 1
nid = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary)
16623 1
extension_object_classes[nid] = SetPublishingModeResponse
16624 1
extension_object_ids['SetPublishingModeResponse'] = nid
16625 1
nid = FourByteNodeId(ObjectIds.NotificationMessage_Encoding_DefaultBinary)
16626 1
extension_object_classes[nid] = NotificationMessage
16627 1
extension_object_ids['NotificationMessage'] = nid
16628 1
nid = FourByteNodeId(ObjectIds.NotificationData_Encoding_DefaultBinary)
16629 1
extension_object_classes[nid] = NotificationData
16630 1
extension_object_ids['NotificationData'] = nid
16631 1
nid = FourByteNodeId(ObjectIds.DataChangeNotification_Encoding_DefaultBinary)
16632 1
extension_object_classes[nid] = DataChangeNotification
16633 1
extension_object_ids['DataChangeNotification'] = nid
16634 1
nid = FourByteNodeId(ObjectIds.MonitoredItemNotification_Encoding_DefaultBinary)
16635 1
extension_object_classes[nid] = MonitoredItemNotification
16636 1
extension_object_ids['MonitoredItemNotification'] = nid
16637 1
nid = FourByteNodeId(ObjectIds.EventNotificationList_Encoding_DefaultBinary)
16638 1
extension_object_classes[nid] = EventNotificationList
16639 1
extension_object_ids['EventNotificationList'] = nid
16640 1
nid = FourByteNodeId(ObjectIds.EventFieldList_Encoding_DefaultBinary)
16641 1
extension_object_classes[nid] = EventFieldList
16642 1
extension_object_ids['EventFieldList'] = nid
16643 1
nid = FourByteNodeId(ObjectIds.HistoryEventFieldList_Encoding_DefaultBinary)
16644 1
extension_object_classes[nid] = HistoryEventFieldList
16645 1
extension_object_ids['HistoryEventFieldList'] = nid
16646 1
nid = FourByteNodeId(ObjectIds.StatusChangeNotification_Encoding_DefaultBinary)
16647 1
extension_object_classes[nid] = StatusChangeNotification
16648 1
extension_object_ids['StatusChangeNotification'] = nid
16649 1
nid = FourByteNodeId(ObjectIds.SubscriptionAcknowledgement_Encoding_DefaultBinary)
16650 1
extension_object_classes[nid] = SubscriptionAcknowledgement
16651 1
extension_object_ids['SubscriptionAcknowledgement'] = nid
16652 1
nid = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary)
16653 1
extension_object_classes[nid] = PublishRequest
16654 1
extension_object_ids['PublishRequest'] = nid
16655 1
nid = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary)
16656 1
extension_object_classes[nid] = PublishResponse
16657 1
extension_object_ids['PublishResponse'] = nid
16658 1
nid = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary)
16659 1
extension_object_classes[nid] = RepublishRequest
16660 1
extension_object_ids['RepublishRequest'] = nid
16661 1
nid = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary)
16662 1
extension_object_classes[nid] = RepublishResponse
16663 1
extension_object_ids['RepublishResponse'] = nid
16664 1
nid = FourByteNodeId(ObjectIds.TransferResult_Encoding_DefaultBinary)
16665 1
extension_object_classes[nid] = TransferResult
16666 1
extension_object_ids['TransferResult'] = nid
16667 1
nid = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary)
16668 1
extension_object_classes[nid] = TransferSubscriptionsRequest
16669 1
extension_object_ids['TransferSubscriptionsRequest'] = nid
16670 1
nid = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary)
16671 1
extension_object_classes[nid] = TransferSubscriptionsResponse
16672 1
extension_object_ids['TransferSubscriptionsResponse'] = nid
16673 1
nid = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary)
16674 1
extension_object_classes[nid] = DeleteSubscriptionsRequest
16675 1
extension_object_ids['DeleteSubscriptionsRequest'] = nid
16676 1
nid = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary)
16677 1
extension_object_classes[nid] = DeleteSubscriptionsResponse
16678 1
extension_object_ids['DeleteSubscriptionsResponse'] = nid
16679 1
nid = FourByteNodeId(ObjectIds.BuildInfo_Encoding_DefaultBinary)
16680 1
extension_object_classes[nid] = BuildInfo
16681 1
extension_object_ids['BuildInfo'] = nid
16682 1
nid = FourByteNodeId(ObjectIds.RedundantServerDataType_Encoding_DefaultBinary)
16683 1
extension_object_classes[nid] = RedundantServerDataType
16684 1
extension_object_ids['RedundantServerDataType'] = nid
16685 1
nid = FourByteNodeId(ObjectIds.EndpointUrlListDataType_Encoding_DefaultBinary)
16686 1
extension_object_classes[nid] = EndpointUrlListDataType
16687 1
extension_object_ids['EndpointUrlListDataType'] = nid
16688 1
nid = FourByteNodeId(ObjectIds.NetworkGroupDataType_Encoding_DefaultBinary)
16689 1
extension_object_classes[nid] = NetworkGroupDataType
16690 1
extension_object_ids['NetworkGroupDataType'] = nid
16691 1
nid = FourByteNodeId(ObjectIds.SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary)
16692 1
extension_object_classes[nid] = SamplingIntervalDiagnosticsDataType
16693 1
extension_object_ids['SamplingIntervalDiagnosticsDataType'] = nid
16694 1
nid = FourByteNodeId(ObjectIds.ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary)
16695 1
extension_object_classes[nid] = ServerDiagnosticsSummaryDataType
16696 1
extension_object_ids['ServerDiagnosticsSummaryDataType'] = nid
16697 1
nid = FourByteNodeId(ObjectIds.ServerStatusDataType_Encoding_DefaultBinary)
16698 1
extension_object_classes[nid] = ServerStatusDataType
16699 1
extension_object_ids['ServerStatusDataType'] = nid
16700 1
nid = FourByteNodeId(ObjectIds.SessionDiagnosticsDataType_Encoding_DefaultBinary)
16701 1
extension_object_classes[nid] = SessionDiagnosticsDataType
16702 1
extension_object_ids['SessionDiagnosticsDataType'] = nid
16703 1
nid = FourByteNodeId(ObjectIds.SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary)
16704 1
extension_object_classes[nid] = SessionSecurityDiagnosticsDataType
16705 1
extension_object_ids['SessionSecurityDiagnosticsDataType'] = nid
16706 1
nid = FourByteNodeId(ObjectIds.ServiceCounterDataType_Encoding_DefaultBinary)
16707 1
extension_object_classes[nid] = ServiceCounterDataType
16708 1
extension_object_ids['ServiceCounterDataType'] = nid
16709 1
nid = FourByteNodeId(ObjectIds.StatusResult_Encoding_DefaultBinary)
16710 1
extension_object_classes[nid] = StatusResult
16711 1
extension_object_ids['StatusResult'] = nid
16712 1
nid = FourByteNodeId(ObjectIds.SubscriptionDiagnosticsDataType_Encoding_DefaultBinary)
16713 1
extension_object_classes[nid] = SubscriptionDiagnosticsDataType
16714 1
extension_object_ids['SubscriptionDiagnosticsDataType'] = nid
16715 1
nid = FourByteNodeId(ObjectIds.ModelChangeStructureDataType_Encoding_DefaultBinary)
16716 1
extension_object_classes[nid] = ModelChangeStructureDataType
16717 1
extension_object_ids['ModelChangeStructureDataType'] = nid
16718 1
nid = FourByteNodeId(ObjectIds.SemanticChangeStructureDataType_Encoding_DefaultBinary)
16719 1
extension_object_classes[nid] = SemanticChangeStructureDataType
16720 1
extension_object_ids['SemanticChangeStructureDataType'] = nid
16721 1
nid = FourByteNodeId(ObjectIds.Range_Encoding_DefaultBinary)
16722 1
extension_object_classes[nid] = Range
16723 1
extension_object_ids['Range'] = nid
16724 1
nid = FourByteNodeId(ObjectIds.EUInformation_Encoding_DefaultBinary)
16725 1
extension_object_classes[nid] = EUInformation
16726 1
extension_object_ids['EUInformation'] = nid
16727 1
nid = FourByteNodeId(ObjectIds.ComplexNumberType_Encoding_DefaultBinary)
16728 1
extension_object_classes[nid] = ComplexNumberType
16729 1
extension_object_ids['ComplexNumberType'] = nid
16730 1
nid = FourByteNodeId(ObjectIds.DoubleComplexNumberType_Encoding_DefaultBinary)
16731 1
extension_object_classes[nid] = DoubleComplexNumberType
16732 1
extension_object_ids['DoubleComplexNumberType'] = nid
16733 1
nid = FourByteNodeId(ObjectIds.AxisInformation_Encoding_DefaultBinary)
16734 1
extension_object_classes[nid] = AxisInformation
16735 1
extension_object_ids['AxisInformation'] = nid
16736 1
nid = FourByteNodeId(ObjectIds.XVType_Encoding_DefaultBinary)
16737 1
extension_object_classes[nid] = XVType
16738 1
extension_object_ids['XVType'] = nid
16739 1
nid = FourByteNodeId(ObjectIds.ProgramDiagnosticDataType_Encoding_DefaultBinary)
16740 1
extension_object_classes[nid] = ProgramDiagnosticDataType
16741 1
extension_object_ids['ProgramDiagnosticDataType'] = nid
16742 1
nid = FourByteNodeId(ObjectIds.Annotation_Encoding_DefaultBinary)
16743 1
extension_object_classes[nid] = Annotation
16744
extension_object_ids['Annotation'] = nid
16745