Code Duplication    Length = 61-63 lines in 15 locations

opcua/ua/uaprotocol_auto.py 15 locations

@@ 6101-6163 (lines=63) @@
6098
6099
    __repr__ = __str__
6100
6101
6102
class TranslateBrowsePathsToNodeIdsResponse(FrozenClass):
6103
    '''
6104
    Translates one or more paths in the server address space.
6105
6106
    :ivar TypeId:
6107
    :vartype TypeId: NodeId
6108
    :ivar ResponseHeader:
6109
    :vartype ResponseHeader: ResponseHeader
6110
    :ivar Results:
6111
    :vartype Results: BrowsePathResult
6112
    :ivar DiagnosticInfos:
6113
    :vartype DiagnosticInfos: DiagnosticInfo
6114
    '''
6115
    def __init__(self, binary=None):
6116
        if binary is not None:
6117
            self._binary_init(binary)
6118
            self._freeze = True
6119
            return
6120
        self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary)
6121
        self.ResponseHeader = ResponseHeader()
6122
        self.Results = []
6123
        self.DiagnosticInfos = []
6124
        self._freeze = True
6125
6126
    def to_binary(self):
6127
        packet = []
6128
        packet.append(self.TypeId.to_binary())
6129
        packet.append(self.ResponseHeader.to_binary())
6130
        packet.append(uatype_Int32.pack(len(self.Results)))
6131
        for fieldname in self.Results:
6132
            packet.append(fieldname.to_binary())
6133
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
6134
        for fieldname in self.DiagnosticInfos:
6135
            packet.append(fieldname.to_binary())
6136
        return b''.join(packet)
6137
6138
    @staticmethod
6139
    def from_binary(data):
6140
        return TranslateBrowsePathsToNodeIdsResponse(data)
6141
6142
    def _binary_init(self, data):
6143
        self.TypeId = NodeId.from_binary(data)
6144
        self.ResponseHeader = ResponseHeader.from_binary(data)
6145
        length = uatype_Int32.unpack(data.read(4))[0]
6146
        array = []
6147
        if length != -1:
6148
            for _ in range(0, length):
6149
                array.append(BrowsePathResult.from_binary(data))
6150
        self.Results = array
6151
        length = uatype_Int32.unpack(data.read(4))[0]
6152
        array = []
6153
        if length != -1:
6154
            for _ in range(0, length):
6155
                array.append(DiagnosticInfo.from_binary(data))
6156
        self.DiagnosticInfos = array
6157
6158
    def __str__(self):
6159
        return 'TranslateBrowsePathsToNodeIdsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6160
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6161
               'Results:' + str(self.Results) + ', ' + \
6162
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
6163
6164
    __repr__ = __str__
6165
6166
@@ 5558-5620 (lines=63) @@
5555
5556
    __repr__ = __str__
5557
5558
5559
class BrowseResponse(FrozenClass):
5560
    '''
5561
    Browse the references for one or more nodes from the server address space.
5562
5563
    :ivar TypeId:
5564
    :vartype TypeId: NodeId
5565
    :ivar ResponseHeader:
5566
    :vartype ResponseHeader: ResponseHeader
5567
    :ivar Results:
5568
    :vartype Results: BrowseResult
5569
    :ivar DiagnosticInfos:
5570
    :vartype DiagnosticInfos: DiagnosticInfo
5571
    '''
5572
    def __init__(self, binary=None):
5573
        if binary is not None:
5574
            self._binary_init(binary)
5575
            self._freeze = True
5576
            return
5577
        self.TypeId = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary)
5578
        self.ResponseHeader = ResponseHeader()
5579
        self.Results = []
5580
        self.DiagnosticInfos = []
5581
        self._freeze = True
5582
5583
    def to_binary(self):
5584
        packet = []
5585
        packet.append(self.TypeId.to_binary())
5586
        packet.append(self.ResponseHeader.to_binary())
5587
        packet.append(uatype_Int32.pack(len(self.Results)))
5588
        for fieldname in self.Results:
5589
            packet.append(fieldname.to_binary())
5590
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
5591
        for fieldname in self.DiagnosticInfos:
5592
            packet.append(fieldname.to_binary())
5593
        return b''.join(packet)
5594
5595
    @staticmethod
5596
    def from_binary(data):
5597
        return BrowseResponse(data)
5598
5599
    def _binary_init(self, data):
5600
        self.TypeId = NodeId.from_binary(data)
5601
        self.ResponseHeader = ResponseHeader.from_binary(data)
5602
        length = uatype_Int32.unpack(data.read(4))[0]
5603
        array = []
5604
        if length != -1:
5605
            for _ in range(0, length):
5606
                array.append(BrowseResult.from_binary(data))
5607
        self.Results = array
5608
        length = uatype_Int32.unpack(data.read(4))[0]
5609
        array = []
5610
        if length != -1:
5611
            for _ in range(0, length):
5612
                array.append(DiagnosticInfo.from_binary(data))
5613
        self.DiagnosticInfos = array
5614
5615
    def __str__(self):
5616
        return 'BrowseResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5617
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5618
               'Results:' + str(self.Results) + ', ' + \
5619
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5620
5621
    __repr__ = __str__
5622
5623
@@ 4933-4995 (lines=63) @@
4930
4931
    __repr__ = __str__
4932
4933
4934
class DeleteNodesResponse(FrozenClass):
4935
    '''
4936
    Delete one or more nodes from the server address space.
4937
4938
    :ivar TypeId:
4939
    :vartype TypeId: NodeId
4940
    :ivar ResponseHeader:
4941
    :vartype ResponseHeader: ResponseHeader
4942
    :ivar Results:
4943
    :vartype Results: StatusCode
4944
    :ivar DiagnosticInfos:
4945
    :vartype DiagnosticInfos: DiagnosticInfo
4946
    '''
4947
    def __init__(self, binary=None):
4948
        if binary is not None:
4949
            self._binary_init(binary)
4950
            self._freeze = True
4951
            return
4952
        self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary)
4953
        self.ResponseHeader = ResponseHeader()
4954
        self.Results = []
4955
        self.DiagnosticInfos = []
4956
        self._freeze = True
4957
4958
    def to_binary(self):
4959
        packet = []
4960
        packet.append(self.TypeId.to_binary())
4961
        packet.append(self.ResponseHeader.to_binary())
4962
        packet.append(uatype_Int32.pack(len(self.Results)))
4963
        for fieldname in self.Results:
4964
            packet.append(fieldname.to_binary())
4965
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
4966
        for fieldname in self.DiagnosticInfos:
4967
            packet.append(fieldname.to_binary())
4968
        return b''.join(packet)
4969
4970
    @staticmethod
4971
    def from_binary(data):
4972
        return DeleteNodesResponse(data)
4973
4974
    def _binary_init(self, data):
4975
        self.TypeId = NodeId.from_binary(data)
4976
        self.ResponseHeader = ResponseHeader.from_binary(data)
4977
        length = uatype_Int32.unpack(data.read(4))[0]
4978
        array = []
4979
        if length != -1:
4980
            for _ in range(0, length):
4981
                array.append(StatusCode.from_binary(data))
4982
        self.Results = array
4983
        length = uatype_Int32.unpack(data.read(4))[0]
4984
        array = []
4985
        if length != -1:
4986
            for _ in range(0, length):
4987
                array.append(DiagnosticInfo.from_binary(data))
4988
        self.DiagnosticInfos = array
4989
4990
    def __str__(self):
4991
        return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4992
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
4993
               'Results:' + str(self.Results) + ', ' + \
4994
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
4995
4996
    __repr__ = __str__
4997
4998
@@ 4746-4808 (lines=63) @@
4743
4744
    __repr__ = __str__
4745
4746
4747
class AddReferencesResponse(FrozenClass):
4748
    '''
4749
    Adds one or more references to the server address space.
4750
4751
    :ivar TypeId:
4752
    :vartype TypeId: NodeId
4753
    :ivar ResponseHeader:
4754
    :vartype ResponseHeader: ResponseHeader
4755
    :ivar Results:
4756
    :vartype Results: StatusCode
4757
    :ivar DiagnosticInfos:
4758
    :vartype DiagnosticInfos: DiagnosticInfo
4759
    '''
4760
    def __init__(self, binary=None):
4761
        if binary is not None:
4762
            self._binary_init(binary)
4763
            self._freeze = True
4764
            return
4765
        self.TypeId = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary)
4766
        self.ResponseHeader = ResponseHeader()
4767
        self.Results = []
4768
        self.DiagnosticInfos = []
4769
        self._freeze = True
4770
4771
    def to_binary(self):
4772
        packet = []
4773
        packet.append(self.TypeId.to_binary())
4774
        packet.append(self.ResponseHeader.to_binary())
4775
        packet.append(uatype_Int32.pack(len(self.Results)))
4776
        for fieldname in self.Results:
4777
            packet.append(fieldname.to_binary())
4778
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
4779
        for fieldname in self.DiagnosticInfos:
4780
            packet.append(fieldname.to_binary())
4781
        return b''.join(packet)
4782
4783
    @staticmethod
4784
    def from_binary(data):
4785
        return AddReferencesResponse(data)
4786
4787
    def _binary_init(self, data):
4788
        self.TypeId = NodeId.from_binary(data)
