(self, value)
| 337 | class GuidPrinter(GuidPrinterBase): |
| 338 | |
| 339 | def __init__(self, value): |
| 340 | if value_is(value, 'OpenDDS::DCPS::GUID_t'): |
| 341 | self.entity = GuidEntityPrinter(value['entityId']) |
| 342 | array = GuidPrefixPrinter(value['guidPrefix']).array + self.entity.array |
| 343 | elif value_is(value, 'DDS::BuiltinTopicKey_t'): |
| 344 | array = get_byte_array(value['value']) |
| 345 | self.entity = GuidEntityPrinter(entity_key=array[12:16], entity_kind=array[15]) |
| 346 | else: |
| 347 | raise TypeError('Not sure what type is') |
| 348 | GuidPrinterBase.__init__(self, array) |
| 349 | |
| 350 | def to_string(self): |
| 351 | return self._to_string('unknown guid' if self.unknown() else self.entity.hint()) |
nothing calls this directly
no test coverage detected