Receiving UDP data asynchronously and forwards received packets to provided packet processors.
More...
#include <udpReceiver.hpp>
Receiving UDP data asynchronously and forwards received packets to provided packet processors.
UdpReceiver will create udp socket and immediately start reading when constructed. However received packets are not processed until Enable() is called. To disable processing again call Disable().
◆ MudpiProcessors
Container of {topic-id, processor}.
◆ UdpReceiver()
rtctk::telRepub::UdpReceiver::UdpReceiver |
( |
uint16_t |
idx, |
|
|
MudpiProcessors const & |
processors, |
|
|
boost::asio::ip::udp::endpoint const & |
endpoint, |
|
|
numapp::NumaPolicies const & |
receive_thread_policies |
|
) |
| |
|
explicit |
Creates UDP receiver.
This will create a socket and a start a thread reading from this socket. Until Enable() is called all packets are silently read but not processed.
- Parameters
-
idx | receiver's index. |
processors | Container with mudpi-topic and corresponding packet processor. |
endpoint | UDP endpoint to receive data from. |
receive_thread_policies | NUMA policies applied to receive thread. |
◆ ~UdpReceiver()
rtctk::telRepub::UdpReceiver::~UdpReceiver |
( |
| ) |
|
|
noexcept |
◆ Disable()
void rtctk::telRepub::UdpReceiver::Disable |
( |
| ) |
|
Disables processing UDP data from socket.
- Thread Safety
- thread-safe
◆ Enable()
void rtctk::telRepub::UdpReceiver::Enable |
( |
| ) |
|
Enables processing UDP data from socket.
- Thread Safety
- thread-safe
◆ Statistics()
void rtctk::telRepub::UdpReceiver::Statistics |
( |
| ) |
|
Dumps receiver statistics.
The documentation for this class was generated from the following files: