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