hololink::module::DataChannelInterfaceV1
hololink::module::DataChannelInterfaceV1
Handle to a single data path on an HSB device.
DataChannel represents the path that sensor or actuator data travels between the host system (usually via RDMA) and the device itself.
- A single HSB device can support any number of DataChannel instances.
- Data producers or consumers use this object to find enumeration metadata provided by the application at construction time. This data is configured by the application per application requirements (e.g. using a specific sensor number or configuration)– enumeration metadata found just by listening to BOOTP messages may not have this application-specific setup.
- Channel specific objects are invalidated when
device_lostis called here, so later calls to get_service will reinitialize these– supporting device reconnection.
Example
Inherits from: hololink::module::ConfigurableService< DataChannelInterfaceV1 > (public)
Methods
enumeration_metadata
The enumeration metadata this channel was configured with.
Every service on this channel is configured from this snapshot.
Returns: The metadata describing this channel.
hololink
The device this channel runs on.
The same device an application gets by fetching HololinkInterfaceV1 with this channel’s enumeration metadata.
Returns: The device.
device_lost
Invalidate the services cached for the device this channel runs on, following loss of contact with it.
Does what HololinkInterfaceV1::device_lost() does, for applications that hold a channel and not the device it runs on.
Returns: HOLOLINK_MODULE_OK or an error status.
configure
Use metadata contents to initialize this instance.
This routine is guaranteed to be called the first time a call to get_service(metadata) is called on a specific service instance.
module
The Module that this service was published from.
The service holds no strong reference to its Module, so this does not extend the Module’s lifetime.
Returns: The owning Module, or an empty pointer if the service has not been published or its Module no longer exists.
Static methods
get_service
Fetch a service
Overload 2
Fetch a service, configured by EnumerationMetadata.
Module usually caches service objects; so when a specific service instance isn’t found, it will be constructed with the current values in EnumerationMetadata. Later calls to get_service are likely to return that cached instance, ignoring changes to any enumeration metadata that aren’t specifically related to service addressing.
Returns: A shared pointer to the requested service (<Derived>).
Throws: std::runtime_error when allow_null==false and the service lookup (or construction) fails.
Parameters
Addressing and configuration for the service.
Use true to return nullptr when the service cannot be resolved; the default false value raises a std::runtime_error.
for_each_type_id
Iterate over every type_id supported by this instance.
The callback signature is bool(const char*) — returning false halts the walk; true continues. Iteration is depth-first, so you’ll see the most specific implementation types first.