Completed
Pull Request — master (#490)
by Olivier
08:10
created

DiagnosticInfo   A

Complexity

Total Complexity 25

Size/Duplication

Total Lines 125
Duplicated Lines 0 %

Test Coverage

Coverage 57.32%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 125
ccs 47
cts 82
cp 0.5732
rs 10
c 1
b 0
f 0
wmc 25

4 Methods

Rating   Name   Duplication   Size   Complexity  
D from_binary() 0 33 8
A __str__() 0 9 1
F to_binary() 0 25 15
A __init__() 0 10 1
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 XmlElement(FrozenClass):
717
    '''
718
    An XML element encoded as a UTF-8 string.
719
720
    :ivar Length:
721
    :vartype Length: Int32
722
    :ivar Value:
723
    :vartype Value: Char
724
    '''
725
726
    ua_types = [
727
728
        ('Length', 'Int32'),
729
        ('Value', 'ListOfChar'),
730
               ]
731
732
    def __init__(self):
733
        self.Length = 0
734
        self.Value = []
735
        self._freeze = True
736
737
    def to_binary(self):
738 1
        packet = []
739
        packet.append(uabin.Primitives.Int32.pack(self.Length))
740
        packet.append(uabin.Primitives.Int32.pack(len(self.Value)))
741
        for fieldname in self.Value:
742
            packet.append(uabin.Primitives.Char.pack(fieldname))
743
        return b''.join(packet)
744
745
    @staticmethod
746
    def from_binary(data):
747
        obj = XmlElement()
748
        self.Length = uabin.Primitives.Int32.unpack(data)
749 1
        obj.Value = uabin.Primitives.Char.unpack_array(data)
750 1
        return obj
751 1
752 1
    def __str__(self):
753 1
        return 'XmlElement(' + 'Length:' + str(self.Length) + ', ' + \
754 1
               'Value:' + str(self.Value) + ')'
755 1
756 1
    __repr__ = __str__
757 1
758 1
759 1
class DiagnosticInfo(FrozenClass):
760 1
    '''
761 1
    A recursive structure containing diagnostic information associated with a status code.
762 1
763
    :ivar Encoding:
764 1
    :vartype Encoding: UInt8
765 1
    :ivar SymbolicId:
766 1
    :vartype SymbolicId: Int32
767 1
    :ivar NamespaceURI:
768 1
    :vartype NamespaceURI: Int32
769 1
    :ivar Locale:
770 1
    :vartype Locale: Int32
771 1
    :ivar LocalizedText:
772 1
    :vartype LocalizedText: Int32
773 1
    :ivar AdditionalInfo:
774 1
    :vartype AdditionalInfo: CharArray
775
    :ivar InnerStatusCode:
776 1
    :vartype InnerStatusCode: StatusCode
777
    :ivar InnerDiagnosticInfo:
778 1
    :vartype InnerDiagnosticInfo: DiagnosticInfo
779
    '''
780 1
781
    ua_switches = {
782 1
        'SymbolicId': ('Encoding', 0),
783
        'NamespaceURI': ('Encoding', 1),
784 1
        'Locale': ('Encoding', 2),
785 1
        'LocalizedText': ('Encoding', 3),
786 1
        'AdditionalInfo': ('Encoding', 4),
787
        'InnerStatusCode': ('Encoding', 5),
788 1
        'InnerDiagnosticInfo': ('Encoding', 6),
789
               }
790 1
    ua_types = [
791
792 1
        ('Encoding', 'UInt8'),
793
        ('SymbolicId', 'Int32'),
794 1
        ('NamespaceURI', 'Int32'),
795 1
        ('Locale', 'Int32'),
796 1
        ('LocalizedText', 'Int32'),
797
        ('AdditionalInfo', 'CharArray'),
798
        ('InnerStatusCode', 'StatusCode'),
799 1
        ('InnerDiagnosticInfo', 'DiagnosticInfo'),
800 1
               ]
801
802
    def __init__(self):
803 1
        self.Encoding = 0
804 1
        self.SymbolicId = None
805
        self.NamespaceURI = None
806
        self.Locale = None
807 1
        self.LocalizedText = None
808 1
        self.AdditionalInfo = None
809
        self.InnerStatusCode = None
810
        self.InnerDiagnosticInfo = None
811 1
        self._freeze = True
812 1
813
    def to_binary(self):
814
        packet = []
815 1
        if self.SymbolicId: self.Encoding |= (1 << 0)
816 1
        if self.NamespaceURI: self.Encoding |= (1 << 1)
817 1
        if self.Locale: self.Encoding |= (1 << 2)
818
        if self.LocalizedText: self.Encoding |= (1 << 3)
819
        if self.AdditionalInfo: self.Encoding |= (1 << 4)
820 1
        if self.InnerStatusCode: self.Encoding |= (1 << 5)
821
        if self.InnerDiagnosticInfo: self.Encoding |= (1 << 6)
822
        packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
823 1
        if self.SymbolicId: 
824
            packet.append(uabin.Primitives.Int32.pack(self.SymbolicId))
825 1
        if self.NamespaceURI: 
826
            packet.append(uabin.Primitives.Int32.pack(self.NamespaceURI))
827
        if self.Locale: 
828
            packet.append(uabin.Primitives.Int32.pack(self.Locale))
829
        if self.LocalizedText: 
830
            packet.append(uabin.Primitives.Int32.pack(self.LocalizedText))
831
        if self.AdditionalInfo: 
832
            packet.append(uabin.Primitives.CharArray.pack(self.AdditionalInfo))
833
        if self.InnerStatusCode: 
834
            packet.append(self.InnerStatusCode.to_binary())
835 1
        if self.InnerDiagnosticInfo: 
836
            packet.append(self.InnerDiagnosticInfo.to_binary())
837
        return b''.join(packet)
838 1
839
    @staticmethod
840
    def from_binary(data):
841
        obj = DiagnosticInfo()
842
        self.Encoding = uabin.Primitives.UInt8.unpack(data)
843
        if obj.Encoding & (1 << 0):
844
            self.SymbolicId = uabin.Primitives.Int32.unpack(data)
845
        else:
846
            obj.SymbolicId = None
847
        if obj.Encoding & (1 << 1):
848
            self.NamespaceURI = uabin.Primitives.Int32.unpack(data)
849
        else:
850
            obj.NamespaceURI = None
851
        if obj.Encoding & (1 << 2):
852 1
            self.Locale = uabin.Primitives.Int32.unpack(data)
853
        else:
854
            obj.Locale = None
855
        if obj.Encoding & (1 << 3):
856
            self.LocalizedText = uabin.Primitives.Int32.unpack(data)
857
        else:
858
            obj.LocalizedText = None
859
        if obj.Encoding & (1 << 4):
860 1
            self.AdditionalInfo = uabin.Primitives.CharArray.unpack(data)
861
        else:
862
            obj.AdditionalInfo = None
863
        if obj.Encoding & (1 << 5):
864
            obj.InnerStatusCode = StatusCode.from_binary(data)
865
        else:
866
            obj.InnerStatusCode = None
867
        if obj.Encoding & (1 << 6):
868
            obj.InnerDiagnosticInfo = DiagnosticInfo.from_binary(data)
869
        else:
870
            obj.InnerDiagnosticInfo = None
871
            return obj
872 1
873
    def __str__(self):
874
        return 'DiagnosticInfo(' + 'Encoding:' + str(self.Encoding) + ', ' + \
875
               'SymbolicId:' + str(self.SymbolicId) + ', ' + \
876
               'NamespaceURI:' + str(self.NamespaceURI) + ', ' + \
877
               'Locale:' + str(self.Locale) + ', ' + \
878
               'LocalizedText:' + str(self.LocalizedText) + ', ' + \
879
               'AdditionalInfo:' + str(self.AdditionalInfo) + ', ' + \
880
               'InnerStatusCode:' + str(self.InnerStatusCode) + ', ' + \
881
               'InnerDiagnosticInfo:' + str(self.InnerDiagnosticInfo) + ')'
882
883
    __repr__ = __str__
884
885
886
class LocalizedText(FrozenClass):
887
    '''
888
    A string qualified with a namespace index.
889 1
890
    :ivar Encoding:
891
    :vartype Encoding: UInt8
892
    :ivar Locale:
893 1
    :vartype Locale: CharArray
894
    :ivar Text:
895
    :vartype Text: CharArray
896
    '''
897
898
    ua_switches = {
899
        'Locale': ('Encoding', 0),
900 1
        'Text': ('Encoding', 1),
901
               }
902
    ua_types = [
903
904
        ('Encoding', 'UInt8'),
905
        ('Locale', 'CharArray'),
906
        ('Text', 'CharArray'),
907 1
               ]
908
909
    def __init__(self):
910 1
        self.Encoding = 0
911
        self.Locale = None
912
        self.Text = None
913
        self._freeze = True
914
915
    def to_binary(self):
916
        packet = []
917
        if self.Locale: self.Encoding |= (1 << 0)
918
        if self.Text: self.Encoding |= (1 << 1)
919
        packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
920
        if self.Locale: 
921
            packet.append(uabin.Primitives.CharArray.pack(self.Locale))
922
        if self.Text: 
923
            packet.append(uabin.Primitives.CharArray.pack(self.Text))
924
        return b''.join(packet)
925
926 1
    @staticmethod
927
    def from_binary(data):
928
        obj = LocalizedText()
929 View Code Duplication
        self.Encoding = uabin.Primitives.UInt8.unpack(data)
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
930
        if obj.Encoding & (1 << 0):
931
            self.Locale = uabin.Primitives.CharArray.unpack(data)
932
        else:
933
            obj.Locale = None
934 1
        if obj.Encoding & (1 << 1):
935 1
            self.Text = uabin.Primitives.CharArray.unpack(data)
936 1
        else:
937 1
            obj.Text = None
938 1
            return obj
939 1
940 1
    def __str__(self):
941 1
        return 'LocalizedText(' + 'Encoding:' + str(self.Encoding) + ', ' + \
942 1
               'Locale:' + str(self.Locale) + ', ' + \
943 1
               'Text:' + str(self.Text) + ')'
944 1
945
    __repr__ = __str__
946 1
947 1
948 1
class DataValue(FrozenClass):
949 1
    '''
950 1
    A value with an associated timestamp, and quality.
951 1
952 1
    :ivar Encoding:
953 1
    :vartype Encoding: UInt8
954 1
    :ivar Value:
955 1
    :vartype Value: Variant
956
    :ivar StatusCode:
957 1
    :vartype StatusCode: StatusCode
958
    :ivar SourceTimestamp:
959 1
    :vartype SourceTimestamp: DateTime
960
    :ivar SourcePicoseconds:
961 1
    :vartype SourcePicoseconds: UInt16
962 1
    :ivar ServerTimestamp:
963 1
    :vartype ServerTimestamp: DateTime
964 1
    :ivar ServerPicoseconds:
965 1
    :vartype ServerPicoseconds: UInt16
966 1
    '''
967
968 1
    ua_switches = {
969
        'Value': ('Encoding', 0),
970
        'StatusCode': ('Encoding', 1),
971
        'SourceTimestamp': ('Encoding', 2),
972
        'SourcePicoseconds': ('Encoding', 3),
973
        'ServerTimestamp': ('Encoding', 4),
974
        'ServerPicoseconds': ('Encoding', 5),
975 1
               }
976
    ua_types = [
977
978 1
        ('Encoding', 'UInt8'),
979
        ('Value', 'Variant'),
980
        ('StatusCode', 'StatusCode'),
981
        ('SourceTimestamp', 'DateTime'),
982
        ('SourcePicoseconds', 'UInt16'),
983
        ('ServerTimestamp', 'DateTime'),
984
        ('ServerPicoseconds', 'UInt16'),
985
               ]
986
987
    def __init__(self):
988
        self.Encoding = 0
989
        self.Value = None
990 1
        self.StatusCode = None
991
        self.SourceTimestamp = None
992
        self.SourcePicoseconds = None
993
        self.ServerTimestamp = None
994
        self.ServerPicoseconds = None
995
        self._freeze = True
996 1
997 1
    def to_binary(self):
998 1
        packet = []
999 1
        if self.Value: self.Encoding |= (1 << 0)
1000 1
        if self.StatusCode: self.Encoding |= (1 << 1)
1001 1
        if self.SourceTimestamp: self.Encoding |= (1 << 2)
1002 1
        if self.SourcePicoseconds: self.Encoding |= (1 << 3)
1003 1
        if self.ServerTimestamp: self.Encoding |= (1 << 4)
1004 1
        if self.ServerPicoseconds: self.Encoding |= (1 << 5)
1005
        packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
1006 1
        if self.Value: 
1007 1
            packet.append(self.Value.to_binary())
1008 1
        if self.StatusCode: 
1009 1
            packet.append(self.StatusCode.to_binary())
1010 1
        if self.SourceTimestamp: 
1011 1
            packet.append(uabin.Primitives.DateTime.pack(self.SourceTimestamp))
1012
        if self.SourcePicoseconds: 
1013 1
            packet.append(uabin.Primitives.UInt16.pack(self.SourcePicoseconds))
1014
        if self.ServerTimestamp: 
1015 1
            packet.append(uabin.Primitives.DateTime.pack(self.ServerTimestamp))
1016 View Code Duplication
        if self.ServerPicoseconds: 
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1017 1
            packet.append(uabin.Primitives.UInt16.pack(self.ServerPicoseconds))
1018 1
        return b''.join(packet)
1019 1
1020 1
    @staticmethod
1021
    def from_binary(data):
1022 1
        obj = DataValue()
1023
        self.Encoding = uabin.Primitives.UInt8.unpack(data)
1024
        if obj.Encoding & (1 << 0):
1025
            obj.Value = Variant.from_binary(data)
1026
        else:
1027 1
            obj.Value = None
1028
        if obj.Encoding & (1 << 1):
1029
            obj.StatusCode = StatusCode.from_binary(data)
1030 1
        else:
1031
            obj.StatusCode = None
1032
        if obj.Encoding & (1 << 2):
1033
            self.SourceTimestamp = uabin.Primitives.DateTime.unpack(data)
1034
        else:
1035
            obj.SourceTimestamp = None
1036
        if obj.Encoding & (1 << 3):
1037
            self.SourcePicoseconds = uabin.Primitives.UInt16.unpack(data)
1038
        else:
1039
            obj.SourcePicoseconds = None
1040 1
        if obj.Encoding & (1 << 4):
1041
            self.ServerTimestamp = uabin.Primitives.DateTime.unpack(data)
1042
        else:
1043
            obj.ServerTimestamp = None
1044
        if obj.Encoding & (1 << 5):
1045 1
            self.ServerPicoseconds = uabin.Primitives.UInt16.unpack(data)
1046
        else:
1047
            obj.ServerPicoseconds = None
1048
            return obj
1049
1050
    def __str__(self):
1051
        return 'DataValue(' + 'Encoding:' + str(self.Encoding) + ', ' + \
1052
               'Value:' + str(self.Value) + ', ' + \
1053
               'StatusCode:' + str(self.StatusCode) + ', ' + \
1054 1
               'SourceTimestamp:' + str(self.SourceTimestamp) + ', ' + \
1055
               'SourcePicoseconds:' + str(self.SourcePicoseconds) + ', ' + \
1056
               'ServerTimestamp:' + str(self.ServerTimestamp) + ', ' + \
1057
               'ServerPicoseconds:' + str(self.ServerPicoseconds) + ')'
1058
1059
    __repr__ = __str__
1060 1
1061
1062
class TrustListDataType(FrozenClass):
1063
    '''
1064 1
    :ivar SpecifiedLists:
1065
    :vartype SpecifiedLists: UInt32
1066
    :ivar TrustedCertificates:
1067
    :vartype TrustedCertificates: ByteString
1068 1
    :ivar TrustedCrls:
1069
    :vartype TrustedCrls: ByteString
1070
    :ivar IssuerCertificates:
1071
    :vartype IssuerCertificates: ByteString
1072 1
    :ivar IssuerCrls:
1073
    :vartype IssuerCrls: ByteString
1074
    '''
1075 1
1076
    ua_types = [
1077
1078
        ('SpecifiedLists', 'UInt32'),
1079
        ('TrustedCertificates', 'ListOfByteString'),
1080
        ('TrustedCrls', 'ListOfByteString'),
1081 1
        ('IssuerCertificates', 'ListOfByteString'),
1082
        ('IssuerCrls', 'ListOfByteString'),
1083
               ]
1084 1
1085
    def __init__(self):
1086
        self.SpecifiedLists = 0
1087
        self.TrustedCertificates = []
1088
        self.TrustedCrls = []
1089
        self.IssuerCertificates = []
1090
        self.IssuerCrls = []
1091 1
        self._freeze = True
1092
1093
    def to_binary(self):
1094
        packet = []
1095 1
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedLists))
1096
        packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCertificates)))
1097
        for fieldname in self.TrustedCertificates:
1098
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
1099 1
        packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCrls)))
1100
        for fieldname in self.TrustedCrls:
1101
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
1102 1
        packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCertificates)))
1103
        for fieldname in self.IssuerCertificates:
1104
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
1105 1
        packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCrls)))
1106
        for fieldname in self.IssuerCrls:
1107
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
1108 1
        return b''.join(packet)
1109
1110
    @staticmethod
1111
    def from_binary(data):
1112
        obj = TrustListDataType()
1113
        self.SpecifiedLists = uabin.Primitives.UInt32.unpack(data)
1114
        obj.TrustedCertificates = uabin.Primitives.ByteString.unpack_array(data)
1115
        obj.TrustedCrls = uabin.Primitives.ByteString.unpack_array(data)
1116 1
        obj.IssuerCertificates = uabin.Primitives.ByteString.unpack_array(data)
1117
        obj.IssuerCrls = uabin.Primitives.ByteString.unpack_array(data)
1118
        return obj
1119
1120
    def __str__(self):
1121 1
        return 'TrustListDataType(' + 'SpecifiedLists:' + str(self.SpecifiedLists) + ', ' + \
1122
               'TrustedCertificates:' + str(self.TrustedCertificates) + ', ' + \
1123
               'TrustedCrls:' + str(self.TrustedCrls) + ', ' + \
1124
               'IssuerCertificates:' + str(self.IssuerCertificates) + ', ' + \
1125
               'IssuerCrls:' + str(self.IssuerCrls) + ')'
1126
1127
    __repr__ = __str__
1128
1129
1130 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...
1131
    '''
1132
    An argument for a method.
1133
1134
    :ivar Name:
1135
    :vartype Name: String
1136 1
    :ivar DataType:
1137
    :vartype DataType: NodeId
1138
    :ivar ValueRank:
1139
    :vartype ValueRank: Int32
1140 1
    :ivar ArrayDimensions:
1141
    :vartype ArrayDimensions: UInt32
1142
    :ivar Description:
1143
    :vartype Description: LocalizedText
1144 1
    '''
1145
1146
    ua_types = [
1147
1148 1
        ('Name', 'String'),
1149
        ('DataType', 'NodeId'),
1150
        ('ValueRank', 'Int32'),
1151 1
        ('ArrayDimensions', 'ListOfUInt32'),
1152
        ('Description', 'LocalizedText'),
1153
               ]
1154
1155
    def __init__(self):
1156
        self.Name = None
1157
        self.DataType = NodeId()
1158
        self.ValueRank = 0
1159
        self.ArrayDimensions = []
1160
        self.Description = LocalizedText()
1161
        self._freeze = True
1162
1163
    def to_binary(self):
1164
        packet = []
1165
        packet.append(uabin.Primitives.String.pack(self.Name))
1166
        packet.append(self.DataType.to_binary())
1167
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
1168
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
1169
        for fieldname in self.ArrayDimensions:
1170
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
1171 1
        packet.append(self.Description.to_binary())
1172
        return b''.join(packet)
1173
1174
    @staticmethod
1175
    def from_binary(data):
1176
        obj = Argument()
1177
        self.Name = uabin.Primitives.String.unpack(data)
1178
        obj.DataType = NodeId.from_binary(data)
1179
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
1180
        obj.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
1181 1
        obj.Description = LocalizedText.from_binary(data)
1182 1
        return obj
1183 1
1184 1
    def __str__(self):
1185 1
        return 'Argument(' + 'Name:' + str(self.Name) + ', ' + \
1186 1
               'DataType:' + str(self.DataType) + ', ' + \
1187 1
               'ValueRank:' + str(self.ValueRank) + ', ' + \
1188 1
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
1189 1
               'Description:' + str(self.Description) + ')'
1190 1
1191 1
    __repr__ = __str__
1192 1
1193 1
1194 View Code Duplication
class EnumValueType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1195 1
    '''
1196 1
    A mapping between a value of an enumerated type and a name and description.
1197 1
1198 1
    :ivar Value:
1199 1
    :vartype Value: Int64
1200 1
    :ivar DisplayName:
1201 1
    :vartype DisplayName: LocalizedText
1202 1
    :ivar Description:
1203 1
    :vartype Description: LocalizedText
1204 1
    '''
1205 1
1206 1
    ua_types = [
1207
1208 1
        ('Value', 'Int64'),
1209
        ('DisplayName', 'LocalizedText'),
1210 1
        ('Description', 'LocalizedText'),
1211
               ]
1212 1
1213 1
    def __init__(self):
1214 1
        self.Value = 0
1215 1
        self.DisplayName = LocalizedText()
1216 1
        self.Description = LocalizedText()
1217 1
        self._freeze = True
1218 1
1219 1
    def to_binary(self):
1220
        packet = []
1221 1
        packet.append(uabin.Primitives.Int64.pack(self.Value))
1222
        packet.append(self.DisplayName.to_binary())
1223
        packet.append(self.Description.to_binary())
1224
        return b''.join(packet)
1225
1226
    @staticmethod
1227
    def from_binary(data):
1228
        obj = EnumValueType()
1229
        self.Value = uabin.Primitives.Int64.unpack(data)
1230 1
        obj.DisplayName = LocalizedText.from_binary(data)
1231
        obj.Description = LocalizedText.from_binary(data)
1232
        return obj
1233 1
1234
    def __str__(self):
1235
        return 'EnumValueType(' + 'Value:' + str(self.Value) + ', ' + \
1236
               'DisplayName:' + str(self.DisplayName) + ', ' + \
1237
               'Description:' + str(self.Description) + ')'
1238
1239
    __repr__ = __str__
1240
1241
1242 View Code Duplication
class OptionSet(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1243
    '''
1244
    This abstract Structured DataType is the base DataType for all DataTypes representing a bit mask.
1245
1246
    :ivar Value:
1247
    :vartype Value: ByteString
1248
    :ivar ValidBits:
1249
    :vartype ValidBits: ByteString
1250
    '''
1251
1252
    ua_types = [
1253 1
1254
        ('Value', 'ByteString'),
1255
        ('ValidBits', 'ByteString'),
1256
               ]
1257
1258
    def __init__(self):
1259
        self.Value = None
1260
        self.ValidBits = None
1261
        self._freeze = True
1262
1263 1
    def to_binary(self):
1264 1
        packet = []
1265 1
        packet.append(uabin.Primitives.ByteString.pack(self.Value))
1266 1
        packet.append(uabin.Primitives.ByteString.pack(self.ValidBits))
1267 1
        return b''.join(packet)
1268 1
1269 1
    @staticmethod
1270 1
    def from_binary(data):
1271 1
        obj = OptionSet()
1272 1
        self.Value = uabin.Primitives.ByteString.unpack(data)
1273 1
        self.ValidBits = uabin.Primitives.ByteString.unpack(data)
1274 1
        return obj
1275 1
1276
    def __str__(self):
1277 1
        return 'OptionSet(' + 'Value:' + str(self.Value) + ', ' + \
1278 1
               'ValidBits:' + str(self.ValidBits) + ')'
1279 1
1280 1
    __repr__ = __str__
1281 1
1282 1
1283 1
class Union(FrozenClass):
1284 1
    '''
1285 1
    This abstract DataType is the base DataType for all union DataTypes.
1286 1
1287
    '''
1288 1
1289
    ua_types = [
1290 1
1291
               ]
1292 1
1293 1
    def __init__(self):
1294 1
        self._freeze = True
1295 1
1296 1
    def to_binary(self):
1297 1
        packet = []
1298 1
        return b''.join(packet)
1299 1
1300
    @staticmethod
1301 1
    def from_binary(data):
1302
        obj = Union()
1303
        return obj
1304
1305
    def __str__(self):
1306
        return 'Union(' +  + ')'
1307
1308
    __repr__ = __str__
1309
1310 1
1311 View Code Duplication
class TimeZoneDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1312
    '''
1313 1
    :ivar Offset:
1314
    :vartype Offset: Int16
1315
    :ivar DaylightSavingInOffset:
1316
    :vartype DaylightSavingInOffset: Boolean
1317
    '''
1318
1319
    ua_types = [
1320
1321
        ('Offset', 'Int16'),
1322
        ('DaylightSavingInOffset', 'Boolean'),
1323
               ]
1324
1325
    def __init__(self):
1326
        self.Offset = 0
1327
        self.DaylightSavingInOffset = True
1328
        self._freeze = True
1329
1330
    def to_binary(self):
1331 1
        packet = []
1332
        packet.append(uabin.Primitives.Int16.pack(self.Offset))
1333
        packet.append(uabin.Primitives.Boolean.pack(self.DaylightSavingInOffset))
1334
        return b''.join(packet)
1335
1336
    @staticmethod
1337
    def from_binary(data):
1338
        obj = TimeZoneDataType()
1339
        self.Offset = uabin.Primitives.Int16.unpack(data)
1340 1
        self.DaylightSavingInOffset = uabin.Primitives.Boolean.unpack(data)
1341 1
        return obj
1342 1
1343 1
    def __str__(self):
1344 1
        return 'TimeZoneDataType(' + 'Offset:' + str(self.Offset) + ', ' + \
1345 1
               'DaylightSavingInOffset:' + str(self.DaylightSavingInOffset) + ')'
1346 1
1347 1
    __repr__ = __str__
1348 1
1349 1
1350 1
class ApplicationDescription(FrozenClass):
1351 1
    '''
1352
    Describes an application and how to find it.
1353 1
1354 1
    :ivar ApplicationUri:
1355 1
    :vartype ApplicationUri: String
1356 1
    :ivar ProductUri:
1357 1
    :vartype ProductUri: String
1358 1
    :ivar ApplicationName:
1359 1
    :vartype ApplicationName: LocalizedText
1360 1
    :ivar ApplicationType:
1361
    :vartype ApplicationType: ApplicationType
1362 1
    :ivar GatewayServerUri:
1363 1
    :vartype GatewayServerUri: String
1364
    :ivar DiscoveryProfileUri:
1365 1
    :vartype DiscoveryProfileUri: String
1366
    :ivar DiscoveryUrls:
1367 1
    :vartype DiscoveryUrls: String
1368
    '''
1369 1
1370 1
    ua_types = [
1371 1
1372 1
        ('ApplicationUri', 'String'),
1373 1
        ('ProductUri', 'String'),
1374 1
        ('ApplicationName', 'LocalizedText'),
1375 1
        ('ApplicationType', 'ApplicationType'),
1376
        ('GatewayServerUri', 'String'),
1377 1
        ('DiscoveryProfileUri', 'String'),
1378
        ('DiscoveryUrls', 'ListOfString'),
1379
               ]
1380
1381
    def __init__(self):
1382
        self.ApplicationUri = None
1383
        self.ProductUri = None
1384
        self.ApplicationName = LocalizedText()
1385 1
        self.ApplicationType = ApplicationType(0)
1386
        self.GatewayServerUri = None
1387
        self.DiscoveryProfileUri = None
1388 1
        self.DiscoveryUrls = []
1389
        self._freeze = True
1390
1391 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...
1392
        packet = []
1393
        packet.append(uabin.Primitives.String.pack(self.ApplicationUri))
1394
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
1395
        packet.append(self.ApplicationName.to_binary())
1396
        packet.append(uabin.Primitives.UInt32.pack(self.ApplicationType.value))
1397
        packet.append(uabin.Primitives.String.pack(self.GatewayServerUri))
1398 1
        packet.append(uabin.Primitives.String.pack(self.DiscoveryProfileUri))
1399
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls)))
1400
        for fieldname in self.DiscoveryUrls:
1401
            packet.append(uabin.Primitives.String.pack(fieldname))
1402
        return b''.join(packet)
1403 1
1404 1
    @staticmethod
1405
    def from_binary(data):
1406
        obj = ApplicationDescription()
1407
        self.ApplicationUri = uabin.Primitives.String.unpack(data)
1408 1
        self.ProductUri = uabin.Primitives.String.unpack(data)
1409 1
        obj.ApplicationName = LocalizedText.from_binary(data)
1410 1
        self.ApplicationType = ApplicationType(uabin.Primitives.UInt32.unpack(data))
1411
        self.GatewayServerUri = uabin.Primitives.String.unpack(data)
1412 1
        self.DiscoveryProfileUri = uabin.Primitives.String.unpack(data)
1413 1
        obj.DiscoveryUrls = uabin.Primitives.String.unpack_array(data)
1414 1
        return obj
1415 1
1416 1
    def __str__(self):
1417
        return 'ApplicationDescription(' + 'ApplicationUri:' + str(self.ApplicationUri) + ', ' + \
1418 1
               'ProductUri:' + str(self.ProductUri) + ', ' + \
1419
               'ApplicationName:' + str(self.ApplicationName) + ', ' + \
1420
               'ApplicationType:' + str(self.ApplicationType) + ', ' + \
1421
               'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \
1422 1
               'DiscoveryProfileUri:' + str(self.DiscoveryProfileUri) + ', ' + \
1423
               'DiscoveryUrls:' + str(self.DiscoveryUrls) + ')'
1424
1425
    __repr__ = __str__
1426 1
1427
1428
class RequestHeader(FrozenClass):
1429
    '''
1430 1
    The header passed with every server request.
1431
1432
    :ivar AuthenticationToken:
1433 1
    :vartype AuthenticationToken: NodeId
1434
    :ivar Timestamp:
1435
    :vartype Timestamp: DateTime
1436
    :ivar RequestHandle:
1437
    :vartype RequestHandle: UInt32
1438
    :ivar ReturnDiagnostics:
1439
    :vartype ReturnDiagnostics: UInt32
1440
    :ivar AuditEntryId:
1441
    :vartype AuditEntryId: String
1442
    :ivar TimeoutHint:
1443 1
    :vartype TimeoutHint: UInt32
1444
    :ivar AdditionalHeader:
1445
    :vartype AdditionalHeader: ExtensionObject
1446
    '''
1447
1448
    ua_types = [
1449 1
1450 1
        ('AuthenticationToken', 'NodeId'),
1451 1
        ('Timestamp', 'DateTime'),
1452 1
        ('RequestHandle', 'UInt32'),
1453 1
        ('ReturnDiagnostics', 'UInt32'),
1454 1
        ('AuditEntryId', 'String'),
1455 1
        ('TimeoutHint', 'UInt32'),
1456 1
        ('AdditionalHeader', 'ExtensionObject'),
1457 1
               ]
1458
1459 1
    def __init__(self):
1460 1
        self.AuthenticationToken = NodeId()
1461 1
        self.Timestamp = datetime.utcnow()
1462 1
        self.RequestHandle = 0
1463 1
        self.ReturnDiagnostics = 0
1464
        self.AuditEntryId = None
1465 1
        self.TimeoutHint = 0
1466 1
        self.AdditionalHeader = ExtensionObject()
1467 1
        self._freeze = True
1468 1
1469
    def to_binary(self):
1470 1
        packet = []
1471
        packet.append(self.AuthenticationToken.to_binary())
1472 1
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
1473
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
1474 1
        packet.append(uabin.Primitives.UInt32.pack(self.ReturnDiagnostics))
1475 1
        packet.append(uabin.Primitives.String.pack(self.AuditEntryId))
1476 1
        packet.append(uabin.Primitives.UInt32.pack(self.TimeoutHint))
1477 1
        packet.append(uabin.extensionobject_to_binary(self.AdditionalHeader))
1478
        return b''.join(packet)
1479 1
1480
    @staticmethod
1481
    def from_binary(data):
1482
        obj = RequestHeader()
1483
        obj.AuthenticationToken = NodeId.from_binary(data)
1484 1
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
1485
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
1486
        self.ReturnDiagnostics = uabin.Primitives.UInt32.unpack(data)
1487 1
        self.AuditEntryId = uabin.Primitives.String.unpack(data)
1488
        self.TimeoutHint = uabin.Primitives.UInt32.unpack(data)
1489
        obj.AdditionalHeader = uabin.extensionobject_from_binary(data)
1490
        return obj
1491
1492
    def __str__(self):
1493
        return 'RequestHeader(' + 'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \
1494
               'Timestamp:' + str(self.Timestamp) + ', ' + \
1495
               'RequestHandle:' + str(self.RequestHandle) + ', ' + \
1496
               'ReturnDiagnostics:' + str(self.ReturnDiagnostics) + ', ' + \
1497
               'AuditEntryId:' + str(self.AuditEntryId) + ', ' + \
1498
               'TimeoutHint:' + str(self.TimeoutHint) + ', ' + \
1499 1
               'AdditionalHeader:' + str(self.AdditionalHeader) + ')'
1500
1501
    __repr__ = __str__
1502
1503
1504 View Code Duplication
class ResponseHeader(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1505 1
    '''
1506 1
    The header passed with every server response.
1507
1508
    :ivar Timestamp:
1509
    :vartype Timestamp: DateTime
1510 1
    :ivar RequestHandle:
1511 1
    :vartype RequestHandle: UInt32
1512 1
    :ivar ServiceResult:
1513 1
    :vartype ServiceResult: StatusCode
1514
    :ivar ServiceDiagnostics:
1515 1
    :vartype ServiceDiagnostics: DiagnosticInfo
1516 1
    :ivar StringTable:
1517 1
    :vartype StringTable: String
1518 1
    :ivar AdditionalHeader:
1519 1
    :vartype AdditionalHeader: ExtensionObject
1520 1
    '''
1521
1522 1
    ua_types = [
1523
1524
        ('Timestamp', 'DateTime'),
1525
        ('RequestHandle', 'UInt32'),
1526 1
        ('ServiceResult', 'StatusCode'),
1527
        ('ServiceDiagnostics', 'DiagnosticInfo'),
1528
        ('StringTable', 'ListOfString'),
1529
        ('AdditionalHeader', 'ExtensionObject'),
1530
               ]
1531 1
1532
    def __init__(self):
1533
        self.Timestamp = datetime.utcnow()
1534
        self.RequestHandle = 0
1535
        self.ServiceResult = StatusCode()
1536 1
        self.ServiceDiagnostics = DiagnosticInfo()
1537
        self.StringTable = []
1538
        self.AdditionalHeader = ExtensionObject()
1539 1
        self._freeze = True
1540
1541
    def to_binary(self):
1542
        packet = []
1543
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
1544
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
1545
        packet.append(self.ServiceResult.to_binary())
1546
        packet.append(self.ServiceDiagnostics.to_binary())
1547
        packet.append(uabin.Primitives.Int32.pack(len(self.StringTable)))
1548
        for fieldname in self.StringTable:
1549
            packet.append(uabin.Primitives.String.pack(fieldname))
1550
        packet.append(uabin.extensionobject_to_binary(self.AdditionalHeader))
1551 1
        return b''.join(packet)
1552
1553
    @staticmethod
1554
    def from_binary(data):
1555
        obj = ResponseHeader()
1556
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
1557 1
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
1558 1
        obj.ServiceResult = StatusCode.from_binary(data)
1559 1
        obj.ServiceDiagnostics = DiagnosticInfo.from_binary(data)
1560 1
        obj.StringTable = uabin.Primitives.String.unpack_array(data)
1561 1
        obj.AdditionalHeader = uabin.extensionobject_from_binary(data)
1562 1
        return obj
1563 1
1564 1
    def __str__(self):
1565 1
        return 'ResponseHeader(' + 'Timestamp:' + str(self.Timestamp) + ', ' + \
1566
               'RequestHandle:' + str(self.RequestHandle) + ', ' + \
1567 1
               'ServiceResult:' + str(self.ServiceResult) + ', ' + \
1568 1
               'ServiceDiagnostics:' + str(self.ServiceDiagnostics) + ', ' + \
1569 1
               'StringTable:' + str(self.StringTable) + ', ' + \
1570 1
               'AdditionalHeader:' + str(self.AdditionalHeader) + ')'
1571 1
1572 1
    __repr__ = __str__
1573 1
1574 1
1575 View Code Duplication
class ServiceFault(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1576 1
    '''
1577
    The response returned by all services when there is a service level error.
1578 1
1579
    :ivar TypeId:
1580 1
    :vartype TypeId: NodeId
1581 1
    :ivar ResponseHeader:
1582 1
    :vartype ResponseHeader: ResponseHeader
1583 1
    '''
1584 1
1585 1
    ua_types = [
1586 1
1587 1
        ('TypeId', 'NodeId'),
1588 1
        ('ResponseHeader', 'ResponseHeader'),
1589
               ]
1590 1
1591
    def __init__(self):
1592
        self.TypeId = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary)
1593
        self.ResponseHeader = ResponseHeader()
1594
        self._freeze = True
1595 1
1596
    def to_binary(self):
1597
        packet = []
1598 1
        packet.append(self.TypeId.to_binary())
1599
        packet.append(self.ResponseHeader.to_binary())
1600
        return b''.join(packet)
1601
1602
    @staticmethod
1603
    def from_binary(data):
1604
        obj = ServiceFault()
1605
        obj.TypeId = NodeId.from_binary(data)
1606
        obj.ResponseHeader = ResponseHeader.from_binary(data)
1607
        return obj
1608
1609
    def __str__(self):
1610 1
        return 'ServiceFault(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1611
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
1612
1613
    __repr__ = __str__
1614
1615
1616 View Code Duplication
class FindServersParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1617 1
    '''
1618
    :ivar EndpointUrl:
1619
    :vartype EndpointUrl: String
1620
    :ivar LocaleIds:
1621
    :vartype LocaleIds: String
1622
    :ivar ServerUris:
1623
    :vartype ServerUris: String
1624
    '''
1625
1626
    ua_types = [
1627
1628 1
        ('EndpointUrl', 'String'),
1629
        ('LocaleIds', 'ListOfString'),
1630
        ('ServerUris', 'ListOfString'),
1631
               ]
1632
1633
    def __init__(self):
1634
        self.EndpointUrl = None
1635
        self.LocaleIds = []
1636
        self.ServerUris = []
1637
        self._freeze = True
1638 1
1639
    def to_binary(self):
1640
        packet = []
1641
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
1642 1
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
1643
        for fieldname in self.LocaleIds:
1644
            packet.append(uabin.Primitives.String.pack(fieldname))
1645
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerUris)))
1646
        for fieldname in self.ServerUris:
1647
            packet.append(uabin.Primitives.String.pack(fieldname))
1648 1
        return b''.join(packet)
1649
1650
    @staticmethod
1651
    def from_binary(data):
1652
        obj = FindServersParameters()
1653
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
1654 1
        obj.LocaleIds = uabin.Primitives.String.unpack_array(data)
1655
        obj.ServerUris = uabin.Primitives.String.unpack_array(data)
1656
        return obj
1657 1
1658
    def __str__(self):
1659
        return 'FindServersParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
1660
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
1661
               'ServerUris:' + str(self.ServerUris) + ')'
1662
1663
    __repr__ = __str__
1664
1665
1666
class FindServersRequest(FrozenClass):
1667 1
    '''
1668
    Finds the servers known to the discovery server.
1669
1670
    :ivar TypeId:
1671
    :vartype TypeId: NodeId
1672
    :ivar RequestHeader:
1673 1
    :vartype RequestHeader: RequestHeader
1674
    :ivar Parameters:
1675
    :vartype Parameters: FindServersParameters
1676
    '''
1677
1678
    ua_types = [
1679
1680
        ('TypeId', 'NodeId'),
1681
        ('RequestHeader', 'RequestHeader'),
1682
        ('Parameters', 'FindServersParameters'),
1683 1
               ]
1684
1685
    def __init__(self):
1686
        self.TypeId = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary)
1687
        self.RequestHeader = RequestHeader()
1688
        self.Parameters = FindServersParameters()
1689
        self._freeze = True
1690
1691
    def to_binary(self):
1692 1
        packet = []
1693
        packet.append(self.TypeId.to_binary())
1694
        packet.append(self.RequestHeader.to_binary())
1695
        packet.append(self.Parameters.to_binary())
1696 1
        return b''.join(packet)
1697
1698
    @staticmethod
1699
    def from_binary(data):
1700
        obj = FindServersRequest()
1701 1
        obj.TypeId = NodeId.from_binary(data)
1702
        obj.RequestHeader = RequestHeader.from_binary(data)
1703
        obj.Parameters = FindServersParameters.from_binary(data)
1704
        return obj
1705
1706 1
    def __str__(self):
1707
        return 'FindServersRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1708
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
1709 1
               'Parameters:' + str(self.Parameters) + ')'
1710
1711
    __repr__ = __str__
1712
1713
1714 View Code Duplication
class FindServersResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1715
    '''
1716
    Finds the servers known to the discovery server.
1717
1718
    :ivar TypeId:
1719 1
    :vartype TypeId: NodeId
1720
    :ivar ResponseHeader:
1721
    :vartype ResponseHeader: ResponseHeader
1722
    :ivar Servers:
1723
    :vartype Servers: ApplicationDescription
1724
    '''
1725 1
1726
    ua_types = [
1727
1728
        ('TypeId', 'NodeId'),
1729
        ('ResponseHeader', 'ResponseHeader'),
1730
        ('Servers', 'ListOfApplicationDescription'),
1731
               ]
1732
1733
    def __init__(self):
1734
        self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary)
1735 1
        self.ResponseHeader = ResponseHeader()
1736
        self.Servers = []
1737
        self._freeze = True
1738
1739
    def to_binary(self):
1740
        packet = []
1741
        packet.append(self.TypeId.to_binary())
1742 1
        packet.append(self.ResponseHeader.to_binary())
1743
        packet.append(uabin.Primitives.Int32.pack(len(self.Servers)))
1744
        for fieldname in self.Servers:
1745
            packet.append(fieldname.to_binary())
1746 1
        return b''.join(packet)
1747
1748
    @staticmethod
1749
    def from_binary(data):
1750
        obj = FindServersResponse()
1751 1
        obj.TypeId = NodeId.from_binary(data)
1752
        obj.ResponseHeader = ResponseHeader.from_binary(data)
1753
        length = uabin.Primitives.Int32.unpack(data)
1754
        array = []
1755
        if length != -1:
1756 1
            for _ in range(0, length):
1757
                array.append(ApplicationDescription.from_binary(data))
1758
        obj.Servers = array
1759 1
        return obj
1760
1761
    def __str__(self):
1762
        return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1763
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
1764
               'Servers:' + str(self.Servers) + ')'
1765
1766
    __repr__ = __str__
1767 1
1768
1769 View Code Duplication
class ServerOnNetwork(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1770
    '''
1771
    :ivar RecordId:
1772 1
    :vartype RecordId: UInt32
1773
    :ivar ServerName:
1774
    :vartype ServerName: String
1775
    :ivar DiscoveryUrl:
1776
    :vartype DiscoveryUrl: String
1777
    :ivar ServerCapabilities:
1778
    :vartype ServerCapabilities: String
1779
    '''
1780
1781 1
    ua_types = [
1782
1783
        ('RecordId', 'UInt32'),
1784
        ('ServerName', 'String'),
1785
        ('DiscoveryUrl', 'String'),
1786
        ('ServerCapabilities', 'ListOfString'),
1787
               ]
1788
1789 1
    def __init__(self):
1790
        self.RecordId = 0
1791
        self.ServerName = None
1792
        self.DiscoveryUrl = None
1793 1
        self.ServerCapabilities = []
1794
        self._freeze = True
1795
1796
    def to_binary(self):
1797
        packet = []
1798
        packet.append(uabin.Primitives.UInt32.pack(self.RecordId))
1799
        packet.append(uabin.Primitives.String.pack(self.ServerName))
1800
        packet.append(uabin.Primitives.String.pack(self.DiscoveryUrl))
1801
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities)))
1802 1
        for fieldname in self.ServerCapabilities:
1803
            packet.append(uabin.Primitives.String.pack(fieldname))
1804
        return b''.join(packet)
1805
1806 1
    @staticmethod
1807
    def from_binary(data):
1808
        obj = ServerOnNetwork()
1809 1
        self.RecordId = uabin.Primitives.UInt32.unpack(data)
1810
        self.ServerName = uabin.Primitives.String.unpack(data)
1811
        self.DiscoveryUrl = uabin.Primitives.String.unpack(data)
1812
        obj.ServerCapabilities = uabin.Primitives.String.unpack_array(data)
1813
        return obj
1814
1815
    def __str__(self):
1816
        return 'ServerOnNetwork(' + 'RecordId:' + str(self.RecordId) + ', ' + \
1817
               'ServerName:' + str(self.ServerName) + ', ' + \
1818
               'DiscoveryUrl:' + str(self.DiscoveryUrl) + ', ' + \
1819 1
               'ServerCapabilities:' + str(self.ServerCapabilities) + ')'
1820
1821
    __repr__ = __str__
1822
1823
1824 View Code Duplication
class FindServersOnNetworkParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1825 1
    '''
1826
    :ivar StartingRecordId:
1827
    :vartype StartingRecordId: UInt32
1828
    :ivar MaxRecordsToReturn:
1829
    :vartype MaxRecordsToReturn: UInt32
1830
    :ivar ServerCapabilityFilter:
1831
    :vartype ServerCapabilityFilter: String
1832
    '''
1833
1834
    ua_types = [
1835 1
1836
        ('StartingRecordId', 'UInt32'),
1837
        ('MaxRecordsToReturn', 'UInt32'),
1838
        ('ServerCapabilityFilter', 'ListOfString'),
1839
               ]
1840
1841
    def __init__(self):
1842 1
        self.StartingRecordId = 0
1843
        self.MaxRecordsToReturn = 0
1844
        self.ServerCapabilityFilter = []
1845
        self._freeze = True
1846 1
1847
    def to_binary(self):
1848
        packet = []
1849
        packet.append(uabin.Primitives.UInt32.pack(self.StartingRecordId))
1850
        packet.append(uabin.Primitives.UInt32.pack(self.MaxRecordsToReturn))
1851 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilityFilter)))
1852
        for fieldname in self.ServerCapabilityFilter:
1853
            packet.append(uabin.Primitives.String.pack(fieldname))
1854
        return b''.join(packet)
1855
1856 1
    @staticmethod
1857
    def from_binary(data):
1858
        obj = FindServersOnNetworkParameters()
1859 1
        self.StartingRecordId = uabin.Primitives.UInt32.unpack(data)
1860
        self.MaxRecordsToReturn = uabin.Primitives.UInt32.unpack(data)
1861
        obj.ServerCapabilityFilter = uabin.Primitives.String.unpack_array(data)
1862
        return obj
1863
1864
    def __str__(self):
1865
        return 'FindServersOnNetworkParameters(' + 'StartingRecordId:' + str(self.StartingRecordId) + ', ' + \
1866
               'MaxRecordsToReturn:' + str(self.MaxRecordsToReturn) + ', ' + \
1867
               'ServerCapabilityFilter:' + str(self.ServerCapabilityFilter) + ')'
1868
1869
    __repr__ = __str__
1870
1871
1872
class FindServersOnNetworkRequest(FrozenClass):
1873
    '''
1874
    :ivar TypeId:
1875 1
    :vartype TypeId: NodeId
1876
    :ivar RequestHeader:
1877
    :vartype RequestHeader: RequestHeader
1878
    :ivar Parameters:
1879
    :vartype Parameters: FindServersOnNetworkParameters
1880
    '''
1881
1882
    ua_types = [
1883 1
1884 1
        ('TypeId', 'NodeId'),
1885 1
        ('RequestHeader', 'RequestHeader'),
1886 1
        ('Parameters', 'FindServersOnNetworkParameters'),
1887 1
               ]
1888 1
1889 1
    def __init__(self):
1890 1
        self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary)
1891 1
        self.RequestHeader = RequestHeader()
1892 1
        self.Parameters = FindServersOnNetworkParameters()
1893 1
        self._freeze = True
1894
1895 1
    def to_binary(self):
1896 1
        packet = []
1897 1
        packet.append(self.TypeId.to_binary())
1898 1
        packet.append(self.RequestHeader.to_binary())
1899 1
        packet.append(self.Parameters.to_binary())
1900 1
        return b''.join(packet)
1901 1
1902 1
    @staticmethod
1903
    def from_binary(data):
1904 1
        obj = FindServersOnNetworkRequest()
1905
        obj.TypeId = NodeId.from_binary(data)
1906 1
        obj.RequestHeader = RequestHeader.from_binary(data)
1907
        obj.Parameters = FindServersOnNetworkParameters.from_binary(data)
1908 1
        return obj
1909 1
1910 1
    def __str__(self):
1911 1
        return 'FindServersOnNetworkRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
1912 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
1913 1
               'Parameters:' + str(self.Parameters) + ')'
1914
1915 1
    __repr__ = __str__
1916
1917
1918 View Code Duplication
class FindServersOnNetworkResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
1919
    '''
1920
    :ivar LastCounterResetTime:
1921
    :vartype LastCounterResetTime: DateTime
1922 1
    :ivar Servers:
1923
    :vartype Servers: ServerOnNetwork
1924
    '''
1925 1
1926
    ua_types = [
1927
1928
        ('LastCounterResetTime', 'DateTime'),
1929
        ('Servers', 'ListOfServerOnNetwork'),
1930
               ]
1931
1932
    def __init__(self):
1933
        self.LastCounterResetTime = datetime.utcnow()
1934
        self.Servers = []
1935
        self._freeze = True
1936
1937
    def to_binary(self):
1938
        packet = []
1939
        packet.append(uabin.Primitives.DateTime.pack(self.LastCounterResetTime))
1940
        packet.append(uabin.Primitives.Int32.pack(len(self.Servers)))
1941
        for fieldname in self.Servers:
1942
            packet.append(fieldname.to_binary())
1943
        return b''.join(packet)
1944
1945
    @staticmethod
1946
    def from_binary(data):
1947 1
        obj = FindServersOnNetworkResult()
1948
        self.LastCounterResetTime = uabin.Primitives.DateTime.unpack(data)
1949
        length = uabin.Primitives.Int32.unpack(data)
1950
        array = []
1951
        if length != -1:
1952
            for _ in range(0, length):
1953
                array.append(ServerOnNetwork.from_binary(data))
1954
        obj.Servers = array
1955
        return obj
1956
1957
    def __str__(self):
1958 1
        return 'FindServersOnNetworkResult(' + 'LastCounterResetTime:' + str(self.LastCounterResetTime) + ', ' + \
1959 1
               'Servers:' + str(self.Servers) + ')'
1960 1
1961 1
    __repr__ = __str__
1962 1
1963 1
1964 1
class FindServersOnNetworkResponse(FrozenClass):
1965 1
    '''
1966 1
    :ivar TypeId:
1967 1
    :vartype TypeId: NodeId
1968 1
    :ivar ResponseHeader:
1969 1
    :vartype ResponseHeader: ResponseHeader
1970 1
    :ivar Parameters:
1971 1
    :vartype Parameters: FindServersOnNetworkResult
1972
    '''
1973 1
1974 1
    ua_types = [
1975 1
1976 1
        ('TypeId', 'NodeId'),
1977 1
        ('ResponseHeader', 'ResponseHeader'),
1978 1
        ('Parameters', 'FindServersOnNetworkResult'),
1979 1
               ]
1980 1
1981 1
    def __init__(self):
1982 1
        self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary)
1983 1
        self.ResponseHeader = ResponseHeader()
1984 1
        self.Parameters = FindServersOnNetworkResult()
1985 1
        self._freeze = True
1986
1987 1
    def to_binary(self):
1988
        packet = []
1989 1
        packet.append(self.TypeId.to_binary())
1990
        packet.append(self.ResponseHeader.to_binary())
1991 1
        packet.append(self.Parameters.to_binary())
1992 1
        return b''.join(packet)
1993 1
1994 1
    @staticmethod
1995 1
    def from_binary(data):
1996 1
        obj = FindServersOnNetworkResponse()
1997 1
        obj.TypeId = NodeId.from_binary(data)
1998 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
1999 1
        obj.Parameters = FindServersOnNetworkResult.from_binary(data)
2000 1
        return obj
2001 1
2002 1
    def __str__(self):
2003 1
        return 'FindServersOnNetworkResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2004 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2005
               'Parameters:' + str(self.Parameters) + ')'
2006 1
2007
    __repr__ = __str__
2008
2009
2010
class UserTokenPolicy(FrozenClass):
2011
    '''
2012
    Describes a user token that can be used with a server.
2013
2014
    :ivar PolicyId:
2015
    :vartype PolicyId: String
2016 1
    :ivar TokenType:
2017
    :vartype TokenType: UserTokenType
2018
    :ivar IssuedTokenType:
2019 1
    :vartype IssuedTokenType: String
2020
    :ivar IssuerEndpointUrl:
2021
    :vartype IssuerEndpointUrl: String
2022
    :ivar SecurityPolicyUri:
2023
    :vartype SecurityPolicyUri: String
2024
    '''
2025
2026
    ua_types = [
2027
2028
        ('PolicyId', 'String'),
2029 1
        ('TokenType', 'UserTokenType'),
2030
        ('IssuedTokenType', 'String'),
2031
        ('IssuerEndpointUrl', 'String'),
2032
        ('SecurityPolicyUri', 'String'),
2033
               ]
2034
2035 1
    def __init__(self):
2036 1
        self.PolicyId = None
2037 1
        self.TokenType = UserTokenType(0)
2038 1
        self.IssuedTokenType = None
2039 1
        self.IssuerEndpointUrl = None
2040 1
        self.SecurityPolicyUri = None
2041 1
        self._freeze = True
2042 1
2043 1
    def to_binary(self):
2044
        packet = []
2045 1
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
2046 1
        packet.append(uabin.Primitives.UInt32.pack(self.TokenType.value))
2047 1
        packet.append(uabin.Primitives.String.pack(self.IssuedTokenType))
2048 1
        packet.append(uabin.Primitives.String.pack(self.IssuerEndpointUrl))
2049 1
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
2050
        return b''.join(packet)
2051 1
2052 1
    @staticmethod
2053
    def from_binary(data):
2054 1
        obj = UserTokenPolicy()
2055
        self.PolicyId = uabin.Primitives.String.unpack(data)
2056 1
        self.TokenType = UserTokenType(uabin.Primitives.UInt32.unpack(data))
2057
        self.IssuedTokenType = uabin.Primitives.String.unpack(data)
2058 1
        self.IssuerEndpointUrl = uabin.Primitives.String.unpack(data)
2059
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
2060 1
        return obj
2061 1
2062 1
    def __str__(self):
2063 1
        return 'UserTokenPolicy(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
2064
               'TokenType:' + str(self.TokenType) + ', ' + \
2065 1
               'IssuedTokenType:' + str(self.IssuedTokenType) + ', ' + \
2066
               'IssuerEndpointUrl:' + str(self.IssuerEndpointUrl) + ', ' + \
2067
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ')'
2068
2069
    __repr__ = __str__
2070 1
2071
2072
class EndpointDescription(FrozenClass):
2073 1
    '''
2074
    The description of a endpoint that can be used to access a server.
2075
2076
    :ivar EndpointUrl:
2077
    :vartype EndpointUrl: String
2078
    :ivar Server:
2079
    :vartype Server: ApplicationDescription
2080
    :ivar ServerCertificate:
2081
    :vartype ServerCertificate: ByteString
2082
    :ivar SecurityMode:
2083
    :vartype SecurityMode: MessageSecurityMode
2084
    :ivar SecurityPolicyUri:
2085 1
    :vartype SecurityPolicyUri: String
2086
    :ivar UserIdentityTokens:
2087
    :vartype UserIdentityTokens: UserTokenPolicy
2088
    :ivar TransportProfileUri:
2089
    :vartype TransportProfileUri: String
2090
    :ivar SecurityLevel:
2091 1
    :vartype SecurityLevel: Byte
2092 1
    '''
2093
2094
    ua_types = [
2095
2096 1
        ('EndpointUrl', 'String'),
2097 1
        ('Server', 'ApplicationDescription'),
2098 1
        ('ServerCertificate', 'ByteString'),
2099 1
        ('SecurityMode', 'MessageSecurityMode'),
2100
        ('SecurityPolicyUri', 'String'),
2101 1
        ('UserIdentityTokens', 'ListOfUserTokenPolicy'),
2102 1
        ('TransportProfileUri', 'String'),
2103 1
        ('SecurityLevel', 'Byte'),
2104 1
               ]
2105 1
2106 1
    def __init__(self):
2107
        self.EndpointUrl = None
2108 1
        self.Server = ApplicationDescription()
2109
        self.ServerCertificate = None
2110
        self.SecurityMode = MessageSecurityMode(0)
2111
        self.SecurityPolicyUri = None
2112 1
        self.UserIdentityTokens = []
2113
        self.TransportProfileUri = None
2114
        self.SecurityLevel = 0
2115
        self._freeze = True
2116
2117 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...
2118
        packet = []
2119
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
2120
        packet.append(self.Server.to_binary())
2121
        packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate))
2122 1
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
2123
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
2124
        packet.append(uabin.Primitives.Int32.pack(len(self.UserIdentityTokens)))
2125 1
        for fieldname in self.UserIdentityTokens:
2126
            packet.append(fieldname.to_binary())
2127
        packet.append(uabin.Primitives.String.pack(self.TransportProfileUri))
2128
        packet.append(uabin.Primitives.Byte.pack(self.SecurityLevel))
2129
        return b''.join(packet)
2130
2131
    @staticmethod
2132
    def from_binary(data):
2133
        obj = EndpointDescription()
2134
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
2135
        obj.Server = ApplicationDescription.from_binary(data)
2136
        self.ServerCertificate = uabin.Primitives.ByteString.unpack(data)
2137 1
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
2138
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
2139
        length = uabin.Primitives.Int32.unpack(data)
2140
        array = []
2141
        if length != -1:
2142
            for _ in range(0, length):
2143 1
                array.append(UserTokenPolicy.from_binary(data))
2144 1
        obj.UserIdentityTokens = array
2145 1
        self.TransportProfileUri = uabin.Primitives.String.unpack(data)
2146 1
        self.SecurityLevel = uabin.Primitives.Byte.unpack(data)
2147 1
        return obj
2148 1
2149 1
    def __str__(self):
2150 1
        return 'EndpointDescription(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
2151 1
               'Server:' + str(self.Server) + ', ' + \
2152
               'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \
2153 1
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
2154 1
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \
2155 1
               'UserIdentityTokens:' + str(self.UserIdentityTokens) + ', ' + \
2156 1
               'TransportProfileUri:' + str(self.TransportProfileUri) + ', ' + \
2157 1
               'SecurityLevel:' + str(self.SecurityLevel) + ')'
2158 1
2159 1
    __repr__ = __str__
2160 1
2161
2162 1 View Code Duplication
class GetEndpointsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2163
    '''
2164 1
    :ivar EndpointUrl:
2165
    :vartype EndpointUrl: String
2166 1
    :ivar LocaleIds:
2167 1
    :vartype LocaleIds: String
2168 1
    :ivar ProfileUris:
2169 1
    :vartype ProfileUris: String
2170 1
    '''
2171 1
2172 1
    ua_types = [
2173 1
2174 1
        ('EndpointUrl', 'String'),
2175
        ('LocaleIds', 'ListOfString'),
2176 1
        ('ProfileUris', 'ListOfString'),
2177
               ]
2178
2179
    def __init__(self):
2180
        self.EndpointUrl = None
2181 1
        self.LocaleIds = []
2182
        self.ProfileUris = []
2183
        self._freeze = True
2184 1
2185
    def to_binary(self):
2186
        packet = []
2187
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
2188
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
2189
        for fieldname in self.LocaleIds:
2190
            packet.append(uabin.Primitives.String.pack(fieldname))
2191
        packet.append(uabin.Primitives.Int32.pack(len(self.ProfileUris)))
2192
        for fieldname in self.ProfileUris:
2193
            packet.append(uabin.Primitives.String.pack(fieldname))
2194
        return b''.join(packet)
2195
2196
    @staticmethod
2197
    def from_binary(data):
2198
        obj = GetEndpointsParameters()
2199
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
2200
        obj.LocaleIds = uabin.Primitives.String.unpack_array(data)
2201
        obj.ProfileUris = uabin.Primitives.String.unpack_array(data)
2202
        return obj
2203
2204
    def __str__(self):
2205
        return 'GetEndpointsParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
2206 1
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
2207
               'ProfileUris:' + str(self.ProfileUris) + ')'
2208
2209
    __repr__ = __str__
2210
2211
2212
class GetEndpointsRequest(FrozenClass):
2213
    '''
2214
    Gets the endpoints used by the server.
2215
2216
    :ivar TypeId:
2217 1
    :vartype TypeId: NodeId
2218 1
    :ivar RequestHeader:
2219 1
    :vartype RequestHeader: RequestHeader
2220 1
    :ivar Parameters:
2221 1
    :vartype Parameters: GetEndpointsParameters
2222 1
    '''
2223 1
2224 1
    ua_types = [
2225 1
2226 1
        ('TypeId', 'NodeId'),
2227 1
        ('RequestHeader', 'RequestHeader'),
2228 1
        ('Parameters', 'GetEndpointsParameters'),
2229 1
               ]
2230 1
2231
    def __init__(self):
2232 1
        self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)
2233 1
        self.RequestHeader = RequestHeader()
2234 1
        self.Parameters = GetEndpointsParameters()
2235 1
        self._freeze = True
2236 1
2237 1
    def to_binary(self):
2238 1
        packet = []
2239 1
        packet.append(self.TypeId.to_binary())
2240 1
        packet.append(self.RequestHeader.to_binary())
2241 1
        packet.append(self.Parameters.to_binary())
2242 1
        return b''.join(packet)
2243 1
2244 1
    @staticmethod
2245 1
    def from_binary(data):
2246 1
        obj = GetEndpointsRequest()
2247
        obj.TypeId = NodeId.from_binary(data)
2248 1
        obj.RequestHeader = RequestHeader.from_binary(data)
2249
        obj.Parameters = GetEndpointsParameters.from_binary(data)
2250 1
        return obj
2251
2252 1
    def __str__(self):
2253 1
        return 'GetEndpointsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2254 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2255 1
               'Parameters:' + str(self.Parameters) + ')'
2256 1
2257 1
    __repr__ = __str__
2258 1
2259 1
2260 1 View Code Duplication
class GetEndpointsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2261 1
    '''
2262 1
    Gets the endpoints used by the server.
2263 1
2264 1
    :ivar TypeId:
2265 1
    :vartype TypeId: NodeId
2266
    :ivar ResponseHeader:
2267 1
    :vartype ResponseHeader: ResponseHeader
2268
    :ivar Endpoints:
2269
    :vartype Endpoints: EndpointDescription
2270
    '''
2271
2272
    ua_types = [
2273
2274
        ('TypeId', 'NodeId'),
2275
        ('ResponseHeader', 'ResponseHeader'),
2276
        ('Endpoints', 'ListOfEndpointDescription'),
2277 1
               ]
2278
2279
    def __init__(self):
2280 1
        self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary)
2281
        self.ResponseHeader = ResponseHeader()
2282
        self.Endpoints = []
2283
        self._freeze = True
2284
2285
    def to_binary(self):
2286
        packet = []
2287
        packet.append(self.TypeId.to_binary())
2288
        packet.append(self.ResponseHeader.to_binary())
2289
        packet.append(uabin.Primitives.Int32.pack(len(self.Endpoints)))
2290
        for fieldname in self.Endpoints:
2291
            packet.append(fieldname.to_binary())
2292 1
        return b''.join(packet)
2293
2294
    @staticmethod
2295
    def from_binary(data):
2296
        obj = GetEndpointsResponse()
2297
        obj.TypeId = NodeId.from_binary(data)
2298 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
2299 1
        length = uabin.Primitives.Int32.unpack(data)
2300
        array = []
2301
        if length != -1:
2302
            for _ in range(0, length):
2303 1
                array.append(EndpointDescription.from_binary(data))
2304 1
        obj.Endpoints = array
2305 1
        return obj
2306 1
2307
    def __str__(self):
2308 1
        return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2309 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2310 1
               'Endpoints:' + str(self.Endpoints) + ')'
2311 1
2312 1
    __repr__ = __str__
2313 1
2314
2315 1
class RegisteredServer(FrozenClass):
2316
    '''
2317
    The information required to register a server with a discovery server.
2318
2319 1
    :ivar ServerUri:
2320
    :vartype ServerUri: String
2321
    :ivar ProductUri:
2322
    :vartype ProductUri: String
2323
    :ivar ServerNames:
2324 1
    :vartype ServerNames: LocalizedText
2325
    :ivar ServerType:
2326
    :vartype ServerType: ApplicationType
2327
    :ivar GatewayServerUri:
2328
    :vartype GatewayServerUri: String
2329 1
    :ivar DiscoveryUrls:
2330
    :vartype DiscoveryUrls: String
2331
    :ivar SemaphoreFilePath:
2332 1
    :vartype SemaphoreFilePath: String
2333
    :ivar IsOnline:
2334
    :vartype IsOnline: Boolean
2335
    '''
2336
2337
    ua_types = [
2338
2339
        ('ServerUri', 'String'),
2340
        ('ProductUri', 'String'),
2341
        ('ServerNames', 'ListOfLocalizedText'),
2342 1
        ('ServerType', 'ApplicationType'),
2343
        ('GatewayServerUri', 'String'),
2344
        ('DiscoveryUrls', 'ListOfString'),
2345
        ('SemaphoreFilePath', 'String'),
2346
        ('IsOnline', 'Boolean'),
2347 1
               ]
2348 1
2349 1
    def __init__(self):
2350 1
        self.ServerUri = None
2351 1
        self.ProductUri = None
2352 1
        self.ServerNames = []
2353 1
        self.ServerType = ApplicationType(0)
2354 1
        self.GatewayServerUri = None
2355
        self.DiscoveryUrls = []
2356 1
        self.SemaphoreFilePath = None
2357 1
        self.IsOnline = True
2358 1
        self._freeze = True
2359 1
2360 1
    def to_binary(self):
2361
        packet = []
2362 1
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
2363
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
2364 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerNames)))
2365
        for fieldname in self.ServerNames:
2366 1
            packet.append(fieldname.to_binary())
2367 1
        packet.append(uabin.Primitives.UInt32.pack(self.ServerType.value))
2368 1
        packet.append(uabin.Primitives.String.pack(self.GatewayServerUri))
2369
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls)))
2370 1
        for fieldname in self.DiscoveryUrls:
2371
            packet.append(uabin.Primitives.String.pack(fieldname))
2372
        packet.append(uabin.Primitives.String.pack(self.SemaphoreFilePath))
2373
        packet.append(uabin.Primitives.Boolean.pack(self.IsOnline))
2374 1
        return b''.join(packet)
2375
2376
    @staticmethod
2377 1
    def from_binary(data):
2378
        obj = RegisteredServer()
2379
        self.ServerUri = uabin.Primitives.String.unpack(data)
2380
        self.ProductUri = uabin.Primitives.String.unpack(data)
2381
        length = uabin.Primitives.Int32.unpack(data)
2382
        array = []
2383 1
        if length != -1:
2384
            for _ in range(0, length):
2385
                array.append(LocalizedText.from_binary(data))
2386 1
        obj.ServerNames = array
2387
        self.ServerType = ApplicationType(uabin.Primitives.UInt32.unpack(data))
2388
        self.GatewayServerUri = uabin.Primitives.String.unpack(data)
2389
        obj.DiscoveryUrls = uabin.Primitives.String.unpack_array(data)
2390
        self.SemaphoreFilePath = uabin.Primitives.String.unpack(data)
2391
        self.IsOnline = uabin.Primitives.Boolean.unpack(data)
2392
        return obj
2393 1
2394
    def __str__(self):
2395
        return 'RegisteredServer(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \
2396
               'ProductUri:' + str(self.ProductUri) + ', ' + \
2397 1
               'ServerNames:' + str(self.ServerNames) + ', ' + \
2398
               'ServerType:' + str(self.ServerType) + ', ' + \
2399
               'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \
2400
               'DiscoveryUrls:' + str(self.DiscoveryUrls) + ', ' + \
2401 1
               'SemaphoreFilePath:' + str(self.SemaphoreFilePath) + ', ' + \
2402
               'IsOnline:' + str(self.IsOnline) + ')'
2403
2404 1
    __repr__ = __str__
2405
2406
2407 1
class RegisterServerRequest(FrozenClass):
2408
    '''
2409
    Registers a server with the discovery server.
2410 1
2411
    :ivar TypeId:
2412
    :vartype TypeId: NodeId
2413
    :ivar RequestHeader:
2414
    :vartype RequestHeader: RequestHeader
2415
    :ivar Server:
2416
    :vartype Server: RegisteredServer
2417
    '''
2418
2419
    ua_types = [
2420 1
2421
        ('TypeId', 'NodeId'),
2422
        ('RequestHeader', 'RequestHeader'),
2423
        ('Server', 'RegisteredServer'),
2424
               ]
2425 1
2426
    def __init__(self):
2427
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary)
2428
        self.RequestHeader = RequestHeader()
2429
        self.Server = RegisteredServer()
2430
        self._freeze = True
2431
2432
    def to_binary(self):
2433
        packet = []
2434 1
        packet.append(self.TypeId.to_binary())
2435
        packet.append(self.RequestHeader.to_binary())
2436
        packet.append(self.Server.to_binary())
2437
        return b''.join(packet)
2438
2439
    @staticmethod
2440
    def from_binary(data):
2441
        obj = RegisterServerRequest()
2442 1
        obj.TypeId = NodeId.from_binary(data)
2443
        obj.RequestHeader = RequestHeader.from_binary(data)
2444
        obj.Server = RegisteredServer.from_binary(data)
2445
        return obj
2446 1
2447
    def __str__(self):
2448
        return 'RegisterServerRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2449
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2450 1
               'Server:' + str(self.Server) + ')'
2451
2452
    __repr__ = __str__
2453
2454 1
2455 View Code Duplication
class RegisterServerResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2456
    '''
2457 1
    Registers a server with the discovery server.
2458
2459
    :ivar TypeId:
2460
    :vartype TypeId: NodeId
2461
    :ivar ResponseHeader:
2462
    :vartype ResponseHeader: ResponseHeader
2463
    '''
2464
2465 1
    ua_types = [
2466
2467
        ('TypeId', 'NodeId'),
2468
        ('ResponseHeader', 'ResponseHeader'),
2469
               ]
2470 1
2471
    def __init__(self):
2472
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary)
2473
        self.ResponseHeader = ResponseHeader()
2474
        self._freeze = True
2475
2476
    def to_binary(self):
2477
        packet = []
2478
        packet.append(self.TypeId.to_binary())
2479 1
        packet.append(self.ResponseHeader.to_binary())
2480
        return b''.join(packet)
2481
2482
    @staticmethod
2483
    def from_binary(data):
2484
        obj = RegisterServerResponse()
2485
        obj.TypeId = NodeId.from_binary(data)
2486
        obj.ResponseHeader = ResponseHeader.from_binary(data)
2487 1
        return obj
2488
2489
    def __str__(self):
2490
        return 'RegisterServerResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2491 1
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
2492
2493
    __repr__ = __str__
2494
2495
2496
class DiscoveryConfiguration(FrozenClass):
2497
    '''
2498
    A base type for discovery configuration information.
2499
2500 1
    '''
2501
2502
    ua_types = [
2503
2504 1
               ]
2505
2506
    def __init__(self):
2507 1
        self._freeze = True
2508
2509
    def to_binary(self):
2510
        packet = []
2511
        return b''.join(packet)
2512
2513
    @staticmethod
2514
    def from_binary(data):
2515
        obj = DiscoveryConfiguration()
2516
        return obj
2517 1
2518
    def __str__(self):
2519
        return 'DiscoveryConfiguration(' +  + ')'
2520
2521
    __repr__ = __str__
2522
2523 1
2524 View Code Duplication
class MdnsDiscoveryConfiguration(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2525
    '''
2526
    The discovery information needed for mDNS registration.
2527
2528
    :ivar MdnsServerName:
2529
    :vartype MdnsServerName: String
2530
    :ivar ServerCapabilities:
2531
    :vartype ServerCapabilities: String
2532
    '''
2533 1
2534
    ua_types = [
2535
2536
        ('MdnsServerName', 'String'),
2537
        ('ServerCapabilities', 'ListOfString'),
2538
               ]
2539
2540 1
    def __init__(self):
2541
        self.MdnsServerName = None
2542
        self.ServerCapabilities = []
2543
        self._freeze = True
2544 1
2545
    def to_binary(self):
2546
        packet = []
2547
        packet.append(uabin.Primitives.String.pack(self.MdnsServerName))
2548
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities)))
2549 1
        for fieldname in self.ServerCapabilities:
2550
            packet.append(uabin.Primitives.String.pack(fieldname))
2551
        return b''.join(packet)
2552
2553
    @staticmethod
2554 1
    def from_binary(data):
2555
        obj = MdnsDiscoveryConfiguration()
2556
        self.MdnsServerName = uabin.Primitives.String.unpack(data)
2557 1
        obj.ServerCapabilities = uabin.Primitives.String.unpack_array(data)
2558
        return obj
2559
2560
    def __str__(self):
2561
        return 'MdnsDiscoveryConfiguration(' + 'MdnsServerName:' + str(self.MdnsServerName) + ', ' + \
2562
               'ServerCapabilities:' + str(self.ServerCapabilities) + ')'
2563
2564
    __repr__ = __str__
2565
2566
2567 View Code Duplication
class RegisterServer2Parameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2568
    '''
2569 1
    :ivar Server:
2570
    :vartype Server: RegisteredServer
2571
    :ivar DiscoveryConfiguration:
2572
    :vartype DiscoveryConfiguration: ExtensionObject
2573
    '''
2574
2575
    ua_types = [
2576 1
2577
        ('Server', 'RegisteredServer'),
2578
        ('DiscoveryConfiguration', 'ListOfExtensionObject'),
2579
               ]
2580
2581
    def __init__(self):
2582
        self.Server = RegisteredServer()
2583
        self.DiscoveryConfiguration = []
2584
        self._freeze = True
2585
2586
    def to_binary(self):
2587 1
        packet = []
2588
        packet.append(self.Server.to_binary())
2589
        packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryConfiguration)))
2590
        for fieldname in self.DiscoveryConfiguration:
2591
            packet.append(uabin.extensionobject_to_binary(fieldname))
2592
        return b''.join(packet)
2593
2594
    @staticmethod
2595
    def from_binary(data):
2596
        obj = RegisterServer2Parameters()
2597
        obj.Server = RegisteredServer.from_binary(data)
2598
        length = uabin.Primitives.Int32.unpack(data)
2599 1
        array = []
2600
        if length != -1:
2601
            for _ in range(0, length):
2602
                array.append(uabin.extensionobject_from_binary(data))
2603 1
        obj.DiscoveryConfiguration = array
2604
        return obj
2605
2606
    def __str__(self):
2607
        return 'RegisterServer2Parameters(' + 'Server:' + str(self.Server) + ', ' + \
2608
               'DiscoveryConfiguration:' + str(self.DiscoveryConfiguration) + ')'
2609
2610
    __repr__ = __str__
2611
2612
2613
class RegisterServer2Request(FrozenClass):
2614
    '''
2615
    :ivar TypeId:
2616
    :vartype TypeId: NodeId
2617
    :ivar RequestHeader:
2618
    :vartype RequestHeader: RequestHeader
2619 1
    :ivar Parameters:
2620
    :vartype Parameters: RegisterServer2Parameters
2621
    '''
2622
2623
    ua_types = [
2624
2625 1
        ('TypeId', 'NodeId'),
2626
        ('RequestHeader', 'RequestHeader'),
2627
        ('Parameters', 'RegisterServer2Parameters'),
2628 1
               ]
2629
2630
    def __init__(self):
2631
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary)
2632
        self.RequestHeader = RequestHeader()
2633
        self.Parameters = RegisterServer2Parameters()
2634
        self._freeze = True
2635
2636
    def to_binary(self):
2637
        packet = []
2638
        packet.append(self.TypeId.to_binary())
2639
        packet.append(self.RequestHeader.to_binary())
2640
        packet.append(self.Parameters.to_binary())
2641
        return b''.join(packet)
2642 1
2643
    @staticmethod
2644
    def from_binary(data):
2645
        obj = RegisterServer2Request()
2646
        obj.TypeId = NodeId.from_binary(data)
2647
        obj.RequestHeader = RequestHeader.from_binary(data)
2648
        obj.Parameters = RegisterServer2Parameters.from_binary(data)
2649 1
        return obj
2650 1
2651 1
    def __str__(self):
2652 1
        return 'RegisterServer2Request(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2653 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2654 1
               'Parameters:' + str(self.Parameters) + ')'
2655 1
2656 1
    __repr__ = __str__
2657 1
2658 1
2659 View Code Duplication
class RegisterServer2Response(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2660 1
    '''
2661 1
    :ivar TypeId:
2662 1
    :vartype TypeId: NodeId
2663 1
    :ivar ResponseHeader:
2664 1
    :vartype ResponseHeader: ResponseHeader
2665 1
    :ivar ConfigurationResults:
2666 1
    :vartype ConfigurationResults: StatusCode
2667
    :ivar DiagnosticInfos:
2668 1
    :vartype DiagnosticInfos: DiagnosticInfo
2669
    '''
2670 1
2671
    ua_types = [
2672 1
2673 1
        ('TypeId', 'NodeId'),
2674 1
        ('ResponseHeader', 'ResponseHeader'),
2675 1
        ('ConfigurationResults', 'ListOfStatusCode'),
2676 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
2677
               ]
2678 1
2679
    def __init__(self):
2680
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary)
2681
        self.ResponseHeader = ResponseHeader()
2682
        self.ConfigurationResults = []
2683
        self.DiagnosticInfos = []
2684 1
        self._freeze = True
2685
2686
    def to_binary(self):
2687 1
        packet = []
2688
        packet.append(self.TypeId.to_binary())
2689
        packet.append(self.ResponseHeader.to_binary())
2690
        packet.append(uabin.Primitives.Int32.pack(len(self.ConfigurationResults)))
2691
        for fieldname in self.ConfigurationResults:
2692
            packet.append(fieldname.to_binary())
2693
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
2694
        for fieldname in self.DiagnosticInfos:
2695
            packet.append(fieldname.to_binary())
2696
        return b''.join(packet)
2697
2698
    @staticmethod
2699
    def from_binary(data):
2700
        obj = RegisterServer2Response()
2701 1
        obj.TypeId = NodeId.from_binary(data)
2702
        obj.ResponseHeader = ResponseHeader.from_binary(data)
2703
        length = uabin.Primitives.Int32.unpack(data)
2704
        array = []
2705
        if length != -1:
2706
            for _ in range(0, length):
2707
                array.append(StatusCode.from_binary(data))
2708
        obj.ConfigurationResults = array
2709 1
        length = uabin.Primitives.Int32.unpack(data)
2710 1
        array = []
2711 1
        if length != -1:
2712 1
            for _ in range(0, length):
2713 1
                array.append(DiagnosticInfo.from_binary(data))
2714 1
        obj.DiagnosticInfos = array
2715 1
        return obj
2716 1
2717 1
    def __str__(self):
2718 1
        return 'RegisterServer2Response(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2719 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2720
               'ConfigurationResults:' + str(self.ConfigurationResults) + ', ' + \
2721 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
2722 1
2723 1
    __repr__ = __str__
2724 1
2725 1
2726 1 View Code Duplication
class ChannelSecurityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2727 1
    '''
2728 1
    The token that identifies a set of keys for an active secure channel.
2729
2730 1
    :ivar ChannelId:
2731
    :vartype ChannelId: UInt32
2732 1
    :ivar TokenId:
2733
    :vartype TokenId: UInt32
2734 1
    :ivar CreatedAt:
2735 1
    :vartype CreatedAt: DateTime
2736 1
    :ivar RevisedLifetime:
2737 1
    :vartype RevisedLifetime: UInt32
2738 1
    '''
2739 1
2740
    ua_types = [
2741 1
2742
        ('ChannelId', 'UInt32'),
2743
        ('TokenId', 'UInt32'),
2744
        ('CreatedAt', 'DateTime'),
2745
        ('RevisedLifetime', 'UInt32'),
2746
               ]
2747
2748 1
    def __init__(self):
2749
        self.ChannelId = 0
2750
        self.TokenId = 0
2751 1
        self.CreatedAt = datetime.utcnow()
2752
        self.RevisedLifetime = 0
2753
        self._freeze = True
2754
2755
    def to_binary(self):
2756
        packet = []
2757
        packet.append(uabin.Primitives.UInt32.pack(self.ChannelId))
2758
        packet.append(uabin.Primitives.UInt32.pack(self.TokenId))
2759
        packet.append(uabin.Primitives.DateTime.pack(self.CreatedAt))
2760
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetime))
2761
        return b''.join(packet)
2762
2763 1
    @staticmethod
2764
    def from_binary(data):
2765
        obj = ChannelSecurityToken()
2766
        self.ChannelId = uabin.Primitives.UInt32.unpack(data)
2767
        self.TokenId = uabin.Primitives.UInt32.unpack(data)
2768
        self.CreatedAt = uabin.Primitives.DateTime.unpack(data)
2769 1
        self.RevisedLifetime = uabin.Primitives.UInt32.unpack(data)
2770 1
        return obj
2771 1
2772 1
    def __str__(self):
2773 1
        return 'ChannelSecurityToken(' + 'ChannelId:' + str(self.ChannelId) + ', ' + \
2774 1
               'TokenId:' + str(self.TokenId) + ', ' + \
2775 1
               'CreatedAt:' + str(self.CreatedAt) + ', ' + \
2776 1
               'RevisedLifetime:' + str(self.RevisedLifetime) + ')'
2777 1
2778
    __repr__ = __str__
2779 1
2780 1
2781 1
class OpenSecureChannelParameters(FrozenClass):
2782 1
    '''
2783 1
    :ivar ClientProtocolVersion:
2784 1
    :vartype ClientProtocolVersion: UInt32
2785
    :ivar RequestType:
2786 1
    :vartype RequestType: SecurityTokenRequestType
2787
    :ivar SecurityMode:
2788 1
    :vartype SecurityMode: MessageSecurityMode
2789
    :ivar ClientNonce:
2790 1
    :vartype ClientNonce: ByteString
2791 1
    :ivar RequestedLifetime:
2792 1
    :vartype RequestedLifetime: UInt32
2793 1
    '''
2794
2795 1
    ua_types = [
2796
2797
        ('ClientProtocolVersion', 'UInt32'),
2798
        ('RequestType', 'SecurityTokenRequestType'),
2799
        ('SecurityMode', 'MessageSecurityMode'),
2800 1
        ('ClientNonce', 'ByteString'),
2801
        ('RequestedLifetime', 'UInt32'),
2802
               ]
2803 1
2804
    def __init__(self):
2805
        self.ClientProtocolVersion = 0
2806
        self.RequestType = SecurityTokenRequestType(0)
2807
        self.SecurityMode = MessageSecurityMode(0)
2808
        self.ClientNonce = None
2809
        self.RequestedLifetime = 0
2810
        self._freeze = True
2811
2812
    def to_binary(self):
2813 1
        packet = []
2814
        packet.append(uabin.Primitives.UInt32.pack(self.ClientProtocolVersion))
2815
        packet.append(uabin.Primitives.UInt32.pack(self.RequestType.value))
2816
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
2817
        packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce))
2818
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetime))
2819 1
        return b''.join(packet)
2820 1
2821 1
    @staticmethod
2822 1
    def from_binary(data):
2823 1
        obj = OpenSecureChannelParameters()
2824 1
        self.ClientProtocolVersion = uabin.Primitives.UInt32.unpack(data)
2825 1
        self.RequestType = SecurityTokenRequestType(uabin.Primitives.UInt32.unpack(data))
2826 1
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
2827 1
        self.ClientNonce = uabin.Primitives.ByteString.unpack(data)
2828
        self.RequestedLifetime = uabin.Primitives.UInt32.unpack(data)
2829 1
        return obj
2830 1
2831 1
    def __str__(self):
2832 1
        return 'OpenSecureChannelParameters(' + 'ClientProtocolVersion:' + str(self.ClientProtocolVersion) + ', ' + \
2833 1
               'RequestType:' + str(self.RequestType) + ', ' + \
2834 1
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
2835
               'ClientNonce:' + str(self.ClientNonce) + ', ' + \
2836 1
               'RequestedLifetime:' + str(self.RequestedLifetime) + ')'
2837
2838 1
    __repr__ = __str__
2839
2840 1
2841 1
class OpenSecureChannelRequest(FrozenClass):
2842 1
    '''
2843 1
    Creates a secure channel with a server.
2844
2845 1
    :ivar TypeId:
2846
    :vartype TypeId: NodeId
2847
    :ivar RequestHeader:
2848
    :vartype RequestHeader: RequestHeader
2849
    :ivar Parameters:
2850 1
    :vartype Parameters: OpenSecureChannelParameters
2851
    '''
2852
2853 1
    ua_types = [
2854
2855
        ('TypeId', 'NodeId'),
2856
        ('RequestHeader', 'RequestHeader'),
2857
        ('Parameters', 'OpenSecureChannelParameters'),
2858
               ]
2859
2860
    def __init__(self):
2861
        self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary)
2862
        self.RequestHeader = RequestHeader()
2863
        self.Parameters = OpenSecureChannelParameters()
2864
        self._freeze = True
2865 1
2866
    def to_binary(self):
2867
        packet = []
2868
        packet.append(self.TypeId.to_binary())
2869
        packet.append(self.RequestHeader.to_binary())
2870
        packet.append(self.Parameters.to_binary())
2871 1
        return b''.join(packet)
2872 1
2873 1
    @staticmethod
2874 1
    def from_binary(data):
2875 1
        obj = OpenSecureChannelRequest()
2876 1
        obj.TypeId = NodeId.from_binary(data)
2877 1
        obj.RequestHeader = RequestHeader.from_binary(data)
2878 1
        obj.Parameters = OpenSecureChannelParameters.from_binary(data)
2879 1
        return obj
2880
2881 1
    def __str__(self):
2882 1
        return 'OpenSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2883 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
2884 1
               'Parameters:' + str(self.Parameters) + ')'
2885 1
2886 1
    __repr__ = __str__
2887
2888 1
2889 View Code Duplication
class OpenSecureChannelResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2890 1
    '''
2891
    :ivar ServerProtocolVersion:
2892 1
    :vartype ServerProtocolVersion: UInt32
2893 1
    :ivar SecurityToken:
2894 1
    :vartype SecurityToken: ChannelSecurityToken
2895 1
    :ivar ServerNonce:
2896
    :vartype ServerNonce: ByteString
2897 1
    '''
2898
2899
    ua_types = [
2900
2901
        ('ServerProtocolVersion', 'UInt32'),
2902 1
        ('SecurityToken', 'ChannelSecurityToken'),
2903
        ('ServerNonce', 'ByteString'),
2904
               ]
2905 1
2906
    def __init__(self):
2907
        self.ServerProtocolVersion = 0
2908
        self.SecurityToken = ChannelSecurityToken()
2909
        self.ServerNonce = None
2910
        self._freeze = True
2911
2912
    def to_binary(self):
2913
        packet = []
2914
        packet.append(uabin.Primitives.UInt32.pack(self.ServerProtocolVersion))
2915 1
        packet.append(self.SecurityToken.to_binary())
2916
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
2917
        return b''.join(packet)
2918
2919
    @staticmethod
2920 1
    def from_binary(data):
2921 1
        obj = OpenSecureChannelResult()
2922
        self.ServerProtocolVersion = uabin.Primitives.UInt32.unpack(data)
2923
        obj.SecurityToken = ChannelSecurityToken.from_binary(data)
2924
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
2925 1
        return obj
2926 1
2927 1
    def __str__(self):
2928
        return 'OpenSecureChannelResult(' + 'ServerProtocolVersion:' + str(self.ServerProtocolVersion) + ', ' + \
2929 1
               'SecurityToken:' + str(self.SecurityToken) + ', ' + \
2930 1
               'ServerNonce:' + str(self.ServerNonce) + ')'
2931 1
2932 1
    __repr__ = __str__
2933 1
2934
2935 1
class OpenSecureChannelResponse(FrozenClass):
2936
    '''
2937
    Creates a secure channel with a server.
2938
2939 1
    :ivar TypeId:
2940
    :vartype TypeId: NodeId
2941
    :ivar ResponseHeader:
2942
    :vartype ResponseHeader: ResponseHeader
2943 1
    :ivar Parameters:
2944
    :vartype Parameters: OpenSecureChannelResult
2945
    '''
2946
2947 1
    ua_types = [
2948
2949
        ('TypeId', 'NodeId'),
2950 1
        ('ResponseHeader', 'ResponseHeader'),
2951
        ('Parameters', 'OpenSecureChannelResult'),
2952
               ]
2953
2954
    def __init__(self):
2955
        self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary)
2956
        self.ResponseHeader = ResponseHeader()
2957
        self.Parameters = OpenSecureChannelResult()
2958
        self._freeze = True
2959
2960 1
    def to_binary(self):
2961
        packet = []
2962
        packet.append(self.TypeId.to_binary())
2963
        packet.append(self.ResponseHeader.to_binary())
2964
        packet.append(self.Parameters.to_binary())
2965 1
        return b''.join(packet)
2966
2967
    @staticmethod
2968
    def from_binary(data):
2969
        obj = OpenSecureChannelResponse()
2970
        obj.TypeId = NodeId.from_binary(data)
2971
        obj.ResponseHeader = ResponseHeader.from_binary(data)
2972
        obj.Parameters = OpenSecureChannelResult.from_binary(data)
2973
        return obj
2974 1
2975
    def __str__(self):
2976
        return 'OpenSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2977
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2978
               'Parameters:' + str(self.Parameters) + ')'
2979
2980 1
    __repr__ = __str__
2981
2982
2983 View Code Duplication
class CloseSecureChannelRequest(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
2984 1
    '''
2985
    Closes a secure channel.
2986
2987
    :ivar TypeId:
2988 1
    :vartype TypeId: NodeId
2989
    :ivar RequestHeader:
2990
    :vartype RequestHeader: RequestHeader
2991
    '''
2992 1
2993
    ua_types = [
2994
2995 1
        ('TypeId', 'NodeId'),
2996
        ('RequestHeader', 'RequestHeader'),
2997
               ]
2998
2999
    def __init__(self):
3000
        self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary)
3001
        self.RequestHeader = RequestHeader()
3002
        self._freeze = True
3003
3004
    def to_binary(self):
3005 1
        packet = []
3006
        packet.append(self.TypeId.to_binary())
3007
        packet.append(self.RequestHeader.to_binary())
3008
        return b''.join(packet)
3009
3010 1
    @staticmethod
3011
    def from_binary(data):
3012
        obj = CloseSecureChannelRequest()
3013
        obj.TypeId = NodeId.from_binary(data)
3014
        obj.RequestHeader = RequestHeader.from_binary(data)
3015
        return obj
3016
3017
    def __str__(self):
3018
        return 'CloseSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3019 1
               'RequestHeader:' + str(self.RequestHeader) + ')'
3020
3021
    __repr__ = __str__
3022
3023
3024 View Code Duplication
class CloseSecureChannelResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3025 1
    '''
3026
    Closes a secure channel.
3027
3028
    :ivar TypeId:
3029 1
    :vartype TypeId: NodeId
3030
    :ivar ResponseHeader:
3031
    :vartype ResponseHeader: ResponseHeader
3032
    '''
3033 1
3034
    ua_types = [
3035
3036
        ('TypeId', 'NodeId'),
3037 1
        ('ResponseHeader', 'ResponseHeader'),
3038
               ]
3039
3040 1
    def __init__(self):
3041
        self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary)
3042
        self.ResponseHeader = ResponseHeader()
3043
        self._freeze = True
3044
3045
    def to_binary(self):
3046
        packet = []
3047
        packet.append(self.TypeId.to_binary())
3048
        packet.append(self.ResponseHeader.to_binary())
3049
        return b''.join(packet)
3050 1
3051
    @staticmethod
3052
    def from_binary(data):
3053
        obj = CloseSecureChannelResponse()
3054
        obj.TypeId = NodeId.from_binary(data)
3055 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
3056 1
        return obj
3057 1
3058 1
    def __str__(self):
3059 1
        return 'CloseSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3060 1
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
3061 1
3062 1
    __repr__ = __str__
3063
3064 1
3065 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...
3066 1
    '''
3067 1
    A software certificate with a digital signature.
3068 1
3069
    :ivar CertificateData:
3070 1
    :vartype CertificateData: ByteString
3071
    :ivar Signature:
3072 1
    :vartype Signature: ByteString
3073
    '''
3074 1
3075 1
    ua_types = [
3076 1
3077
        ('CertificateData', 'ByteString'),
3078 1
        ('Signature', 'ByteString'),
3079
               ]
3080
3081
    def __init__(self):
3082 1
        self.CertificateData = None
3083
        self.Signature = None
3084
        self._freeze = True
3085 1
3086
    def to_binary(self):
3087
        packet = []
3088
        packet.append(uabin.Primitives.ByteString.pack(self.CertificateData))
3089
        packet.append(uabin.Primitives.ByteString.pack(self.Signature))
3090
        return b''.join(packet)
3091
3092
    @staticmethod
3093
    def from_binary(data):
3094
        obj = SignedSoftwareCertificate()
3095
        self.CertificateData = uabin.Primitives.ByteString.unpack(data)
3096
        self.Signature = uabin.Primitives.ByteString.unpack(data)
3097
        return obj
3098
3099
    def __str__(self):
3100
        return 'SignedSoftwareCertificate(' + 'CertificateData:' + str(self.CertificateData) + ', ' + \
3101
               'Signature:' + str(self.Signature) + ')'
3102
3103
    __repr__ = __str__
3104
3105 1
3106 View Code Duplication
class SignatureData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3107
    '''
3108
    A digital signature.
3109
3110
    :ivar Algorithm:
3111
    :vartype Algorithm: String
3112
    :ivar Signature:
3113
    :vartype Signature: ByteString
3114
    '''
3115
3116 1
    ua_types = [
3117 1
3118 1
        ('Algorithm', 'String'),
3119 1
        ('Signature', 'ByteString'),
3120 1
               ]
3121 1
3122 1
    def __init__(self):
3123 1
        self.Algorithm = None
3124 1
        self.Signature = None
3125 1
        self._freeze = True
3126 1
3127 1
    def to_binary(self):
3128 1
        packet = []
3129 1
        packet.append(uabin.Primitives.String.pack(self.Algorithm))
3130
        packet.append(uabin.Primitives.ByteString.pack(self.Signature))
3131 1
        return b''.join(packet)
3132 1
3133 1
    @staticmethod
3134 1
    def from_binary(data):
3135 1
        obj = SignatureData()
3136 1
        self.Algorithm = uabin.Primitives.String.unpack(data)
3137 1
        self.Signature = uabin.Primitives.ByteString.unpack(data)
3138 1
        return obj
3139 1
3140 1
    def __str__(self):
3141 1
        return 'SignatureData(' + 'Algorithm:' + str(self.Algorithm) + ', ' + \
3142
               'Signature:' + str(self.Signature) + ')'
3143 1
3144
    __repr__ = __str__
3145 1
3146
3147 1
class CreateSessionParameters(FrozenClass):
3148 1
    '''
3149 1
    :ivar ClientDescription:
3150 1
    :vartype ClientDescription: ApplicationDescription
3151 1
    :ivar ServerUri:
3152 1
    :vartype ServerUri: String
3153 1
    :ivar EndpointUrl:
3154 1
    :vartype EndpointUrl: String
3155 1
    :ivar SessionName:
3156
    :vartype SessionName: String
3157 1
    :ivar ClientNonce:
3158
    :vartype ClientNonce: ByteString
3159
    :ivar ClientCertificate:
3160
    :vartype ClientCertificate: ByteString
3161
    :ivar RequestedSessionTimeout:
3162
    :vartype RequestedSessionTimeout: Double
3163
    :ivar MaxResponseMessageSize:
3164
    :vartype MaxResponseMessageSize: UInt32
3165
    '''
3166
3167 1
    ua_types = [
3168
3169
        ('ClientDescription', 'ApplicationDescription'),
3170 1
        ('ServerUri', 'String'),
3171
        ('EndpointUrl', 'String'),
3172
        ('SessionName', 'String'),
3173
        ('ClientNonce', 'ByteString'),
3174
        ('ClientCertificate', 'ByteString'),
3175
        ('RequestedSessionTimeout', 'Double'),
3176
        ('MaxResponseMessageSize', 'UInt32'),
3177
               ]
3178
3179
    def __init__(self):
3180
        self.ClientDescription = ApplicationDescription()
3181
        self.ServerUri = None
3182 1
        self.EndpointUrl = None
3183
        self.SessionName = None
3184
        self.ClientNonce = None
3185
        self.ClientCertificate = None
3186
        self.RequestedSessionTimeout = 0
3187
        self.MaxResponseMessageSize = 0
3188 1
        self._freeze = True
3189 1
3190
    def to_binary(self):
3191
        packet = []
3192
        packet.append(self.ClientDescription.to_binary())
3193 1
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
3194 1
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
3195 1
        packet.append(uabin.Primitives.String.pack(self.SessionName))
3196 1
        packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce))
3197
        packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate))
3198 1
        packet.append(uabin.Primitives.Double.pack(self.RequestedSessionTimeout))
3199 1
        packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize))
3200 1
        return b''.join(packet)
3201 1
3202 1
    @staticmethod
3203 1
    def from_binary(data):
3204
        obj = CreateSessionParameters()
3205 1
        obj.ClientDescription = ApplicationDescription.from_binary(data)
3206
        self.ServerUri = uabin.Primitives.String.unpack(data)
3207
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
3208
        self.SessionName = uabin.Primitives.String.unpack(data)
3209 1
        self.ClientNonce = uabin.Primitives.ByteString.unpack(data)
3210
        self.ClientCertificate = uabin.Primitives.ByteString.unpack(data)
3211
        self.RequestedSessionTimeout = uabin.Primitives.Double.unpack(data)
3212
        self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data)
3213
        return obj
3214 1
3215
    def __str__(self):
3216
        return 'CreateSessionParameters(' + 'ClientDescription:' + str(self.ClientDescription) + ', ' + \
3217
               'ServerUri:' + str(self.ServerUri) + ', ' + \
3218
               'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
3219 1
               'SessionName:' + str(self.SessionName) + ', ' + \
3220
               'ClientNonce:' + str(self.ClientNonce) + ', ' + \
3221
               'ClientCertificate:' + str(self.ClientCertificate) + ', ' + \
3222 1
               'RequestedSessionTimeout:' + str(self.RequestedSessionTimeout) + ', ' + \
3223
               'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ')'
3224
3225
    __repr__ = __str__
3226
3227
3228
class CreateSessionRequest(FrozenClass):
3229
    '''
3230
    Creates a new session with the server.
3231
3232
    :ivar TypeId:
3233
    :vartype TypeId: NodeId
3234
    :ivar RequestHeader:
3235
    :vartype RequestHeader: RequestHeader
3236
    :ivar Parameters:
3237
    :vartype Parameters: CreateSessionParameters
3238
    '''
3239
3240
    ua_types = [
3241
3242
        ('TypeId', 'NodeId'),
3243
        ('RequestHeader', 'RequestHeader'),
3244 1
        ('Parameters', 'CreateSessionParameters'),
3245
               ]
3246
3247
    def __init__(self):
3248
        self.TypeId = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary)
3249
        self.RequestHeader = RequestHeader()
3250
        self.Parameters = CreateSessionParameters()
3251
        self._freeze = True
3252
3253
    def to_binary(self):
3254
        packet = []
3255
        packet.append(self.TypeId.to_binary())
3256 1
        packet.append(self.RequestHeader.to_binary())
3257 1
        packet.append(self.Parameters.to_binary())
3258 1
        return b''.join(packet)
3259 1
3260 1
    @staticmethod
3261 1
    def from_binary(data):
3262 1
        obj = CreateSessionRequest()
3263 1
        obj.TypeId = NodeId.from_binary(data)
3264 1
        obj.RequestHeader = RequestHeader.from_binary(data)
3265 1
        obj.Parameters = CreateSessionParameters.from_binary(data)
3266 1
        return obj
3267 1
3268 1
    def __str__(self):
3269 1
        return 'CreateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3270 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3271
               'Parameters:' + str(self.Parameters) + ')'
3272 1
3273 1
    __repr__ = __str__
3274 1
3275 1
3276 1
class CreateSessionResult(FrozenClass):
3277 1
    '''
3278 1
    :ivar SessionId:
3279 1
    :vartype SessionId: NodeId
3280 1
    :ivar AuthenticationToken:
3281 1
    :vartype AuthenticationToken: NodeId
3282 1
    :ivar RevisedSessionTimeout:
3283 1
    :vartype RevisedSessionTimeout: Double
3284
    :ivar ServerNonce:
3285 1
    :vartype ServerNonce: ByteString
3286 1
    :ivar ServerCertificate:
3287 1
    :vartype ServerCertificate: ByteString
3288
    :ivar ServerEndpoints:
3289 1
    :vartype ServerEndpoints: EndpointDescription
3290
    :ivar ServerSoftwareCertificates:
3291 1
    :vartype ServerSoftwareCertificates: SignedSoftwareCertificate
3292
    :ivar ServerSignature:
3293 1
    :vartype ServerSignature: SignatureData
3294 1
    :ivar MaxRequestMessageSize:
3295 1
    :vartype MaxRequestMessageSize: UInt32
3296 1
    '''
3297 1
3298 1
    ua_types = [
3299 1
3300 1
        ('SessionId', 'NodeId'),
3301 1
        ('AuthenticationToken', 'NodeId'),
3302 1
        ('RevisedSessionTimeout', 'Double'),
3303 1
        ('ServerNonce', 'ByteString'),
3304 1
        ('ServerCertificate', 'ByteString'),
3305 1
        ('ServerEndpoints', 'ListOfEndpointDescription'),
3306 1
        ('ServerSoftwareCertificates', 'ListOfSignedSoftwareCertificate'),
3307 1
        ('ServerSignature', 'SignatureData'),
3308 1
        ('MaxRequestMessageSize', 'UInt32'),
3309
               ]
3310 1
3311 1
    def __init__(self):
3312 1
        self.SessionId = NodeId()
3313
        self.AuthenticationToken = NodeId()
3314 1
        self.RevisedSessionTimeout = 0
3315
        self.ServerNonce = None
3316
        self.ServerCertificate = None
3317
        self.ServerEndpoints = []
3318
        self.ServerSoftwareCertificates = []
3319
        self.ServerSignature = SignatureData()
3320
        self.MaxRequestMessageSize = 0
3321
        self._freeze = True
3322
3323
    def to_binary(self):
3324
        packet = []
3325 1
        packet.append(self.SessionId.to_binary())
3326
        packet.append(self.AuthenticationToken.to_binary())
3327
        packet.append(uabin.Primitives.Double.pack(self.RevisedSessionTimeout))
3328 1
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
3329
        packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate))
3330
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerEndpoints)))
3331
        for fieldname in self.ServerEndpoints:
3332
            packet.append(fieldname.to_binary())
3333
        packet.append(uabin.Primitives.Int32.pack(len(self.ServerSoftwareCertificates)))
3334
        for fieldname in self.ServerSoftwareCertificates:
3335
            packet.append(fieldname.to_binary())
3336
        packet.append(self.ServerSignature.to_binary())
3337
        packet.append(uabin.Primitives.UInt32.pack(self.MaxRequestMessageSize))
3338
        return b''.join(packet)
3339
3340 1
    @staticmethod
3341
    def from_binary(data):
3342
        obj = CreateSessionResult()
3343
        obj.SessionId = NodeId.from_binary(data)
3344
        obj.AuthenticationToken = NodeId.from_binary(data)
3345
        self.RevisedSessionTimeout = uabin.Primitives.Double.unpack(data)
3346 1
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
3347 1
        self.ServerCertificate = uabin.Primitives.ByteString.unpack(data)
3348 1
        length = uabin.Primitives.Int32.unpack(data)
3349 1
        array = []
3350 1
        if length != -1:
3351 1
            for _ in range(0, length):
3352 1
                array.append(EndpointDescription.from_binary(data))
3353 1
        obj.ServerEndpoints = array
3354 1
        length = uabin.Primitives.Int32.unpack(data)
3355
        array = []
3356 1
        if length != -1:
3357 1
            for _ in range(0, length):
3358 1
                array.append(SignedSoftwareCertificate.from_binary(data))
3359 1
        obj.ServerSoftwareCertificates = array
3360 1
        obj.ServerSignature = SignatureData.from_binary(data)
3361 1
        self.MaxRequestMessageSize = uabin.Primitives.UInt32.unpack(data)
3362
        return obj
3363 1
3364
    def __str__(self):
3365 1
        return 'CreateSessionResult(' + 'SessionId:' + str(self.SessionId) + ', ' + \
3366
               'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \
3367 1
               'RevisedSessionTimeout:' + str(self.RevisedSessionTimeout) + ', ' + \
3368 1
               'ServerNonce:' + str(self.ServerNonce) + ', ' + \
3369 1
               'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \
3370 1
               'ServerEndpoints:' + str(self.ServerEndpoints) + ', ' + \
3371
               'ServerSoftwareCertificates:' + str(self.ServerSoftwareCertificates) + ', ' + \
3372 1
               'ServerSignature:' + str(self.ServerSignature) + ', ' + \
3373
               'MaxRequestMessageSize:' + str(self.MaxRequestMessageSize) + ')'
3374
3375
    __repr__ = __str__
3376
3377 1
3378
class CreateSessionResponse(FrozenClass):
3379
    '''
3380 1
    Creates a new session with the server.
3381
3382
    :ivar TypeId:
3383
    :vartype TypeId: NodeId
3384
    :ivar ResponseHeader:
3385
    :vartype ResponseHeader: ResponseHeader
3386
    :ivar Parameters:
3387
    :vartype Parameters: CreateSessionResult
3388 1
    '''
3389
3390
    ua_types = [
3391
3392 1
        ('TypeId', 'NodeId'),
3393
        ('ResponseHeader', 'ResponseHeader'),
3394
        ('Parameters', 'CreateSessionResult'),
3395
               ]
3396
3397
    def __init__(self):
3398
        self.TypeId = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary)
3399
        self.ResponseHeader = ResponseHeader()
3400 1
        self.Parameters = CreateSessionResult()
3401
        self._freeze = True
3402
3403
    def to_binary(self):
3404
        packet = []
3405 1
        packet.append(self.TypeId.to_binary())
3406
        packet.append(self.ResponseHeader.to_binary())
3407
        packet.append(self.Parameters.to_binary())
3408
        return b''.join(packet)
3409 1
3410
    @staticmethod
3411
    def from_binary(data):
3412 1
        obj = CreateSessionResponse()
3413
        obj.TypeId = NodeId.from_binary(data)
3414
        obj.ResponseHeader = ResponseHeader.from_binary(data)
3415 1
        obj.Parameters = CreateSessionResult.from_binary(data)
3416
        return obj
3417
3418 1
    def __str__(self):
3419
        return 'CreateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3420
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
3421
               'Parameters:' + str(self.Parameters) + ')'
3422
3423
    __repr__ = __str__
3424
3425
3426 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...
3427
    '''
3428
    A base type for a user identity token.
3429
3430 1
    :ivar PolicyId:
3431 1
    :vartype PolicyId: String
3432 1
    '''
3433 1
3434 1
    ua_types = [
3435 1
3436 1
        ('PolicyId', 'String'),
3437
               ]
3438 1
3439 1
    def __init__(self):
3440 1
        self.PolicyId = None
3441 1
        self._freeze = True
3442
3443 1
    def to_binary(self):
3444
        packet = []
3445 1
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3446
        return b''.join(packet)
3447 1
3448 1
    @staticmethod
3449
    def from_binary(data):
3450 1
        obj = UserIdentityToken()
3451
        self.PolicyId = uabin.Primitives.String.unpack(data)
3452
        return obj
3453 1
3454
    def __str__(self):
3455
        return 'UserIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')'
3456 1
3457
    __repr__ = __str__
3458
3459
3460 View Code Duplication
class AnonymousIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3461
    '''
3462
    A token representing an anonymous user.
3463
3464
    :ivar PolicyId:
3465
    :vartype PolicyId: String
3466
    '''
3467
3468
    ua_types = [
3469
3470 1
        ('PolicyId', 'String'),
3471
               ]
3472
3473
    def __init__(self):
3474
        self.PolicyId = None
3475
        self._freeze = True
3476
3477 1
    def to_binary(self):
3478 1
        packet = []
3479 1
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3480 1
        return b''.join(packet)
3481 1
3482 1
    @staticmethod
3483 1
    def from_binary(data):
3484 1
        obj = AnonymousIdentityToken()
3485 1
        self.PolicyId = uabin.Primitives.String.unpack(data)
3486 1
        return obj
3487
3488 1
    def __str__(self):
3489 1
        return 'AnonymousIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')'
3490 1
3491 1
    __repr__ = __str__
3492 1
3493 1
3494 1
class UserNameIdentityToken(FrozenClass):
3495
    '''
3496 1
    A token representing a user identified by a user name and password.
3497
3498 1
    :ivar PolicyId:
3499
    :vartype PolicyId: String
3500 1
    :ivar UserName:
3501 1
    :vartype UserName: String
3502 1
    :ivar Password:
3503 1
    :vartype Password: ByteString
3504 1
    :ivar EncryptionAlgorithm:
3505
    :vartype EncryptionAlgorithm: String
3506 1
    '''
3507
3508
    ua_types = [
3509
3510
        ('PolicyId', 'String'),
3511
        ('UserName', 'String'),
3512 1
        ('Password', 'ByteString'),
3513
        ('EncryptionAlgorithm', 'String'),
3514
               ]
3515 1
3516
    def __init__(self):
3517
        self.PolicyId = None
3518
        self.UserName = None
3519
        self.Password = None
3520
        self.EncryptionAlgorithm = None
3521
        self._freeze = True
3522
3523
    def to_binary(self):
3524
        packet = []
3525 1
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3526
        packet.append(uabin.Primitives.String.pack(self.UserName))
3527
        packet.append(uabin.Primitives.ByteString.pack(self.Password))
3528
        packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm))
3529
        return b''.join(packet)
3530 1
3531
    @staticmethod
3532
    def from_binary(data):
3533
        obj = UserNameIdentityToken()
3534
        self.PolicyId = uabin.Primitives.String.unpack(data)
3535
        self.UserName = uabin.Primitives.String.unpack(data)
3536
        self.Password = uabin.Primitives.ByteString.unpack(data)
3537
        self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data)
3538
        return obj
3539 1
3540
    def __str__(self):
3541
        return 'UserNameIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3542
               'UserName:' + str(self.UserName) + ', ' + \
3543
               'Password:' + str(self.Password) + ', ' + \
3544
               'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')'
3545 1
3546
    __repr__ = __str__
3547
3548
3549 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...
3550
    '''
3551
    A token representing a user identified by an X509 certificate.
3552
3553 1
    :ivar PolicyId:
3554
    :vartype PolicyId: String
3555
    :ivar CertificateData:
3556
    :vartype CertificateData: ByteString
3557 1
    '''
3558
3559
    ua_types = [
3560 1
3561
        ('PolicyId', 'String'),
3562
        ('CertificateData', 'ByteString'),
3563
               ]
3564
3565
    def __init__(self):
3566
        self.PolicyId = None
3567
        self.CertificateData = None
3568 1
        self._freeze = True
3569
3570
    def to_binary(self):
3571
        packet = []
3572
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3573 1
        packet.append(uabin.Primitives.ByteString.pack(self.CertificateData))
3574
        return b''.join(packet)
3575
3576
    @staticmethod
3577
    def from_binary(data):
3578
        obj = X509IdentityToken()
3579
        self.PolicyId = uabin.Primitives.String.unpack(data)
3580
        self.CertificateData = uabin.Primitives.ByteString.unpack(data)
3581
        return obj
3582 1
3583
    def __str__(self):
3584
        return 'X509IdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3585
               'CertificateData:' + str(self.CertificateData) + ')'
3586
3587
    __repr__ = __str__
3588 1
3589
3590 View Code Duplication
class KerberosIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3591
    '''
3592 1
    :ivar PolicyId:
3593
    :vartype PolicyId: String
3594
    :ivar TicketData:
3595
    :vartype TicketData: ByteString
3596 1
    '''
3597
3598
    ua_types = [
3599
3600 1
        ('PolicyId', 'String'),
3601
        ('TicketData', 'ByteString'),
3602
               ]
3603 1
3604
    def __init__(self):
3605
        self.PolicyId = None
3606
        self.TicketData = None
3607
        self._freeze = True
3608
3609
    def to_binary(self):
3610
        packet = []
3611
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3612
        packet.append(uabin.Primitives.ByteString.pack(self.TicketData))
3613
        return b''.join(packet)
3614
3615 1
    @staticmethod
3616
    def from_binary(data):
3617
        obj = KerberosIdentityToken()
3618
        self.PolicyId = uabin.Primitives.String.unpack(data)
3619
        self.TicketData = uabin.Primitives.ByteString.unpack(data)
3620
        return obj
3621 1
3622
    def __str__(self):
3623
        return 'KerberosIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3624
               'TicketData:' + str(self.TicketData) + ')'
3625
3626
    __repr__ = __str__
3627
3628
3629 View Code Duplication
class IssuedIdentityToken(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3630
    '''
3631 1
    A token representing a user identified by a WS-Security XML token.
3632
3633
    :ivar PolicyId:
3634
    :vartype PolicyId: String
3635
    :ivar TokenData:
3636
    :vartype TokenData: ByteString
3637
    :ivar EncryptionAlgorithm:
3638 1
    :vartype EncryptionAlgorithm: String
3639
    '''
3640
3641
    ua_types = [
3642 1
3643
        ('PolicyId', 'String'),
3644
        ('TokenData', 'ByteString'),
3645
        ('EncryptionAlgorithm', 'String'),
3646
               ]
3647 1
3648
    def __init__(self):
3649
        self.PolicyId = None
3650
        self.TokenData = None
3651
        self.EncryptionAlgorithm = None
3652 1
        self._freeze = True
3653
3654
    def to_binary(self):
3655 1
        packet = []
3656
        packet.append(uabin.Primitives.String.pack(self.PolicyId))
3657
        packet.append(uabin.Primitives.ByteString.pack(self.TokenData))
3658
        packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm))
3659
        return b''.join(packet)
3660
3661
    @staticmethod
3662
    def from_binary(data):
3663
        obj = IssuedIdentityToken()
3664
        self.PolicyId = uabin.Primitives.String.unpack(data)
3665
        self.TokenData = uabin.Primitives.ByteString.unpack(data)
3666
        self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data)
3667
        return obj
3668
3669 1
    def __str__(self):
3670
        return 'IssuedIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \
3671
               'TokenData:' + str(self.TokenData) + ', ' + \
3672
               'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')'
3673
3674
    __repr__ = __str__
3675
3676
3677 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...
3678 1
    '''
3679 1
    :ivar ClientSignature:
3680 1
    :vartype ClientSignature: SignatureData
3681 1
    :ivar ClientSoftwareCertificates:
3682 1
    :vartype ClientSoftwareCertificates: SignedSoftwareCertificate
3683 1
    :ivar LocaleIds:
3684 1
    :vartype LocaleIds: String
3685 1
    :ivar UserIdentityToken:
3686 1
    :vartype UserIdentityToken: ExtensionObject
3687 1
    :ivar UserTokenSignature:
3688
    :vartype UserTokenSignature: SignatureData
3689 1
    '''
3690 1
3691 1
    ua_types = [
3692 1
3693 1
        ('ClientSignature', 'SignatureData'),
3694
        ('ClientSoftwareCertificates', 'ListOfSignedSoftwareCertificate'),
3695 1
        ('LocaleIds', 'ListOfString'),
3696 1
        ('UserIdentityToken', 'ExtensionObject'),
3697 1
        ('UserTokenSignature', 'SignatureData'),
3698 1
               ]
3699 1
3700 1
    def __init__(self):
3701
        self.ClientSignature = SignatureData()
3702 1
        self.ClientSoftwareCertificates = []
3703
        self.LocaleIds = []
3704 1
        self.UserIdentityToken = ExtensionObject()
3705
        self.UserTokenSignature = SignatureData()
3706 1
        self._freeze = True
3707 1
3708 1
    def to_binary(self):
3709 1
        packet = []
3710 1
        packet.append(self.ClientSignature.to_binary())
3711 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ClientSoftwareCertificates)))
3712
        for fieldname in self.ClientSoftwareCertificates:
3713 1
            packet.append(fieldname.to_binary())
3714 1
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
3715 1
        for fieldname in self.LocaleIds:
3716 1
            packet.append(uabin.Primitives.String.pack(fieldname))
3717
        packet.append(uabin.extensionobject_to_binary(self.UserIdentityToken))
3718 1
        packet.append(self.UserTokenSignature.to_binary())
3719
        return b''.join(packet)
3720
3721
    @staticmethod
3722
    def from_binary(data):
3723
        obj = ActivateSessionParameters()
3724
        obj.ClientSignature = SignatureData.from_binary(data)
3725 1
        length = uabin.Primitives.Int32.unpack(data)
3726
        array = []
3727
        if length != -1:
3728 1
            for _ in range(0, length):
3729
                array.append(SignedSoftwareCertificate.from_binary(data))
3730
        obj.ClientSoftwareCertificates = array
3731
        obj.LocaleIds = uabin.Primitives.String.unpack_array(data)
3732
        obj.UserIdentityToken = uabin.extensionobject_from_binary(data)
3733
        obj.UserTokenSignature = SignatureData.from_binary(data)
3734
        return obj
3735
3736
    def __str__(self):
3737
        return 'ActivateSessionParameters(' + 'ClientSignature:' + str(self.ClientSignature) + ', ' + \
3738
               'ClientSoftwareCertificates:' + str(self.ClientSoftwareCertificates) + ', ' + \
3739
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
3740 1
               'UserIdentityToken:' + str(self.UserIdentityToken) + ', ' + \
3741
               'UserTokenSignature:' + str(self.UserTokenSignature) + ')'
3742
3743
    __repr__ = __str__
3744
3745
3746 1
class ActivateSessionRequest(FrozenClass):
3747 1
    '''
3748
    Activates a session with the server.
3749
3750
    :ivar TypeId:
3751 1
    :vartype TypeId: NodeId
3752 1
    :ivar RequestHeader:
3753 1
    :vartype RequestHeader: RequestHeader
3754 1
    :ivar Parameters:
3755
    :vartype Parameters: ActivateSessionParameters
3756 1
    '''
3757 1
3758 1
    ua_types = [
3759 1
3760 1
        ('TypeId', 'NodeId'),
3761 1
        ('RequestHeader', 'RequestHeader'),
3762
        ('Parameters', 'ActivateSessionParameters'),
3763 1
               ]
3764
3765
    def __init__(self):
3766
        self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary)
3767 1
        self.RequestHeader = RequestHeader()
3768
        self.Parameters = ActivateSessionParameters()
3769
        self._freeze = True
3770
3771
    def to_binary(self):
3772 1
        packet = []
3773
        packet.append(self.TypeId.to_binary())
3774
        packet.append(self.RequestHeader.to_binary())
3775
        packet.append(self.Parameters.to_binary())
3776
        return b''.join(packet)
3777 1
3778
    @staticmethod
3779
    def from_binary(data):
3780 1
        obj = ActivateSessionRequest()
3781
        obj.TypeId = NodeId.from_binary(data)
3782
        obj.RequestHeader = RequestHeader.from_binary(data)
3783
        obj.Parameters = ActivateSessionParameters.from_binary(data)
3784
        return obj
3785
3786
    def __str__(self):
3787
        return 'ActivateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3788
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3789
               'Parameters:' + str(self.Parameters) + ')'
3790 1
3791
    __repr__ = __str__
3792
3793
3794 View Code Duplication
class ActivateSessionResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3795
    '''
3796 1
    :ivar ServerNonce:
3797 1
    :vartype ServerNonce: ByteString
3798 1
    :ivar Results:
3799 1
    :vartype Results: StatusCode
3800 1
    :ivar DiagnosticInfos:
3801 1
    :vartype DiagnosticInfos: DiagnosticInfo
3802 1
    '''
3803 1
3804 1
    ua_types = [
3805
3806 1
        ('ServerNonce', 'ByteString'),
3807 1
        ('Results', 'ListOfStatusCode'),
3808 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
3809 1
               ]
3810 1
3811
    def __init__(self):
3812 1
        self.ServerNonce = None
3813 1
        self.Results = []
3814
        self.DiagnosticInfos = []
3815 1
        self._freeze = True
3816
3817 1
    def to_binary(self):
3818
        packet = []
3819 1
        packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce))
3820
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
3821 1
        for fieldname in self.Results:
3822 1
            packet.append(fieldname.to_binary())
3823 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
3824 1
        for fieldname in self.DiagnosticInfos:
3825 1
            packet.append(fieldname.to_binary())
3826 1
        return b''.join(packet)
3827
3828 1
    @staticmethod
3829 1
    def from_binary(data):
3830 1
        obj = ActivateSessionResult()
3831 1
        self.ServerNonce = uabin.Primitives.ByteString.unpack(data)
3832 1
        length = uabin.Primitives.Int32.unpack(data)
3833
        array = []
3834 1
        if length != -1:
3835
            for _ in range(0, length):
3836 1
                array.append(StatusCode.from_binary(data))
3837
        obj.Results = array
3838
        length = uabin.Primitives.Int32.unpack(data)
3839
        array = []
3840
        if length != -1:
3841 1
            for _ in range(0, length):
3842
                array.append(DiagnosticInfo.from_binary(data))
3843
        obj.DiagnosticInfos = array
3844 1
        return obj
3845
3846
    def __str__(self):
3847
        return 'ActivateSessionResult(' + 'ServerNonce:' + str(self.ServerNonce) + ', ' + \
3848
               'Results:' + str(self.Results) + ', ' + \
3849
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
3850
3851
    __repr__ = __str__
3852
3853
3854
class ActivateSessionResponse(FrozenClass):
3855
    '''
3856 1
    Activates a session with the server.
3857
3858
    :ivar TypeId:
3859
    :vartype TypeId: NodeId
3860
    :ivar ResponseHeader:
3861
    :vartype ResponseHeader: ResponseHeader
3862 1
    :ivar Parameters:
3863 1
    :vartype Parameters: ActivateSessionResult
3864 1
    '''
3865 1
3866 1
    ua_types = [
3867 1
3868 1
        ('TypeId', 'NodeId'),
3869 1
        ('ResponseHeader', 'ResponseHeader'),
3870 1
        ('Parameters', 'ActivateSessionResult'),
3871
               ]
3872 1
3873 1
    def __init__(self):
3874 1
        self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary)
3875 1
        self.ResponseHeader = ResponseHeader()
3876 1
        self.Parameters = ActivateSessionResult()
3877 1
        self._freeze = True
3878
3879 1
    def to_binary(self):
3880
        packet = []
3881 1
        packet.append(self.TypeId.to_binary())
3882
        packet.append(self.ResponseHeader.to_binary())
3883 1
        packet.append(self.Parameters.to_binary())
3884 1
        return b''.join(packet)
3885 1
3886 1
    @staticmethod
3887
    def from_binary(data):
3888 1
        obj = ActivateSessionResponse()
3889
        obj.TypeId = NodeId.from_binary(data)
3890
        obj.ResponseHeader = ResponseHeader.from_binary(data)
3891
        obj.Parameters = ActivateSessionResult.from_binary(data)
3892
        return obj
3893 1
3894
    def __str__(self):
3895
        return 'ActivateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3896 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
3897
               'Parameters:' + str(self.Parameters) + ')'
3898
3899
    __repr__ = __str__
3900
3901
3902 View Code Duplication
class CloseSessionRequest(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3903
    '''
3904
    Closes a session with the server.
3905
3906
    :ivar TypeId:
3907
    :vartype TypeId: NodeId
3908 1
    :ivar RequestHeader:
3909
    :vartype RequestHeader: RequestHeader
3910
    :ivar DeleteSubscriptions:
3911
    :vartype DeleteSubscriptions: Boolean
3912
    '''
3913
3914 1
    ua_types = [
3915 1
3916
        ('TypeId', 'NodeId'),
3917
        ('RequestHeader', 'RequestHeader'),
3918
        ('DeleteSubscriptions', 'Boolean'),
3919 1
               ]
3920 1
3921 1
    def __init__(self):
3922 1
        self.TypeId = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary)
3923
        self.RequestHeader = RequestHeader()
3924 1
        self.DeleteSubscriptions = True
3925 1
        self._freeze = True
3926 1
3927 1
    def to_binary(self):
3928 1
        packet = []
3929 1
        packet.append(self.TypeId.to_binary())
3930
        packet.append(self.RequestHeader.to_binary())
3931 1
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteSubscriptions))
3932
        return b''.join(packet)
3933
3934
    @staticmethod
3935 1
    def from_binary(data):
3936
        obj = CloseSessionRequest()
3937
        obj.TypeId = NodeId.from_binary(data)
3938
        obj.RequestHeader = RequestHeader.from_binary(data)
3939
        self.DeleteSubscriptions = uabin.Primitives.Boolean.unpack(data)
3940 1
        return obj
3941
3942
    def __str__(self):
3943
        return 'CloseSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3944
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
3945 1
               'DeleteSubscriptions:' + str(self.DeleteSubscriptions) + ')'
3946
3947
    __repr__ = __str__
3948 1
3949
3950 View Code Duplication
class CloseSessionResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3951
    '''
3952
    Closes a session with the server.
3953
3954
    :ivar TypeId:
3955
    :vartype TypeId: NodeId
3956
    :ivar ResponseHeader:
3957
    :vartype ResponseHeader: ResponseHeader
3958 1
    '''
3959
3960
    ua_types = [
3961
3962
        ('TypeId', 'NodeId'),
3963 1
        ('ResponseHeader', 'ResponseHeader'),
3964 1
               ]
3965 1
3966 1
    def __init__(self):
3967 1
        self.TypeId = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary)
3968 1
        self.ResponseHeader = ResponseHeader()
3969 1
        self._freeze = True
3970 1
3971
    def to_binary(self):
3972 1
        packet = []
3973 1
        packet.append(self.TypeId.to_binary())
3974 1
        packet.append(self.ResponseHeader.to_binary())
3975 1
        return b''.join(packet)
3976 1
3977
    @staticmethod
3978 1
    def from_binary(data):
3979
        obj = CloseSessionResponse()
3980 1
        obj.TypeId = NodeId.from_binary(data)
3981
        obj.ResponseHeader = ResponseHeader.from_binary(data)
3982 1
        return obj
3983 1
3984 1
    def __str__(self):
3985
        return 'CloseSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
3986 1
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
3987
3988
    __repr__ = __str__
3989
3990 1
3991 View Code Duplication
class CancelParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
3992
    '''
3993 1
    :ivar RequestHandle:
3994
    :vartype RequestHandle: UInt32
3995
    '''
3996
3997
    ua_types = [
3998
3999 1
        ('RequestHandle', 'UInt32'),
4000
               ]
4001
4002
    def __init__(self):
4003 1
        self.RequestHandle = 0
4004
        self._freeze = True
4005
4006
    def to_binary(self):
4007
        packet = []
4008
        packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle))
4009
        return b''.join(packet)
4010
4011 1
    @staticmethod
4012
    def from_binary(data):
4013
        obj = CancelParameters()
4014
        self.RequestHandle = uabin.Primitives.UInt32.unpack(data)
4015
        return obj
4016 1
4017
    def __str__(self):
4018
        return 'CancelParameters(' + 'RequestHandle:' + str(self.RequestHandle) + ')'
4019
4020 1
    __repr__ = __str__
4021
4022
4023 1
class CancelRequest(FrozenClass):
4024
    '''
4025
    Cancels an outstanding request.
4026 1
4027
    :ivar TypeId:
4028
    :vartype TypeId: NodeId
4029 1
    :ivar RequestHeader:
4030
    :vartype RequestHeader: RequestHeader
4031
    :ivar Parameters:
4032
    :vartype Parameters: CancelParameters
4033
    '''
4034
4035
    ua_types = [
4036
4037
        ('TypeId', 'NodeId'),
4038
        ('RequestHeader', 'RequestHeader'),
4039
        ('Parameters', 'CancelParameters'),
4040
               ]
4041 1
4042
    def __init__(self):
4043
        self.TypeId = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary)
4044
        self.RequestHeader = RequestHeader()
4045
        self.Parameters = CancelParameters()
4046
        self._freeze = True
4047 1
4048
    def to_binary(self):
4049
        packet = []
4050
        packet.append(self.TypeId.to_binary())
4051
        packet.append(self.RequestHeader.to_binary())
4052
        packet.append(self.Parameters.to_binary())
4053
        return b''.join(packet)
4054
4055
    @staticmethod
4056
    def from_binary(data):
4057 1
        obj = CancelRequest()
4058
        obj.TypeId = NodeId.from_binary(data)
4059
        obj.RequestHeader = RequestHeader.from_binary(data)
4060
        obj.Parameters = CancelParameters.from_binary(data)
4061
        return obj
4062
4063
    def __str__(self):
4064 1
        return 'CancelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4065
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
4066
               'Parameters:' + str(self.Parameters) + ')'
4067
4068 1
    __repr__ = __str__
4069
4070
4071 View Code Duplication
class CancelResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4072
    '''
4073 1
    :ivar CancelCount:
4074
    :vartype CancelCount: UInt32
4075
    '''
4076
4077
    ua_types = [
4078 1
4079
        ('CancelCount', 'UInt32'),
4080
               ]
4081 1
4082
    def __init__(self):
4083
        self.CancelCount = 0
4084
        self._freeze = True
4085
4086
    def to_binary(self):
4087 1
        packet = []
4088
        packet.append(uabin.Primitives.UInt32.pack(self.CancelCount))
4089
        return b''.join(packet)
4090
4091 1
    @staticmethod
4092
    def from_binary(data):
4093
        obj = CancelResult()
4094
        self.CancelCount = uabin.Primitives.UInt32.unpack(data)
4095
        return obj
4096
4097
    def __str__(self):
4098
        return 'CancelResult(' + 'CancelCount:' + str(self.CancelCount) + ')'
4099 1
4100
    __repr__ = __str__
4101
4102
4103
class CancelResponse(FrozenClass):
4104 1
    '''
4105
    Cancels an outstanding request.
4106
4107
    :ivar TypeId:
4108 1
    :vartype TypeId: NodeId
4109
    :ivar ResponseHeader:
4110
    :vartype ResponseHeader: ResponseHeader
4111 1
    :ivar Parameters:
4112
    :vartype Parameters: CancelResult
4113
    '''
4114 1
4115
    ua_types = [
4116
4117 1
        ('TypeId', 'NodeId'),
4118
        ('ResponseHeader', 'ResponseHeader'),
4119
        ('Parameters', 'CancelResult'),
4120
               ]
4121
4122
    def __init__(self):
4123
        self.TypeId = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary)
4124
        self.ResponseHeader = ResponseHeader()
4125
        self.Parameters = CancelResult()
4126
        self._freeze = True
4127
4128
    def to_binary(self):
4129 1
        packet = []
4130
        packet.append(self.TypeId.to_binary())
4131
        packet.append(self.ResponseHeader.to_binary())
4132
        packet.append(self.Parameters.to_binary())
4133
        return b''.join(packet)
4134
4135 1
    @staticmethod
4136
    def from_binary(data):
4137
        obj = CancelResponse()
4138
        obj.TypeId = NodeId.from_binary(data)
4139
        obj.ResponseHeader = ResponseHeader.from_binary(data)
4140
        obj.Parameters = CancelResult.from_binary(data)
4141
        return obj
4142
4143
    def __str__(self):
4144
        return 'CancelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4145 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
4146
               'Parameters:' + str(self.Parameters) + ')'
4147
4148
    __repr__ = __str__
4149
4150
4151 View Code Duplication
class NodeAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4152 1
    '''
4153
    The base attributes for all nodes.
4154
4155
    :ivar SpecifiedAttributes:
4156 1
    :vartype SpecifiedAttributes: UInt32
4157
    :ivar DisplayName:
4158
    :vartype DisplayName: LocalizedText
4159
    :ivar Description:
4160
    :vartype Description: LocalizedText
4161 1
    :ivar WriteMask:
4162
    :vartype WriteMask: UInt32
4163
    :ivar UserWriteMask:
4164
    :vartype UserWriteMask: UInt32
4165
    '''
4166 1
4167
    ua_types = [
4168
4169 1
        ('SpecifiedAttributes', 'UInt32'),
4170
        ('DisplayName', 'LocalizedText'),
4171
        ('Description', 'LocalizedText'),
4172
        ('WriteMask', 'UInt32'),
4173
        ('UserWriteMask', 'UInt32'),
4174
               ]
4175
4176
    def __init__(self):
4177
        self.SpecifiedAttributes = 0
4178
        self.DisplayName = LocalizedText()
4179
        self.Description = LocalizedText()
4180
        self.WriteMask = 0
4181
        self.UserWriteMask = 0
4182
        self._freeze = True
4183
4184
    def to_binary(self):
4185 1
        packet = []
4186
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4187
        packet.append(self.DisplayName.to_binary())
4188
        packet.append(self.Description.to_binary())
4189
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4190
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4191
        return b''.join(packet)
4192
4193 1
    @staticmethod
4194
    def from_binary(data):
4195
        obj = NodeAttributes()
4196
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4197
        obj.DisplayName = LocalizedText.from_binary(data)
4198
        obj.Description = LocalizedText.from_binary(data)
4199
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4200
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4201
        return obj
4202
4203
    def __str__(self):
4204
        return 'NodeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4205 1
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4206
               'Description:' + str(self.Description) + ', ' + \
4207
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4208
               'UserWriteMask:' + str(self.UserWriteMask) + ')'
4209
4210
    __repr__ = __str__
4211
4212
4213 View Code Duplication
class ObjectAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4214 1
    '''
4215
    The attributes for an object node.
4216
4217
    :ivar SpecifiedAttributes:
4218 1
    :vartype SpecifiedAttributes: UInt32
4219
    :ivar DisplayName:
4220
    :vartype DisplayName: LocalizedText
4221
    :ivar Description:
4222
    :vartype Description: LocalizedText
4223
    :ivar WriteMask:
4224
    :vartype WriteMask: UInt32
4225 1
    :ivar UserWriteMask:
4226
    :vartype UserWriteMask: UInt32
4227
    :ivar EventNotifier:
4228
    :vartype EventNotifier: Byte
4229
    '''
4230
4231
    ua_types = [
4232 1
4233
        ('SpecifiedAttributes', 'UInt32'),
4234
        ('DisplayName', 'LocalizedText'),
4235 1
        ('Description', 'LocalizedText'),
4236
        ('WriteMask', 'UInt32'),
4237
        ('UserWriteMask', 'UInt32'),
4238
        ('EventNotifier', 'Byte'),
4239
               ]
4240
4241
    def __init__(self):
4242
        self.SpecifiedAttributes = 0
4243
        self.DisplayName = LocalizedText()
4244
        self.Description = LocalizedText()
4245
        self.WriteMask = 0
4246
        self.UserWriteMask = 0
4247
        self.EventNotifier = 0
4248
        self._freeze = True
4249
4250
    def to_binary(self):
4251
        packet = []
4252
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4253 1
        packet.append(self.DisplayName.to_binary())
4254
        packet.append(self.Description.to_binary())
4255
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4256
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4257
        packet.append(uabin.Primitives.Byte.pack(self.EventNotifier))
4258
        return b''.join(packet)
4259
4260
    @staticmethod
4261
    def from_binary(data):
4262 1
        obj = ObjectAttributes()
4263 1
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4264 1
        obj.DisplayName = LocalizedText.from_binary(data)
4265 1
        obj.Description = LocalizedText.from_binary(data)
4266 1
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4267 1
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4268 1
        self.EventNotifier = uabin.Primitives.Byte.unpack(data)
4269 1
        return obj
4270 1
4271 1
    def __str__(self):
4272 1
        return 'ObjectAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4273 1
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4274
               'Description:' + str(self.Description) + ', ' + \
4275 1
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4276 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4277 1
               'EventNotifier:' + str(self.EventNotifier) + ')'
4278 1
4279 1
    __repr__ = __str__
4280 1
4281 1
4282 1
class VariableAttributes(FrozenClass):
4283 1
    '''
4284
    The attributes for a variable node.
4285 1
4286
    :ivar SpecifiedAttributes:
4287 1
    :vartype SpecifiedAttributes: UInt32
4288
    :ivar DisplayName:
4289 1
    :vartype DisplayName: LocalizedText
4290 1
    :ivar Description:
4291 1
    :vartype Description: LocalizedText
4292 1
    :ivar WriteMask:
4293 1
    :vartype WriteMask: UInt32
4294 1
    :ivar UserWriteMask:
4295 1
    :vartype UserWriteMask: UInt32
4296
    :ivar Value:
4297 1
    :vartype Value: Variant
4298
    :ivar DataType:
4299
    :vartype DataType: NodeId
4300
    :ivar ValueRank:
4301
    :vartype ValueRank: Int32
4302
    :ivar ArrayDimensions:
4303
    :vartype ArrayDimensions: UInt32
4304
    :ivar AccessLevel:
4305 1
    :vartype AccessLevel: Byte
4306
    :ivar UserAccessLevel:
4307
    :vartype UserAccessLevel: Byte
4308 1
    :ivar MinimumSamplingInterval:
4309
    :vartype MinimumSamplingInterval: Double
4310
    :ivar Historizing:
4311
    :vartype Historizing: Boolean
4312
    '''
4313
4314
    ua_types = [
4315
4316
        ('SpecifiedAttributes', 'UInt32'),
4317
        ('DisplayName', 'LocalizedText'),
4318
        ('Description', 'LocalizedText'),
4319
        ('WriteMask', 'UInt32'),
4320
        ('UserWriteMask', 'UInt32'),
4321
        ('Value', 'Variant'),
4322
        ('DataType', 'NodeId'),
4323
        ('ValueRank', 'Int32'),
4324
        ('ArrayDimensions', 'ListOfUInt32'),
4325
        ('AccessLevel', 'Byte'),
4326
        ('UserAccessLevel', 'Byte'),
4327
        ('MinimumSamplingInterval', 'Double'),
4328
        ('Historizing', 'Boolean'),
4329
               ]
4330
4331
    def __init__(self):
4332
        self.SpecifiedAttributes = 0
4333
        self.DisplayName = LocalizedText()
4334
        self.Description = LocalizedText()
4335
        self.WriteMask = 0
4336
        self.UserWriteMask = 0
4337
        self.Value = Variant()
4338
        self.DataType = NodeId()
4339
        self.ValueRank = 0
4340 1
        self.ArrayDimensions = []
4341
        self.AccessLevel = 0
4342
        self.UserAccessLevel = 0
4343
        self.MinimumSamplingInterval = 0
4344
        self.Historizing = True
4345
        self._freeze = True
4346
4347
    def to_binary(self):
4348
        packet = []
4349
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4350
        packet.append(self.DisplayName.to_binary())
4351
        packet.append(self.Description.to_binary())
4352
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4353
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4354
        packet.append(self.Value.to_binary())
4355
        packet.append(self.DataType.to_binary())
4356 1
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
4357 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
4358 1
        for fieldname in self.ArrayDimensions:
4359 1
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
4360 1
        packet.append(uabin.Primitives.Byte.pack(self.AccessLevel))
4361 1
        packet.append(uabin.Primitives.Byte.pack(self.UserAccessLevel))
4362 1
        packet.append(uabin.Primitives.Double.pack(self.MinimumSamplingInterval))
4363 1
        packet.append(uabin.Primitives.Boolean.pack(self.Historizing))
4364 1
        return b''.join(packet)
4365 1
4366 1
    @staticmethod
4367 1
    def from_binary(data):
4368 1
        obj = VariableAttributes()
4369 1
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4370 1
        obj.DisplayName = LocalizedText.from_binary(data)
4371 1
        obj.Description = LocalizedText.from_binary(data)
4372 1
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4373 1
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4374 1
        obj.Value = Variant.from_binary(data)
4375
        obj.DataType = NodeId.from_binary(data)
4376 1
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
4377 1
        obj.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
4378 1
        self.AccessLevel = uabin.Primitives.Byte.unpack(data)
4379 1
        self.UserAccessLevel = uabin.Primitives.Byte.unpack(data)
4380 1
        self.MinimumSamplingInterval = uabin.Primitives.Double.unpack(data)
4381 1
        self.Historizing = uabin.Primitives.Boolean.unpack(data)
4382 1
        return obj
4383 1
4384 1
    def __str__(self):
4385 1
        return 'VariableAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4386 1
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4387 1
               'Description:' + str(self.Description) + ', ' + \
4388 1
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4389 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4390 1
               'Value:' + str(self.Value) + ', ' + \
4391 1
               'DataType:' + str(self.DataType) + ', ' + \
4392 1
               'ValueRank:' + str(self.ValueRank) + ', ' + \
4393 1
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
4394
               'AccessLevel:' + str(self.AccessLevel) + ', ' + \
4395 1
               'UserAccessLevel:' + str(self.UserAccessLevel) + ', ' + \
4396
               'MinimumSamplingInterval:' + str(self.MinimumSamplingInterval) + ', ' + \
4397 1
               'Historizing:' + str(self.Historizing) + ')'
4398
4399 1
    __repr__ = __str__
4400 1
4401 1
4402 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...
4403 1
    '''
4404 1
    The attributes for a method node.
4405 1
4406 1
    :ivar SpecifiedAttributes:
4407 1
    :vartype SpecifiedAttributes: UInt32
4408 1
    :ivar DisplayName:
4409 1
    :vartype DisplayName: LocalizedText
4410 1
    :ivar Description:
4411 1
    :vartype Description: LocalizedText
4412 1
    :ivar WriteMask:
4413
    :vartype WriteMask: UInt32
4414 1
    :ivar UserWriteMask:
4415
    :vartype UserWriteMask: UInt32
4416
    :ivar Executable:
4417
    :vartype Executable: Boolean
4418
    :ivar UserExecutable:
4419
    :vartype UserExecutable: Boolean
4420
    '''
4421
4422
    ua_types = [
4423
4424
        ('SpecifiedAttributes', 'UInt32'),
4425
        ('DisplayName', 'LocalizedText'),
4426
        ('Description', 'LocalizedText'),
4427
        ('WriteMask', 'UInt32'),
4428
        ('UserWriteMask', 'UInt32'),
4429 1
        ('Executable', 'Boolean'),
4430
        ('UserExecutable', 'Boolean'),
4431
               ]
4432 1
4433
    def __init__(self):
4434
        self.SpecifiedAttributes = 0
4435
        self.DisplayName = LocalizedText()
4436
        self.Description = LocalizedText()
4437
        self.WriteMask = 0
4438
        self.UserWriteMask = 0
4439
        self.Executable = True
4440
        self.UserExecutable = True
4441
        self._freeze = True
4442
4443
    def to_binary(self):
4444
        packet = []
4445
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4446
        packet.append(self.DisplayName.to_binary())
4447
        packet.append(self.Description.to_binary())
4448
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4449
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4450
        packet.append(uabin.Primitives.Boolean.pack(self.Executable))
4451
        packet.append(uabin.Primitives.Boolean.pack(self.UserExecutable))
4452 1
        return b''.join(packet)
4453
4454
    @staticmethod
4455
    def from_binary(data):
4456
        obj = MethodAttributes()
4457
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4458
        obj.DisplayName = LocalizedText.from_binary(data)
4459
        obj.Description = LocalizedText.from_binary(data)
4460
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4461
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4462 1
        self.Executable = uabin.Primitives.Boolean.unpack(data)
4463 1
        self.UserExecutable = uabin.Primitives.Boolean.unpack(data)
4464 1
        return obj
4465 1
4466 1
    def __str__(self):
4467 1
        return 'MethodAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4468 1
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4469 1
               'Description:' + str(self.Description) + ', ' + \
4470 1
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4471 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4472 1
               'Executable:' + str(self.Executable) + ', ' + \
4473 1
               'UserExecutable:' + str(self.UserExecutable) + ')'
4474 1
4475
    __repr__ = __str__
4476 1
4477 1
4478 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...
4479 1
    '''
4480 1
    The attributes for an object type node.
4481 1
4482 1
    :ivar SpecifiedAttributes:
4483 1
    :vartype SpecifiedAttributes: UInt32
4484 1
    :ivar DisplayName:
4485 1
    :vartype DisplayName: LocalizedText
4486
    :ivar Description:
4487 1
    :vartype Description: LocalizedText
4488
    :ivar WriteMask:
4489 1
    :vartype WriteMask: UInt32
4490
    :ivar UserWriteMask:
4491 1
    :vartype UserWriteMask: UInt32
4492 1
    :ivar IsAbstract:
4493 1
    :vartype IsAbstract: Boolean
4494 1
    '''
4495 1
4496 1
    ua_types = [
4497 1
4498 1
        ('SpecifiedAttributes', 'UInt32'),
4499
        ('DisplayName', 'LocalizedText'),
4500 1
        ('Description', 'LocalizedText'),
4501
        ('WriteMask', 'UInt32'),
4502
        ('UserWriteMask', 'UInt32'),
4503
        ('IsAbstract', 'Boolean'),
4504
               ]
4505
4506
    def __init__(self):
4507
        self.SpecifiedAttributes = 0
4508
        self.DisplayName = LocalizedText()
4509 1
        self.Description = LocalizedText()
4510
        self.WriteMask = 0
4511
        self.UserWriteMask = 0
4512 1
        self.IsAbstract = True
4513
        self._freeze = True
4514
4515
    def to_binary(self):
4516
        packet = []
4517
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4518
        packet.append(self.DisplayName.to_binary())
4519
        packet.append(self.Description.to_binary())
4520
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4521
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4522
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4523
        return b''.join(packet)
4524
4525
    @staticmethod
4526
    def from_binary(data):
4527
        obj = ObjectTypeAttributes()
4528
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4529
        obj.DisplayName = LocalizedText.from_binary(data)
4530 1
        obj.Description = LocalizedText.from_binary(data)
4531
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4532
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4533
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4534
        return obj
4535
4536
    def __str__(self):
4537
        return 'ObjectTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4538
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4539 1
               'Description:' + str(self.Description) + ', ' + \
4540 1
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4541 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4542 1
               'IsAbstract:' + str(self.IsAbstract) + ')'
4543 1
4544 1
    __repr__ = __str__
4545 1
4546 1
4547 1
class VariableTypeAttributes(FrozenClass):
4548 1
    '''
4549 1
    The attributes for a variable type node.
4550 1
4551
    :ivar SpecifiedAttributes:
4552 1
    :vartype SpecifiedAttributes: UInt32
4553 1
    :ivar DisplayName:
4554 1
    :vartype DisplayName: LocalizedText
4555 1
    :ivar Description:
4556 1
    :vartype Description: LocalizedText
4557 1
    :ivar WriteMask:
4558 1
    :vartype WriteMask: UInt32
4559 1
    :ivar UserWriteMask:
4560 1
    :vartype UserWriteMask: UInt32
4561
    :ivar Value:
4562 1
    :vartype Value: Variant
4563
    :ivar DataType:
4564 1
    :vartype DataType: NodeId
4565
    :ivar ValueRank:
4566 1
    :vartype ValueRank: Int32
4567 1
    :ivar ArrayDimensions:
4568 1
    :vartype ArrayDimensions: UInt32
4569 1
    :ivar IsAbstract:
4570 1
    :vartype IsAbstract: Boolean
4571 1
    '''
4572 1
4573
    ua_types = [
4574 1
4575
        ('SpecifiedAttributes', 'UInt32'),
4576
        ('DisplayName', 'LocalizedText'),
4577
        ('Description', 'LocalizedText'),
4578
        ('WriteMask', 'UInt32'),
4579
        ('UserWriteMask', 'UInt32'),
4580
        ('Value', 'Variant'),
4581
        ('DataType', 'NodeId'),
4582 1
        ('ValueRank', 'Int32'),
4583
        ('ArrayDimensions', 'ListOfUInt32'),
4584
        ('IsAbstract', 'Boolean'),
4585 1
               ]
4586
4587
    def __init__(self):
4588
        self.SpecifiedAttributes = 0
4589
        self.DisplayName = LocalizedText()
4590
        self.Description = LocalizedText()
4591
        self.WriteMask = 0
4592
        self.UserWriteMask = 0
4593
        self.Value = Variant()
4594
        self.DataType = NodeId()
4595
        self.ValueRank = 0
4596
        self.ArrayDimensions = []
4597
        self.IsAbstract = True
4598
        self._freeze = True
4599
4600
    def to_binary(self):
4601
        packet = []
4602
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4603
        packet.append(self.DisplayName.to_binary())
4604
        packet.append(self.Description.to_binary())
4605
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4606
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4607
        packet.append(self.Value.to_binary())
4608
        packet.append(self.DataType.to_binary())
4609
        packet.append(uabin.Primitives.Int32.pack(self.ValueRank))
4610
        packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions)))
4611 1
        for fieldname in self.ArrayDimensions:
4612
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
4613
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4614
        return b''.join(packet)
4615
4616
    @staticmethod
4617
    def from_binary(data):
4618
        obj = VariableTypeAttributes()
4619
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4620
        obj.DisplayName = LocalizedText.from_binary(data)
4621
        obj.Description = LocalizedText.from_binary(data)
4622
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4623
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4624 1
        obj.Value = Variant.from_binary(data)
4625 1
        obj.DataType = NodeId.from_binary(data)
4626
        self.ValueRank = uabin.Primitives.Int32.unpack(data)
4627
        obj.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data)
4628
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4629 1
        return obj
4630 1
4631 1
    def __str__(self):
4632 1
        return 'VariableTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4633 1
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4634 1
               'Description:' + str(self.Description) + ', ' + \
4635 1
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4636 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4637 1
               'Value:' + str(self.Value) + ', ' + \
4638 1
               'DataType:' + str(self.DataType) + ', ' + \
4639 1
               'ValueRank:' + str(self.ValueRank) + ', ' + \
4640
               'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \
4641 1
               'IsAbstract:' + str(self.IsAbstract) + ')'
4642
4643
    __repr__ = __str__
4644
4645
4646
class ReferenceTypeAttributes(FrozenClass):
4647
    '''
4648
    The attributes for a reference type node.
4649
4650
    :ivar SpecifiedAttributes:
4651
    :vartype SpecifiedAttributes: UInt32
4652
    :ivar DisplayName:
4653
    :vartype DisplayName: LocalizedText
4654
    :ivar Description:
4655
    :vartype Description: LocalizedText
4656
    :ivar WriteMask:
4657 1
    :vartype WriteMask: UInt32
4658
    :ivar UserWriteMask:
4659
    :vartype UserWriteMask: UInt32
4660
    :ivar IsAbstract:
4661 1
    :vartype IsAbstract: Boolean
4662
    :ivar Symmetric:
4663
    :vartype Symmetric: Boolean
4664
    :ivar InverseName:
4665
    :vartype InverseName: LocalizedText
4666
    '''
4667
4668
    ua_types = [
4669
4670
        ('SpecifiedAttributes', 'UInt32'),
4671
        ('DisplayName', 'LocalizedText'),
4672
        ('Description', 'LocalizedText'),
4673 1
        ('WriteMask', 'UInt32'),
4674
        ('UserWriteMask', 'UInt32'),
4675
        ('IsAbstract', 'Boolean'),
4676
        ('Symmetric', 'Boolean'),
4677
        ('InverseName', 'LocalizedText'),
4678
               ]
4679
4680
    def __init__(self):
4681
        self.SpecifiedAttributes = 0
4682
        self.DisplayName = LocalizedText()
4683
        self.Description = LocalizedText()
4684
        self.WriteMask = 0
4685 1
        self.UserWriteMask = 0
4686
        self.IsAbstract = True
4687
        self.Symmetric = True
4688 1
        self.InverseName = LocalizedText()
4689
        self._freeze = True
4690
4691
    def to_binary(self):
4692
        packet = []
4693
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4694
        packet.append(self.DisplayName.to_binary())
4695
        packet.append(self.Description.to_binary())
4696
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4697
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4698
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4699
        packet.append(uabin.Primitives.Boolean.pack(self.Symmetric))
4700
        packet.append(self.InverseName.to_binary())
4701
        return b''.join(packet)
4702
4703
    @staticmethod
4704
    def from_binary(data):
4705
        obj = ReferenceTypeAttributes()
4706
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4707
        obj.DisplayName = LocalizedText.from_binary(data)
4708
        obj.Description = LocalizedText.from_binary(data)
4709
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4710 1
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4711
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4712
        self.Symmetric = uabin.Primitives.Boolean.unpack(data)
4713
        obj.InverseName = LocalizedText.from_binary(data)
4714
        return obj
4715
4716
    def __str__(self):
4717
        return 'ReferenceTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4718
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4719
               'Description:' + str(self.Description) + ', ' + \
4720
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4721 1
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4722 1
               'IsAbstract:' + str(self.IsAbstract) + ', ' + \
4723
               'Symmetric:' + str(self.Symmetric) + ', ' + \
4724
               'InverseName:' + str(self.InverseName) + ')'
4725
4726 1
    __repr__ = __str__
4727 1
4728 1
4729 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...
4730 1
    '''
4731 1
    The attributes for a data type node.
4732 1
4733 1
    :ivar SpecifiedAttributes:
4734 1
    :vartype SpecifiedAttributes: UInt32
4735
    :ivar DisplayName:
4736 1
    :vartype DisplayName: LocalizedText
4737
    :ivar Description:
4738
    :vartype Description: LocalizedText
4739
    :ivar WriteMask:
4740
    :vartype WriteMask: UInt32
4741
    :ivar UserWriteMask:
4742
    :vartype UserWriteMask: UInt32
4743
    :ivar IsAbstract:
4744
    :vartype IsAbstract: Boolean
4745
    '''
4746
4747
    ua_types = [
4748 1
4749
        ('SpecifiedAttributes', 'UInt32'),
4750
        ('DisplayName', 'LocalizedText'),
4751
        ('Description', 'LocalizedText'),
4752 1
        ('WriteMask', 'UInt32'),
4753
        ('UserWriteMask', 'UInt32'),
4754
        ('IsAbstract', 'Boolean'),
4755
               ]
4756
4757
    def __init__(self):
4758
        self.SpecifiedAttributes = 0
4759
        self.DisplayName = LocalizedText()
4760
        self.Description = LocalizedText()
4761
        self.WriteMask = 0
4762 1
        self.UserWriteMask = 0
4763
        self.IsAbstract = True
4764
        self._freeze = True
4765
4766
    def to_binary(self):
4767
        packet = []
4768
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4769
        packet.append(self.DisplayName.to_binary())
4770
        packet.append(self.Description.to_binary())
4771
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4772 1
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4773
        packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract))
4774
        return b''.join(packet)
4775 1
4776
    @staticmethod
4777
    def from_binary(data):
4778
        obj = DataTypeAttributes()
4779
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4780
        obj.DisplayName = LocalizedText.from_binary(data)
4781
        obj.Description = LocalizedText.from_binary(data)
4782
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4783
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4784
        self.IsAbstract = uabin.Primitives.Boolean.unpack(data)
4785
        return obj
4786
4787
    def __str__(self):
4788
        return 'DataTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4789
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4790
               'Description:' + str(self.Description) + ', ' + \
4791
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4792
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4793 1
               'IsAbstract:' + str(self.IsAbstract) + ')'
4794
4795
    __repr__ = __str__
4796
4797
4798 View Code Duplication
class ViewAttributes(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4799
    '''
4800
    The attributes for a view node.
4801
4802 1
    :ivar SpecifiedAttributes:
4803 1
    :vartype SpecifiedAttributes: UInt32
4804 1
    :ivar DisplayName:
4805 1
    :vartype DisplayName: LocalizedText
4806 1
    :ivar Description:
4807 1
    :vartype Description: LocalizedText
4808 1
    :ivar WriteMask:
4809 1
    :vartype WriteMask: UInt32
4810 1
    :ivar UserWriteMask:
4811 1
    :vartype UserWriteMask: UInt32
4812 1
    :ivar ContainsNoLoops:
4813 1
    :vartype ContainsNoLoops: Boolean
4814
    :ivar EventNotifier:
4815 1
    :vartype EventNotifier: Byte
4816 1
    '''
4817 1
4818 1
    ua_types = [
4819 1
4820 1
        ('SpecifiedAttributes', 'UInt32'),
4821 1
        ('DisplayName', 'LocalizedText'),
4822 1
        ('Description', 'LocalizedText'),
4823 1
        ('WriteMask', 'UInt32'),
4824
        ('UserWriteMask', 'UInt32'),
4825 1
        ('ContainsNoLoops', 'Boolean'),
4826
        ('EventNotifier', 'Byte'),
4827 1
               ]
4828
4829 1
    def __init__(self):
4830 1
        self.SpecifiedAttributes = 0
4831 1
        self.DisplayName = LocalizedText()
4832 1
        self.Description = LocalizedText()
4833 1
        self.WriteMask = 0
4834 1
        self.UserWriteMask = 0
4835 1
        self.ContainsNoLoops = True
4836
        self.EventNotifier = 0
4837 1
        self._freeze = True
4838
4839
    def to_binary(self):
4840
        packet = []
4841
        packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes))
4842
        packet.append(self.DisplayName.to_binary())
4843
        packet.append(self.Description.to_binary())
4844
        packet.append(uabin.Primitives.UInt32.pack(self.WriteMask))
4845 1
        packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask))
4846
        packet.append(uabin.Primitives.Boolean.pack(self.ContainsNoLoops))
4847
        packet.append(uabin.Primitives.Byte.pack(self.EventNotifier))
4848 1
        return b''.join(packet)
4849
4850
    @staticmethod
4851
    def from_binary(data):
4852
        obj = ViewAttributes()
4853
        self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data)
4854
        obj.DisplayName = LocalizedText.from_binary(data)
4855
        obj.Description = LocalizedText.from_binary(data)
4856
        self.WriteMask = uabin.Primitives.UInt32.unpack(data)
4857
        self.UserWriteMask = uabin.Primitives.UInt32.unpack(data)
4858
        self.ContainsNoLoops = uabin.Primitives.Boolean.unpack(data)
4859
        self.EventNotifier = uabin.Primitives.Byte.unpack(data)
4860
        return obj
4861
4862
    def __str__(self):
4863
        return 'ViewAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
4864
               'DisplayName:' + str(self.DisplayName) + ', ' + \
4865
               'Description:' + str(self.Description) + ', ' + \
4866
               'WriteMask:' + str(self.WriteMask) + ', ' + \
4867
               'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \
4868 1
               'ContainsNoLoops:' + str(self.ContainsNoLoops) + ', ' + \
4869
               'EventNotifier:' + str(self.EventNotifier) + ')'
4870
4871
    __repr__ = __str__
4872
4873
4874 View Code Duplication
class AddNodesItem(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4875
    '''
4876
    A request to add a node to the server address space.
4877
4878 1
    :ivar ParentNodeId:
4879
    :vartype ParentNodeId: ExpandedNodeId
4880
    :ivar ReferenceTypeId:
4881
    :vartype ReferenceTypeId: NodeId
4882
    :ivar RequestedNewNodeId:
4883
    :vartype RequestedNewNodeId: ExpandedNodeId
4884
    :ivar BrowseName:
4885
    :vartype BrowseName: QualifiedName
4886
    :ivar NodeClass:
4887
    :vartype NodeClass: NodeClass
4888
    :ivar NodeAttributes:
4889
    :vartype NodeAttributes: ExtensionObject
4890
    :ivar TypeDefinition:
4891
    :vartype TypeDefinition: ExpandedNodeId
4892 1
    '''
4893
4894
    ua_types = [
4895
4896
        ('ParentNodeId', 'ExpandedNodeId'),
4897
        ('ReferenceTypeId', 'NodeId'),
4898
        ('RequestedNewNodeId', 'ExpandedNodeId'),
4899
        ('BrowseName', 'QualifiedName'),
4900
        ('NodeClass', 'NodeClass'),
4901
        ('NodeAttributes', 'ExtensionObject'),
4902
        ('TypeDefinition', 'ExpandedNodeId'),
4903 1
               ]
4904
4905
    def __init__(self):
4906
        self.ParentNodeId = ExpandedNodeId()
4907 1
        self.ReferenceTypeId = NodeId()
4908
        self.RequestedNewNodeId = ExpandedNodeId()
4909
        self.BrowseName = QualifiedName()
4910
        self.NodeClass = NodeClass(0)
4911
        self.NodeAttributes = ExtensionObject()
4912
        self.TypeDefinition = ExpandedNodeId()
4913
        self._freeze = True
4914
4915
    def to_binary(self):
4916 1
        packet = []
4917
        packet.append(self.ParentNodeId.to_binary())
4918
        packet.append(self.ReferenceTypeId.to_binary())
4919
        packet.append(self.RequestedNewNodeId.to_binary())
4920
        packet.append(self.BrowseName.to_binary())
4921
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value))
4922
        packet.append(uabin.extensionobject_to_binary(self.NodeAttributes))
4923
        packet.append(self.TypeDefinition.to_binary())
4924
        return b''.join(packet)
4925 1
4926
    @staticmethod
4927
    def from_binary(data):
4928 1
        obj = AddNodesItem()
4929
        obj.ParentNodeId = ExpandedNodeId.from_binary(data)
4930
        obj.ReferenceTypeId = NodeId.from_binary(data)
4931
        obj.RequestedNewNodeId = ExpandedNodeId.from_binary(data)
4932
        obj.BrowseName = QualifiedName.from_binary(data)
4933
        self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
4934
        obj.NodeAttributes = uabin.extensionobject_from_binary(data)
4935
        obj.TypeDefinition = ExpandedNodeId.from_binary(data)
4936
        return obj
4937
4938
    def __str__(self):
4939
        return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \
4940
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
4941
               'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \
4942
               'BrowseName:' + str(self.BrowseName) + ', ' + \
4943
               'NodeClass:' + str(self.NodeClass) + ', ' + \
4944
               'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \
4945
               'TypeDefinition:' + str(self.TypeDefinition) + ')'
4946
4947
    __repr__ = __str__
4948 1
4949
4950 View Code Duplication
class AddNodesResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4951
    '''
4952
    A result of an add node operation.
4953
4954
    :ivar StatusCode:
4955
    :vartype StatusCode: StatusCode
4956
    :ivar AddedNodeId:
4957
    :vartype AddedNodeId: NodeId
4958 1
    '''
4959 1
4960 1
    ua_types = [
4961 1
4962 1
        ('StatusCode', 'StatusCode'),
4963 1
        ('AddedNodeId', 'NodeId'),
4964 1
               ]
4965 1
4966 1
    def __init__(self):
4967 1
        self.StatusCode = StatusCode()
4968 1
        self.AddedNodeId = NodeId()
4969 1
        self._freeze = True
4970 1
4971
    def to_binary(self):
4972 1
        packet = []
4973 1
        packet.append(self.StatusCode.to_binary())
4974 1
        packet.append(self.AddedNodeId.to_binary())
4975 1
        return b''.join(packet)
4976 1
4977 1
    @staticmethod
4978 1
    def from_binary(data):
4979 1
        obj = AddNodesResult()
4980 1
        obj.StatusCode = StatusCode.from_binary(data)
4981 1
        obj.AddedNodeId = NodeId.from_binary(data)
4982
        return obj
4983 1
4984
    def __str__(self):
4985 1
        return 'AddNodesResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
4986
               'AddedNodeId:' + str(self.AddedNodeId) + ')'
4987 1
4988 1
    __repr__ = __str__
4989 1
4990 1
4991 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...
4992 1
    '''
4993 1
    :ivar NodesToAdd:
4994 1
    :vartype NodesToAdd: AddNodesItem
4995
    '''
4996 1
4997
    ua_types = [
4998
4999
        ('NodesToAdd', 'ListOfAddNodesItem'),
5000
               ]
5001
5002
    def __init__(self):
5003
        self.NodesToAdd = []
5004
        self._freeze = True
5005 1
5006
    def to_binary(self):
5007
        packet = []
5008 1
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToAdd)))
5009
        for fieldname in self.NodesToAdd:
5010
            packet.append(fieldname.to_binary())
5011
        return b''.join(packet)
5012
5013
    @staticmethod
5014
    def from_binary(data):
5015
        obj = AddNodesParameters()
5016
        length = uabin.Primitives.Int32.unpack(data)
5017
        array = []
5018 1
        if length != -1:
5019
            for _ in range(0, length):
5020
                array.append(AddNodesItem.from_binary(data))
5021
        obj.NodesToAdd = array
5022
        return obj
5023 1
5024 1
    def __str__(self):
5025 1
        return 'AddNodesParameters(' + 'NodesToAdd:' + str(self.NodesToAdd) + ')'
5026 1
5027 1
    __repr__ = __str__
5028 1
5029 1
5030 1
class AddNodesRequest(FrozenClass):
5031
    '''
5032 1
    Adds one or more nodes to the server address space.
5033 1
5034 1
    :ivar TypeId:
5035 1
    :vartype TypeId: NodeId
5036 1
    :ivar RequestHeader:
5037
    :vartype RequestHeader: RequestHeader
5038 1
    :ivar Parameters:
5039
    :vartype Parameters: AddNodesParameters
5040 1
    '''
5041
5042 1
    ua_types = [
5043 1
5044 1
        ('TypeId', 'NodeId'),
5045
        ('RequestHeader', 'RequestHeader'),
5046 1
        ('Parameters', 'AddNodesParameters'),
5047
               ]
5048
5049
    def __init__(self):
5050 1
        self.TypeId = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary)
5051
        self.RequestHeader = RequestHeader()
5052
        self.Parameters = AddNodesParameters()
5053 1
        self._freeze = True
5054
5055
    def to_binary(self):
5056
        packet = []
5057
        packet.append(self.TypeId.to_binary())
5058
        packet.append(self.RequestHeader.to_binary())
5059 1
        packet.append(self.Parameters.to_binary())
5060
        return b''.join(packet)
5061
5062
    @staticmethod
5063 1
    def from_binary(data):
5064 1
        obj = AddNodesRequest()
5065 1
        obj.TypeId = NodeId.from_binary(data)
5066 1
        obj.RequestHeader = RequestHeader.from_binary(data)
5067 1
        obj.Parameters = AddNodesParameters.from_binary(data)
5068 1
        return obj
5069 1
5070
    def __str__(self):
5071 1
        return 'AddNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5072 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5073 1
               'Parameters:' + str(self.Parameters) + ')'
5074 1
5075 1
    __repr__ = __str__
5076 1
5077
5078 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...
5079
    '''
5080 1
    Adds one or more nodes to the server address space.
5081
5082 1
    :ivar TypeId:
5083 1
    :vartype TypeId: NodeId
5084 1
    :ivar ResponseHeader:
5085 1
    :vartype ResponseHeader: ResponseHeader
5086 1
    :ivar Results:
5087 1
    :vartype Results: AddNodesResult
5088 1
    :ivar DiagnosticInfos:
5089
    :vartype DiagnosticInfos: DiagnosticInfo
5090 1
    '''
5091
5092
    ua_types = [
5093 1
5094
        ('TypeId', 'NodeId'),
5095
        ('ResponseHeader', 'ResponseHeader'),
5096 1
        ('Results', 'ListOfAddNodesResult'),
5097
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
5098
               ]
5099
5100
    def __init__(self):
5101
        self.TypeId = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary)
5102
        self.ResponseHeader = ResponseHeader()
5103
        self.Results = []
5104
        self.DiagnosticInfos = []
5105
        self._freeze = True
5106
5107
    def to_binary(self):
5108 1
        packet = []
5109
        packet.append(self.TypeId.to_binary())
5110
        packet.append(self.ResponseHeader.to_binary())
5111
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5112
        for fieldname in self.Results:
5113
            packet.append(fieldname.to_binary())
5114 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5115 1
        for fieldname in self.DiagnosticInfos:
5116
            packet.append(fieldname.to_binary())
5117
        return b''.join(packet)
5118
5119 1
    @staticmethod
5120 1
    def from_binary(data):
5121 1
        obj = AddNodesResponse()
5122 1
        obj.TypeId = NodeId.from_binary(data)
5123
        obj.ResponseHeader = ResponseHeader.from_binary(data)
5124 1
        length = uabin.Primitives.Int32.unpack(data)
5125 1
        array = []
5126 1
        if length != -1:
5127 1
            for _ in range(0, length):
5128 1
                array.append(AddNodesResult.from_binary(data))
5129 1
        obj.Results = array
5130
        length = uabin.Primitives.Int32.unpack(data)
5131 1
        array = []
5132
        if length != -1:
5133
            for _ in range(0, length):
5134
                array.append(DiagnosticInfo.from_binary(data))
5135 1
        obj.DiagnosticInfos = array
5136
        return obj
5137
5138
    def __str__(self):
5139
        return 'AddNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5140 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5141
               'Results:' + str(self.Results) + ', ' + \
5142
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5143
5144
    __repr__ = __str__
5145 1
5146
5147 View Code Duplication
class AddReferencesItem(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5148 1
    '''
5149
    A request to add a reference to the server address space.
5150
5151
    :ivar SourceNodeId:
5152
    :vartype SourceNodeId: NodeId
5153
    :ivar ReferenceTypeId:
5154
    :vartype ReferenceTypeId: NodeId
5155
    :ivar IsForward:
5156
    :vartype IsForward: Boolean
5157
    :ivar TargetServerUri:
5158
    :vartype TargetServerUri: String
5159
    :ivar TargetNodeId:
5160
    :vartype TargetNodeId: ExpandedNodeId
5161
    :ivar TargetNodeClass:
5162 1
    :vartype TargetNodeClass: NodeClass
5163
    '''
5164
5165
    ua_types = [
5166
5167
        ('SourceNodeId', 'NodeId'),
5168
        ('ReferenceTypeId', 'NodeId'),
5169 1
        ('IsForward', 'Boolean'),
5170 1
        ('TargetServerUri', 'String'),
5171 1
        ('TargetNodeId', 'ExpandedNodeId'),
5172 1
        ('TargetNodeClass', 'NodeClass'),
5173 1
               ]
5174 1
5175 1
    def __init__(self):
5176 1
        self.SourceNodeId = NodeId()
5177 1
        self.ReferenceTypeId = NodeId()
5178 1
        self.IsForward = True
5179
        self.TargetServerUri = None
5180 1
        self.TargetNodeId = ExpandedNodeId()
5181 1
        self.TargetNodeClass = NodeClass(0)
5182 1
        self._freeze = True
5183 1
5184 1
    def to_binary(self):
5185 1
        packet = []
5186 1
        packet.append(self.SourceNodeId.to_binary())
5187 1
        packet.append(self.ReferenceTypeId.to_binary())
5188 1
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
5189
        packet.append(uabin.Primitives.String.pack(self.TargetServerUri))
5190 1
        packet.append(self.TargetNodeId.to_binary())
5191
        packet.append(uabin.Primitives.UInt32.pack(self.TargetNodeClass.value))
5192 1
        return b''.join(packet)
5193
5194 1
    @staticmethod
5195
    def from_binary(data):
5196 1
        obj = AddReferencesItem()
5197 1
        obj.SourceNodeId = NodeId.from_binary(data)
5198 1
        obj.ReferenceTypeId = NodeId.from_binary(data)
5199 1
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
5200 1
        self.TargetServerUri = uabin.Primitives.String.unpack(data)
5201 1
        obj.TargetNodeId = ExpandedNodeId.from_binary(data)
5202 1
        self.TargetNodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
5203 1
        return obj
5204 1
5205 1
    def __str__(self):
5206 1
        return 'AddReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \
5207 1
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
5208 1
               'IsForward:' + str(self.IsForward) + ', ' + \
5209
               'TargetServerUri:' + str(self.TargetServerUri) + ', ' + \
5210 1
               'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \
5211
               'TargetNodeClass:' + str(self.TargetNodeClass) + ')'
5212 1
5213
    __repr__ = __str__
5214
5215
5216 View Code Duplication
class AddReferencesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5217
    '''
5218 1
    :ivar ReferencesToAdd:
5219
    :vartype ReferencesToAdd: AddReferencesItem
5220
    '''
5221 1
5222
    ua_types = [
5223
5224
        ('ReferencesToAdd', 'ListOfAddReferencesItem'),
5225
               ]
5226
5227
    def __init__(self):
5228
        self.ReferencesToAdd = []
5229
        self._freeze = True
5230
5231
    def to_binary(self):
5232
        packet = []
5233
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToAdd)))
5234
        for fieldname in self.ReferencesToAdd:
5235
            packet.append(fieldname.to_binary())
5236
        return b''.join(packet)
5237
5238
    @staticmethod
5239 1
    def from_binary(data):
5240
        obj = AddReferencesParameters()
5241
        length = uabin.Primitives.Int32.unpack(data)
5242
        array = []
5243
        if length != -1:
5244
            for _ in range(0, length):
5245
                array.append(AddReferencesItem.from_binary(data))
5246
        obj.ReferencesToAdd = array
5247
        return obj
5248 1
5249 1
    def __str__(self):
5250 1
        return 'AddReferencesParameters(' + 'ReferencesToAdd:' + str(self.ReferencesToAdd) + ')'
5251 1
5252 1
    __repr__ = __str__
5253 1
5254 1
5255 1
class AddReferencesRequest(FrozenClass):
5256 1
    '''
5257 1
    Adds one or more references to the server address space.
5258 1
5259 1
    :ivar TypeId:
5260
    :vartype TypeId: NodeId
5261 1
    :ivar RequestHeader:
5262 1
    :vartype RequestHeader: RequestHeader
5263 1
    :ivar Parameters:
5264 1
    :vartype Parameters: AddReferencesParameters
5265 1
    '''
5266 1
5267 1
    ua_types = [
5268 1
5269 1
        ('TypeId', 'NodeId'),
5270
        ('RequestHeader', 'RequestHeader'),
5271 1
        ('Parameters', 'AddReferencesParameters'),
5272
               ]
5273 1
5274
    def __init__(self):
5275 1
        self.TypeId = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary)
5276 1
        self.RequestHeader = RequestHeader()
5277 1
        self.Parameters = AddReferencesParameters()
5278 1
        self._freeze = True
5279 1
5280 1
    def to_binary(self):
5281 1
        packet = []
5282
        packet.append(self.TypeId.to_binary())
5283 1
        packet.append(self.RequestHeader.to_binary())
5284
        packet.append(self.Parameters.to_binary())
5285
        return b''.join(packet)
5286
5287
    @staticmethod
5288
    def from_binary(data):
5289
        obj = AddReferencesRequest()
5290
        obj.TypeId = NodeId.from_binary(data)
5291 1
        obj.RequestHeader = RequestHeader.from_binary(data)
5292
        obj.Parameters = AddReferencesParameters.from_binary(data)
5293
        return obj
5294 1
5295
    def __str__(self):
5296
        return 'AddReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5297
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5298
               'Parameters:' + str(self.Parameters) + ')'
5299
5300 1
    __repr__ = __str__
5301
5302
5303 View Code Duplication
class AddReferencesResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5304 1
    '''
5305 1
    Adds one or more references to the server address space.
5306 1
5307 1
    :ivar TypeId:
5308 1
    :vartype TypeId: NodeId
5309 1
    :ivar ResponseHeader:
5310 1
    :vartype ResponseHeader: ResponseHeader
5311
    :ivar Results:
5312 1
    :vartype Results: StatusCode
5313 1
    :ivar DiagnosticInfos:
5314 1
    :vartype DiagnosticInfos: DiagnosticInfo
5315 1
    '''
5316 1
5317 1
    ua_types = [
5318
5319 1
        ('TypeId', 'NodeId'),
5320
        ('ResponseHeader', 'ResponseHeader'),
5321 1
        ('Results', 'ListOfStatusCode'),
5322
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
5323 1
               ]
5324 1
5325 1
    def __init__(self):
5326 1
        self.TypeId = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary)
5327 1
        self.ResponseHeader = ResponseHeader()
5328 1
        self.Results = []
5329 1
        self.DiagnosticInfos = []
5330
        self._freeze = True
5331 1
5332
    def to_binary(self):
5333
        packet = []
5334 1
        packet.append(self.TypeId.to_binary())
5335
        packet.append(self.ResponseHeader.to_binary())
5336
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5337 1
        for fieldname in self.Results:
5338
            packet.append(fieldname.to_binary())
5339
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5340
        for fieldname in self.DiagnosticInfos:
5341
            packet.append(fieldname.to_binary())
5342
        return b''.join(packet)
5343
5344
    @staticmethod
5345
    def from_binary(data):
5346
        obj = AddReferencesResponse()
5347
        obj.TypeId = NodeId.from_binary(data)
5348
        obj.ResponseHeader = ResponseHeader.from_binary(data)
5349 1
        length = uabin.Primitives.Int32.unpack(data)
5350
        array = []
5351
        if length != -1:
5352
            for _ in range(0, length):
5353
                array.append(StatusCode.from_binary(data))
5354
        obj.Results = array
5355 1
        length = uabin.Primitives.Int32.unpack(data)
5356 1
        array = []
5357
        if length != -1:
5358
            for _ in range(0, length):
5359
                array.append(DiagnosticInfo.from_binary(data))
5360 1
        obj.DiagnosticInfos = array
5361 1
        return obj
5362 1
5363 1
    def __str__(self):
5364
        return 'AddReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5365 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5366 1
               'Results:' + str(self.Results) + ', ' + \
5367 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5368 1
5369 1
    __repr__ = __str__
5370 1
5371
5372 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...
5373
    '''
5374
    A request to delete a node to the server address space.
5375
5376 1
    :ivar NodeId:
5377
    :vartype NodeId: NodeId
5378
    :ivar DeleteTargetReferences:
5379
    :vartype DeleteTargetReferences: Boolean
5380
    '''
5381 1
5382
    ua_types = [
5383
5384
        ('NodeId', 'NodeId'),
5385
        ('DeleteTargetReferences', 'Boolean'),
5386 1
               ]
5387
5388
    def __init__(self):
5389 1
        self.NodeId = NodeId()
5390
        self.DeleteTargetReferences = True
5391
        self._freeze = True
5392
5393
    def to_binary(self):
5394
        packet = []
5395
        packet.append(self.NodeId.to_binary())
5396
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteTargetReferences))
5397
        return b''.join(packet)
5398
5399
    @staticmethod
5400
    def from_binary(data):
5401
        obj = DeleteNodesItem()
5402
        obj.NodeId = NodeId.from_binary(data)
5403 1
        self.DeleteTargetReferences = uabin.Primitives.Boolean.unpack(data)
5404
        return obj
5405
5406
    def __str__(self):
5407
        return 'DeleteNodesItem(' + 'NodeId:' + str(self.NodeId) + ', ' + \
5408
               'DeleteTargetReferences:' + str(self.DeleteTargetReferences) + ')'
5409
5410 1
    __repr__ = __str__
5411 1
5412 1
5413 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...
5414 1
    '''
5415 1
    :ivar NodesToDelete:
5416 1
    :vartype NodesToDelete: DeleteNodesItem
5417 1
    '''
5418 1
5419 1
    ua_types = [
5420
5421 1
        ('NodesToDelete', 'ListOfDeleteNodesItem'),
5422 1
               ]
5423 1
5424 1
    def __init__(self):
5425 1
        self.NodesToDelete = []
5426 1
        self._freeze = True
5427 1
5428 1
    def to_binary(self):
5429 1
        packet = []
5430
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToDelete)))
5431 1
        for fieldname in self.NodesToDelete:
5432
            packet.append(fieldname.to_binary())
5433 1
        return b''.join(packet)
5434
5435 1
    @staticmethod
5436
    def from_binary(data):
5437 1
        obj = DeleteNodesParameters()
5438 1
        length = uabin.Primitives.Int32.unpack(data)
5439 1
        array = []
5440 1
        if length != -1:
5441 1
            for _ in range(0, length):
5442 1
                array.append(DeleteNodesItem.from_binary(data))
5443 1
        obj.NodesToDelete = array
5444 1
        return obj
5445 1
5446 1
    def __str__(self):
5447 1
        return 'DeleteNodesParameters(' + 'NodesToDelete:' + str(self.NodesToDelete) + ')'
5448 1
5449 1
    __repr__ = __str__
5450
5451 1
5452
class DeleteNodesRequest(FrozenClass):
5453 1
    '''
5454
    Delete one or more nodes from the server address space.
5455
5456
    :ivar TypeId:
5457
    :vartype TypeId: NodeId
5458
    :ivar RequestHeader:
5459 1
    :vartype RequestHeader: RequestHeader
5460
    :ivar Parameters:
5461
    :vartype Parameters: DeleteNodesParameters
5462 1
    '''
5463
5464
    ua_types = [
5465
5466
        ('TypeId', 'NodeId'),
5467
        ('RequestHeader', 'RequestHeader'),
5468
        ('Parameters', 'DeleteNodesParameters'),
5469
               ]
5470
5471
    def __init__(self):
5472 1
        self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary)
5473
        self.RequestHeader = RequestHeader()
5474
        self.Parameters = DeleteNodesParameters()
5475
        self._freeze = True
5476
5477 1
    def to_binary(self):
5478 1
        packet = []
5479 1
        packet.append(self.TypeId.to_binary())
5480 1
        packet.append(self.RequestHeader.to_binary())
5481 1
        packet.append(self.Parameters.to_binary())
5482 1
        return b''.join(packet)
5483 1
5484 1
    @staticmethod
5485
    def from_binary(data):
5486 1
        obj = DeleteNodesRequest()
5487 1
        obj.TypeId = NodeId.from_binary(data)
5488 1
        obj.RequestHeader = RequestHeader.from_binary(data)
5489 1
        obj.Parameters = DeleteNodesParameters.from_binary(data)
5490 1
        return obj
5491
5492 1
    def __str__(self):
5493
        return 'DeleteNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5494 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5495
               'Parameters:' + str(self.Parameters) + ')'
5496 1
5497 1
    __repr__ = __str__
5498 1
5499
5500 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...
5501
    '''
5502
    Delete one or more nodes from the server address space.
5503
5504 1
    :ivar TypeId:
5505
    :vartype TypeId: NodeId
5506
    :ivar ResponseHeader:
5507 1
    :vartype ResponseHeader: ResponseHeader
5508
    :ivar Results:
5509
    :vartype Results: StatusCode
5510
    :ivar DiagnosticInfos:
5511
    :vartype DiagnosticInfos: DiagnosticInfo
5512
    '''
5513 1
5514
    ua_types = [
5515
5516
        ('TypeId', 'NodeId'),
5517 1
        ('ResponseHeader', 'ResponseHeader'),
5518 1
        ('Results', 'ListOfStatusCode'),
5519 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
5520 1
               ]
5521 1
5522 1
    def __init__(self):
5523 1
        self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary)
5524
        self.ResponseHeader = ResponseHeader()
5525 1
        self.Results = []
5526 1
        self.DiagnosticInfos = []
5527 1
        self._freeze = True
5528 1
5529 1
    def to_binary(self):
5530 1
        packet = []
5531
        packet.append(self.TypeId.to_binary())
5532 1
        packet.append(self.ResponseHeader.to_binary())
5533
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5534 1
        for fieldname in self.Results:
5535
            packet.append(fieldname.to_binary())
5536 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5537 1
        for fieldname in self.DiagnosticInfos:
5538 1
            packet.append(fieldname.to_binary())
5539 1
        return b''.join(packet)
5540 1
5541 1
    @staticmethod
5542 1
    def from_binary(data):
5543
        obj = DeleteNodesResponse()
5544 1
        obj.TypeId = NodeId.from_binary(data)
5545
        obj.ResponseHeader = ResponseHeader.from_binary(data)
5546
        length = uabin.Primitives.Int32.unpack(data)
5547 1
        array = []
5548
        if length != -1:
5549
            for _ in range(0, length):
5550 1
                array.append(StatusCode.from_binary(data))
5551
        obj.Results = array
5552
        length = uabin.Primitives.Int32.unpack(data)
5553
        array = []
5554
        if length != -1:
5555
            for _ in range(0, length):
5556
                array.append(DiagnosticInfo.from_binary(data))
5557
        obj.DiagnosticInfos = array
5558
        return obj
5559
5560
    def __str__(self):
5561
        return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5562 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5563
               'Results:' + str(self.Results) + ', ' + \
5564
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5565
5566
    __repr__ = __str__
5567
5568 1
5569 1
class DeleteReferencesItem(FrozenClass):
5570
    '''
5571
    A request to delete a node from the server address space.
5572
5573 1
    :ivar SourceNodeId:
5574 1
    :vartype SourceNodeId: NodeId
5575 1
    :ivar ReferenceTypeId:
5576 1
    :vartype ReferenceTypeId: NodeId
5577
    :ivar IsForward:
5578 1
    :vartype IsForward: Boolean
5579 1
    :ivar TargetNodeId:
5580 1
    :vartype TargetNodeId: ExpandedNodeId
5581 1
    :ivar DeleteBidirectional:
5582 1
    :vartype DeleteBidirectional: Boolean
5583 1
    '''
5584
5585 1
    ua_types = [
5586
5587
        ('SourceNodeId', 'NodeId'),
5588
        ('ReferenceTypeId', 'NodeId'),
5589 1
        ('IsForward', 'Boolean'),
5590
        ('TargetNodeId', 'ExpandedNodeId'),
5591
        ('DeleteBidirectional', 'Boolean'),
5592
               ]
5593
5594 1
    def __init__(self):
5595
        self.SourceNodeId = NodeId()
5596
        self.ReferenceTypeId = NodeId()
5597
        self.IsForward = True
5598
        self.TargetNodeId = ExpandedNodeId()
5599 1
        self.DeleteBidirectional = True
5600
        self._freeze = True
5601
5602 1
    def to_binary(self):
5603
        packet = []
5604
        packet.append(self.SourceNodeId.to_binary())
5605
        packet.append(self.ReferenceTypeId.to_binary())
5606
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
5607
        packet.append(self.TargetNodeId.to_binary())
5608
        packet.append(uabin.Primitives.Boolean.pack(self.DeleteBidirectional))
5609
        return b''.join(packet)
5610
5611
    @staticmethod
5612
    def from_binary(data):
5613
        obj = DeleteReferencesItem()
5614
        obj.SourceNodeId = NodeId.from_binary(data)
5615
        obj.ReferenceTypeId = NodeId.from_binary(data)
5616 1
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
5617
        obj.TargetNodeId = ExpandedNodeId.from_binary(data)
5618
        self.DeleteBidirectional = uabin.Primitives.Boolean.unpack(data)
5619
        return obj
5620
5621
    def __str__(self):
5622
        return 'DeleteReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \
5623 1
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
5624 1
               'IsForward:' + str(self.IsForward) + ', ' + \
5625 1
               'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \
5626 1
               'DeleteBidirectional:' + str(self.DeleteBidirectional) + ')'
5627 1
5628 1
    __repr__ = __str__
5629 1
5630 1
5631 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...
5632 1
    '''
5633
    :ivar ReferencesToDelete:
5634 1
    :vartype ReferencesToDelete: DeleteReferencesItem
5635 1
    '''
5636 1
5637 1
    ua_types = [
5638 1
5639 1
        ('ReferencesToDelete', 'ListOfDeleteReferencesItem'),
5640 1
               ]
5641 1
5642 1
    def __init__(self):
5643
        self.ReferencesToDelete = []
5644 1
        self._freeze = True
5645
5646 1
    def to_binary(self):
5647
        packet = []
5648 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToDelete)))
5649
        for fieldname in self.ReferencesToDelete:
5650 1
            packet.append(fieldname.to_binary())
5651 1
        return b''.join(packet)
5652 1
5653 1
    @staticmethod
5654 1
    def from_binary(data):
5655 1
        obj = DeleteReferencesParameters()
5656 1
        length = uabin.Primitives.Int32.unpack(data)
5657 1
        array = []
5658 1
        if length != -1:
5659 1
            for _ in range(0, length):
5660 1
                array.append(DeleteReferencesItem.from_binary(data))
5661 1
        obj.ReferencesToDelete = array
5662 1
        return obj
5663
5664 1
    def __str__(self):
5665
        return 'DeleteReferencesParameters(' + 'ReferencesToDelete:' + str(self.ReferencesToDelete) + ')'
5666 1
5667
    __repr__ = __str__
5668
5669
5670
class DeleteReferencesRequest(FrozenClass):
5671
    '''
5672 1
    Delete one or more references from the server address space.
5673
5674
    :ivar TypeId:
5675 1
    :vartype TypeId: NodeId
5676
    :ivar RequestHeader:
5677
    :vartype RequestHeader: RequestHeader
5678
    :ivar Parameters:
5679
    :vartype Parameters: DeleteReferencesParameters
5680
    '''
5681
5682
    ua_types = [
5683
5684
        ('TypeId', 'NodeId'),
5685
        ('RequestHeader', 'RequestHeader'),
5686
        ('Parameters', 'DeleteReferencesParameters'),
5687
               ]
5688
5689
    def __init__(self):
5690
        self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary)
5691 1
        self.RequestHeader = RequestHeader()
5692
        self.Parameters = DeleteReferencesParameters()
5693
        self._freeze = True
5694
5695
    def to_binary(self):
5696
        packet = []
5697
        packet.append(self.TypeId.to_binary())
5698
        packet.append(self.RequestHeader.to_binary())
5699 1
        packet.append(self.Parameters.to_binary())
5700
        return b''.join(packet)
5701
5702
    @staticmethod
5703
    def from_binary(data):
5704
        obj = DeleteReferencesRequest()
5705
        obj.TypeId = NodeId.from_binary(data)
5706
        obj.RequestHeader = RequestHeader.from_binary(data)
5707
        obj.Parameters = DeleteReferencesParameters.from_binary(data)
5708
        return obj
5709
5710
    def __str__(self):
5711 1
        return 'DeleteReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5712
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
5713
               'Parameters:' + str(self.Parameters) + ')'
5714
5715
    __repr__ = __str__
5716
5717
5718 View Code Duplication
class DeleteReferencesResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5719
    '''
5720 1
    :ivar Results:
5721
    :vartype Results: StatusCode
5722
    :ivar DiagnosticInfos:
5723
    :vartype DiagnosticInfos: DiagnosticInfo
5724 1
    '''
5725
5726
    ua_types = [
5727
5728
        ('Results', 'ListOfStatusCode'),
5729
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
5730
               ]
5731 1
5732
    def __init__(self):
5733
        self.Results = []
5734
        self.DiagnosticInfos = []
5735
        self._freeze = True
5736
5737
    def to_binary(self):
5738 1
        packet = []
5739
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5740
        for fieldname in self.Results:
5741 1
            packet.append(fieldname.to_binary())
5742
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5743
        for fieldname in self.DiagnosticInfos:
5744
            packet.append(fieldname.to_binary())
5745
        return b''.join(packet)
5746
5747 1
    @staticmethod
5748
    def from_binary(data):
5749
        obj = DeleteReferencesResult()
5750
        length = uabin.Primitives.Int32.unpack(data)
5751 1
        array = []
5752
        if length != -1:
5753
            for _ in range(0, length):
5754
                array.append(StatusCode.from_binary(data))
5755
        obj.Results = array
5756
        length = uabin.Primitives.Int32.unpack(data)
5757
        array = []
5758
        if length != -1:
5759 1
            for _ in range(0, length):
5760
                array.append(DiagnosticInfo.from_binary(data))
5761
        obj.DiagnosticInfos = array
5762
        return obj
5763
5764
    def __str__(self):
5765
        return 'DeleteReferencesResult(' + 'Results:' + str(self.Results) + ', ' + \
5766 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5767
5768
    __repr__ = __str__
5769
5770 1
5771
class DeleteReferencesResponse(FrozenClass):
5772
    '''
5773
    Delete one or more references from the server address space.
5774
5775
    :ivar TypeId:
5776
    :vartype TypeId: NodeId
5777
    :ivar ResponseHeader:
5778 1
    :vartype ResponseHeader: ResponseHeader
5779
    :ivar Parameters:
5780
    :vartype Parameters: DeleteReferencesResult
5781 1
    '''
5782
5783
    ua_types = [
5784 1
5785
        ('TypeId', 'NodeId'),
5786
        ('ResponseHeader', 'ResponseHeader'),
5787
        ('Parameters', 'DeleteReferencesResult'),
5788
               ]
5789
5790
    def __init__(self):
5791
        self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary)
5792
        self.ResponseHeader = ResponseHeader()
5793
        self.Parameters = DeleteReferencesResult()
5794
        self._freeze = True
5795
5796 1
    def to_binary(self):
5797
        packet = []
5798
        packet.append(self.TypeId.to_binary())
5799
        packet.append(self.ResponseHeader.to_binary())
5800
        packet.append(self.Parameters.to_binary())
5801
        return b''.join(packet)
5802 1
5803
    @staticmethod
5804
    def from_binary(data):
5805
        obj = DeleteReferencesResponse()
5806
        obj.TypeId = NodeId.from_binary(data)
5807
        obj.ResponseHeader = ResponseHeader.from_binary(data)
5808
        obj.Parameters = DeleteReferencesResult.from_binary(data)
5809
        return obj
5810
5811
    def __str__(self):
5812 1
        return 'DeleteReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5813
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5814
               'Parameters:' + str(self.Parameters) + ')'
5815
5816
    __repr__ = __str__
5817
5818
5819 1 View Code Duplication
class ViewDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5820
    '''
5821
    The view to browse.
5822
5823 1
    :ivar ViewId:
5824
    :vartype ViewId: NodeId
5825
    :ivar Timestamp:
5826
    :vartype Timestamp: DateTime
5827
    :ivar ViewVersion:
5828 1
    :vartype ViewVersion: UInt32
5829
    '''
5830
5831
    ua_types = [
5832
5833 1
        ('ViewId', 'NodeId'),
5834
        ('Timestamp', 'DateTime'),
5835
        ('ViewVersion', 'UInt32'),
5836 1
               ]
5837
5838
    def __init__(self):
5839
        self.ViewId = NodeId()
5840
        self.Timestamp = datetime.utcnow()
5841
        self.ViewVersion = 0
5842
        self._freeze = True
5843
5844 1
    def to_binary(self):
5845
        packet = []
5846
        packet.append(self.ViewId.to_binary())
5847
        packet.append(uabin.Primitives.DateTime.pack(self.Timestamp))
5848
        packet.append(uabin.Primitives.UInt32.pack(self.ViewVersion))
5849 1
        return b''.join(packet)
5850
5851
    @staticmethod
5852
    def from_binary(data):
5853
        obj = ViewDescription()
5854
        obj.ViewId = NodeId.from_binary(data)
5855
        self.Timestamp = uabin.Primitives.DateTime.unpack(data)
5856
        self.ViewVersion = uabin.Primitives.UInt32.unpack(data)
5857
        return obj
5858 1
5859
    def __str__(self):
5860
        return 'ViewDescription(' + 'ViewId:' + str(self.ViewId) + ', ' + \
5861
               'Timestamp:' + str(self.Timestamp) + ', ' + \
5862
               'ViewVersion:' + str(self.ViewVersion) + ')'
5863
5864
    __repr__ = __str__
5865
5866
5867 View Code Duplication
class BrowseDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5868 1
    '''
5869
    A request to browse the the references from a node.
5870
5871
    :ivar NodeId:
5872 1
    :vartype NodeId: NodeId
5873
    :ivar BrowseDirection:
5874
    :vartype BrowseDirection: BrowseDirection
5875
    :ivar ReferenceTypeId:
5876
    :vartype ReferenceTypeId: NodeId
5877
    :ivar IncludeSubtypes:
5878
    :vartype IncludeSubtypes: Boolean
5879
    :ivar NodeClassMask:
5880
    :vartype NodeClassMask: UInt32
5881
    :ivar ResultMask:
5882
    :vartype ResultMask: UInt32
5883
    '''
5884
5885
    ua_types = [
5886 1
5887
        ('NodeId', 'NodeId'),
5888
        ('BrowseDirection', 'BrowseDirection'),
5889
        ('ReferenceTypeId', 'NodeId'),
5890 1
        ('IncludeSubtypes', 'Boolean'),
5891
        ('NodeClassMask', 'UInt32'),
5892
        ('ResultMask', 'UInt32'),
5893 1
               ]
5894
5895
    def __init__(self):
5896
        self.NodeId = NodeId()
5897
        self.BrowseDirection = BrowseDirection(0)
5898
        self.ReferenceTypeId = NodeId()
5899
        self.IncludeSubtypes = True
5900
        self.NodeClassMask = 0
5901
        self.ResultMask = 0
5902
        self._freeze = True
5903
5904
    def to_binary(self):
5905 1
        packet = []
5906
        packet.append(self.NodeId.to_binary())
5907
        packet.append(uabin.Primitives.UInt32.pack(self.BrowseDirection.value))
5908
        packet.append(self.ReferenceTypeId.to_binary())
5909
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes))
5910
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClassMask))
5911 1
        packet.append(uabin.Primitives.UInt32.pack(self.ResultMask))
5912
        return b''.join(packet)
5913
5914
    @staticmethod
5915
    def from_binary(data):
5916
        obj = BrowseDescription()
5917
        obj.NodeId = NodeId.from_binary(data)
5918
        self.BrowseDirection = BrowseDirection(uabin.Primitives.UInt32.unpack(data))
5919
        obj.ReferenceTypeId = NodeId.from_binary(data)
5920
        self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data)
5921 1
        self.NodeClassMask = uabin.Primitives.UInt32.unpack(data)
5922
        self.ResultMask = uabin.Primitives.UInt32.unpack(data)
5923
        return obj
5924
5925
    def __str__(self):
5926
        return 'BrowseDescription(' + 'NodeId:' + str(self.NodeId) + ', ' + \
5927
               'BrowseDirection:' + str(self.BrowseDirection) + ', ' + \
5928 1
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
5929
               'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \
5930
               'NodeClassMask:' + str(self.NodeClassMask) + ', ' + \
5931
               'ResultMask:' + str(self.ResultMask) + ')'
5932 1
5933
    __repr__ = __str__
5934
5935
5936 View Code Duplication
class ReferenceDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5937 1
    '''
5938
    The description of a reference.
5939
5940
    :ivar ReferenceTypeId:
5941
    :vartype ReferenceTypeId: NodeId
5942 1
    :ivar IsForward:
5943
    :vartype IsForward: Boolean
5944
    :ivar NodeId:
5945 1
    :vartype NodeId: ExpandedNodeId
5946
    :ivar BrowseName:
5947
    :vartype BrowseName: QualifiedName
5948
    :ivar DisplayName:
5949
    :vartype DisplayName: LocalizedText
5950
    :ivar NodeClass:
5951
    :vartype NodeClass: NodeClass
5952
    :ivar TypeDefinition:
5953
    :vartype TypeDefinition: ExpandedNodeId
5954
    '''
5955
5956
    ua_types = [
5957 1
5958
        ('ReferenceTypeId', 'NodeId'),
5959
        ('IsForward', 'Boolean'),
5960
        ('NodeId', 'ExpandedNodeId'),
5961
        ('BrowseName', 'QualifiedName'),
5962
        ('DisplayName', 'LocalizedText'),
5963 1
        ('NodeClass', 'NodeClass'),
5964 1
        ('TypeDefinition', 'ExpandedNodeId'),
5965 1
               ]
5966 1
5967 1
    def __init__(self):
5968 1
        self.ReferenceTypeId = NodeId()
5969 1
        self.IsForward = True
5970 1
        self.NodeId = ExpandedNodeId()
5971 1
        self.BrowseName = QualifiedName()
5972
        self.DisplayName = LocalizedText()
5973 1
        self.NodeClass = NodeClass(0)
5974 1
        self.TypeDefinition = ExpandedNodeId()
5975 1
        self._freeze = True
5976 1
5977 1
    def to_binary(self):
5978 1
        packet = []
5979
        packet.append(self.ReferenceTypeId.to_binary())
5980 1
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
5981
        packet.append(self.NodeId.to_binary())
5982 1
        packet.append(self.BrowseName.to_binary())
5983
        packet.append(self.DisplayName.to_binary())
5984 1
        packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value))
5985 1
        packet.append(self.TypeDefinition.to_binary())
5986 1
        return b''.join(packet)
5987 1
5988
    @staticmethod
5989 1
    def from_binary(data):
5990
        obj = ReferenceDescription()
5991
        obj.ReferenceTypeId = NodeId.from_binary(data)
5992
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
5993
        obj.NodeId = ExpandedNodeId.from_binary(data)
5994 1
        obj.BrowseName = QualifiedName.from_binary(data)
5995
        obj.DisplayName = LocalizedText.from_binary(data)
5996
        self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data))
5997 1
        obj.TypeDefinition = ExpandedNodeId.from_binary(data)
5998
        return obj
5999
6000
    def __str__(self):
6001
        return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6002
               'IsForward:' + str(self.IsForward) + ', ' + \
6003
               'NodeId:' + str(self.NodeId) + ', ' + \
6004
               'BrowseName:' + str(self.BrowseName) + ', ' + \
6005
               'DisplayName:' + str(self.DisplayName) + ', ' + \
6006
               'NodeClass:' + str(self.NodeClass) + ', ' + \
6007
               'TypeDefinition:' + str(self.TypeDefinition) + ')'
6008
6009
    __repr__ = __str__
6010
6011
6012 View Code Duplication
class BrowseResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6013
    '''
6014
    The result of a browse operation.
6015 1
6016
    :ivar StatusCode:
6017
    :vartype StatusCode: StatusCode
6018
    :ivar ContinuationPoint:
6019
    :vartype ContinuationPoint: ByteString
6020
    :ivar References:
6021
    :vartype References: ReferenceDescription
6022
    '''
6023
6024 1
    ua_types = [
6025 1
6026 1
        ('StatusCode', 'StatusCode'),
6027 1
        ('ContinuationPoint', 'ByteString'),
6028 1
        ('References', 'ListOfReferenceDescription'),
6029 1
               ]
6030 1
6031 1
    def __init__(self):
6032 1
        self.StatusCode = StatusCode()
6033 1
        self.ContinuationPoint = None
6034 1
        self.References = []
6035 1
        self._freeze = True
6036
6037 1
    def to_binary(self):
6038 1
        packet = []
6039 1
        packet.append(self.StatusCode.to_binary())
6040 1
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
6041 1
        packet.append(uabin.Primitives.Int32.pack(len(self.References)))
6042 1
        for fieldname in self.References:
6043 1
            packet.append(fieldname.to_binary())
6044 1
        return b''.join(packet)
6045 1
6046
    @staticmethod
6047 1
    def from_binary(data):
6048
        obj = BrowseResult()
6049 1
        obj.StatusCode = StatusCode.from_binary(data)
6050
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
6051 1
        length = uabin.Primitives.Int32.unpack(data)
6052 1
        array = []
6053 1
        if length != -1:
6054 1
            for _ in range(0, length):
6055 1
                array.append(ReferenceDescription.from_binary(data))
6056 1
        obj.References = array
6057 1
        return obj
6058
6059 1
    def __str__(self):
6060
        return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
6061
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
6062
               'References:' + str(self.References) + ')'
6063
6064
    __repr__ = __str__
6065
6066
6067 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...
6068
    '''
6069
    :ivar View:
6070 1
    :vartype View: ViewDescription
6071
    :ivar RequestedMaxReferencesPerNode:
6072
    :vartype RequestedMaxReferencesPerNode: UInt32
6073
    :ivar NodesToBrowse:
6074
    :vartype NodesToBrowse: BrowseDescription
6075
    '''
6076
6077
    ua_types = [
6078
6079
        ('View', 'ViewDescription'),
6080
        ('RequestedMaxReferencesPerNode', 'UInt32'),
6081
        ('NodesToBrowse', 'ListOfBrowseDescription'),
6082
               ]
6083
6084
    def __init__(self):
6085
        self.View = ViewDescription()
6086
        self.RequestedMaxReferencesPerNode = 0
6087
        self.NodesToBrowse = []
6088
        self._freeze = True
6089
6090 1
    def to_binary(self):
6091
        packet = []
6092
        packet.append(self.View.to_binary())
6093
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxReferencesPerNode))
6094
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToBrowse)))
6095
        for fieldname in self.NodesToBrowse:
6096
            packet.append(fieldname.to_binary())
6097
        return b''.join(packet)
6098
6099
    @staticmethod
6100 1
    def from_binary(data):
6101 1
        obj = BrowseParameters()
6102 1
        obj.View = ViewDescription.from_binary(data)
6103 1
        self.RequestedMaxReferencesPerNode = uabin.Primitives.UInt32.unpack(data)
6104 1
        length = uabin.Primitives.Int32.unpack(data)
6105 1
        array = []
6106 1
        if length != -1:
6107 1
            for _ in range(0, length):
6108 1
                array.append(BrowseDescription.from_binary(data))
6109 1
        obj.NodesToBrowse = array
6110 1
        return obj
6111 1
6112 1
    def __str__(self):
6113
        return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \
6114 1
               'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \
6115 1
               'NodesToBrowse:' + str(self.NodesToBrowse) + ')'
6116 1
6117 1
    __repr__ = __str__
6118 1
6119 1
6120 1
class BrowseRequest(FrozenClass):
6121 1
    '''
6122 1
    Browse the references for one or more nodes from the server address space.
6123 1
6124
    :ivar TypeId:
6125 1
    :vartype TypeId: NodeId
6126
    :ivar RequestHeader:
6127 1
    :vartype RequestHeader: RequestHeader
6128
    :ivar Parameters:
6129 1
    :vartype Parameters: BrowseParameters
6130 1
    '''
6131 1
6132 1
    ua_types = [
6133 1
6134 1
        ('TypeId', 'NodeId'),
6135 1
        ('RequestHeader', 'RequestHeader'),
6136 1
        ('Parameters', 'BrowseParameters'),
6137
               ]
6138 1
6139
    def __init__(self):
6140
        self.TypeId = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary)
6141
        self.RequestHeader = RequestHeader()
6142
        self.Parameters = BrowseParameters()
6143
        self._freeze = True
6144
6145
    def to_binary(self):
6146
        packet = []
6147 1
        packet.append(self.TypeId.to_binary())
6148
        packet.append(self.RequestHeader.to_binary())
6149
        packet.append(self.Parameters.to_binary())
6150 1
        return b''.join(packet)
6151
6152
    @staticmethod
6153
    def from_binary(data):
6154
        obj = BrowseRequest()
6155
        obj.TypeId = NodeId.from_binary(data)
6156
        obj.RequestHeader = RequestHeader.from_binary(data)
6157
        obj.Parameters = BrowseParameters.from_binary(data)
6158
        return obj
6159
6160
    def __str__(self):
6161
        return 'BrowseRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6162 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6163
               'Parameters:' + str(self.Parameters) + ')'
6164
6165
    __repr__ = __str__
6166
6167
6168 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...
6169 1
    '''
6170 1
    Browse the references for one or more nodes from the server address space.
6171 1
6172 1
    :ivar TypeId:
6173 1
    :vartype TypeId: NodeId
6174 1
    :ivar ResponseHeader:
6175 1
    :vartype ResponseHeader: ResponseHeader
6176 1
    :ivar Results:
6177
    :vartype Results: BrowseResult
6178 1
    :ivar DiagnosticInfos:
6179 1
    :vartype DiagnosticInfos: DiagnosticInfo
6180 1
    '''
6181 1
6182 1
    ua_types = [
6183 1
6184 1
        ('TypeId', 'NodeId'),
6185 1
        ('ResponseHeader', 'ResponseHeader'),
6186
        ('Results', 'ListOfBrowseResult'),
6187 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
6188
               ]
6189 1
6190
    def __init__(self):
6191 1
        self.TypeId = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary)
6192 1
        self.ResponseHeader = ResponseHeader()
6193 1
        self.Results = []
6194 1
        self.DiagnosticInfos = []
6195 1
        self._freeze = True
6196 1
6197 1
    def to_binary(self):
6198 1
        packet = []
6199 1
        packet.append(self.TypeId.to_binary())
6200
        packet.append(self.ResponseHeader.to_binary())
6201 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6202
        for fieldname in self.Results:
6203
            packet.append(fieldname.to_binary())
6204
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6205
        for fieldname in self.DiagnosticInfos:
6206 1
            packet.append(fieldname.to_binary())
6207
        return b''.join(packet)
6208
6209 1
    @staticmethod
6210
    def from_binary(data):
6211
        obj = BrowseResponse()
6212
        obj.TypeId = NodeId.from_binary(data)
6213
        obj.ResponseHeader = ResponseHeader.from_binary(data)
6214
        length = uabin.Primitives.Int32.unpack(data)
6215
        array = []
6216
        if length != -1:
6217
            for _ in range(0, length):
6218
                array.append(BrowseResult.from_binary(data))
6219 1
        obj.Results = array
6220
        length = uabin.Primitives.Int32.unpack(data)
6221
        array = []
6222
        if length != -1:
6223
            for _ in range(0, length):
6224
                array.append(DiagnosticInfo.from_binary(data))
6225 1
        obj.DiagnosticInfos = array
6226 1
        return obj
6227 1
6228 1
    def __str__(self):
6229 1
        return 'BrowseResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6230 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6231 1
               'Results:' + str(self.Results) + ', ' + \
6232 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6233 1
6234
    __repr__ = __str__
6235 1
6236 1
6237 1
class BrowseNextParameters(FrozenClass):
6238 1
    '''
6239 1
    :ivar ReleaseContinuationPoints:
6240 1
    :vartype ReleaseContinuationPoints: Boolean
6241 1
    :ivar ContinuationPoints:
6242 1
    :vartype ContinuationPoints: ByteString
6243
    '''
6244 1
6245
    ua_types = [
6246 1
6247
        ('ReleaseContinuationPoints', 'Boolean'),
6248 1
        ('ContinuationPoints', 'ListOfByteString'),
6249 1
               ]
6250 1
6251 1
    def __init__(self):
6252 1
        self.ReleaseContinuationPoints = True
6253 1
        self.ContinuationPoints = []
6254 1
        self._freeze = True
6255 1
6256 1
    def to_binary(self):
6257
        packet = []
6258 1
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints))
6259
        packet.append(uabin.Primitives.Int32.pack(len(self.ContinuationPoints)))
6260
        for fieldname in self.ContinuationPoints:
6261
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
6262
        return b''.join(packet)
6263 1
6264
    @staticmethod
6265
    def from_binary(data):
6266 1
        obj = BrowseNextParameters()
6267
        self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data)
6268
        obj.ContinuationPoints = uabin.Primitives.ByteString.unpack_array(data)
6269
        return obj
6270
6271
    def __str__(self):
6272
        return 'BrowseNextParameters(' + 'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \
6273
               'ContinuationPoints:' + str(self.ContinuationPoints) + ')'
6274
6275
    __repr__ = __str__
6276
6277
6278 1
class BrowseNextRequest(FrozenClass):
6279
    '''
6280
    Continues one or more browse operations.
6281
6282
    :ivar TypeId:
6283
    :vartype TypeId: NodeId
6284 1
    :ivar RequestHeader:
6285 1
    :vartype RequestHeader: RequestHeader
6286
    :ivar Parameters:
6287
    :vartype Parameters: BrowseNextParameters
6288
    '''
6289 1
6290 1
    ua_types = [
6291 1
6292 1
        ('TypeId', 'NodeId'),
6293
        ('RequestHeader', 'RequestHeader'),
6294 1
        ('Parameters', 'BrowseNextParameters'),
6295 1
               ]
6296 1
6297 1
    def __init__(self):
6298 1
        self.TypeId = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary)
6299 1
        self.RequestHeader = RequestHeader()
6300
        self.Parameters = BrowseNextParameters()
6301 1
        self._freeze = True
6302
6303
    def to_binary(self):
6304
        packet = []
6305 1
        packet.append(self.TypeId.to_binary())
6306
        packet.append(self.RequestHeader.to_binary())
6307
        packet.append(self.Parameters.to_binary())
6308
        return b''.join(packet)
6309
6310 1
    @staticmethod
6311
    def from_binary(data):
6312
        obj = BrowseNextRequest()
6313
        obj.TypeId = NodeId.from_binary(data)
6314
        obj.RequestHeader = RequestHeader.from_binary(data)
6315 1
        obj.Parameters = BrowseNextParameters.from_binary(data)
6316
        return obj
6317
6318 1
    def __str__(self):
6319
        return 'BrowseNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6320
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6321
               'Parameters:' + str(self.Parameters) + ')'
6322
6323
    __repr__ = __str__
6324
6325
6326 View Code Duplication
class BrowseNextResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6327
    '''
6328
    :ivar Results:
6329
    :vartype Results: BrowseResult
6330
    :ivar DiagnosticInfos:
6331
    :vartype DiagnosticInfos: DiagnosticInfo
6332 1
    '''
6333
6334
    ua_types = [
6335
6336
        ('Results', 'ListOfBrowseResult'),
6337
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
6338
               ]
6339 1
6340 1
    def __init__(self):
6341 1
        self.Results = []
6342 1
        self.DiagnosticInfos = []
6343 1
        self._freeze = True
6344 1
6345 1
    def to_binary(self):
6346 1
        packet = []
6347 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6348 1
        for fieldname in self.Results:
6349
            packet.append(fieldname.to_binary())
6350 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6351 1
        for fieldname in self.DiagnosticInfos:
6352 1
            packet.append(fieldname.to_binary())
6353 1
        return b''.join(packet)
6354 1
6355 1
    @staticmethod
6356 1
    def from_binary(data):
6357 1
        obj = BrowseNextResult()
6358 1
        length = uabin.Primitives.Int32.unpack(data)
6359
        array = []
6360 1
        if length != -1:
6361
            for _ in range(0, length):
6362 1
                array.append(BrowseResult.from_binary(data))
6363
        obj.Results = array
6364 1
        length = uabin.Primitives.Int32.unpack(data)
6365
        array = []
6366 1
        if length != -1:
6367 1
            for _ in range(0, length):
6368 1
                array.append(DiagnosticInfo.from_binary(data))
6369 1
        obj.DiagnosticInfos = array
6370 1
        return obj
6371 1
6372 1
    def __str__(self):
6373 1
        return 'BrowseNextResult(' + 'Results:' + str(self.Results) + ', ' + \
6374 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6375 1
6376 1
    __repr__ = __str__
6377 1
6378 1
6379
class BrowseNextResponse(FrozenClass):
6380 1
    '''
6381
    Continues one or more browse operations.
6382 1
6383
    :ivar TypeId:
6384
    :vartype TypeId: NodeId
6385
    :ivar ResponseHeader:
6386
    :vartype ResponseHeader: ResponseHeader
6387
    :ivar Parameters:
6388 1
    :vartype Parameters: BrowseNextResult
6389
    '''
6390
6391 1
    ua_types = [
6392
6393
        ('TypeId', 'NodeId'),
6394
        ('ResponseHeader', 'ResponseHeader'),
6395
        ('Parameters', 'BrowseNextResult'),
6396
               ]
6397
6398
    def __init__(self):
6399 1
        self.TypeId = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary)
6400
        self.ResponseHeader = ResponseHeader()
6401
        self.Parameters = BrowseNextResult()
6402
        self._freeze = True
6403
6404 1
    def to_binary(self):
6405
        packet = []
6406
        packet.append(self.TypeId.to_binary())
6407
        packet.append(self.ResponseHeader.to_binary())
6408
        packet.append(self.Parameters.to_binary())
6409
        return b''.join(packet)
6410
6411
    @staticmethod
6412
    def from_binary(data):
6413 1
        obj = BrowseNextResponse()
6414
        obj.TypeId = NodeId.from_binary(data)
6415
        obj.ResponseHeader = ResponseHeader.from_binary(data)
6416
        obj.Parameters = BrowseNextResult.from_binary(data)
6417
        return obj
6418
6419
    def __str__(self):
6420
        return 'BrowseNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6421 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6422
               'Parameters:' + str(self.Parameters) + ')'
6423
6424
    __repr__ = __str__
6425 1
6426
6427
class RelativePathElement(FrozenClass):
6428
    '''
6429 1
    An element in a relative path.
6430
6431
    :ivar ReferenceTypeId:
6432
    :vartype ReferenceTypeId: NodeId
6433 1
    :ivar IsInverse:
6434
    :vartype IsInverse: Boolean
6435
    :ivar IncludeSubtypes:
6436 1
    :vartype IncludeSubtypes: Boolean
6437
    :ivar TargetName:
6438
    :vartype TargetName: QualifiedName
6439
    '''
6440
6441
    ua_types = [
6442
6443
        ('ReferenceTypeId', 'NodeId'),
6444
        ('IsInverse', 'Boolean'),
6445
        ('IncludeSubtypes', 'Boolean'),
6446
        ('TargetName', 'QualifiedName'),
6447
               ]
6448 1
6449
    def __init__(self):
6450
        self.ReferenceTypeId = NodeId()
6451
        self.IsInverse = True
6452
        self.IncludeSubtypes = True
6453
        self.TargetName = QualifiedName()
6454 1
        self._freeze = True
6455
6456
    def to_binary(self):
6457
        packet = []
6458
        packet.append(self.ReferenceTypeId.to_binary())
6459
        packet.append(uabin.Primitives.Boolean.pack(self.IsInverse))
6460
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes))
6461
        packet.append(self.TargetName.to_binary())
6462
        return b''.join(packet)
6463
6464 1
    @staticmethod
6465
    def from_binary(data):
6466
        obj = RelativePathElement()
6467
        obj.ReferenceTypeId = NodeId.from_binary(data)
6468
        self.IsInverse = uabin.Primitives.Boolean.unpack(data)
6469
        self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data)
6470
        obj.TargetName = QualifiedName.from_binary(data)
6471 1
        return obj
6472
6473
    def __str__(self):
6474
        return 'RelativePathElement(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
6475 1
               'IsInverse:' + str(self.IsInverse) + ', ' + \
6476
               'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \
6477
               'TargetName:' + str(self.TargetName) + ')'
6478
6479
    __repr__ = __str__
6480 1
6481
6482 View Code Duplication
class RelativePath(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6483
    '''
6484
    A relative path constructed from reference types and browse names.
6485 1
6486
    :ivar Elements:
6487
    :vartype Elements: RelativePathElement
6488 1
    '''
6489
6490
    ua_types = [
6491
6492
        ('Elements', 'ListOfRelativePathElement'),
6493
               ]
6494
6495
    def __init__(self):
6496 1
        self.Elements = []
6497
        self._freeze = True
6498
6499
    def to_binary(self):
6500
        packet = []
6501 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Elements)))
6502
        for fieldname in self.Elements:
6503
            packet.append(fieldname.to_binary())
6504
        return b''.join(packet)
6505
6506
    @staticmethod
6507
    def from_binary(data):
6508
        obj = RelativePath()
6509
        length = uabin.Primitives.Int32.unpack(data)
6510 1
        array = []
6511
        if length != -1:
6512
            for _ in range(0, length):
6513
                array.append(RelativePathElement.from_binary(data))
6514
        obj.Elements = array
6515
        return obj
6516
6517
    def __str__(self):
6518
        return 'RelativePath(' + 'Elements:' + str(self.Elements) + ')'
6519
6520 1
    __repr__ = __str__
6521
6522
6523 View Code Duplication
class BrowsePath(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6524 1
    '''
6525
    A request to translate a path into a node id.
6526
6527
    :ivar StartingNode:
6528
    :vartype StartingNode: NodeId
6529
    :ivar RelativePath:
6530
    :vartype RelativePath: RelativePath
6531
    '''
6532
6533
    ua_types = [
6534
6535
        ('StartingNode', 'NodeId'),
6536
        ('RelativePath', 'RelativePath'),
6537
               ]
6538 1
6539
    def __init__(self):
6540
        self.StartingNode = NodeId()
6541
        self.RelativePath = RelativePath()
6542 1
        self._freeze = True
6543
6544
    def to_binary(self):
6545 1
        packet = []
6546
        packet.append(self.StartingNode.to_binary())
6547
        packet.append(self.RelativePath.to_binary())
6548
        return b''.join(packet)
6549
6550
    @staticmethod
6551
    def from_binary(data):
6552
        obj = BrowsePath()
6553
        obj.StartingNode = NodeId.from_binary(data)
6554
        obj.RelativePath = RelativePath.from_binary(data)
6555
        return obj
6556
6557 1
    def __str__(self):
6558
        return 'BrowsePath(' + 'StartingNode:' + str(self.StartingNode) + ', ' + \
6559
               'RelativePath:' + str(self.RelativePath) + ')'
6560
6561
    __repr__ = __str__
6562
6563 1
6564
class BrowsePathTarget(FrozenClass):
6565
    '''
6566
    The target of the translated path.
6567
6568
    :ivar TargetId:
6569
    :vartype TargetId: ExpandedNodeId
6570
    :ivar RemainingPathIndex:
6571
    :vartype RemainingPathIndex: UInt32
6572
    '''
6573 1
6574
    ua_types = [
6575
6576
        ('TargetId', 'ExpandedNodeId'),
6577
        ('RemainingPathIndex', 'UInt32'),
6578
               ]
6579
6580 1
    def __init__(self):
6581
        self.TargetId = ExpandedNodeId()
6582
        self.RemainingPathIndex = 0
6583
        self._freeze = True
6584 1
6585
    def to_binary(self):
6586
        packet = []
6587
        packet.append(self.TargetId.to_binary())
6588
        packet.append(uabin.Primitives.UInt32.pack(self.RemainingPathIndex))
6589 1
        return b''.join(packet)
6590
6591
    @staticmethod
6592
    def from_binary(data):
6593
        obj = BrowsePathTarget()
6594 1
        obj.TargetId = ExpandedNodeId.from_binary(data)
6595
        self.RemainingPathIndex = uabin.Primitives.UInt32.unpack(data)
6596
        return obj
6597 1
6598
    def __str__(self):
6599
        return 'BrowsePathTarget(' + 'TargetId:' + str(self.TargetId) + ', ' + \
6600
               'RemainingPathIndex:' + str(self.RemainingPathIndex) + ')'
6601
6602
    __repr__ = __str__
6603
6604
6605 View Code Duplication
class BrowsePathResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6606
    '''
6607
    The result of a translate opearation.
6608
6609
    :ivar StatusCode:
6610
    :vartype StatusCode: StatusCode
6611 1
    :ivar Targets:
6612
    :vartype Targets: BrowsePathTarget
6613
    '''
6614
6615
    ua_types = [
6616
6617
        ('StatusCode', 'StatusCode'),
6618 1
        ('Targets', 'ListOfBrowsePathTarget'),
6619 1
               ]
6620 1
6621 1
    def __init__(self):
6622 1
        self.StatusCode = StatusCode()
6623 1
        self.Targets = []
6624 1
        self._freeze = True
6625 1
6626 1
    def to_binary(self):
6627 1
        packet = []
6628
        packet.append(self.StatusCode.to_binary())
6629 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Targets)))
6630 1
        for fieldname in self.Targets:
6631 1
            packet.append(fieldname.to_binary())
6632 1
        return b''.join(packet)
6633 1
6634 1
    @staticmethod
6635 1
    def from_binary(data):
6636
        obj = BrowsePathResult()
6637 1
        obj.StatusCode = StatusCode.from_binary(data)
6638
        length = uabin.Primitives.Int32.unpack(data)
6639 1
        array = []
6640
        if length != -1:
6641 1
            for _ in range(0, length):
6642 1
                array.append(BrowsePathTarget.from_binary(data))
6643 1
        obj.Targets = array
6644 1
        return obj
6645 1
6646
    def __str__(self):
6647 1
        return 'BrowsePathResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
6648
               'Targets:' + str(self.Targets) + ')'
6649
6650
    __repr__ = __str__
6651
6652
6653 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...
6654
    '''
6655
    :ivar BrowsePaths:
6656 1
    :vartype BrowsePaths: BrowsePath
6657
    '''
6658
6659
    ua_types = [
6660
6661
        ('BrowsePaths', 'ListOfBrowsePath'),
6662
               ]
6663
6664 1
    def __init__(self):
6665
        self.BrowsePaths = []
6666
        self._freeze = True
6667
6668 1
    def to_binary(self):
6669 1
        packet = []
6670 1
        packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePaths)))
6671 1
        for fieldname in self.BrowsePaths:
6672 1
            packet.append(fieldname.to_binary())
6673 1
        return b''.join(packet)
6674 1
6675
    @staticmethod
6676 1
    def from_binary(data):
6677 1
        obj = TranslateBrowsePathsToNodeIdsParameters()
6678 1
        length = uabin.Primitives.Int32.unpack(data)
6679 1
        array = []
6680 1
        if length != -1:
6681 1
            for _ in range(0, length):
6682
                array.append(BrowsePath.from_binary(data))
6683 1
        obj.BrowsePaths = array
6684
        return obj
6685 1
6686
    def __str__(self):
6687 1
        return 'TranslateBrowsePathsToNodeIdsParameters(' + 'BrowsePaths:' + str(self.BrowsePaths) + ')'
6688 1
6689 1
    __repr__ = __str__
6690 1
6691 1
6692 1
class TranslateBrowsePathsToNodeIdsRequest(FrozenClass):
6693 1
    '''
6694
    Translates one or more paths in the server address space.
6695 1
6696
    :ivar TypeId:
6697
    :vartype TypeId: NodeId
6698 1
    :ivar RequestHeader:
6699
    :vartype RequestHeader: RequestHeader
6700
    :ivar Parameters:
6701 1
    :vartype Parameters: TranslateBrowsePathsToNodeIdsParameters
6702
    '''
6703
6704
    ua_types = [
6705
6706
        ('TypeId', 'NodeId'),
6707
        ('RequestHeader', 'RequestHeader'),
6708
        ('Parameters', 'TranslateBrowsePathsToNodeIdsParameters'),
6709
               ]
6710
6711 1
    def __init__(self):
6712
        self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary)
6713
        self.RequestHeader = RequestHeader()
6714
        self.Parameters = TranslateBrowsePathsToNodeIdsParameters()
6715
        self._freeze = True
6716 1
6717 1
    def to_binary(self):
6718 1
        packet = []
6719 1
        packet.append(self.TypeId.to_binary())
6720 1
        packet.append(self.RequestHeader.to_binary())
6721 1
        packet.append(self.Parameters.to_binary())
6722 1
        return b''.join(packet)
6723 1
6724
    @staticmethod
6725 1
    def from_binary(data):
6726 1
        obj = TranslateBrowsePathsToNodeIdsRequest()
6727 1
        obj.TypeId = NodeId.from_binary(data)
6728 1
        obj.RequestHeader = RequestHeader.from_binary(data)
6729 1
        obj.Parameters = TranslateBrowsePathsToNodeIdsParameters.from_binary(data)
6730
        return obj
6731 1
6732
    def __str__(self):
6733 1
        return 'TranslateBrowsePathsToNodeIdsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6734
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6735 1
               'Parameters:' + str(self.Parameters) + ')'
6736 1
6737 1
    __repr__ = __str__
6738
6739 1
6740 View Code Duplication
class TranslateBrowsePathsToNodeIdsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6741
    '''
6742
    Translates one or more paths in the server address space.
6743 1
6744
    :ivar TypeId:
6745
    :vartype TypeId: NodeId
6746 1
    :ivar ResponseHeader:
6747
    :vartype ResponseHeader: ResponseHeader
6748
    :ivar Results:
6749
    :vartype Results: BrowsePathResult
6750
    :ivar DiagnosticInfos:
6751
    :vartype DiagnosticInfos: DiagnosticInfo
6752
    '''
6753
6754
    ua_types = [
6755
6756 1
        ('TypeId', 'NodeId'),
6757
        ('ResponseHeader', 'ResponseHeader'),
6758
        ('Results', 'ListOfBrowsePathResult'),
6759
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
6760
               ]
6761 1
6762 1
    def __init__(self):
6763 1
        self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary)
6764 1
        self.ResponseHeader = ResponseHeader()
6765 1
        self.Results = []
6766 1
        self.DiagnosticInfos = []
6767 1
        self._freeze = True
6768 1
6769
    def to_binary(self):
6770 1
        packet = []
6771 1
        packet.append(self.TypeId.to_binary())
6772 1
        packet.append(self.ResponseHeader.to_binary())
6773 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
6774 1
        for fieldname in self.Results:
6775
            packet.append(fieldname.to_binary())
6776 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
6777
        for fieldname in self.DiagnosticInfos:
6778 1
            packet.append(fieldname.to_binary())
6779
        return b''.join(packet)
6780 1
6781 1
    @staticmethod
6782 1
    def from_binary(data):
6783
        obj = TranslateBrowsePathsToNodeIdsResponse()
6784 1
        obj.TypeId = NodeId.from_binary(data)
6785
        obj.ResponseHeader = ResponseHeader.from_binary(data)
6786
        length = uabin.Primitives.Int32.unpack(data)
6787
        array = []
6788 1
        if length != -1:
6789
            for _ in range(0, length):
6790
                array.append(BrowsePathResult.from_binary(data))
6791 1
        obj.Results = array
6792
        length = uabin.Primitives.Int32.unpack(data)
6793
        array = []
6794
        if length != -1:
6795
            for _ in range(0, length):
6796
                array.append(DiagnosticInfo.from_binary(data))
6797
        obj.DiagnosticInfos = array
6798
        return obj
6799
6800
    def __str__(self):
6801 1
        return 'TranslateBrowsePathsToNodeIdsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6802
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6803
               'Results:' + str(self.Results) + ', ' + \
6804
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6805
6806 1
    __repr__ = __str__
6807 1
6808 1
6809 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...
6810 1
    '''
6811 1
    :ivar NodesToRegister:
6812 1
    :vartype NodesToRegister: NodeId
6813 1
    '''
6814
6815 1
    ua_types = [
6816 1
6817 1
        ('NodesToRegister', 'ListOfNodeId'),
6818 1
               ]
6819 1
6820 1
    def __init__(self):
6821 1
        self.NodesToRegister = []
6822
        self._freeze = True
6823 1
6824
    def to_binary(self):
6825 1
        packet = []
6826
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRegister)))
6827 1
        for fieldname in self.NodesToRegister:
6828 1
            packet.append(fieldname.to_binary())
6829 1
        return b''.join(packet)
6830 1
6831 1
    @staticmethod
6832 1
    def from_binary(data):
6833 1
        obj = RegisterNodesParameters()
6834 1
        length = uabin.Primitives.Int32.unpack(data)
6835
        array = []
6836 1
        if length != -1:
6837
            for _ in range(0, length):
6838
                array.append(NodeId.from_binary(data))
6839
        obj.NodesToRegister = array
6840 1
        return obj
6841
6842
    def __str__(self):
6843 1
        return 'RegisterNodesParameters(' + 'NodesToRegister:' + str(self.NodesToRegister) + ')'
6844
6845
    __repr__ = __str__
6846
6847
6848
class RegisterNodesRequest(FrozenClass):
6849 1
    '''
6850
    Registers one or more nodes for repeated use within a session.
6851
6852
    :ivar TypeId:
6853 1
    :vartype TypeId: NodeId
6854 1
    :ivar RequestHeader:
6855 1
    :vartype RequestHeader: RequestHeader
6856 1
    :ivar Parameters:
6857 1
    :vartype Parameters: RegisterNodesParameters
6858 1
    '''
6859 1
6860
    ua_types = [
6861 1
6862 1
        ('TypeId', 'NodeId'),
6863 1
        ('RequestHeader', 'RequestHeader'),
6864 1
        ('Parameters', 'RegisterNodesParameters'),
6865 1
               ]
6866 1
6867
    def __init__(self):
6868 1
        self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary)
6869
        self.RequestHeader = RequestHeader()
6870 1
        self.Parameters = RegisterNodesParameters()
6871
        self._freeze = True
6872 1
6873 1
    def to_binary(self):
6874 1
        packet = []
6875 1
        packet.append(self.TypeId.to_binary())
6876 1
        packet.append(self.RequestHeader.to_binary())
6877 1
        packet.append(self.Parameters.to_binary())
6878 1
        return b''.join(packet)
6879
6880 1
    @staticmethod
6881
    def from_binary(data):
6882
        obj = RegisterNodesRequest()
6883 1
        obj.TypeId = NodeId.from_binary(data)
6884
        obj.RequestHeader = RequestHeader.from_binary(data)
6885
        obj.Parameters = RegisterNodesParameters.from_binary(data)
6886 1
        return obj
6887
6888
    def __str__(self):
6889
        return 'RegisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6890
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
6891
               'Parameters:' + str(self.Parameters) + ')'
6892
6893
    __repr__ = __str__
6894
6895
6896 View Code Duplication
class RegisterNodesResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6897
    '''
6898 1
    :ivar RegisteredNodeIds:
6899
    :vartype RegisteredNodeIds: NodeId
6900
    '''
6901
6902
    ua_types = [
6903
6904 1
        ('RegisteredNodeIds', 'ListOfNodeId'),
6905 1
               ]
6906
6907
    def __init__(self):
6908
        self.RegisteredNodeIds = []
6909 1
        self._freeze = True
6910 1
6911 1
    def to_binary(self):
6912 1
        packet = []
6913
        packet.append(uabin.Primitives.Int32.pack(len(self.RegisteredNodeIds)))
6914 1
        for fieldname in self.RegisteredNodeIds:
6915 1
            packet.append(fieldname.to_binary())
6916 1
        return b''.join(packet)
6917 1
6918 1
    @staticmethod
6919 1
    def from_binary(data):
6920
        obj = RegisterNodesResult()
6921 1
        length = uabin.Primitives.Int32.unpack(data)
6922
        array = []
6923
        if length != -1:
6924
            for _ in range(0, length):
6925 1
                array.append(NodeId.from_binary(data))
6926
        obj.RegisteredNodeIds = array
6927
        return obj
6928
6929
    def __str__(self):
6930 1
        return 'RegisterNodesResult(' + 'RegisteredNodeIds:' + str(self.RegisteredNodeIds) + ')'
6931
6932
    __repr__ = __str__
6933
6934
6935 1
class RegisterNodesResponse(FrozenClass):
6936
    '''
6937
    Registers one or more nodes for repeated use within a session.
6938 1
6939
    :ivar TypeId:
6940
    :vartype TypeId: NodeId
6941
    :ivar ResponseHeader:
6942
    :vartype ResponseHeader: ResponseHeader
6943
    :ivar Parameters:
6944
    :vartype Parameters: RegisterNodesResult
6945
    '''
6946
6947
    ua_types = [
6948
6949
        ('TypeId', 'NodeId'),
6950
        ('ResponseHeader', 'ResponseHeader'),
6951
        ('Parameters', 'RegisterNodesResult'),
6952 1
               ]
6953
6954
    def __init__(self):
6955
        self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary)
6956
        self.ResponseHeader = ResponseHeader()
6957
        self.Parameters = RegisterNodesResult()
6958
        self._freeze = True
6959 1
6960 1
    def to_binary(self):
6961 1
        packet = []
6962 1
        packet.append(self.TypeId.to_binary())
6963 1
        packet.append(self.ResponseHeader.to_binary())
6964 1
        packet.append(self.Parameters.to_binary())
6965 1
        return b''.join(packet)
6966 1
6967 1
    @staticmethod
6968 1
    def from_binary(data):
6969
        obj = RegisterNodesResponse()
6970 1
        obj.TypeId = NodeId.from_binary(data)
6971 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
6972 1
        obj.Parameters = RegisterNodesResult.from_binary(data)
6973 1
        return obj
6974 1
6975 1
    def __str__(self):
6976 1
        return 'RegisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6977 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6978 1
               'Parameters:' + str(self.Parameters) + ')'
6979
6980 1
    __repr__ = __str__
6981
6982 1
6983 View Code Duplication
class UnregisterNodesParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
6984 1
    '''
6985
    :ivar NodesToUnregister:
6986 1
    :vartype NodesToUnregister: NodeId
6987 1
    '''
6988 1
6989 1
    ua_types = [
6990 1
6991 1
        ('NodesToUnregister', 'ListOfNodeId'),
6992 1
               ]
6993 1
6994 1
    def __init__(self):
6995 1
        self.NodesToUnregister = []
6996 1
        self._freeze = True
6997 1
6998 1
    def to_binary(self):
6999
        packet = []
7000 1
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToUnregister)))
7001
        for fieldname in self.NodesToUnregister:
7002 1
            packet.append(fieldname.to_binary())
7003
        return b''.join(packet)
7004
7005
    @staticmethod
7006
    def from_binary(data):
7007
        obj = UnregisterNodesParameters()
7008 1
        length = uabin.Primitives.Int32.unpack(data)
7009
        array = []
7010
        if length != -1:
7011 1
            for _ in range(0, length):
7012
                array.append(NodeId.from_binary(data))
7013
        obj.NodesToUnregister = array
7014
        return obj
7015
7016
    def __str__(self):
7017 1
        return 'UnregisterNodesParameters(' + 'NodesToUnregister:' + str(self.NodesToUnregister) + ')'
7018
7019
    __repr__ = __str__
7020
7021 1
7022
class UnregisterNodesRequest(FrozenClass):
7023
    '''
7024
    Unregisters one or more previously registered nodes.
7025
7026
    :ivar TypeId:
7027
    :vartype TypeId: NodeId
7028
    :ivar RequestHeader:
7029 1
    :vartype RequestHeader: RequestHeader
7030
    :ivar Parameters:
7031
    :vartype Parameters: UnregisterNodesParameters
7032
    '''
7033
7034
    ua_types = [
7035
7036 1
        ('TypeId', 'NodeId'),
7037
        ('RequestHeader', 'RequestHeader'),
7038
        ('Parameters', 'UnregisterNodesParameters'),
7039
               ]
7040 1
7041
    def __init__(self):
7042
        self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary)
7043
        self.RequestHeader = RequestHeader()
7044
        self.Parameters = UnregisterNodesParameters()
7045
        self._freeze = True
7046
7047
    def to_binary(self):
7048 1
        packet = []
7049
        packet.append(self.TypeId.to_binary())
7050
        packet.append(self.RequestHeader.to_binary())
7051 1
        packet.append(self.Parameters.to_binary())
7052
        return b''.join(packet)
7053
7054 1
    @staticmethod
7055
    def from_binary(data):
7056
        obj = UnregisterNodesRequest()
7057
        obj.TypeId = NodeId.from_binary(data)
7058
        obj.RequestHeader = RequestHeader.from_binary(data)
7059
        obj.Parameters = UnregisterNodesParameters.from_binary(data)
7060
        return obj
7061
7062
    def __str__(self):
7063
        return 'UnregisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7064
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
7065
               'Parameters:' + str(self.Parameters) + ')'
7066 1
7067
    __repr__ = __str__
7068
7069
7070 View Code Duplication
class UnregisterNodesResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7071
    '''
7072 1
    Unregisters one or more previously registered nodes.
7073
7074
    :ivar TypeId:
7075
    :vartype TypeId: NodeId
7076
    :ivar ResponseHeader:
7077
    :vartype ResponseHeader: ResponseHeader
7078
    '''
7079
7080
    ua_types = [
7081
7082 1
        ('TypeId', 'NodeId'),
7083
        ('ResponseHeader', 'ResponseHeader'),
7084
               ]
7085
7086
    def __init__(self):
7087
        self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary)
7088
        self.ResponseHeader = ResponseHeader()
7089 1
        self._freeze = True
7090
7091
    def to_binary(self):
7092
        packet = []
7093 1
        packet.append(self.TypeId.to_binary())
7094
        packet.append(self.ResponseHeader.to_binary())
7095
        return b''.join(packet)
7096
7097
    @staticmethod
7098 1
    def from_binary(data):
7099
        obj = UnregisterNodesResponse()
7100
        obj.TypeId = NodeId.from_binary(data)
7101
        obj.ResponseHeader = ResponseHeader.from_binary(data)
7102
        return obj
7103 1
7104
    def __str__(self):
7105
        return 'UnregisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7106 1
               'ResponseHeader:' + str(self.ResponseHeader) + ')'
7107
7108
    __repr__ = __str__
7109
7110
7111
class EndpointConfiguration(FrozenClass):
7112 1
    '''
7113
    :ivar OperationTimeout:
7114
    :vartype OperationTimeout: Int32
7115
    :ivar UseBinaryEncoding:
7116 1
    :vartype UseBinaryEncoding: Boolean
7117
    :ivar MaxStringLength:
7118
    :vartype MaxStringLength: Int32
7119
    :ivar MaxByteStringLength:
7120
    :vartype MaxByteStringLength: Int32
7121
    :ivar MaxArrayLength:
7122
    :vartype MaxArrayLength: Int32
7123
    :ivar MaxMessageSize:
7124 1
    :vartype MaxMessageSize: Int32
7125
    :ivar MaxBufferSize:
7126
    :vartype MaxBufferSize: Int32
7127
    :ivar ChannelLifetime:
7128
    :vartype ChannelLifetime: Int32
7129
    :ivar SecurityTokenLifetime:
7130
    :vartype SecurityTokenLifetime: Int32
7131 1
    '''
7132
7133
    ua_types = [
7134
7135 1
        ('OperationTimeout', 'Int32'),
7136
        ('UseBinaryEncoding', 'Boolean'),
7137
        ('MaxStringLength', 'Int32'),
7138
        ('MaxByteStringLength', 'Int32'),
7139
        ('MaxArrayLength', 'Int32'),
7140
        ('MaxMessageSize', 'Int32'),
7141
        ('MaxBufferSize', 'Int32'),
7142
        ('ChannelLifetime', 'Int32'),
7143 1
        ('SecurityTokenLifetime', 'Int32'),
7144
               ]
7145
7146 1
    def __init__(self):
7147
        self.OperationTimeout = 0
7148
        self.UseBinaryEncoding = True
7149 1
        self.MaxStringLength = 0
7150
        self.MaxByteStringLength = 0
7151
        self.MaxArrayLength = 0
7152
        self.MaxMessageSize = 0
7153
        self.MaxBufferSize = 0
7154
        self.ChannelLifetime = 0
7155
        self.SecurityTokenLifetime = 0
7156
        self._freeze = True
7157
7158
    def to_binary(self):
7159
        packet = []
7160
        packet.append(uabin.Primitives.Int32.pack(self.OperationTimeout))
7161 1
        packet.append(uabin.Primitives.Boolean.pack(self.UseBinaryEncoding))
7162
        packet.append(uabin.Primitives.Int32.pack(self.MaxStringLength))
7163
        packet.append(uabin.Primitives.Int32.pack(self.MaxByteStringLength))
7164
        packet.append(uabin.Primitives.Int32.pack(self.MaxArrayLength))
7165
        packet.append(uabin.Primitives.Int32.pack(self.MaxMessageSize))
7166
        packet.append(uabin.Primitives.Int32.pack(self.MaxBufferSize))
7167 1
        packet.append(uabin.Primitives.Int32.pack(self.ChannelLifetime))
7168
        packet.append(uabin.Primitives.Int32.pack(self.SecurityTokenLifetime))
7169
        return b''.join(packet)
7170
7171
    @staticmethod
7172
    def from_binary(data):
7173
        obj = EndpointConfiguration()
7174
        self.OperationTimeout = uabin.Primitives.Int32.unpack(data)
7175
        self.UseBinaryEncoding = uabin.Primitives.Boolean.unpack(data)
7176
        self.MaxStringLength = uabin.Primitives.Int32.unpack(data)
7177 1
        self.MaxByteStringLength = uabin.Primitives.Int32.unpack(data)
7178
        self.MaxArrayLength = uabin.Primitives.Int32.unpack(data)
7179
        self.MaxMessageSize = uabin.Primitives.Int32.unpack(data)
7180
        self.MaxBufferSize = uabin.Primitives.Int32.unpack(data)
7181
        self.ChannelLifetime = uabin.Primitives.Int32.unpack(data)
7182
        self.SecurityTokenLifetime = uabin.Primitives.Int32.unpack(data)
7183
        return obj
7184 1
7185
    def __str__(self):
7186
        return 'EndpointConfiguration(' + 'OperationTimeout:' + str(self.OperationTimeout) + ', ' + \
7187
               'UseBinaryEncoding:' + str(self.UseBinaryEncoding) + ', ' + \
7188 1
               'MaxStringLength:' + str(self.MaxStringLength) + ', ' + \
7189
               'MaxByteStringLength:' + str(self.MaxByteStringLength) + ', ' + \
7190
               'MaxArrayLength:' + str(self.MaxArrayLength) + ', ' + \
7191
               'MaxMessageSize:' + str(self.MaxMessageSize) + ', ' + \
7192
               'MaxBufferSize:' + str(self.MaxBufferSize) + ', ' + \
7193 1
               'ChannelLifetime:' + str(self.ChannelLifetime) + ', ' + \
7194
               'SecurityTokenLifetime:' + str(self.SecurityTokenLifetime) + ')'
7195
7196
    __repr__ = __str__
7197
7198 1
7199
class SupportedProfile(FrozenClass):
7200
    '''
7201 1
    :ivar OrganizationUri:
7202
    :vartype OrganizationUri: String
7203
    :ivar ProfileId:
7204
    :vartype ProfileId: String
7205
    :ivar ComplianceTool:
7206
    :vartype ComplianceTool: String
7207 1
    :ivar ComplianceDate:
7208
    :vartype ComplianceDate: DateTime
7209
    :ivar ComplianceLevel:
7210
    :vartype ComplianceLevel: ComplianceLevel
7211 1
    :ivar UnsupportedUnitIds:
7212
    :vartype UnsupportedUnitIds: String
7213
    '''
7214
7215
    ua_types = [
7216
7217
        ('OrganizationUri', 'String'),
7218
        ('ProfileId', 'String'),
7219 1
        ('ComplianceTool', 'String'),
7220
        ('ComplianceDate', 'DateTime'),
7221
        ('ComplianceLevel', 'ComplianceLevel'),
7222
        ('UnsupportedUnitIds', 'ListOfString'),
7223
               ]
7224
7225
    def __init__(self):
7226 1
        self.OrganizationUri = None
7227
        self.ProfileId = None
7228
        self.ComplianceTool = None
7229
        self.ComplianceDate = datetime.utcnow()
7230 1
        self.ComplianceLevel = ComplianceLevel(0)
7231
        self.UnsupportedUnitIds = []
7232
        self._freeze = True
7233
7234 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...
7235
        packet = []
7236
        packet.append(uabin.Primitives.String.pack(self.OrganizationUri))
7237
        packet.append(uabin.Primitives.String.pack(self.ProfileId))
7238 1
        packet.append(uabin.Primitives.String.pack(self.ComplianceTool))
7239
        packet.append(uabin.Primitives.DateTime.pack(self.ComplianceDate))
7240
        packet.append(uabin.Primitives.UInt32.pack(self.ComplianceLevel.value))
7241 1
        packet.append(uabin.Primitives.Int32.pack(len(self.UnsupportedUnitIds)))
7242
        for fieldname in self.UnsupportedUnitIds:
7243
            packet.append(uabin.Primitives.String.pack(fieldname))
7244 1
        return b''.join(packet)
7245
7246
    @staticmethod
7247
    def from_binary(data):
7248
        obj = SupportedProfile()
7249
        self.OrganizationUri = uabin.Primitives.String.unpack(data)
7250
        self.ProfileId = uabin.Primitives.String.unpack(data)
7251
        self.ComplianceTool = uabin.Primitives.String.unpack(data)
7252
        self.ComplianceDate = uabin.Primitives.DateTime.unpack(data)
7253
        self.ComplianceLevel = ComplianceLevel(uabin.Primitives.UInt32.unpack(data))
7254
        obj.UnsupportedUnitIds = uabin.Primitives.String.unpack_array(data)
7255
        return obj
7256 1
7257
    def __str__(self):
7258
        return 'SupportedProfile(' + 'OrganizationUri:' + str(self.OrganizationUri) + ', ' + \
7259
               'ProfileId:' + str(self.ProfileId) + ', ' + \
7260
               'ComplianceTool:' + str(self.ComplianceTool) + ', ' + \
7261
               'ComplianceDate:' + str(self.ComplianceDate) + ', ' + \
7262 1
               'ComplianceLevel:' + str(self.ComplianceLevel) + ', ' + \
7263
               'UnsupportedUnitIds:' + str(self.UnsupportedUnitIds) + ')'
7264
7265
    __repr__ = __str__
7266
7267
7268
class SoftwareCertificate(FrozenClass):
7269
    '''
7270
    :ivar ProductName:
7271
    :vartype ProductName: String
7272 1
    :ivar ProductUri:
7273
    :vartype ProductUri: String
7274
    :ivar VendorName:
7275
    :vartype VendorName: String
7276
    :ivar VendorProductCertificate:
7277
    :vartype VendorProductCertificate: ByteString
7278
    :ivar SoftwareVersion:
7279 1
    :vartype SoftwareVersion: String
7280
    :ivar BuildNumber:
7281
    :vartype BuildNumber: String
7282
    :ivar BuildDate:
7283 1
    :vartype BuildDate: DateTime
7284
    :ivar IssuedBy:
7285
    :vartype IssuedBy: String
7286
    :ivar IssueDate:
7287
    :vartype IssueDate: DateTime
7288 1
    :ivar SupportedProfiles:
7289
    :vartype SupportedProfiles: SupportedProfile
7290
    '''
7291
7292
    ua_types = [
7293 1
7294
        ('ProductName', 'String'),
7295
        ('ProductUri', 'String'),
7296 1
        ('VendorName', 'String'),
7297
        ('VendorProductCertificate', 'ByteString'),
7298
        ('SoftwareVersion', 'String'),
7299
        ('BuildNumber', 'String'),
7300
        ('BuildDate', 'DateTime'),
7301
        ('IssuedBy', 'String'),
7302
        ('IssueDate', 'DateTime'),
7303
        ('SupportedProfiles', 'ListOfSupportedProfile'),
7304
               ]
7305
7306 1
    def __init__(self):
7307
        self.ProductName = None
7308
        self.ProductUri = None
7309
        self.VendorName = None
7310
        self.VendorProductCertificate = None
7311 1
        self.SoftwareVersion = None
7312
        self.BuildNumber = None
7313
        self.BuildDate = datetime.utcnow()
7314
        self.IssuedBy = None
7315
        self.IssueDate = datetime.utcnow()
7316
        self.SupportedProfiles = []
7317
        self._freeze = True
7318
7319
    def to_binary(self):
7320 1
        packet = []
7321
        packet.append(uabin.Primitives.String.pack(self.ProductName))
7322
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
7323
        packet.append(uabin.Primitives.String.pack(self.VendorName))
7324
        packet.append(uabin.Primitives.ByteString.pack(self.VendorProductCertificate))
7325
        packet.append(uabin.Primitives.String.pack(self.SoftwareVersion))
7326 1
        packet.append(uabin.Primitives.String.pack(self.BuildNumber))
7327
        packet.append(uabin.Primitives.DateTime.pack(self.BuildDate))
7328
        packet.append(uabin.Primitives.String.pack(self.IssuedBy))
7329
        packet.append(uabin.Primitives.DateTime.pack(self.IssueDate))
7330 1
        packet.append(uabin.Primitives.Int32.pack(len(self.SupportedProfiles)))
7331
        for fieldname in self.SupportedProfiles:
7332
            packet.append(fieldname.to_binary())
7333
        return b''.join(packet)
7334 1
7335
    @staticmethod
7336
    def from_binary(data):
7337
        obj = SoftwareCertificate()
7338 1
        self.ProductName = uabin.Primitives.String.unpack(data)
7339
        self.ProductUri = uabin.Primitives.String.unpack(data)
7340
        self.VendorName = uabin.Primitives.String.unpack(data)
7341 1
        self.VendorProductCertificate = uabin.Primitives.ByteString.unpack(data)
7342
        self.SoftwareVersion = uabin.Primitives.String.unpack(data)
7343
        self.BuildNumber = uabin.Primitives.String.unpack(data)
7344
        self.BuildDate = uabin.Primitives.DateTime.unpack(data)
7345
        self.IssuedBy = uabin.Primitives.String.unpack(data)
7346
        self.IssueDate = uabin.Primitives.DateTime.unpack(data)
7347
        length = uabin.Primitives.Int32.unpack(data)
7348
        array = []
7349
        if length != -1:
7350
            for _ in range(0, length):
7351
                array.append(SupportedProfile.from_binary(data))
7352
        obj.SupportedProfiles = array
7353
        return obj
7354
7355
    def __str__(self):
7356
        return 'SoftwareCertificate(' + 'ProductName:' + str(self.ProductName) + ', ' + \
7357
               'ProductUri:' + str(self.ProductUri) + ', ' + \
7358
               'VendorName:' + str(self.VendorName) + ', ' + \
7359
               'VendorProductCertificate:' + str(self.VendorProductCertificate) + ', ' + \
7360
               'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \
7361
               'BuildNumber:' + str(self.BuildNumber) + ', ' + \
7362
               'BuildDate:' + str(self.BuildDate) + ', ' + \
7363 1
               'IssuedBy:' + str(self.IssuedBy) + ', ' + \
7364
               'IssueDate:' + str(self.IssueDate) + ', ' + \
7365
               'SupportedProfiles:' + str(self.SupportedProfiles) + ')'
7366
7367
    __repr__ = __str__
7368
7369
7370 View Code Duplication
class QueryDataDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7371
    '''
7372
    :ivar RelativePath:
7373
    :vartype RelativePath: RelativePath
7374
    :ivar AttributeId:
7375 1
    :vartype AttributeId: UInt32
7376
    :ivar IndexRange:
7377
    :vartype IndexRange: String
7378
    '''
7379
7380
    ua_types = [
7381
7382
        ('RelativePath', 'RelativePath'),
7383
        ('AttributeId', 'UInt32'),
7384
        ('IndexRange', 'String'),
7385
               ]
7386
7387
    def __init__(self):
7388
        self.RelativePath = RelativePath()
7389
        self.AttributeId = 0
7390
        self.IndexRange = None
7391 1
        self._freeze = True
7392
7393
    def to_binary(self):
7394
        packet = []
7395
        packet.append(self.RelativePath.to_binary())
7396
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
7397
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
7398
        return b''.join(packet)
7399
7400
    @staticmethod
7401
    def from_binary(data):
7402
        obj = QueryDataDescription()
7403
        obj.RelativePath = RelativePath.from_binary(data)
7404 1
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
7405
        self.IndexRange = uabin.Primitives.String.unpack(data)
7406
        return obj
7407
7408 1
    def __str__(self):
7409
        return 'QueryDataDescription(' + 'RelativePath:' + str(self.RelativePath) + ', ' + \
7410
               'AttributeId:' + str(self.AttributeId) + ', ' + \
7411
               'IndexRange:' + str(self.IndexRange) + ')'
7412
7413
    __repr__ = __str__
7414
7415
7416 View Code Duplication
class NodeTypeDescription(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7417
    '''
7418
    :ivar TypeDefinitionNode:
7419 1
    :vartype TypeDefinitionNode: ExpandedNodeId
7420
    :ivar IncludeSubTypes:
7421
    :vartype IncludeSubTypes: Boolean
7422
    :ivar DataToReturn:
7423
    :vartype DataToReturn: QueryDataDescription
7424
    '''
7425
7426
    ua_types = [
7427
7428
        ('TypeDefinitionNode', 'ExpandedNodeId'),
7429
        ('IncludeSubTypes', 'Boolean'),
7430 1
        ('DataToReturn', 'ListOfQueryDataDescription'),
7431
               ]
7432
7433 1
    def __init__(self):
7434
        self.TypeDefinitionNode = ExpandedNodeId()
7435
        self.IncludeSubTypes = True
7436
        self.DataToReturn = []
7437
        self._freeze = True
7438
7439
    def to_binary(self):
7440
        packet = []
7441
        packet.append(self.TypeDefinitionNode.to_binary())
7442
        packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubTypes))
7443
        packet.append(uabin.Primitives.Int32.pack(len(self.DataToReturn)))
7444
        for fieldname in self.DataToReturn:
7445
            packet.append(fieldname.to_binary())
7446
        return b''.join(packet)
7447
7448
    @staticmethod
7449 1
    def from_binary(data):
7450
        obj = NodeTypeDescription()
7451
        obj.TypeDefinitionNode = ExpandedNodeId.from_binary(data)
7452
        self.IncludeSubTypes = uabin.Primitives.Boolean.unpack(data)
7453
        length = uabin.Primitives.Int32.unpack(data)
7454
        array = []
7455
        if length != -1:
7456
            for _ in range(0, length):
7457
                array.append(QueryDataDescription.from_binary(data))
7458 1
        obj.DataToReturn = array
7459
        return obj
7460
7461
    def __str__(self):
7462
        return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \
7463
               'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \
7464
               'DataToReturn:' + str(self.DataToReturn) + ')'
7465
7466
    __repr__ = __str__
7467
7468
7469 View Code Duplication
class QueryDataSet(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7470
    '''
7471 1
    :ivar NodeId:
7472
    :vartype NodeId: ExpandedNodeId
7473
    :ivar TypeDefinitionNode:
7474
    :vartype TypeDefinitionNode: ExpandedNodeId
7475
    :ivar Values:
7476
    :vartype Values: Variant
7477
    '''
7478
7479
    ua_types = [
7480
7481
        ('NodeId', 'ExpandedNodeId'),
7482
        ('TypeDefinitionNode', 'ExpandedNodeId'),
7483 1
        ('Values', 'ListOfVariant'),
7484
               ]
7485
7486
    def __init__(self):
7487 1
        self.NodeId = ExpandedNodeId()
7488
        self.TypeDefinitionNode = ExpandedNodeId()
7489
        self.Values = []
7490
        self._freeze = True
7491
7492
    def to_binary(self):
7493
        packet = []
7494
        packet.append(self.NodeId.to_binary())
7495 1
        packet.append(self.TypeDefinitionNode.to_binary())
7496
        packet.append(uabin.Primitives.Int32.pack(len(self.Values)))
7497
        for fieldname in self.Values:
7498
            packet.append(fieldname.to_binary())
7499
        return b''.join(packet)
7500
7501
    @staticmethod
7502
    def from_binary(data):
7503 1
        obj = QueryDataSet()
7504
        obj.NodeId = ExpandedNodeId.from_binary(data)
7505
        obj.TypeDefinitionNode = ExpandedNodeId.from_binary(data)
7506 1
        length = uabin.Primitives.Int32.unpack(data)
7507
        array = []
7508
        if length != -1:
7509
            for _ in range(0, length):
7510
                array.append(Variant.from_binary(data))
7511
        obj.Values = array
7512
        return obj
7513
7514
    def __str__(self):
7515
        return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \
7516
               'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \
7517
               'Values:' + str(self.Values) + ')'
7518
7519
    __repr__ = __str__
7520
7521
7522 View Code Duplication
class NodeReference(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7523
    '''
7524
    :ivar NodeId:
7525
    :vartype NodeId: NodeId
7526
    :ivar ReferenceTypeId:
7527
    :vartype ReferenceTypeId: NodeId
7528
    :ivar IsForward:
7529
    :vartype IsForward: Boolean
7530 1
    :ivar ReferencedNodeIds:
7531
    :vartype ReferencedNodeIds: NodeId
7532
    '''
7533
7534
    ua_types = [
7535
7536
        ('NodeId', 'NodeId'),
7537
        ('ReferenceTypeId', 'NodeId'),
7538
        ('IsForward', 'Boolean'),
7539
        ('ReferencedNodeIds', 'ListOfNodeId'),
7540
               ]
7541
7542
    def __init__(self):
7543 1
        self.NodeId = NodeId()
7544
        self.ReferenceTypeId = NodeId()
7545
        self.IsForward = True
7546
        self.ReferencedNodeIds = []
7547
        self._freeze = True
7548
7549
    def to_binary(self):
7550
        packet = []
7551
        packet.append(self.NodeId.to_binary())
7552
        packet.append(self.ReferenceTypeId.to_binary())
7553
        packet.append(uabin.Primitives.Boolean.pack(self.IsForward))
7554
        packet.append(uabin.Primitives.Int32.pack(len(self.ReferencedNodeIds)))
7555
        for fieldname in self.ReferencedNodeIds:
7556
            packet.append(fieldname.to_binary())
7557
        return b''.join(packet)
7558
7559
    @staticmethod
7560 1
    def from_binary(data):
7561
        obj = NodeReference()
7562
        obj.NodeId = NodeId.from_binary(data)
7563
        obj.ReferenceTypeId = NodeId.from_binary(data)
7564
        self.IsForward = uabin.Primitives.Boolean.unpack(data)
7565
        length = uabin.Primitives.Int32.unpack(data)
7566
        array = []
7567
        if length != -1:
7568
            for _ in range(0, length):
7569
                array.append(NodeId.from_binary(data))
7570
        obj.ReferencedNodeIds = array
7571
        return obj
7572
7573
    def __str__(self):
7574
        return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \
7575
               'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \
7576 1
               'IsForward:' + str(self.IsForward) + ', ' + \
7577
               'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')'
7578
7579
    __repr__ = __str__
7580 1
7581
7582 View Code Duplication
class ContentFilterElement(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7583
    '''
7584
    :ivar FilterOperator:
7585
    :vartype FilterOperator: FilterOperator
7586
    :ivar FilterOperands:
7587
    :vartype FilterOperands: ExtensionObject
7588
    '''
7589
7590
    ua_types = [
7591
7592
        ('FilterOperator', 'FilterOperator'),
7593
        ('FilterOperands', 'ListOfExtensionObject'),
7594
               ]
7595
7596
    def __init__(self):
7597 1
        self.FilterOperator = FilterOperator(0)
7598
        self.FilterOperands = []
7599
        self._freeze = True
7600
7601
    def to_binary(self):
7602
        packet = []
7603
        packet.append(uabin.Primitives.UInt32.pack(self.FilterOperator.value))
7604
        packet.append(uabin.Primitives.Int32.pack(len(self.FilterOperands)))
7605
        for fieldname in self.FilterOperands:
7606
            packet.append(uabin.extensionobject_to_binary(fieldname))
7607
        return b''.join(packet)
7608
7609 1
    @staticmethod
7610
    def from_binary(data):
7611
        obj = ContentFilterElement()
7612 1
        self.FilterOperator = FilterOperator(uabin.Primitives.UInt32.unpack(data))
7613
        length = uabin.Primitives.Int32.unpack(data)
7614
        array = []
7615
        if length != -1:
7616
            for _ in range(0, length):
7617
                array.append(uabin.extensionobject_from_binary(data))
7618
        obj.FilterOperands = array
7619
        return obj
7620
7621
    def __str__(self):
7622 1
        return 'ContentFilterElement(' + 'FilterOperator:' + str(self.FilterOperator) + ', ' + \
7623
               'FilterOperands:' + str(self.FilterOperands) + ')'
7624
7625
    __repr__ = __str__
7626
7627
7628 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...
7629
    '''
7630
    :ivar Elements:
7631
    :vartype Elements: ContentFilterElement
7632
    '''
7633
7634
    ua_types = [
7635
7636
        ('Elements', 'ListOfContentFilterElement'),
7637
               ]
7638 1
7639
    def __init__(self):
7640
        self.Elements = []
7641
        self._freeze = True
7642
7643
    def to_binary(self):
7644
        packet = []
7645 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Elements)))
7646
        for fieldname in self.Elements:
7647
            packet.append(fieldname.to_binary())
7648
        return b''.join(packet)
7649 1
7650
    @staticmethod
7651
    def from_binary(data):
7652
        obj = ContentFilter()
7653
        length = uabin.Primitives.Int32.unpack(data)
7654 1
        array = []
7655
        if length != -1:
7656
            for _ in range(0, length):
7657
                array.append(ContentFilterElement.from_binary(data))
7658
        obj.Elements = array
7659 1
        return obj
7660
7661
    def __str__(self):
7662 1
        return 'ContentFilter(' + 'Elements:' + str(self.Elements) + ')'
7663
7664
    __repr__ = __str__
7665
7666
7667 View Code Duplication
class ElementOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7668
    '''
7669
    :ivar Index:
7670
    :vartype Index: UInt32
7671
    '''
7672 1
7673
    ua_types = [
7674
7675
        ('Index', 'UInt32'),
7676
               ]
7677
7678 1
    def __init__(self):
7679
        self.Index = 0
7680
        self._freeze = True
7681
7682
    def to_binary(self):
7683
        packet = []
7684
        packet.append(uabin.Primitives.UInt32.pack(self.Index))
7685
        return b''.join(packet)
7686
7687
    @staticmethod
7688 1
    def from_binary(data):
7689
        obj = ElementOperand()
7690
        self.Index = uabin.Primitives.UInt32.unpack(data)
7691
        return obj
7692
7693
    def __str__(self):
7694
        return 'ElementOperand(' + 'Index:' + str(self.Index) + ')'
7695
7696
    __repr__ = __str__
7697 1
7698
7699
class LiteralOperand(FrozenClass):
7700
    '''
7701 1
    :ivar Value:
7702
    :vartype Value: Variant
7703
    '''
7704
7705
    ua_types = [
7706
7707
        ('Value', 'Variant'),
7708
               ]
7709
7710
    def __init__(self):
7711 1
        self.Value = Variant()
7712
        self._freeze = True
7713
7714
    def to_binary(self):
7715
        packet = []
7716 1
        packet.append(self.Value.to_binary())
7717
        return b''.join(packet)
7718
7719 1
    @staticmethod
7720
    def from_binary(data):
7721
        obj = LiteralOperand()
7722
        obj.Value = Variant.from_binary(data)
7723
        return obj
7724
7725
    def __str__(self):
7726
        return 'LiteralOperand(' + 'Value:' + str(self.Value) + ')'
7727
7728
    __repr__ = __str__
7729 1
7730
7731 View Code Duplication
class AttributeOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7732
    '''
7733
    :ivar NodeId:
7734
    :vartype NodeId: NodeId
7735 1
    :ivar Alias:
7736
    :vartype Alias: String
7737
    :ivar BrowsePath:
7738
    :vartype BrowsePath: RelativePath
7739
    :ivar AttributeId:
7740
    :vartype AttributeId: UInt32
7741
    :ivar IndexRange:
7742
    :vartype IndexRange: String
7743
    '''
7744
7745 1
    ua_types = [
7746
7747
        ('NodeId', 'NodeId'),
7748
        ('Alias', 'String'),
7749
        ('BrowsePath', 'RelativePath'),
7750
        ('AttributeId', 'UInt32'),
7751
        ('IndexRange', 'String'),
7752
               ]
7753
7754 1
    def __init__(self):
7755
        self.NodeId = NodeId()
7756
        self.Alias = None
7757
        self.BrowsePath = RelativePath()
7758 1
        self.AttributeId = 0
7759
        self.IndexRange = None
7760
        self._freeze = True
7761
7762
    def to_binary(self):
7763
        packet = []
7764
        packet.append(self.NodeId.to_binary())
7765
        packet.append(uabin.Primitives.String.pack(self.Alias))
7766
        packet.append(self.BrowsePath.to_binary())
7767
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
7768 1
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
7769
        return b''.join(packet)
7770
7771
    @staticmethod
7772
    def from_binary(data):
7773 1
        obj = AttributeOperand()
7774
        obj.NodeId = NodeId.from_binary(data)
7775
        self.Alias = uabin.Primitives.String.unpack(data)
7776 1
        obj.BrowsePath = RelativePath.from_binary(data)
7777
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
7778
        self.IndexRange = uabin.Primitives.String.unpack(data)
7779
        return obj
7780
7781
    def __str__(self):
7782
        return 'AttributeOperand(' + 'NodeId:' + str(self.NodeId) + ', ' + \
7783
               'Alias:' + str(self.Alias) + ', ' + \
7784
               'BrowsePath:' + str(self.BrowsePath) + ', ' + \
7785
               'AttributeId:' + str(self.AttributeId) + ', ' + \
7786
               'IndexRange:' + str(self.IndexRange) + ')'
7787
7788 1
    __repr__ = __str__
7789
7790
7791 View Code Duplication
class SimpleAttributeOperand(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7792
    '''
7793
    :ivar TypeDefinitionId:
7794
    :vartype TypeDefinitionId: NodeId
7795 1
    :ivar BrowsePath:
7796
    :vartype BrowsePath: QualifiedName
7797
    :ivar AttributeId:
7798
    :vartype AttributeId: UInt32
7799
    :ivar IndexRange:
7800
    :vartype IndexRange: String
7801
    '''
7802
7803
    ua_types = [
7804
7805
        ('TypeDefinitionId', 'NodeId'),
7806 1
        ('BrowsePath', 'ListOfQualifiedName'),
7807
        ('AttributeId', 'UInt32'),
7808
        ('IndexRange', 'String'),
7809
               ]
7810
7811
    def __init__(self):
7812
        self.TypeDefinitionId = NodeId()
7813
        self.BrowsePath = []
7814
        self.AttributeId = 0
7815
        self.IndexRange = None
7816 1
        self._freeze = True
7817
7818
    def to_binary(self):
7819
        packet = []
7820 1
        packet.append(self.TypeDefinitionId.to_binary())
7821
        packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePath)))
7822
        for fieldname in self.BrowsePath:
7823
            packet.append(fieldname.to_binary())
7824
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
7825
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
7826
        return b''.join(packet)
7827
7828
    @staticmethod
7829
    def from_binary(data):
7830
        obj = SimpleAttributeOperand()
7831 1
        obj.TypeDefinitionId = NodeId.from_binary(data)
7832
        length = uabin.Primitives.Int32.unpack(data)
7833
        array = []
7834
        if length != -1:
7835
            for _ in range(0, length):
7836
                array.append(QualifiedName.from_binary(data))
7837 1
        obj.BrowsePath = array
7838
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
7839
        self.IndexRange = uabin.Primitives.String.unpack(data)
7840 1
        return obj
7841
7842
    def __str__(self):
7843
        return 'SimpleAttributeOperand(' + 'TypeDefinitionId:' + str(self.TypeDefinitionId) + ', ' + \
7844
               'BrowsePath:' + str(self.BrowsePath) + ', ' + \
7845
               'AttributeId:' + str(self.AttributeId) + ', ' + \
7846
               'IndexRange:' + str(self.IndexRange) + ')'
7847
7848 1
    __repr__ = __str__
7849
7850
7851 View Code Duplication
class ContentFilterElementResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7852
    '''
7853 1
    :ivar StatusCode:
7854 1
    :vartype StatusCode: StatusCode
7855 1
    :ivar OperandStatusCodes:
7856 1
    :vartype OperandStatusCodes: StatusCode
7857 1
    :ivar OperandDiagnosticInfos:
7858 1
    :vartype OperandDiagnosticInfos: DiagnosticInfo
7859 1
    '''
7860 1
7861
    ua_types = [
7862 1
7863 1
        ('StatusCode', 'StatusCode'),
7864 1
        ('OperandStatusCodes', 'ListOfStatusCode'),
7865 1
        ('OperandDiagnosticInfos', 'ListOfDiagnosticInfo'),
7866 1
               ]
7867 1
7868 1
    def __init__(self):
7869
        self.StatusCode = StatusCode()
7870 1
        self.OperandStatusCodes = []
7871
        self.OperandDiagnosticInfos = []
7872 1
        self._freeze = True
7873
7874 1
    def to_binary(self):
7875 1
        packet = []
7876 1
        packet.append(self.StatusCode.to_binary())
7877 1
        packet.append(uabin.Primitives.Int32.pack(len(self.OperandStatusCodes)))
7878 1
        for fieldname in self.OperandStatusCodes:
7879 1
            packet.append(fieldname.to_binary())
7880 1
        packet.append(uabin.Primitives.Int32.pack(len(self.OperandDiagnosticInfos)))
7881 1
        for fieldname in self.OperandDiagnosticInfos:
7882
            packet.append(fieldname.to_binary())
7883 1
        return b''.join(packet)
7884
7885
    @staticmethod
7886
    def from_binary(data):
7887 1
        obj = ContentFilterElementResult()
7888
        obj.StatusCode = StatusCode.from_binary(data)
7889
        length = uabin.Primitives.Int32.unpack(data)
7890 1
        array = []
7891
        if length != -1:
7892
            for _ in range(0, length):
7893
                array.append(StatusCode.from_binary(data))
7894
        obj.OperandStatusCodes = array
7895
        length = uabin.Primitives.Int32.unpack(data)
7896 1
        array = []
7897
        if length != -1:
7898
            for _ in range(0, length):
7899
                array.append(DiagnosticInfo.from_binary(data))
7900 1
        obj.OperandDiagnosticInfos = array
7901 1
        return obj
7902 1
7903 1
    def __str__(self):
7904 1
        return 'ContentFilterElementResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
7905 1
               'OperandStatusCodes:' + str(self.OperandStatusCodes) + ', ' + \
7906 1
               'OperandDiagnosticInfos:' + str(self.OperandDiagnosticInfos) + ')'
7907
7908 1
    __repr__ = __str__
7909 1
7910 1
7911 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...
7912 1
    '''
7913 1
    :ivar ElementResults:
7914
    :vartype ElementResults: ContentFilterElementResult
7915 1
    :ivar ElementDiagnosticInfos:
7916
    :vartype ElementDiagnosticInfos: DiagnosticInfo
7917 1
    '''
7918
7919 1
    ua_types = [
7920 1
7921 1
        ('ElementResults', 'ListOfContentFilterElementResult'),
7922 1
        ('ElementDiagnosticInfos', 'ListOfDiagnosticInfo'),
7923 1
               ]
7924 1
7925 1
    def __init__(self):
7926
        self.ElementResults = []
7927 1
        self.ElementDiagnosticInfos = []
7928
        self._freeze = True
7929
7930 1
    def to_binary(self):
7931
        packet = []
7932
        packet.append(uabin.Primitives.Int32.pack(len(self.ElementResults)))
7933 1
        for fieldname in self.ElementResults:
7934
            packet.append(fieldname.to_binary())
7935
        packet.append(uabin.Primitives.Int32.pack(len(self.ElementDiagnosticInfos)))
7936
        for fieldname in self.ElementDiagnosticInfos:
7937
            packet.append(fieldname.to_binary())
7938
        return b''.join(packet)
7939 1
7940
    @staticmethod
7941
    def from_binary(data):
7942
        obj = ContentFilterResult()
7943 1
        length = uabin.Primitives.Int32.unpack(data)
7944
        array = []
7945
        if length != -1:
7946
            for _ in range(0, length):
7947
                array.append(ContentFilterElementResult.from_binary(data))
7948
        obj.ElementResults = array
7949
        length = uabin.Primitives.Int32.unpack(data)
7950
        array = []
7951 1
        if length != -1:
7952
            for _ in range(0, length):
7953
                array.append(DiagnosticInfo.from_binary(data))
7954
        obj.ElementDiagnosticInfos = array
7955
        return obj
7956 1
7957
    def __str__(self):
7958
        return 'ContentFilterResult(' + 'ElementResults:' + str(self.ElementResults) + ', ' + \
7959
               'ElementDiagnosticInfos:' + str(self.ElementDiagnosticInfos) + ')'
7960 1
7961
    __repr__ = __str__
7962
7963 1
7964 View Code Duplication
class ParsingResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
7965
    '''
7966 1
    :ivar StatusCode:
7967
    :vartype StatusCode: StatusCode
7968
    :ivar DataStatusCodes:
7969 1
    :vartype DataStatusCodes: StatusCode
7970
    :ivar DataDiagnosticInfos:
7971
    :vartype DataDiagnosticInfos: DiagnosticInfo
7972
    '''
7973
7974
    ua_types = [
7975 1
7976
        ('StatusCode', 'StatusCode'),
7977
        ('DataStatusCodes', 'ListOfStatusCode'),
7978
        ('DataDiagnosticInfos', 'ListOfDiagnosticInfo'),
7979 1
               ]
7980 1
7981 1
    def __init__(self):
7982 1
        self.StatusCode = StatusCode()
7983 1
        self.DataStatusCodes = []
7984 1
        self.DataDiagnosticInfos = []
7985 1
        self._freeze = True
7986
7987 1
    def to_binary(self):
7988 1
        packet = []
7989 1
        packet.append(self.StatusCode.to_binary())
7990 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DataStatusCodes)))
7991
        for fieldname in self.DataStatusCodes:
7992 1
            packet.append(fieldname.to_binary())
7993
        packet.append(uabin.Primitives.Int32.pack(len(self.DataDiagnosticInfos)))
7994 1
        for fieldname in self.DataDiagnosticInfos:
7995
            packet.append(fieldname.to_binary())
7996 1
        return b''.join(packet)
7997 1
7998
    @staticmethod
7999 1
    def from_binary(data):
8000
        obj = ParsingResult()
8001
        obj.StatusCode = StatusCode.from_binary(data)
8002 1
        length = uabin.Primitives.Int32.unpack(data)
8003
        array = []
8004
        if length != -1:
8005 1
            for _ in range(0, length):
8006
                array.append(StatusCode.from_binary(data))
8007
        obj.DataStatusCodes = array
8008
        length = uabin.Primitives.Int32.unpack(data)
8009
        array = []
8010
        if length != -1:
8011
            for _ in range(0, length):
8012
                array.append(DiagnosticInfo.from_binary(data))
8013
        obj.DataDiagnosticInfos = array
8014
        return obj
8015
8016
    def __str__(self):
8017
        return 'ParsingResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
8018
               'DataStatusCodes:' + str(self.DataStatusCodes) + ', ' + \
8019 1
               'DataDiagnosticInfos:' + str(self.DataDiagnosticInfos) + ')'
8020
8021
    __repr__ = __str__
8022
8023
8024 View Code Duplication
class QueryFirstParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8025
    '''
8026
    :ivar View:
8027 1
    :vartype View: ViewDescription
8028
    :ivar NodeTypes:
8029
    :vartype NodeTypes: NodeTypeDescription
8030
    :ivar Filter:
8031
    :vartype Filter: ContentFilter
8032
    :ivar MaxDataSetsToReturn:
8033
    :vartype MaxDataSetsToReturn: UInt32
8034
    :ivar MaxReferencesToReturn:
8035
    :vartype MaxReferencesToReturn: UInt32
8036
    '''
8037
8038
    ua_types = [
8039 1
8040
        ('View', 'ViewDescription'),
8041
        ('NodeTypes', 'ListOfNodeTypeDescription'),
8042
        ('Filter', 'ContentFilter'),
8043
        ('MaxDataSetsToReturn', 'UInt32'),
8044
        ('MaxReferencesToReturn', 'UInt32'),
8045
               ]
8046
8047
    def __init__(self):
8048 1
        self.View = ViewDescription()
8049
        self.NodeTypes = []
8050
        self.Filter = ContentFilter()
8051
        self.MaxDataSetsToReturn = 0
8052 1
        self.MaxReferencesToReturn = 0
8053
        self._freeze = True
8054
8055
    def to_binary(self):
8056
        packet = []
8057
        packet.append(self.View.to_binary())
8058
        packet.append(uabin.Primitives.Int32.pack(len(self.NodeTypes)))
8059 1
        for fieldname in self.NodeTypes:
8060
            packet.append(fieldname.to_binary())
8061
        packet.append(self.Filter.to_binary())
8062
        packet.append(uabin.Primitives.UInt32.pack(self.MaxDataSetsToReturn))
8063
        packet.append(uabin.Primitives.UInt32.pack(self.MaxReferencesToReturn))
8064
        return b''.join(packet)
8065
8066 1
    @staticmethod
8067
    def from_binary(data):
8068
        obj = QueryFirstParameters()
8069 1
        obj.View = ViewDescription.from_binary(data)
8070
        length = uabin.Primitives.Int32.unpack(data)
8071
        array = []
8072
        if length != -1:
8073
            for _ in range(0, length):
8074
                array.append(NodeTypeDescription.from_binary(data))
8075
        obj.NodeTypes = array
8076
        obj.Filter = ContentFilter.from_binary(data)
8077
        self.MaxDataSetsToReturn = uabin.Primitives.UInt32.unpack(data)
8078
        self.MaxReferencesToReturn = uabin.Primitives.UInt32.unpack(data)
8079
        return obj
8080
8081 1
    def __str__(self):
8082
        return 'QueryFirstParameters(' + 'View:' + str(self.View) + ', ' + \
8083
               'NodeTypes:' + str(self.NodeTypes) + ', ' + \
8084
               'Filter:' + str(self.Filter) + ', ' + \
8085
               'MaxDataSetsToReturn:' + str(self.MaxDataSetsToReturn) + ', ' + \
8086
               'MaxReferencesToReturn:' + str(self.MaxReferencesToReturn) + ')'
8087
8088 1
    __repr__ = __str__
8089 1
8090 1
8091 1
class QueryFirstRequest(FrozenClass):
8092 1
    '''
8093 1
    :ivar TypeId:
8094 1
    :vartype TypeId: NodeId
8095 1
    :ivar RequestHeader:
8096 1
    :vartype RequestHeader: RequestHeader
8097 1
    :ivar Parameters:
8098
    :vartype Parameters: QueryFirstParameters
8099 1
    '''
8100 1
8101 1
    ua_types = [
8102 1
8103 1
        ('TypeId', 'NodeId'),
8104 1
        ('RequestHeader', 'RequestHeader'),
8105 1
        ('Parameters', 'QueryFirstParameters'),
8106 1
               ]
8107 1
8108
    def __init__(self):
8109 1
        self.TypeId = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary)
8110
        self.RequestHeader = RequestHeader()
8111 1
        self.Parameters = QueryFirstParameters()
8112
        self._freeze = True
8113 1
8114 1
    def to_binary(self):
8115 1
        packet = []
8116 1
        packet.append(self.TypeId.to_binary())
8117 1
        packet.append(self.RequestHeader.to_binary())
8118 1
        packet.append(self.Parameters.to_binary())
8119 1
        return b''.join(packet)
8120 1
8121 1
    @staticmethod
8122 1
    def from_binary(data):
8123
        obj = QueryFirstRequest()
8124 1
        obj.TypeId = NodeId.from_binary(data)
8125
        obj.RequestHeader = RequestHeader.from_binary(data)
8126
        obj.Parameters = QueryFirstParameters.from_binary(data)
8127
        return obj
8128
8129
    def __str__(self):
8130 1
        return 'QueryFirstRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8131
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8132
               'Parameters:' + str(self.Parameters) + ')'
8133 1
8134
    __repr__ = __str__
8135
8136
8137
class QueryFirstResult(FrozenClass):
8138
    '''
8139
    :ivar QueryDataSets:
8140
    :vartype QueryDataSets: QueryDataSet
8141
    :ivar ContinuationPoint:
8142
    :vartype ContinuationPoint: ByteString
8143 1
    :ivar ParsingResults:
8144
    :vartype ParsingResults: ParsingResult
8145
    :ivar DiagnosticInfos:
8146
    :vartype DiagnosticInfos: DiagnosticInfo
8147
    :ivar FilterResult:
8148
    :vartype FilterResult: ContentFilterResult
8149 1
    '''
8150
8151
    ua_types = [
8152
8153
        ('QueryDataSets', 'ListOfQueryDataSet'),
8154
        ('ContinuationPoint', 'ByteString'),
8155
        ('ParsingResults', 'ListOfParsingResult'),
8156
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
8157
        ('FilterResult', 'ContentFilterResult'),
8158
               ]
8159 1
8160
    def __init__(self):
8161
        self.QueryDataSets = []
8162
        self.ContinuationPoint = None
8163
        self.ParsingResults = []
8164
        self.DiagnosticInfos = []
8165
        self.FilterResult = ContentFilterResult()
8166
        self._freeze = True
8167
8168 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...
8169
        packet = []
8170 1
        packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets)))
8171
        for fieldname in self.QueryDataSets:
8172
            packet.append(fieldname.to_binary())
8173
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8174 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ParsingResults)))
8175
        for fieldname in self.ParsingResults:
8176
            packet.append(fieldname.to_binary())
8177
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
8178
        for fieldname in self.DiagnosticInfos:
8179
            packet.append(fieldname.to_binary())
8180
        packet.append(self.FilterResult.to_binary())
8181
        return b''.join(packet)
8182
8183 View Code Duplication
    @staticmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8184
    def from_binary(data):
8185
        obj = QueryFirstResult()
8186
        length = uabin.Primitives.Int32.unpack(data)
8187
        array = []
8188
        if length != -1:
8189 1
            for _ in range(0, length):
8190
                array.append(QueryDataSet.from_binary(data))
8191
        obj.QueryDataSets = array
8192
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8193
        length = uabin.Primitives.Int32.unpack(data)
8194 1
        array = []
8195
        if length != -1:
8196
            for _ in range(0, length):
8197 1
                array.append(ParsingResult.from_binary(data))
8198
        obj.ParsingResults = array
8199
        length = uabin.Primitives.Int32.unpack(data)
8200
        array = []
8201
        if length != -1:
8202
            for _ in range(0, length):
8203
                array.append(DiagnosticInfo.from_binary(data))
8204
        obj.DiagnosticInfos = array
8205 1
        obj.FilterResult = ContentFilterResult.from_binary(data)
8206
        return obj
8207
8208
    def __str__(self):
8209
        return 'QueryFirstResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \
8210 1
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
8211
               'ParsingResults:' + str(self.ParsingResults) + ', ' + \
8212
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ', ' + \
8213
               'FilterResult:' + str(self.FilterResult) + ')'
8214
8215
    __repr__ = __str__
8216
8217
8218
class QueryFirstResponse(FrozenClass):
8219 1
    '''
8220
    :ivar TypeId:
8221
    :vartype TypeId: NodeId
8222
    :ivar ResponseHeader:
8223
    :vartype ResponseHeader: ResponseHeader
8224
    :ivar Parameters:
8225
    :vartype Parameters: QueryFirstResult
8226
    '''
8227
8228
    ua_types = [
8229 1
8230
        ('TypeId', 'NodeId'),
8231
        ('ResponseHeader', 'ResponseHeader'),
8232
        ('Parameters', 'QueryFirstResult'),
8233 1
               ]
8234
8235
    def __init__(self):
8236
        self.TypeId = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary)
8237
        self.ResponseHeader = ResponseHeader()
8238
        self.Parameters = QueryFirstResult()
8239
        self._freeze = True
8240
8241
    def to_binary(self):
8242
        packet = []
8243
        packet.append(self.TypeId.to_binary())
8244
        packet.append(self.ResponseHeader.to_binary())
8245
        packet.append(self.Parameters.to_binary())
8246
        return b''.join(packet)
8247 1
8248
    @staticmethod
8249
    def from_binary(data):
8250
        obj = QueryFirstResponse()
8251 1
        obj.TypeId = NodeId.from_binary(data)
8252
        obj.ResponseHeader = ResponseHeader.from_binary(data)
8253
        obj.Parameters = QueryFirstResult.from_binary(data)
8254 1
        return obj
8255
8256
    def __str__(self):
8257
        return 'QueryFirstResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8258
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8259
               'Parameters:' + str(self.Parameters) + ')'
8260
8261
    __repr__ = __str__
8262
8263
8264 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...
8265
    '''
8266
    :ivar ReleaseContinuationPoint:
8267
    :vartype ReleaseContinuationPoint: Boolean
8268
    :ivar ContinuationPoint:
8269
    :vartype ContinuationPoint: ByteString
8270 1
    '''
8271
8272
    ua_types = [
8273
8274
        ('ReleaseContinuationPoint', 'Boolean'),
8275
        ('ContinuationPoint', 'ByteString'),
8276
               ]
8277
8278
    def __init__(self):
8279
        self.ReleaseContinuationPoint = True
8280 1
        self.ContinuationPoint = None
8281
        self._freeze = True
8282
8283
    def to_binary(self):
8284
        packet = []
8285
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoint))
8286
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8287
        return b''.join(packet)
8288
8289
    @staticmethod
8290
    def from_binary(data):
8291 1
        obj = QueryNextParameters()
8292
        self.ReleaseContinuationPoint = uabin.Primitives.Boolean.unpack(data)
8293
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8294
        return obj
8295 1
8296
    def __str__(self):
8297
        return 'QueryNextParameters(' + 'ReleaseContinuationPoint:' + str(self.ReleaseContinuationPoint) + ', ' + \
8298
               'ContinuationPoint:' + str(self.ContinuationPoint) + ')'
8299
8300
    __repr__ = __str__
8301
8302
8303
class QueryNextRequest(FrozenClass):
8304
    '''
8305
    :ivar TypeId:
8306
    :vartype TypeId: NodeId
8307
    :ivar RequestHeader:
8308
    :vartype RequestHeader: RequestHeader
8309
    :ivar Parameters:
8310 1
    :vartype Parameters: QueryNextParameters
8311
    '''
8312
8313
    ua_types = [
8314
8315 1
        ('TypeId', 'NodeId'),
8316
        ('RequestHeader', 'RequestHeader'),
8317
        ('Parameters', 'QueryNextParameters'),
8318 1
               ]
8319
8320
    def __init__(self):
8321
        self.TypeId = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary)
8322
        self.RequestHeader = RequestHeader()
8323
        self.Parameters = QueryNextParameters()
8324
        self._freeze = True
8325
8326
    def to_binary(self):
8327
        packet = []
8328
        packet.append(self.TypeId.to_binary())
8329
        packet.append(self.RequestHeader.to_binary())
8330
        packet.append(self.Parameters.to_binary())
8331
        return b''.join(packet)
8332 1
8333
    @staticmethod
8334
    def from_binary(data):
8335
        obj = QueryNextRequest()
8336
        obj.TypeId = NodeId.from_binary(data)
8337
        obj.RequestHeader = RequestHeader.from_binary(data)
8338
        obj.Parameters = QueryNextParameters.from_binary(data)
8339
        return obj
8340 1
8341
    def __str__(self):
8342
        return 'QueryNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8343
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8344
               'Parameters:' + str(self.Parameters) + ')'
8345
8346
    __repr__ = __str__
8347
8348
8349 View Code Duplication
class QueryNextResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8350
    '''
8351
    :ivar QueryDataSets:
8352 1
    :vartype QueryDataSets: QueryDataSet
8353
    :ivar RevisedContinuationPoint:
8354
    :vartype RevisedContinuationPoint: ByteString
8355
    '''
8356
8357
    ua_types = [
8358
8359
        ('QueryDataSets', 'ListOfQueryDataSet'),
8360
        ('RevisedContinuationPoint', 'ByteString'),
8361
               ]
8362
8363 1
    def __init__(self):
8364
        self.QueryDataSets = []
8365
        self.RevisedContinuationPoint = None
8366
        self._freeze = True
8367 1
8368
    def to_binary(self):
8369
        packet = []
8370
        packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets)))
8371
        for fieldname in self.QueryDataSets:
8372
            packet.append(fieldname.to_binary())
8373
        packet.append(uabin.Primitives.ByteString.pack(self.RevisedContinuationPoint))
8374
        return b''.join(packet)
8375
8376
    @staticmethod
8377
    def from_binary(data):
8378
        obj = QueryNextResult()
8379 1
        length = uabin.Primitives.Int32.unpack(data)
8380
        array = []
8381
        if length != -1:
8382
            for _ in range(0, length):
8383
                array.append(QueryDataSet.from_binary(data))
8384
        obj.QueryDataSets = array
8385
        self.RevisedContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8386 1
        return obj
8387
8388
    def __str__(self):
8389 1
        return 'QueryNextResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \
8390
               'RevisedContinuationPoint:' + str(self.RevisedContinuationPoint) + ')'
8391
8392
    __repr__ = __str__
8393
8394
8395
class QueryNextResponse(FrozenClass):
8396
    '''
8397
    :ivar TypeId:
8398
    :vartype TypeId: NodeId
8399 1
    :ivar ResponseHeader:
8400
    :vartype ResponseHeader: ResponseHeader
8401
    :ivar Parameters:
8402
    :vartype Parameters: QueryNextResult
8403
    '''
8404
8405 1
    ua_types = [
8406
8407
        ('TypeId', 'NodeId'),
8408
        ('ResponseHeader', 'ResponseHeader'),
8409
        ('Parameters', 'QueryNextResult'),
8410
               ]
8411
8412
    def __init__(self):
8413
        self.TypeId = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary)
8414
        self.ResponseHeader = ResponseHeader()
8415 1
        self.Parameters = QueryNextResult()
8416
        self._freeze = True
8417
8418
    def to_binary(self):
8419
        packet = []
8420
        packet.append(self.TypeId.to_binary())
8421
        packet.append(self.ResponseHeader.to_binary())
8422 1
        packet.append(self.Parameters.to_binary())
8423
        return b''.join(packet)
8424
8425
    @staticmethod
8426 1
    def from_binary(data):
8427
        obj = QueryNextResponse()
8428
        obj.TypeId = NodeId.from_binary(data)
8429
        obj.ResponseHeader = ResponseHeader.from_binary(data)
8430
        obj.Parameters = QueryNextResult.from_binary(data)
8431 1
        return obj
8432
8433
    def __str__(self):
8434
        return 'QueryNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8435
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8436 1
               'Parameters:' + str(self.Parameters) + ')'
8437
8438
    __repr__ = __str__
8439 1
8440
8441 View Code Duplication
class ReadValueId(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8442
    '''
8443
    :ivar NodeId:
8444
    :vartype NodeId: NodeId
8445
    :ivar AttributeId:
8446
    :vartype AttributeId: UInt32
8447
    :ivar IndexRange:
8448
    :vartype IndexRange: String
8449
    :ivar DataEncoding:
8450
    :vartype DataEncoding: QualifiedName
8451
    '''
8452
8453 1
    ua_types = [
8454
8455
        ('NodeId', 'NodeId'),
8456
        ('AttributeId', 'UInt32'),
8457
        ('IndexRange', 'String'),
8458
        ('DataEncoding', 'QualifiedName'),
8459
               ]
8460
8461 1
    def __init__(self):
8462
        self.NodeId = NodeId()
8463
        self.AttributeId = 0
8464
        self.IndexRange = None
8465
        self.DataEncoding = QualifiedName()
8466
        self._freeze = True
8467
8468
    def to_binary(self):
8469
        packet = []
8470
        packet.append(self.NodeId.to_binary())
8471
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
8472
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
8473 1
        packet.append(self.DataEncoding.to_binary())
8474
        return b''.join(packet)
8475
8476
    @staticmethod
8477
    def from_binary(data):
8478
        obj = ReadValueId()
8479
        obj.NodeId = NodeId.from_binary(data)
8480
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
8481
        self.IndexRange = uabin.Primitives.String.unpack(data)
8482
        obj.DataEncoding = QualifiedName.from_binary(data)
8483
        return obj
8484
8485
    def __str__(self):
8486
        return 'ReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \
8487
               'AttributeId:' + str(self.AttributeId) + ', ' + \
8488 1
               'IndexRange:' + str(self.IndexRange) + ', ' + \
8489
               'DataEncoding:' + str(self.DataEncoding) + ')'
8490
8491
    __repr__ = __str__
8492 1
8493
8494 View Code Duplication
class ReadParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8495
    '''
8496
    :ivar MaxAge:
8497
    :vartype MaxAge: Double
8498
    :ivar TimestampsToReturn:
8499
    :vartype TimestampsToReturn: TimestampsToReturn
8500
    :ivar NodesToRead:
8501
    :vartype NodesToRead: ReadValueId
8502
    '''
8503
8504
    ua_types = [
8505
8506
        ('MaxAge', 'Double'),
8507
        ('TimestampsToReturn', 'TimestampsToReturn'),
8508
        ('NodesToRead', 'ListOfReadValueId'),
8509
               ]
8510
8511
    def __init__(self):
8512
        self.MaxAge = 0
8513
        self.TimestampsToReturn = TimestampsToReturn(0)
8514 1
        self.NodesToRead = []
8515
        self._freeze = True
8516
8517
    def to_binary(self):
8518
        packet = []
8519
        packet.append(uabin.Primitives.Double.pack(self.MaxAge))
8520
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
8521 1
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead)))
8522
        for fieldname in self.NodesToRead:
8523
            packet.append(fieldname.to_binary())
8524 1
        return b''.join(packet)
8525
8526
    @staticmethod
8527
    def from_binary(data):
8528
        obj = ReadParameters()
8529
        self.MaxAge = uabin.Primitives.Double.unpack(data)
8530
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
8531
        length = uabin.Primitives.Int32.unpack(data)
8532
        array = []
8533
        if length != -1:
8534 1
            for _ in range(0, length):
8535
                array.append(ReadValueId.from_binary(data))
8536
        obj.NodesToRead = array
8537
        return obj
8538
8539
    def __str__(self):
8540 1
        return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \
8541
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
8542
               'NodesToRead:' + str(self.NodesToRead) + ')'
8543
8544
    __repr__ = __str__
8545
8546
8547
class ReadRequest(FrozenClass):
8548
    '''
8549
    :ivar TypeId:
8550 1
    :vartype TypeId: NodeId
8551
    :ivar RequestHeader:
8552
    :vartype RequestHeader: RequestHeader
8553
    :ivar Parameters:
8554
    :vartype Parameters: ReadParameters
8555
    '''
8556
8557 1
    ua_types = [
8558
8559
        ('TypeId', 'NodeId'),
8560
        ('RequestHeader', 'RequestHeader'),
8561 1
        ('Parameters', 'ReadParameters'),
8562
               ]
8563
8564
    def __init__(self):
8565
        self.TypeId = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary)
8566 1
        self.RequestHeader = RequestHeader()
8567
        self.Parameters = ReadParameters()
8568
        self._freeze = True
8569
8570
    def to_binary(self):
8571 1
        packet = []
8572
        packet.append(self.TypeId.to_binary())
8573
        packet.append(self.RequestHeader.to_binary())
8574 1
        packet.append(self.Parameters.to_binary())
8575
        return b''.join(packet)
8576
8577
    @staticmethod
8578
    def from_binary(data):
8579
        obj = ReadRequest()
8580
        obj.TypeId = NodeId.from_binary(data)
8581
        obj.RequestHeader = RequestHeader.from_binary(data)
8582 1
        obj.Parameters = ReadParameters.from_binary(data)
8583
        return obj
8584
8585
    def __str__(self):
8586
        return 'ReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8587 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
8588
               'Parameters:' + str(self.Parameters) + ')'
8589
8590
    __repr__ = __str__
8591
8592
8593 View Code Duplication
class ReadResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8594
    '''
8595
    :ivar TypeId:
8596 1
    :vartype TypeId: NodeId
8597
    :ivar ResponseHeader:
8598
    :vartype ResponseHeader: ResponseHeader
8599
    :ivar Results:
8600
    :vartype Results: DataValue
8601
    :ivar DiagnosticInfos:
8602 1
    :vartype DiagnosticInfos: DiagnosticInfo
8603
    '''
8604
8605
    ua_types = [
8606 1
8607
        ('TypeId', 'NodeId'),
8608
        ('ResponseHeader', 'ResponseHeader'),
8609
        ('Results', 'ListOfDataValue'),
8610 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
8611
               ]
8612
8613
    def __init__(self):
8614 1
        self.TypeId = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary)
8615
        self.ResponseHeader = ResponseHeader()
8616
        self.Results = []
8617 1
        self.DiagnosticInfos = []
8618
        self._freeze = True
8619
8620
    def to_binary(self):
8621
        packet = []
8622
        packet.append(self.TypeId.to_binary())
8623
        packet.append(self.ResponseHeader.to_binary())
8624
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
8625
        for fieldname in self.Results:
8626
            packet.append(fieldname.to_binary())
8627 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
8628
        for fieldname in self.DiagnosticInfos:
8629
            packet.append(fieldname.to_binary())
8630
        return b''.join(packet)
8631
8632
    @staticmethod
8633 1
    def from_binary(data):
8634
        obj = ReadResponse()
8635
        obj.TypeId = NodeId.from_binary(data)
8636
        obj.ResponseHeader = ResponseHeader.from_binary(data)
8637
        length = uabin.Primitives.Int32.unpack(data)
8638
        array = []
8639
        if length != -1:
8640
            for _ in range(0, length):
8641
                array.append(DataValue.from_binary(data))
8642
        obj.Results = array
8643 1
        length = uabin.Primitives.Int32.unpack(data)
8644
        array = []
8645
        if length != -1:
8646
            for _ in range(0, length):
8647
                array.append(DiagnosticInfo.from_binary(data))
8648
        obj.DiagnosticInfos = array
8649
        return obj
8650 1
8651
    def __str__(self):
8652
        return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8653
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8654 1
               'Results:' + str(self.Results) + ', ' + \
8655
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
8656
8657
    __repr__ = __str__
8658
8659 1
8660 View Code Duplication
class HistoryReadValueId(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8661
    '''
8662
    :ivar NodeId:
8663
    :vartype NodeId: NodeId
8664 1
    :ivar IndexRange:
8665
    :vartype IndexRange: String
8666
    :ivar DataEncoding:
8667 1
    :vartype DataEncoding: QualifiedName
8668
    :ivar ContinuationPoint:
8669
    :vartype ContinuationPoint: ByteString
8670
    '''
8671
8672
    ua_types = [
8673
8674
        ('NodeId', 'NodeId'),
8675 1
        ('IndexRange', 'String'),
8676
        ('DataEncoding', 'QualifiedName'),
8677
        ('ContinuationPoint', 'ByteString'),
8678
               ]
8679
8680 1
    def __init__(self):
8681
        self.NodeId = NodeId()
8682
        self.IndexRange = None
8683
        self.DataEncoding = QualifiedName()
8684
        self.ContinuationPoint = None
8685
        self._freeze = True
8686
8687
    def to_binary(self):
8688
        packet = []
8689 1
        packet.append(self.NodeId.to_binary())
8690
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
8691
        packet.append(self.DataEncoding.to_binary())
8692
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8693
        return b''.join(packet)
8694
8695
    @staticmethod
8696
    def from_binary(data):
8697 1
        obj = HistoryReadValueId()
8698
        obj.NodeId = NodeId.from_binary(data)
8699
        self.IndexRange = uabin.Primitives.String.unpack(data)
8700
        obj.DataEncoding = QualifiedName.from_binary(data)
8701 1
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8702
        return obj
8703
8704
    def __str__(self):
8705
        return 'HistoryReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \
8706
               'IndexRange:' + str(self.IndexRange) + ', ' + \
8707
               'DataEncoding:' + str(self.DataEncoding) + ', ' + \
8708
               'ContinuationPoint:' + str(self.ContinuationPoint) + ')'
8709
8710 1
    __repr__ = __str__
8711
8712
8713 View Code Duplication
class HistoryReadResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8714 1
    '''
8715
    :ivar StatusCode:
8716
    :vartype StatusCode: StatusCode
8717 1
    :ivar ContinuationPoint:
8718
    :vartype ContinuationPoint: ByteString
8719
    :ivar HistoryData:
8720
    :vartype HistoryData: ExtensionObject
8721
    '''
8722
8723
    ua_types = [
8724
8725
        ('StatusCode', 'StatusCode'),
8726
        ('ContinuationPoint', 'ByteString'),
8727 1
        ('HistoryData', 'ExtensionObject'),
8728
               ]
8729
8730
    def __init__(self):
8731
        self.StatusCode = StatusCode()
8732
        self.ContinuationPoint = None
8733 1
        self.HistoryData = ExtensionObject()
8734
        self._freeze = True
8735
8736
    def to_binary(self):
8737
        packet = []
8738
        packet.append(self.StatusCode.to_binary())
8739
        packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint))
8740
        packet.append(uabin.extensionobject_to_binary(self.HistoryData))
8741
        return b''.join(packet)
8742
8743 1
    @staticmethod
8744
    def from_binary(data):
8745
        obj = HistoryReadResult()
8746
        obj.StatusCode = StatusCode.from_binary(data)
8747
        self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data)
8748
        obj.HistoryData = uabin.extensionobject_from_binary(data)
8749
        return obj
8750 1
8751
    def __str__(self):
8752
        return 'HistoryReadResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
8753
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
8754 1
               'HistoryData:' + str(self.HistoryData) + ')'
8755
8756
    __repr__ = __str__
8757
8758
8759 1
class HistoryReadDetails(FrozenClass):
8760
    '''
8761
    '''
8762
8763
    ua_types = [
8764 1
8765
               ]
8766
8767 1
    def __init__(self):
8768
        self._freeze = True
8769
8770
    def to_binary(self):
8771
        packet = []
8772
        return b''.join(packet)
8773
8774
    @staticmethod
8775
    def from_binary(data):
8776
        obj = HistoryReadDetails()
8777
        return obj
8778
8779 1
    def __str__(self):
8780
        return 'HistoryReadDetails(' +  + ')'
8781
8782
    __repr__ = __str__
8783
8784
8785 View Code Duplication
class ReadEventDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
8786 1
    '''
8787 1
    :ivar NumValuesPerNode:
8788 1
    :vartype NumValuesPerNode: UInt32
8789 1
    :ivar StartTime:
8790 1
    :vartype StartTime: DateTime
8791 1
    :ivar EndTime:
8792 1
    :vartype EndTime: DateTime
8793 1
    :ivar Filter:
8794 1
    :vartype Filter: EventFilter
8795 1
    '''
8796
8797 1
    ua_types = [
8798 1
8799 1
        ('NumValuesPerNode', 'UInt32'),
8800 1
        ('StartTime', 'DateTime'),
8801 1
        ('EndTime', 'DateTime'),
8802 1
        ('Filter', 'EventFilter'),
8803 1
               ]
8804
8805 1
    def __init__(self):
8806
        self.NumValuesPerNode = 0
8807 1
        self.StartTime = datetime.utcnow()
8808
        self.EndTime = datetime.utcnow()
8809 1
        self.Filter = EventFilter()
8810 1
        self._freeze = True
8811 1
8812 1
    def to_binary(self):
8813 1
        packet = []
8814
        packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode))
8815 1
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
8816
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
8817
        packet.append(self.Filter.to_binary())
8818
        return b''.join(packet)
8819
8820
    @staticmethod
8821 1
    def from_binary(data):
8822
        obj = ReadEventDetails()
8823
        self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data)
8824 1
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
8825
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
8826
        obj.Filter = EventFilter.from_binary(data)
8827
        return obj
8828
8829
    def __str__(self):
8830
        return 'ReadEventDetails(' + 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \
8831
               'StartTime:' + str(self.StartTime) + ', ' + \
8832
               'EndTime:' + str(self.EndTime) + ', ' + \
8833
               'Filter:' + str(self.Filter) + ')'
8834 1
8835
    __repr__ = __str__
8836
8837
8838
class ReadRawModifiedDetails(FrozenClass):
8839
    '''
8840 1
    :ivar IsReadModified:
8841 1
    :vartype IsReadModified: Boolean
8842 1
    :ivar StartTime:
8843 1
    :vartype StartTime: DateTime
8844 1
    :ivar EndTime:
8845 1
    :vartype EndTime: DateTime
8846 1
    :ivar NumValuesPerNode:
8847 1
    :vartype NumValuesPerNode: UInt32
8848 1
    :ivar ReturnBounds:
8849
    :vartype ReturnBounds: Boolean
8850 1
    '''
8851 1
8852 1
    ua_types = [
8853 1
8854 1
        ('IsReadModified', 'Boolean'),
8855 1
        ('StartTime', 'DateTime'),
8856 1
        ('EndTime', 'DateTime'),
8857 1
        ('NumValuesPerNode', 'UInt32'),
8858
        ('ReturnBounds', 'Boolean'),
8859 1
               ]
8860
8861 1
    def __init__(self):
8862
        self.IsReadModified = True
8863 1
        self.StartTime = datetime.utcnow()
8864 1
        self.EndTime = datetime.utcnow()
8865 1
        self.NumValuesPerNode = 0
8866 1
        self.ReturnBounds = True
8867 1
        self._freeze = True
8868 1
8869 1
    def to_binary(self):
8870 1
        packet = []
8871 1
        packet.append(uabin.Primitives.Boolean.pack(self.IsReadModified))
8872
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
8873 1
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
8874
        packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode))
8875
        packet.append(uabin.Primitives.Boolean.pack(self.ReturnBounds))
8876
        return b''.join(packet)
8877
8878 1
    @staticmethod
8879
    def from_binary(data):
8880
        obj = ReadRawModifiedDetails()
8881 1
        self.IsReadModified = uabin.Primitives.Boolean.unpack(data)
8882
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
8883
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
8884
        self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data)
8885
        self.ReturnBounds = uabin.Primitives.Boolean.unpack(data)
8886
        return obj
8887
8888
    def __str__(self):
8889
        return 'ReadRawModifiedDetails(' + 'IsReadModified:' + str(self.IsReadModified) + ', ' + \
8890
               'StartTime:' + str(self.StartTime) + ', ' + \
8891 1
               'EndTime:' + str(self.EndTime) + ', ' + \
8892
               'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \
8893
               'ReturnBounds:' + str(self.ReturnBounds) + ')'
8894
8895
    __repr__ = __str__
8896
8897 1
8898 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...
8899
    '''
8900
    :ivar StartTime:
8901
    :vartype StartTime: DateTime
8902 1
    :ivar EndTime:
8903 1
    :vartype EndTime: DateTime
8904 1
    :ivar ProcessingInterval:
8905 1
    :vartype ProcessingInterval: Double
8906
    :ivar AggregateType:
8907 1
    :vartype AggregateType: NodeId
8908 1
    :ivar AggregateConfiguration:
8909 1
    :vartype AggregateConfiguration: AggregateConfiguration
8910 1
    '''
8911 1
8912 1
    ua_types = [
8913
8914 1
        ('StartTime', 'DateTime'),
8915
        ('EndTime', 'DateTime'),
8916
        ('ProcessingInterval', 'Double'),
8917
        ('AggregateType', 'ListOfNodeId'),
8918 1
        ('AggregateConfiguration', 'AggregateConfiguration'),
8919
               ]
8920
8921
    def __init__(self):
8922
        self.StartTime = datetime.utcnow()
8923 1
        self.EndTime = datetime.utcnow()
8924
        self.ProcessingInterval = 0
8925
        self.AggregateType = []
8926
        self.AggregateConfiguration = AggregateConfiguration()
8927
        self._freeze = True
8928 1
8929
    def to_binary(self):
8930
        packet = []
8931 1
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
8932
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
8933
        packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval))
8934
        packet.append(uabin.Primitives.Int32.pack(len(self.AggregateType)))
8935
        for fieldname in self.AggregateType:
8936
            packet.append(fieldname.to_binary())
8937
        packet.append(self.AggregateConfiguration.to_binary())
8938
        return b''.join(packet)
8939
8940
    @staticmethod
8941
    def from_binary(data):
8942
        obj = ReadProcessedDetails()
8943 1
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
8944
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
8945
        self.ProcessingInterval = uabin.Primitives.Double.unpack(data)
8946
        length = uabin.Primitives.Int32.unpack(data)
8947
        array = []
8948
        if length != -1:
8949
            for _ in range(0, length):
8950 1
                array.append(NodeId.from_binary(data))
8951 1
        obj.AggregateType = array
8952 1
        obj.AggregateConfiguration = AggregateConfiguration.from_binary(data)
8953 1
        return obj
8954 1
8955 1
    def __str__(self):
8956 1
        return 'ReadProcessedDetails(' + 'StartTime:' + str(self.StartTime) + ', ' + \
8957 1
               'EndTime:' + str(self.EndTime) + ', ' + \
8958 1
               'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \
8959 1
               'AggregateType:' + str(self.AggregateType) + ', ' + \
8960
               'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')'
8961 1
8962 1
    __repr__ = __str__
8963 1
8964 1
8965 1
class ReadAtTimeDetails(FrozenClass):
8966 1
    '''
8967 1
    :ivar ReqTimes:
8968 1
    :vartype ReqTimes: DateTime
8969 1
    :ivar UseSimpleBounds:
8970
    :vartype UseSimpleBounds: Boolean
8971 1
    '''
8972
8973 1
    ua_types = [
8974
8975 1
        ('ReqTimes', 'ListOfDateTime'),
8976
        ('UseSimpleBounds', 'Boolean'),
8977 1
               ]
8978 1
8979 1
    def __init__(self):
8980 1
        self.ReqTimes = []
8981 1
        self.UseSimpleBounds = True
8982 1
        self._freeze = True
8983 1
8984 1
    def to_binary(self):
8985 1
        packet = []
8986 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes)))
8987 1
        for fieldname in self.ReqTimes:
8988 1
            packet.append(uabin.Primitives.DateTime.pack(fieldname))
8989 1
        packet.append(uabin.Primitives.Boolean.pack(self.UseSimpleBounds))
8990
        return b''.join(packet)
8991 1
8992
    @staticmethod
8993 1
    def from_binary(data):
8994
        obj = ReadAtTimeDetails()
8995
        obj.ReqTimes = uabin.Primitives.DateTime.unpack_array(data)
8996
        self.UseSimpleBounds = uabin.Primitives.Boolean.unpack(data)
8997
        return obj
8998
8999 1
    def __str__(self):
9000
        return 'ReadAtTimeDetails(' + 'ReqTimes:' + str(self.ReqTimes) + ', ' + \
9001
               'UseSimpleBounds:' + str(self.UseSimpleBounds) + ')'
9002 1
9003
    __repr__ = __str__
9004
9005
9006 View Code Duplication
class HistoryData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9007
    '''
9008
    :ivar DataValues:
9009
    :vartype DataValues: DataValue
9010
    '''
9011
9012
    ua_types = [
9013
9014 1
        ('DataValues', 'ListOfDataValue'),
9015
               ]
9016
9017
    def __init__(self):
9018
        self.DataValues = []
9019
        self._freeze = True
9020
9021 1
    def to_binary(self):
9022 1
        packet = []
9023
        packet.append(uabin.Primitives.Int32.pack(len(self.DataValues)))
9024
        for fieldname in self.DataValues:
9025
            packet.append(fieldname.to_binary())
9026 1
        return b''.join(packet)
9027 1
9028 1
    @staticmethod
9029 1
    def from_binary(data):
9030 1
        obj = HistoryData()
9031
        length = uabin.Primitives.Int32.unpack(data)
9032 1
        array = []
9033
        if length != -1:
9034
            for _ in range(0, length):
9035
                array.append(DataValue.from_binary(data))
9036
        obj.DataValues = array
9037
        return obj
9038
9039
    def __str__(self):
9040 1
        return 'HistoryData(' + 'DataValues:' + str(self.DataValues) + ')'
9041
9042
    __repr__ = __str__
9043
9044 1
9045
class ModificationInfo(FrozenClass):
9046
    '''
9047
    :ivar ModificationTime:
9048
    :vartype ModificationTime: DateTime
9049
    :ivar UpdateType:
9050 1
    :vartype UpdateType: HistoryUpdateType
9051
    :ivar UserName:
9052
    :vartype UserName: String
9053
    '''
9054
9055
    ua_types = [
9056 1
9057
        ('ModificationTime', 'DateTime'),
9058
        ('UpdateType', 'HistoryUpdateType'),
9059 1
        ('UserName', 'String'),
9060
               ]
9061
9062
    def __init__(self):
9063
        self.ModificationTime = datetime.utcnow()
9064
        self.UpdateType = HistoryUpdateType(0)
9065
        self.UserName = None
9066
        self._freeze = True
9067
9068
    def to_binary(self):
9069 1
        packet = []
9070
        packet.append(uabin.Primitives.DateTime.pack(self.ModificationTime))
9071
        packet.append(uabin.Primitives.UInt32.pack(self.UpdateType.value))
9072
        packet.append(uabin.Primitives.String.pack(self.UserName))
9073
        return b''.join(packet)
9074
9075 1
    @staticmethod
9076 1
    def from_binary(data):
9077
        obj = ModificationInfo()
9078
        self.ModificationTime = uabin.Primitives.DateTime.unpack(data)
9079
        self.UpdateType = HistoryUpdateType(uabin.Primitives.UInt32.unpack(data))
9080 1
        self.UserName = uabin.Primitives.String.unpack(data)
9081 1
        return obj
9082 1
9083 1
    def __str__(self):
9084
        return 'ModificationInfo(' + 'ModificationTime:' + str(self.ModificationTime) + ', ' + \
9085 1
               'UpdateType:' + str(self.UpdateType) + ', ' + \
9086
               'UserName:' + str(self.UserName) + ')'
9087
9088
    __repr__ = __str__
9089
9090
9091 View Code Duplication
class HistoryModifiedData(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9092 1
    '''
9093
    :ivar DataValues:
9094
    :vartype DataValues: DataValue
9095
    :ivar ModificationInfos:
9096 1
    :vartype ModificationInfos: ModificationInfo
9097
    '''
9098
9099
    ua_types = [
9100
9101 1
        ('DataValues', 'ListOfDataValue'),
9102
        ('ModificationInfos', 'ListOfModificationInfo'),
9103
               ]
9104
9105
    def __init__(self):
9106 1
        self.DataValues = []
9107
        self.ModificationInfos = []
9108
        self._freeze = True
9109 1
9110
    def to_binary(self):
9111
        packet = []
9112
        packet.append(uabin.Primitives.Int32.pack(len(self.DataValues)))
9113 1
        for fieldname in self.DataValues:
9114
            packet.append(fieldname.to_binary())
9115
        packet.append(uabin.Primitives.Int32.pack(len(self.ModificationInfos)))
9116 1
        for fieldname in self.ModificationInfos:
9117
            packet.append(fieldname.to_binary())
9118
        return b''.join(packet)
9119
9120
    @staticmethod
9121
    def from_binary(data):
9122
        obj = HistoryModifiedData()
9123 1
        length = uabin.Primitives.Int32.unpack(data)
9124
        array = []
9125
        if length != -1:
9126
            for _ in range(0, length):
9127 1
                array.append(DataValue.from_binary(data))
9128
        obj.DataValues = array
9129
        length = uabin.Primitives.Int32.unpack(data)
9130
        array = []
9131 1
        if length != -1:
9132
            for _ in range(0, length):
9133
                array.append(ModificationInfo.from_binary(data))
9134 1
        obj.ModificationInfos = array
9135
        return obj
9136
9137 1
    def __str__(self):
9138
        return 'HistoryModifiedData(' + 'DataValues:' + str(self.DataValues) + ', ' + \
9139
               'ModificationInfos:' + str(self.ModificationInfos) + ')'
9140 1
9141
    __repr__ = __str__
9142
9143
9144 View Code Duplication
class HistoryEvent(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9145
    '''
9146
    :ivar Events:
9147
    :vartype Events: HistoryEventFieldList
9148
    '''
9149
9150
    ua_types = [
9151
9152 1
        ('Events', 'ListOfHistoryEventFieldList'),
9153
               ]
9154
9155
    def __init__(self):
9156
        self.Events = []
9157
        self._freeze = True
9158
9159 1
    def to_binary(self):
9160 1
        packet = []
9161
        packet.append(uabin.Primitives.Int32.pack(len(self.Events)))
9162
        for fieldname in self.Events:
9163
            packet.append(fieldname.to_binary())
9164 1
        return b''.join(packet)
9165 1
9166 1
    @staticmethod
9167 1
    def from_binary(data):
9168 1
        obj = HistoryEvent()
9169
        length = uabin.Primitives.Int32.unpack(data)
9170 1
        array = []
9171
        if length != -1:
9172
            for _ in range(0, length):
9173
                array.append(HistoryEventFieldList.from_binary(data))
9174
        obj.Events = array
9175
        return obj
9176
9177
    def __str__(self):
9178 1
        return 'HistoryEvent(' + 'Events:' + str(self.Events) + ')'
9179
9180
    __repr__ = __str__
9181
9182 1
9183 View Code Duplication
class HistoryReadParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9184
    '''
9185
    :ivar HistoryReadDetails:
9186
    :vartype HistoryReadDetails: ExtensionObject
9187
    :ivar TimestampsToReturn:
9188 1
    :vartype TimestampsToReturn: TimestampsToReturn
9189
    :ivar ReleaseContinuationPoints:
9190
    :vartype ReleaseContinuationPoints: Boolean
9191
    :ivar NodesToRead:
9192
    :vartype NodesToRead: HistoryReadValueId
9193
    '''
9194 1
9195
    ua_types = [
9196
9197 1
        ('HistoryReadDetails', 'ExtensionObject'),
9198
        ('TimestampsToReturn', 'TimestampsToReturn'),
9199
        ('ReleaseContinuationPoints', 'Boolean'),
9200
        ('NodesToRead', 'ListOfHistoryReadValueId'),
9201
               ]
9202
9203
    def __init__(self):
9204
        self.HistoryReadDetails = ExtensionObject()
9205
        self.TimestampsToReturn = TimestampsToReturn(0)
9206
        self.ReleaseContinuationPoints = True
9207
        self.NodesToRead = []
9208
        self._freeze = True
9209
9210
    def to_binary(self):
9211 1
        packet = []
9212
        packet.append(uabin.extensionobject_to_binary(self.HistoryReadDetails))
9213
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
9214
        packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints))
9215
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead)))
9216
        for fieldname in self.NodesToRead:
9217
            packet.append(fieldname.to_binary())
9218
        return b''.join(packet)
9219 1
9220 1
    @staticmethod
9221
    def from_binary(data):
9222
        obj = HistoryReadParameters()
9223
        obj.HistoryReadDetails = uabin.extensionobject_from_binary(data)
9224 1
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
9225 1
        self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data)
9226 1
        length = uabin.Primitives.Int32.unpack(data)
9227 1
        array = []
9228 1
        if length != -1:
9229 1
            for _ in range(0, length):
9230
                array.append(HistoryReadValueId.from_binary(data))
9231 1
        obj.NodesToRead = array
9232
        return obj
9233
9234
    def __str__(self):
9235
        return 'HistoryReadParameters(' + 'HistoryReadDetails:' + str(self.HistoryReadDetails) + ', ' + \
9236
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
9237
               'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \
9238
               'NodesToRead:' + str(self.NodesToRead) + ')'
9239
9240 1
    __repr__ = __str__
9241
9242
9243
class HistoryReadRequest(FrozenClass):
9244 1
    '''
9245
    :ivar TypeId:
9246
    :vartype TypeId: NodeId
9247
    :ivar RequestHeader:
9248
    :vartype RequestHeader: RequestHeader
9249
    :ivar Parameters:
9250
    :vartype Parameters: HistoryReadParameters
9251 1
    '''
9252
9253
    ua_types = [
9254
9255
        ('TypeId', 'NodeId'),
9256
        ('RequestHeader', 'RequestHeader'),
9257
        ('Parameters', 'HistoryReadParameters'),
9258 1
               ]
9259
9260
    def __init__(self):
9261 1
        self.TypeId = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary)
9262
        self.RequestHeader = RequestHeader()
9263
        self.Parameters = HistoryReadParameters()
9264
        self._freeze = True
9265
9266
    def to_binary(self):
9267
        packet = []
9268
        packet.append(self.TypeId.to_binary())
9269
        packet.append(self.RequestHeader.to_binary())
9270
        packet.append(self.Parameters.to_binary())
9271
        return b''.join(packet)
9272
9273
    @staticmethod
9274
    def from_binary(data):
9275 1
        obj = HistoryReadRequest()
9276
        obj.TypeId = NodeId.from_binary(data)
9277
        obj.RequestHeader = RequestHeader.from_binary(data)
9278
        obj.Parameters = HistoryReadParameters.from_binary(data)
9279
        return obj
9280
9281
    def __str__(self):
9282
        return 'HistoryReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9283 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
9284
               'Parameters:' + str(self.Parameters) + ')'
9285
9286
    __repr__ = __str__
9287
9288
9289 View Code Duplication
class HistoryReadResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9290
    '''
9291
    :ivar TypeId:
9292
    :vartype TypeId: NodeId
9293
    :ivar ResponseHeader:
9294
    :vartype ResponseHeader: ResponseHeader
9295 1
    :ivar Results:
9296
    :vartype Results: HistoryReadResult
9297
    :ivar DiagnosticInfos:
9298
    :vartype DiagnosticInfos: DiagnosticInfo
9299
    '''
9300
9301
    ua_types = [
9302
9303
        ('TypeId', 'NodeId'),
9304
        ('ResponseHeader', 'ResponseHeader'),
9305
        ('Results', 'ListOfHistoryReadResult'),
9306 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
9307
               ]
9308
9309
    def __init__(self):
9310 1
        self.TypeId = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary)
9311
        self.ResponseHeader = ResponseHeader()
9312
        self.Results = []
9313
        self.DiagnosticInfos = []
9314
        self._freeze = True
9315
9316
    def to_binary(self):
9317
        packet = []
9318
        packet.append(self.TypeId.to_binary())
9319
        packet.append(self.ResponseHeader.to_binary())
9320
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
9321
        for fieldname in self.Results:
9322 1
            packet.append(fieldname.to_binary())
9323
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9324
        for fieldname in self.DiagnosticInfos:
9325
            packet.append(fieldname.to_binary())
9326
        return b''.join(packet)
9327
9328
    @staticmethod
9329 1
    def from_binary(data):
9330
        obj = HistoryReadResponse()
9331
        obj.TypeId = NodeId.from_binary(data)
9332 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
9333
        length = uabin.Primitives.Int32.unpack(data)
9334
        array = []
9335
        if length != -1:
9336
            for _ in range(0, length):
9337
                array.append(HistoryReadResult.from_binary(data))
9338
        obj.Results = array
9339
        length = uabin.Primitives.Int32.unpack(data)
9340 1
        array = []
9341
        if length != -1:
9342
            for _ in range(0, length):
9343
                array.append(DiagnosticInfo.from_binary(data))
9344
        obj.DiagnosticInfos = array
9345 1
        return obj
9346
9347
    def __str__(self):
9348
        return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9349
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9350
               'Results:' + str(self.Results) + ', ' + \
9351
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9352
9353
    __repr__ = __str__
9354 1
9355
9356 View Code Duplication
class WriteValue(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9357
    '''
9358
    :ivar NodeId:
9359
    :vartype NodeId: NodeId
9360
    :ivar AttributeId:
9361
    :vartype AttributeId: UInt32
9362 1
    :ivar IndexRange:
9363
    :vartype IndexRange: String
9364
    :ivar Value:
9365
    :vartype Value: DataValue
9366 1
    '''
9367
9368
    ua_types = [
9369
9370 1
        ('NodeId', 'NodeId'),
9371
        ('AttributeId', 'UInt32'),
9372
        ('IndexRange', 'String'),
9373
        ('Value', 'DataValue'),
9374 1
               ]
9375
9376
    def __init__(self):
9377 1
        self.NodeId = NodeId()
9378
        self.AttributeId = 0
9379
        self.IndexRange = None
9380
        self.Value = DataValue()
9381
        self._freeze = True
9382
9383 1
    def to_binary(self):
9384
        packet = []
9385
        packet.append(self.NodeId.to_binary())
9386
        packet.append(uabin.Primitives.UInt32.pack(self.AttributeId))
9387 1
        packet.append(uabin.Primitives.String.pack(self.IndexRange))
9388 1
        packet.append(self.Value.to_binary())
9389
        return b''.join(packet)
9390
9391
    @staticmethod
9392 1
    def from_binary(data):
9393 1
        obj = WriteValue()
9394
        obj.NodeId = NodeId.from_binary(data)
9395 1
        self.AttributeId = uabin.Primitives.UInt32.unpack(data)
9396
        self.IndexRange = uabin.Primitives.String.unpack(data)
9397
        obj.Value = DataValue.from_binary(data)
9398
        return obj
9399
9400
    def __str__(self):
9401
        return 'WriteValue(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9402 1
               'AttributeId:' + str(self.AttributeId) + ', ' + \
9403
               'IndexRange:' + str(self.IndexRange) + ', ' + \
9404
               'Value:' + str(self.Value) + ')'
9405
9406 1
    __repr__ = __str__
9407
9408
9409 View Code Duplication
class WriteParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9410
    '''
9411
    :ivar NodesToWrite:
9412
    :vartype NodesToWrite: WriteValue
9413
    '''
9414 1
9415
    ua_types = [
9416
9417 1
        ('NodesToWrite', 'ListOfWriteValue'),
9418
               ]
9419
9420 1
    def __init__(self):
9421
        self.NodesToWrite = []
9422
        self._freeze = True
9423
9424
    def to_binary(self):
9425
        packet = []
9426
        packet.append(uabin.Primitives.Int32.pack(len(self.NodesToWrite)))
9427
        for fieldname in self.NodesToWrite:
9428
            packet.append(fieldname.to_binary())
9429
        return b''.join(packet)
9430 1
9431
    @staticmethod
9432
    def from_binary(data):
9433
        obj = WriteParameters()
9434
        length = uabin.Primitives.Int32.unpack(data)
9435
        array = []
9436 1
        if length != -1:
9437
            for _ in range(0, length):
9438
                array.append(WriteValue.from_binary(data))
9439
        obj.NodesToWrite = array
9440
        return obj
9441
9442
    def __str__(self):
9443
        return 'WriteParameters(' + 'NodesToWrite:' + str(self.NodesToWrite) + ')'
9444
9445
    __repr__ = __str__
9446 1
9447
9448
class WriteRequest(FrozenClass):
9449
    '''
9450
    :ivar TypeId:
9451
    :vartype TypeId: NodeId
9452
    :ivar RequestHeader:
9453 1
    :vartype RequestHeader: RequestHeader
9454
    :ivar Parameters:
9455
    :vartype Parameters: WriteParameters
9456
    '''
9457 1
9458
    ua_types = [
9459
9460
        ('TypeId', 'NodeId'),
9461
        ('RequestHeader', 'RequestHeader'),
9462 1
        ('Parameters', 'WriteParameters'),
9463
               ]
9464
9465
    def __init__(self):
9466
        self.TypeId = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary)
9467 1
        self.RequestHeader = RequestHeader()
9468
        self.Parameters = WriteParameters()
9469
        self._freeze = True
9470 1
9471
    def to_binary(self):
9472
        packet = []
9473
        packet.append(self.TypeId.to_binary())
9474
        packet.append(self.RequestHeader.to_binary())
9475
        packet.append(self.Parameters.to_binary())
9476
        return b''.join(packet)
9477
9478 1
    @staticmethod
9479
    def from_binary(data):
9480
        obj = WriteRequest()
9481
        obj.TypeId = NodeId.from_binary(data)
9482
        obj.RequestHeader = RequestHeader.from_binary(data)
9483 1
        obj.Parameters = WriteParameters.from_binary(data)
9484
        return obj
9485
9486
    def __str__(self):
9487
        return 'WriteRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9488
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
9489
               'Parameters:' + str(self.Parameters) + ')'
9490
9491
    __repr__ = __str__
9492 1
9493
9494 View Code Duplication
class WriteResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9495
    '''
9496
    :ivar TypeId:
9497
    :vartype TypeId: NodeId
9498
    :ivar ResponseHeader:
9499
    :vartype ResponseHeader: ResponseHeader
9500
    :ivar Results:
9501
    :vartype Results: StatusCode
9502 1
    :ivar DiagnosticInfos:
9503
    :vartype DiagnosticInfos: DiagnosticInfo
9504
    '''
9505
9506 1
    ua_types = [
9507
9508
        ('TypeId', 'NodeId'),
9509
        ('ResponseHeader', 'ResponseHeader'),
9510
        ('Results', 'ListOfStatusCode'),
9511
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
9512
               ]
9513
9514
    def __init__(self):
9515
        self.TypeId = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary)
9516
        self.ResponseHeader = ResponseHeader()
9517
        self.Results = []
9518
        self.DiagnosticInfos = []
9519
        self._freeze = True
9520 1
9521
    def to_binary(self):
9522
        packet = []
9523
        packet.append(self.TypeId.to_binary())
9524 1
        packet.append(self.ResponseHeader.to_binary())
9525
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
9526
        for fieldname in self.Results:
9527 1
            packet.append(fieldname.to_binary())
9528
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9529
        for fieldname in self.DiagnosticInfos:
9530
            packet.append(fieldname.to_binary())
9531
        return b''.join(packet)
9532
9533 1
    @staticmethod
9534
    def from_binary(data):
9535
        obj = WriteResponse()
9536
        obj.TypeId = NodeId.from_binary(data)
9537 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
9538 1
        length = uabin.Primitives.Int32.unpack(data)
9539
        array = []
9540
        if length != -1:
9541
            for _ in range(0, length):
9542 1
                array.append(StatusCode.from_binary(data))
9543 1
        obj.Results = array
9544
        length = uabin.Primitives.Int32.unpack(data)
9545 1
        array = []
9546
        if length != -1:
9547
            for _ in range(0, length):
9548
                array.append(DiagnosticInfo.from_binary(data))
9549
        obj.DiagnosticInfos = array
9550
        return obj
9551
9552 1
    def __str__(self):
9553
        return 'WriteResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9554
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9555
               'Results:' + str(self.Results) + ', ' + \
9556 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9557
9558
    __repr__ = __str__
9559
9560
9561
class HistoryUpdateDetails(FrozenClass):
9562
    '''
9563
    :ivar NodeId:
9564 1
    :vartype NodeId: NodeId
9565
    '''
9566
9567 1
    ua_types = [
9568
9569
        ('NodeId', 'NodeId'),
9570 1
               ]
9571
9572
    def __init__(self):
9573
        self.NodeId = NodeId()
9574
        self._freeze = True
9575
9576
    def to_binary(self):
9577
        packet = []
9578
        packet.append(self.NodeId.to_binary())
9579
        return b''.join(packet)
9580
9581
    @staticmethod
9582 1
    def from_binary(data):
9583
        obj = HistoryUpdateDetails()
9584
        obj.NodeId = NodeId.from_binary(data)
9585
        return obj
9586
9587
    def __str__(self):
9588
        return 'HistoryUpdateDetails(' + 'NodeId:' + str(self.NodeId) + ')'
9589 1
9590 1
    __repr__ = __str__
9591
9592
9593 View Code Duplication
class UpdateDataDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9594 1
    '''
9595 1
    :ivar NodeId:
9596 1
    :vartype NodeId: NodeId
9597 1
    :ivar PerformInsertReplace:
9598 1
    :vartype PerformInsertReplace: PerformUpdateType
9599
    :ivar UpdateValues:
9600 1
    :vartype UpdateValues: DataValue
9601
    '''
9602
9603
    ua_types = [
9604
9605
        ('NodeId', 'NodeId'),
9606
        ('PerformInsertReplace', 'PerformUpdateType'),
9607
        ('UpdateValues', 'ListOfDataValue'),
9608
               ]
9609
9610 1
    def __init__(self):
9611
        self.NodeId = NodeId()
9612
        self.PerformInsertReplace = PerformUpdateType(0)
9613
        self.UpdateValues = []
9614 1
        self._freeze = True
9615
9616
    def to_binary(self):
9617
        packet = []
9618
        packet.append(self.NodeId.to_binary())
9619
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
9620
        packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues)))
9621
        for fieldname in self.UpdateValues:
9622
            packet.append(fieldname.to_binary())
9623
        return b''.join(packet)
9624
9625 1
    @staticmethod
9626
    def from_binary(data):
9627
        obj = UpdateDataDetails()
9628
        obj.NodeId = NodeId.from_binary(data)
9629
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
9630
        length = uabin.Primitives.Int32.unpack(data)
9631 1
        array = []
9632
        if length != -1:
9633
            for _ in range(0, length):
9634 1
                array.append(DataValue.from_binary(data))
9635
        obj.UpdateValues = array
9636
        return obj
9637
9638
    def __str__(self):
9639
        return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9640
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
9641
               'UpdateValues:' + str(self.UpdateValues) + ')'
9642
9643
    __repr__ = __str__
9644 1
9645
9646 View Code Duplication
class UpdateStructureDataDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9647
    '''
9648
    :ivar NodeId:
9649
    :vartype NodeId: NodeId
9650 1
    :ivar PerformInsertReplace:
9651
    :vartype PerformInsertReplace: PerformUpdateType
9652
    :ivar UpdateValues:
9653
    :vartype UpdateValues: DataValue
9654
    '''
9655
9656
    ua_types = [
9657
9658
        ('NodeId', 'NodeId'),
9659
        ('PerformInsertReplace', 'PerformUpdateType'),
9660 1
        ('UpdateValues', 'ListOfDataValue'),
9661
               ]
9662
9663
    def __init__(self):
9664
        self.NodeId = NodeId()
9665
        self.PerformInsertReplace = PerformUpdateType(0)
9666
        self.UpdateValues = []
9667 1
        self._freeze = True
9668
9669
    def to_binary(self):
9670
        packet = []
9671 1
        packet.append(self.NodeId.to_binary())
9672
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
9673
        packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues)))
9674
        for fieldname in self.UpdateValues:
9675
            packet.append(fieldname.to_binary())
9676 1
        return b''.join(packet)
9677
9678
    @staticmethod
9679
    def from_binary(data):
9680
        obj = UpdateStructureDataDetails()
9681 1
        obj.NodeId = NodeId.from_binary(data)
9682
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
9683
        length = uabin.Primitives.Int32.unpack(data)
9684 1
        array = []
9685
        if length != -1:
9686
            for _ in range(0, length):
9687
                array.append(DataValue.from_binary(data))
9688
        obj.UpdateValues = array
9689
        return obj
9690
9691
    def __str__(self):
9692
        return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9693
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
9694
               'UpdateValues:' + str(self.UpdateValues) + ')'
9695
9696 1
    __repr__ = __str__
9697
9698
9699 View Code Duplication
class UpdateEventDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9700
    '''
9701
    :ivar NodeId:
9702
    :vartype NodeId: NodeId
9703 1
    :ivar PerformInsertReplace:
9704
    :vartype PerformInsertReplace: PerformUpdateType
9705
    :ivar Filter:
9706
    :vartype Filter: EventFilter
9707
    :ivar EventData:
9708
    :vartype EventData: HistoryEventFieldList
9709
    '''
9710
9711
    ua_types = [
9712
9713
        ('NodeId', 'NodeId'),
9714 1
        ('PerformInsertReplace', 'PerformUpdateType'),
9715
        ('Filter', 'EventFilter'),
9716
        ('EventData', 'ListOfHistoryEventFieldList'),
9717
               ]
9718
9719
    def __init__(self):
9720
        self.NodeId = NodeId()
9721
        self.PerformInsertReplace = PerformUpdateType(0)
9722
        self.Filter = EventFilter()
9723
        self.EventData = []
9724
        self._freeze = True
9725
9726 1
    def to_binary(self):
9727
        packet = []
9728
        packet.append(self.NodeId.to_binary())
9729
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
9730 1
        packet.append(self.Filter.to_binary())
9731
        packet.append(uabin.Primitives.Int32.pack(len(self.EventData)))
9732
        for fieldname in self.EventData:
9733
            packet.append(fieldname.to_binary())
9734
        return b''.join(packet)
9735
9736
    @staticmethod
9737
    def from_binary(data):
9738
        obj = UpdateEventDetails()
9739
        obj.NodeId = NodeId.from_binary(data)
9740
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
9741
        obj.Filter = EventFilter.from_binary(data)
9742
        length = uabin.Primitives.Int32.unpack(data)
9743
        array = []
9744
        if length != -1:
9745
            for _ in range(0, length):
9746 1
                array.append(HistoryEventFieldList.from_binary(data))
9747
        obj.EventData = array
9748
        return obj
9749
9750
    def __str__(self):
9751
        return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9752 1
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
9753
               'Filter:' + str(self.Filter) + ', ' + \
9754
               'EventData:' + str(self.EventData) + ')'
9755 1
9756
    __repr__ = __str__
9757
9758
9759 View Code Duplication
class DeleteRawModifiedDetails(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9760
    '''
9761
    :ivar NodeId:
9762
    :vartype NodeId: NodeId
9763
    :ivar IsDeleteModified:
9764
    :vartype IsDeleteModified: Boolean
9765
    :ivar StartTime:
9766
    :vartype StartTime: DateTime
9767 1
    :ivar EndTime:
9768
    :vartype EndTime: DateTime
9769
    '''
9770
9771
    ua_types = [
9772
9773
        ('NodeId', 'NodeId'),
9774 1
        ('IsDeleteModified', 'Boolean'),
9775 1
        ('StartTime', 'DateTime'),
9776 1
        ('EndTime', 'DateTime'),
9777 1
               ]
9778 1
9779 1
    def __init__(self):
9780 1
        self.NodeId = NodeId()
9781 1
        self.IsDeleteModified = True
9782 1
        self.StartTime = datetime.utcnow()
9783 1
        self.EndTime = datetime.utcnow()
9784
        self._freeze = True
9785 1
9786 1
    def to_binary(self):
9787 1
        packet = []
9788 1
        packet.append(self.NodeId.to_binary())
9789 1
        packet.append(uabin.Primitives.Boolean.pack(self.IsDeleteModified))
9790 1
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
9791 1
        packet.append(uabin.Primitives.DateTime.pack(self.EndTime))
9792
        return b''.join(packet)
9793 1
9794
    @staticmethod
9795 1
    def from_binary(data):
9796
        obj = DeleteRawModifiedDetails()
9797 1
        obj.NodeId = NodeId.from_binary(data)
9798 1
        self.IsDeleteModified = uabin.Primitives.Boolean.unpack(data)
9799 1
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
9800 1
        self.EndTime = uabin.Primitives.DateTime.unpack(data)
9801 1
        return obj
9802
9803 1
    def __str__(self):
9804
        return 'DeleteRawModifiedDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9805
               'IsDeleteModified:' + str(self.IsDeleteModified) + ', ' + \
9806
               'StartTime:' + str(self.StartTime) + ', ' + \
9807
               'EndTime:' + str(self.EndTime) + ')'
9808
9809 1
    __repr__ = __str__
9810
9811
9812 1
class DeleteAtTimeDetails(FrozenClass):
9813
    '''
9814
    :ivar NodeId:
9815
    :vartype NodeId: NodeId
9816
    :ivar ReqTimes:
9817
    :vartype ReqTimes: DateTime
9818 1
    '''
9819
9820
    ua_types = [
9821
9822 1
        ('NodeId', 'NodeId'),
9823 1
        ('ReqTimes', 'ListOfDateTime'),
9824 1
               ]
9825 1
9826 1
    def __init__(self):
9827 1
        self.NodeId = NodeId()
9828 1
        self.ReqTimes = []
9829
        self._freeze = True
9830 1
9831 1
    def to_binary(self):
9832 1
        packet = []
9833 1
        packet.append(self.NodeId.to_binary())
9834 1
        packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes)))
9835 1
        for fieldname in self.ReqTimes:
9836
            packet.append(uabin.Primitives.DateTime.pack(fieldname))
9837 1
        return b''.join(packet)
9838
9839 1
    @staticmethod
9840
    def from_binary(data):
9841 1
        obj = DeleteAtTimeDetails()
9842 1
        obj.NodeId = NodeId.from_binary(data)
9843 1
        obj.ReqTimes = uabin.Primitives.DateTime.unpack_array(data)
9844 1
        return obj
9845 1
9846 1
    def __str__(self):
9847 1
        return 'DeleteAtTimeDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9848
               'ReqTimes:' + str(self.ReqTimes) + ')'
9849 1
9850
    __repr__ = __str__
9851
9852 1
9853
class DeleteEventDetails(FrozenClass):
9854
    '''
9855 1
    :ivar NodeId:
9856
    :vartype NodeId: NodeId
9857
    :ivar EventIds:
9858
    :vartype EventIds: ByteString
9859
    '''
9860
9861
    ua_types = [
9862
9863
        ('NodeId', 'NodeId'),
9864
        ('EventIds', 'ListOfByteString'),
9865 1
               ]
9866
9867
    def __init__(self):
9868
        self.NodeId = NodeId()
9869
        self.EventIds = []
9870
        self._freeze = True
9871 1
9872 1
    def to_binary(self):
9873
        packet = []
9874
        packet.append(self.NodeId.to_binary())
9875
        packet.append(uabin.Primitives.Int32.pack(len(self.EventIds)))
9876 1
        for fieldname in self.EventIds:
9877 1
            packet.append(uabin.Primitives.ByteString.pack(fieldname))
9878 1
        return b''.join(packet)
9879 1
9880
    @staticmethod
9881 1
    def from_binary(data):
9882 1
        obj = DeleteEventDetails()
9883 1
        obj.NodeId = NodeId.from_binary(data)
9884 1
        obj.EventIds = uabin.Primitives.ByteString.unpack_array(data)
9885 1
        return obj
9886 1
9887
    def __str__(self):
9888 1
        return 'DeleteEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
9889
               'EventIds:' + str(self.EventIds) + ')'
9890
9891
    __repr__ = __str__
9892 1
9893
9894 View Code Duplication
class HistoryUpdateResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9895
    '''
9896
    :ivar StatusCode:
9897 1
    :vartype StatusCode: StatusCode
9898
    :ivar OperationResults:
9899
    :vartype OperationResults: StatusCode
9900
    :ivar DiagnosticInfos:
9901
    :vartype DiagnosticInfos: DiagnosticInfo
9902 1
    '''
9903
9904
    ua_types = [
9905 1
9906
        ('StatusCode', 'StatusCode'),
9907
        ('OperationResults', 'ListOfStatusCode'),
9908
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
9909
               ]
9910
9911
    def __init__(self):
9912
        self.StatusCode = StatusCode()
9913
        self.OperationResults = []
9914
        self.DiagnosticInfos = []
9915
        self._freeze = True
9916
9917 1
    def to_binary(self):
9918
        packet = []
9919
        packet.append(self.StatusCode.to_binary())
9920
        packet.append(uabin.Primitives.Int32.pack(len(self.OperationResults)))
9921
        for fieldname in self.OperationResults:
9922
            packet.append(fieldname.to_binary())
9923
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9924 1
        for fieldname in self.DiagnosticInfos:
9925 1
            packet.append(fieldname.to_binary())
9926 1
        return b''.join(packet)
9927 1
9928 1
    @staticmethod
9929 1
    def from_binary(data):
9930 1
        obj = HistoryUpdateResult()
9931 1
        obj.StatusCode = StatusCode.from_binary(data)
9932 1
        length = uabin.Primitives.Int32.unpack(data)
9933 1
        array = []
9934
        if length != -1:
9935 1
            for _ in range(0, length):
9936 1
                array.append(StatusCode.from_binary(data))
9937 1
        obj.OperationResults = array
9938 1
        length = uabin.Primitives.Int32.unpack(data)
9939 1
        array = []
9940 1
        if length != -1:
9941 1
            for _ in range(0, length):
9942 1
                array.append(DiagnosticInfo.from_binary(data))
9943 1
        obj.DiagnosticInfos = array
9944
        return obj
9945 1
9946
    def __str__(self):
9947 1
        return 'HistoryUpdateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
9948
               'OperationResults:' + str(self.OperationResults) + ', ' + \
9949 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9950
9951 1
    __repr__ = __str__
9952 1
9953 1
9954 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...
9955 1
    '''
9956 1
    :ivar HistoryUpdateDetails:
9957 1
    :vartype HistoryUpdateDetails: ExtensionObject
9958 1
    '''
9959 1
9960 1
    ua_types = [
9961 1
9962 1
        ('HistoryUpdateDetails', 'ListOfExtensionObject'),
9963 1
               ]
9964
9965 1
    def __init__(self):
9966
        self.HistoryUpdateDetails = []
9967 1
        self._freeze = True
9968
9969
    def to_binary(self):
9970
        packet = []
9971
        packet.append(uabin.Primitives.Int32.pack(len(self.HistoryUpdateDetails)))
9972
        for fieldname in self.HistoryUpdateDetails:
9973 1
            packet.append(uabin.extensionobject_to_binary(fieldname))
9974
        return b''.join(packet)
9975
9976 1
    @staticmethod
9977
    def from_binary(data):
9978
        obj = HistoryUpdateParameters()
9979
        length = uabin.Primitives.Int32.unpack(data)
9980
        array = []
9981
        if length != -1:
9982 1
            for _ in range(0, length):
9983
                array.append(uabin.extensionobject_from_binary(data))
9984
        obj.HistoryUpdateDetails = array
9985
        return obj
9986 1
9987
    def __str__(self):
9988
        return 'HistoryUpdateParameters(' + 'HistoryUpdateDetails:' + str(self.HistoryUpdateDetails) + ')'
9989
9990
    __repr__ = __str__
9991
9992
9993
class HistoryUpdateRequest(FrozenClass):
9994 1
    '''
9995
    :ivar TypeId:
9996
    :vartype TypeId: NodeId
9997
    :ivar RequestHeader:
9998
    :vartype RequestHeader: RequestHeader
9999 1
    :ivar Parameters:
10000
    :vartype Parameters: HistoryUpdateParameters
10001
    '''
10002
10003 1
    ua_types = [
10004
10005
        ('TypeId', 'NodeId'),
10006 1
        ('RequestHeader', 'RequestHeader'),
10007
        ('Parameters', 'HistoryUpdateParameters'),
10008
               ]
10009 1
10010
    def __init__(self):
10011
        self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary)
10012 1
        self.RequestHeader = RequestHeader()
10013
        self.Parameters = HistoryUpdateParameters()
10014
        self._freeze = True
10015
10016
    def to_binary(self):
10017
        packet = []
10018
        packet.append(self.TypeId.to_binary())
10019
        packet.append(self.RequestHeader.to_binary())
10020
        packet.append(self.Parameters.to_binary())
10021
        return b''.join(packet)
10022 1
10023
    @staticmethod
10024
    def from_binary(data):
10025
        obj = HistoryUpdateRequest()
10026
        obj.TypeId = NodeId.from_binary(data)
10027
        obj.RequestHeader = RequestHeader.from_binary(data)
10028 1
        obj.Parameters = HistoryUpdateParameters.from_binary(data)
10029
        return obj
10030
10031
    def __str__(self):
10032
        return 'HistoryUpdateRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10033
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
10034
               'Parameters:' + str(self.Parameters) + ')'
10035
10036
    __repr__ = __str__
10037
10038 1
10039 View Code Duplication
class HistoryUpdateResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10040
    '''
10041
    :ivar TypeId:
10042
    :vartype TypeId: NodeId
10043
    :ivar ResponseHeader:
10044
    :vartype ResponseHeader: ResponseHeader
10045
    :ivar Results:
10046
    :vartype Results: HistoryUpdateResult
10047 1
    :ivar DiagnosticInfos:
10048
    :vartype DiagnosticInfos: DiagnosticInfo
10049
    '''
10050
10051 1
    ua_types = [
10052
10053
        ('TypeId', 'NodeId'),
10054
        ('ResponseHeader', 'ResponseHeader'),
10055
        ('Results', 'ListOfHistoryUpdateResult'),
10056
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
10057
               ]
10058
10059
    def __init__(self):
10060
        self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary)
10061 1
        self.ResponseHeader = ResponseHeader()
10062
        self.Results = []
10063
        self.DiagnosticInfos = []
10064
        self._freeze = True
10065
10066 1
    def to_binary(self):
10067
        packet = []
10068
        packet.append(self.TypeId.to_binary())
10069 1
        packet.append(self.ResponseHeader.to_binary())
10070
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
10071
        for fieldname in self.Results:
10072
            packet.append(fieldname.to_binary())
10073
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
10074
        for fieldname in self.DiagnosticInfos:
10075
            packet.append(fieldname.to_binary())
10076
        return b''.join(packet)
10077
10078
    @staticmethod
10079 1
    def from_binary(data):
10080
        obj = HistoryUpdateResponse()
10081
        obj.TypeId = NodeId.from_binary(data)
10082
        obj.ResponseHeader = ResponseHeader.from_binary(data)
10083
        length = uabin.Primitives.Int32.unpack(data)
10084
        array = []
10085 1
        if length != -1:
10086
            for _ in range(0, length):
10087
                array.append(HistoryUpdateResult.from_binary(data))
10088
        obj.Results = array
10089
        length = uabin.Primitives.Int32.unpack(data)
10090
        array = []
10091
        if length != -1:
10092
            for _ in range(0, length):
10093
                array.append(DiagnosticInfo.from_binary(data))
10094
        obj.DiagnosticInfos = array
10095 1
        return obj
10096
10097
    def __str__(self):
10098
        return 'HistoryUpdateResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10099
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10100
               'Results:' + str(self.Results) + ', ' + \
10101
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10102
10103
    __repr__ = __str__
10104 1
10105
10106 View Code Duplication
class CallMethodRequest(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10107
    '''
10108 1
    :ivar ObjectId:
10109
    :vartype ObjectId: NodeId
10110
    :ivar MethodId:
10111
    :vartype MethodId: NodeId
10112
    :ivar InputArguments:
10113
    :vartype InputArguments: Variant
10114
    '''
10115
10116
    ua_types = [
10117
10118 1
        ('ObjectId', 'NodeId'),
10119
        ('MethodId', 'NodeId'),
10120
        ('InputArguments', 'ListOfVariant'),
10121
               ]
10122
10123 1
    def __init__(self):
10124
        self.ObjectId = NodeId()
10125
        self.MethodId = NodeId()
10126 1
        self.InputArguments = []
10127
        self._freeze = True
10128
10129
    def to_binary(self):
10130
        packet = []
10131
        packet.append(self.ObjectId.to_binary())
10132
        packet.append(self.MethodId.to_binary())
10133
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArguments)))
10134
        for fieldname in self.InputArguments:
10135
            packet.append(fieldname.to_binary())
10136
        return b''.join(packet)
10137
10138 1
    @staticmethod
10139
    def from_binary(data):
10140
        obj = CallMethodRequest()
10141
        obj.ObjectId = NodeId.from_binary(data)
10142
        obj.MethodId = NodeId.from_binary(data)
10143
        length = uabin.Primitives.Int32.unpack(data)
10144
        array = []
10145 1
        if length != -1:
10146
            for _ in range(0, length):
10147
                array.append(Variant.from_binary(data))
10148
        obj.InputArguments = array
10149
        return obj
10150
10151
    def __str__(self):
10152
        return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \
10153
               'MethodId:' + str(self.MethodId) + ', ' + \
10154
               'InputArguments:' + str(self.InputArguments) + ')'
10155
10156 1
    __repr__ = __str__
10157
10158
10159
class CallMethodResult(FrozenClass):
10160
    '''
10161
    :ivar StatusCode:
10162
    :vartype StatusCode: StatusCode
10163
    :ivar InputArgumentResults:
10164
    :vartype InputArgumentResults: StatusCode
10165
    :ivar InputArgumentDiagnosticInfos:
10166 1
    :vartype InputArgumentDiagnosticInfos: DiagnosticInfo
10167
    :ivar OutputArguments:
10168
    :vartype OutputArguments: Variant
10169
    '''
10170 1
10171
    ua_types = [
10172
10173
        ('StatusCode', 'StatusCode'),
10174
        ('InputArgumentResults', 'ListOfStatusCode'),
10175
        ('InputArgumentDiagnosticInfos', 'ListOfDiagnosticInfo'),
10176
        ('OutputArguments', 'ListOfVariant'),
10177
               ]
10178
10179
    def __init__(self):
10180
        self.StatusCode = StatusCode()
10181 1
        self.InputArgumentResults = []
10182
        self.InputArgumentDiagnosticInfos = []
10183
        self.OutputArguments = []
10184
        self._freeze = True
10185
10186 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...
10187 1
        packet = []
10188
        packet.append(self.StatusCode.to_binary())
10189
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentResults)))
10190 1
        for fieldname in self.InputArgumentResults:
10191
            packet.append(fieldname.to_binary())
10192
        packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentDiagnosticInfos)))
10193
        for fieldname in self.InputArgumentDiagnosticInfos:
10194
            packet.append(fieldname.to_binary())
10195
        packet.append(uabin.Primitives.Int32.pack(len(self.OutputArguments)))
10196
        for fieldname in self.OutputArguments:
10197
            packet.append(fieldname.to_binary())
10198
        return b''.join(packet)
10199
10200
    @staticmethod
10201
    def from_binary(data):
10202 1
        obj = CallMethodResult()
10203
        obj.StatusCode = StatusCode.from_binary(data)
10204
        length = uabin.Primitives.Int32.unpack(data)
10205
        array = []
10206
        if length != -1:
10207
            for _ in range(0, length):
10208
                array.append(StatusCode.from_binary(data))
10209 1
        obj.InputArgumentResults = array
10210
        length = uabin.Primitives.Int32.unpack(data)
10211
        array = []
10212
        if length != -1:
10213
            for _ in range(0, length):
10214
                array.append(DiagnosticInfo.from_binary(data))
10215
        obj.InputArgumentDiagnosticInfos = array
10216
        length = uabin.Primitives.Int32.unpack(data)
10217
        array = []
10218
        if length != -1:
10219
            for _ in range(0, length):
10220 1
                array.append(Variant.from_binary(data))
10221
        obj.OutputArguments = array
10222
        return obj
10223
10224
    def __str__(self):
10225
        return 'CallMethodResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
10226
               'InputArgumentResults:' + str(self.InputArgumentResults) + ', ' + \
10227
               'InputArgumentDiagnosticInfos:' + str(self.InputArgumentDiagnosticInfos) + ', ' + \
10228 1
               'OutputArguments:' + str(self.OutputArguments) + ')'
10229
10230
    __repr__ = __str__
10231
10232 1
10233 View Code Duplication
class CallParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10234
    '''
10235
    :ivar MethodsToCall:
10236
    :vartype MethodsToCall: CallMethodRequest
10237
    '''
10238 1
10239
    ua_types = [
10240
10241
        ('MethodsToCall', 'ListOfCallMethodRequest'),
10242
               ]
10243
10244 1
    def __init__(self):
10245
        self.MethodsToCall = []
10246
        self._freeze = True
10247 1
10248
    def to_binary(self):
10249
        packet = []
10250
        packet.append(uabin.Primitives.Int32.pack(len(self.MethodsToCall)))
10251
        for fieldname in self.MethodsToCall:
10252
            packet.append(fieldname.to_binary())
10253
        return b''.join(packet)
10254
10255 1
    @staticmethod
10256
    def from_binary(data):
10257
        obj = CallParameters()
10258
        length = uabin.Primitives.Int32.unpack(data)
10259
        array = []
10260 1
        if length != -1:
10261
            for _ in range(0, length):
10262
                array.append(CallMethodRequest.from_binary(data))
10263
        obj.MethodsToCall = array
10264
        return obj
10265
10266
    def __str__(self):
10267
        return 'CallParameters(' + 'MethodsToCall:' + str(self.MethodsToCall) + ')'
10268
10269 1
    __repr__ = __str__
10270
10271
10272
class CallRequest(FrozenClass):
10273
    '''
10274
    :ivar TypeId:
10275
    :vartype TypeId: NodeId
10276
    :ivar RequestHeader:
10277 1
    :vartype RequestHeader: RequestHeader
10278
    :ivar Parameters:
10279
    :vartype Parameters: CallParameters
10280
    '''
10281 1
10282
    ua_types = [
10283
10284
        ('TypeId', 'NodeId'),
10285 1
        ('RequestHeader', 'RequestHeader'),
10286
        ('Parameters', 'CallParameters'),
10287
               ]
10288
10289 1
    def __init__(self):
10290
        self.TypeId = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary)
10291
        self.RequestHeader = RequestHeader()
10292 1
        self.Parameters = CallParameters()
10293
        self._freeze = True
10294
10295
    def to_binary(self):
10296
        packet = []
10297
        packet.append(self.TypeId.to_binary())
10298
        packet.append(self.RequestHeader.to_binary())
10299
        packet.append(self.Parameters.to_binary())
10300 1
        return b''.join(packet)
10301
10302
    @staticmethod
10303
    def from_binary(data):
10304
        obj = CallRequest()
10305 1
        obj.TypeId = NodeId.from_binary(data)
10306
        obj.RequestHeader = RequestHeader.from_binary(data)
10307
        obj.Parameters = CallParameters.from_binary(data)
10308
        return obj
10309
10310
    def __str__(self):
10311
        return 'CallRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10312
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
10313
               'Parameters:' + str(self.Parameters) + ')'
10314 1
10315
    __repr__ = __str__
10316
10317
10318 View Code Duplication
class CallResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10319
    '''
10320
    :ivar TypeId:
10321
    :vartype TypeId: NodeId
10322 1
    :ivar ResponseHeader:
10323
    :vartype ResponseHeader: ResponseHeader
10324
    :ivar Results:
10325
    :vartype Results: CallMethodResult
10326 1
    :ivar DiagnosticInfos:
10327
    :vartype DiagnosticInfos: DiagnosticInfo
10328
    '''
10329
10330 1
    ua_types = [
10331
10332
        ('TypeId', 'NodeId'),
10333
        ('ResponseHeader', 'ResponseHeader'),
10334 1
        ('Results', 'ListOfCallMethodResult'),
10335
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
10336
               ]
10337 1
10338
    def __init__(self):
10339
        self.TypeId = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary)
10340
        self.ResponseHeader = ResponseHeader()
10341
        self.Results = []
10342
        self.DiagnosticInfos = []
10343
        self._freeze = True
10344
10345
    def to_binary(self):
10346
        packet = []
10347 1
        packet.append(self.TypeId.to_binary())
10348
        packet.append(self.ResponseHeader.to_binary())
10349
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
10350
        for fieldname in self.Results:
10351
            packet.append(fieldname.to_binary())
10352
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
10353 1
        for fieldname in self.DiagnosticInfos:
10354
            packet.append(fieldname.to_binary())
10355
        return b''.join(packet)
10356
10357
    @staticmethod
10358
    def from_binary(data):
10359
        obj = CallResponse()
10360
        obj.TypeId = NodeId.from_binary(data)
10361
        obj.ResponseHeader = ResponseHeader.from_binary(data)
10362
        length = uabin.Primitives.Int32.unpack(data)
10363 1
        array = []
10364
        if length != -1:
10365
            for _ in range(0, length):
10366
                array.append(CallMethodResult.from_binary(data))
10367
        obj.Results = array
10368
        length = uabin.Primitives.Int32.unpack(data)
10369
        array = []
10370
        if length != -1:
10371
            for _ in range(0, length):
10372
                array.append(DiagnosticInfo.from_binary(data))
10373
        obj.DiagnosticInfos = array
10374 1
        return obj
10375
10376
    def __str__(self):
10377
        return 'CallResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10378 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10379
               'Results:' + str(self.Results) + ', ' + \
10380
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10381
10382
    __repr__ = __str__
10383
10384
10385
class MonitoringFilter(FrozenClass):
10386
    '''
10387
    '''
10388
10389
    ua_types = [
10390
10391
               ]
10392
10393 1
    def __init__(self):
10394
        self._freeze = True
10395
10396
    def to_binary(self):
10397
        packet = []
10398 1
        return b''.join(packet)
10399
10400
    @staticmethod
10401 1
    def from_binary(data):
10402
        obj = MonitoringFilter()
10403
        return obj
10404
10405
    def __str__(self):
10406
        return 'MonitoringFilter(' +  + ')'
10407 1
10408
    __repr__ = __str__
10409
10410
10411 1
class DataChangeFilter(FrozenClass):
10412
    '''
10413
    :ivar Trigger:
10414
    :vartype Trigger: DataChangeTrigger
10415
    :ivar DeadbandType:
10416
    :vartype DeadbandType: UInt32
10417
    :ivar DeadbandValue:
10418
    :vartype DeadbandValue: Double
10419 1
    '''
10420
10421
    ua_types = [
10422
10423
        ('Trigger', 'DataChangeTrigger'),
10424
        ('DeadbandType', 'UInt32'),
10425
        ('DeadbandValue', 'Double'),
10426 1
               ]
10427
10428
    def __init__(self):
10429
        self.Trigger = DataChangeTrigger(0)
10430 1
        self.DeadbandType = 0
10431
        self.DeadbandValue = 0
10432
        self._freeze = True
10433
10434
    def to_binary(self):
10435
        packet = []
10436
        packet.append(uabin.Primitives.UInt32.pack(self.Trigger.value))
10437
        packet.append(uabin.Primitives.UInt32.pack(self.DeadbandType))
10438 1
        packet.append(uabin.Primitives.Double.pack(self.DeadbandValue))
10439
        return b''.join(packet)
10440
10441 1
    @staticmethod
10442
    def from_binary(data):
10443
        obj = DataChangeFilter()
10444 1
        self.Trigger = DataChangeTrigger(uabin.Primitives.UInt32.unpack(data))
10445
        self.DeadbandType = uabin.Primitives.UInt32.unpack(data)
10446
        self.DeadbandValue = uabin.Primitives.Double.unpack(data)
10447
        return obj
10448
10449
    def __str__(self):
10450
        return 'DataChangeFilter(' + 'Trigger:' + str(self.Trigger) + ', ' + \
10451
               'DeadbandType:' + str(self.DeadbandType) + ', ' + \
10452
               'DeadbandValue:' + str(self.DeadbandValue) + ')'
10453
10454 1
    __repr__ = __str__
10455
10456
10457 View Code Duplication
class EventFilter(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10458
    '''
10459
    :ivar SelectClauses:
10460 1
    :vartype SelectClauses: SimpleAttributeOperand
10461
    :ivar WhereClause:
10462
    :vartype WhereClause: ContentFilter
10463
    '''
10464
10465
    ua_types = [
10466
10467
        ('SelectClauses', 'ListOfSimpleAttributeOperand'),
10468
        ('WhereClause', 'ContentFilter'),
10469
               ]
10470 1
10471
    def __init__(self):
10472
        self.SelectClauses = []
10473
        self.WhereClause = ContentFilter()
10474
        self._freeze = True
10475
10476
    def to_binary(self):
10477 1
        packet = []
10478
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauses)))
10479
        for fieldname in self.SelectClauses:
10480
            packet.append(fieldname.to_binary())
10481 1
        packet.append(self.WhereClause.to_binary())
10482
        return b''.join(packet)
10483
10484
    @staticmethod
10485
    def from_binary(data):
10486 1
        obj = EventFilter()
10487
        length = uabin.Primitives.Int32.unpack(data)
10488
        array = []
10489
        if length != -1:
10490
            for _ in range(0, length):
10491 1
                array.append(SimpleAttributeOperand.from_binary(data))
10492
        obj.SelectClauses = array
10493
        obj.WhereClause = ContentFilter.from_binary(data)
10494 1
        return obj
10495
10496
    def __str__(self):
10497
        return 'EventFilter(' + 'SelectClauses:' + str(self.SelectClauses) + ', ' + \
10498
               'WhereClause:' + str(self.WhereClause) + ')'
10499
10500
    __repr__ = __str__
10501
10502
10503
class AggregateConfiguration(FrozenClass):
10504
    '''
10505
    :ivar UseServerCapabilitiesDefaults:
10506 1
    :vartype UseServerCapabilitiesDefaults: Boolean
10507
    :ivar TreatUncertainAsBad:
10508
    :vartype TreatUncertainAsBad: Boolean
10509
    :ivar PercentDataBad:
10510
    :vartype PercentDataBad: Byte
10511
    :ivar PercentDataGood:
10512
    :vartype PercentDataGood: Byte
10513 1
    :ivar UseSlopedExtrapolation:
10514
    :vartype UseSlopedExtrapolation: Boolean
10515
    '''
10516
10517
    ua_types = [
10518
10519
        ('UseServerCapabilitiesDefaults', 'Boolean'),
10520
        ('TreatUncertainAsBad', 'Boolean'),
10521
        ('PercentDataBad', 'Byte'),
10522
        ('PercentDataGood', 'Byte'),
10523
        ('UseSlopedExtrapolation', 'Boolean'),
10524 1
               ]
10525
10526
    def __init__(self):
10527
        self.UseServerCapabilitiesDefaults = True
10528
        self.TreatUncertainAsBad = True
10529
        self.PercentDataBad = 0
10530
        self.PercentDataGood = 0
10531
        self.UseSlopedExtrapolation = True
10532
        self._freeze = True
10533
10534
    def to_binary(self):
10535
        packet = []
10536 1
        packet.append(uabin.Primitives.Boolean.pack(self.UseServerCapabilitiesDefaults))
10537
        packet.append(uabin.Primitives.Boolean.pack(self.TreatUncertainAsBad))
10538
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataBad))
10539
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataGood))
10540 1
        packet.append(uabin.Primitives.Boolean.pack(self.UseSlopedExtrapolation))
10541
        return b''.join(packet)
10542
10543
    @staticmethod
10544
    def from_binary(data):
10545
        obj = AggregateConfiguration()
10546
        self.UseServerCapabilitiesDefaults = uabin.Primitives.Boolean.unpack(data)
10547
        self.TreatUncertainAsBad = uabin.Primitives.Boolean.unpack(data)
10548
        self.PercentDataBad = uabin.Primitives.Byte.unpack(data)
10549
        self.PercentDataGood = uabin.Primitives.Byte.unpack(data)
10550
        self.UseSlopedExtrapolation = uabin.Primitives.Boolean.unpack(data)
10551
        return obj
10552
10553
    def __str__(self):
10554
        return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \
10555
               'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \
10556 1
               'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \
10557
               'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \
10558
               'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')'
10559
10560
    __repr__ = __str__
10561
10562 1
10563
class AggregateFilter(FrozenClass):
10564
    '''
10565 1
    :ivar StartTime:
10566
    :vartype StartTime: DateTime
10567
    :ivar AggregateType:
10568
    :vartype AggregateType: NodeId
10569
    :ivar ProcessingInterval:
10570
    :vartype ProcessingInterval: Double
10571
    :ivar AggregateConfiguration:
10572
    :vartype AggregateConfiguration: AggregateConfiguration
10573
    '''
10574
10575 1
    ua_types = [
10576
10577
        ('StartTime', 'DateTime'),
10578
        ('AggregateType', 'NodeId'),
10579
        ('ProcessingInterval', 'Double'),
10580
        ('AggregateConfiguration', 'AggregateConfiguration'),
10581 1
               ]
10582 1
10583 1
    def __init__(self):
10584 1
        self.StartTime = datetime.utcnow()
10585 1
        self.AggregateType = NodeId()
10586 1
        self.ProcessingInterval = 0
10587 1
        self.AggregateConfiguration = AggregateConfiguration()
10588 1
        self._freeze = True
10589 1
10590
    def to_binary(self):
10591 1
        packet = []
10592 1
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
10593 1
        packet.append(self.AggregateType.to_binary())
10594 1
        packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval))
10595 1
        packet.append(self.AggregateConfiguration.to_binary())
10596 1
        return b''.join(packet)
10597 1
10598 1
    @staticmethod
10599
    def from_binary(data):
10600 1
        obj = AggregateFilter()
10601
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
10602 1
        obj.AggregateType = NodeId.from_binary(data)
10603
        self.ProcessingInterval = uabin.Primitives.Double.unpack(data)
10604 1
        obj.AggregateConfiguration = AggregateConfiguration.from_binary(data)
10605 1
        return obj
10606 1
10607 1
    def __str__(self):
10608 1
        return 'AggregateFilter(' + 'StartTime:' + str(self.StartTime) + ', ' + \
10609 1
               'AggregateType:' + str(self.AggregateType) + ', ' + \
10610 1
               'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \
10611 1
               'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')'
10612 1
10613
    __repr__ = __str__
10614 1
10615 1
10616
class MonitoringFilterResult(FrozenClass):
10617
    '''
10618
    '''
10619 1
10620
    ua_types = [
10621
10622 1
               ]
10623
10624
    def __init__(self):
10625
        self._freeze = True
10626
10627
    def to_binary(self):
10628
        packet = []
10629
        return b''.join(packet)
10630
10631
    @staticmethod
10632
    def from_binary(data):
10633
        obj = MonitoringFilterResult()
10634 1
        return obj
10635
10636
    def __str__(self):
10637
        return 'MonitoringFilterResult(' +  + ')'
10638
10639
    __repr__ = __str__
10640
10641 1
10642 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...
10643 1
    '''
10644 1
    :ivar SelectClauseResults:
10645 1
    :vartype SelectClauseResults: StatusCode
10646 1
    :ivar SelectClauseDiagnosticInfos:
10647 1
    :vartype SelectClauseDiagnosticInfos: DiagnosticInfo
10648 1
    :ivar WhereClauseResult:
10649 1
    :vartype WhereClauseResult: ContentFilterResult
10650 1
    '''
10651
10652 1
    ua_types = [
10653 1
10654 1
        ('SelectClauseResults', 'ListOfStatusCode'),
10655 1
        ('SelectClauseDiagnosticInfos', 'ListOfDiagnosticInfo'),
10656 1
        ('WhereClauseResult', 'ContentFilterResult'),
10657 1
               ]
10658 1
10659 1
    def __init__(self):
10660
        self.SelectClauseResults = []
10661 1
        self.SelectClauseDiagnosticInfos = []
10662 1
        self.WhereClauseResult = ContentFilterResult()
10663 1
        self._freeze = True
10664 1
10665
    def to_binary(self):
10666 1
        packet = []
10667
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseResults)))
10668 1
        for fieldname in self.SelectClauseResults:
10669
            packet.append(fieldname.to_binary())
10670 1
        packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseDiagnosticInfos)))
10671 1
        for fieldname in self.SelectClauseDiagnosticInfos:
10672 1
            packet.append(fieldname.to_binary())
10673 1
        packet.append(self.WhereClauseResult.to_binary())
10674 1
        return b''.join(packet)
10675 1
10676 1
    @staticmethod
10677 1
    def from_binary(data):
10678 1
        obj = EventFilterResult()
10679 1
        length = uabin.Primitives.Int32.unpack(data)
10680 1
        array = []
10681 1
        if length != -1:
10682
            for _ in range(0, length):
10683 1
                array.append(StatusCode.from_binary(data))
10684 1
        obj.SelectClauseResults = array
10685 1
        length = uabin.Primitives.Int32.unpack(data)
10686 1
        array = []
10687 1
        if length != -1:
10688 1
            for _ in range(0, length):
10689 1
                array.append(DiagnosticInfo.from_binary(data))
10690
        obj.SelectClauseDiagnosticInfos = array
10691 1
        obj.WhereClauseResult = ContentFilterResult.from_binary(data)
10692
        return obj
10693
10694
    def __str__(self):
10695
        return 'EventFilterResult(' + 'SelectClauseResults:' + str(self.SelectClauseResults) + ', ' + \
10696
               'SelectClauseDiagnosticInfos:' + str(self.SelectClauseDiagnosticInfos) + ', ' + \
10697 1
               'WhereClauseResult:' + str(self.WhereClauseResult) + ')'
10698
10699
    __repr__ = __str__
10700 1
10701
10702 View Code Duplication
class AggregateFilterResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10703
    '''
10704
    :ivar RevisedStartTime:
10705
    :vartype RevisedStartTime: DateTime
10706 1
    :ivar RevisedProcessingInterval:
10707
    :vartype RevisedProcessingInterval: Double
10708
    :ivar RevisedAggregateConfiguration:
10709
    :vartype RevisedAggregateConfiguration: AggregateConfiguration
10710 1
    '''
10711 1
10712 1
    ua_types = [
10713 1
10714 1
        ('RevisedStartTime', 'DateTime'),
10715 1
        ('RevisedProcessingInterval', 'Double'),
10716 1
        ('RevisedAggregateConfiguration', 'AggregateConfiguration'),
10717
               ]
10718 1
10719 1
    def __init__(self):
10720 1
        self.RevisedStartTime = datetime.utcnow()
10721 1
        self.RevisedProcessingInterval = 0
10722 1
        self.RevisedAggregateConfiguration = AggregateConfiguration()
10723 1
        self._freeze = True
10724
10725 1
    def to_binary(self):
10726
        packet = []
10727 1
        packet.append(uabin.Primitives.DateTime.pack(self.RevisedStartTime))
10728
        packet.append(uabin.Primitives.Double.pack(self.RevisedProcessingInterval))
10729 1
        packet.append(self.RevisedAggregateConfiguration.to_binary())
10730 1
        return b''.join(packet)
10731 1
10732 1
    @staticmethod
10733 1
    def from_binary(data):
10734 1
        obj = AggregateFilterResult()
10735 1
        self.RevisedStartTime = uabin.Primitives.DateTime.unpack(data)
10736
        self.RevisedProcessingInterval = uabin.Primitives.Double.unpack(data)
10737 1
        obj.RevisedAggregateConfiguration = AggregateConfiguration.from_binary(data)
10738
        return obj
10739
10740 1
    def __str__(self):
10741
        return 'AggregateFilterResult(' + 'RevisedStartTime:' + str(self.RevisedStartTime) + ', ' + \
10742
               'RevisedProcessingInterval:' + str(self.RevisedProcessingInterval) + ', ' + \
10743 1
               'RevisedAggregateConfiguration:' + str(self.RevisedAggregateConfiguration) + ')'
10744
10745
    __repr__ = __str__
10746
10747
10748
class MonitoringParameters(FrozenClass):
10749
    '''
10750
    :ivar ClientHandle:
10751
    :vartype ClientHandle: UInt32
10752
    :ivar SamplingInterval:
10753 1
    :vartype SamplingInterval: Double
10754
    :ivar Filter:
10755
    :vartype Filter: ExtensionObject
10756
    :ivar QueueSize:
10757
    :vartype QueueSize: UInt32
10758
    :ivar DiscardOldest:
10759 1
    :vartype DiscardOldest: Boolean
10760 1
    '''
10761
10762
    ua_types = [
10763
10764 1
        ('ClientHandle', 'UInt32'),
10765 1
        ('SamplingInterval', 'Double'),
10766 1
        ('Filter', 'ExtensionObject'),
10767 1
        ('QueueSize', 'UInt32'),
10768
        ('DiscardOldest', 'Boolean'),
10769 1
               ]
10770 1
10771 1
    def __init__(self):
10772 1
        self.ClientHandle = 0
10773 1
        self.SamplingInterval = 0
10774 1
        self.Filter = ExtensionObject()
10775
        self.QueueSize = 0
10776 1
        self.DiscardOldest = True
10777
        self._freeze = True
10778
10779
    def to_binary(self):
10780 1
        packet = []
10781
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
10782
        packet.append(uabin.Primitives.Double.pack(self.SamplingInterval))
10783
        packet.append(uabin.extensionobject_to_binary(self.Filter))
10784
        packet.append(uabin.Primitives.UInt32.pack(self.QueueSize))
10785 1
        packet.append(uabin.Primitives.Boolean.pack(self.DiscardOldest))
10786
        return b''.join(packet)
10787
10788
    @staticmethod
10789
    def from_binary(data):
10790 1
        obj = MonitoringParameters()
10791
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
10792
        self.SamplingInterval = uabin.Primitives.Double.unpack(data)
10793 1
        obj.Filter = uabin.extensionobject_from_binary(data)
10794
        self.QueueSize = uabin.Primitives.UInt32.unpack(data)
10795
        self.DiscardOldest = uabin.Primitives.Boolean.unpack(data)
10796
        return obj
10797
10798
    def __str__(self):
10799
        return 'MonitoringParameters(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
10800
               'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \
10801
               'Filter:' + str(self.Filter) + ', ' + \
10802
               'QueueSize:' + str(self.QueueSize) + ', ' + \
10803
               'DiscardOldest:' + str(self.DiscardOldest) + ')'
10804
10805 1
    __repr__ = __str__
10806
10807
10808 View Code Duplication
class MonitoredItemCreateRequest(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10809
    '''
10810
    :ivar ItemToMonitor:
10811
    :vartype ItemToMonitor: ReadValueId
10812 1
    :ivar MonitoringMode:
10813 1
    :vartype MonitoringMode: MonitoringMode
10814 1
    :ivar RequestedParameters:
10815 1
    :vartype RequestedParameters: MonitoringParameters
10816 1
    '''
10817 1
10818 1
    ua_types = [
10819 1
10820 1
        ('ItemToMonitor', 'ReadValueId'),
10821 1
        ('MonitoringMode', 'MonitoringMode'),
10822
        ('RequestedParameters', 'MonitoringParameters'),
10823 1
               ]
10824 1
10825 1
    def __init__(self):
10826 1
        self.ItemToMonitor = ReadValueId()
10827 1
        self.MonitoringMode = MonitoringMode(0)
10828 1
        self.RequestedParameters = MonitoringParameters()
10829 1
        self._freeze = True
10830 1
10831 1
    def to_binary(self):
10832
        packet = []
10833 1
        packet.append(self.ItemToMonitor.to_binary())
10834
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value))
10835 1
        packet.append(self.RequestedParameters.to_binary())
10836
        return b''.join(packet)
10837 1
10838
    @staticmethod
10839 1
    def from_binary(data):
10840 1
        obj = MonitoredItemCreateRequest()
10841 1
        obj.ItemToMonitor = ReadValueId.from_binary(data)
10842 1
        self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data))
10843 1
        obj.RequestedParameters = MonitoringParameters.from_binary(data)
10844 1
        return obj
10845 1
10846 1
    def __str__(self):
10847 1
        return 'MonitoredItemCreateRequest(' + 'ItemToMonitor:' + str(self.ItemToMonitor) + ', ' + \
10848 1
               'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \
10849 1
               'RequestedParameters:' + str(self.RequestedParameters) + ')'
10850 1
10851 1
    __repr__ = __str__
10852
10853 1
10854
class MonitoredItemCreateResult(FrozenClass):
10855 1
    '''
10856
    :ivar StatusCode:
10857
    :vartype StatusCode: StatusCode
10858
    :ivar MonitoredItemId:
10859
    :vartype MonitoredItemId: UInt32
10860
    :ivar RevisedSamplingInterval:
10861 1
    :vartype RevisedSamplingInterval: Double
10862
    :ivar RevisedQueueSize:
10863
    :vartype RevisedQueueSize: UInt32
10864 1
    :ivar FilterResult:
10865
    :vartype FilterResult: ExtensionObject
10866
    '''
10867
10868 1
    ua_types = [
10869
10870
        ('StatusCode', 'StatusCode'),
10871 1
        ('MonitoredItemId', 'UInt32'),
10872
        ('RevisedSamplingInterval', 'Double'),
10873
        ('RevisedQueueSize', 'UInt32'),
10874
        ('FilterResult', 'ExtensionObject'),
10875
               ]
10876
10877
    def __init__(self):
10878 1
        self.StatusCode = StatusCode()
10879
        self.MonitoredItemId = 0
10880
        self.RevisedSamplingInterval = 0
10881
        self.RevisedQueueSize = 0
10882 1
        self.FilterResult = ExtensionObject()
10883
        self._freeze = True
10884
10885
    def to_binary(self):
10886 1
        packet = []
10887
        packet.append(self.StatusCode.to_binary())
10888
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId))
10889 1
        packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval))
10890
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize))
10891
        packet.append(uabin.extensionobject_to_binary(self.FilterResult))
10892 1
        return b''.join(packet)
10893
10894
    @staticmethod
10895 1
    def from_binary(data):
10896
        obj = MonitoredItemCreateResult()
10897
        obj.StatusCode = StatusCode.from_binary(data)
10898
        self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data)
10899
        self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data)
10900
        self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data)
10901
        obj.FilterResult = uabin.extensionobject_from_binary(data)
10902
        return obj
10903
10904
    def __str__(self):
10905 1
        return 'MonitoredItemCreateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
10906
               'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \
10907
               'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \
10908
               'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \
10909
               'FilterResult:' + str(self.FilterResult) + ')'
10910
10911 1
    __repr__ = __str__
10912
10913
10914 View Code Duplication
class CreateMonitoredItemsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10915
    '''
10916
    :ivar SubscriptionId:
10917
    :vartype SubscriptionId: UInt32
10918
    :ivar TimestampsToReturn:
10919
    :vartype TimestampsToReturn: TimestampsToReturn
10920
    :ivar ItemsToCreate:
10921 1
    :vartype ItemsToCreate: MonitoredItemCreateRequest
10922
    '''
10923
10924
    ua_types = [
10925
10926
        ('SubscriptionId', 'UInt32'),
10927
        ('TimestampsToReturn', 'TimestampsToReturn'),
10928 1
        ('ItemsToCreate', 'ListOfMonitoredItemCreateRequest'),
10929
               ]
10930
10931
    def __init__(self):
10932 1
        self.SubscriptionId = 0
10933
        self.TimestampsToReturn = TimestampsToReturn(0)
10934
        self.ItemsToCreate = []
10935
        self._freeze = True
10936
10937 1
    def to_binary(self):
10938
        packet = []
10939
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
10940
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
10941
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate)))
10942 1
        for fieldname in self.ItemsToCreate:
10943
            packet.append(fieldname.to_binary())
10944
        return b''.join(packet)
10945 1
10946
    @staticmethod
10947
    def from_binary(data):
10948
        obj = CreateMonitoredItemsParameters()
10949
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
10950
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
10951
        length = uabin.Primitives.Int32.unpack(data)
10952
        array = []
10953 1
        if length != -1:
10954
            for _ in range(0, length):
10955
                array.append(MonitoredItemCreateRequest.from_binary(data))
10956
        obj.ItemsToCreate = array
10957
        return obj
10958 1
10959 1
    def __str__(self):
10960 1
        return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
10961 1
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
10962 1
               'ItemsToCreate:' + str(self.ItemsToCreate) + ')'
10963 1
10964 1
    __repr__ = __str__
10965 1
10966
10967 1
class CreateMonitoredItemsRequest(FrozenClass):
10968 1
    '''
10969 1
    :ivar TypeId:
10970 1
    :vartype TypeId: NodeId
10971 1
    :ivar RequestHeader:
10972 1
    :vartype RequestHeader: RequestHeader
10973 1
    :ivar Parameters:
10974
    :vartype Parameters: CreateMonitoredItemsParameters
10975 1
    '''
10976
10977 1
    ua_types = [
10978
10979 1
        ('TypeId', 'NodeId'),
10980 1
        ('RequestHeader', 'RequestHeader'),
10981 1
        ('Parameters', 'CreateMonitoredItemsParameters'),
10982 1
               ]
10983 1
10984 1
    def __init__(self):
10985 1
        self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary)
10986 1
        self.RequestHeader = RequestHeader()
10987
        self.Parameters = CreateMonitoredItemsParameters()
10988 1
        self._freeze = True
10989
10990
    def to_binary(self):
10991
        packet = []
10992 1
        packet.append(self.TypeId.to_binary())
10993
        packet.append(self.RequestHeader.to_binary())
10994
        packet.append(self.Parameters.to_binary())
10995 1
        return b''.join(packet)
10996
10997
    @staticmethod
10998
    def from_binary(data):
10999
        obj = CreateMonitoredItemsRequest()
11000
        obj.TypeId = NodeId.from_binary(data)
11001
        obj.RequestHeader = RequestHeader.from_binary(data)
11002
        obj.Parameters = CreateMonitoredItemsParameters.from_binary(data)
11003
        return obj
11004
11005
    def __str__(self):
11006
        return 'CreateMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11007
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11008
               'Parameters:' + str(self.Parameters) + ')'
11009 1
11010
    __repr__ = __str__
11011
11012
11013 View Code Duplication
class CreateMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11014
    '''
11015
    :ivar TypeId:
11016
    :vartype TypeId: NodeId
11017 1
    :ivar ResponseHeader:
11018
    :vartype ResponseHeader: ResponseHeader
11019
    :ivar Results:
11020
    :vartype Results: MonitoredItemCreateResult
11021
    :ivar DiagnosticInfos:
11022
    :vartype DiagnosticInfos: DiagnosticInfo
11023
    '''
11024
11025
    ua_types = [
11026
11027
        ('TypeId', 'NodeId'),
11028
        ('ResponseHeader', 'ResponseHeader'),
11029 1
        ('Results', 'ListOfMonitoredItemCreateResult'),
11030
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
11031
               ]
11032
11033
    def __init__(self):
11034
        self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary)
11035
        self.ResponseHeader = ResponseHeader()
11036
        self.Results = []
11037
        self.DiagnosticInfos = []
11038 1
        self._freeze = True
11039
11040
    def to_binary(self):
11041
        packet = []
11042 1
        packet.append(self.TypeId.to_binary())
11043
        packet.append(self.ResponseHeader.to_binary())
11044
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11045
        for fieldname in self.Results:
11046
            packet.append(fieldname.to_binary())
11047
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11048
        for fieldname in self.DiagnosticInfos:
11049 1
            packet.append(fieldname.to_binary())
11050
        return b''.join(packet)
11051
11052
    @staticmethod
11053
    def from_binary(data):
11054
        obj = CreateMonitoredItemsResponse()
11055
        obj.TypeId = NodeId.from_binary(data)
11056 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
11057
        length = uabin.Primitives.Int32.unpack(data)
11058
        array = []
11059 1
        if length != -1:
11060
            for _ in range(0, length):
11061
                array.append(MonitoredItemCreateResult.from_binary(data))
11062
        obj.Results = array
11063
        length = uabin.Primitives.Int32.unpack(data)
11064
        array = []
11065
        if length != -1:
11066
            for _ in range(0, length):
11067
                array.append(DiagnosticInfo.from_binary(data))
11068
        obj.DiagnosticInfos = array
11069
        return obj
11070
11071 1
    def __str__(self):
11072
        return 'CreateMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11073
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11074
               'Results:' + str(self.Results) + ', ' + \
11075
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11076
11077
    __repr__ = __str__
11078 1
11079
11080
class MonitoredItemModifyRequest(FrozenClass):
11081
    '''
11082
    :ivar MonitoredItemId:
11083
    :vartype MonitoredItemId: UInt32
11084
    :ivar RequestedParameters:
11085
    :vartype RequestedParameters: MonitoringParameters
11086
    '''
11087
11088
    ua_types = [
11089 1
11090
        ('MonitoredItemId', 'UInt32'),
11091
        ('RequestedParameters', 'MonitoringParameters'),
11092
               ]
11093
11094
    def __init__(self):
11095
        self.MonitoredItemId = 0
11096
        self.RequestedParameters = MonitoringParameters()
11097 1
        self._freeze = True
11098
11099
    def to_binary(self):
11100
        packet = []
11101 1
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId))
11102
        packet.append(self.RequestedParameters.to_binary())
11103
        return b''.join(packet)
11104
11105
    @staticmethod
11106
    def from_binary(data):
11107 1
        obj = MonitoredItemModifyRequest()
11108
        self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data)
11109
        obj.RequestedParameters = MonitoringParameters.from_binary(data)
11110
        return obj
11111
11112
    def __str__(self):
11113 1
        return 'MonitoredItemModifyRequest(' + 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \
11114
               'RequestedParameters:' + str(self.RequestedParameters) + ')'
11115
11116 1
    __repr__ = __str__
11117
11118
11119
class MonitoredItemModifyResult(FrozenClass):
11120 1
    '''
11121
    :ivar StatusCode:
11122
    :vartype StatusCode: StatusCode
11123 1
    :ivar RevisedSamplingInterval:
11124
    :vartype RevisedSamplingInterval: Double
11125
    :ivar RevisedQueueSize:
11126
    :vartype RevisedQueueSize: UInt32
11127
    :ivar FilterResult:
11128
    :vartype FilterResult: ExtensionObject
11129
    '''
11130 1
11131
    ua_types = [
11132
11133
        ('StatusCode', 'StatusCode'),
11134 1
        ('RevisedSamplingInterval', 'Double'),
11135
        ('RevisedQueueSize', 'UInt32'),
11136
        ('FilterResult', 'ExtensionObject'),
11137
               ]
11138 1
11139
    def __init__(self):
11140
        self.StatusCode = StatusCode()
11141 1
        self.RevisedSamplingInterval = 0
11142
        self.RevisedQueueSize = 0
11143
        self.FilterResult = ExtensionObject()
11144 1
        self._freeze = True
11145
11146
    def to_binary(self):
11147 1
        packet = []
11148
        packet.append(self.StatusCode.to_binary())
11149
        packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval))
11150
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize))
11151
        packet.append(uabin.extensionobject_to_binary(self.FilterResult))
11152
        return b''.join(packet)
11153
11154
    @staticmethod
11155
    def from_binary(data):
11156
        obj = MonitoredItemModifyResult()
11157 1
        obj.StatusCode = StatusCode.from_binary(data)
11158
        self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data)
11159
        self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data)
11160
        obj.FilterResult = uabin.extensionobject_from_binary(data)
11161
        return obj
11162
11163 1
    def __str__(self):
11164
        return 'MonitoredItemModifyResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
11165
               'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \
11166
               'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \
11167
               'FilterResult:' + str(self.FilterResult) + ')'
11168
11169
    __repr__ = __str__
11170
11171
11172 View Code Duplication
class ModifyMonitoredItemsParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11173 1
    '''
11174
    :ivar SubscriptionId:
11175
    :vartype SubscriptionId: UInt32
11176
    :ivar TimestampsToReturn:
11177
    :vartype TimestampsToReturn: TimestampsToReturn
11178
    :ivar ItemsToModify:
11179
    :vartype ItemsToModify: MonitoredItemModifyRequest
11180
    '''
11181
11182
    ua_types = [
11183
11184 1
        ('SubscriptionId', 'UInt32'),
11185
        ('TimestampsToReturn', 'TimestampsToReturn'),
11186
        ('ItemsToModify', 'ListOfMonitoredItemModifyRequest'),
11187
               ]
11188 1
11189
    def __init__(self):
11190
        self.SubscriptionId = 0
11191
        self.TimestampsToReturn = TimestampsToReturn(0)
11192
        self.ItemsToModify = []
11193
        self._freeze = True
11194
11195
    def to_binary(self):
11196
        packet = []
11197
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11198
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
11199
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify)))
11200
        for fieldname in self.ItemsToModify:
11201
            packet.append(fieldname.to_binary())
11202
        return b''.join(packet)
11203 1
11204
    @staticmethod
11205
    def from_binary(data):
11206
        obj = ModifyMonitoredItemsParameters()
11207
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11208 1
        self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data))
11209
        length = uabin.Primitives.Int32.unpack(data)
11210
        array = []
11211 1
        if length != -1:
11212
            for _ in range(0, length):
11213
                array.append(MonitoredItemModifyRequest.from_binary(data))
11214
        obj.ItemsToModify = array
11215
        return obj
11216
11217
    def __str__(self):
11218
        return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11219
               'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \
11220
               'ItemsToModify:' + str(self.ItemsToModify) + ')'
11221 1
11222
    __repr__ = __str__
11223
11224
11225
class ModifyMonitoredItemsRequest(FrozenClass):
11226
    '''
11227 1
    :ivar TypeId:
11228
    :vartype TypeId: NodeId
11229
    :ivar RequestHeader:
11230
    :vartype RequestHeader: RequestHeader
11231
    :ivar Parameters:
11232
    :vartype Parameters: ModifyMonitoredItemsParameters
11233
    '''
11234
11235
    ua_types = [
11236
11237 1
        ('TypeId', 'NodeId'),
11238
        ('RequestHeader', 'RequestHeader'),
11239
        ('Parameters', 'ModifyMonitoredItemsParameters'),
11240
               ]
11241
11242
    def __init__(self):
11243
        self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary)
11244 1
        self.RequestHeader = RequestHeader()
11245
        self.Parameters = ModifyMonitoredItemsParameters()
11246
        self._freeze = True
11247
11248 1
    def to_binary(self):
11249
        packet = []
11250
        packet.append(self.TypeId.to_binary())
11251
        packet.append(self.RequestHeader.to_binary())
11252
        packet.append(self.Parameters.to_binary())
11253 1
        return b''.join(packet)
11254
11255
    @staticmethod
11256
    def from_binary(data):
11257
        obj = ModifyMonitoredItemsRequest()
11258 1
        obj.TypeId = NodeId.from_binary(data)
11259
        obj.RequestHeader = RequestHeader.from_binary(data)
11260
        obj.Parameters = ModifyMonitoredItemsParameters.from_binary(data)
11261 1
        return obj
11262
11263
    def __str__(self):
11264
        return 'ModifyMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11265
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11266
               'Parameters:' + str(self.Parameters) + ')'
11267
11268
    __repr__ = __str__
11269
11270
11271 View Code Duplication
class ModifyMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11272
    '''
11273
    :ivar TypeId:
11274
    :vartype TypeId: NodeId
11275 1
    :ivar ResponseHeader:
11276
    :vartype ResponseHeader: ResponseHeader
11277
    :ivar Results:
11278
    :vartype Results: MonitoredItemModifyResult
11279
    :ivar DiagnosticInfos:
11280
    :vartype DiagnosticInfos: DiagnosticInfo
11281
    '''
11282
11283 1
    ua_types = [
11284 1
11285 1
        ('TypeId', 'NodeId'),
11286 1
        ('ResponseHeader', 'ResponseHeader'),
11287 1
        ('Results', 'ListOfMonitoredItemModifyResult'),
11288 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
11289 1
               ]
11290 1
11291 1
    def __init__(self):
11292 1
        self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary)
11293 1
        self.ResponseHeader = ResponseHeader()
11294
        self.Results = []
11295 1
        self.DiagnosticInfos = []
11296 1
        self._freeze = True
11297 1
11298 1
    def to_binary(self):
11299 1
        packet = []
11300 1
        packet.append(self.TypeId.to_binary())
11301 1
        packet.append(self.ResponseHeader.to_binary())
11302 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11303
        for fieldname in self.Results:
11304 1
            packet.append(fieldname.to_binary())
11305
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11306 1
        for fieldname in self.DiagnosticInfos:
11307
            packet.append(fieldname.to_binary())
11308 1
        return b''.join(packet)
11309 1
11310 1
    @staticmethod
11311 1
    def from_binary(data):
11312 1
        obj = ModifyMonitoredItemsResponse()
11313 1
        obj.TypeId = NodeId.from_binary(data)
11314
        obj.ResponseHeader = ResponseHeader.from_binary(data)
11315 1
        length = uabin.Primitives.Int32.unpack(data)
11316
        array = []
11317
        if length != -1:
11318
            for _ in range(0, length):
11319
                array.append(MonitoredItemModifyResult.from_binary(data))
11320
        obj.Results = array
11321
        length = uabin.Primitives.Int32.unpack(data)
11322 1
        array = []
11323
        if length != -1:
11324
            for _ in range(0, length):
11325 1
                array.append(DiagnosticInfo.from_binary(data))
11326
        obj.DiagnosticInfos = array
11327
        return obj
11328
11329
    def __str__(self):
11330
        return 'ModifyMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11331
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11332
               'Results:' + str(self.Results) + ', ' + \
11333
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11334
11335 1
    __repr__ = __str__
11336
11337
11338 View Code Duplication
class SetMonitoringModeParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11339
    '''
11340
    :ivar SubscriptionId:
11341 1
    :vartype SubscriptionId: UInt32
11342 1
    :ivar MonitoringMode:
11343 1
    :vartype MonitoringMode: MonitoringMode
11344 1
    :ivar MonitoredItemIds:
11345 1
    :vartype MonitoredItemIds: UInt32
11346 1
    '''
11347 1
11348 1
    ua_types = [
11349 1
11350
        ('SubscriptionId', 'UInt32'),
11351 1
        ('MonitoringMode', 'MonitoringMode'),
11352 1
        ('MonitoredItemIds', 'ListOfUInt32'),
11353 1
               ]
11354 1
11355 1
    def __init__(self):
11356 1
        self.SubscriptionId = 0
11357
        self.MonitoringMode = MonitoringMode(0)
11358 1
        self.MonitoredItemIds = []
11359
        self._freeze = True
11360 1
11361
    def to_binary(self):
11362 1
        packet = []
11363 1
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11364 1
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value))
11365 1
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds)))
11366
        for fieldname in self.MonitoredItemIds:
11367 1
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11368
        return b''.join(packet)
11369
11370
    @staticmethod
11371
    def from_binary(data):
11372 1
        obj = SetMonitoringModeParameters()
11373
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11374
        self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data))
11375 1
        obj.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data)
11376
        return obj
11377
11378
    def __str__(self):
11379
        return 'SetMonitoringModeParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11380
               'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \
11381
               'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')'
11382
11383
    __repr__ = __str__
11384
11385
11386
class SetMonitoringModeRequest(FrozenClass):
11387
    '''
11388
    :ivar TypeId:
11389 1
    :vartype TypeId: NodeId
11390
    :ivar RequestHeader:
11391
    :vartype RequestHeader: RequestHeader
11392
    :ivar Parameters:
11393
    :vartype Parameters: SetMonitoringModeParameters
11394
    '''
11395
11396
    ua_types = [
11397 1
11398 1
        ('TypeId', 'NodeId'),
11399 1
        ('RequestHeader', 'RequestHeader'),
11400 1
        ('Parameters', 'SetMonitoringModeParameters'),
11401 1
               ]
11402 1
11403 1
    def __init__(self):
11404 1
        self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary)
11405 1
        self.RequestHeader = RequestHeader()
11406 1
        self.Parameters = SetMonitoringModeParameters()
11407 1
        self._freeze = True
11408
11409 1
    def to_binary(self):
11410 1
        packet = []
11411 1
        packet.append(self.TypeId.to_binary())
11412 1
        packet.append(self.RequestHeader.to_binary())
11413 1
        packet.append(self.Parameters.to_binary())
11414 1
        return b''.join(packet)
11415 1
11416 1
    @staticmethod
11417
    def from_binary(data):
11418 1
        obj = SetMonitoringModeRequest()
11419
        obj.TypeId = NodeId.from_binary(data)
11420 1
        obj.RequestHeader = RequestHeader.from_binary(data)
11421
        obj.Parameters = SetMonitoringModeParameters.from_binary(data)
11422 1
        return obj
11423 1
11424 1
    def __str__(self):
11425 1
        return 'SetMonitoringModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11426 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11427 1
               'Parameters:' + str(self.Parameters) + ')'
11428
11429 1
    __repr__ = __str__
11430
11431
11432 View Code Duplication
class SetMonitoringModeResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11433
    '''
11434
    :ivar Results:
11435
    :vartype Results: StatusCode
11436 1
    :ivar DiagnosticInfos:
11437
    :vartype DiagnosticInfos: DiagnosticInfo
11438
    '''
11439 1
11440
    ua_types = [
11441
11442
        ('Results', 'ListOfStatusCode'),
11443
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
11444
               ]
11445
11446
    def __init__(self):
11447
        self.Results = []
11448
        self.DiagnosticInfos = []
11449 1
        self._freeze = True
11450
11451
    def to_binary(self):
11452
        packet = []
11453
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11454
        for fieldname in self.Results:
11455 1
            packet.append(fieldname.to_binary())
11456 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11457 1
        for fieldname in self.DiagnosticInfos:
11458 1
            packet.append(fieldname.to_binary())
11459 1
        return b''.join(packet)
11460 1
11461 1
    @staticmethod
11462 1
    def from_binary(data):
11463 1
        obj = SetMonitoringModeResult()
11464
        length = uabin.Primitives.Int32.unpack(data)
11465 1
        array = []
11466 1
        if length != -1:
11467 1
            for _ in range(0, length):
11468 1
                array.append(StatusCode.from_binary(data))
11469 1
        obj.Results = array
11470 1
        length = uabin.Primitives.Int32.unpack(data)
11471 1
        array = []
11472 1
        if length != -1:
11473
            for _ in range(0, length):
11474 1
                array.append(DiagnosticInfo.from_binary(data))
11475
        obj.DiagnosticInfos = array
11476 1
        return obj
11477
11478 1
    def __str__(self):
11479 1
        return 'SetMonitoringModeResult(' + 'Results:' + str(self.Results) + ', ' + \
11480 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11481 1
11482 1
    __repr__ = __str__
11483 1
11484 1
11485 1
class SetMonitoringModeResponse(FrozenClass):
11486 1
    '''
11487
    :ivar TypeId:
11488 1
    :vartype TypeId: NodeId
11489
    :ivar ResponseHeader:
11490
    :vartype ResponseHeader: ResponseHeader
11491
    :ivar Parameters:
11492
    :vartype Parameters: SetMonitoringModeResult
11493 1
    '''
11494
11495
    ua_types = [
11496 1
11497
        ('TypeId', 'NodeId'),
11498
        ('ResponseHeader', 'ResponseHeader'),
11499
        ('Parameters', 'SetMonitoringModeResult'),
11500
               ]
11501
11502
    def __init__(self):
11503
        self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary)
11504
        self.ResponseHeader = ResponseHeader()
11505
        self.Parameters = SetMonitoringModeResult()
11506 1
        self._freeze = True
11507
11508
    def to_binary(self):
11509
        packet = []
11510
        packet.append(self.TypeId.to_binary())
11511
        packet.append(self.ResponseHeader.to_binary())
11512 1
        packet.append(self.Parameters.to_binary())
11513 1
        return b''.join(packet)
11514
11515
    @staticmethod
11516
    def from_binary(data):
11517 1
        obj = SetMonitoringModeResponse()
11518 1
        obj.TypeId = NodeId.from_binary(data)
11519 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
11520 1
        obj.Parameters = SetMonitoringModeResult.from_binary(data)
11521
        return obj
11522 1
11523 1
    def __str__(self):
11524 1
        return 'SetMonitoringModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11525 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11526 1
               'Parameters:' + str(self.Parameters) + ')'
11527 1
11528
    __repr__ = __str__
11529 1
11530
11531 View Code Duplication
class SetTriggeringParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11532
    '''
11533 1
    :ivar SubscriptionId:
11534
    :vartype SubscriptionId: UInt32
11535
    :ivar TriggeringItemId:
11536
    :vartype TriggeringItemId: UInt32
11537
    :ivar LinksToAdd:
11538 1
    :vartype LinksToAdd: UInt32
11539
    :ivar LinksToRemove:
11540
    :vartype LinksToRemove: UInt32
11541
    '''
11542
11543 1
    ua_types = [
11544
11545
        ('SubscriptionId', 'UInt32'),
11546 1
        ('TriggeringItemId', 'UInt32'),
11547
        ('LinksToAdd', 'ListOfUInt32'),
11548
        ('LinksToRemove', 'ListOfUInt32'),
11549
               ]
11550
11551
    def __init__(self):
11552
        self.SubscriptionId = 0
11553
        self.TriggeringItemId = 0
11554
        self.LinksToAdd = []
11555
        self.LinksToRemove = []
11556
        self._freeze = True
11557
11558 1
    def to_binary(self):
11559
        packet = []
11560
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11561
        packet.append(uabin.Primitives.UInt32.pack(self.TriggeringItemId))
11562
        packet.append(uabin.Primitives.Int32.pack(len(self.LinksToAdd)))
11563
        for fieldname in self.LinksToAdd:
11564
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11565 1
        packet.append(uabin.Primitives.Int32.pack(len(self.LinksToRemove)))
11566 1
        for fieldname in self.LinksToRemove:
11567 1
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11568 1
        return b''.join(packet)
11569 1
11570 1
    @staticmethod
11571 1
    def from_binary(data):
11572 1
        obj = SetTriggeringParameters()
11573 1
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11574 1
        self.TriggeringItemId = uabin.Primitives.UInt32.unpack(data)
11575
        obj.LinksToAdd = uabin.Primitives.UInt32.unpack_array(data)
11576 1
        obj.LinksToRemove = uabin.Primitives.UInt32.unpack_array(data)
11577 1
        return obj
11578 1
11579 1
    def __str__(self):
11580 1
        return 'SetTriggeringParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11581 1
               'TriggeringItemId:' + str(self.TriggeringItemId) + ', ' + \
11582 1
               'LinksToAdd:' + str(self.LinksToAdd) + ', ' + \
11583 1
               'LinksToRemove:' + str(self.LinksToRemove) + ')'
11584 1
11585
    __repr__ = __str__
11586 1
11587
11588 1
class SetTriggeringRequest(FrozenClass):
11589
    '''
11590 1
    :ivar TypeId:
11591
    :vartype TypeId: NodeId
11592 1
    :ivar RequestHeader:
11593 1
    :vartype RequestHeader: RequestHeader
11594 1
    :ivar Parameters:
11595 1
    :vartype Parameters: SetTriggeringParameters
11596 1
    '''
11597 1
11598 1
    ua_types = [
11599 1
11600 1
        ('TypeId', 'NodeId'),
11601 1
        ('RequestHeader', 'RequestHeader'),
11602 1
        ('Parameters', 'SetTriggeringParameters'),
11603 1
               ]
11604 1
11605
    def __init__(self):
11606 1
        self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary)
11607
        self.RequestHeader = RequestHeader()
11608 1
        self.Parameters = SetTriggeringParameters()
11609
        self._freeze = True
11610
11611
    def to_binary(self):
11612
        packet = []
11613
        packet.append(self.TypeId.to_binary())
11614 1
        packet.append(self.RequestHeader.to_binary())
11615
        packet.append(self.Parameters.to_binary())
11616
        return b''.join(packet)
11617 1
11618
    @staticmethod
11619
    def from_binary(data):
11620
        obj = SetTriggeringRequest()
11621
        obj.TypeId = NodeId.from_binary(data)
11622
        obj.RequestHeader = RequestHeader.from_binary(data)
11623
        obj.Parameters = SetTriggeringParameters.from_binary(data)
11624
        return obj
11625 1
11626
    def __str__(self):
11627
        return 'SetTriggeringRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11628
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11629
               'Parameters:' + str(self.Parameters) + ')'
11630 1
11631
    __repr__ = __str__
11632
11633
11634
class SetTriggeringResult(FrozenClass):
11635
    '''
11636
    :ivar AddResults:
11637
    :vartype AddResults: StatusCode
11638
    :ivar AddDiagnosticInfos:
11639 1
    :vartype AddDiagnosticInfos: DiagnosticInfo
11640
    :ivar RemoveResults:
11641
    :vartype RemoveResults: StatusCode
11642
    :ivar RemoveDiagnosticInfos:
11643
    :vartype RemoveDiagnosticInfos: DiagnosticInfo
11644
    '''
11645 1
11646
    ua_types = [
11647
11648
        ('AddResults', 'ListOfStatusCode'),
11649 1
        ('AddDiagnosticInfos', 'ListOfDiagnosticInfo'),
11650
        ('RemoveResults', 'ListOfStatusCode'),
11651
        ('RemoveDiagnosticInfos', 'ListOfDiagnosticInfo'),
11652
               ]
11653 1
11654
    def __init__(self):
11655
        self.AddResults = []
11656
        self.AddDiagnosticInfos = []
11657 1
        self.RemoveResults = []
11658
        self.RemoveDiagnosticInfos = []
11659
        self._freeze = True
11660 1
11661 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...
11662
        packet = []
11663
        packet.append(uabin.Primitives.Int32.pack(len(self.AddResults)))
11664
        for fieldname in self.AddResults:
11665
            packet.append(fieldname.to_binary())
11666
        packet.append(uabin.Primitives.Int32.pack(len(self.AddDiagnosticInfos)))
11667
        for fieldname in self.AddDiagnosticInfos:
11668
            packet.append(fieldname.to_binary())
11669
        packet.append(uabin.Primitives.Int32.pack(len(self.RemoveResults)))
11670
        for fieldname in self.RemoveResults:
11671
            packet.append(fieldname.to_binary())
11672 1
        packet.append(uabin.Primitives.Int32.pack(len(self.RemoveDiagnosticInfos)))
11673
        for fieldname in self.RemoveDiagnosticInfos:
11674
            packet.append(fieldname.to_binary())
11675
        return b''.join(packet)
11676
11677 View Code Duplication
    @staticmethod
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11678
    def from_binary(data):
11679 1
        obj = SetTriggeringResult()
11680
        length = uabin.Primitives.Int32.unpack(data)
11681
        array = []
11682
        if length != -1:
11683
            for _ in range(0, length):
11684
                array.append(StatusCode.from_binary(data))
11685
        obj.AddResults = array
11686
        length = uabin.Primitives.Int32.unpack(data)
11687
        array = []
11688
        if length != -1:
11689
            for _ in range(0, length):
11690 1
                array.append(DiagnosticInfo.from_binary(data))
11691
        obj.AddDiagnosticInfos = array
11692
        length = uabin.Primitives.Int32.unpack(data)
11693
        array = []
11694
        if length != -1:
11695
            for _ in range(0, length):
11696
                array.append(StatusCode.from_binary(data))
11697
        obj.RemoveResults = array
11698 1
        length = uabin.Primitives.Int32.unpack(data)
11699
        array = []
11700
        if length != -1:
11701
            for _ in range(0, length):
11702 1
                array.append(DiagnosticInfo.from_binary(data))
11703
        obj.RemoveDiagnosticInfos = array
11704
        return obj
11705
11706
    def __str__(self):
11707
        return 'SetTriggeringResult(' + 'AddResults:' + str(self.AddResults) + ', ' + \
11708 1
               'AddDiagnosticInfos:' + str(self.AddDiagnosticInfos) + ', ' + \
11709
               'RemoveResults:' + str(self.RemoveResults) + ', ' + \
11710
               'RemoveDiagnosticInfos:' + str(self.RemoveDiagnosticInfos) + ')'
11711
11712
    __repr__ = __str__
11713
11714 1
11715
class SetTriggeringResponse(FrozenClass):
11716
    '''
11717 1
    :ivar TypeId:
11718
    :vartype TypeId: NodeId
11719
    :ivar ResponseHeader:
11720
    :vartype ResponseHeader: ResponseHeader
11721
    :ivar Parameters:
11722
    :vartype Parameters: SetTriggeringResult
11723
    '''
11724
11725
    ua_types = [
11726
11727 1
        ('TypeId', 'NodeId'),
11728
        ('ResponseHeader', 'ResponseHeader'),
11729
        ('Parameters', 'SetTriggeringResult'),
11730
               ]
11731
11732
    def __init__(self):
11733 1
        self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary)
11734
        self.ResponseHeader = ResponseHeader()
11735
        self.Parameters = SetTriggeringResult()
11736
        self._freeze = True
11737
11738
    def to_binary(self):
11739
        packet = []
11740
        packet.append(self.TypeId.to_binary())
11741
        packet.append(self.ResponseHeader.to_binary())
11742
        packet.append(self.Parameters.to_binary())
11743 1
        return b''.join(packet)
11744
11745
    @staticmethod
11746
    def from_binary(data):
11747
        obj = SetTriggeringResponse()
11748
        obj.TypeId = NodeId.from_binary(data)
11749
        obj.ResponseHeader = ResponseHeader.from_binary(data)
11750
        obj.Parameters = SetTriggeringResult.from_binary(data)
11751
        return obj
11752 1
11753
    def __str__(self):
11754
        return 'SetTriggeringResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11755
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11756 1
               'Parameters:' + str(self.Parameters) + ')'
11757
11758
    __repr__ = __str__
11759
11760
11761
class DeleteMonitoredItemsParameters(FrozenClass):
11762
    '''
11763
    :ivar SubscriptionId:
11764
    :vartype SubscriptionId: UInt32
11765
    :ivar MonitoredItemIds:
11766 1
    :vartype MonitoredItemIds: UInt32
11767
    '''
11768
11769
    ua_types = [
11770
11771 1
        ('SubscriptionId', 'UInt32'),
11772
        ('MonitoredItemIds', 'ListOfUInt32'),
11773
               ]
11774 1
11775
    def __init__(self):
11776
        self.SubscriptionId = 0
11777
        self.MonitoredItemIds = []
11778
        self._freeze = True
11779
11780
    def to_binary(self):
11781
        packet = []
11782
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11783
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds)))
11784 1
        for fieldname in self.MonitoredItemIds:
11785
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11786
        return b''.join(packet)
11787
11788
    @staticmethod
11789
    def from_binary(data):
11790 1
        obj = DeleteMonitoredItemsParameters()
11791
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
11792
        obj.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data)
11793
        return obj
11794
11795
    def __str__(self):
11796
        return 'DeleteMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
11797
               'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')'
11798
11799
    __repr__ = __str__
11800 1
11801
11802
class DeleteMonitoredItemsRequest(FrozenClass):
11803
    '''
11804
    :ivar TypeId:
11805
    :vartype TypeId: NodeId
11806
    :ivar RequestHeader:
11807 1
    :vartype RequestHeader: RequestHeader
11808
    :ivar Parameters:
11809
    :vartype Parameters: DeleteMonitoredItemsParameters
11810
    '''
11811 1
11812
    ua_types = [
11813
11814
        ('TypeId', 'NodeId'),
11815
        ('RequestHeader', 'RequestHeader'),
11816 1
        ('Parameters', 'DeleteMonitoredItemsParameters'),
11817
               ]
11818
11819
    def __init__(self):
11820
        self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary)
11821 1
        self.RequestHeader = RequestHeader()
11822
        self.Parameters = DeleteMonitoredItemsParameters()
11823
        self._freeze = True
11824 1
11825
    def to_binary(self):
11826
        packet = []
11827
        packet.append(self.TypeId.to_binary())
11828
        packet.append(self.RequestHeader.to_binary())
11829
        packet.append(self.Parameters.to_binary())
11830
        return b''.join(packet)
11831
11832
    @staticmethod
11833
    def from_binary(data):
11834
        obj = DeleteMonitoredItemsRequest()
11835
        obj.TypeId = NodeId.from_binary(data)
11836 1
        obj.RequestHeader = RequestHeader.from_binary(data)
11837
        obj.Parameters = DeleteMonitoredItemsParameters.from_binary(data)
11838
        return obj
11839
11840
    def __str__(self):
11841
        return 'DeleteMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11842
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
11843 1
               'Parameters:' + str(self.Parameters) + ')'
11844
11845
    __repr__ = __str__
11846
11847
11848 View Code Duplication
class DeleteMonitoredItemsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11849
    '''
11850
    :ivar TypeId:
11851
    :vartype TypeId: NodeId
11852
    :ivar ResponseHeader:
11853
    :vartype ResponseHeader: ResponseHeader
11854 1
    :ivar Results:
11855
    :vartype Results: StatusCode
11856
    :ivar DiagnosticInfos:
11857
    :vartype DiagnosticInfos: DiagnosticInfo
11858
    '''
11859
11860
    ua_types = [
11861
11862
        ('TypeId', 'NodeId'),
11863
        ('ResponseHeader', 'ResponseHeader'),
11864
        ('Results', 'ListOfStatusCode'),
11865
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
11866 1
               ]
11867
11868
    def __init__(self):
11869
        self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary)
11870 1
        self.ResponseHeader = ResponseHeader()
11871
        self.Results = []
11872
        self.DiagnosticInfos = []
11873
        self._freeze = True
11874
11875
    def to_binary(self):
11876
        packet = []
11877
        packet.append(self.TypeId.to_binary())
11878
        packet.append(self.ResponseHeader.to_binary())
11879
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
11880
        for fieldname in self.Results:
11881
            packet.append(fieldname.to_binary())
11882
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
11883
        for fieldname in self.DiagnosticInfos:
11884
            packet.append(fieldname.to_binary())
11885
        return b''.join(packet)
11886 1
11887
    @staticmethod
11888
    def from_binary(data):
11889
        obj = DeleteMonitoredItemsResponse()
11890
        obj.TypeId = NodeId.from_binary(data)
11891
        obj.ResponseHeader = ResponseHeader.from_binary(data)
11892 1
        length = uabin.Primitives.Int32.unpack(data)
11893
        array = []
11894
        if length != -1:
11895 1
            for _ in range(0, length):
11896
                array.append(StatusCode.from_binary(data))
11897
        obj.Results = array
11898
        length = uabin.Primitives.Int32.unpack(data)
11899
        array = []
11900
        if length != -1:
11901
            for _ in range(0, length):
11902
                array.append(DiagnosticInfo.from_binary(data))
11903
        obj.DiagnosticInfos = array
11904
        return obj
11905 1
11906
    def __str__(self):
11907
        return 'DeleteMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
11908
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
11909
               'Results:' + str(self.Results) + ', ' + \
11910
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
11911 1
11912
    __repr__ = __str__
11913
11914
11915 View Code Duplication
class CreateSubscriptionParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11916
    '''
11917
    :ivar RequestedPublishingInterval:
11918
    :vartype RequestedPublishingInterval: Double
11919
    :ivar RequestedLifetimeCount:
11920
    :vartype RequestedLifetimeCount: UInt32
11921 1
    :ivar RequestedMaxKeepAliveCount:
11922
    :vartype RequestedMaxKeepAliveCount: UInt32
11923
    :ivar MaxNotificationsPerPublish:
11924
    :vartype MaxNotificationsPerPublish: UInt32
11925
    :ivar PublishingEnabled:
11926
    :vartype PublishingEnabled: Boolean
11927
    :ivar Priority:
11928
    :vartype Priority: Byte
11929
    '''
11930 1
11931
    ua_types = [
11932
11933
        ('RequestedPublishingInterval', 'Double'),
11934 1
        ('RequestedLifetimeCount', 'UInt32'),
11935
        ('RequestedMaxKeepAliveCount', 'UInt32'),
11936
        ('MaxNotificationsPerPublish', 'UInt32'),
11937
        ('PublishingEnabled', 'Boolean'),
11938
        ('Priority', 'Byte'),
11939 1
               ]
11940
11941
    def __init__(self):
11942
        self.RequestedPublishingInterval = 0
11943
        self.RequestedLifetimeCount = 0
11944 1
        self.RequestedMaxKeepAliveCount = 0
11945
        self.MaxNotificationsPerPublish = 0
11946
        self.PublishingEnabled = True
11947 1
        self.Priority = 0
11948
        self._freeze = True
11949
11950
    def to_binary(self):
11951
        packet = []
11952
        packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval))
11953
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount))
11954
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount))
11955
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
11956
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
11957 1
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
11958
        return b''.join(packet)
11959
11960
    @staticmethod
11961
    def from_binary(data):
11962
        obj = CreateSubscriptionParameters()
11963 1
        self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data)
11964
        self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
11965
        self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
11966
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
11967
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
11968
        self.Priority = uabin.Primitives.Byte.unpack(data)
11969
        return obj
11970
11971
    def __str__(self):
11972
        return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
11973 1
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
11974
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
11975
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
11976
               'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
11977
               'Priority:' + str(self.Priority) + ')'
11978
11979
    __repr__ = __str__
11980 1
11981
11982
class CreateSubscriptionRequest(FrozenClass):
11983
    '''
11984 1
    :ivar TypeId:
11985
    :vartype TypeId: NodeId
11986
    :ivar RequestHeader:
11987
    :vartype RequestHeader: RequestHeader
11988
    :ivar Parameters:
11989 1
    :vartype Parameters: CreateSubscriptionParameters
11990
    '''
11991
11992
    ua_types = [
11993
11994 1
        ('TypeId', 'NodeId'),
11995
        ('RequestHeader', 'RequestHeader'),
11996
        ('Parameters', 'CreateSubscriptionParameters'),
11997 1
               ]
11998
11999
    def __init__(self):
12000
        self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary)
12001
        self.RequestHeader = RequestHeader()
12002
        self.Parameters = CreateSubscriptionParameters()
12003
        self._freeze = True
12004
12005 1
    def to_binary(self):
12006
        packet = []
12007
        packet.append(self.TypeId.to_binary())
12008
        packet.append(self.RequestHeader.to_binary())
12009
        packet.append(self.Parameters.to_binary())
12010 1
        return b''.join(packet)
12011
12012
    @staticmethod
12013
    def from_binary(data):
12014
        obj = CreateSubscriptionRequest()
12015
        obj.TypeId = NodeId.from_binary(data)
12016
        obj.RequestHeader = RequestHeader.from_binary(data)
12017
        obj.Parameters = CreateSubscriptionParameters.from_binary(data)
12018
        return obj
12019 1
12020
    def __str__(self):
12021
        return 'CreateSubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12022
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12023
               'Parameters:' + str(self.Parameters) + ')'
12024
12025
    __repr__ = __str__
12026
12027
12028 View Code Duplication
class CreateSubscriptionResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12029 1
    '''
12030
    :ivar SubscriptionId:
12031
    :vartype SubscriptionId: UInt32
12032
    :ivar RevisedPublishingInterval:
12033 1
    :vartype RevisedPublishingInterval: Double
12034
    :ivar RevisedLifetimeCount:
12035
    :vartype RevisedLifetimeCount: UInt32
12036
    :ivar RevisedMaxKeepAliveCount:
12037
    :vartype RevisedMaxKeepAliveCount: UInt32
12038
    '''
12039
12040
    ua_types = [
12041
12042
        ('SubscriptionId', 'UInt32'),
12043
        ('RevisedPublishingInterval', 'Double'),
12044
        ('RevisedLifetimeCount', 'UInt32'),
12045
        ('RevisedMaxKeepAliveCount', 'UInt32'),
12046
               ]
12047 1
12048
    def __init__(self):
12049
        self.SubscriptionId = 0
12050
        self.RevisedPublishingInterval = 0
12051 1
        self.RevisedLifetimeCount = 0
12052
        self.RevisedMaxKeepAliveCount = 0
12053
        self._freeze = True
12054 1
12055
    def to_binary(self):
12056
        packet = []
12057
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12058
        packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval))
12059
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount))
12060
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount))
12061
        return b''.join(packet)
12062
12063
    @staticmethod
12064 1
    def from_binary(data):
12065
        obj = CreateSubscriptionResult()
12066
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12067
        self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data)
12068
        self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12069
        self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12070 1
        return obj
12071
12072
    def __str__(self):
12073
        return 'CreateSubscriptionResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12074
               'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \
12075
               'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \
12076
               'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')'
12077
12078
    __repr__ = __str__
12079
12080 1
12081
class CreateSubscriptionResponse(FrozenClass):
12082
    '''
12083
    :ivar TypeId:
12084
    :vartype TypeId: NodeId
12085
    :ivar ResponseHeader:
12086
    :vartype ResponseHeader: ResponseHeader
12087 1
    :ivar Parameters:
12088
    :vartype Parameters: CreateSubscriptionResult
12089
    '''
12090
12091 1
    ua_types = [
12092
12093
        ('TypeId', 'NodeId'),
12094
        ('ResponseHeader', 'ResponseHeader'),
12095
        ('Parameters', 'CreateSubscriptionResult'),
12096 1
               ]
12097
12098
    def __init__(self):
12099
        self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary)
12100
        self.ResponseHeader = ResponseHeader()
12101 1
        self.Parameters = CreateSubscriptionResult()
12102
        self._freeze = True
12103
12104 1
    def to_binary(self):
12105
        packet = []
12106
        packet.append(self.TypeId.to_binary())
12107
        packet.append(self.ResponseHeader.to_binary())
12108
        packet.append(self.Parameters.to_binary())
12109
        return b''.join(packet)
12110
12111
    @staticmethod
12112
    def from_binary(data):
12113
        obj = CreateSubscriptionResponse()
12114
        obj.TypeId = NodeId.from_binary(data)
12115
        obj.ResponseHeader = ResponseHeader.from_binary(data)
12116 1
        obj.Parameters = CreateSubscriptionResult.from_binary(data)
12117
        return obj
12118
12119
    def __str__(self):
12120
        return 'CreateSubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12121
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12122
               'Parameters:' + str(self.Parameters) + ')'
12123 1
12124
    __repr__ = __str__
12125
12126
12127 View Code Duplication
class ModifySubscriptionParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12128
    '''
12129
    :ivar SubscriptionId:
12130
    :vartype SubscriptionId: UInt32
12131
    :ivar RequestedPublishingInterval:
12132
    :vartype RequestedPublishingInterval: Double
12133
    :ivar RequestedLifetimeCount:
12134 1
    :vartype RequestedLifetimeCount: UInt32
12135
    :ivar RequestedMaxKeepAliveCount:
12136
    :vartype RequestedMaxKeepAliveCount: UInt32
12137
    :ivar MaxNotificationsPerPublish:
12138
    :vartype MaxNotificationsPerPublish: UInt32
12139
    :ivar Priority:
12140
    :vartype Priority: Byte
12141
    '''
12142
12143
    ua_types = [
12144
12145
        ('SubscriptionId', 'UInt32'),
12146 1
        ('RequestedPublishingInterval', 'Double'),
12147
        ('RequestedLifetimeCount', 'UInt32'),
12148
        ('RequestedMaxKeepAliveCount', 'UInt32'),
12149
        ('MaxNotificationsPerPublish', 'UInt32'),
12150 1
        ('Priority', 'Byte'),
12151
               ]
12152
12153
    def __init__(self):
12154
        self.SubscriptionId = 0
12155
        self.RequestedPublishingInterval = 0
12156 1
        self.RequestedLifetimeCount = 0
12157
        self.RequestedMaxKeepAliveCount = 0
12158
        self.MaxNotificationsPerPublish = 0
12159
        self.Priority = 0
12160
        self._freeze = True
12161
12162 1
    def to_binary(self):
12163
        packet = []
12164
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12165 1
        packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval))
12166
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount))
12167
        packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount))
12168
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
12169
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
12170
        return b''.join(packet)
12171
12172
    @staticmethod
12173
    def from_binary(data):
12174
        obj = ModifySubscriptionParameters()
12175 1
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12176
        self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data)
12177
        self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12178
        self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12179
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
12180
        self.Priority = uabin.Primitives.Byte.unpack(data)
12181 1
        return obj
12182
12183
    def __str__(self):
12184
        return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12185
               'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
12186
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
12187
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
12188
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
12189
               'Priority:' + str(self.Priority) + ')'
12190
12191 1
    __repr__ = __str__
12192
12193
12194
class ModifySubscriptionRequest(FrozenClass):
12195
    '''
12196
    :ivar TypeId:
12197
    :vartype TypeId: NodeId
12198 1
    :ivar RequestHeader:
12199
    :vartype RequestHeader: RequestHeader
12200
    :ivar Parameters:
12201
    :vartype Parameters: ModifySubscriptionParameters
12202 1
    '''
12203
12204
    ua_types = [
12205
12206
        ('TypeId', 'NodeId'),
12207 1
        ('RequestHeader', 'RequestHeader'),
12208
        ('Parameters', 'ModifySubscriptionParameters'),
12209
               ]
12210
12211
    def __init__(self):
12212 1
        self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary)
12213
        self.RequestHeader = RequestHeader()
12214
        self.Parameters = ModifySubscriptionParameters()
12215 1
        self._freeze = True
12216
12217
    def to_binary(self):
12218
        packet = []
12219
        packet.append(self.TypeId.to_binary())
12220
        packet.append(self.RequestHeader.to_binary())
12221
        packet.append(self.Parameters.to_binary())
12222
        return b''.join(packet)
12223
12224
    @staticmethod
12225
    def from_binary(data):
12226
        obj = ModifySubscriptionRequest()
12227 1
        obj.TypeId = NodeId.from_binary(data)
12228
        obj.RequestHeader = RequestHeader.from_binary(data)
12229
        obj.Parameters = ModifySubscriptionParameters.from_binary(data)
12230
        return obj
12231
12232
    def __str__(self):
12233
        return 'ModifySubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12234 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12235
               'Parameters:' + str(self.Parameters) + ')'
12236
12237
    __repr__ = __str__
12238
12239
12240 View Code Duplication
class ModifySubscriptionResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12241
    '''
12242
    :ivar RevisedPublishingInterval:
12243
    :vartype RevisedPublishingInterval: Double
12244
    :ivar RevisedLifetimeCount:
12245 1
    :vartype RevisedLifetimeCount: UInt32
12246
    :ivar RevisedMaxKeepAliveCount:
12247
    :vartype RevisedMaxKeepAliveCount: UInt32
12248
    '''
12249
12250
    ua_types = [
12251
12252
        ('RevisedPublishingInterval', 'Double'),
12253
        ('RevisedLifetimeCount', 'UInt32'),
12254
        ('RevisedMaxKeepAliveCount', 'UInt32'),
12255
               ]
12256
12257
    def __init__(self):
12258
        self.RevisedPublishingInterval = 0
12259
        self.RevisedLifetimeCount = 0
12260
        self.RevisedMaxKeepAliveCount = 0
12261 1
        self._freeze = True
12262
12263
    def to_binary(self):
12264
        packet = []
12265 1
        packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval))
12266
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount))
12267
        packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount))
12268
        return b''.join(packet)
12269
12270
    @staticmethod
12271
    def from_binary(data):
12272
        obj = ModifySubscriptionResult()
12273
        self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data)
12274
        self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data)
12275
        self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
12276
        return obj
12277
12278
    def __str__(self):
12279
        return 'ModifySubscriptionResult(' + 'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \
12280
               'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \
12281
               'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')'
12282
12283
    __repr__ = __str__
12284
12285
12286
class ModifySubscriptionResponse(FrozenClass):
12287
    '''
12288
    :ivar TypeId:
12289
    :vartype TypeId: NodeId
12290
    :ivar ResponseHeader:
12291 1
    :vartype ResponseHeader: ResponseHeader
12292
    :ivar Parameters:
12293
    :vartype Parameters: ModifySubscriptionResult
12294
    '''
12295
12296
    ua_types = [
12297 1
12298
        ('TypeId', 'NodeId'),
12299
        ('ResponseHeader', 'ResponseHeader'),
12300 1
        ('Parameters', 'ModifySubscriptionResult'),
12301
               ]
12302
12303
    def __init__(self):
12304
        self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary)
12305
        self.ResponseHeader = ResponseHeader()
12306
        self.Parameters = ModifySubscriptionResult()
12307
        self._freeze = True
12308
12309
    def to_binary(self):
12310 1
        packet = []
12311
        packet.append(self.TypeId.to_binary())
12312
        packet.append(self.ResponseHeader.to_binary())
12313
        packet.append(self.Parameters.to_binary())
12314
        return b''.join(packet)
12315
12316 1
    @staticmethod
12317
    def from_binary(data):
12318
        obj = ModifySubscriptionResponse()
12319
        obj.TypeId = NodeId.from_binary(data)
12320
        obj.ResponseHeader = ResponseHeader.from_binary(data)
12321
        obj.Parameters = ModifySubscriptionResult.from_binary(data)
12322
        return obj
12323
12324
    def __str__(self):
12325
        return 'ModifySubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12326 1
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12327
               'Parameters:' + str(self.Parameters) + ')'
12328
12329
    __repr__ = __str__
12330
12331
12332
class SetPublishingModeParameters(FrozenClass):
12333 1
    '''
12334
    :ivar PublishingEnabled:
12335
    :vartype PublishingEnabled: Boolean
12336
    :ivar SubscriptionIds:
12337 1
    :vartype SubscriptionIds: UInt32
12338
    '''
12339
12340
    ua_types = [
12341
12342 1
        ('PublishingEnabled', 'Boolean'),
12343
        ('SubscriptionIds', 'ListOfUInt32'),
12344
               ]
12345
12346
    def __init__(self):
12347 1
        self.PublishingEnabled = True
12348
        self.SubscriptionIds = []
12349
        self._freeze = True
12350 1
12351
    def to_binary(self):
12352
        packet = []
12353
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
12354
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
12355
        for fieldname in self.SubscriptionIds:
12356
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
12357
        return b''.join(packet)
12358 1
12359
    @staticmethod
12360
    def from_binary(data):
12361
        obj = SetPublishingModeParameters()
12362
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
12363 1
        obj.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
12364 1
        return obj
12365 1
12366 1
    def __str__(self):
12367 1
        return 'SetPublishingModeParameters(' + 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
12368 1
               'SubscriptionIds:' + str(self.SubscriptionIds) + ')'
12369 1
12370 1
    __repr__ = __str__
12371
12372 1
12373 1
class SetPublishingModeRequest(FrozenClass):
12374 1
    '''
12375 1
    :ivar TypeId:
12376 1
    :vartype TypeId: NodeId
12377 1
    :ivar RequestHeader:
12378 1
    :vartype RequestHeader: RequestHeader
12379
    :ivar Parameters:
12380 1
    :vartype Parameters: SetPublishingModeParameters
12381
    '''
12382 1
12383
    ua_types = [
12384 1
12385 1
        ('TypeId', 'NodeId'),
12386 1
        ('RequestHeader', 'RequestHeader'),
12387
        ('Parameters', 'SetPublishingModeParameters'),
12388 1
               ]
12389
12390
    def __init__(self):
12391
        self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary)
12392 1
        self.RequestHeader = RequestHeader()
12393
        self.Parameters = SetPublishingModeParameters()
12394
        self._freeze = True
12395 1
12396
    def to_binary(self):
12397
        packet = []
12398
        packet.append(self.TypeId.to_binary())
12399
        packet.append(self.RequestHeader.to_binary())
12400
        packet.append(self.Parameters.to_binary())
12401
        return b''.join(packet)
12402
12403
    @staticmethod
12404
    def from_binary(data):
12405 1
        obj = SetPublishingModeRequest()
12406
        obj.TypeId = NodeId.from_binary(data)
12407
        obj.RequestHeader = RequestHeader.from_binary(data)
12408
        obj.Parameters = SetPublishingModeParameters.from_binary(data)
12409
        return obj
12410
12411 1
    def __str__(self):
12412 1
        return 'SetPublishingModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12413
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12414
               'Parameters:' + str(self.Parameters) + ')'
12415
12416 1
    __repr__ = __str__
12417 1
12418 1
12419 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...
12420
    '''
12421 1
    :ivar Results:
12422 1
    :vartype Results: StatusCode
12423 1
    :ivar DiagnosticInfos:
12424 1
    :vartype DiagnosticInfos: DiagnosticInfo
12425 1
    '''
12426 1
12427
    ua_types = [
12428 1
12429
        ('Results', 'ListOfStatusCode'),
12430
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
12431
               ]
12432 1
12433
    def __init__(self):
12434
        self.Results = []
12435
        self.DiagnosticInfos = []
12436
        self._freeze = True
12437 1
12438
    def to_binary(self):
12439
        packet = []
12440
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
12441
        for fieldname in self.Results:
12442 1
            packet.append(fieldname.to_binary())
12443
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
12444
        for fieldname in self.DiagnosticInfos:
12445 1
            packet.append(fieldname.to_binary())
12446
        return b''.join(packet)
12447
12448
    @staticmethod
12449
    def from_binary(data):
12450
        obj = SetPublishingModeResult()
12451
        length = uabin.Primitives.Int32.unpack(data)
12452
        array = []
12453
        if length != -1:
12454
            for _ in range(0, length):
12455
                array.append(StatusCode.from_binary(data))
12456
        obj.Results = array
12457 1
        length = uabin.Primitives.Int32.unpack(data)
12458
        array = []
12459
        if length != -1:
12460
            for _ in range(0, length):
12461
                array.append(DiagnosticInfo.from_binary(data))
12462
        obj.DiagnosticInfos = array
12463
        return obj
12464 1
12465 1
    def __str__(self):
12466 1
        return 'SetPublishingModeResult(' + 'Results:' + str(self.Results) + ', ' + \
12467 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
12468 1
12469 1
    __repr__ = __str__
12470 1
12471 1
12472 1
class SetPublishingModeResponse(FrozenClass):
12473 1
    '''
12474
    :ivar TypeId:
12475 1
    :vartype TypeId: NodeId
12476 1
    :ivar ResponseHeader:
12477 1
    :vartype ResponseHeader: ResponseHeader
12478 1
    :ivar Parameters:
12479 1
    :vartype Parameters: SetPublishingModeResult
12480 1
    '''
12481 1
12482 1
    ua_types = [
12483 1
12484
        ('TypeId', 'NodeId'),
12485 1
        ('ResponseHeader', 'ResponseHeader'),
12486
        ('Parameters', 'SetPublishingModeResult'),
12487 1
               ]
12488
12489 1
    def __init__(self):
12490
        self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary)
12491 1
        self.ResponseHeader = ResponseHeader()
12492 1
        self.Parameters = SetPublishingModeResult()
12493 1
        self._freeze = True
12494 1
12495 1
    def to_binary(self):
12496 1
        packet = []
12497 1
        packet.append(self.TypeId.to_binary())
12498 1
        packet.append(self.ResponseHeader.to_binary())
12499 1
        packet.append(self.Parameters.to_binary())
12500 1
        return b''.join(packet)
12501 1
12502 1
    @staticmethod
12503 1
    def from_binary(data):
12504
        obj = SetPublishingModeResponse()
12505 1
        obj.TypeId = NodeId.from_binary(data)
12506
        obj.ResponseHeader = ResponseHeader.from_binary(data)
12507 1
        obj.Parameters = SetPublishingModeResult.from_binary(data)
12508
        return obj
12509
12510
    def __str__(self):
12511
        return 'SetPublishingModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12512
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12513 1
               'Parameters:' + str(self.Parameters) + ')'
12514
12515
    __repr__ = __str__
12516 1
12517
12518 View Code Duplication
class NotificationMessage(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12519
    '''
12520
    :ivar SequenceNumber:
12521
    :vartype SequenceNumber: UInt32
12522
    :ivar PublishTime:
12523
    :vartype PublishTime: DateTime
12524
    :ivar NotificationData:
12525
    :vartype NotificationData: ExtensionObject
12526
    '''
12527
12528
    ua_types = [
12529
12530
        ('SequenceNumber', 'UInt32'),
12531
        ('PublishTime', 'DateTime'),
12532 1
        ('NotificationData', 'ListOfExtensionObject'),
12533
               ]
12534
12535
    def __init__(self):
12536
        self.SequenceNumber = 0
12537
        self.PublishTime = datetime.utcnow()
12538
        self.NotificationData = []
12539
        self._freeze = True
12540
12541 1
    def to_binary(self):
12542 1
        packet = []
12543 1
        packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber))
12544 1
        packet.append(uabin.Primitives.DateTime.pack(self.PublishTime))
12545 1
        packet.append(uabin.Primitives.Int32.pack(len(self.NotificationData)))
12546 1
        for fieldname in self.NotificationData:
12547 1
            packet.append(uabin.extensionobject_to_binary(fieldname))
12548 1
        return b''.join(packet)
12549 1
12550 1
    @staticmethod
12551 1
    def from_binary(data):
12552 1
        obj = NotificationMessage()
12553
        self.SequenceNumber = uabin.Primitives.UInt32.unpack(data)
12554 1
        self.PublishTime = uabin.Primitives.DateTime.unpack(data)
12555 1
        length = uabin.Primitives.Int32.unpack(data)
12556 1
        array = []
12557 1
        if length != -1:
12558 1
            for _ in range(0, length):
12559 1
                array.append(uabin.extensionobject_from_binary(data))
12560 1
        obj.NotificationData = array
12561 1
        return obj
12562 1
12563
    def __str__(self):
12564 1
        return 'NotificationMessage(' + 'SequenceNumber:' + str(self.SequenceNumber) + ', ' + \
12565
               'PublishTime:' + str(self.PublishTime) + ', ' + \
12566 1
               'NotificationData:' + str(self.NotificationData) + ')'
12567
12568 1
    __repr__ = __str__
12569 1
12570 1
12571 1
class NotificationData(FrozenClass):
12572 1
    '''
12573 1
    '''
12574 1
12575
    ua_types = [
12576 1
12577
               ]
12578
12579
    def __init__(self):
12580
        self._freeze = True
12581
12582
    def to_binary(self):
12583
        packet = []
12584 1
        return b''.join(packet)
12585
12586
    @staticmethod
12587 1
    def from_binary(data):
12588
        obj = NotificationData()
12589
        return obj
12590
12591
    def __str__(self):
12592
        return 'NotificationData(' +  + ')'
12593
12594
    __repr__ = __str__
12595
12596
12597 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...
12598
    '''
12599
    :ivar MonitoredItems:
12600
    :vartype MonitoredItems: MonitoredItemNotification
12601
    :ivar DiagnosticInfos:
12602
    :vartype DiagnosticInfos: DiagnosticInfo
12603 1
    '''
12604 1
12605
    ua_types = [
12606
12607
        ('MonitoredItems', 'ListOfMonitoredItemNotification'),
12608 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
12609 1
               ]
12610 1
12611 1
    def __init__(self):
12612
        self.MonitoredItems = []
12613 1
        self.DiagnosticInfos = []
12614 1
        self._freeze = True
12615 1
12616 1
    def to_binary(self):
12617 1
        packet = []
12618 1
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItems)))
12619
        for fieldname in self.MonitoredItems:
12620 1
            packet.append(fieldname.to_binary())
12621
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
12622
        for fieldname in self.DiagnosticInfos:
12623
            packet.append(fieldname.to_binary())
12624 1
        return b''.join(packet)
12625
12626
    @staticmethod
12627
    def from_binary(data):
12628
        obj = DataChangeNotification()
12629 1
        length = uabin.Primitives.Int32.unpack(data)
12630
        array = []
12631
        if length != -1:
12632
            for _ in range(0, length):
12633
                array.append(MonitoredItemNotification.from_binary(data))
12634 1
        obj.MonitoredItems = array
12635
        length = uabin.Primitives.Int32.unpack(data)
12636
        array = []
12637 1
        if length != -1:
12638
            for _ in range(0, length):
12639
                array.append(DiagnosticInfo.from_binary(data))
12640
        obj.DiagnosticInfos = array
12641
        return obj
12642
12643
    def __str__(self):
12644
        return 'DataChangeNotification(' + 'MonitoredItems:' + str(self.MonitoredItems) + ', ' + \
12645
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
12646
12647
    __repr__ = __str__
12648
12649 1
12650 View Code Duplication
class MonitoredItemNotification(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12651
    '''
12652
    :ivar ClientHandle:
12653
    :vartype ClientHandle: UInt32
12654
    :ivar Value:
12655
    :vartype Value: DataValue
12656 1
    '''
12657 1
12658 1
    ua_types = [
12659 1
12660 1
        ('ClientHandle', 'UInt32'),
12661 1
        ('Value', 'DataValue'),
12662 1
               ]
12663 1
12664 1
    def __init__(self):
12665 1
        self.ClientHandle = 0
12666
        self.Value = DataValue()
12667 1
        self._freeze = True
12668 1
12669 1
    def to_binary(self):
12670 1
        packet = []
12671 1
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
12672 1
        packet.append(self.Value.to_binary())
12673 1
        return b''.join(packet)
12674
12675 1
    @staticmethod
12676
    def from_binary(data):
12677 1
        obj = MonitoredItemNotification()
12678
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
12679 1
        obj.Value = DataValue.from_binary(data)
12680 1
        return obj
12681 1
12682 1
    def __str__(self):
12683 1
        return 'MonitoredItemNotification(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
12684
               'Value:' + str(self.Value) + ')'
12685 1
12686
    __repr__ = __str__
12687
12688
12689 View Code Duplication
class EventNotificationList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12690
    '''
12691 1
    :ivar Events:
12692
    :vartype Events: EventFieldList
12693
    '''
12694 1
12695
    ua_types = [
12696
12697
        ('Events', 'ListOfEventFieldList'),
12698
               ]
12699
12700
    def __init__(self):
12701
        self.Events = []
12702
        self._freeze = True
12703
12704 1
    def to_binary(self):
12705
        packet = []
12706
        packet.append(uabin.Primitives.Int32.pack(len(self.Events)))
12707
        for fieldname in self.Events:
12708
            packet.append(fieldname.to_binary())
12709
        return b''.join(packet)
12710 1
12711 1
    @staticmethod
12712 1
    def from_binary(data):
12713 1
        obj = EventNotificationList()
12714 1
        length = uabin.Primitives.Int32.unpack(data)
12715 1
        array = []
12716 1
        if length != -1:
12717 1
            for _ in range(0, length):
12718 1
                array.append(EventFieldList.from_binary(data))
12719
        obj.Events = array
12720 1
        return obj
12721 1
12722 1
    def __str__(self):
12723 1
        return 'EventNotificationList(' + 'Events:' + str(self.Events) + ')'
12724 1
12725 1
    __repr__ = __str__
12726
12727 1
12728 View Code Duplication
class EventFieldList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12729 1
    '''
12730
    :ivar ClientHandle:
12731 1
    :vartype ClientHandle: UInt32
12732 1
    :ivar EventFields:
12733 1
    :vartype EventFields: Variant
12734 1
    '''
12735
12736 1
    ua_types = [
12737
12738
        ('ClientHandle', 'UInt32'),
12739
        ('EventFields', 'ListOfVariant'),
12740
               ]
12741 1
12742
    def __init__(self):
12743
        self.ClientHandle = 0
12744 1
        self.EventFields = []
12745
        self._freeze = True
12746
12747
    def to_binary(self):
12748
        packet = []
12749
        packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle))
12750
        packet.append(uabin.Primitives.Int32.pack(len(self.EventFields)))
12751
        for fieldname in self.EventFields:
12752
            packet.append(fieldname.to_binary())
12753
        return b''.join(packet)
12754
12755
    @staticmethod
12756
    def from_binary(data):
12757
        obj = EventFieldList()
12758
        self.ClientHandle = uabin.Primitives.UInt32.unpack(data)
12759
        length = uabin.Primitives.Int32.unpack(data)
12760 1
        array = []
12761
        if length != -1:
12762
            for _ in range(0, length):
12763
                array.append(Variant.from_binary(data))
12764
        obj.EventFields = array
12765
        return obj
12766
12767
    def __str__(self):
12768
        return 'EventFieldList(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \
12769 1
               'EventFields:' + str(self.EventFields) + ')'
12770
12771
    __repr__ = __str__
12772
12773
12774 View Code Duplication
class HistoryEventFieldList(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12775
    '''
12776
    :ivar EventFields:
12777
    :vartype EventFields: Variant
12778
    '''
12779
12780
    ua_types = [
12781
12782 1
        ('EventFields', 'ListOfVariant'),
12783
               ]
12784
12785
    def __init__(self):
12786
        self.EventFields = []
12787
        self._freeze = True
12788
12789
    def to_binary(self):
12790
        packet = []
12791
        packet.append(uabin.Primitives.Int32.pack(len(self.EventFields)))
12792 1
        for fieldname in self.EventFields:
12793
            packet.append(fieldname.to_binary())
12794
        return b''.join(packet)
12795
12796 1
    @staticmethod
12797
    def from_binary(data):
12798
        obj = HistoryEventFieldList()
12799
        length = uabin.Primitives.Int32.unpack(data)
12800
        array = []
12801
        if length != -1:
12802
            for _ in range(0, length):
12803
                array.append(Variant.from_binary(data))
12804 1
        obj.EventFields = array
12805
        return obj
12806
12807
    def __str__(self):
12808
        return 'HistoryEventFieldList(' + 'EventFields:' + str(self.EventFields) + ')'
12809
12810
    __repr__ = __str__
12811
12812 1
12813 View Code Duplication
class StatusChangeNotification(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12814
    '''
12815 1
    :ivar Status:
12816
    :vartype Status: StatusCode
12817
    :ivar DiagnosticInfo:
12818
    :vartype DiagnosticInfo: DiagnosticInfo
12819
    '''
12820
12821
    ua_types = [
12822
12823
        ('Status', 'StatusCode'),
12824
        ('DiagnosticInfo', 'DiagnosticInfo'),
12825 1
               ]
12826
12827
    def __init__(self):
12828
        self.Status = StatusCode()
12829
        self.DiagnosticInfo = DiagnosticInfo()
12830
        self._freeze = True
12831 1
12832
    def to_binary(self):
12833
        packet = []
12834
        packet.append(self.Status.to_binary())
12835
        packet.append(self.DiagnosticInfo.to_binary())
12836
        return b''.join(packet)
12837
12838
    @staticmethod
12839
    def from_binary(data):
12840
        obj = StatusChangeNotification()
12841 1
        obj.Status = StatusCode.from_binary(data)
12842
        obj.DiagnosticInfo = DiagnosticInfo.from_binary(data)
12843
        return obj
12844
12845
    def __str__(self):
12846
        return 'StatusChangeNotification(' + 'Status:' + str(self.Status) + ', ' + \
12847
               'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')'
12848 1
12849
    __repr__ = __str__
12850
12851
12852 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...
12853
    '''
12854
    :ivar SubscriptionId:
12855
    :vartype SubscriptionId: UInt32
12856
    :ivar SequenceNumber:
12857 1
    :vartype SequenceNumber: UInt32
12858
    '''
12859
12860
    ua_types = [
12861
12862 1
        ('SubscriptionId', 'UInt32'),
12863
        ('SequenceNumber', 'UInt32'),
12864
               ]
12865 1
12866
    def __init__(self):
12867
        self.SubscriptionId = 0
12868
        self.SequenceNumber = 0
12869
        self._freeze = True
12870
12871
    def to_binary(self):
12872
        packet = []
12873
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
12874
        packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber))
12875 1
        return b''.join(packet)
12876
12877
    @staticmethod
12878
    def from_binary(data):
12879
        obj = SubscriptionAcknowledgement()
12880
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
12881 1
        self.SequenceNumber = uabin.Primitives.UInt32.unpack(data)
12882
        return obj
12883
12884
    def __str__(self):
12885
        return 'SubscriptionAcknowledgement(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
12886
               'SequenceNumber:' + str(self.SequenceNumber) + ')'
12887
12888
    __repr__ = __str__
12889
12890
12891 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...
12892
    '''
12893
    :ivar SubscriptionAcknowledgements:
12894
    :vartype SubscriptionAcknowledgements: SubscriptionAcknowledgement
12895
    '''
12896
12897
    ua_types = [
12898 1
12899
        ('SubscriptionAcknowledgements', 'ListOfSubscriptionAcknowledgement'),
12900
               ]
12901
12902 1
    def __init__(self):
12903
        self.SubscriptionAcknowledgements = []
12904
        self._freeze = True
12905
12906
    def to_binary(self):
12907 1
        packet = []
12908
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionAcknowledgements)))
12909
        for fieldname in self.SubscriptionAcknowledgements:
12910
            packet.append(fieldname.to_binary())
12911
        return b''.join(packet)
12912 1
12913
    @staticmethod
12914
    def from_binary(data):
12915 1
        obj = PublishParameters()
12916
        length = uabin.Primitives.Int32.unpack(data)
12917
        array = []
12918
        if length != -1:
12919
            for _ in range(0, length):
12920
                array.append(SubscriptionAcknowledgement.from_binary(data))
12921
        obj.SubscriptionAcknowledgements = array
12922
        return obj
12923
12924
    def __str__(self):
12925 1
        return 'PublishParameters(' + 'SubscriptionAcknowledgements:' + str(self.SubscriptionAcknowledgements) + ')'
12926
12927
    __repr__ = __str__
12928
12929
12930
class PublishRequest(FrozenClass):
12931 1
    '''
12932
    :ivar TypeId:
12933
    :vartype TypeId: NodeId
12934
    :ivar RequestHeader:
12935
    :vartype RequestHeader: RequestHeader
12936
    :ivar Parameters:
12937
    :vartype Parameters: PublishParameters
12938
    '''
12939
12940
    ua_types = [
12941 1
12942
        ('TypeId', 'NodeId'),
12943
        ('RequestHeader', 'RequestHeader'),
12944
        ('Parameters', 'PublishParameters'),
12945
               ]
12946
12947
    def __init__(self):
12948 1
        self.TypeId = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary)
12949
        self.RequestHeader = RequestHeader()
12950
        self.Parameters = PublishParameters()
12951
        self._freeze = True
12952 1
12953
    def to_binary(self):
12954
        packet = []
12955
        packet.append(self.TypeId.to_binary())
12956
        packet.append(self.RequestHeader.to_binary())
12957 1
        packet.append(self.Parameters.to_binary())
12958
        return b''.join(packet)
12959
12960
    @staticmethod
12961
    def from_binary(data):
12962 1
        obj = PublishRequest()
12963
        obj.TypeId = NodeId.from_binary(data)
12964
        obj.RequestHeader = RequestHeader.from_binary(data)
12965 1
        obj.Parameters = PublishParameters.from_binary(data)
12966
        return obj
12967
12968
    def __str__(self):
12969
        return 'PublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12970
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
12971
               'Parameters:' + str(self.Parameters) + ')'
12972
12973 1
    __repr__ = __str__
12974
12975
12976
class PublishResult(FrozenClass):
12977
    '''
12978 1
    :ivar SubscriptionId:
12979
    :vartype SubscriptionId: UInt32
12980
    :ivar AvailableSequenceNumbers:
12981
    :vartype AvailableSequenceNumbers: UInt32
12982
    :ivar MoreNotifications:
12983
    :vartype MoreNotifications: Boolean
12984
    :ivar NotificationMessage:
12985
    :vartype NotificationMessage: NotificationMessage
12986
    :ivar Results:
12987 1
    :vartype Results: StatusCode
12988
    :ivar DiagnosticInfos:
12989
    :vartype DiagnosticInfos: DiagnosticInfo
12990
    '''
12991
12992
    ua_types = [
12993
12994
        ('SubscriptionId', 'UInt32'),
12995 1
        ('AvailableSequenceNumbers', 'ListOfUInt32'),
12996
        ('MoreNotifications', 'Boolean'),
12997
        ('NotificationMessage', 'NotificationMessage'),
12998
        ('Results', 'ListOfStatusCode'),
12999 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
13000
               ]
13001
13002
    def __init__(self):
13003 1
        self.SubscriptionId = 0
13004
        self.AvailableSequenceNumbers = []
13005
        self.MoreNotifications = True
13006
        self.NotificationMessage = NotificationMessage()
13007 1
        self.Results = []
13008
        self.DiagnosticInfos = []
13009
        self._freeze = True
13010 1
13011 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...
13012
        packet = []
13013
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
13014
        packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers)))
13015
        for fieldname in self.AvailableSequenceNumbers:
13016
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13017
        packet.append(uabin.Primitives.Boolean.pack(self.MoreNotifications))
13018
        packet.append(self.NotificationMessage.to_binary())
13019
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
13020 1
        for fieldname in self.Results:
13021
            packet.append(fieldname.to_binary())
13022
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13023
        for fieldname in self.DiagnosticInfos:
13024
            packet.append(fieldname.to_binary())
13025
        return b''.join(packet)
13026 1
13027
    @staticmethod
13028
    def from_binary(data):
13029
        obj = PublishResult()
13030
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
13031
        obj.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data)
13032
        self.MoreNotifications = uabin.Primitives.Boolean.unpack(data)
13033
        obj.NotificationMessage = NotificationMessage.from_binary(data)
13034
        length = uabin.Primitives.Int32.unpack(data)
13035
        array = []
13036 1
        if length != -1:
13037
            for _ in range(0, length):
13038
                array.append(StatusCode.from_binary(data))
13039
        obj.Results = array
13040
        length = uabin.Primitives.Int32.unpack(data)
13041
        array = []
13042
        if length != -1:
13043 1
            for _ in range(0, length):
13044
                array.append(DiagnosticInfo.from_binary(data))
13045
        obj.DiagnosticInfos = array
13046
        return obj
13047 1
13048
    def __str__(self):
13049
        return 'PublishResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
13050
               'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ', ' + \
13051
               'MoreNotifications:' + str(self.MoreNotifications) + ', ' + \
13052 1
               'NotificationMessage:' + str(self.NotificationMessage) + ', ' + \
13053
               'Results:' + str(self.Results) + ', ' + \
13054
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13055
13056
    __repr__ = __str__
13057 1
13058
13059
class PublishResponse(FrozenClass):
13060 1
    '''
13061
    :ivar TypeId:
13062
    :vartype TypeId: NodeId
13063
    :ivar ResponseHeader:
13064
    :vartype ResponseHeader: ResponseHeader
13065
    :ivar Parameters:
13066
    :vartype Parameters: PublishResult
13067
    '''
13068 1
13069
    ua_types = [
13070
13071
        ('TypeId', 'NodeId'),
13072
        ('ResponseHeader', 'ResponseHeader'),
13073 1
        ('Parameters', 'PublishResult'),
13074
               ]
13075
13076
    def __init__(self):
13077
        self.TypeId = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary)
13078
        self.ResponseHeader = ResponseHeader()
13079
        self.Parameters = PublishResult()
13080
        self._freeze = True
13081
13082 1
    def to_binary(self):
13083
        packet = []
13084
        packet.append(self.TypeId.to_binary())
13085
        packet.append(self.ResponseHeader.to_binary())
13086
        packet.append(self.Parameters.to_binary())
13087
        return b''.join(packet)
13088
13089
    @staticmethod
13090
    def from_binary(data):
13091
        obj = PublishResponse()
13092 1
        obj.TypeId = NodeId.from_binary(data)
13093
        obj.ResponseHeader = ResponseHeader.from_binary(data)
13094
        obj.Parameters = PublishResult.from_binary(data)
13095
        return obj
13096 1
13097
    def __str__(self):
13098
        return 'PublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13099
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13100
               'Parameters:' + str(self.Parameters) + ')'
13101
13102
    __repr__ = __str__
13103
13104
13105 View Code Duplication
class RepublishParameters(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13106
    '''
13107
    :ivar SubscriptionId:
13108
    :vartype SubscriptionId: UInt32
13109
    :ivar RetransmitSequenceNumber:
13110 1
    :vartype RetransmitSequenceNumber: UInt32
13111
    '''
13112
13113
    ua_types = [
13114 1
13115
        ('SubscriptionId', 'UInt32'),
13116
        ('RetransmitSequenceNumber', 'UInt32'),
13117 1
               ]
13118
13119
    def __init__(self):
13120
        self.SubscriptionId = 0
13121
        self.RetransmitSequenceNumber = 0
13122
        self._freeze = True
13123
13124
    def to_binary(self):
13125
        packet = []
13126
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
13127 1
        packet.append(uabin.Primitives.UInt32.pack(self.RetransmitSequenceNumber))
13128
        return b''.join(packet)
13129
13130
    @staticmethod
13131
    def from_binary(data):
13132
        obj = RepublishParameters()
13133 1
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
13134
        self.RetransmitSequenceNumber = uabin.Primitives.UInt32.unpack(data)
13135
        return obj
13136
13137
    def __str__(self):
13138
        return 'RepublishParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
13139
               'RetransmitSequenceNumber:' + str(self.RetransmitSequenceNumber) + ')'
13140
13141
    __repr__ = __str__
13142
13143 1
13144
class RepublishRequest(FrozenClass):
13145
    '''
13146
    :ivar TypeId:
13147
    :vartype TypeId: NodeId
13148
    :ivar RequestHeader:
13149
    :vartype RequestHeader: RequestHeader
13150 1
    :ivar Parameters:
13151
    :vartype Parameters: RepublishParameters
13152
    '''
13153
13154 1
    ua_types = [
13155
13156
        ('TypeId', 'NodeId'),
13157
        ('RequestHeader', 'RequestHeader'),
13158
        ('Parameters', 'RepublishParameters'),
13159 1
               ]
13160
13161
    def __init__(self):
13162
        self.TypeId = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary)
13163
        self.RequestHeader = RequestHeader()
13164 1
        self.Parameters = RepublishParameters()
13165
        self._freeze = True
13166
13167 1
    def to_binary(self):
13168
        packet = []
13169
        packet.append(self.TypeId.to_binary())
13170
        packet.append(self.RequestHeader.to_binary())
13171
        packet.append(self.Parameters.to_binary())
13172
        return b''.join(packet)
13173
13174
    @staticmethod
13175
    def from_binary(data):
13176
        obj = RepublishRequest()
13177 1
        obj.TypeId = NodeId.from_binary(data)
13178
        obj.RequestHeader = RequestHeader.from_binary(data)
13179
        obj.Parameters = RepublishParameters.from_binary(data)
13180
        return obj
13181
13182
    def __str__(self):
13183 1
        return 'RepublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13184 1
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13185 1
               'Parameters:' + str(self.Parameters) + ')'
13186 1
13187 1
    __repr__ = __str__
13188 1
13189 1
13190 1
class RepublishResponse(FrozenClass):
13191 1
    '''
13192
    :ivar TypeId:
13193 1
    :vartype TypeId: NodeId
13194 1
    :ivar ResponseHeader:
13195 1
    :vartype ResponseHeader: ResponseHeader
13196 1
    :ivar NotificationMessage:
13197 1
    :vartype NotificationMessage: NotificationMessage
13198 1
    '''
13199 1
13200 1
    ua_types = [
13201
13202 1
        ('TypeId', 'NodeId'),
13203
        ('ResponseHeader', 'ResponseHeader'),
13204 1
        ('NotificationMessage', 'NotificationMessage'),
13205
               ]
13206 1
13207 1
    def __init__(self):
13208 1
        self.TypeId = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary)
13209 1
        self.ResponseHeader = ResponseHeader()
13210 1
        self.NotificationMessage = NotificationMessage()
13211 1
        self._freeze = True
13212 1
13213 1
    def to_binary(self):
13214 1
        packet = []
13215
        packet.append(self.TypeId.to_binary())
13216 1
        packet.append(self.ResponseHeader.to_binary())
13217
        packet.append(self.NotificationMessage.to_binary())
13218
        return b''.join(packet)
13219
13220
    @staticmethod
13221 1
    def from_binary(data):
13222
        obj = RepublishResponse()
13223
        obj.TypeId = NodeId.from_binary(data)
13224 1
        obj.ResponseHeader = ResponseHeader.from_binary(data)
13225
        obj.NotificationMessage = NotificationMessage.from_binary(data)
13226
        return obj
13227
13228 1
    def __str__(self):
13229
        return 'RepublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13230
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13231 1
               'NotificationMessage:' + str(self.NotificationMessage) + ')'
13232
13233
    __repr__ = __str__
13234
13235
13236
class TransferResult(FrozenClass):
13237
    '''
13238 1
    :ivar StatusCode:
13239
    :vartype StatusCode: StatusCode
13240
    :ivar AvailableSequenceNumbers:
13241
    :vartype AvailableSequenceNumbers: UInt32
13242 1
    '''
13243
13244
    ua_types = [
13245
13246 1
        ('StatusCode', 'StatusCode'),
13247
        ('AvailableSequenceNumbers', 'ListOfUInt32'),
13248
               ]
13249 1
13250
    def __init__(self):
13251
        self.StatusCode = StatusCode()
13252 1
        self.AvailableSequenceNumbers = []
13253
        self._freeze = True
13254
13255 1
    def to_binary(self):
13256
        packet = []
13257
        packet.append(self.StatusCode.to_binary())
13258
        packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers)))
13259
        for fieldname in self.AvailableSequenceNumbers:
13260
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13261
        return b''.join(packet)
13262
13263 1
    @staticmethod
13264
    def from_binary(data):
13265
        obj = TransferResult()
13266
        obj.StatusCode = StatusCode.from_binary(data)
13267
        obj.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data)
13268 1
        return obj
13269 1
13270 1
    def __str__(self):
13271 1
        return 'TransferResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
13272 1
               'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ')'
13273 1
13274 1
    __repr__ = __str__
13275 1
13276
13277 1
class TransferSubscriptionsParameters(FrozenClass):
13278 1
    '''
13279 1
    :ivar SubscriptionIds:
13280 1
    :vartype SubscriptionIds: UInt32
13281 1
    :ivar SendInitialValues:
13282 1
    :vartype SendInitialValues: Boolean
13283 1
    '''
13284
13285 1
    ua_types = [
13286
13287 1
        ('SubscriptionIds', 'ListOfUInt32'),
13288
        ('SendInitialValues', 'Boolean'),
13289 1
               ]
13290
13291 1
    def __init__(self):
13292 1
        self.SubscriptionIds = []
13293 1
        self.SendInitialValues = True
13294 1
        self._freeze = True
13295 1
13296 1
    def to_binary(self):
13297 1
        packet = []
13298 1
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
13299 1
        for fieldname in self.SubscriptionIds:
13300 1
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13301 1
        packet.append(uabin.Primitives.Boolean.pack(self.SendInitialValues))
13302
        return b''.join(packet)
13303 1
13304
    @staticmethod
13305 1
    def from_binary(data):
13306
        obj = TransferSubscriptionsParameters()
13307
        obj.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
13308
        self.SendInitialValues = uabin.Primitives.Boolean.unpack(data)
13309 1
        return obj
13310
13311
    def __str__(self):
13312 1
        return 'TransferSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ', ' + \
13313
               'SendInitialValues:' + str(self.SendInitialValues) + ')'
13314
13315
    __repr__ = __str__
13316
13317
13318
class TransferSubscriptionsRequest(FrozenClass):
13319
    '''
13320 1
    :ivar TypeId:
13321
    :vartype TypeId: NodeId
13322
    :ivar RequestHeader:
13323
    :vartype RequestHeader: RequestHeader
13324
    :ivar Parameters:
13325 1
    :vartype Parameters: TransferSubscriptionsParameters
13326 1
    '''
13327 1
13328 1
    ua_types = [
13329 1
13330 1
        ('TypeId', 'NodeId'),
13331 1
        ('RequestHeader', 'RequestHeader'),
13332 1
        ('Parameters', 'TransferSubscriptionsParameters'),
13333
               ]
13334 1
13335 1
    def __init__(self):
13336 1
        self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary)
13337 1
        self.RequestHeader = RequestHeader()
13338 1
        self.Parameters = TransferSubscriptionsParameters()
13339
        self._freeze = True
13340 1
13341
    def to_binary(self):
13342 1
        packet = []
13343
        packet.append(self.TypeId.to_binary())
13344 1
        packet.append(self.RequestHeader.to_binary())
13345 1
        packet.append(self.Parameters.to_binary())
13346 1
        return b''.join(packet)
13347
13348 1
    @staticmethod
13349
    def from_binary(data):
13350
        obj = TransferSubscriptionsRequest()
13351
        obj.TypeId = NodeId.from_binary(data)
13352 1
        obj.RequestHeader = RequestHeader.from_binary(data)
13353
        obj.Parameters = TransferSubscriptionsParameters.from_binary(data)
13354
        return obj
13355 1
13356
    def __str__(self):
13357
        return 'TransferSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13358
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13359
               'Parameters:' + str(self.Parameters) + ')'
13360
13361 1
    __repr__ = __str__
13362
13363
13364 View Code Duplication
class TransferSubscriptionsResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13365 1
    '''
13366 1
    :ivar Results:
13367 1
    :vartype Results: TransferResult
13368 1
    :ivar DiagnosticInfos:
13369 1
    :vartype DiagnosticInfos: DiagnosticInfo
13370 1
    '''
13371 1
13372
    ua_types = [
13373 1
13374 1
        ('Results', 'ListOfTransferResult'),
13375 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
13376 1
               ]
13377 1
13378 1
    def __init__(self):
13379
        self.Results = []
13380 1
        self.DiagnosticInfos = []
13381
        self._freeze = True
13382 1
13383
    def to_binary(self):
13384 1
        packet = []
13385 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
13386 1
        for fieldname in self.Results:
13387 1
            packet.append(fieldname.to_binary())
13388 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13389 1
        for fieldname in self.DiagnosticInfos:
13390 1
            packet.append(fieldname.to_binary())
13391
        return b''.join(packet)
13392 1
13393
    @staticmethod
13394
    def from_binary(data):
13395 1
        obj = TransferSubscriptionsResult()
13396
        length = uabin.Primitives.Int32.unpack(data)
13397
        array = []
13398 1
        if length != -1:
13399
            for _ in range(0, length):
13400
                array.append(TransferResult.from_binary(data))
13401
        obj.Results = array
13402
        length = uabin.Primitives.Int32.unpack(data)
13403
        array = []
13404
        if length != -1:
13405
            for _ in range(0, length):
13406 1
                array.append(DiagnosticInfo.from_binary(data))
13407
        obj.DiagnosticInfos = array
13408
        return obj
13409
13410
    def __str__(self):
13411 1
        return 'TransferSubscriptionsResult(' + 'Results:' + str(self.Results) + ', ' + \
13412 1
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13413 1
13414 1
    __repr__ = __str__
13415 1
13416 1
13417 1
class TransferSubscriptionsResponse(FrozenClass):
13418 1
    '''
13419
    :ivar TypeId:
13420 1
    :vartype TypeId: NodeId
13421 1
    :ivar ResponseHeader:
13422 1
    :vartype ResponseHeader: ResponseHeader
13423 1
    :ivar Parameters:
13424 1
    :vartype Parameters: TransferSubscriptionsResult
13425 1
    '''
13426 1
13427
    ua_types = [
13428 1
13429
        ('TypeId', 'NodeId'),
13430 1
        ('ResponseHeader', 'ResponseHeader'),
13431
        ('Parameters', 'TransferSubscriptionsResult'),
13432 1
               ]
13433 1
13434 1
    def __init__(self):
13435 1
        self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary)
13436 1
        self.ResponseHeader = ResponseHeader()
13437 1
        self.Parameters = TransferSubscriptionsResult()
13438 1
        self._freeze = True
13439 1
13440
    def to_binary(self):
13441 1
        packet = []
13442
        packet.append(self.TypeId.to_binary())
13443
        packet.append(self.ResponseHeader.to_binary())
13444
        packet.append(self.Parameters.to_binary())
13445 1
        return b''.join(packet)
13446
13447
    @staticmethod
13448 1
    def from_binary(data):
13449
        obj = TransferSubscriptionsResponse()
13450
        obj.TypeId = NodeId.from_binary(data)
13451
        obj.ResponseHeader = ResponseHeader.from_binary(data)
13452
        obj.Parameters = TransferSubscriptionsResult.from_binary(data)
13453
        return obj
13454 1
13455
    def __str__(self):
13456
        return 'TransferSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13457
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13458 1
               'Parameters:' + str(self.Parameters) + ')'
13459 1
13460
    __repr__ = __str__
13461
13462
13463 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...
13464 1
    '''
13465
    :ivar SubscriptionIds:
13466 1
    :vartype SubscriptionIds: UInt32
13467
    '''
13468
13469
    ua_types = [
13470
13471
        ('SubscriptionIds', 'ListOfUInt32'),
13472
               ]
13473 1
13474
    def __init__(self):
13475
        self.SubscriptionIds = []
13476
        self._freeze = True
13477 1
13478
    def to_binary(self):
13479
        packet = []
13480
        packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds)))
13481
        for fieldname in self.SubscriptionIds:
13482
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
13483
        return b''.join(packet)
13484
13485 1
    @staticmethod
13486
    def from_binary(data):
13487
        obj = DeleteSubscriptionsParameters()
13488 1
        obj.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data)
13489
        return obj
13490
13491 1
    def __str__(self):
13492
        return 'DeleteSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ')'
13493
13494
    __repr__ = __str__
13495
13496
13497
class DeleteSubscriptionsRequest(FrozenClass):
13498
    '''
13499 1
    :ivar TypeId:
13500
    :vartype TypeId: NodeId
13501
    :ivar RequestHeader:
13502
    :vartype RequestHeader: RequestHeader
13503
    :ivar Parameters:
13504 1
    :vartype Parameters: DeleteSubscriptionsParameters
13505
    '''
13506
13507
    ua_types = [
13508
13509
        ('TypeId', 'NodeId'),
13510
        ('RequestHeader', 'RequestHeader'),
13511
        ('Parameters', 'DeleteSubscriptionsParameters'),
13512
               ]
13513 1
13514
    def __init__(self):
13515
        self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary)
13516
        self.RequestHeader = RequestHeader()
13517
        self.Parameters = DeleteSubscriptionsParameters()
13518
        self._freeze = True
13519 1
13520
    def to_binary(self):
13521
        packet = []
13522
        packet.append(self.TypeId.to_binary())
13523 1
        packet.append(self.RequestHeader.to_binary())
13524
        packet.append(self.Parameters.to_binary())
13525
        return b''.join(packet)
13526
13527 1
    @staticmethod
13528
    def from_binary(data):
13529
        obj = DeleteSubscriptionsRequest()
13530
        obj.TypeId = NodeId.from_binary(data)
13531 1
        obj.RequestHeader = RequestHeader.from_binary(data)
13532
        obj.Parameters = DeleteSubscriptionsParameters.from_binary(data)
13533
        return obj
13534 1
13535
    def __str__(self):
13536
        return 'DeleteSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13537
               'RequestHeader:' + str(self.RequestHeader) + ', ' + \
13538
               'Parameters:' + str(self.Parameters) + ')'
13539
13540
    __repr__ = __str__
13541
13542 1
13543 View Code Duplication
class DeleteSubscriptionsResponse(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13544
    '''
13545
    :ivar TypeId:
13546
    :vartype TypeId: NodeId
13547 1
    :ivar ResponseHeader:
13548 1
    :vartype ResponseHeader: ResponseHeader
13549 1
    :ivar Results:
13550 1
    :vartype Results: StatusCode
13551 1
    :ivar DiagnosticInfos:
13552 1
    :vartype DiagnosticInfos: DiagnosticInfo
13553 1
    '''
13554 1
13555
    ua_types = [
13556 1
13557 1
        ('TypeId', 'NodeId'),
13558 1
        ('ResponseHeader', 'ResponseHeader'),
13559 1
        ('Results', 'ListOfStatusCode'),
13560 1
        ('DiagnosticInfos', 'ListOfDiagnosticInfo'),
13561
               ]
13562 1
13563
    def __init__(self):
13564 1
        self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary)
13565
        self.ResponseHeader = ResponseHeader()
13566 1
        self.Results = []
13567 1
        self.DiagnosticInfos = []
13568 1
        self._freeze = True
13569
13570 1
    def to_binary(self):
13571
        packet = []
13572
        packet.append(self.TypeId.to_binary())
13573
        packet.append(self.ResponseHeader.to_binary())
13574 1
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
13575
        for fieldname in self.Results:
13576
            packet.append(fieldname.to_binary())
13577 1
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
13578
        for fieldname in self.DiagnosticInfos:
13579
            packet.append(fieldname.to_binary())
13580
        return b''.join(packet)
13581
13582
    @staticmethod
13583 1
    def from_binary(data):
13584
        obj = DeleteSubscriptionsResponse()
13585
        obj.TypeId = NodeId.from_binary(data)
13586
        obj.ResponseHeader = ResponseHeader.from_binary(data)
13587 1
        length = uabin.Primitives.Int32.unpack(data)
13588 1
        array = []
13589 1
        if length != -1:
13590 1
            for _ in range(0, length):
13591 1
                array.append(StatusCode.from_binary(data))
13592 1
        obj.Results = array
13593 1
        length = uabin.Primitives.Int32.unpack(data)
13594
        array = []
13595 1
        if length != -1:
13596 1
            for _ in range(0, length):
13597 1
                array.append(DiagnosticInfo.from_binary(data))
13598 1
        obj.DiagnosticInfos = array
13599 1
        return obj
13600 1
13601
    def __str__(self):
13602 1
        return 'DeleteSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
13603
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
13604 1
               'Results:' + str(self.Results) + ', ' + \
13605
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
13606 1
13607 1
    __repr__ = __str__
13608 1
13609 1
13610 1
class BuildInfo(FrozenClass):
13611 1
    '''
13612 1
    :ivar ProductUri:
13613
    :vartype ProductUri: String
13614 1
    :ivar ManufacturerName:
13615
    :vartype ManufacturerName: String
13616
    :ivar ProductName:
13617 1
    :vartype ProductName: String
13618
    :ivar SoftwareVersion:
13619
    :vartype SoftwareVersion: String
13620 1
    :ivar BuildNumber:
13621
    :vartype BuildNumber: String
13622
    :ivar BuildDate:
13623
    :vartype BuildDate: DateTime
13624
    '''
13625
13626
    ua_types = [
13627
13628
        ('ProductUri', 'String'),
13629
        ('ManufacturerName', 'String'),
13630 1
        ('ProductName', 'String'),
13631
        ('SoftwareVersion', 'String'),
13632
        ('BuildNumber', 'String'),
13633
        ('BuildDate', 'DateTime'),
13634
               ]
13635
13636 1
    def __init__(self):
13637 1
        self.ProductUri = None
13638
        self.ManufacturerName = None
13639
        self.ProductName = None
13640
        self.SoftwareVersion = None
13641 1
        self.BuildNumber = None
13642 1
        self.BuildDate = datetime.utcnow()
13643 1
        self._freeze = True
13644 1
13645
    def to_binary(self):
13646 1
        packet = []
13647 1
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
13648 1
        packet.append(uabin.Primitives.String.pack(self.ManufacturerName))
13649 1
        packet.append(uabin.Primitives.String.pack(self.ProductName))
13650 1
        packet.append(uabin.Primitives.String.pack(self.SoftwareVersion))
13651 1
        packet.append(uabin.Primitives.String.pack(self.BuildNumber))
13652
        packet.append(uabin.Primitives.DateTime.pack(self.BuildDate))
13653 1
        return b''.join(packet)
13654
13655
    @staticmethod
13656
    def from_binary(data):
13657 1
        obj = BuildInfo()
13658
        self.ProductUri = uabin.Primitives.String.unpack(data)
13659
        self.ManufacturerName = uabin.Primitives.String.unpack(data)
13660
        self.ProductName = uabin.Primitives.String.unpack(data)
13661
        self.SoftwareVersion = uabin.Primitives.String.unpack(data)
13662 1
        self.BuildNumber = uabin.Primitives.String.unpack(data)
13663
        self.BuildDate = uabin.Primitives.DateTime.unpack(data)
13664
        return obj
13665
13666
    def __str__(self):
13667 1
        return 'BuildInfo(' + 'ProductUri:' + str(self.ProductUri) + ', ' + \
13668
               'ManufacturerName:' + str(self.ManufacturerName) + ', ' + \
13669
               'ProductName:' + str(self.ProductName) + ', ' + \
13670 1
               'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \
13671
               'BuildNumber:' + str(self.BuildNumber) + ', ' + \
13672
               'BuildDate:' + str(self.BuildDate) + ')'
13673
13674
    __repr__ = __str__
13675
13676
13677
class RedundantServerDataType(FrozenClass):
13678
    '''
13679
    :ivar ServerId:
13680
    :vartype ServerId: String
13681
    :ivar ServiceLevel:
13682
    :vartype ServiceLevel: Byte
13683
    :ivar ServerState:
13684
    :vartype ServerState: ServerState
13685
    '''
13686 1
13687
    ua_types = [
13688
13689
        ('ServerId', 'String'),
13690
        ('ServiceLevel', 'Byte'),
13691
        ('ServerState', 'ServerState'),
13692
               ]
13693
13694
    def __init__(self):
13695 1
        self.ServerId = None
13696 1
        self.ServiceLevel = 0
13697 1
        self.ServerState = ServerState(0)
13698 1
        self._freeze = True
13699 1
13700 1
    def to_binary(self):
13701 1
        packet = []
13702 1
        packet.append(uabin.Primitives.String.pack(self.ServerId))
13703 1
        packet.append(uabin.Primitives.Byte.pack(self.ServiceLevel))
13704 1
        packet.append(uabin.Primitives.UInt32.pack(self.ServerState.value))
13705 1
        return b''.join(packet)
13706 1
13707
    @staticmethod
13708 1
    def from_binary(data):
13709 1
        obj = RedundantServerDataType()
13710 1
        self.ServerId = uabin.Primitives.String.unpack(data)
13711 1
        self.ServiceLevel = uabin.Primitives.Byte.unpack(data)
13712 1
        self.ServerState = ServerState(uabin.Primitives.UInt32.unpack(data))
13713 1
        return obj
13714 1
13715 1
    def __str__(self):
13716 1
        return 'RedundantServerDataType(' + 'ServerId:' + str(self.ServerId) + ', ' + \
13717 1
               'ServiceLevel:' + str(self.ServiceLevel) + ', ' + \
13718
               'ServerState:' + str(self.ServerState) + ')'
13719 1
13720 1
    __repr__ = __str__
13721
13722 1
13723 View Code Duplication
class EndpointUrlListDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13724 1
    '''
13725
    :ivar EndpointUrlList:
13726 1
    :vartype EndpointUrlList: String
13727
    '''
13728 1
13729 1
    ua_types = [
13730 1
13731 1
        ('EndpointUrlList', 'ListOfString'),
13732 1
               ]
13733 1
13734 1
    def __init__(self):
13735 1
        self.EndpointUrlList = []
13736 1
        self._freeze = True
13737
13738 1
    def to_binary(self):
13739 1
        packet = []
13740 1
        packet.append(uabin.Primitives.Int32.pack(len(self.EndpointUrlList)))
13741 1
        for fieldname in self.EndpointUrlList:
13742 1
            packet.append(uabin.Primitives.String.pack(fieldname))
13743
        return b''.join(packet)
13744 1
13745
    @staticmethod
13746 1
    def from_binary(data):
13747
        obj = EndpointUrlListDataType()
13748
        obj.EndpointUrlList = uabin.Primitives.String.unpack_array(data)
13749
        return obj
13750
13751
    def __str__(self):
13752
        return 'EndpointUrlListDataType(' + 'EndpointUrlList:' + str(self.EndpointUrlList) + ')'
13753
13754 1
    __repr__ = __str__
13755
13756
13757 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...
13758
    '''
13759
    :ivar ServerUri:
13760
    :vartype ServerUri: String
13761
    :ivar NetworkPaths:
13762
    :vartype NetworkPaths: EndpointUrlListDataType
13763
    '''
13764
13765
    ua_types = [
13766
13767 1
        ('ServerUri', 'String'),
13768
        ('NetworkPaths', 'ListOfEndpointUrlListDataType'),
13769
               ]
13770
13771
    def __init__(self):
13772
        self.ServerUri = None
13773 1
        self.NetworkPaths = []
13774 1
        self._freeze = True
13775 1
13776 1
    def to_binary(self):
13777 1
        packet = []
13778 1
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
13779 1
        packet.append(uabin.Primitives.Int32.pack(len(self.NetworkPaths)))
13780 1
        for fieldname in self.NetworkPaths:
13781 1
            packet.append(fieldname.to_binary())
13782
        return b''.join(packet)
13783 1
13784 1
    @staticmethod
13785 1
    def from_binary(data):
13786 1
        obj = NetworkGroupDataType()
13787 1
        self.ServerUri = uabin.Primitives.String.unpack(data)
13788 1
        length = uabin.Primitives.Int32.unpack(data)
13789
        array = []
13790 1
        if length != -1:
13791
            for _ in range(0, length):
13792 1
                array.append(EndpointUrlListDataType.from_binary(data))
13793
        obj.NetworkPaths = array
13794 1
        return obj
13795 1
13796 1
    def __str__(self):
13797 1
        return 'NetworkGroupDataType(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \
13798
               'NetworkPaths:' + str(self.NetworkPaths) + ')'
13799 1
13800
    __repr__ = __str__
13801
13802
13803 View Code Duplication
class SamplingIntervalDiagnosticsDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13804 1
    '''
13805
    :ivar SamplingInterval:
13806
    :vartype SamplingInterval: Double
13807 1
    :ivar MonitoredItemCount:
13808
    :vartype MonitoredItemCount: UInt32
13809
    :ivar MaxMonitoredItemCount:
13810
    :vartype MaxMonitoredItemCount: UInt32
13811
    :ivar DisabledMonitoredItemCount:
13812
    :vartype DisabledMonitoredItemCount: UInt32
13813
    '''
13814
13815 1
    ua_types = [
13816
13817
        ('SamplingInterval', 'Double'),
13818
        ('MonitoredItemCount', 'UInt32'),
13819
        ('MaxMonitoredItemCount', 'UInt32'),
13820 1
        ('DisabledMonitoredItemCount', 'UInt32'),
13821
               ]
13822
13823
    def __init__(self):
13824
        self.SamplingInterval = 0
13825
        self.MonitoredItemCount = 0
13826
        self.MaxMonitoredItemCount = 0
13827
        self.DisabledMonitoredItemCount = 0
13828
        self._freeze = True
13829 1
13830
    def to_binary(self):
13831
        packet = []
13832
        packet.append(uabin.Primitives.Double.pack(self.SamplingInterval))
13833
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount))
13834
        packet.append(uabin.Primitives.UInt32.pack(self.MaxMonitoredItemCount))
13835 1
        packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount))
13836
        return b''.join(packet)
13837
13838
    @staticmethod
13839 1
    def from_binary(data):
13840
        obj = SamplingIntervalDiagnosticsDataType()
13841
        self.SamplingInterval = uabin.Primitives.Double.unpack(data)
13842
        self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
13843 1
        self.MaxMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
13844
        self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
13845
        return obj
13846
13847 1
    def __str__(self):
13848
        return 'SamplingIntervalDiagnosticsDataType(' + 'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \
13849
               'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \
13850 1
               'MaxMonitoredItemCount:' + str(self.MaxMonitoredItemCount) + ', ' + \
13851
               'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ')'
13852
13853
    __repr__ = __str__
13854
13855
13856
class ServerDiagnosticsSummaryDataType(FrozenClass):
13857
    '''
13858
    :ivar ServerViewCount:
13859
    :vartype ServerViewCount: UInt32
13860 1
    :ivar CurrentSessionCount:
13861
    :vartype CurrentSessionCount: UInt32
13862
    :ivar CumulatedSessionCount:
13863
    :vartype CumulatedSessionCount: UInt32
13864
    :ivar SecurityRejectedSessionCount:
13865
    :vartype SecurityRejectedSessionCount: UInt32
13866 1
    :ivar RejectedSessionCount:
13867
    :vartype RejectedSessionCount: UInt32
13868
    :ivar SessionTimeoutCount:
13869
    :vartype SessionTimeoutCount: UInt32
13870
    :ivar SessionAbortCount:
13871
    :vartype SessionAbortCount: UInt32
13872
    :ivar CurrentSubscriptionCount:
13873
    :vartype CurrentSubscriptionCount: UInt32
13874
    :ivar CumulatedSubscriptionCount:
13875
    :vartype CumulatedSubscriptionCount: UInt32
13876 1
    :ivar PublishingIntervalCount:
13877
    :vartype PublishingIntervalCount: UInt32
13878
    :ivar SecurityRejectedRequestsCount:
13879
    :vartype SecurityRejectedRequestsCount: UInt32
13880
    :ivar RejectedRequestsCount:
13881
    :vartype RejectedRequestsCount: UInt32
13882
    '''
13883 1
13884
    ua_types = [
13885
13886
        ('ServerViewCount', 'UInt32'),
13887 1
        ('CurrentSessionCount', 'UInt32'),
13888
        ('CumulatedSessionCount', 'UInt32'),
13889
        ('SecurityRejectedSessionCount', 'UInt32'),
13890
        ('RejectedSessionCount', 'UInt32'),
13891
        ('SessionTimeoutCount', 'UInt32'),
13892 1
        ('SessionAbortCount', 'UInt32'),
13893
        ('CurrentSubscriptionCount', 'UInt32'),
13894
        ('CumulatedSubscriptionCount', 'UInt32'),
13895
        ('PublishingIntervalCount', 'UInt32'),
13896
        ('SecurityRejectedRequestsCount', 'UInt32'),
13897 1
        ('RejectedRequestsCount', 'UInt32'),
13898
               ]
13899
13900 1
    def __init__(self):
13901
        self.ServerViewCount = 0
13902
        self.CurrentSessionCount = 0
13903
        self.CumulatedSessionCount = 0
13904
        self.SecurityRejectedSessionCount = 0
13905
        self.RejectedSessionCount = 0
13906
        self.SessionTimeoutCount = 0
13907
        self.SessionAbortCount = 0
13908
        self.CurrentSubscriptionCount = 0
13909
        self.CumulatedSubscriptionCount = 0
13910 1
        self.PublishingIntervalCount = 0
13911
        self.SecurityRejectedRequestsCount = 0
13912
        self.RejectedRequestsCount = 0
13913
        self._freeze = True
13914
13915
    def to_binary(self):
13916 1
        packet = []
13917
        packet.append(uabin.Primitives.UInt32.pack(self.ServerViewCount))
13918
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSessionCount))
13919
        packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSessionCount))
13920
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedSessionCount))
13921
        packet.append(uabin.Primitives.UInt32.pack(self.RejectedSessionCount))
13922
        packet.append(uabin.Primitives.UInt32.pack(self.SessionTimeoutCount))
13923
        packet.append(uabin.Primitives.UInt32.pack(self.SessionAbortCount))
13924
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionCount))
13925
        packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSubscriptionCount))
13926 1
        packet.append(uabin.Primitives.UInt32.pack(self.PublishingIntervalCount))
13927
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedRequestsCount))
13928
        packet.append(uabin.Primitives.UInt32.pack(self.RejectedRequestsCount))
13929
        return b''.join(packet)
13930
13931
    @staticmethod
13932
    def from_binary(data):
13933 1
        obj = ServerDiagnosticsSummaryDataType()
13934
        self.ServerViewCount = uabin.Primitives.UInt32.unpack(data)
13935
        self.CurrentSessionCount = uabin.Primitives.UInt32.unpack(data)
13936
        self.CumulatedSessionCount = uabin.Primitives.UInt32.unpack(data)
13937 1
        self.SecurityRejectedSessionCount = uabin.Primitives.UInt32.unpack(data)
13938
        self.RejectedSessionCount = uabin.Primitives.UInt32.unpack(data)
13939
        self.SessionTimeoutCount = uabin.Primitives.UInt32.unpack(data)
13940
        self.SessionAbortCount = uabin.Primitives.UInt32.unpack(data)
13941
        self.CurrentSubscriptionCount = uabin.Primitives.UInt32.unpack(data)
13942 1
        self.CumulatedSubscriptionCount = uabin.Primitives.UInt32.unpack(data)
13943
        self.PublishingIntervalCount = uabin.Primitives.UInt32.unpack(data)
13944
        self.SecurityRejectedRequestsCount = uabin.Primitives.UInt32.unpack(data)
13945
        self.RejectedRequestsCount = uabin.Primitives.UInt32.unpack(data)
13946
        return obj
13947 1
13948
    def __str__(self):
13949
        return 'ServerDiagnosticsSummaryDataType(' + 'ServerViewCount:' + str(self.ServerViewCount) + ', ' + \
13950 1
               'CurrentSessionCount:' + str(self.CurrentSessionCount) + ', ' + \
13951
               'CumulatedSessionCount:' + str(self.CumulatedSessionCount) + ', ' + \
13952
               'SecurityRejectedSessionCount:' + str(self.SecurityRejectedSessionCount) + ', ' + \
13953
               'RejectedSessionCount:' + str(self.RejectedSessionCount) + ', ' + \
13954
               'SessionTimeoutCount:' + str(self.SessionTimeoutCount) + ', ' + \
13955
               'SessionAbortCount:' + str(self.SessionAbortCount) + ', ' + \
13956
               'CurrentSubscriptionCount:' + str(self.CurrentSubscriptionCount) + ', ' + \
13957
               'CumulatedSubscriptionCount:' + str(self.CumulatedSubscriptionCount) + ', ' + \
13958 1
               'PublishingIntervalCount:' + str(self.PublishingIntervalCount) + ', ' + \
13959
               'SecurityRejectedRequestsCount:' + str(self.SecurityRejectedRequestsCount) + ', ' + \
13960
               'RejectedRequestsCount:' + str(self.RejectedRequestsCount) + ')'
13961
13962
    __repr__ = __str__
13963 1
13964
13965 View Code Duplication
class ServerStatusDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
13966
    '''
13967
    :ivar StartTime:
13968
    :vartype StartTime: DateTime
13969
    :ivar CurrentTime:
13970
    :vartype CurrentTime: DateTime
13971
    :ivar State:
13972 1
    :vartype State: ServerState
13973
    :ivar BuildInfo:
13974
    :vartype BuildInfo: BuildInfo
13975
    :ivar SecondsTillShutdown:
13976
    :vartype SecondsTillShutdown: UInt32
13977
    :ivar ShutdownReason:
13978
    :vartype ShutdownReason: LocalizedText
13979
    '''
13980 1
13981
    ua_types = [
13982
13983
        ('StartTime', 'DateTime'),
13984 1
        ('CurrentTime', 'DateTime'),
13985
        ('State', 'ServerState'),
13986
        ('BuildInfo', 'BuildInfo'),
13987
        ('SecondsTillShutdown', 'UInt32'),
13988 1
        ('ShutdownReason', 'LocalizedText'),
13989
               ]
13990
13991
    def __init__(self):
13992 1
        self.StartTime = datetime.utcnow()
13993
        self.CurrentTime = datetime.utcnow()
13994
        self.State = ServerState(0)
13995 1
        self.BuildInfo = BuildInfo()
13996
        self.SecondsTillShutdown = 0
13997
        self.ShutdownReason = LocalizedText()
13998
        self._freeze = True
13999
14000
    def to_binary(self):
14001
        packet = []
14002
        packet.append(uabin.Primitives.DateTime.pack(self.StartTime))
14003 1
        packet.append(uabin.Primitives.DateTime.pack(self.CurrentTime))
14004
        packet.append(uabin.Primitives.UInt32.pack(self.State.value))
14005
        packet.append(self.BuildInfo.to_binary())
14006
        packet.append(uabin.Primitives.UInt32.pack(self.SecondsTillShutdown))
14007
        packet.append(self.ShutdownReason.to_binary())
14008 1
        return b''.join(packet)
14009
14010
    @staticmethod
14011
    def from_binary(data):
14012
        obj = ServerStatusDataType()
14013
        self.StartTime = uabin.Primitives.DateTime.unpack(data)
14014
        self.CurrentTime = uabin.Primitives.DateTime.unpack(data)
14015
        self.State = ServerState(uabin.Primitives.UInt32.unpack(data))
14016
        obj.BuildInfo = BuildInfo.from_binary(data)
14017 1
        self.SecondsTillShutdown = uabin.Primitives.UInt32.unpack(data)
14018
        obj.ShutdownReason = LocalizedText.from_binary(data)
14019
        return obj
14020
14021
    def __str__(self):
14022
        return 'ServerStatusDataType(' + 'StartTime:' + str(self.StartTime) + ', ' + \
14023
               'CurrentTime:' + str(self.CurrentTime) + ', ' + \
14024
               'State:' + str(self.State) + ', ' + \
14025 1
               'BuildInfo:' + str(self.BuildInfo) + ', ' + \
14026
               'SecondsTillShutdown:' + str(self.SecondsTillShutdown) + ', ' + \
14027
               'ShutdownReason:' + str(self.ShutdownReason) + ')'
14028
14029 1
    __repr__ = __str__
14030
14031
14032
class SessionDiagnosticsDataType(FrozenClass):
14033 1
    '''
14034
    :ivar SessionId:
14035
    :vartype SessionId: NodeId
14036
    :ivar SessionName:
14037 1
    :vartype SessionName: String
14038
    :ivar ClientDescription:
14039
    :vartype ClientDescription: ApplicationDescription
14040 1
    :ivar ServerUri:
14041
    :vartype ServerUri: String
14042
    :ivar EndpointUrl:
14043
    :vartype EndpointUrl: String
14044
    :ivar LocaleIds:
14045
    :vartype LocaleIds: String
14046
    :ivar ActualSessionTimeout:
14047
    :vartype ActualSessionTimeout: Double
14048
    :ivar MaxResponseMessageSize:
14049
    :vartype MaxResponseMessageSize: UInt32
14050 1
    :ivar ClientConnectionTime:
14051
    :vartype ClientConnectionTime: DateTime
14052
    :ivar ClientLastContactTime:
14053
    :vartype ClientLastContactTime: DateTime
14054
    :ivar CurrentSubscriptionsCount:
14055
    :vartype CurrentSubscriptionsCount: UInt32
14056 1
    :ivar CurrentMonitoredItemsCount:
14057
    :vartype CurrentMonitoredItemsCount: UInt32
14058
    :ivar CurrentPublishRequestsInQueue:
14059
    :vartype CurrentPublishRequestsInQueue: UInt32
14060
    :ivar TotalRequestCount:
14061
    :vartype TotalRequestCount: ServiceCounterDataType
14062
    :ivar UnauthorizedRequestCount:
14063
    :vartype UnauthorizedRequestCount: UInt32
14064
    :ivar ReadCount:
14065
    :vartype ReadCount: ServiceCounterDataType
14066 1
    :ivar HistoryReadCount:
14067
    :vartype HistoryReadCount: ServiceCounterDataType
14068
    :ivar WriteCount:
14069
    :vartype WriteCount: ServiceCounterDataType
14070
    :ivar HistoryUpdateCount:
14071
    :vartype HistoryUpdateCount: ServiceCounterDataType
14072
    :ivar CallCount:
14073 1
    :vartype CallCount: ServiceCounterDataType
14074
    :ivar CreateMonitoredItemsCount:
14075
    :vartype CreateMonitoredItemsCount: ServiceCounterDataType
14076
    :ivar ModifyMonitoredItemsCount:
14077 1
    :vartype ModifyMonitoredItemsCount: ServiceCounterDataType
14078
    :ivar SetMonitoringModeCount:
14079
    :vartype SetMonitoringModeCount: ServiceCounterDataType
14080
    :ivar SetTriggeringCount:
14081
    :vartype SetTriggeringCount: ServiceCounterDataType
14082 1
    :ivar DeleteMonitoredItemsCount:
14083
    :vartype DeleteMonitoredItemsCount: ServiceCounterDataType
14084
    :ivar CreateSubscriptionCount:
14085
    :vartype CreateSubscriptionCount: ServiceCounterDataType
14086
    :ivar ModifySubscriptionCount:
14087 1
    :vartype ModifySubscriptionCount: ServiceCounterDataType
14088
    :ivar SetPublishingModeCount:
14089
    :vartype SetPublishingModeCount: ServiceCounterDataType
14090 1
    :ivar PublishCount:
14091
    :vartype PublishCount: ServiceCounterDataType
14092
    :ivar RepublishCount:
14093
    :vartype RepublishCount: ServiceCounterDataType
14094
    :ivar TransferSubscriptionsCount:
14095
    :vartype TransferSubscriptionsCount: ServiceCounterDataType
14096
    :ivar DeleteSubscriptionsCount:
14097
    :vartype DeleteSubscriptionsCount: ServiceCounterDataType
14098 1
    :ivar AddNodesCount:
14099
    :vartype AddNodesCount: ServiceCounterDataType
14100
    :ivar AddReferencesCount:
14101
    :vartype AddReferencesCount: ServiceCounterDataType
14102
    :ivar DeleteNodesCount:
14103 1
    :vartype DeleteNodesCount: ServiceCounterDataType
14104
    :ivar DeleteReferencesCount:
14105
    :vartype DeleteReferencesCount: ServiceCounterDataType
14106
    :ivar BrowseCount:
14107
    :vartype BrowseCount: ServiceCounterDataType
14108
    :ivar BrowseNextCount:
14109
    :vartype BrowseNextCount: ServiceCounterDataType
14110
    :ivar TranslateBrowsePathsToNodeIdsCount:
14111
    :vartype TranslateBrowsePathsToNodeIdsCount: ServiceCounterDataType
14112 1
    :ivar QueryFirstCount:
14113
    :vartype QueryFirstCount: ServiceCounterDataType
14114
    :ivar QueryNextCount:
14115
    :vartype QueryNextCount: ServiceCounterDataType
14116
    :ivar RegisterNodesCount:
14117
    :vartype RegisterNodesCount: ServiceCounterDataType
14118
    :ivar UnregisterNodesCount:
14119
    :vartype UnregisterNodesCount: ServiceCounterDataType
14120
    '''
14121
14122 1
    ua_types = [
14123
14124
        ('SessionId', 'NodeId'),
14125
        ('SessionName', 'String'),
14126 1
        ('ClientDescription', 'ApplicationDescription'),
14127
        ('ServerUri', 'String'),
14128
        ('EndpointUrl', 'String'),
14129
        ('LocaleIds', 'ListOfString'),
14130
        ('ActualSessionTimeout', 'Double'),
14131
        ('MaxResponseMessageSize', 'UInt32'),
14132
        ('ClientConnectionTime', 'DateTime'),
14133
        ('ClientLastContactTime', 'DateTime'),
14134
        ('CurrentSubscriptionsCount', 'UInt32'),
14135
        ('CurrentMonitoredItemsCount', 'UInt32'),
14136
        ('CurrentPublishRequestsInQueue', 'UInt32'),
14137
        ('TotalRequestCount', 'ServiceCounterDataType'),
14138
        ('UnauthorizedRequestCount', 'UInt32'),
14139
        ('ReadCount', 'ServiceCounterDataType'),
14140 1
        ('HistoryReadCount', 'ServiceCounterDataType'),
14141
        ('WriteCount', 'ServiceCounterDataType'),
14142
        ('HistoryUpdateCount', 'ServiceCounterDataType'),
14143
        ('CallCount', 'ServiceCounterDataType'),
14144 1
        ('CreateMonitoredItemsCount', 'ServiceCounterDataType'),
14145
        ('ModifyMonitoredItemsCount', 'ServiceCounterDataType'),
14146
        ('SetMonitoringModeCount', 'ServiceCounterDataType'),
14147 1
        ('SetTriggeringCount', 'ServiceCounterDataType'),
14148
        ('DeleteMonitoredItemsCount', 'ServiceCounterDataType'),
14149
        ('CreateSubscriptionCount', 'ServiceCounterDataType'),
14150
        ('ModifySubscriptionCount', 'ServiceCounterDataType'),
14151
        ('SetPublishingModeCount', 'ServiceCounterDataType'),
14152
        ('PublishCount', 'ServiceCounterDataType'),
14153
        ('RepublishCount', 'ServiceCounterDataType'),
14154
        ('TransferSubscriptionsCount', 'ServiceCounterDataType'),
14155
        ('DeleteSubscriptionsCount', 'ServiceCounterDataType'),
14156
        ('AddNodesCount', 'ServiceCounterDataType'),
14157 1
        ('AddReferencesCount', 'ServiceCounterDataType'),
14158
        ('DeleteNodesCount', 'ServiceCounterDataType'),
14159
        ('DeleteReferencesCount', 'ServiceCounterDataType'),
14160
        ('BrowseCount', 'ServiceCounterDataType'),
14161
        ('BrowseNextCount', 'ServiceCounterDataType'),
14162
        ('TranslateBrowsePathsToNodeIdsCount', 'ServiceCounterDataType'),
14163 1
        ('QueryFirstCount', 'ServiceCounterDataType'),
14164
        ('QueryNextCount', 'ServiceCounterDataType'),
14165
        ('RegisterNodesCount', 'ServiceCounterDataType'),
14166
        ('UnregisterNodesCount', 'ServiceCounterDataType'),
14167
               ]
14168
14169
    def __init__(self):
14170
        self.SessionId = NodeId()
14171
        self.SessionName = None
14172
        self.ClientDescription = ApplicationDescription()
14173 1
        self.ServerUri = None
14174
        self.EndpointUrl = None
14175
        self.LocaleIds = []
14176
        self.ActualSessionTimeout = 0
14177
        self.MaxResponseMessageSize = 0
14178
        self.ClientConnectionTime = datetime.utcnow()
14179
        self.ClientLastContactTime = datetime.utcnow()
14180 1
        self.CurrentSubscriptionsCount = 0
14181
        self.CurrentMonitoredItemsCount = 0
14182
        self.CurrentPublishRequestsInQueue = 0
14183
        self.TotalRequestCount = ServiceCounterDataType()
14184 1
        self.UnauthorizedRequestCount = 0
14185
        self.ReadCount = ServiceCounterDataType()
14186
        self.HistoryReadCount = ServiceCounterDataType()
14187
        self.WriteCount = ServiceCounterDataType()
14188
        self.HistoryUpdateCount = ServiceCounterDataType()
14189 1
        self.CallCount = ServiceCounterDataType()
14190
        self.CreateMonitoredItemsCount = ServiceCounterDataType()
14191
        self.ModifyMonitoredItemsCount = ServiceCounterDataType()
14192
        self.SetMonitoringModeCount = ServiceCounterDataType()
14193
        self.SetTriggeringCount = ServiceCounterDataType()
14194 1
        self.DeleteMonitoredItemsCount = ServiceCounterDataType()
14195
        self.CreateSubscriptionCount = ServiceCounterDataType()
14196
        self.ModifySubscriptionCount = ServiceCounterDataType()
14197 1
        self.SetPublishingModeCount = ServiceCounterDataType()
14198
        self.PublishCount = ServiceCounterDataType()
14199
        self.RepublishCount = ServiceCounterDataType()
14200
        self.TransferSubscriptionsCount = ServiceCounterDataType()
14201
        self.DeleteSubscriptionsCount = ServiceCounterDataType()
14202
        self.AddNodesCount = ServiceCounterDataType()
14203 1
        self.AddReferencesCount = ServiceCounterDataType()
14204
        self.DeleteNodesCount = ServiceCounterDataType()
14205
        self.DeleteReferencesCount = ServiceCounterDataType()
14206
        self.BrowseCount = ServiceCounterDataType()
14207 1
        self.BrowseNextCount = ServiceCounterDataType()
14208 1
        self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType()
14209 1
        self.QueryFirstCount = ServiceCounterDataType()
14210 1
        self.QueryNextCount = ServiceCounterDataType()
14211 1
        self.RegisterNodesCount = ServiceCounterDataType()
14212 1
        self.UnregisterNodesCount = ServiceCounterDataType()
14213 1
        self._freeze = True
14214
14215 1
    def to_binary(self):
14216 1
        packet = []
14217 1
        packet.append(self.SessionId.to_binary())
14218 1
        packet.append(uabin.Primitives.String.pack(self.SessionName))
14219 1
        packet.append(self.ClientDescription.to_binary())
14220 1
        packet.append(uabin.Primitives.String.pack(self.ServerUri))
14221
        packet.append(uabin.Primitives.String.pack(self.EndpointUrl))
14222 1
        packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds)))
14223
        for fieldname in self.LocaleIds:
14224 1
            packet.append(uabin.Primitives.String.pack(fieldname))
14225
        packet.append(uabin.Primitives.Double.pack(self.ActualSessionTimeout))
14226 1
        packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize))
14227 1
        packet.append(uabin.Primitives.DateTime.pack(self.ClientConnectionTime))
14228
        packet.append(uabin.Primitives.DateTime.pack(self.ClientLastContactTime))
14229 1
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionsCount))
14230
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentMonitoredItemsCount))
14231
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentPublishRequestsInQueue))
14232 1
        packet.append(self.TotalRequestCount.to_binary())
14233
        packet.append(uabin.Primitives.UInt32.pack(self.UnauthorizedRequestCount))
14234
        packet.append(self.ReadCount.to_binary())
14235 1
        packet.append(self.HistoryReadCount.to_binary())
14236
        packet.append(self.WriteCount.to_binary())
14237
        packet.append(self.HistoryUpdateCount.to_binary())
14238
        packet.append(self.CallCount.to_binary())
14239
        packet.append(self.CreateMonitoredItemsCount.to_binary())
14240
        packet.append(self.ModifyMonitoredItemsCount.to_binary())
14241
        packet.append(self.SetMonitoringModeCount.to_binary())
14242
        packet.append(self.SetTriggeringCount.to_binary())
14243
        packet.append(self.DeleteMonitoredItemsCount.to_binary())
14244
        packet.append(self.CreateSubscriptionCount.to_binary())
14245 1
        packet.append(self.ModifySubscriptionCount.to_binary())
14246
        packet.append(self.SetPublishingModeCount.to_binary())
14247
        packet.append(self.PublishCount.to_binary())
14248
        packet.append(self.RepublishCount.to_binary())
14249
        packet.append(self.TransferSubscriptionsCount.to_binary())
14250
        packet.append(self.DeleteSubscriptionsCount.to_binary())
14251 1
        packet.append(self.AddNodesCount.to_binary())
14252 1
        packet.append(self.AddReferencesCount.to_binary())
14253
        packet.append(self.DeleteNodesCount.to_binary())
14254
        packet.append(self.DeleteReferencesCount.to_binary())
14255
        packet.append(self.BrowseCount.to_binary())
14256 1
        packet.append(self.BrowseNextCount.to_binary())
14257 1
        packet.append(self.TranslateBrowsePathsToNodeIdsCount.to_binary())
14258 1
        packet.append(self.QueryFirstCount.to_binary())
14259 1
        packet.append(self.QueryNextCount.to_binary())
14260
        packet.append(self.RegisterNodesCount.to_binary())
14261 1
        packet.append(self.UnregisterNodesCount.to_binary())
14262 1
        return b''.join(packet)
14263 1
14264 1
    @staticmethod
14265 1
    def from_binary(data):
14266 1
        obj = SessionDiagnosticsDataType()
14267
        obj.SessionId = NodeId.from_binary(data)
14268 1
        self.SessionName = uabin.Primitives.String.unpack(data)
14269
        obj.ClientDescription = ApplicationDescription.from_binary(data)
14270
        self.ServerUri = uabin.Primitives.String.unpack(data)
14271
        self.EndpointUrl = uabin.Primitives.String.unpack(data)
14272 1
        obj.LocaleIds = uabin.Primitives.String.unpack_array(data)
14273
        self.ActualSessionTimeout = uabin.Primitives.Double.unpack(data)
14274
        self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data)
14275
        self.ClientConnectionTime = uabin.Primitives.DateTime.unpack(data)
14276
        self.ClientLastContactTime = uabin.Primitives.DateTime.unpack(data)
14277 1
        self.CurrentSubscriptionsCount = uabin.Primitives.UInt32.unpack(data)
14278
        self.CurrentMonitoredItemsCount = uabin.Primitives.UInt32.unpack(data)
14279
        self.CurrentPublishRequestsInQueue = uabin.Primitives.UInt32.unpack(data)
14280
        obj.TotalRequestCount = ServiceCounterDataType.from_binary(data)
14281
        self.UnauthorizedRequestCount = uabin.Primitives.UInt32.unpack(data)
14282 1
        obj.ReadCount = ServiceCounterDataType.from_binary(data)
14283
        obj.HistoryReadCount = ServiceCounterDataType.from_binary(data)
14284
        obj.WriteCount = ServiceCounterDataType.from_binary(data)
14285 1
        obj.HistoryUpdateCount = ServiceCounterDataType.from_binary(data)
14286
        obj.CallCount = ServiceCounterDataType.from_binary(data)
14287
        obj.CreateMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
14288
        obj.ModifyMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
14289
        obj.SetMonitoringModeCount = ServiceCounterDataType.from_binary(data)
14290
        obj.SetTriggeringCount = ServiceCounterDataType.from_binary(data)
14291
        obj.DeleteMonitoredItemsCount = ServiceCounterDataType.from_binary(data)
14292
        obj.CreateSubscriptionCount = ServiceCounterDataType.from_binary(data)
14293
        obj.ModifySubscriptionCount = ServiceCounterDataType.from_binary(data)
14294
        obj.SetPublishingModeCount = ServiceCounterDataType.from_binary(data)
14295
        obj.PublishCount = ServiceCounterDataType.from_binary(data)
14296
        obj.RepublishCount = ServiceCounterDataType.from_binary(data)
14297 1
        obj.TransferSubscriptionsCount = ServiceCounterDataType.from_binary(data)
14298
        obj.DeleteSubscriptionsCount = ServiceCounterDataType.from_binary(data)
14299
        obj.AddNodesCount = ServiceCounterDataType.from_binary(data)
14300
        obj.AddReferencesCount = ServiceCounterDataType.from_binary(data)
14301
        obj.DeleteNodesCount = ServiceCounterDataType.from_binary(data)
14302
        obj.DeleteReferencesCount = ServiceCounterDataType.from_binary(data)
14303
        obj.BrowseCount = ServiceCounterDataType.from_binary(data)
14304 1
        obj.BrowseNextCount = ServiceCounterDataType.from_binary(data)
14305 1
        obj.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType.from_binary(data)
14306 1
        obj.QueryFirstCount = ServiceCounterDataType.from_binary(data)
14307 1
        obj.QueryNextCount = ServiceCounterDataType.from_binary(data)
14308 1
        obj.RegisterNodesCount = ServiceCounterDataType.from_binary(data)
14309 1
        obj.UnregisterNodesCount = ServiceCounterDataType.from_binary(data)
14310 1
        return obj
14311 1
14312 1
    def __str__(self):
14313 1
        return 'SessionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
14314
               'SessionName:' + str(self.SessionName) + ', ' + \
14315 1
               'ClientDescription:' + str(self.ClientDescription) + ', ' + \
14316 1
               'ServerUri:' + str(self.ServerUri) + ', ' + \
14317 1
               'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \
14318 1
               'LocaleIds:' + str(self.LocaleIds) + ', ' + \
14319 1
               'ActualSessionTimeout:' + str(self.ActualSessionTimeout) + ', ' + \
14320 1
               'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ', ' + \
14321 1
               'ClientConnectionTime:' + str(self.ClientConnectionTime) + ', ' + \
14322 1
               'ClientLastContactTime:' + str(self.ClientLastContactTime) + ', ' + \
14323 1
               'CurrentSubscriptionsCount:' + str(self.CurrentSubscriptionsCount) + ', ' + \
14324
               'CurrentMonitoredItemsCount:' + str(self.CurrentMonitoredItemsCount) + ', ' + \
14325 1
               'CurrentPublishRequestsInQueue:' + str(self.CurrentPublishRequestsInQueue) + ', ' + \
14326
               'TotalRequestCount:' + str(self.TotalRequestCount) + ', ' + \
14327 1
               'UnauthorizedRequestCount:' + str(self.UnauthorizedRequestCount) + ', ' + \
14328
               'ReadCount:' + str(self.ReadCount) + ', ' + \
14329 1
               'HistoryReadCount:' + str(self.HistoryReadCount) + ', ' + \
14330
               'WriteCount:' + str(self.WriteCount) + ', ' + \
14331 1
               'HistoryUpdateCount:' + str(self.HistoryUpdateCount) + ', ' + \
14332 1
               'CallCount:' + str(self.CallCount) + ', ' + \
14333 1
               'CreateMonitoredItemsCount:' + str(self.CreateMonitoredItemsCount) + ', ' + \
14334 1
               'ModifyMonitoredItemsCount:' + str(self.ModifyMonitoredItemsCount) + ', ' + \
14335 1
               'SetMonitoringModeCount:' + str(self.SetMonitoringModeCount) + ', ' + \
14336 1
               'SetTriggeringCount:' + str(self.SetTriggeringCount) + ', ' + \
14337 1
               'DeleteMonitoredItemsCount:' + str(self.DeleteMonitoredItemsCount) + ', ' + \
14338 1
               'CreateSubscriptionCount:' + str(self.CreateSubscriptionCount) + ', ' + \
14339 1
               'ModifySubscriptionCount:' + str(self.ModifySubscriptionCount) + ', ' + \
14340 1
               'SetPublishingModeCount:' + str(self.SetPublishingModeCount) + ', ' + \
14341 1
               'PublishCount:' + str(self.PublishCount) + ', ' + \
14342 1
               'RepublishCount:' + str(self.RepublishCount) + ', ' + \
14343 1
               'TransferSubscriptionsCount:' + str(self.TransferSubscriptionsCount) + ', ' + \
14344
               'DeleteSubscriptionsCount:' + str(self.DeleteSubscriptionsCount) + ', ' + \
14345 1
               'AddNodesCount:' + str(self.AddNodesCount) + ', ' + \
14346
               'AddReferencesCount:' + str(self.AddReferencesCount) + ', ' + \
14347 1
               'DeleteNodesCount:' + str(self.DeleteNodesCount) + ', ' + \
14348
               'DeleteReferencesCount:' + str(self.DeleteReferencesCount) + ', ' + \
14349
               'BrowseCount:' + str(self.BrowseCount) + ', ' + \
14350
               'BrowseNextCount:' + str(self.BrowseNextCount) + ', ' + \
14351
               'TranslateBrowsePathsToNodeIdsCount:' + str(self.TranslateBrowsePathsToNodeIdsCount) + ', ' + \
14352
               'QueryFirstCount:' + str(self.QueryFirstCount) + ', ' + \
14353 1
               'QueryNextCount:' + str(self.QueryNextCount) + ', ' + \
14354
               'RegisterNodesCount:' + str(self.RegisterNodesCount) + ', ' + \
14355
               'UnregisterNodesCount:' + str(self.UnregisterNodesCount) + ')'
14356 1
14357
    __repr__ = __str__
14358
14359
14360
class SessionSecurityDiagnosticsDataType(FrozenClass):
14361
    '''
14362
    :ivar SessionId:
14363
    :vartype SessionId: NodeId
14364
    :ivar ClientUserIdOfSession:
14365
    :vartype ClientUserIdOfSession: String
14366
    :ivar ClientUserIdHistory:
14367
    :vartype ClientUserIdHistory: String
14368
    :ivar AuthenticationMechanism:
14369
    :vartype AuthenticationMechanism: String
14370
    :ivar Encoding:
14371
    :vartype Encoding: String
14372 1
    :ivar TransportProtocol:
14373
    :vartype TransportProtocol: String
14374
    :ivar SecurityMode:
14375
    :vartype SecurityMode: MessageSecurityMode
14376
    :ivar SecurityPolicyUri:
14377
    :vartype SecurityPolicyUri: String
14378
    :ivar ClientCertificate:
14379
    :vartype ClientCertificate: ByteString
14380
    '''
14381 1
14382
    ua_types = [
14383
14384
        ('SessionId', 'NodeId'),
14385
        ('ClientUserIdOfSession', 'String'),
14386
        ('ClientUserIdHistory', 'ListOfString'),
14387
        ('AuthenticationMechanism', 'String'),
14388
        ('Encoding', 'String'),
14389
        ('TransportProtocol', 'String'),
14390
        ('SecurityMode', 'MessageSecurityMode'),
14391
        ('SecurityPolicyUri', 'String'),
14392
        ('ClientCertificate', 'ByteString'),
14393
               ]
14394 1
14395
    def __init__(self):
14396
        self.SessionId = NodeId()
14397
        self.ClientUserIdOfSession = None
14398
        self.ClientUserIdHistory = []
14399
        self.AuthenticationMechanism = None
14400
        self.Encoding = None
14401
        self.TransportProtocol = None
14402
        self.SecurityMode = MessageSecurityMode(0)
14403
        self.SecurityPolicyUri = None
14404 1
        self.ClientCertificate = None
14405
        self._freeze = True
14406
14407 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...
14408 1
        packet = []
14409
        packet.append(self.SessionId.to_binary())
14410
        packet.append(uabin.Primitives.String.pack(self.ClientUserIdOfSession))
14411
        packet.append(uabin.Primitives.Int32.pack(len(self.ClientUserIdHistory)))
14412
        for fieldname in self.ClientUserIdHistory:
14413
            packet.append(uabin.Primitives.String.pack(fieldname))
14414
        packet.append(uabin.Primitives.String.pack(self.AuthenticationMechanism))
14415
        packet.append(uabin.Primitives.String.pack(self.Encoding))
14416 1
        packet.append(uabin.Primitives.String.pack(self.TransportProtocol))
14417
        packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value))
14418
        packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri))
14419
        packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate))
14420
        return b''.join(packet)
14421
14422
    @staticmethod
14423
    def from_binary(data):
14424 1
        obj = SessionSecurityDiagnosticsDataType()
14425
        obj.SessionId = NodeId.from_binary(data)
14426
        self.ClientUserIdOfSession = uabin.Primitives.String.unpack(data)
14427 1
        obj.ClientUserIdHistory = uabin.Primitives.String.unpack_array(data)
14428
        self.AuthenticationMechanism = uabin.Primitives.String.unpack(data)
14429
        self.Encoding = uabin.Primitives.String.unpack(data)
14430
        self.TransportProtocol = uabin.Primitives.String.unpack(data)
14431
        self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data))
14432
        self.SecurityPolicyUri = uabin.Primitives.String.unpack(data)
14433
        self.ClientCertificate = uabin.Primitives.ByteString.unpack(data)
14434
        return obj
14435
14436
    def __str__(self):
14437 1
        return 'SessionSecurityDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
14438
               'ClientUserIdOfSession:' + str(self.ClientUserIdOfSession) + ', ' + \
14439
               'ClientUserIdHistory:' + str(self.ClientUserIdHistory) + ', ' + \
14440
               'AuthenticationMechanism:' + str(self.AuthenticationMechanism) + ', ' + \
14441
               'Encoding:' + str(self.Encoding) + ', ' + \
14442
               'TransportProtocol:' + str(self.TransportProtocol) + ', ' + \
14443 1
               'SecurityMode:' + str(self.SecurityMode) + ', ' + \
14444
               'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \
14445
               'ClientCertificate:' + str(self.ClientCertificate) + ')'
14446
14447
    __repr__ = __str__
14448
14449
14450 View Code Duplication
class ServiceCounterDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14451
    '''
14452
    :ivar TotalCount:
14453 1
    :vartype TotalCount: UInt32
14454
    :ivar ErrorCount:
14455
    :vartype ErrorCount: UInt32
14456
    '''
14457
14458
    ua_types = [
14459
14460 1
        ('TotalCount', 'UInt32'),
14461
        ('ErrorCount', 'UInt32'),
14462
               ]
14463
14464 1
    def __init__(self):
14465
        self.TotalCount = 0
14466
        self.ErrorCount = 0
14467
        self._freeze = True
14468
14469 1
    def to_binary(self):
14470
        packet = []
14471
        packet.append(uabin.Primitives.UInt32.pack(self.TotalCount))
14472
        packet.append(uabin.Primitives.UInt32.pack(self.ErrorCount))
14473
        return b''.join(packet)
14474 1
14475
    @staticmethod
14476
    def from_binary(data):
14477 1
        obj = ServiceCounterDataType()
14478
        self.TotalCount = uabin.Primitives.UInt32.unpack(data)
14479
        self.ErrorCount = uabin.Primitives.UInt32.unpack(data)
14480
        return obj
14481
14482
    def __str__(self):
14483 1
        return 'ServiceCounterDataType(' + 'TotalCount:' + str(self.TotalCount) + ', ' + \
14484
               'ErrorCount:' + str(self.ErrorCount) + ')'
14485
14486
    __repr__ = __str__
14487 1
14488
14489 View Code Duplication
class StatusResult(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14490
    '''
14491
    :ivar StatusCode:
14492
    :vartype StatusCode: StatusCode
14493
    :ivar DiagnosticInfo:
14494
    :vartype DiagnosticInfo: DiagnosticInfo
14495 1
    '''
14496
14497
    ua_types = [
14498
14499
        ('StatusCode', 'StatusCode'),
14500
        ('DiagnosticInfo', 'DiagnosticInfo'),
14501
               ]
14502 1
14503
    def __init__(self):
14504
        self.StatusCode = StatusCode()
14505
        self.DiagnosticInfo = DiagnosticInfo()
14506 1
        self._freeze = True
14507
14508
    def to_binary(self):
14509 1
        packet = []
14510
        packet.append(self.StatusCode.to_binary())
14511
        packet.append(self.DiagnosticInfo.to_binary())
14512 1
        return b''.join(packet)
14513
14514
    @staticmethod
14515 1
    def from_binary(data):
14516
        obj = StatusResult()
14517
        obj.StatusCode = StatusCode.from_binary(data)
14518
        obj.DiagnosticInfo = DiagnosticInfo.from_binary(data)
14519
        return obj
14520
14521
    def __str__(self):
14522
        return 'StatusResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
14523 1
               'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')'
14524
14525
    __repr__ = __str__
14526
14527
14528 1
class SubscriptionDiagnosticsDataType(FrozenClass):
14529
    '''
14530
    :ivar SessionId:
14531
    :vartype SessionId: NodeId
14532
    :ivar SubscriptionId:
14533
    :vartype SubscriptionId: UInt32
14534
    :ivar Priority:
14535
    :vartype Priority: Byte
14536
    :ivar PublishingInterval:
14537 1
    :vartype PublishingInterval: Double
14538
    :ivar MaxKeepAliveCount:
14539
    :vartype MaxKeepAliveCount: UInt32
14540
    :ivar MaxLifetimeCount:
14541
    :vartype MaxLifetimeCount: UInt32
14542
    :ivar MaxNotificationsPerPublish:
14543
    :vartype MaxNotificationsPerPublish: UInt32
14544
    :ivar PublishingEnabled:
14545 1
    :vartype PublishingEnabled: Boolean
14546
    :ivar ModifyCount:
14547
    :vartype ModifyCount: UInt32
14548
    :ivar EnableCount:
14549 1
    :vartype EnableCount: UInt32
14550
    :ivar DisableCount:
14551
    :vartype DisableCount: UInt32
14552
    :ivar RepublishRequestCount:
14553
    :vartype RepublishRequestCount: UInt32
14554
    :ivar RepublishMessageRequestCount:
14555
    :vartype RepublishMessageRequestCount: UInt32
14556
    :ivar RepublishMessageCount:
14557
    :vartype RepublishMessageCount: UInt32
14558 1
    :ivar TransferRequestCount:
14559
    :vartype TransferRequestCount: UInt32
14560
    :ivar TransferredToAltClientCount:
14561
    :vartype TransferredToAltClientCount: UInt32
14562 1
    :ivar TransferredToSameClientCount:
14563
    :vartype TransferredToSameClientCount: UInt32
14564
    :ivar PublishRequestCount:
14565 1
    :vartype PublishRequestCount: UInt32
14566
    :ivar DataChangeNotificationsCount:
14567
    :vartype DataChangeNotificationsCount: UInt32
14568
    :ivar EventNotificationsCount:
14569
    :vartype EventNotificationsCount: UInt32
14570
    :ivar NotificationsCount:
14571
    :vartype NotificationsCount: UInt32
14572
    :ivar LatePublishRequestCount:
14573
    :vartype LatePublishRequestCount: UInt32
14574
    :ivar CurrentKeepAliveCount:
14575
    :vartype CurrentKeepAliveCount: UInt32
14576
    :ivar CurrentLifetimeCount:
14577 1
    :vartype CurrentLifetimeCount: UInt32
14578
    :ivar UnacknowledgedMessageCount:
14579
    :vartype UnacknowledgedMessageCount: UInt32
14580
    :ivar DiscardedMessageCount:
14581
    :vartype DiscardedMessageCount: UInt32
14582
    :ivar MonitoredItemCount:
14583
    :vartype MonitoredItemCount: UInt32
14584 1
    :ivar DisabledMonitoredItemCount:
14585
    :vartype DisabledMonitoredItemCount: UInt32
14586
    :ivar MonitoringQueueOverflowCount:
14587
    :vartype MonitoringQueueOverflowCount: UInt32
14588
    :ivar NextSequenceNumber:
14589
    :vartype NextSequenceNumber: UInt32
14590
    :ivar EventQueueOverFlowCount:
14591
    :vartype EventQueueOverFlowCount: UInt32
14592
    '''
14593
14594
    ua_types = [
14595 1
14596
        ('SessionId', 'NodeId'),
14597
        ('SubscriptionId', 'UInt32'),
14598
        ('Priority', 'Byte'),
14599
        ('PublishingInterval', 'Double'),
14600
        ('MaxKeepAliveCount', 'UInt32'),
14601
        ('MaxLifetimeCount', 'UInt32'),
14602
        ('MaxNotificationsPerPublish', 'UInt32'),
14603 1
        ('PublishingEnabled', 'Boolean'),
14604
        ('ModifyCount', 'UInt32'),
14605
        ('EnableCount', 'UInt32'),
14606
        ('DisableCount', 'UInt32'),
14607 1
        ('RepublishRequestCount', 'UInt32'),
14608
        ('RepublishMessageRequestCount', 'UInt32'),
14609
        ('RepublishMessageCount', 'UInt32'),
14610
        ('TransferRequestCount', 'UInt32'),
14611
        ('TransferredToAltClientCount', 'UInt32'),
14612
        ('TransferredToSameClientCount', 'UInt32'),
14613 1
        ('PublishRequestCount', 'UInt32'),
14614
        ('DataChangeNotificationsCount', 'UInt32'),
14615
        ('EventNotificationsCount', 'UInt32'),
14616
        ('NotificationsCount', 'UInt32'),
14617
        ('LatePublishRequestCount', 'UInt32'),
14618
        ('CurrentKeepAliveCount', 'UInt32'),
14619 1
        ('CurrentLifetimeCount', 'UInt32'),
14620
        ('UnacknowledgedMessageCount', 'UInt32'),
14621
        ('DiscardedMessageCount', 'UInt32'),
14622 1
        ('MonitoredItemCount', 'UInt32'),
14623
        ('DisabledMonitoredItemCount', 'UInt32'),
14624
        ('MonitoringQueueOverflowCount', 'UInt32'),
14625
        ('NextSequenceNumber', 'UInt32'),
14626
        ('EventQueueOverFlowCount', 'UInt32'),
14627
               ]
14628
14629
    def __init__(self):
14630
        self.SessionId = NodeId()
14631
        self.SubscriptionId = 0
14632
        self.Priority = 0
14633
        self.PublishingInterval = 0
14634
        self.MaxKeepAliveCount = 0
14635
        self.MaxLifetimeCount = 0
14636
        self.MaxNotificationsPerPublish = 0
14637
        self.PublishingEnabled = True
14638
        self.ModifyCount = 0
14639
        self.EnableCount = 0
14640
        self.DisableCount = 0
14641
        self.RepublishRequestCount = 0
14642
        self.RepublishMessageRequestCount = 0
14643
        self.RepublishMessageCount = 0
14644
        self.TransferRequestCount = 0
14645
        self.TransferredToAltClientCount = 0
14646
        self.TransferredToSameClientCount = 0
14647
        self.PublishRequestCount = 0
14648
        self.DataChangeNotificationsCount = 0
14649
        self.EventNotificationsCount = 0
14650 1
        self.NotificationsCount = 0
14651
        self.LatePublishRequestCount = 0
14652
        self.CurrentKeepAliveCount = 0
14653
        self.CurrentLifetimeCount = 0
14654
        self.UnacknowledgedMessageCount = 0
14655
        self.DiscardedMessageCount = 0
14656
        self.MonitoredItemCount = 0
14657
        self.DisabledMonitoredItemCount = 0
14658
        self.MonitoringQueueOverflowCount = 0
14659
        self.NextSequenceNumber = 0
14660
        self.EventQueueOverFlowCount = 0
14661
        self._freeze = True
14662
14663
    def to_binary(self):
14664
        packet = []
14665 1
        packet.append(self.SessionId.to_binary())
14666
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
14667
        packet.append(uabin.Primitives.Byte.pack(self.Priority))
14668
        packet.append(uabin.Primitives.Double.pack(self.PublishingInterval))
14669
        packet.append(uabin.Primitives.UInt32.pack(self.MaxKeepAliveCount))
14670
        packet.append(uabin.Primitives.UInt32.pack(self.MaxLifetimeCount))
14671
        packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish))
14672
        packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled))
14673
        packet.append(uabin.Primitives.UInt32.pack(self.ModifyCount))
14674
        packet.append(uabin.Primitives.UInt32.pack(self.EnableCount))
14675
        packet.append(uabin.Primitives.UInt32.pack(self.DisableCount))
14676
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishRequestCount))
14677
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageRequestCount))
14678
        packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageCount))
14679
        packet.append(uabin.Primitives.UInt32.pack(self.TransferRequestCount))
14680
        packet.append(uabin.Primitives.UInt32.pack(self.TransferredToAltClientCount))
14681
        packet.append(uabin.Primitives.UInt32.pack(self.TransferredToSameClientCount))
14682
        packet.append(uabin.Primitives.UInt32.pack(self.PublishRequestCount))
14683
        packet.append(uabin.Primitives.UInt32.pack(self.DataChangeNotificationsCount))
14684 1
        packet.append(uabin.Primitives.UInt32.pack(self.EventNotificationsCount))
14685
        packet.append(uabin.Primitives.UInt32.pack(self.NotificationsCount))
14686
        packet.append(uabin.Primitives.UInt32.pack(self.LatePublishRequestCount))
14687
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentKeepAliveCount))
14688
        packet.append(uabin.Primitives.UInt32.pack(self.CurrentLifetimeCount))
14689
        packet.append(uabin.Primitives.UInt32.pack(self.UnacknowledgedMessageCount))
14690
        packet.append(uabin.Primitives.UInt32.pack(self.DiscardedMessageCount))
14691
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount))
14692
        packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount))
14693
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringQueueOverflowCount))
14694
        packet.append(uabin.Primitives.UInt32.pack(self.NextSequenceNumber))
14695
        packet.append(uabin.Primitives.UInt32.pack(self.EventQueueOverFlowCount))
14696
        return b''.join(packet)
14697
14698
    @staticmethod
14699
    def from_binary(data):
14700 1
        obj = SubscriptionDiagnosticsDataType()
14701
        obj.SessionId = NodeId.from_binary(data)
14702
        self.SubscriptionId = uabin.Primitives.UInt32.unpack(data)
14703
        self.Priority = uabin.Primitives.Byte.unpack(data)
14704 1
        self.PublishingInterval = uabin.Primitives.Double.unpack(data)
14705
        self.MaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
14706
        self.MaxLifetimeCount = uabin.Primitives.UInt32.unpack(data)
14707
        self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data)
14708
        self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data)
14709
        self.ModifyCount = uabin.Primitives.UInt32.unpack(data)
14710
        self.EnableCount = uabin.Primitives.UInt32.unpack(data)
14711
        self.DisableCount = uabin.Primitives.UInt32.unpack(data)
14712
        self.RepublishRequestCount = uabin.Primitives.UInt32.unpack(data)
14713
        self.RepublishMessageRequestCount = uabin.Primitives.UInt32.unpack(data)
14714
        self.RepublishMessageCount = uabin.Primitives.UInt32.unpack(data)
14715
        self.TransferRequestCount = uabin.Primitives.UInt32.unpack(data)
14716
        self.TransferredToAltClientCount = uabin.Primitives.UInt32.unpack(data)
14717
        self.TransferredToSameClientCount = uabin.Primitives.UInt32.unpack(data)
14718 1
        self.PublishRequestCount = uabin.Primitives.UInt32.unpack(data)
14719
        self.DataChangeNotificationsCount = uabin.Primitives.UInt32.unpack(data)
14720
        self.EventNotificationsCount = uabin.Primitives.UInt32.unpack(data)
14721
        self.NotificationsCount = uabin.Primitives.UInt32.unpack(data)
14722
        self.LatePublishRequestCount = uabin.Primitives.UInt32.unpack(data)
14723
        self.CurrentKeepAliveCount = uabin.Primitives.UInt32.unpack(data)
14724
        self.CurrentLifetimeCount = uabin.Primitives.UInt32.unpack(data)
14725
        self.UnacknowledgedMessageCount = uabin.Primitives.UInt32.unpack(data)
14726
        self.DiscardedMessageCount = uabin.Primitives.UInt32.unpack(data)
14727
        self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
14728
        self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data)
14729
        self.MonitoringQueueOverflowCount = uabin.Primitives.UInt32.unpack(data)
14730
        self.NextSequenceNumber = uabin.Primitives.UInt32.unpack(data)
14731
        self.EventQueueOverFlowCount = uabin.Primitives.UInt32.unpack(data)
14732 1
        return obj
14733
14734
    def __str__(self):
14735 1
        return 'SubscriptionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \
14736
               'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
14737
               'Priority:' + str(self.Priority) + ', ' + \
14738
               'PublishingInterval:' + str(self.PublishingInterval) + ', ' + \
14739
               'MaxKeepAliveCount:' + str(self.MaxKeepAliveCount) + ', ' + \
14740
               'MaxLifetimeCount:' + str(self.MaxLifetimeCount) + ', ' + \
14741
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
14742
               'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
14743
               'ModifyCount:' + str(self.ModifyCount) + ', ' + \
14744
               'EnableCount:' + str(self.EnableCount) + ', ' + \
14745
               'DisableCount:' + str(self.DisableCount) + ', ' + \
14746
               'RepublishRequestCount:' + str(self.RepublishRequestCount) + ', ' + \
14747
               'RepublishMessageRequestCount:' + str(self.RepublishMessageRequestCount) + ', ' + \
14748
               'RepublishMessageCount:' + str(self.RepublishMessageCount) + ', ' + \
14749
               'TransferRequestCount:' + str(self.TransferRequestCount) + ', ' + \
14750
               'TransferredToAltClientCount:' + str(self.TransferredToAltClientCount) + ', ' + \
14751 1
               'TransferredToSameClientCount:' + str(self.TransferredToSameClientCount) + ', ' + \
14752
               'PublishRequestCount:' + str(self.PublishRequestCount) + ', ' + \
14753
               'DataChangeNotificationsCount:' + str(self.DataChangeNotificationsCount) + ', ' + \
14754
               'EventNotificationsCount:' + str(self.EventNotificationsCount) + ', ' + \
14755
               'NotificationsCount:' + str(self.NotificationsCount) + ', ' + \
14756
               'LatePublishRequestCount:' + str(self.LatePublishRequestCount) + ', ' + \
14757
               'CurrentKeepAliveCount:' + str(self.CurrentKeepAliveCount) + ', ' + \
14758
               'CurrentLifetimeCount:' + str(self.CurrentLifetimeCount) + ', ' + \
14759
               'UnacknowledgedMessageCount:' + str(self.UnacknowledgedMessageCount) + ', ' + \
14760 1
               'DiscardedMessageCount:' + str(self.DiscardedMessageCount) + ', ' + \
14761
               'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \
14762
               'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ', ' + \
14763
               'MonitoringQueueOverflowCount:' + str(self.MonitoringQueueOverflowCount) + ', ' + \
14764
               'NextSequenceNumber:' + str(self.NextSequenceNumber) + ', ' + \
14765
               'EventQueueOverFlowCount:' + str(self.EventQueueOverFlowCount) + ')'
14766
14767
    __repr__ = __str__
14768
14769
14770 View Code Duplication
class ModelChangeStructureDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14771
    '''
14772
    :ivar Affected:
14773 1
    :vartype Affected: NodeId
14774
    :ivar AffectedType:
14775
    :vartype AffectedType: NodeId
14776
    :ivar Verb:
14777
    :vartype Verb: Byte
14778
    '''
14779
14780
    ua_types = [
14781
14782
        ('Affected', 'NodeId'),
14783 1
        ('AffectedType', 'NodeId'),
14784
        ('Verb', 'Byte'),
14785
               ]
14786
14787 1
    def __init__(self):
14788
        self.Affected = NodeId()
14789
        self.AffectedType = NodeId()
14790
        self.Verb = 0
14791
        self._freeze = True
14792
14793
    def to_binary(self):
14794
        packet = []
14795 1
        packet.append(self.Affected.to_binary())
14796
        packet.append(self.AffectedType.to_binary())
14797
        packet.append(uabin.Primitives.Byte.pack(self.Verb))
14798
        return b''.join(packet)
14799
14800
    @staticmethod
14801
    def from_binary(data):
14802
        obj = ModelChangeStructureDataType()
14803 1
        obj.Affected = NodeId.from_binary(data)
14804
        obj.AffectedType = NodeId.from_binary(data)
14805
        self.Verb = uabin.Primitives.Byte.unpack(data)
14806 1
        return obj
14807
14808
    def __str__(self):
14809
        return 'ModelChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \
14810
               'AffectedType:' + str(self.AffectedType) + ', ' + \
14811
               'Verb:' + str(self.Verb) + ')'
14812
14813
    __repr__ = __str__
14814
14815
14816 View Code Duplication
class SemanticChangeStructureDataType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14817
    '''
14818
    :ivar Affected:
14819
    :vartype Affected: NodeId
14820
    :ivar AffectedType:
14821
    :vartype AffectedType: NodeId
14822
    '''
14823
14824
    ua_types = [
14825
14826
        ('Affected', 'NodeId'),
14827
        ('AffectedType', 'NodeId'),
14828
               ]
14829
14830
    def __init__(self):
14831
        self.Affected = NodeId()
14832
        self.AffectedType = NodeId()
14833
        self._freeze = True
14834
14835
    def to_binary(self):
14836
        packet = []
14837
        packet.append(self.Affected.to_binary())
14838
        packet.append(self.AffectedType.to_binary())
14839
        return b''.join(packet)
14840
14841
    @staticmethod
14842
    def from_binary(data):
14843
        obj = SemanticChangeStructureDataType()
14844
        obj.Affected = NodeId.from_binary(data)
14845
        obj.AffectedType = NodeId.from_binary(data)
14846
        return obj
14847
14848
    def __str__(self):
14849
        return 'SemanticChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \
14850
               'AffectedType:' + str(self.AffectedType) + ')'
14851
14852
    __repr__ = __str__
14853
14854
14855 View Code Duplication
class Range(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14856
    '''
14857
    :ivar Low:
14858
    :vartype Low: Double
14859
    :ivar High:
14860
    :vartype High: Double
14861
    '''
14862
14863
    ua_types = [
14864
14865
        ('Low', 'Double'),
14866
        ('High', 'Double'),
14867
               ]
14868
14869
    def __init__(self):
14870
        self.Low = 0
14871
        self.High = 0
14872
        self._freeze = True
14873
14874
    def to_binary(self):
14875
        packet = []
14876
        packet.append(uabin.Primitives.Double.pack(self.Low))
14877
        packet.append(uabin.Primitives.Double.pack(self.High))
14878
        return b''.join(packet)
14879
14880
    @staticmethod
14881
    def from_binary(data):
14882
        obj = Range()
14883
        self.Low = uabin.Primitives.Double.unpack(data)
14884
        self.High = uabin.Primitives.Double.unpack(data)
14885
        return obj
14886
14887
    def __str__(self):
14888
        return 'Range(' + 'Low:' + str(self.Low) + ', ' + \
14889
               'High:' + str(self.High) + ')'
14890
14891
    __repr__ = __str__
14892
14893
14894 View Code Duplication
class EUInformation(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14895
    '''
14896 1
    :ivar NamespaceUri:
14897
    :vartype NamespaceUri: String
14898
    :ivar UnitId:
14899
    :vartype UnitId: Int32
14900
    :ivar DisplayName:
14901
    :vartype DisplayName: LocalizedText
14902
    :ivar Description:
14903
    :vartype Description: LocalizedText
14904
    '''
14905
14906
    ua_types = [
14907
14908
        ('NamespaceUri', 'String'),
14909
        ('UnitId', 'Int32'),
14910
        ('DisplayName', 'LocalizedText'),
14911
        ('Description', 'LocalizedText'),
14912
               ]
14913
14914
    def __init__(self):
14915
        self.NamespaceUri = None
14916
        self.UnitId = 0
14917
        self.DisplayName = LocalizedText()
14918
        self.Description = LocalizedText()
14919
        self._freeze = True
14920
14921
    def to_binary(self):
14922
        packet = []
14923
        packet.append(uabin.Primitives.String.pack(self.NamespaceUri))
14924
        packet.append(uabin.Primitives.Int32.pack(self.UnitId))
14925
        packet.append(self.DisplayName.to_binary())
14926
        packet.append(self.Description.to_binary())
14927
        return b''.join(packet)
14928
14929
    @staticmethod
14930
    def from_binary(data):
14931
        obj = EUInformation()
14932
        self.NamespaceUri = uabin.Primitives.String.unpack(data)
14933
        self.UnitId = uabin.Primitives.Int32.unpack(data)
14934
        obj.DisplayName = LocalizedText.from_binary(data)
14935
        obj.Description = LocalizedText.from_binary(data)
14936
        return obj
14937
14938
    def __str__(self):
14939
        return 'EUInformation(' + 'NamespaceUri:' + str(self.NamespaceUri) + ', ' + \
14940
               'UnitId:' + str(self.UnitId) + ', ' + \
14941
               'DisplayName:' + str(self.DisplayName) + ', ' + \
14942 1
               'Description:' + str(self.Description) + ')'
14943
14944
    __repr__ = __str__
14945
14946
14947 View Code Duplication
class ComplexNumberType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14948
    '''
14949
    :ivar Real:
14950
    :vartype Real: Float
14951
    :ivar Imaginary:
14952
    :vartype Imaginary: Float
14953
    '''
14954
14955
    ua_types = [
14956
14957
        ('Real', 'Float'),
14958
        ('Imaginary', 'Float'),
14959
               ]
14960
14961
    def __init__(self):
14962
        self.Real = 0
14963
        self.Imaginary = 0
14964
        self._freeze = True
14965
14966
    def to_binary(self):
14967
        packet = []
14968
        packet.append(uabin.Primitives.Float.pack(self.Real))
14969
        packet.append(uabin.Primitives.Float.pack(self.Imaginary))
14970
        return b''.join(packet)
14971
14972
    @staticmethod
14973
    def from_binary(data):
14974
        obj = ComplexNumberType()
14975
        self.Real = uabin.Primitives.Float.unpack(data)
14976
        self.Imaginary = uabin.Primitives.Float.unpack(data)
14977
        return obj
14978
14979
    def __str__(self):
14980
        return 'ComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \
14981
               'Imaginary:' + str(self.Imaginary) + ')'
14982
14983
    __repr__ = __str__
14984
14985
14986 View Code Duplication
class DoubleComplexNumberType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
14987
    '''
14988
    :ivar Real:
14989
    :vartype Real: Double
14990
    :ivar Imaginary:
14991
    :vartype Imaginary: Double
14992 1
    '''
14993
14994
    ua_types = [
14995
14996
        ('Real', 'Double'),
14997
        ('Imaginary', 'Double'),
14998
               ]
14999
15000
    def __init__(self):
15001
        self.Real = 0
15002
        self.Imaginary = 0
15003
        self._freeze = True
15004
15005
    def to_binary(self):
15006
        packet = []
15007
        packet.append(uabin.Primitives.Double.pack(self.Real))
15008
        packet.append(uabin.Primitives.Double.pack(self.Imaginary))
15009
        return b''.join(packet)
15010
15011
    @staticmethod
15012
    def from_binary(data):
15013
        obj = DoubleComplexNumberType()
15014
        self.Real = uabin.Primitives.Double.unpack(data)
15015
        self.Imaginary = uabin.Primitives.Double.unpack(data)
15016
        return obj
15017
15018
    def __str__(self):
15019
        return 'DoubleComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \
15020
               'Imaginary:' + str(self.Imaginary) + ')'
15021
15022
    __repr__ = __str__
15023
15024
15025 View Code Duplication
class AxisInformation(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15026
    '''
15027
    :ivar EngineeringUnits:
15028
    :vartype EngineeringUnits: EUInformation
15029
    :ivar EURange:
15030
    :vartype EURange: Range
15031
    :ivar Title:
15032
    :vartype Title: LocalizedText
15033
    :ivar AxisScaleType:
15034
    :vartype AxisScaleType: AxisScaleEnumeration
15035
    :ivar AxisSteps:
15036
    :vartype AxisSteps: Double
15037
    '''
15038
15039
    ua_types = [
15040
15041 1
        ('EngineeringUnits', 'EUInformation'),
15042
        ('EURange', 'Range'),
15043
        ('Title', 'LocalizedText'),
15044
        ('AxisScaleType', 'AxisScaleEnumeration'),
15045 1
        ('AxisSteps', 'ListOfDouble'),
15046
               ]
15047
15048
    def __init__(self):
15049
        self.EngineeringUnits = EUInformation()
15050
        self.EURange = Range()
15051
        self.Title = LocalizedText()
15052
        self.AxisScaleType = AxisScaleEnumeration(0)
15053
        self.AxisSteps = []
15054
        self._freeze = True
15055
15056
    def to_binary(self):
15057
        packet = []
15058
        packet.append(self.EngineeringUnits.to_binary())
15059
        packet.append(self.EURange.to_binary())
15060
        packet.append(self.Title.to_binary())
15061
        packet.append(uabin.Primitives.UInt32.pack(self.AxisScaleType.value))
15062
        packet.append(uabin.Primitives.Int32.pack(len(self.AxisSteps)))
15063
        for fieldname in self.AxisSteps:
15064
            packet.append(uabin.Primitives.Double.pack(fieldname))
15065
        return b''.join(packet)
15066
15067
    @staticmethod
15068
    def from_binary(data):
15069
        obj = AxisInformation()
15070
        obj.EngineeringUnits = EUInformation.from_binary(data)
15071
        obj.EURange = Range.from_binary(data)
15072
        obj.Title = LocalizedText.from_binary(data)
15073
        self.AxisScaleType = AxisScaleEnumeration(uabin.Primitives.UInt32.unpack(data))
15074
        obj.AxisSteps = uabin.Primitives.Double.unpack_array(data)
15075
        return obj
15076
15077
    def __str__(self):
15078
        return 'AxisInformation(' + 'EngineeringUnits:' + str(self.EngineeringUnits) + ', ' + \
15079
               'EURange:' + str(self.EURange) + ', ' + \
15080
               'Title:' + str(self.Title) + ', ' + \
15081
               'AxisScaleType:' + str(self.AxisScaleType) + ', ' + \
15082
               'AxisSteps:' + str(self.AxisSteps) + ')'
15083
15084
    __repr__ = __str__
15085
15086
15087 View Code Duplication
class XVType(FrozenClass):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
15088
    '''
15089
    :ivar X:
15090 1
    :vartype X: Double
15091
    :ivar Value:
15092
    :vartype Value: Float
15093
    '''
15094
15095
    ua_types = [
15096
15097
        ('X', 'Double'),
15098
        ('Value', 'Float'),
15099
               ]
15100
15101
    def __init__(self):
15102
        self.X = 0
15103
        self.Value = 0
15104
        self._freeze = True
15105
15106
    def to_binary(self):
15107
        packet = []
15108
        packet.append(uabin.Primitives.Double.pack(self.X))
15109
        packet.append(uabin.Primitives.Float.pack(self.Value))
15110
        return b''.join(packet)
15111
15112
    @staticmethod
15113
    def from_binary(data):
15114
        obj = XVType()
15115
        self.X = uabin.Primitives.Double.unpack(data)
15116
        self.Value = uabin.Primitives.Float.unpack(data)
15117
        return obj
15118
15119
    def __str__(self):
15120
        return 'XVType(' + 'X:' + str(self.X) + ', ' + \
15121
               'Value:' + str(self.Value) + ')'
15122
15123
    __repr__ = __str__
15124
15125
15126
class ProgramDiagnosticDataType(FrozenClass):
15127
    '''
15128
    :ivar CreateSessionId:
15129
    :vartype CreateSessionId: NodeId
15130
    :ivar CreateClientName:
15131
    :vartype CreateClientName: String
15132
    :ivar InvocationCreationTime:
15133
    :vartype InvocationCreationTime: DateTime
15134
    :ivar LastTransitionTime:
15135 1
    :vartype LastTransitionTime: DateTime
15136
    :ivar LastMethodCall:
15137
    :vartype LastMethodCall: String
15138 1
    :ivar LastMethodSessionId:
15139
    :vartype LastMethodSessionId: NodeId
15140
    :ivar LastMethodInputArguments:
15141
    :vartype LastMethodInputArguments: Argument
15142
    :ivar LastMethodOutputArguments:
15143
    :vartype LastMethodOutputArguments: Argument
15144
    :ivar LastMethodCallTime:
15145
    :vartype LastMethodCallTime: DateTime
15146
    :ivar LastMethodReturnStatus:
15147
    :vartype LastMethodReturnStatus: StatusResult
15148
    '''
15149
15150
    ua_types = [
15151
15152
        ('CreateSessionId', 'NodeId'),
15153
        ('CreateClientName', 'String'),
15154
        ('InvocationCreationTime', 'DateTime'),
15155
        ('LastTransitionTime', 'DateTime'),
15156
        ('LastMethodCall', 'String'),
15157
        ('LastMethodSessionId', 'NodeId'),
15158
        ('LastMethodInputArguments', 'ListOfArgument'),
15159
        ('LastMethodOutputArguments', 'ListOfArgument'),
15160 1
        ('LastMethodCallTime', 'DateTime'),
15161
        ('LastMethodReturnStatus', 'StatusResult'),
15162
               ]
15163
15164
    def __init__(self):
15165
        self.CreateSessionId = NodeId()
15166
        self.CreateClientName = None
15167
        self.InvocationCreationTime = datetime.utcnow()
15168
        self.LastTransitionTime = datetime.utcnow()
15169
        self.LastMethodCall = None
15170
        self.LastMethodSessionId = NodeId()
15171
        self.LastMethodInputArguments = []
15172 1
        self.LastMethodOutputArguments = []
15173
        self.LastMethodCallTime = datetime.utcnow()
15174
        self.LastMethodReturnStatus = StatusResult()
15175
        self._freeze = True
15176
15177
    def to_binary(self):
15178
        packet = []
15179
        packet.append(self.CreateSessionId.to_binary())
15180
        packet.append(uabin.Primitives.String.pack(self.CreateClientName))
15181
        packet.append(uabin.Primitives.DateTime.pack(self.InvocationCreationTime))
15182
        packet.append(uabin.Primitives.DateTime.pack(self.LastTransitionTime))
15183
        packet.append(uabin.Primitives.String.pack(self.LastMethodCall))
15184
        packet.append(self.LastMethodSessionId.to_binary())
15185
        packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodInputArguments)))
15186
        for fieldname in self.LastMethodInputArguments:
15187
            packet.append(fieldname.to_binary())
15188 1
        packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodOutputArguments)))
15189
        for fieldname in self.LastMethodOutputArguments:
15190
            packet.append(fieldname.to_binary())
15191
        packet.append(uabin.Primitives.DateTime.pack(self.LastMethodCallTime))
15192
        packet.append(self.LastMethodReturnStatus.to_binary())
15193
        return b''.join(packet)
15194
15195
    @staticmethod
15196
    def from_binary(data):
15197
        obj = ProgramDiagnosticDataType()
15198
        obj.CreateSessionId = NodeId.from_binary(data)
15199
        self.CreateClientName = uabin.Primitives.String.unpack(data)
15200
        self.InvocationCreationTime = uabin.Primitives.DateTime.unpack(data)
15201
        self.LastTransitionTime = uabin.Primitives.DateTime.unpack(data)
15202
        self.LastMethodCall = uabin.Primitives.String.unpack(data)
15203 1
        obj.LastMethodSessionId = NodeId.from_binary(data)
15204
        length = uabin.Primitives.Int32.unpack(data)
15205
        array = []
15206
        if length != -1:
15207 1
            for _ in range(0, length):
15208
                array.append(Argument.from_binary(data))
15209
        obj.LastMethodInputArguments = array
15210
        length = uabin.Primitives.Int32.unpack(data)
15211
        array = []
15212
        if length != -1:
15213
            for _ in range(0, length):
15214
                array.append(Argument.from_binary(data))
15215
        obj.LastMethodOutputArguments = array
15216
        self.LastMethodCallTime = uabin.Primitives.DateTime.unpack(data)
15217
        obj.LastMethodReturnStatus = StatusResult.from_binary(data)
15218 1
        return obj
15219
15220
    def __str__(self):
15221
        return 'ProgramDiagnosticDataType(' + 'CreateSessionId:' + str(self.CreateSessionId) + ', ' + \
15222
               'CreateClientName:' + str(self.CreateClientName) + ', ' + \
15223
               'InvocationCreationTime:' + str(self.InvocationCreationTime) + ', ' + \
15224
               'LastTransitionTime:' + str(self.LastTransitionTime) + ', ' + \
15225
               'LastMethodCall:' + str(self.LastMethodCall) + ', ' + \
15226
               'LastMethodSessionId:' + str(self.LastMethodSessionId) + ', ' + \
15227
               'LastMethodInputArguments:' + str(self.LastMethodInputArguments) + ', ' + \
15228
               'LastMethodOutputArguments:' + str(self.LastMethodOutputArguments) + ', ' + \
15229 1
               'LastMethodCallTime:' + str(self.LastMethodCallTime) + ', ' + \
15230
               'LastMethodReturnStatus:' + str(self.LastMethodReturnStatus) + ')'
15231
15232 1
    __repr__ = __str__
15233
15234
15235
class Annotation(FrozenClass):
15236
    '''
15237
    :ivar Message:
15238
    :vartype Message: String
15239
    :ivar UserName:
15240 1
    :vartype UserName: String
15241
    :ivar AnnotationTime:
15242
    :vartype AnnotationTime: DateTime
15243
    '''
15244
15245 1
    ua_types = [
15246
15247
        ('Message', 'String'),
15248
        ('UserName', 'String'),
15249
        ('AnnotationTime', 'DateTime'),
15250
               ]
15251
15252
    def __init__(self):
15253
        self.Message = None
15254 1
        self.UserName = None
15255
        self.AnnotationTime = datetime.utcnow()
15256
        self._freeze = True
15257
15258
    def to_binary(self):
15259
        packet = []
15260 1
        packet.append(uabin.Primitives.String.pack(self.Message))
15261
        packet.append(uabin.Primitives.String.pack(self.UserName))
15262
        packet.append(uabin.Primitives.DateTime.pack(self.AnnotationTime))
15263
        return b''.join(packet)
15264 1
15265
    @staticmethod
15266
    def from_binary(data):
15267
        obj = Annotation()
15268 1
        self.Message = uabin.Primitives.String.unpack(data)
15269
        self.UserName = uabin.Primitives.String.unpack(data)
15270
        self.AnnotationTime = uabin.Primitives.DateTime.unpack(data)
15271
        return obj
15272 1
15273
    def __str__(self):
15274
        return 'Annotation(' + 'Message:' + str(self.Message) + ', ' + \
15275 1
               'UserName:' + str(self.UserName) + ', ' + \
15276
               'AnnotationTime:' + str(self.AnnotationTime) + ')'
15277
15278
    __repr__ = __str__
15279
15280
15281
nid = FourByteNodeId(ObjectIds.TrustListDataType_Encoding_DefaultBinary)
15282
extension_object_classes[nid] = TrustListDataType
15283 1
extension_object_ids['TrustListDataType'] = nid
15284
nid = FourByteNodeId(ObjectIds.Argument_Encoding_DefaultBinary)
15285
extension_object_classes[nid] = Argument
15286
extension_object_ids['Argument'] = nid
15287
nid = FourByteNodeId(ObjectIds.EnumValueType_Encoding_DefaultBinary)
15288 1
extension_object_classes[nid] = EnumValueType
15289
extension_object_ids['EnumValueType'] = nid
15290
nid = FourByteNodeId(ObjectIds.OptionSet_Encoding_DefaultBinary)
15291
extension_object_classes[nid] = OptionSet
15292
extension_object_ids['OptionSet'] = nid
15293
nid = FourByteNodeId(ObjectIds.Union_Encoding_DefaultBinary)
15294
extension_object_classes[nid] = Union
15295
extension_object_ids['Union'] = nid
15296
nid = FourByteNodeId(ObjectIds.TimeZoneDataType_Encoding_DefaultBinary)
15297 1
extension_object_classes[nid] = TimeZoneDataType
15298
extension_object_ids['TimeZoneDataType'] = nid
15299
nid = FourByteNodeId(ObjectIds.ApplicationDescription_Encoding_DefaultBinary)
15300
extension_object_classes[nid] = ApplicationDescription
15301
extension_object_ids['ApplicationDescription'] = nid
15302
nid = FourByteNodeId(ObjectIds.RequestHeader_Encoding_DefaultBinary)
15303 1
extension_object_classes[nid] = RequestHeader
15304
extension_object_ids['RequestHeader'] = nid
15305
nid = FourByteNodeId(ObjectIds.ResponseHeader_Encoding_DefaultBinary)
15306
extension_object_classes[nid] = ResponseHeader
15307 1
extension_object_ids['ResponseHeader'] = nid
15308
nid = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary)
15309
extension_object_classes[nid] = ServiceFault
15310
extension_object_ids['ServiceFault'] = nid
15311 1
nid = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary)
15312
extension_object_classes[nid] = FindServersRequest
15313
extension_object_ids['FindServersRequest'] = nid
15314
nid = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary)
15315 1
extension_object_classes[nid] = FindServersResponse
15316
extension_object_ids['FindServersResponse'] = nid
15317
nid = FourByteNodeId(ObjectIds.ServerOnNetwork_Encoding_DefaultBinary)
15318 1
extension_object_classes[nid] = ServerOnNetwork
15319
extension_object_ids['ServerOnNetwork'] = nid
15320
nid = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary)
15321
extension_object_classes[nid] = FindServersOnNetworkRequest
15322
extension_object_ids['FindServersOnNetworkRequest'] = nid
15323
nid = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary)
15324
extension_object_classes[nid] = FindServersOnNetworkResponse
15325
extension_object_ids['FindServersOnNetworkResponse'] = nid
15326
nid = FourByteNodeId(ObjectIds.UserTokenPolicy_Encoding_DefaultBinary)
15327
extension_object_classes[nid] = UserTokenPolicy
15328
extension_object_ids['UserTokenPolicy'] = nid
15329
nid = FourByteNodeId(ObjectIds.EndpointDescription_Encoding_DefaultBinary)
15330
extension_object_classes[nid] = EndpointDescription
15331
extension_object_ids['EndpointDescription'] = nid
15332
nid = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)
15333
extension_object_classes[nid] = GetEndpointsRequest
15334
extension_object_ids['GetEndpointsRequest'] = nid
15335
nid = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary)
15336
extension_object_classes[nid] = GetEndpointsResponse
15337
extension_object_ids['GetEndpointsResponse'] = nid
15338
nid = FourByteNodeId(ObjectIds.RegisteredServer_Encoding_DefaultBinary)
15339
extension_object_classes[nid] = RegisteredServer
15340
extension_object_ids['RegisteredServer'] = nid
15341
nid = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary)
15342
extension_object_classes[nid] = RegisterServerRequest
15343
extension_object_ids['RegisterServerRequest'] = nid
15344
nid = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary)
15345
extension_object_classes[nid] = RegisterServerResponse
15346
extension_object_ids['RegisterServerResponse'] = nid
15347
nid = FourByteNodeId(ObjectIds.DiscoveryConfiguration_Encoding_DefaultBinary)
15348
extension_object_classes[nid] = DiscoveryConfiguration
15349
extension_object_ids['DiscoveryConfiguration'] = nid
15350
nid = FourByteNodeId(ObjectIds.MdnsDiscoveryConfiguration_Encoding_DefaultBinary)
15351
extension_object_classes[nid] = MdnsDiscoveryConfiguration
15352
extension_object_ids['MdnsDiscoveryConfiguration'] = nid
15353
nid = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary)
15354
extension_object_classes[nid] = RegisterServer2Request
15355
extension_object_ids['RegisterServer2Request'] = nid
15356
nid = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary)
15357
extension_object_classes[nid] = RegisterServer2Response
15358
extension_object_ids['RegisterServer2Response'] = nid
15359
nid = FourByteNodeId(ObjectIds.ChannelSecurityToken_Encoding_DefaultBinary)
15360
extension_object_classes[nid] = ChannelSecurityToken
15361
extension_object_ids['ChannelSecurityToken'] = nid
15362
nid = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary)
15363
extension_object_classes[nid] = OpenSecureChannelRequest
15364
extension_object_ids['OpenSecureChannelRequest'] = nid
15365
nid = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary)
15366
extension_object_classes[nid] = OpenSecureChannelResponse
15367
extension_object_ids['OpenSecureChannelResponse'] = nid
15368
nid = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary)
15369
extension_object_classes[nid] = CloseSecureChannelRequest
15370
extension_object_ids['CloseSecureChannelRequest'] = nid
15371
nid = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary)
15372
extension_object_classes[nid] = CloseSecureChannelResponse
15373
extension_object_ids['CloseSecureChannelResponse'] = nid
15374
nid = FourByteNodeId(ObjectIds.SignedSoftwareCertificate_Encoding_DefaultBinary)
15375
extension_object_classes[nid] = SignedSoftwareCertificate
15376
extension_object_ids['SignedSoftwareCertificate'] = nid
15377
nid = FourByteNodeId(ObjectIds.SignatureData_Encoding_DefaultBinary)
15378
extension_object_classes[nid] = SignatureData
15379
extension_object_ids['SignatureData'] = nid
15380
nid = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary)
15381
extension_object_classes[nid] = CreateSessionRequest
15382
extension_object_ids['CreateSessionRequest'] = nid
15383
nid = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary)
15384 1
extension_object_classes[nid] = CreateSessionResponse
15385
extension_object_ids['CreateSessionResponse'] = nid
15386
nid = FourByteNodeId(ObjectIds.UserIdentityToken_Encoding_DefaultBinary)
15387
extension_object_classes[nid] = UserIdentityToken
15388
extension_object_ids['UserIdentityToken'] = nid
15389
nid = FourByteNodeId(ObjectIds.AnonymousIdentityToken_Encoding_DefaultBinary)
15390
extension_object_classes[nid] = AnonymousIdentityToken
15391
extension_object_ids['AnonymousIdentityToken'] = nid
15392
nid = FourByteNodeId(ObjectIds.UserNameIdentityToken_Encoding_DefaultBinary)
15393
extension_object_classes[nid] = UserNameIdentityToken
15394
extension_object_ids['UserNameIdentityToken'] = nid
15395
nid = FourByteNodeId(ObjectIds.X509IdentityToken_Encoding_DefaultBinary)
15396
extension_object_classes[nid] = X509IdentityToken
15397
extension_object_ids['X509IdentityToken'] = nid
15398
nid = FourByteNodeId(ObjectIds.KerberosIdentityToken_Encoding_DefaultBinary)
15399
extension_object_classes[nid] = KerberosIdentityToken
15400
extension_object_ids['KerberosIdentityToken'] = nid
15401
nid = FourByteNodeId(ObjectIds.IssuedIdentityToken_Encoding_DefaultBinary)
15402
extension_object_classes[nid] = IssuedIdentityToken
15403
extension_object_ids['IssuedIdentityToken'] = nid
15404
nid = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary)
15405
extension_object_classes[nid] = ActivateSessionRequest
15406
extension_object_ids['ActivateSessionRequest'] = nid
15407
nid = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary)
15408
extension_object_classes[nid] = ActivateSessionResponse
15409
extension_object_ids['ActivateSessionResponse'] = nid
15410
nid = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary)
15411
extension_object_classes[nid] = CloseSessionRequest
15412
extension_object_ids['CloseSessionRequest'] = nid
15413
nid = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary)
15414
extension_object_classes[nid] = CloseSessionResponse
15415
extension_object_ids['CloseSessionResponse'] = nid
15416
nid = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary)
15417
extension_object_classes[nid] = CancelRequest
15418 1
extension_object_ids['CancelRequest'] = nid
15419
nid = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary)
15420
extension_object_classes[nid] = CancelResponse
15421
extension_object_ids['CancelResponse'] = nid
15422
nid = FourByteNodeId(ObjectIds.NodeAttributes_Encoding_DefaultBinary)
15423
extension_object_classes[nid] = NodeAttributes
15424
extension_object_ids['NodeAttributes'] = nid
15425
nid = FourByteNodeId(ObjectIds.ObjectAttributes_Encoding_DefaultBinary)
15426
extension_object_classes[nid] = ObjectAttributes
15427
extension_object_ids['ObjectAttributes'] = nid
15428
nid = FourByteNodeId(ObjectIds.VariableAttributes_Encoding_DefaultBinary)
15429
extension_object_classes[nid] = VariableAttributes
15430
extension_object_ids['VariableAttributes'] = nid
15431
nid = FourByteNodeId(ObjectIds.MethodAttributes_Encoding_DefaultBinary)
15432
extension_object_classes[nid] = MethodAttributes
15433
extension_object_ids['MethodAttributes'] = nid
15434
nid = FourByteNodeId(ObjectIds.ObjectTypeAttributes_Encoding_DefaultBinary)
15435
extension_object_classes[nid] = ObjectTypeAttributes
15436
extension_object_ids['ObjectTypeAttributes'] = nid
15437
nid = FourByteNodeId(ObjectIds.VariableTypeAttributes_Encoding_DefaultBinary)
15438
extension_object_classes[nid] = VariableTypeAttributes
15439
extension_object_ids['VariableTypeAttributes'] = nid
15440
nid = FourByteNodeId(ObjectIds.ReferenceTypeAttributes_Encoding_DefaultBinary)
15441
extension_object_classes[nid] = ReferenceTypeAttributes
15442
extension_object_ids['ReferenceTypeAttributes'] = nid
15443
nid = FourByteNodeId(ObjectIds.DataTypeAttributes_Encoding_DefaultBinary)
15444
extension_object_classes[nid] = DataTypeAttributes
15445
extension_object_ids['DataTypeAttributes'] = nid
15446
nid = FourByteNodeId(ObjectIds.ViewAttributes_Encoding_DefaultBinary)
15447
extension_object_classes[nid] = ViewAttributes
15448
extension_object_ids['ViewAttributes'] = nid
15449
nid = FourByteNodeId(ObjectIds.AddNodesItem_Encoding_DefaultBinary)
15450
extension_object_classes[nid] = AddNodesItem
15451
extension_object_ids['AddNodesItem'] = nid
15452
nid = FourByteNodeId(ObjectIds.AddNodesResult_Encoding_DefaultBinary)
15453
extension_object_classes[nid] = AddNodesResult
15454
extension_object_ids['AddNodesResult'] = nid
15455
nid = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary)
15456 1
extension_object_classes[nid] = AddNodesRequest
15457
extension_object_ids['AddNodesRequest'] = nid
15458
nid = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary)
15459
extension_object_classes[nid] = AddNodesResponse
15460
extension_object_ids['AddNodesResponse'] = nid
15461
nid = FourByteNodeId(ObjectIds.AddReferencesItem_Encoding_DefaultBinary)
15462
extension_object_classes[nid] = AddReferencesItem
15463
extension_object_ids['AddReferencesItem'] = nid
15464
nid = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary)
15465
extension_object_classes[nid] = AddReferencesRequest
15466
extension_object_ids['AddReferencesRequest'] = nid
15467
nid = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary)
15468
extension_object_classes[nid] = AddReferencesResponse
15469
extension_object_ids['AddReferencesResponse'] = nid
15470
nid = FourByteNodeId(ObjectIds.DeleteNodesItem_Encoding_DefaultBinary)
15471
extension_object_classes[nid] = DeleteNodesItem
15472
extension_object_ids['DeleteNodesItem'] = nid
15473
nid = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary)
15474
extension_object_classes[nid] = DeleteNodesRequest
15475
extension_object_ids['DeleteNodesRequest'] = nid
15476
nid = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary)
15477
extension_object_classes[nid] = DeleteNodesResponse
15478
extension_object_ids['DeleteNodesResponse'] = nid
15479
nid = FourByteNodeId(ObjectIds.DeleteReferencesItem_Encoding_DefaultBinary)
15480
extension_object_classes[nid] = DeleteReferencesItem
15481
extension_object_ids['DeleteReferencesItem'] = nid
15482
nid = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary)
15483
extension_object_classes[nid] = DeleteReferencesRequest
15484
extension_object_ids['DeleteReferencesRequest'] = nid
15485
nid = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary)
15486
extension_object_classes[nid] = DeleteReferencesResponse
15487
extension_object_ids['DeleteReferencesResponse'] = nid
15488
nid = FourByteNodeId(ObjectIds.ViewDescription_Encoding_DefaultBinary)
15489
extension_object_classes[nid] = ViewDescription
15490
extension_object_ids['ViewDescription'] = nid
15491 1
nid = FourByteNodeId(ObjectIds.BrowseDescription_Encoding_DefaultBinary)
15492
extension_object_classes[nid] = BrowseDescription
15493
extension_object_ids['BrowseDescription'] = nid
15494
nid = FourByteNodeId(ObjectIds.ReferenceDescription_Encoding_DefaultBinary)
15495 1
extension_object_classes[nid] = ReferenceDescription
15496
extension_object_ids['ReferenceDescription'] = nid
15497
nid = FourByteNodeId(ObjectIds.BrowseResult_Encoding_DefaultBinary)
15498
extension_object_classes[nid] = BrowseResult
15499
extension_object_ids['BrowseResult'] = nid
15500
nid = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary)
15501
extension_object_classes[nid] = BrowseRequest
15502
extension_object_ids['BrowseRequest'] = nid
15503
nid = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary)
15504
extension_object_classes[nid] = BrowseResponse
15505
extension_object_ids['BrowseResponse'] = nid
15506
nid = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary)
15507
extension_object_classes[nid] = BrowseNextRequest
15508
extension_object_ids['BrowseNextRequest'] = nid
15509
nid = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary)
15510
extension_object_classes[nid] = BrowseNextResponse
15511
extension_object_ids['BrowseNextResponse'] = nid
15512
nid = FourByteNodeId(ObjectIds.RelativePathElement_Encoding_DefaultBinary)
15513
extension_object_classes[nid] = RelativePathElement
15514
extension_object_ids['RelativePathElement'] = nid
15515
nid = FourByteNodeId(ObjectIds.RelativePath_Encoding_DefaultBinary)
15516
extension_object_classes[nid] = RelativePath
15517
extension_object_ids['RelativePath'] = nid
15518
nid = FourByteNodeId(ObjectIds.BrowsePath_Encoding_DefaultBinary)
15519
extension_object_classes[nid] = BrowsePath
15520
extension_object_ids['BrowsePath'] = nid
15521
nid = FourByteNodeId(ObjectIds.BrowsePathTarget_Encoding_DefaultBinary)
15522
extension_object_classes[nid] = BrowsePathTarget
15523
extension_object_ids['BrowsePathTarget'] = nid
15524
nid = FourByteNodeId(ObjectIds.BrowsePathResult_Encoding_DefaultBinary)
15525
extension_object_classes[nid] = BrowsePathResult
15526
extension_object_ids['BrowsePathResult'] = nid
15527
nid = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary)
15528 1
extension_object_classes[nid] = TranslateBrowsePathsToNodeIdsRequest
15529
extension_object_ids['TranslateBrowsePathsToNodeIdsRequest'] = nid
15530
nid = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary)
15531
extension_object_classes[nid] = TranslateBrowsePathsToNodeIdsResponse
15532
extension_object_ids['TranslateBrowsePathsToNodeIdsResponse'] = nid
15533
nid = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary)
15534
extension_object_classes[nid] = RegisterNodesRequest
15535
extension_object_ids['RegisterNodesRequest'] = nid
15536
nid = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary)
15537
extension_object_classes[nid] = RegisterNodesResponse
15538
extension_object_ids['RegisterNodesResponse'] = nid
15539
nid = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary)
15540
extension_object_classes[nid] = UnregisterNodesRequest
15541
extension_object_ids['UnregisterNodesRequest'] = nid
15542
nid = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary)
15543
extension_object_classes[nid] = UnregisterNodesResponse
15544
extension_object_ids['UnregisterNodesResponse'] = nid
15545
nid = FourByteNodeId(ObjectIds.EndpointConfiguration_Encoding_DefaultBinary)
15546
extension_object_classes[nid] = EndpointConfiguration
15547
extension_object_ids['EndpointConfiguration'] = nid
15548
nid = FourByteNodeId(ObjectIds.SupportedProfile_Encoding_DefaultBinary)
15549
extension_object_classes[nid] = SupportedProfile
15550
extension_object_ids['SupportedProfile'] = nid
15551
nid = FourByteNodeId(ObjectIds.SoftwareCertificate_Encoding_DefaultBinary)
15552
extension_object_classes[nid] = SoftwareCertificate
15553
extension_object_ids['SoftwareCertificate'] = nid
15554
nid = FourByteNodeId(ObjectIds.QueryDataDescription_Encoding_DefaultBinary)
15555
extension_object_classes[nid] = QueryDataDescription
15556
extension_object_ids['QueryDataDescription'] = nid
15557
nid = FourByteNodeId(ObjectIds.NodeTypeDescription_Encoding_DefaultBinary)
15558
extension_object_classes[nid] = NodeTypeDescription
15559
extension_object_ids['NodeTypeDescription'] = nid
15560
nid = FourByteNodeId(ObjectIds.QueryDataSet_Encoding_DefaultBinary)
15561 1
extension_object_classes[nid] = QueryDataSet
15562
extension_object_ids['QueryDataSet'] = nid
15563
nid = FourByteNodeId(ObjectIds.NodeReference_Encoding_DefaultBinary)
15564 1
extension_object_classes[nid] = NodeReference
15565
extension_object_ids['NodeReference'] = nid
15566
nid = FourByteNodeId(ObjectIds.ContentFilterElement_Encoding_DefaultBinary)
15567
extension_object_classes[nid] = ContentFilterElement
15568
extension_object_ids['ContentFilterElement'] = nid
15569
nid = FourByteNodeId(ObjectIds.ContentFilter_Encoding_DefaultBinary)
15570
extension_object_classes[nid] = ContentFilter
15571
extension_object_ids['ContentFilter'] = nid
15572
nid = FourByteNodeId(ObjectIds.ElementOperand_Encoding_DefaultBinary)
15573
extension_object_classes[nid] = ElementOperand
15574 1
extension_object_ids['ElementOperand'] = nid
15575
nid = FourByteNodeId(ObjectIds.LiteralOperand_Encoding_DefaultBinary)
15576
extension_object_classes[nid] = LiteralOperand
15577
extension_object_ids['LiteralOperand'] = nid
15578
nid = FourByteNodeId(ObjectIds.AttributeOperand_Encoding_DefaultBinary)
15579
extension_object_classes[nid] = AttributeOperand
15580 1
extension_object_ids['AttributeOperand'] = nid
15581
nid = FourByteNodeId(ObjectIds.SimpleAttributeOperand_Encoding_DefaultBinary)
15582
extension_object_classes[nid] = SimpleAttributeOperand
15583
extension_object_ids['SimpleAttributeOperand'] = nid
15584
nid = FourByteNodeId(ObjectIds.ContentFilterElementResult_Encoding_DefaultBinary)
15585
extension_object_classes[nid] = ContentFilterElementResult
15586
extension_object_ids['ContentFilterElementResult'] = nid
15587
nid = FourByteNodeId(ObjectIds.ContentFilterResult_Encoding_DefaultBinary)
15588
extension_object_classes[nid] = ContentFilterResult
15589
extension_object_ids['ContentFilterResult'] = nid
15590 1
nid = FourByteNodeId(ObjectIds.ParsingResult_Encoding_DefaultBinary)
15591
extension_object_classes[nid] = ParsingResult
15592
extension_object_ids['ParsingResult'] = nid
15593
nid = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary)
15594
extension_object_classes[nid] = QueryFirstRequest
15595
extension_object_ids['QueryFirstRequest'] = nid
15596
nid = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary)
15597 1
extension_object_classes[nid] = QueryFirstResponse
15598
extension_object_ids['QueryFirstResponse'] = nid
15599
nid = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary)
15600
extension_object_classes[nid] = QueryNextRequest
15601 1
extension_object_ids['QueryNextRequest'] = nid
15602
nid = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary)
15603
extension_object_classes[nid] = QueryNextResponse
15604
extension_object_ids['QueryNextResponse'] = nid
15605
nid = FourByteNodeId(ObjectIds.ReadValueId_Encoding_DefaultBinary)
15606 1
extension_object_classes[nid] = ReadValueId
15607
extension_object_ids['ReadValueId'] = nid
15608
nid = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary)
15609
extension_object_classes[nid] = ReadRequest
15610
extension_object_ids['ReadRequest'] = nid
15611 1
nid = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary)
15612
extension_object_classes[nid] = ReadResponse
15613
extension_object_ids['ReadResponse'] = nid
15614 1
nid = FourByteNodeId(ObjectIds.HistoryReadValueId_Encoding_DefaultBinary)
15615
extension_object_classes[nid] = HistoryReadValueId
15616
extension_object_ids['HistoryReadValueId'] = nid
15617
nid = FourByteNodeId(ObjectIds.HistoryReadResult_Encoding_DefaultBinary)
15618
extension_object_classes[nid] = HistoryReadResult
15619
extension_object_ids['HistoryReadResult'] = nid
15620
nid = FourByteNodeId(ObjectIds.HistoryReadDetails_Encoding_DefaultBinary)
15621
extension_object_classes[nid] = HistoryReadDetails
15622 1
extension_object_ids['HistoryReadDetails'] = nid
15623
nid = FourByteNodeId(ObjectIds.ReadEventDetails_Encoding_DefaultBinary)
15624
extension_object_classes[nid] = ReadEventDetails
15625
extension_object_ids['ReadEventDetails'] = nid
15626
nid = FourByteNodeId(ObjectIds.ReadRawModifiedDetails_Encoding_DefaultBinary)
15627 1
extension_object_classes[nid] = ReadRawModifiedDetails
15628
extension_object_ids['ReadRawModifiedDetails'] = nid
15629
nid = FourByteNodeId(ObjectIds.ReadProcessedDetails_Encoding_DefaultBinary)
15630
extension_object_classes[nid] = ReadProcessedDetails
15631
extension_object_ids['ReadProcessedDetails'] = nid
15632
nid = FourByteNodeId(ObjectIds.ReadAtTimeDetails_Encoding_DefaultBinary)
15633
extension_object_classes[nid] = ReadAtTimeDetails
15634
extension_object_ids['ReadAtTimeDetails'] = nid
15635
nid = FourByteNodeId(ObjectIds.HistoryData_Encoding_DefaultBinary)
15636 1
extension_object_classes[nid] = HistoryData
15637
extension_object_ids['HistoryData'] = nid
15638
nid = FourByteNodeId(ObjectIds.ModificationInfo_Encoding_DefaultBinary)
15639
extension_object_classes[nid] = ModificationInfo
15640
extension_object_ids['ModificationInfo'] = nid
15641
nid = FourByteNodeId(ObjectIds.HistoryModifiedData_Encoding_DefaultBinary)
15642 1
extension_object_classes[nid] = HistoryModifiedData
15643
extension_object_ids['HistoryModifiedData'] = nid
15644
nid = FourByteNodeId(ObjectIds.HistoryEvent_Encoding_DefaultBinary)
15645
extension_object_classes[nid] = HistoryEvent
15646 1
extension_object_ids['HistoryEvent'] = nid
15647
nid = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary)
15648
extension_object_classes[nid] = HistoryReadRequest
15649
extension_object_ids['HistoryReadRequest'] = nid
15650 1
nid = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary)
15651
extension_object_classes[nid] = HistoryReadResponse
15652
extension_object_ids['HistoryReadResponse'] = nid
15653
nid = FourByteNodeId(ObjectIds.WriteValue_Encoding_DefaultBinary)
15654 1
extension_object_classes[nid] = WriteValue
15655
extension_object_ids['WriteValue'] = nid
15656
nid = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary)
15657 1
extension_object_classes[nid] = WriteRequest
15658
extension_object_ids['WriteRequest'] = nid
15659
nid = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary)
15660
extension_object_classes[nid] = WriteResponse
15661
extension_object_ids['WriteResponse'] = nid
15662
nid = FourByteNodeId(ObjectIds.HistoryUpdateDetails_Encoding_DefaultBinary)
15663
extension_object_classes[nid] = HistoryUpdateDetails
15664
extension_object_ids['HistoryUpdateDetails'] = nid
15665 1
nid = FourByteNodeId(ObjectIds.UpdateDataDetails_Encoding_DefaultBinary)
15666
extension_object_classes[nid] = UpdateDataDetails
15667
extension_object_ids['UpdateDataDetails'] = nid
15668
nid = FourByteNodeId(ObjectIds.UpdateStructureDataDetails_Encoding_DefaultBinary)
15669
extension_object_classes[nid] = UpdateStructureDataDetails
15670 1
extension_object_ids['UpdateStructureDataDetails'] = nid
15671
nid = FourByteNodeId(ObjectIds.UpdateEventDetails_Encoding_DefaultBinary)
15672
extension_object_classes[nid] = UpdateEventDetails
15673
extension_object_ids['UpdateEventDetails'] = nid
15674
nid = FourByteNodeId(ObjectIds.DeleteRawModifiedDetails_Encoding_DefaultBinary)
15675
extension_object_classes[nid] = DeleteRawModifiedDetails
15676
extension_object_ids['DeleteRawModifiedDetails'] = nid
15677
nid = FourByteNodeId(ObjectIds.DeleteAtTimeDetails_Encoding_DefaultBinary)
15678
extension_object_classes[nid] = DeleteAtTimeDetails
15679 1
extension_object_ids['DeleteAtTimeDetails'] = nid
15680
nid = FourByteNodeId(ObjectIds.DeleteEventDetails_Encoding_DefaultBinary)
15681
extension_object_classes[nid] = DeleteEventDetails
15682
extension_object_ids['DeleteEventDetails'] = nid
15683
nid = FourByteNodeId(ObjectIds.HistoryUpdateResult_Encoding_DefaultBinary)
15684
extension_object_classes[nid] = HistoryUpdateResult
15685 1
extension_object_ids['HistoryUpdateResult'] = nid
15686
nid = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary)
15687
extension_object_classes[nid] = HistoryUpdateRequest
15688
extension_object_ids['HistoryUpdateRequest'] = nid
15689 1
nid = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary)
15690
extension_object_classes[nid] = HistoryUpdateResponse
15691
extension_object_ids['HistoryUpdateResponse'] = nid
15692
nid = FourByteNodeId(ObjectIds.CallMethodRequest_Encoding_DefaultBinary)
15693 1
extension_object_classes[nid] = CallMethodRequest
15694
extension_object_ids['CallMethodRequest'] = nid
15695
nid = FourByteNodeId(ObjectIds.CallMethodResult_Encoding_DefaultBinary)
15696
extension_object_classes[nid] = CallMethodResult
15697 1
extension_object_ids['CallMethodResult'] = nid
15698
nid = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary)
15699
extension_object_classes[nid] = CallRequest
15700 1
extension_object_ids['CallRequest'] = nid
15701
nid = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary)
15702
extension_object_classes[nid] = CallResponse
15703
extension_object_ids['CallResponse'] = nid
15704
nid = FourByteNodeId(ObjectIds.MonitoringFilter_Encoding_DefaultBinary)
15705
extension_object_classes[nid] = MonitoringFilter
15706
extension_object_ids['MonitoringFilter'] = nid
15707
nid = FourByteNodeId(ObjectIds.DataChangeFilter_Encoding_DefaultBinary)
15708
extension_object_classes[nid] = DataChangeFilter
15709
extension_object_ids['DataChangeFilter'] = nid
15710
nid = FourByteNodeId(ObjectIds.EventFilter_Encoding_DefaultBinary)
15711
extension_object_classes[nid] = EventFilter
15712 1
extension_object_ids['EventFilter'] = nid
15713
nid = FourByteNodeId(ObjectIds.AggregateConfiguration_Encoding_DefaultBinary)
15714
extension_object_classes[nid] = AggregateConfiguration
15715
extension_object_ids['AggregateConfiguration'] = nid
15716
nid = FourByteNodeId(ObjectIds.AggregateFilter_Encoding_DefaultBinary)
15717
extension_object_classes[nid] = AggregateFilter
15718
extension_object_ids['AggregateFilter'] = nid
15719 1
nid = FourByteNodeId(ObjectIds.MonitoringFilterResult_Encoding_DefaultBinary)
15720
extension_object_classes[nid] = MonitoringFilterResult
15721
extension_object_ids['MonitoringFilterResult'] = nid
15722
nid = FourByteNodeId(ObjectIds.EventFilterResult_Encoding_DefaultBinary)
15723
extension_object_classes[nid] = EventFilterResult
15724
extension_object_ids['EventFilterResult'] = nid
15725
nid = FourByteNodeId(ObjectIds.AggregateFilterResult_Encoding_DefaultBinary)
15726
extension_object_classes[nid] = AggregateFilterResult
15727
extension_object_ids['AggregateFilterResult'] = nid
15728
nid = FourByteNodeId(ObjectIds.MonitoringParameters_Encoding_DefaultBinary)
15729
extension_object_classes[nid] = MonitoringParameters
15730 1
extension_object_ids['MonitoringParameters'] = nid
15731
nid = FourByteNodeId(ObjectIds.MonitoredItemCreateRequest_Encoding_DefaultBinary)
15732
extension_object_classes[nid] = MonitoredItemCreateRequest
15733
extension_object_ids['MonitoredItemCreateRequest'] = nid
15734
nid = FourByteNodeId(ObjectIds.MonitoredItemCreateResult_Encoding_DefaultBinary)
15735
extension_object_classes[nid] = MonitoredItemCreateResult
15736
extension_object_ids['MonitoredItemCreateResult'] = nid
15737
nid = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary)
15738 1
extension_object_classes[nid] = CreateMonitoredItemsRequest
15739
extension_object_ids['CreateMonitoredItemsRequest'] = nid
15740
nid = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary)
15741
extension_object_classes[nid] = CreateMonitoredItemsResponse
15742 1
extension_object_ids['CreateMonitoredItemsResponse'] = nid
15743
nid = FourByteNodeId(ObjectIds.MonitoredItemModifyRequest_Encoding_DefaultBinary)
15744
extension_object_classes[nid] = MonitoredItemModifyRequest
15745
extension_object_ids['MonitoredItemModifyRequest'] = nid
15746
nid = FourByteNodeId(ObjectIds.MonitoredItemModifyResult_Encoding_DefaultBinary)
15747
extension_object_classes[nid] = MonitoredItemModifyResult
15748 1
extension_object_ids['MonitoredItemModifyResult'] = nid
15749
nid = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary)
15750
extension_object_classes[nid] = ModifyMonitoredItemsRequest
15751
extension_object_ids['ModifyMonitoredItemsRequest'] = nid
15752
nid = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary)
15753
extension_object_classes[nid] = ModifyMonitoredItemsResponse
15754 1
extension_object_ids['ModifyMonitoredItemsResponse'] = nid
15755
nid = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary)
15756
extension_object_classes[nid] = SetMonitoringModeRequest
15757 1
extension_object_ids['SetMonitoringModeRequest'] = nid
15758
nid = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary)
15759
extension_object_classes[nid] = SetMonitoringModeResponse
15760
extension_object_ids['SetMonitoringModeResponse'] = nid
15761
nid = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary)
15762
extension_object_classes[nid] = SetTriggeringRequest
15763
extension_object_ids['SetTriggeringRequest'] = nid
15764
nid = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary)
15765 1
extension_object_classes[nid] = SetTriggeringResponse
15766
extension_object_ids['SetTriggeringResponse'] = nid
15767
nid = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary)
15768
extension_object_classes[nid] = DeleteMonitoredItemsRequest
15769
extension_object_ids['DeleteMonitoredItemsRequest'] = nid
15770 1
nid = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary)
15771
extension_object_classes[nid] = DeleteMonitoredItemsResponse
15772
extension_object_ids['DeleteMonitoredItemsResponse'] = nid
15773
nid = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary)
15774
extension_object_classes[nid] = CreateSubscriptionRequest
15775
extension_object_ids['CreateSubscriptionRequest'] = nid
15776
nid = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary)
15777
extension_object_classes[nid] = CreateSubscriptionResponse
15778
extension_object_ids['CreateSubscriptionResponse'] = nid
15779 1
nid = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary)
15780
extension_object_classes[nid] = ModifySubscriptionRequest
15781
extension_object_ids['ModifySubscriptionRequest'] = nid
15782
nid = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary)
15783
extension_object_classes[nid] = ModifySubscriptionResponse
15784
extension_object_ids['ModifySubscriptionResponse'] = nid
15785 1
nid = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary)
15786
extension_object_classes[nid] = SetPublishingModeRequest
15787
extension_object_ids['SetPublishingModeRequest'] = nid
15788
nid = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary)
15789 1
extension_object_classes[nid] = SetPublishingModeResponse
15790
extension_object_ids['SetPublishingModeResponse'] = nid
15791
nid = FourByteNodeId(ObjectIds.NotificationMessage_Encoding_DefaultBinary)
15792
extension_object_classes[nid] = NotificationMessage
15793 1
extension_object_ids['NotificationMessage'] = nid
15794
nid = FourByteNodeId(ObjectIds.NotificationData_Encoding_DefaultBinary)
15795
extension_object_classes[nid] = NotificationData
15796
extension_object_ids['NotificationData'] = nid
15797 1
nid = FourByteNodeId(ObjectIds.DataChangeNotification_Encoding_DefaultBinary)
15798
extension_object_classes[nid] = DataChangeNotification
15799
extension_object_ids['DataChangeNotification'] = nid
15800 1
nid = FourByteNodeId(ObjectIds.MonitoredItemNotification_Encoding_DefaultBinary)
15801
extension_object_classes[nid] = MonitoredItemNotification
15802
extension_object_ids['MonitoredItemNotification'] = nid
15803
nid = FourByteNodeId(ObjectIds.EventNotificationList_Encoding_DefaultBinary)
15804
extension_object_classes[nid] = EventNotificationList
15805
extension_object_ids['EventNotificationList'] = nid
15806
nid = FourByteNodeId(ObjectIds.EventFieldList_Encoding_DefaultBinary)
15807
extension_object_classes[nid] = EventFieldList
15808 1
extension_object_ids['EventFieldList'] = nid
15809
nid = FourByteNodeId(ObjectIds.HistoryEventFieldList_Encoding_DefaultBinary)
15810
extension_object_classes[nid] = HistoryEventFieldList
15811
extension_object_ids['HistoryEventFieldList'] = nid
15812
nid = FourByteNodeId(ObjectIds.StatusChangeNotification_Encoding_DefaultBinary)
15813 1
extension_object_classes[nid] = StatusChangeNotification
15814
extension_object_ids['StatusChangeNotification'] = nid
15815
nid = FourByteNodeId(ObjectIds.SubscriptionAcknowledgement_Encoding_DefaultBinary)
15816
extension_object_classes[nid] = SubscriptionAcknowledgement
15817
extension_object_ids['SubscriptionAcknowledgement'] = nid
15818
nid = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary)
15819
extension_object_classes[nid] = PublishRequest
15820
extension_object_ids['PublishRequest'] = nid
15821
nid = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary)
15822 1
extension_object_classes[nid] = PublishResponse
15823
extension_object_ids['PublishResponse'] = nid
15824
nid = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary)
15825
extension_object_classes[nid] = RepublishRequest
15826
extension_object_ids['RepublishRequest'] = nid
15827
nid = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary)
15828 1
extension_object_classes[nid] = RepublishResponse
15829
extension_object_ids['RepublishResponse'] = nid
15830
nid = FourByteNodeId(ObjectIds.TransferResult_Encoding_DefaultBinary)
15831
extension_object_classes[nid] = TransferResult
15832 1
extension_object_ids['TransferResult'] = nid
15833
nid = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary)
15834
extension_object_classes[nid] = TransferSubscriptionsRequest
15835
extension_object_ids['TransferSubscriptionsRequest'] = nid
15836 1
nid = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary)
15837
extension_object_classes[nid] = TransferSubscriptionsResponse
15838
extension_object_ids['TransferSubscriptionsResponse'] = nid
15839
nid = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary)
15840 1
extension_object_classes[nid] = DeleteSubscriptionsRequest
15841
extension_object_ids['DeleteSubscriptionsRequest'] = nid
15842
nid = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary)
15843 1
extension_object_classes[nid] = DeleteSubscriptionsResponse
15844
extension_object_ids['DeleteSubscriptionsResponse'] = nid
15845
nid = FourByteNodeId(ObjectIds.BuildInfo_Encoding_DefaultBinary)
15846
extension_object_classes[nid] = BuildInfo
15847
extension_object_ids['BuildInfo'] = nid
15848
nid = FourByteNodeId(ObjectIds.RedundantServerDataType_Encoding_DefaultBinary)
15849
extension_object_classes[nid] = RedundantServerDataType
15850
extension_object_ids['RedundantServerDataType'] = nid
15851
nid = FourByteNodeId(ObjectIds.EndpointUrlListDataType_Encoding_DefaultBinary)
15852
extension_object_classes[nid] = EndpointUrlListDataType
15853
extension_object_ids['EndpointUrlListDataType'] = nid
15854
nid = FourByteNodeId(ObjectIds.NetworkGroupDataType_Encoding_DefaultBinary)
15855
extension_object_classes[nid] = NetworkGroupDataType
15856
extension_object_ids['NetworkGroupDataType'] = nid
15857 1
nid = FourByteNodeId(ObjectIds.SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary)
15858
extension_object_classes[nid] = SamplingIntervalDiagnosticsDataType
15859
extension_object_ids['SamplingIntervalDiagnosticsDataType'] = nid
15860
nid = FourByteNodeId(ObjectIds.ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary)
15861
extension_object_classes[nid] = ServerDiagnosticsSummaryDataType
15862
extension_object_ids['ServerDiagnosticsSummaryDataType'] = nid
15863
nid = FourByteNodeId(ObjectIds.ServerStatusDataType_Encoding_DefaultBinary)
15864
extension_object_classes[nid] = ServerStatusDataType
15865 1
extension_object_ids['ServerStatusDataType'] = nid
15866
nid = FourByteNodeId(ObjectIds.SessionDiagnosticsDataType_Encoding_DefaultBinary)
15867
extension_object_classes[nid] = SessionDiagnosticsDataType
15868
extension_object_ids['SessionDiagnosticsDataType'] = nid
15869
nid = FourByteNodeId(ObjectIds.SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary)
15870
extension_object_classes[nid] = SessionSecurityDiagnosticsDataType
15871
extension_object_ids['SessionSecurityDiagnosticsDataType'] = nid
15872
nid = FourByteNodeId(ObjectIds.ServiceCounterDataType_Encoding_DefaultBinary)
15873
extension_object_classes[nid] = ServiceCounterDataType
15874
extension_object_ids['ServiceCounterDataType'] = nid
15875
nid = FourByteNodeId(ObjectIds.StatusResult_Encoding_DefaultBinary)
15876
extension_object_classes[nid] = StatusResult
15877 1
extension_object_ids['StatusResult'] = nid
15878
nid = FourByteNodeId(ObjectIds.SubscriptionDiagnosticsDataType_Encoding_DefaultBinary)
15879
extension_object_classes[nid] = SubscriptionDiagnosticsDataType
15880
extension_object_ids['SubscriptionDiagnosticsDataType'] = nid
15881
nid = FourByteNodeId(ObjectIds.ModelChangeStructureDataType_Encoding_DefaultBinary)
15882
extension_object_classes[nid] = ModelChangeStructureDataType
15883
extension_object_ids['ModelChangeStructureDataType'] = nid
15884
nid = FourByteNodeId(ObjectIds.SemanticChangeStructureDataType_Encoding_DefaultBinary)
15885
extension_object_classes[nid] = SemanticChangeStructureDataType
15886
extension_object_ids['SemanticChangeStructureDataType'] = nid
15887
nid = FourByteNodeId(ObjectIds.Range_Encoding_DefaultBinary)
15888 1
extension_object_classes[nid] = Range
15889
extension_object_ids['Range'] = nid
15890
nid = FourByteNodeId(ObjectIds.EUInformation_Encoding_DefaultBinary)
15891
extension_object_classes[nid] = EUInformation
15892 1
extension_object_ids['EUInformation'] = nid
15893
nid = FourByteNodeId(ObjectIds.ComplexNumberType_Encoding_DefaultBinary)
15894
extension_object_classes[nid] = ComplexNumberType
15895
extension_object_ids['ComplexNumberType'] = nid
15896
nid = FourByteNodeId(ObjectIds.DoubleComplexNumberType_Encoding_DefaultBinary)
15897
extension_object_classes[nid] = DoubleComplexNumberType
15898
extension_object_ids['DoubleComplexNumberType'] = nid
15899 1
nid = FourByteNodeId(ObjectIds.AxisInformation_Encoding_DefaultBinary)
15900
extension_object_classes[nid] = AxisInformation
15901
extension_object_ids['AxisInformation'] = nid
15902
nid = FourByteNodeId(ObjectIds.XVType_Encoding_DefaultBinary)
15903
extension_object_classes[nid] = XVType
15904
extension_object_ids['XVType'] = nid
15905
nid = FourByteNodeId(ObjectIds.ProgramDiagnosticDataType_Encoding_DefaultBinary)
15906 1
extension_object_classes[nid] = ProgramDiagnosticDataType
15907
extension_object_ids['ProgramDiagnosticDataType'] = nid
15908
nid = FourByteNodeId(ObjectIds.Annotation_Encoding_DefaultBinary)
15909 1
extension_object_classes[nid] = Annotation
15910
extension_object_ids['Annotation'] = nid
15911