4789
        self.ResponseHeader = ResponseHeader.from_binary(data)
4790
        length = uatype_Int32.unpack(data.read(4))[0]
4791
        array = []
4792
        if length != -1:
4793
            for _ in range(0, length):
4794
                array.append(StatusCode.from_binary(data))
4795
        self.Results = array
4796
        length = uatype_Int32.unpack(data.read(4))[0]
4797
        array = []
4798
        if length != -1:
4799
            for _ in range(0, length):
4800
                array.append(DiagnosticInfo.from_binary(data))
4801
        self.DiagnosticInfos = array
4802
4803
    def __str__(self):
4804
        return 'AddReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4805
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
4806
               'Results:' + str(self.Results) + ', ' + \
4807
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
4808
4809
    __repr__ = __str__
4810
4811
@@ 4566-4628 (lines=63) @@
4563
4564
    __repr__ = __str__
4565
4566
4567
class AddNodesResponse(FrozenClass):
4568
    '''
4569
    Adds one or more nodes to the server address space.
4570
4571
    :ivar TypeId:
4572
    :vartype TypeId: NodeId
4573
    :ivar ResponseHeader:
4574
    :vartype ResponseHeader: ResponseHeader
4575
    :ivar Results:
4576
    :vartype Results: AddNodesResult
4577
    :ivar DiagnosticInfos:
4578
    :vartype DiagnosticInfos: DiagnosticInfo
4579
    '''
4580
    def __init__(self, binary=None):
4581
        if binary is not None:
4582
            self._binary_init(binary)
4583
            self._freeze = True
4584
            return
4585
        self.TypeId = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary)
4586
        self.ResponseHeader = ResponseHeader()
4587
        self.Results = []
4588
        self.DiagnosticInfos = []
4589
        self._freeze = True
4590
4591
    def to_binary(self):
4592
        packet = []
4593
        packet.append(self.TypeId.to_binary())
4594
        packet.append(self.ResponseHeader.to_binary())
4595
        packet.append(uatype_Int32.pack(len(self.Results)))
4596
        for fieldname in self.Results:
4597
            packet.append(fieldname.to_binary())
4598
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
4599
        for fieldname in self.DiagnosticInfos:
4600
            packet.append(fieldname.to_binary())
4601
        return b''.join(packet)
4602
4603
    @staticmethod
4604
    def from_binary(data):
4605
        return AddNodesResponse(data)
4606
4607
    def _binary_init(self, data):
4608
        self.TypeId = NodeId.from_binary(data)
4609
        self.ResponseHeader = ResponseHeader.from_binary(data)
4610
        length = uatype_Int32.unpack(data.read(4))[0]
4611
        array = []
4612
        if length != -1:
4613
            for _ in range(0, length):
4614
                array.append(AddNodesResult.from_binary(data))
4615
        self.Results = array
4616
        length = uatype_Int32.unpack(data.read(4))[0]
4617
        array = []
4618
        if length != -1:
4619
            for _ in range(0, length):
4620
                array.append(DiagnosticInfo.from_binary(data))
4621
        self.DiagnosticInfos = array
4622
4623
    def __str__(self):
4624
        return 'AddNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
4625
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
4626
               'Results:' + str(self.Results) + ', ' + \
4627
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
4628
4629
    __repr__ = __str__
4630
4631
@@ 12506-12566 (lines=61) @@
12503
12504
    __repr__ = __str__
12505
12506
12507
class DeleteSubscriptionsResponse(FrozenClass):
12508
    '''
12509
    :ivar TypeId:
12510
    :vartype TypeId: NodeId
12511
    :ivar ResponseHeader:
12512
    :vartype ResponseHeader: ResponseHeader
12513
    :ivar Results:
12514
    :vartype Results: StatusCode
12515
    :ivar DiagnosticInfos:
12516
    :vartype DiagnosticInfos: DiagnosticInfo
12517
    '''
12518
    def __init__(self, binary=None):
12519
        if binary is not None:
12520
            self._binary_init(binary)
12521
            self._freeze = True
12522
            return
12523
        self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary)
12524
        self.ResponseHeader = ResponseHeader()
12525
        self.Results = []
12526
        self.DiagnosticInfos = []
12527
        self._freeze = True
12528
12529
    def to_binary(self):
12530
        packet = []
12531
        packet.append(self.TypeId.to_binary())
12532
        packet.append(self.ResponseHeader.to_binary())
12533
        packet.append(uatype_Int32.pack(len(self.Results)))
12534
        for fieldname in self.Results:
12535
            packet.append(fieldname.to_binary())
12536
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
12537
        for fieldname in self.DiagnosticInfos:
12538
            packet.append(fieldname.to_binary())
12539
        return b''.join(packet)
12540
12541
    @staticmethod
12542
    def from_binary(data):
12543
        return DeleteSubscriptionsResponse(data)
12544
12545
    def _binary_init(self, data):
12546
        self.TypeId = NodeId.from_binary(data)
12547
        self.ResponseHeader = ResponseHeader.from_binary(data)
12548
        length = uatype_Int32.unpack(data.read(4))[0]
12549
        array = []
12550
        if length != -1:
12551
            for _ in range(0, length):
12552
                array.append(StatusCode.from_binary(data))
12553
        self.Results = array
12554
        length = uatype_Int32.unpack(data.read(4))[0]
12555
        array = []
12556
        if length != -1:
12557
            for _ in range(0, length):
12558
                array.append(DiagnosticInfo.from_binary(data))
12559
        self.DiagnosticInfos = array
12560
12561
    def __str__(self):
12562
        return 'DeleteSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
12563
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
12564
               'Results:' + str(self.Results) + ', ' + \
12565
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
12566
12567
    __repr__ = __str__
12568
12569
@@ 10907-10967 (lines=61) @@
10904
10905
    __repr__ = __str__
10906
10907
10908
class DeleteMonitoredItemsResponse(FrozenClass):
10909
    '''
10910
    :ivar TypeId:
10911
    :vartype TypeId: NodeId
10912
    :ivar ResponseHeader:
10913
    :vartype ResponseHeader: ResponseHeader
10914
    :ivar Results:
10915
    :vartype Results: StatusCode
10916
    :ivar DiagnosticInfos:
10917
    :vartype DiagnosticInfos: DiagnosticInfo
10918
    '''
10919
    def __init__(self, binary=None):
10920
        if binary is not None:
10921
            self._binary_init(binary)
10922
            self._freeze = True
10923
            return
10924
        self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary)
10925
        self.ResponseHeader = ResponseHeader()
10926
        self.Results = []
10927
        self.DiagnosticInfos = []
10928
        self._freeze = True
10929
10930
    def to_binary(self):
10931
        packet = []
10932
        packet.append(self.TypeId.to_binary())
10933
        packet.append(self.ResponseHeader.to_binary())
10934
        packet.append(uatype_Int32.pack(len(self.Results)))
10935
        for fieldname in self.Results:
10936
            packet.append(fieldname.to_binary())
10937
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
10938
        for fieldname in self.DiagnosticInfos:
10939
            packet.append(fieldname.to_binary())
10940
        return b''.join(packet)
10941
10942
    @staticmethod
10943
    def from_binary(data):
10944
        return DeleteMonitoredItemsResponse(data)
10945
10946
    def _binary_init(self, data):
10947
        self.TypeId = NodeId.from_binary(data)
10948
        self.ResponseHeader = ResponseHeader.from_binary(data)
10949
        length = uatype_Int32.unpack(data.read(4))[0]
10950
        array = []
10951
        if length != -1:
10952
            for _ in range(0, length):
10953
                array.append(StatusCode.from_binary(data))
10954
        self.Results = array
10955
        length = uatype_Int32.unpack(data.read(4))[0]
10956
        array = []
10957
        if length != -1:
10958
            for _ in range(0, length):
10959
                array.append(DiagnosticInfo.from_binary(data))
10960
        self.DiagnosticInfos = array
10961
10962
    def __str__(self):
10963
        return 'DeleteMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10964
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10965
               'Results:' + str(self.Results) + ', ' + \
10966
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10967
10968
    __repr__ = __str__
10969
10970
@@ 10364-10424 (lines=61) @@
10361
10362
    __repr__ = __str__
10363
10364
10365
class ModifyMonitoredItemsResponse(FrozenClass):
10366
    '''
10367
    :ivar TypeId:
10368
    :vartype TypeId: NodeId
10369
    :ivar ResponseHeader:
10370
    :vartype ResponseHeader: ResponseHeader
10371
    :ivar Results:
10372
    :vartype Results: MonitoredItemModifyResult
10373
    :ivar DiagnosticInfos:
10374
    :vartype DiagnosticInfos: DiagnosticInfo
10375
    '''
10376
    def __init__(self, binary=None):
10377
        if binary is not None:
10378
            self._binary_init(binary)
10379
            self._freeze = True
10380
            return
10381
        self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary)
10382
        self.ResponseHeader = ResponseHeader()
10383
        self.Results = []
10384
        self.DiagnosticInfos = []
10385
        self._freeze = True
10386
10387
    def to_binary(self):
10388
        packet = []
10389
        packet.append(self.TypeId.to_binary())
10390
        packet.append(self.ResponseHeader.to_binary())
