@@ 7457-7477 (lines=21) @@ | ||
7454 | 'ComplianceLevel': 'ComplianceLevel', |
|
7455 | 'UnsupportedUnitIds': 'String', |
|
7456 | } |
|
7457 | ||
7458 | def __init__(self, binary=None): |
|
7459 | if binary is not None: |
|
7460 | self._binary_init(binary) |
|
7461 | self._freeze = True |
|
7462 | return |
|
7463 | self.OrganizationUri = None |
|
7464 | self.ProfileId = None |
|
7465 | self.ComplianceTool = None |
|
7466 | self.ComplianceDate = datetime.utcnow() |
|
7467 | self.ComplianceLevel = ComplianceLevel(0) |
|
7468 | self.UnsupportedUnitIds = [] |
|
7469 | self._freeze = True |
|
7470 | ||
7471 | def to_binary(self): |
|
7472 | packet = [] |
|
7473 | packet.append(uabin.Primitives.String.pack(self.OrganizationUri)) |
|
7474 | packet.append(uabin.Primitives.String.pack(self.ProfileId)) |
|
7475 | packet.append(uabin.Primitives.String.pack(self.ComplianceTool)) |
|
7476 | packet.append(uabin.Primitives.DateTime.pack(self.ComplianceDate)) |
|
7477 | packet.append(uabin.Primitives.UInt32.pack(self.ComplianceLevel.value)) |
|
7478 | packet.append(uabin.Primitives.Int32.pack(len(self.UnsupportedUnitIds))) |
|
7479 | for fieldname in self.UnsupportedUnitIds: |
|
7480 | packet.append(uabin.Primitives.String.pack(fieldname)) |
|
@@ 10748-10772 (lines=25) @@ | ||
10745 | :ivar TypeId: |
|
10746 | :vartype TypeId: NodeId |
|
10747 | :ivar RequestHeader: |
|
10748 | :vartype RequestHeader: RequestHeader |
|
10749 | :ivar Parameters: |
|
10750 | :vartype Parameters: CallParameters |
|
10751 | ''' |
|
10752 | ||
10753 | ua_types = { |
|
10754 | 'TypeId': 'NodeId', |
|
10755 | 'RequestHeader': 'RequestHeader', |
|
10756 | 'Parameters': 'CallParameters', |
|
10757 | } |
|
10758 | ||
10759 | def __init__(self, binary=None): |
|
10760 | if binary is not None: |
|
10761 | self._binary_init(binary) |
|
10762 | self._freeze = True |
|
10763 | return |
|
10764 | self.TypeId = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary) |
|
10765 | self.RequestHeader = RequestHeader() |
|
10766 | self.Parameters = CallParameters() |
|
10767 | self._freeze = True |
|
10768 | ||
10769 | def to_binary(self): |
|
10770 | packet = [] |
|
10771 | packet.append(self.TypeId.to_binary()) |
|
10772 | packet.append(self.RequestHeader.to_binary()) |
|
10773 | packet.append(self.Parameters.to_binary()) |
|
10774 | return b''.join(packet) |
|
10775 | ||
@@ 9358-9377 (lines=20) @@ | ||
9355 | packet = [] |
|
9356 | packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes))) |
|
9357 | for fieldname in self.ReqTimes: |
|
9358 | packet.append(uabin.Primitives.DateTime.pack(fieldname)) |
|
9359 | packet.append(uabin.Primitives.Boolean.pack(self.UseSimpleBounds)) |
|
9360 | return b''.join(packet) |
|
9361 | ||
9362 | @staticmethod |
|
9363 | def from_binary(data): |
|
9364 | return ReadAtTimeDetails(data) |
|
9365 | ||
9366 | def _binary_init(self, data): |
|
9367 | self.ReqTimes = uabin.Primitives.DateTime.unpack_array(data) |
|
9368 | self.UseSimpleBounds = uabin.Primitives.Boolean.unpack(data) |
|
9369 | ||
9370 | def __str__(self): |
|
9371 | return 'ReadAtTimeDetails(' + 'ReqTimes:' + str(self.ReqTimes) + ', ' + \ |
|
9372 | 'UseSimpleBounds:' + str(self.UseSimpleBounds) + ')' |
|
9373 | ||
9374 | __repr__ = __str__ |
|
9375 | ||
9376 | ||
9377 | class HistoryData(FrozenClass): |
|
9378 | ''' |
|
9379 | :ivar DataValues: |
|
9380 | :vartype DataValues: DataValue |