RTC Toolkit  0.1.0-alpha
Public Member Functions | List of all members
rtctk::telRepub::UdpReceiver Class Reference

#include <udpReceiver.hpp>

Public Member Functions

 UdpReceiver (const std::string &serverhost, int portno, uint16_t idx)
 
 ~UdpReceiver ()
 
int MapMudpiTopicId2Pub (mudpi::uint16_t mudpiTopicId, PubThreadBase<> &pub)
 
void Enable ()
 
void Disable ()
 
void Join ()
 
void SetAffinity (unsigned int cpu)
 
void Statistics ()
 

Detailed Description

Receiving UDP data asynchronously

Constructor & Destructor Documentation

◆ UdpReceiver()

rtctk::telRepub::UdpReceiver::UdpReceiver ( const std::string &  serverhost,
int  portno,
uint16_t  idx 
)
explicit

Creates UDP receiver: creates socket, and a receiving thread.

Parameters
serverhosthost/ip where to be listent
portnolistening port
idxreceiver's index

◆ ~UdpReceiver()

rtctk::telRepub::UdpReceiver::~UdpReceiver ( )

Member Function Documentation

◆ Disable()

void rtctk::telRepub::UdpReceiver::Disable ( )

Disables receiving UDP data from socket.

◆ Enable()

void rtctk::telRepub::UdpReceiver::Enable ( )

Enables receiving UDP data from socket.

◆ Join()

void rtctk::telRepub::UdpReceiver::Join ( )

Joins receiver thread

◆ MapMudpiTopicId2Pub()

int rtctk::telRepub::UdpReceiver::MapMudpiTopicId2Pub ( mudpi::uint16_t  mudpiTopicId,
PubThreadBase<> &  pub 
)

Maps DDS publisher thread for a particular MUDPI topic. Internally is created MUDPI processor (rtctk::telRepub::MudpiProcessor) for each topic.

Parameters
mudpiTopicIdMUDPI topic
pubreference to publisher which should "map" to given MUDPI topic

◆ SetAffinity()

void rtctk::telRepub::UdpReceiver::SetAffinity ( unsigned int  cpu)

Sets affinity where the receiving thread should be executed.

Parameters
cpucpu number to pin (set affinity) of the thread

◆ Statistics()

void rtctk::telRepub::UdpReceiver::Statistics ( )

Dumps receiver statistics.


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