|
RTC Toolkit 5.1.0
|
Receiving UDP data asynchronously and forwards received packets to provided packet processors. More...
#include <udpReceiver.hpp>
Public Member Functions | |
| UdpReceiver (const std::string &receiver_name, std::map< int32_t, QueuePtr > queue_map, size_t buffer_count, componentFramework::ServiceContainer &service, const UdpReceiverCfg &cfg) | |
| Creates UDP receiver. | |
| ~UdpReceiver () noexcept | |
| void | Enable () |
| Enables processing UDP data from socket. | |
| void | Disable () |
| Disables processing UDP data from socket. | |
| bool | CheckReceiveTimeout () |
| Check for timeout in receiving, and send an alert. | |
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().
|
explicit |
Creates UDP receiver.
This will create a socket and start a thread reading from this socket. Until Enable() is called all packets are silently read but not processed.
| receiver_name | receiver's name. |
| queue_map | Mapping of topic IDs to the publisher thread queues. |
| buffer_count | The number of buffers to store UDP frames. |
| service | reference to Component service. |
| cfg | receiver's configuration. |
|
noexcept |
| bool rtctk::telRepub::UdpReceiver::CheckReceiveTimeout | ( | ) |
Check for timeout in receiving, and send an alert.
| void rtctk::telRepub::UdpReceiver::Disable | ( | ) |
Disables processing UDP data from socket.
| void rtctk::telRepub::UdpReceiver::Enable | ( | ) |
Enables processing UDP data from socket.