def get_data_type_signature(self): ''' Computes data type signature of this type. The data type signature is guaranteed to match only if all nested data structures are compatible. Please refer to the specification for details about signatures. ''' sig = Signature(self.get_dsdl_signature()) fields = self.request_fields + self.response_fields \ if self.kind == CompoundType.KIND_SERVICE else self.fields for field in fields: field_sig = field.type.get_data_type_signature() if field_sig is not None: sig_value = sig.get_value() sig.add(bytes_from_crc64(field_sig)) sig.add(bytes_from_crc64(sig_value)) return sig.get_value()
def test_check_val(self): self.assertEqual(common.bytes_from_crc64(0x62EC59E3F1A4F00A), b"\x0A\xF0\xA4\xF1\xE3\x59\xEC\x62")
def test_zero(self): self.assertEqual(common.bytes_from_crc64(0), b"\x00\x00\x00\x00\x00\x00\x00\x00")