RTC Toolkit  1.0.0
Public Types | Public Member Functions | List of all members
rtctk::telRepub::UdpReceiver Class Reference

Receiving UDP data asynchronously and forwards received packets to provided packet processors. More...

#include <udpReceiver.hpp>

Public Types

using MudpiProcessors = std::map< mudpi::uint16_t, PubThreadBase<> & >
 Container of {topic-id, processor}. More...
 

Public Member Functions

 UdpReceiver (uint16_t idx, MudpiProcessors const &processors, boost::asio::ip::udp::endpoint const &endpoint, numapp::NumaPolicies const &receive_thread_policies)
 Creates UDP receiver. More...
 
 ~UdpReceiver () noexcept
 
void Enable ()
 Enables processing UDP data from socket. More...
 
void Disable ()
 Disables processing UDP data from socket. More...
 
void Statistics ()
 Dumps receiver statistics. More...
 

Detailed Description

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().

Member Typedef Documentation

◆ MudpiProcessors

Container of {topic-id, processor}.

Constructor & Destructor Documentation

◆ 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
idxreceiver's index.
processorsContainer with mudpi-topic and corresponding packet processor.
endpointUDP endpoint to receive data from.
receive_thread_policiesNUMA policies applied to receive thread.

◆ ~UdpReceiver()

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

Member Function Documentation

◆ 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: