|
RTC Toolkit
0.1.0-alpha
|
#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 () |
Receiving UDP data asynchronously
|
explicit |
Creates UDP receiver: creates socket, and a receiving thread.
| serverhost | host/ip where to be listent |
| portno | listening port |
| idx | receiver's index |
| rtctk::telRepub::UdpReceiver::~UdpReceiver | ( | ) |
| void rtctk::telRepub::UdpReceiver::Disable | ( | ) |
Disables receiving UDP data from socket.
| void rtctk::telRepub::UdpReceiver::Enable | ( | ) |
Enables receiving UDP data from socket.
| void rtctk::telRepub::UdpReceiver::Join | ( | ) |
Joins receiver thread
| 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.
| mudpiTopicId | MUDPI topic |
| pub | reference to publisher which should "map" to given MUDPI topic |
| void rtctk::telRepub::UdpReceiver::SetAffinity | ( | unsigned int | cpu | ) |
Sets affinity where the receiving thread should be executed.
| cpu | cpu number to pin (set affinity) of the thread |
| void rtctk::telRepub::UdpReceiver::Statistics | ( | ) |
Dumps receiver statistics.