@@ 4104-4119 (lines=16) @@ | ||
4101 | def to_binary(self): |
|
4102 | packet = [] |
|
4103 | packet.append(uabin.Primitives.UInt32.pack(self.CancelCount)) |
|
4104 | return b''.join(packet) |
|
4105 | ||
4106 | @staticmethod |
|
4107 | def from_binary(data): |
|
4108 | return CancelResult(data) |
|
4109 | ||
4110 | def _binary_init(self, data): |
|
4111 | self.CancelCount = uabin.Primitives.UInt32.unpack(data) |
|
4112 | ||
4113 | def __str__(self): |
|
4114 | return 'CancelResult(' + 'CancelCount:' + str(self.CancelCount) + ')' |
|
4115 | ||
4116 | __repr__ = __str__ |
|
4117 | ||
4118 | ||
4119 | class CancelResponse(FrozenClass): |
|
4120 | ''' |
|
4121 | Cancels an outstanding request. |
|
4122 | ||
@@ 4189-4202 (lines=14) @@ | ||
4186 | ||
4187 | ua_types = { |
|
4188 | 'SpecifiedAttributes': 'UInt32', |
|
4189 | 'DisplayName': 'LocalizedText', |
|
4190 | 'Description': 'LocalizedText', |
|
4191 | 'WriteMask': 'UInt32', |
|
4192 | 'UserWriteMask': 'UInt32', |
|
4193 | } |
|
4194 | ||
4195 | def __init__(self, binary=None): |
|
4196 | if binary is not None: |
|
4197 | self._binary_init(binary) |
|
4198 | self._freeze = True |
|
4199 | return |
|
4200 | self.SpecifiedAttributes = 0 |
|
4201 | self.DisplayName = LocalizedText() |
|
4202 | self.Description = LocalizedText() |
|
4203 | self.WriteMask = 0 |
|
4204 | self.UserWriteMask = 0 |
|
4205 | self._freeze = True |