Code Duplication    Length = 48-64 lines in 13 locations

opcua/ua/uaprotocol_auto.py 13 locations

@@ 6563-6619 (lines=57) @@
6560
        'TypeId': 'NodeId',
6561
        'ResponseHeader': 'ResponseHeader',
6562
        'Parameters': 'BrowseNextResult',
6563
               }
6564
6565
    def __init__(self, binary=None):
6566
        if binary is not None:
6567
            self._binary_init(binary)
6568
            self._freeze = True
6569
            return
6570
        self.TypeId = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary)
6571
        self.ResponseHeader = ResponseHeader()
6572
        self.Parameters = BrowseNextResult()
6573
        self._freeze = True
6574
6575
    def to_binary(self):
6576
        packet = []
6577
        packet.append(self.TypeId.to_binary())
6578
        packet.append(self.ResponseHeader.to_binary())
6579
        packet.append(self.Parameters.to_binary())
6580
        return b''.join(packet)
6581
6582
    @staticmethod
6583
    def from_binary(data):
6584
        return BrowseNextResponse(data)
6585
6586
    def _binary_init(self, data):
6587
        self.TypeId = NodeId.from_binary(data)
6588
        self.ResponseHeader = ResponseHeader.from_binary(data)
6589
        self.Parameters = BrowseNextResult.from_binary(data)
6590
6591
    def __str__(self):
6592
        return 'BrowseNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
6593
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
6594
               'Parameters:' + str(self.Parameters) + ')'
6595
6596
    __repr__ = __str__
6597
6598
6599
class RelativePathElement(FrozenClass):
6600
    '''
6601
    An element in a relative path.
6602
6603
    :ivar ReferenceTypeId:
6604
    :vartype ReferenceTypeId: NodeId
6605
    :ivar IsInverse:
6606
    :vartype IsInverse: Boolean
6607
    :ivar IncludeSubtypes:
6608
    :vartype IncludeSubtypes: Boolean
6609
    :ivar TargetName:
6610
    :vartype TargetName: QualifiedName
6611
    '''
6612
6613
    ua_types = {
6614
        'ReferenceTypeId': 'NodeId',
6615
        'IsInverse': 'Boolean',
6616
        'IncludeSubtypes': 'Boolean',
6617
        'TargetName': 'QualifiedName',
6618
               }
6619
6620
    def __init__(self, binary=None):
6621
        if binary is not None:
6622
            self._binary_init(binary)
@@ 15666-15720 (lines=55) @@
15663
    :ivar High:
15664
    :vartype High: Double
15665
    '''
15666
15667
    ua_types = {
15668
        'Low': 'Double',
15669
        'High': 'Double',
15670
               }
15671
15672
    def __init__(self, binary=None):
15673
        if binary is not None:
15674
            self._binary_init(binary)
15675
            self._freeze = True
15676
            return
15677
        self.Low = 0
15678
        self.High = 0
15679
        self._freeze = True
15680
15681
    def to_binary(self):
15682
        packet = []
15683
        packet.append(uabin.Primitives.Double.pack(self.Low))
15684
        packet.append(uabin.Primitives.Double.pack(self.High))
15685
        return b''.join(packet)
15686
15687
    @staticmethod
15688
    def from_binary(data):
15689
        return Range(data)
15690
15691
    def _binary_init(self, data):
15692
        self.Low = uabin.Primitives.Double.unpack(data)
15693
        self.High = uabin.Primitives.Double.unpack(data)
15694
15695
    def __str__(self):
15696
        return 'Range(' + 'Low:' + str(self.Low) + ', ' + \
15697
               'High:' + str(self.High) + ')'
15698
15699
    __repr__ = __str__
15700
15701
15702
class EUInformation(FrozenClass):
15703
    '''
15704
    :ivar NamespaceUri:
15705
    :vartype NamespaceUri: String
15706
    :ivar UnitId:
15707
    :vartype UnitId: Int32
15708
    :ivar DisplayName:
15709
    :vartype DisplayName: LocalizedText
15710
    :ivar Description:
15711
    :vartype Description: LocalizedText
15712
    '''
15713
15714
    ua_types = {
15715
        'NamespaceUri': 'String',
15716
        'UnitId': 'Int32',
15717
        'DisplayName': 'LocalizedText',
15718
        'Description': 'LocalizedText',
15719
               }
15720
15721
    def __init__(self, binary=None):
15722
        if binary is not None:
15723
            self._binary_init(binary)
@@ 11626-11680 (lines=55) @@
11623
    :ivar RequestedParameters:
11624
    :vartype RequestedParameters: MonitoringParameters
11625
    '''
11626
11627
    ua_types = {
11628
        'MonitoredItemId': 'UInt32',
11629
        'RequestedParameters': 'MonitoringParameters',
11630
               }
11631
11632
    def __init__(self, binary=None):
11633
        if binary is not None:
11634
            self._binary_init(binary)
11635
            self._freeze = True
11636
            return
11637
        self.MonitoredItemId = 0
11638
        self.RequestedParameters = MonitoringParameters()
11639
        self._freeze = True
11640
11641
    def to_binary(self):
11642
        packet = []
11643
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId))
11644
        packet.append(self.RequestedParameters.to_binary())
11645
        return b''.join(packet)
11646
11647
    @staticmethod
11648
    def from_binary(data):
11649
        return MonitoredItemModifyRequest(data)
11650
11651
    def _binary_init(self, data):
11652
        self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data)
11653
        self.RequestedParameters = MonitoringParameters.from_binary(data)
11654
11655
    def __str__(self):
11656
        return 'MonitoredItemModifyRequest(' + 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \
11657
               'RequestedParameters:' + str(self.RequestedParameters) + ')'
11658
11659
    __repr__ = __str__
11660
11661
11662
class MonitoredItemModifyResult(FrozenClass):
11663
    '''
11664
    :ivar StatusCode:
11665
    :vartype StatusCode: StatusCode
11666
    :ivar RevisedSamplingInterval:
11667
    :vartype RevisedSamplingInterval: Double
11668
    :ivar RevisedQueueSize:
11669
    :vartype RevisedQueueSize: UInt32
11670
    :ivar FilterResult:
11671
    :vartype FilterResult: ExtensionObject
11672
    '''
11673
11674
    ua_types = {
11675
        'StatusCode': 'StatusCode',
11676
        'RevisedSamplingInterval': 'Double',
11677
        'RevisedQueueSize': 'UInt32',
11678
        'FilterResult': 'ExtensionObject',
11679
               }
11680
11681
    def __init__(self, binary=None):
11682
        if binary is not None:
11683
            self._binary_init(binary)
@@ 9721-9775 (lines=55) @@
9718
        packet.append(self.TypeId.to_binary())
9719
        packet.append(self.ResponseHeader.to_binary())
9720
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
9721
        for fieldname in self.Results:
9722
            packet.append(fieldname.to_binary())
9723
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
9724
        for fieldname in self.DiagnosticInfos:
9725
            packet.append(fieldname.to_binary())
9726
        return b''.join(packet)
9727
9728
    @staticmethod
9729
    def from_binary(data):
9730
        return HistoryReadResponse(data)
9731
9732
    def _binary_init(self, data):
9733
        self.TypeId = NodeId.from_binary(data)
9734
        self.ResponseHeader = ResponseHeader.from_binary(data)
9735
        length = uabin.Primitives.Int32.unpack(data)
9736
        array = []
9737
        if length != -1:
9738
            for _ in range(0, length):
9739
                array.append(HistoryReadResult.from_binary(data))
9740
        self.Results = array
9741
        length = uabin.Primitives.Int32.unpack(data)
9742
        array = []
9743
        if length != -1:
9744
            for _ in range(0, length):
9745
                array.append(DiagnosticInfo.from_binary(data))
9746
        self.DiagnosticInfos = array
9747
9748
    def __str__(self):
9749
        return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
9750
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
9751
               'Results:' + str(self.Results) + ', ' + \
9752
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9753
9754
    __repr__ = __str__
9755
9756
9757
class WriteValue(FrozenClass):
9758
    '''
9759
    :ivar NodeId:
9760
    :vartype NodeId: NodeId
9761
    :ivar AttributeId:
9762
    :vartype AttributeId: UInt32
9763
    :ivar IndexRange:
9764
    :vartype IndexRange: String
9765
    :ivar Value:
9766
    :vartype Value: DataValue
9767
    '''