10391
        packet.append(uatype_Int32.pack(len(self.Results)))
10392
        for fieldname in self.Results:
10393
            packet.append(fieldname.to_binary())
10394
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
10395
        for fieldname in self.DiagnosticInfos:
10396
            packet.append(fieldname.to_binary())
10397
        return b''.join(packet)
10398
10399
    @staticmethod
10400
    def from_binary(data):
10401
        return ModifyMonitoredItemsResponse(data)
10402
10403
    def _binary_init(self, data):
10404
        self.TypeId = NodeId.from_binary(data)
10405
        self.ResponseHeader = ResponseHeader.from_binary(data)
10406
        length = uatype_Int32.unpack(data.read(4))[0]
10407
        array = []
10408
        if length != -1:
10409
            for _ in range(0, length):
10410
                array.append(MonitoredItemModifyResult.from_binary(data))
10411
        self.Results = array
10412
        length = uatype_Int32.unpack(data.read(4))[0]
10413
        array = []
10414
        if length != -1:
10415
            for _ in range(0, length):
10416
                array.append(DiagnosticInfo.from_binary(data))
10417
        self.DiagnosticInfos = array
10418
10419
    def __str__(self):
10420
        return 'ModifyMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10421
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10422
               'Results:' + str(self.Results) + ', ' + \
10423
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10424
10425
    __repr__ = __str__
10426
10427
@@ 10122-10182 (lines=61) @@
10119
10120
    __repr__ = __str__
10121
10122
10123
class CreateMonitoredItemsResponse(FrozenClass):
10124
    '''
10125
    :ivar TypeId:
10126
    :vartype TypeId: NodeId
10127
    :ivar ResponseHeader:
10128
    :vartype ResponseHeader: ResponseHeader
10129
    :ivar Results:
10130
    :vartype Results: MonitoredItemCreateResult
10131
    :ivar DiagnosticInfos:
10132
    :vartype DiagnosticInfos: DiagnosticInfo
10133
    '''
10134
    def __init__(self, binary=None):
10135
        if binary is not None:
10136
            self._binary_init(binary)
10137
            self._freeze = True
10138
            return
10139
        self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary)
10140
        self.ResponseHeader = ResponseHeader()
10141
        self.Results = []
10142
        self.DiagnosticInfos = []
10143
        self._freeze = True
10144
10145
    def to_binary(self):
10146
        packet = []
10147
        packet.append(self.TypeId.to_binary())
10148
        packet.append(self.ResponseHeader.to_binary())
10149
        packet.append(uatype_Int32.pack(len(self.Results)))
10150
        for fieldname in self.Results:
10151
            packet.append(fieldname.to_binary())
10152
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
10153
        for fieldname in self.DiagnosticInfos:
10154
            packet.append(fieldname.to_binary())
10155
        return b''.join(packet)
10156
10157
    @staticmethod
10158
    def from_binary(data):
10159
        return CreateMonitoredItemsResponse(data)
10160
10161
    def _binary_init(self, data):
10162
        self.TypeId = NodeId.from_binary(data)
10163
        self.ResponseHeader = ResponseHeader.from_binary(data)
10164
        length = uatype_Int32.unpack(data.read(4))[0]
10165
        array = []
10166
        if length != -1:
10167
            for _ in range(0, length):
10168
                array.append(MonitoredItemCreateResult.from_binary(data))
10169
        self.Results = array
10170
        length = uatype_Int32.unpack(data.read(4))[0]
10171
        array = []
10172
        if length != -1:
10173
            for _ in range(0, length):
10174
                array.append(DiagnosticInfo.from_binary(data))
10175
        self.DiagnosticInfos = array
10176
10177
    def __str__(self):
10178
        return 'CreateMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
10179
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
10180
               'Results:' + str(self.Results) + ', ' + \
10181
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
10182
10183
    __repr__ = __str__
10184
10185
@@ 9468-9528 (lines=61) @@
9465
9466
    __repr__ = __str__
9467
9468
9469
class CallResponse(FrozenClass):
9470
    '''
9471
    :ivar TypeId:
9472
    :vartype TypeId: NodeId
9473
    :ivar ResponseHeader:
9474
    :vartype ResponseHeader: ResponseHeader
9475
    :ivar Results:
9476
    :vartype Results: CallMethodResult
9477
    :ivar DiagnosticInfos:
9478
    :vartype DiagnosticInfos: DiagnosticInfo
9479
    '''
9480
    def __init__(self, binary=None):
9481
        if binary is not None:
9482
            self._binary_init(binary)
9483
            self._freeze = True
9484
            return
9485
        self.TypeId = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary)
9486
        self.ResponseHeader = ResponseHeader()
9487
        self.Results = []
