Skip to navigation

hololink::module::CoeDataChannelInterfaceV1

View as Markdown

Configures a data channel for use with COE encapsulation.

Use the configure_coe method to configure this data channel (as described in the enumeration metadata) for P1722B encapsulation.

#include <hololink/module/coe_data_channel.hpp>

Inherits from: hololink::module::ConfigurableService< CoeDataChannelInterfaceV1 > (public)


Methods

set_packetizer_for_pixel_format

virtual hololink_module_status_t hololink::module::CoeDataChannelInterfaceV1::set_packetizer_for_pixel_format(
uint32_t pixel_format
)

Configure the on-device packetizer program based on a CSI data format.

This service exists to configure HSB IP to swizzle image data for interpretation by hardware ISP.

Returns: HOLOLINK_MODULE_OK or an error status

Parameters

pixel_format
uint32_t

configure_coe

virtual hololink_module_status_t hololink::module::CoeDataChannelInterfaceV1::configure_coe(
uint8_t channel,
size_t frame_size,
uint32_t pixel_width,
bool vlan_enabled = false
)

Configure the data channel for COE (P1722B) framing.

Returns: HOLOLINK_MODULE_OK or an error status.

Parameters

channel
uint8_t

CoE channel to include in egress packets.

frame_size
size_t

Size of a complete frame, in bytes.

pixel_width
uint32_t

Bytes per line of the transmitted image.

vlan_enabled
boolDefaults to false

Tag the transmitted packets for 802.1Q VLAN.

unconfigure

virtual hololink_module_status_t hololink::module::CoeDataChannelInterfaceV1::unconfigure()

Stop transmitting, clearing the state configure_coe() set up.

Returns: HOLOLINK_MODULE_OK or an error status.

configure

virtual void hololink::module::ConfigurableService<CoeDataChannelInterfaceV1>::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

std::shared_ptr<Module> hololink::module::ServiceBase::module() const

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

static std::shared_ptr<CoeDataChannelInterfaceV1> hololink::module::ConfigurableService<CoeDataChannelInterfaceV1>::get_service(
const EnumerationMetadata &metadata,
bool allow_null = false
)

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

metadata
const EnumerationMetadata &

Addressing and configuration for the service.

allow_null
boolDefaults to false

Use true to return nullptr when the service cannot be resolved; the default false value raises a std::runtime_error.

for_each_type_id

static bool hololink::module::Service<CoeDataChannelInterfaceV1>::for_each_type_id(
Callback &&cb
)

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.