MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / __init__

Method __init__

tools/scripts/gdbext.py:339–348  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

337class 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())

Callers

nothing calls this directly

Calls 5

value_isFunction · 0.85
GuidEntityPrinterClass · 0.85
GuidPrefixPrinterClass · 0.85
get_byte_arrayFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected