hololink::emulation::COEDataPlane

View as Markdown

The DataPlane implementation for IEEE 1722B Camera-over-Ethernet link layer transport.

#include <hololink/emulation/coe_data_plane.hpp>

Inherits from: hololink::emulation::DataPlane (public)


Constructors

COEDataPlane

hololink::emulation::COEDataPlane::COEDataPlane(
HSBEmulator &hsb_emulator,
const IPAddress &source_ip,
uint8_t data_plane_id,
uint8_t sensor_id
)

python:

def __init__(self: hemu.COEDataPlane, hsb_emulator: hemu.HSBEmulator, source_ip: hemu.IPAddress, data_plane_id: int, sensor_id: int)

Construct a new COEDataPlane object

Parameters

hsb_emulator
HSBEmulator &

The HSBEmulator object to attach to.

source_ip
const IPAddress &

The IP address of the DataPlane.

data_plane_id
uint8_t

The identifying index of the DataPlane.

sensor_id
uint8_t

The identifying index of the sensor interface associated with the DataPlane.

Destructor

~COEDataPlane

hololink::emulation::COEDataPlane::~COEDataPlane()

Methods

start

void hololink::emulation::COEDataPlane::start()

Start the DataPlane by initiating the BootP broadcast.

stop

void hololink::emulation::COEDataPlane::stop()

Stop the DataPlane by stopping the BootP broadcast.

stop_bootp

void hololink::emulation::COEDataPlane::stop_bootp()

This is a clear alias for stop().

is_running

bool hololink::emulation::COEDataPlane::is_running()

Check if the DataPlane is running.

(Bootp is broadcasting)

Returns: True if the DataPlane is running, false otherwise.

send

int64_t hololink::emulation::COEDataPlane::send(
const DLTensor &tensor,
FrameMetadata *frame_metadata = DEFAULT_FRAME_METADATA
)

Send a tensor over the DataPlane.

This method is synchronous. It will block and metadata will be protected by a mutex until the send is complete.

Returns: The number of bytes sent or < 0 if error occurred.

Parameters

tensor
const DLTensor &

The tensor object reference to send. Supported device types are kDLCPU, kDLCUDA, kDLCUDAHost (host pinned), and kDLCUDAManaged (Unified Memory)

frame_metadata
FrameMetadata *Defaults to DEFAULT_FRAME_METADATA

The frame metadata to send. Acts as a buffer flush. If nullptr, the data is by default buffered until the next send command that fills an MTU or a non-nullptr frame_metadata is provided.

get_sensor_id

uint8_t hololink::emulation::COEDataPlane::get_sensor_id() const

Get the sensor ID associated with the DataPlane.

Returns: The sensor ID.

packetizer_enabled

bool hololink::emulation::COEDataPlane::packetizer_enabled() const

Check if the packetizer is enabled.

Returns: True if the packetizer is enabled, false otherwise.

get_start_time

struct timespec hololink::emulation::COEDataPlane::get_start_time() const

broadcast_bootp

int hololink::emulation::COEDataPlane::broadcast_bootp()

update_metadata

void hololink::emulation::COEDataPlane::update_metadata() override

method to update metadata model for the appropriate transmitter subclass can assume that appropriate locks are held while accessing memory registers and the transmitter metadata


Member variables

NameTypeDescription
registers_AddressMemory &
ip_address_IPAddress
configuration_HSBConfiguration
sensor_id_uint8_t
data_plane_id_uint8_t
transmitter_BaseTransmitter *
data_plane_ctxt_std::unique_ptr< struct DataPlaneCtxt, std::function< void(DataPlaneCtxt *)> >