RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
rtctk::mudpiPub::Publisher Class Reference

Class for publishing MUDPI data. More...

#include <rtctk/mudpiPub/publisher.hpp>

Public Types

using UserSamples = std::vector<std::vector<uint8_t>>
 Type alias for provided user data.
 

Public Member Functions

 Publisher (const std::string &pub_id, const PubCfg &cfg, UserSamples data={})
 Constructs a new publisher object.
 
virtual ~Publisher ()
 Destroys publisher object.
 
void SendSample ()
 Signals the worker thread to send a sample.
 
void WaitUntilSendingDone ()
 Blocks until the sample has been sent.
 
void Init ()
 Resets the sample_id to zero.
 
void UpdateDynamicConfig (const PubDynamicCfg &cfg, UserSamples user_samples={})
 Updates dynamic configuration.
 
const std::string & GetId () const
 Returns the name of the publisher object.
 

Detailed Description

Class for publishing MUDPI data.

Member Typedef Documentation

◆ UserSamples

using rtctk::mudpiPub::Publisher::UserSamples = std::vector<std::vector<uint8_t>>

Type alias for provided user data.

user data is basically a vector of blobs, where each element represents a sample.

Constructor & Destructor Documentation

◆ Publisher()

rtctk::mudpiPub::Publisher::Publisher ( const std::string & pub_id,
const PubCfg & cfg,
UserSamples data = {} )

Constructs a new publisher object.

Note that provided configuration and user_samples must be consistent.

Parameters
pub_idof the publisher object.
cfgconfiguration of the publisher object.
datauser samples.

◆ ~Publisher()

rtctk::mudpiPub::Publisher::~Publisher ( )
virtualdefault

Destroys publisher object.

Member Function Documentation

◆ GetId()

const std::string & rtctk::mudpiPub::Publisher::GetId ( ) const
inline

Returns the name of the publisher object.

◆ Init()

void rtctk::mudpiPub::Publisher::Init ( )

Resets the sample_id to zero.

◆ SendSample()

void rtctk::mudpiPub::Publisher::SendSample ( )

Signals the worker thread to send a sample.

◆ UpdateDynamicConfig()

void rtctk::mudpiPub::Publisher::UpdateDynamicConfig ( const PubDynamicCfg & cfg,
UserSamples user_samples = {} )

Updates dynamic configuration.

Note that provided configuration and user_samples must be consistent.

Parameters
cfgdynamic configuration of the publisher object.
user_samplesnew user samples.

◆ WaitUntilSendingDone()

void rtctk::mudpiPub::Publisher::WaitUntilSendingDone ( )

Blocks until the sample has been sent.


The documentation for this class was generated from the following files: