Class DataSinkBase

Inheritance Relationships

Derived Types

Class Documentation

class DataSinkBase

The DataSinkBase is the base class to use to create your own DataSink.

Subclassed by DataTamer::DummySink, DataTamer::MCAPSink, DataTamer::ROS2PublisherSink

Public Functions

DataSinkBase()
DataSinkBase(const DataSinkBase &other) = delete
DataSinkBase &operator=(const DataSinkBase &other) = delete
DataSinkBase(DataSinkBase &&other) = delete
DataSinkBase &operator=(DataSinkBase &&other) = delete
virtual ~DataSinkBase()
virtual void addChannel(const std::string &name, const Schema &schema) = 0

addChannel will register a schema into the sink. That schema will be recognized by its hash.

Parameters:
virtual bool pushSnapshot(const Snapshot &snapshot)

pushSnapshot will push the data into a concurrent queue, that a different thread will consume, using storeSnapshot()

Parameters:

snapshot – see type Snapshot for details

Returns:

false if the queue is full and snapshot was not pushed

Protected Functions

virtual bool storeSnapshot(const Snapshot &snapshot) = 0

storeSnapshot contains the code to execute when popping a snapshot from the queue.

Parameters:

snapshot – data to be pushed into the sink.

Returns:

true if processed successfully

void stopThread()