9768
9769
    ua_types = {
9770
        'NodeId': 'NodeId',
9771
        'AttributeId': 'UInt32',
9772
        'IndexRange': 'String',
9773
        'Value': 'DataValue',
9774
               }
9775
9776
    def __init__(self, binary=None):
9777
        if binary is not None:
9778
            self._binary_init(binary)
@@ 8968-9022 (lines=55) @@
8965
        packet.append(self.TypeId.to_binary())
8966
        packet.append(self.ResponseHeader.to_binary())
8967
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
8968
        for fieldname in self.Results:
8969
            packet.append(fieldname.to_binary())
8970
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
8971
        for fieldname in self.DiagnosticInfos:
8972
            packet.append(fieldname.to_binary())
8973
        return b''.join(packet)
8974
8975
    @staticmethod
8976
    def from_binary(data):
8977
        return ReadResponse(data)
8978
8979
    def _binary_init(self, data):
8980
        self.TypeId = NodeId.from_binary(data)
8981
        self.ResponseHeader = ResponseHeader.from_binary(data)
8982
        length = uabin.Primitives.Int32.unpack(data)
8983
        array = []
8984
        if length != -1:
8985
            for _ in range(0, length):
8986
                array.append(DataValue.from_binary(data))
8987
        self.Results = array
8988
        length = uabin.Primitives.Int32.unpack(data)
8989
        array = []
8990
        if length != -1:
8991
            for _ in range(0, length):
8992
                array.append(DiagnosticInfo.from_binary(data))
8993
        self.DiagnosticInfos = array
8994
8995
    def __str__(self):
8996
        return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8997
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8998
               'Results:' + str(self.Results) + ', ' + \
8999
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
9000
9001
    __repr__ = __str__
9002
9003
9004
class HistoryReadValueId(FrozenClass):
9005
    '''
9006
    :ivar NodeId:
9007
    :vartype NodeId: NodeId
9008
    :ivar IndexRange:
9009
    :vartype IndexRange: String
9010
    :ivar DataEncoding:
9011
    :vartype DataEncoding: QualifiedName
9012
    :ivar ContinuationPoint:
9013
    :vartype ContinuationPoint: ByteString
9014
    '''
9015
9016
    ua_types = {
9017
        'NodeId': 'NodeId',
9018
        'IndexRange': 'String',
9019
        'DataEncoding': 'QualifiedName',
9020
        'ContinuationPoint': 'ByteString',
9021
               }
9022
9023
    def __init__(self, binary=None):
9024
        if binary is not None:
9025
            self._binary_init(binary)
@@ 8733-8787 (lines=55) @@
8730
        'TypeId': 'NodeId',
8731
        'ResponseHeader': 'ResponseHeader',
8732
        'Parameters': 'QueryNextResult',
8733
               }
8734
8735
    def __init__(self, binary=None):
8736
        if binary is not None:
8737
            self._binary_init(binary)
8738
            self._freeze = True
8739
            return
8740
        self.TypeId = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary)
8741
        self.ResponseHeader = ResponseHeader()
8742
        self.Parameters = QueryNextResult()
8743
        self._freeze = True
8744
8745
    def to_binary(self):
8746
        packet = []
8747
        packet.append(self.TypeId.to_binary())
8748
        packet.append(self.ResponseHeader.to_binary())
8749
        packet.append(self.Parameters.to_binary())
8750
        return b''.join(packet)
8751
8752
    @staticmethod
8753
    def from_binary(data):
8754
        return QueryNextResponse(data)
8755
8756
    def _binary_init(self, data):
8757
        self.TypeId = NodeId.from_binary(data)
8758
        self.ResponseHeader = ResponseHeader.from_binary(data)
8759
        self.Parameters = QueryNextResult.from_binary(data)
8760
8761
    def __str__(self):
8762
        return 'QueryNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
8763
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
8764
               'Parameters:' + str(self.Parameters) + ')'
8765
8766
    __repr__ = __str__
8767
8768
8769
class ReadValueId(FrozenClass):
8770
    '''
8771
    :ivar NodeId:
8772
    :vartype NodeId: NodeId
8773
    :ivar AttributeId:
8774
    :vartype AttributeId: UInt32
8775
    :ivar IndexRange:
8776
    :vartype IndexRange: String
8777
    :ivar DataEncoding:
8778
    :vartype DataEncoding: QualifiedName
8779
    '''
8780
8781
    ua_types = {
8782
        'NodeId': 'NodeId',
8783
        'AttributeId': 'UInt32',
8784
        'IndexRange': 'String',
8785
        'DataEncoding': 'QualifiedName',
8786
               }
8787
8788
    def __init__(self, binary=None):
8789
        if binary is not None:
8790
            self._binary_init(binary)
@@ 5641-5704 (lines=64) @@
5638
        packet.append(self.TypeId.to_binary())
5639
        packet.append(self.ResponseHeader.to_binary())
5640
        packet.append(uabin.Primitives.Int32.pack(len(self.Results)))
5641
        for fieldname in self.Results:
5642
            packet.append(fieldname.to_binary())
5643
        packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos)))
5644
        for fieldname in self.DiagnosticInfos:
5645
            packet.append(fieldname.to_binary())
5646
        return b''.join(packet)
5647
5648
    @staticmethod
5649
    def from_binary(data):
5650
        return DeleteNodesResponse(data)
5651
5652
    def _binary_init(self, data):
5653
        self.TypeId = NodeId.from_binary(data)
5654
        self.ResponseHeader = ResponseHeader.from_binary(data)
5655
        length = uabin.Primitives.Int32.unpack(data)
5656
        array = []
5657
        if length != -1:
5658
            for _ in range(0, length):
5659
                array.append(StatusCode.from_binary(data))
5660
        self.Results = array
5661
        length = uabin.Primitives.Int32.unpack(data)
5662
        array = []
5663
        if length != -1:
5664
            for _ in range(0, length):
5665
                array.append(DiagnosticInfo.from_binary(data))
5666
        self.DiagnosticInfos = array
5667
5668
    def __str__(self):
5669
        return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \
5670
               'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \
5671
               'Results:' + str(self.Results) + ', ' + \
5672
               'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')'
5673
5674
    __repr__ = __str__
5675
5676
5677
class DeleteReferencesItem(FrozenClass):
5678
    '''
5679
    A request to delete a node from the server address space.
5680
5681
    :ivar SourceNodeId:
5682
    :vartype SourceNodeId: NodeId
5683
    :ivar ReferenceTypeId:
5684
    :vartype ReferenceTypeId: NodeId
5685
    :ivar IsForward:
5686
    :vartype IsForward: Boolean
5687
    :ivar TargetNodeId:
5688
    :vartype TargetNodeId: ExpandedNodeId
5689
    :ivar DeleteBidirectional:
5690
    :vartype DeleteBidirectional: Boolean
5691
    '''
5692
5693
    ua_types = {
5694
        'SourceNodeId': 'NodeId',
5695
        'ReferenceTypeId': 'NodeId',
5696
        'IsForward': 'Boolean',
5697
        'TargetNodeId': 'ExpandedNodeId',
5698
        'DeleteBidirectional': 'Boolean',
5699
               }
5700
5701
    def __init__(self, binary=None):
5702
        if binary is not None:
5703
            self._binary_init(binary)
5704
            self._freeze = True
5705
            return
5706
        self.SourceNodeId = NodeId()
5707
        self.ReferenceTypeId = NodeId()
@@ 14393-14440 (lines=48) @@
14390
        self.ProductName = None
14391
        self.SoftwareVersion = None
14392
        self.BuildNumber = None
14393
        self.BuildDate = datetime.utcnow()
14394
        self._freeze = True
14395
14396
    def to_binary(self):
14397
        packet = []
14398
        packet.append(uabin.Primitives.String.pack(self.ProductUri))
14399
        packet.append(uabin.Primitives.String.pack(self.ManufacturerName))
14400
        packet.append(uabin.Primitives.String.pack(self.ProductName))
14401
        packet.append(uabin.Primitives.String.pack(self.SoftwareVersion))
14402
        packet.append(uabin.Primitives.String.pack(self.BuildNumber))
14403
        packet.append(uabin.Primitives.DateTime.pack(self.BuildDate))
14404
        return b''.join(packet)
14405
14406
    @staticmethod
14407
    def from_binary(data):
14408
        return BuildInfo(data)
14409
14410
    def _binary_init(self, data):
14411
        self.ProductUri = uabin.Primitives.String.unpack(data)
14412
        self.ManufacturerName = uabin.Primitives.String.unpack(data)
14413
        self.ProductName = uabin.Primitives.String.unpack(data)
14414
        self.SoftwareVersion = uabin.Primitives.String.unpack(data)
14415
        self.BuildNumber = uabin.Primitives.String.unpack(data)
14416
        self.BuildDate = uabin.Primitives.DateTime.unpack(data)
14417
14418
    def __str__(self):
14419
        return 'BuildInfo(' + 'ProductUri:' + str(self.ProductUri) + ', ' + \
14420
               'ManufacturerName:' + str(self.ManufacturerName) + ', ' + \
14421
               'ProductName:' + str(self.ProductName) + ', ' + \
14422
               'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \
14423
               'BuildNumber:' + str(self.BuildNumber) + ', ' + \
14424
               'BuildDate:' + str(self.BuildDate) + ')'
14425
14426
    __repr__ = __str__
14427
14428
14429
class RedundantServerDataType(FrozenClass):
14430
    '''
14431
    :ivar ServerId:
14432
    :vartype ServerId: String
14433
    :ivar ServiceLevel:
14434
    :vartype ServiceLevel: Byte
14435
    :ivar ServerState:
14436
    :vartype ServerState: ServerState
14437
    '''
14438
14439
    ua_types = {
14440
        'ServerId': 'String',
14441
        'ServiceLevel': 'Byte',
14442
        'ServerState': 'ServerState',
14443
               }
@@ 11025-11079 (lines=55) @@
11022
            self._freeze = True
11023
            return
11024
        self.UseServerCapabilitiesDefaults = True
11025
        self.TreatUncertainAsBad = True
11026
        self.PercentDataBad = 0
11027
        self.PercentDataGood = 0
11028
        self.UseSlopedExtrapolation = True
11029
        self._freeze = True
11030
11031
    def to_binary(self):
11032
        packet = []
11033
        packet.append(uabin.Primitives.Boolean.pack(self.UseServerCapabilitiesDefaults))
11034
        packet.append(uabin.Primitives.Boolean.pack(self.TreatUncertainAsBad))
11035
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataBad))
11036
        packet.append(uabin.Primitives.Byte.pack(self.PercentDataGood))
11037
        packet.append(uabin.Primitives.Boolean.pack(self.UseSlopedExtrapolation))
11038
        return b''.join(packet)
11039
11040
    @staticmethod
11041
    def from_binary(data):
11042
        return AggregateConfiguration(data)
11043
11044
    def _binary_init(self, data):
11045
        self.UseServerCapabilitiesDefaults = uabin.Primitives.Boolean.unpack(data)
11046
        self.TreatUncertainAsBad = uabin.Primitives.Boolean.unpack(data)
11047
        self.PercentDataBad = uabin.Primitives.Byte.unpack(data)
11048
        self.PercentDataGood = uabin.Primitives.Byte.unpack(data)
11049
        self.UseSlopedExtrapolation = uabin.Primitives.Boolean.unpack(data)
11050
11051
    def __str__(self):
11052
        return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \
11053
               'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \
11054
               'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \
11055
               'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \
11056
               'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')'
11057
11058
    __repr__ = __str__
11059
11060
11061
class AggregateFilter(FrozenClass):
11062
    '''
11063
    :ivar StartTime:
11064
    :vartype StartTime: DateTime
11065
    :ivar AggregateType:
11066
    :vartype AggregateType: NodeId
11067
    :ivar ProcessingInterval:
11068
    :vartype ProcessingInterval: Double
11069
    :ivar AggregateConfiguration:
11070
    :vartype AggregateConfiguration: AggregateConfiguration
11071
    '''
11072
11073
    ua_types = {
11074
        'StartTime': 'DateTime',
11075
        'AggregateType': 'NodeId',
11076
        'ProcessingInterval': 'Double',
11077
        'AggregateConfiguration': 'AggregateConfiguration',
11078
               }
11079
11080
    def __init__(self, binary=None):
11081
        if binary is not None:
11082
            self._binary_init(binary)
@@ 10156-10210 (lines=55) @@
10153
        self.PerformInsertReplace = PerformUpdateType(0)
10154
        self.Filter = EventFilter()
10155
        self.EventData = []
10156
        self._freeze = True
10157
10158
    def to_binary(self):
10159
        packet = []
10160
        packet.append(self.NodeId.to_binary())
10161
        packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value))
10162
        packet.append(self.Filter.to_binary())
10163
        packet.append(uabin.Primitives.Int32.pack(len(self.EventData)))
10164
        for fieldname in self.EventData:
10165
            packet.append(fieldname.to_binary())
10166
        return b''.join(packet)
10167
10168
    @staticmethod
10169
    def from_binary(data):
10170
        return UpdateEventDetails(data)
10171
10172
    def _binary_init(self, data):
10173
        self.NodeId = NodeId.from_binary(data)
10174
        self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data))
10175
        self.Filter = EventFilter.from_binary(data)
10176
        length = uabin.Primitives.Int32.unpack(data)
10177
        array = []
10178
        if length != -1:
10179
            for _ in range(0, length):
10180
                array.append(HistoryEventFieldList.from_binary(data))
10181
        self.EventData = array
10182
10183
    def __str__(self):
10184
        return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \
10185
               'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \
10186
               'Filter:' + str(self.Filter) + ', ' + \
10187
               'EventData:' + str(self.EventData) + ')'
10188
10189
    __repr__ = __str__
10190
10191
10192
class DeleteRawModifiedDetails(FrozenClass):
10193
    '''
10194
    :ivar NodeId:
10195
    :vartype NodeId: NodeId
10196
    :ivar IsDeleteModified:
10197
    :vartype IsDeleteModified: Boolean
10198
    :ivar StartTime:
10199
    :vartype StartTime: DateTime
10200
    :ivar EndTime:
10201
    :vartype EndTime: DateTime
10202
    '''
10203
10204
    ua_types = {
10205
        'NodeId': 'NodeId',
10206
        'IsDeleteModified': 'Boolean',
10207
        'StartTime': 'DateTime',
10208
        'EndTime': 'DateTime',
10209
               }
10210
10211
    def __init__(self, binary=None):
10212
        if binary is not None:
10213
            self._binary_init(binary)
@@ 9106-9160 (lines=55) @@
9103
    def __str__(self):
9104
        return 'HistoryReadResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \
9105
               'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \
9106
               'HistoryData:' + str(self.HistoryData) + ')'
9107
9108
    __repr__ = __str__
9109
9110
9111
class HistoryReadDetails(FrozenClass):
9112
    '''
9113
    '''
9114
9115
    ua_types = {
9116
               }
9117
9118
    def __init__(self, binary=None):
9119
        if binary is not None:
9120
            self._binary_init(binary)
9121
            self._freeze = True
9122
            return
9123
        self._freeze = True
9124
9125
    def to_binary(self):
9126
        packet = []
9127
        return b''.join(packet)
9128
9129
    @staticmethod
9130
    def from_binary(data):
9131
        return HistoryReadDetails(data)
9132
9133
    def _binary_init(self, data):
9134
        pass
9135
9136
    def __str__(self):
9137
        return 'HistoryReadDetails(' +  + ')'
9138
9139
    __repr__ = __str__
9140
9141
9142
class ReadEventDetails(FrozenClass):
9143
    '''
9144
    :ivar NumValuesPerNode:
9145
    :vartype NumValuesPerNode: UInt32
9146
    :ivar StartTime:
9147
    :vartype StartTime: DateTime
9148
    :ivar EndTime:
9149
    :vartype EndTime: DateTime
9150
    :ivar Filter:
9151
    :vartype Filter: EventFilter
9152
    '''
9153
9154
    ua_types = {
9155
        'NumValuesPerNode': 'UInt32',
9156
        'StartTime': 'DateTime',
9157
        'EndTime': 'DateTime',
9158
        'Filter': 'EventFilter',
9159
               }
9160
9161
    def __init__(self, binary=None):
9162
        if binary is not None:
9163
            self._binary_init(binary)
@@ 16031-16078 (lines=48) @@
16028
        return ProgramDiagnosticDataType(data)
16029
16030
    def _binary_init(self, data):
16031
        self.CreateSessionId = NodeId.from_binary(data)
16032
        self.CreateClientName = uabin.Primitives.String.unpack(data)
16033
        self.InvocationCreationTime = uabin.Primitives.DateTime.unpack(data)
16034
        self.LastTransitionTime = uabin.Primitives.DateTime.unpack(data)
16035
        self.LastMethodCall = uabin.Primitives.String.unpack(data)
16036
        self.LastMethodSessionId = NodeId.from_binary(data)
16037
        length = uabin.Primitives.Int32.unpack(data)
16038
        array = []
16039
        if length != -1:
16040
            for _ in range(0, length):
16041
                array.append(Argument.from_binary(data))
16042
        self.LastMethodInputArguments = array
16043
        length = uabin.Primitives.Int32.unpack(data)
16044
        array = []
16045
        if length != -1:
16046
            for _ in range(0, length):
16047
                array.append(Argument.from_binary(data))
16048
        self.LastMethodOutputArguments = array
16049
        self.LastMethodCallTime = uabin.Primitives.DateTime.unpack(data)
16050
        self.LastMethodReturnStatus = StatusResult.from_binary(data)
16051
16052
    def __str__(self):
16053
        return 'ProgramDiagnosticDataType(' + 'CreateSessionId:' + str(self.CreateSessionId) + ', ' + \
16054
               'CreateClientName:' + str(self.CreateClientName) + ', ' + \
16055
               'InvocationCreationTime:' + str(self.InvocationCreationTime) + ', ' + \
16056
               'LastTransitionTime:' + str(self.LastTransitionTime) + ', ' + \
16057
               'LastMethodCall:' + str(self.LastMethodCall) + ', ' + \
16058
               'LastMethodSessionId:' + str(self.LastMethodSessionId) + ', ' + \
16059
               'LastMethodInputArguments:' + str(self.LastMethodInputArguments) + ', ' + \
16060
               'LastMethodOutputArguments:' + str(self.LastMethodOutputArguments) + ', ' + \
16061
               'LastMethodCallTime:' + str(self.LastMethodCallTime) + ', ' + \
16062
               'LastMethodReturnStatus:' + str(self.LastMethodReturnStatus) + ')'
16063
16064
    __repr__ = __str__
16065
16066
16067
class Annotation(FrozenClass):
16068
    '''
16069
    :ivar Message:
16070
    :vartype Message: String
16071
    :ivar UserName:
16072
    :vartype UserName: String
16073
    :ivar AnnotationTime:
16074
    :vartype AnnotationTime: DateTime
16075
    '''
16076
16077
    ua_types = {
16078
        'Message': 'String',
16079
        'UserName': 'String',
16080
        'AnnotationTime': 'DateTime',
16081
               }
@@ 9386-9433 (lines=48) @@
9383
    '''
9384
9385
    ua_types = {
9386
        'DataValues': 'DataValue',
9387
               }
9388
9389
    def __init__(self, binary=None):
9390
        if binary is not None:
9391
            self._binary_init(binary)
9392
            self._freeze = True
9393
            return
9394
        self.DataValues = []
9395
        self._freeze = True
9396
9397
    def to_binary(self):
9398
        packet = []
9399
        packet.append(uabin.Primitives.Int32.pack(len(self.DataValues)))
9400
        for fieldname in self.DataValues:
9401
            packet.append(fieldname.to_binary())
9402
        return b''.join(packet)
9403
9404
    @staticmethod
9405
    def from_binary(data):
9406
        return HistoryData(data)
9407
9408
    def _binary_init(self, data):
9409
        length = uabin.Primitives.Int32.unpack(data)
9410
        array = []
9411
        if length != -1:
9412
            for _ in range(0, length):
9413
                array.append(DataValue.from_binary(data))
9414
        self.DataValues = array
9415
9416
    def __str__(self):
9417
        return 'HistoryData(' + 'DataValues:' + str(self.DataValues) + ')'
9418
9419
    __repr__ = __str__
9420
9421
9422
class ModificationInfo(FrozenClass):
9423
    '''
9424
    :ivar ModificationTime:
9425
    :vartype ModificationTime: DateTime
9426
    :ivar UpdateType:
9427
    :vartype UpdateType: HistoryUpdateType
9428
    :ivar UserName:
9429
    :vartype UserName: String
9430
    '''
9431
9432
    ua_types = {
9433
        'ModificationTime': 'DateTime',
9434
        'UpdateType': 'HistoryUpdateType',
9435
        'UserName': 'String',
9436
               }