idl

class cyclonedds.idl.IdlStruct[source]

Bases: object

serialize(buffer=None, endianness=None, use_version_2=None)[source]
Parameters
  • buffer (Optional[cyclonedds.idl._support.Buffer]) –

  • endianness (Optional[cyclonedds.idl._support.Endianness]) –

  • use_version_2 (Optional[bool]) –

Return type

bytes

classmethod deserialize(data, has_header=True, use_version_2=None)[source]
Parameters
Return type

cyclonedds.idl._TIS

classmethod deserialize_key(data, has_header=True, use_version_2=None)[source]
Parameters
Return type

cyclonedds.idl._TIS

class cyclonedds.idl.IdlUnion(**kwargs)[source]

Bases: object

set(discriminator, value)[source]
Parameters
  • discriminator (int) –

  • value (Any) –

Return type

None

get()[source]
property discriminator: Optional[int]
property value
serialize(buffer=None, endianness=None, use_version_2=None)[source]
Parameters
  • buffer (Optional[cyclonedds.idl._support.Buffer]) –

  • endianness (Optional[cyclonedds.idl._support.Endianness]) –

  • use_version_2 (Optional[bool]) –

Return type

bytes

classmethod deserialize(data, has_header=True, use_version_2=None)[source]
Parameters
Return type

cyclonedds.idl._TIU

classmethod deserialize_key(data, has_header=True, use_version_2=None)[source]
Parameters
Return type

cyclonedds.idl._TIU

class cyclonedds.idl.IdlBitmask[source]

Bases: object

classmethod from_mask(mask)[source]
Parameters

mask (int) –

Return type

cyclonedds.idl._TIB

as_mask()[source]
Return type

int

class cyclonedds.idl.IdlEnum(value=<object object>, *args, **kwargs)[source]

Bases: enum.Enum

An enumeration.

idl.types

The following classes are really types and should be used with a [] and not ().

class cyclonedds.idl.types.array(subtype, length)[source]
Parameters
  • subtype (type) –

  • length (int) –

class cyclonedds.idl.types.sequence(subtype, max_length=None)[source]
Parameters
Return type

None

class cyclonedds.idl.types.typedef(name, subtype)[source]
Parameters
  • name (str) –

  • subtype (type) –

Return type

None

class cyclonedds.idl.types.bounded_str(max_length)[source]
Parameters

max_length (int) –

Return type

None

class cyclonedds.idl.types.case(discriminator_value, subtype)[source]
Parameters

subtype (type) –

Return type

None

class cyclonedds.idl.types.default(subtype)[source]
Parameters

subtype (type) –

Return type

None

The following items map to Python int or float but indicate their full meaning to the C layer in encoding samples.

cyclonedds.idl.types.char

The C char datatype. In Python this is implemented as a single-character string.

alias of Annotated[str]

cyclonedds.idl.types.uint8

An unsigned 8 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.uint16

An unsigned 16 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.uint32

An unsigned 32 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.uint64

An unsigned 64 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.int8

A signed 8 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.int16

A signed 16 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.int32

A signed 32 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.int64

A signed 64 bit integer.

alias of Annotated[int]

cyclonedds.idl.types.float32

A 32bit floating point number. In typical C this is a regular float.

alias of Annotated[float]

cyclonedds.idl.types.float64

A 64bit floating point number. In typical C this is a regular float.

alias of Annotated[float]

cyclonedds.idl.types.NoneType

The NoneType, or a “void” type. This is not included in the OMG IDL spec or in the C library but it can be very useful.

idl.annotations

cyclonedds.idl.annotations.key(apply_to)[source]
Parameters

apply_to (str) –

Return type

None

cyclonedds.idl.annotations.position(apply_to, value)[source]
Parameters
  • apply_to (str) –

  • value (int) –

Return type

None

cyclonedds.idl.annotations.member_id(apply_to, value)[source]
Parameters
  • apply_to (str) –

  • value (int) –

Return type

None

cyclonedds.idl.annotations.member_hash_id(apply_to, value=None)[source]
Parameters
Return type

None

cyclonedds.idl.annotations.xcdrv2(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.cdrv0(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.nested(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.must_understand(str)[source]
Parameters

str (Any) –

Return type

None

cyclonedds.idl.annotations.autoid(autoid_type)[source]
Parameters

autoid_type (str) –

Return type

Callable[[cyclonedds.idl.annotations.T], cyclonedds.idl.annotations.T]

cyclonedds.idl.annotations.extensibility(extensibility_type)[source]
Parameters

extensibility_type (str) –

Return type

Callable[[cyclonedds.idl.annotations.T], cyclonedds.idl.annotations.T]

cyclonedds.idl.annotations.final(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.appendable(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.mutable(cls)[source]
Parameters

cls (cyclonedds.idl.annotations.T) –

Return type

cyclonedds.idl.annotations.T

cyclonedds.idl.annotations.keylist(list_of_keys)[source]
Parameters

list_of_keys (List[str]) –

Return type

Callable[[cyclonedds.idl.annotations.TIS], cyclonedds.idl.annotations.TIS]

cyclonedds.idl.annotations.bit_bound(amount)[source]
Parameters

amount (int) –

Return type

Callable[[cyclonedds.idl.annotations.TIBE], cyclonedds.idl.annotations.TIBE]