Skip to main content

Module instance_handle

Module instance_handle 

Source
Expand description

InstanceHandle — opaque, local identifier for entities and sample instances (DDS DCPS 1.4 §2.3.3 IDL-PSM, §2.2.2.5.1 SampleInfo.instance_handle).

In the spec, InstanceHandle_t is a builtin type with no fixed wire form — it is never placed on the wire, but serves solely for local identification (e.g. to address a sample stream in DataReader::read_instance()). The spec only guarantees that HANDLE_NIL has a reserved “no handle” value.

We encode it as an opaque u64:

  • Unique per entity / sample instance within a runtime.
  • HANDLE_NIL = 0 (spec convention).
  • Created via InstanceHandleAllocator with a monotonically increasing counter — no reuse of dropped handles.

Structs§

InstanceHandle
Opaque InstanceHandle_t (DDS-DCPS 1.4 §2.3.3).
InstanceHandleAllocator
Atomic counter for handing out unique InstanceHandle values.

Constants§

HANDLE_NIL
Spec alias for the NIL handle (DDS-DCPS 1.4 §2.3.3).