9488
        self.DiagnosticInfos = []
9489
        self._freeze = True
9490
9491
    def to_binary(self):
9492
        packet = []
9493
        packet.append(self.TypeId.to_binary())
9494
        packet.append(self.ResponseHeader.to_binary())
9495
        packet.append(uatype_Int32.pack(len(self.Results)))
9496
        for fieldname in self.Results:
9497
            packet.append(fieldname.to_binary())
9498
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
9499
        for fieldname in self.DiagnosticInfos:
9500
            packet.append(fieldname.to_binary())
9501
        return b''.join(packet)
9502
9503
    @staticmethod
9504
    def from_binary(data):
9505
        return CallResponse(data)
9506
9507
    def _binary_init(self, data):
9508
        self.TypeId = NodeId.from_binary(data)
9509
        self.ResponseHeader = ResponseHeader.from_binary(data)
9510
        length = uatype_Int32.unpack(data.read(4))[0]
9511
        array = []
9512
        if length != -1:
9513
            for _ in range(0, length):
9514
                array.append(CallMethodResult.from_binary(data))
9515
        self.Results = array
9516
        length = uatype_Int32.unpack(data.read(4))[0]
9517
        array = []
9518
        if length != -1:
9519
            for _ in range(0, length):
9520
                array.append(DiagnosticInfo.from_binary(data))
9521
        self.DiagnosticInfos = array
9522
9523
    def __str__(self):
9524
        return 'CallResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9525
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9526
               'Results:' + str(self.Results) + ', ' + \
9527
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9528
9529
    __repr__ = __str__
9530
9531
@@ 9204-9264 (lines=61) @@
9201
9202
    __repr__ = __str__
9203
9204
9205
class HistoryUpdateResponse(FrozenClass):
9206
    '''
9207
    :ivar TypeId:
9208
    :vartype TypeId: NodeId
9209
    :ivar ResponseHeader:
9210
    :vartype ResponseHeader: ResponseHeader
9211
    :ivar Results:
9212
    :vartype Results: HistoryUpdateResult
9213
    :ivar DiagnosticInfos:
9214
    :vartype DiagnosticInfos: DiagnosticInfo
9215
    '''
9216
    def __init__(self, binary=None):
9217
        if binary is not None:
9218
            self._binary_init(binary)
9219
            self._freeze = True
9220
            return
9221
        self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary)
9222
        self.ResponseHeader = ResponseHeader()
9223
        self.Results = []
9224
        self.DiagnosticInfos = []
9225
        self._freeze = True
9226
9227
    def to_binary(self):
9228
        packet = []
9229
        packet.append(self.TypeId.to_binary())
9230
        packet.append(self.ResponseHeader.to_binary())
9231
        packet.append(uatype_Int32.pack(len(self.Results)))
9232
        for fieldname in self.Results:
9233
            packet.append(fieldname.to_binary())
9234
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
9235
        for fieldname in self.DiagnosticInfos:
9236
            packet.append(fieldname.to_binary())
9237
        return b''.join(packet)
9238
9239
    @staticmethod
9240
    def from_binary(data):
9241
        return HistoryUpdateResponse(data)
9242
9243
    def _binary_init(self, data):
9244
        self.TypeId = NodeId.from_binary(data)
9245
        self.ResponseHeader = ResponseHeader.from_binary(data)
9246
        length = uatype_Int32.unpack(data.read(4))[0]
9247
        array = []
9248
        if length != -1:
9249
            for _ in range(0, length):
9250
                array.append(HistoryUpdateResult.from_binary(data))
9251
        self.Results = array
9252
        length = uatype_Int32.unpack(data.read(4))[0]
9253
        array = []
9254
        if length != -1:
9255
            for _ in range(0, length):
9256
                array.append(DiagnosticInfo.from_binary(data))
9257
        self.DiagnosticInfos = array
9258
9259
    def __str__(self):
9260
        return 'HistoryUpdateResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9261
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9262
               'Results:' + str(self.Results) + ', ' + \
9263
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9264
9265
    __repr__ = __str__
9266
9267
@@ 8689-8749 (lines=61) @@
8686
8687
    __repr__ = __str__
8688
8689
8690
class WriteResponse(FrozenClass):
8691
    '''
8692
    :ivar TypeId:
8693
    :vartype TypeId: NodeId
8694
    :ivar ResponseHeader:
8695
    :vartype ResponseHeader: ResponseHeader
8696
    :ivar Results:
8697
    :vartype Results: StatusCode
8698
    :ivar DiagnosticInfos:
8699
    :vartype DiagnosticInfos: DiagnosticInfo
8700
    '''
8701
    def __init__(self, binary=None):
8702
        if binary is not None:
8703
            self._binary_init(binary)
8704
            self._freeze = True
8705
            return
8706
        self.TypeId = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary)
8707
        self.ResponseHeader = ResponseHeader()
8708
        self.Results = []
8709
        self.DiagnosticInfos = []
8710
        self._freeze = True
8711
8712
    def to_binary(self):
8713
        packet = []
8714
        packet.append(self.TypeId.to_binary())
8715
        packet.append(self.ResponseHeader.to_binary())
8716
        packet.append(uatype_Int32.pack(len(self.Results)))
8717
        for fieldname in self.Results:
8718
            packet.append(fieldname.to_binary())
8719
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
8720
        for fieldname in self.DiagnosticInfos:
8721
            packet.append(fieldname.to_binary())
8722
        return b''.join(packet)
8723
8724
    @staticmethod
8725
    def from_binary(data):
8726
        return WriteResponse(data)
8727
8728
    def _binary_init(self, data):
8729
        self.TypeId = NodeId.from_binary(data)
8730
        self.ResponseHeader = ResponseHeader.from_binary(data)
8731
        length = uatype_Int32.unpack(data.read(4))[0]
8732
        array = []
8733
        if length != -1:
8734
            for _ in range(0, length):
8735
                array.append(StatusCode.from_binary(data))
8736
        self.Results = array
8737
        length = uatype_Int32.unpack(data.read(4))[0]
8738
        array = []
8739
        if length != -1:
8740
            for _ in range(0, length):
8741
                array.append(DiagnosticInfo.from_binary(data))
8742
        self.DiagnosticInfos = array
8743
8744
    def __str__(self):
8745
        return 'WriteResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8746
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8747
               'Results:' + str(self.Results) + ', ' + \
8748
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
8749
8750
    __repr__ = __str__
8751
8752
@@ 8496-8556 (lines=61) @@
8493
8494
    __repr__ = __str__
8495
8496
8497
class HistoryReadResponse(FrozenClass):
8498
    '''
8499
    :ivar TypeId:
8500
    :vartype TypeId: NodeId
8501
    :ivar ResponseHeader:
8502
    :vartype ResponseHeader: ResponseHeader
8503
    :ivar Results:
8504
    :vartype Results: HistoryReadResult
8505
    :ivar DiagnosticInfos:
8506
    :vartype DiagnosticInfos: DiagnosticInfo
8507
    '''
8508
    def __init__(self, binary=None):
8509
        if binary is not None:
8510
            self._binary_init(binary)
8511
            self._freeze = True
8512
            return
8513
        self.TypeId = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary)
8514
        self.ResponseHeader = ResponseHeader()
8515
        self.Results = []
8516
        self.DiagnosticInfos = []
8517
        self._freeze = True
8518
8519
    def to_binary(self):
8520
        packet = []
8521
        packet.append(self.TypeId.to_binary())
8522
        packet.append(self.ResponseHeader.to_binary())
8523
        packet.append(uatype_Int32.pack(len(self.Results)))
8524
        for fieldname in self.Results:
8525
            packet.append(fieldname.to_binary())
8526
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
8527
        for fieldname in self.DiagnosticInfos:
8528
            packet.append(fieldname.to_binary())
8529
        return b''.join(packet)
8530
8531
    @staticmethod
8532
    def from_binary(data):
8533
        return HistoryReadResponse(data)
8534
8535
    def _binary_init(self, data):
8536
        self.TypeId = NodeId.from_binary(data)
8537
        self.ResponseHeader = ResponseHeader.from_binary(data)
8538
        length = uatype_Int32.unpack(data.read(4))[0]
8539
        array = []
8540
        if length != -1:
8541
            for _ in range(0, length):
8542
                array.append(HistoryReadResult.from_binary(data))
8543
        self.Results = array
8544
        length = uatype_Int32.unpack(data.read(4))[0]
8545
        array = []
8546
        if length != -1:
8547
            for _ in range(0, length):
8548
                array.append(DiagnosticInfo.from_binary(data))
8549
        self.DiagnosticInfos = array
8550
8551
    def __str__(self):
8552
        return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8553
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8554
               'Results:' + str(self.Results) + ', ' + \
8555
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
8556
8557
    __repr__ = __str__
8558
8559
@@ 7840-7900 (lines=61) @@
7837
7838
    __repr__ = __str__
7839
7840
7841
class ReadResponse(FrozenClass):
7842
    '''
7843
    :ivar TypeId:
7844
    :vartype TypeId: NodeId
7845
    :ivar ResponseHeader:
7846
    :vartype ResponseHeader: ResponseHeader
7847
    :ivar Results:
7848
    :vartype Results: DataValue
7849
    :ivar DiagnosticInfos:
7850
    :vartype DiagnosticInfos: DiagnosticInfo
7851
    '''
7852
    def __init__(self, binary=None):
7853
        if binary is not None:
7854
            self._binary_init(binary)
7855
            self._freeze = True
7856
            return
7857
        self.TypeId = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary)
7858
        self.ResponseHeader = ResponseHeader()
7859
        self.Results = []
7860
        self.DiagnosticInfos = []
7861
        self._freeze = True
7862
7863
    def to_binary(self):
7864
        packet = []
7865
        packet.append(self.TypeId.to_binary())
7866
        packet.append(self.ResponseHeader.to_binary())
7867
        packet.append(uatype_Int32.pack(len(self.Results)))
7868
        for fieldname in self.Results:
7869
            packet.append(fieldname.to_binary())
7870
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
7871
        for fieldname in self.DiagnosticInfos:
7872
            packet.append(fieldname.to_binary())
7873
        return b''.join(packet)
7874
7875
    @staticmethod
7876
    def from_binary(data):
7877
        return ReadResponse(data)
7878
7879
    def _binary_init(self, data):
7880
        self.TypeId = NodeId.from_binary(data)
7881
        self.ResponseHeader = ResponseHeader.from_binary(data)
7882
        length = uatype_Int32.unpack(data.read(4))[0]
7883
        array = []
7884
        if length != -1:
7885
            for _ in range(0, length):
7886
                array.append(DataValue.from_binary(data))
7887
        self.Results = array
7888
        length = uatype_Int32.unpack(data.read(4))[0]
7889
        array = []
7890
        if length != -1:
7891
            for _ in range(0, length):
7892
                array.append(DiagnosticInfo.from_binary(data))
7893
        self.DiagnosticInfos = array
7894
7895
    def __str__(self):
7896
        return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
7897
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
7898
               'Results:' + str(self.Results) + ', ' + \
7899
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
7900
7901
    __repr__ = __str__
7902
7903
@@ 2321-2381 (lines=61) @@
2318
2319
    __repr__ = __str__
2320
2321
2322
class RegisterServer2Response(FrozenClass):
2323
    '''
2324
    :ivar TypeId:
2325
    :vartype TypeId: NodeId
2326
    :ivar ResponseHeader:
2327
    :vartype ResponseHeader: ResponseHeader
2328
    :ivar ConfigurationResults:
2329
    :vartype ConfigurationResults: StatusCode
2330
    :ivar DiagnosticInfos:
2331
    :vartype DiagnosticInfos: DiagnosticInfo
2332
    '''
2333
    def __init__(self, binary=None):
2334
        if binary is not None:
2335
            self._binary_init(binary)
2336
            self._freeze = True
2337
            return
2338
        self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary)
2339
        self.ResponseHeader = ResponseHeader()
2340
        self.ConfigurationResults = []
2341
        self.DiagnosticInfos = []
2342
        self._freeze = True
2343
2344
    def to_binary(self):
2345
        packet = []
2346
        packet.append(self.TypeId.to_binary())
2347
        packet.append(self.ResponseHeader.to_binary())
2348
        packet.append(uatype_Int32.pack(len(self.ConfigurationResults)))
2349
        for fieldname in self.ConfigurationResults:
2350
            packet.append(fieldname.to_binary())
2351
        packet.append(uatype_Int32.pack(len(self.DiagnosticInfos)))
2352
        for fieldname in self.DiagnosticInfos:
2353
            packet.append(fieldname.to_binary())
2354
        return b''.join(packet)
2355
2356
    @staticmethod
2357
    def from_binary(data):
2358
        return RegisterServer2Response(data)
2359
2360
    def _binary_init(self, data):
2361
        self.TypeId = NodeId.from_binary(data)
2362
        self.ResponseHeader = ResponseHeader.from_binary(data)
2363
        length = uatype_Int32.unpack(data.read(4))[0]
2364
        array = []
2365
        if length != -1:
2366
            for _ in range(0, length):
2367
                array.append(StatusCode.from_binary(data))
2368
        self.ConfigurationResults = array
2369
        length = uatype_Int32.unpack(data.read(4))[0]
2370
        array = []
2371
        if length != -1:
2372
            for _ in range(0, length):
2373
                array.append(DiagnosticInfo.from_binary(data))
2374
        self.DiagnosticInfos = array
2375
2376
    def __str__(self):
2377
        return 'RegisterServer2Response(' + 'TypeId:' + str(self.TypeId) + ', ' + \
2378
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
2379
               'ConfigurationResults:' + str(self.ConfigurationResults) + ', ' + \
2380
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
2381
2382
    __repr__ = __str__
2383
2384