ifw-rtmstools 3.0.0
|
The Rtms2DdtReceiver struct. More...
#include <rtms2DdtReceiver.hpp>
Public Member Functions | |
Rtms2DdtReceiver (std::string address, int port, std::string net_if, int width, int height, int bpp) | |
virtual void | HandleLeaderPacket () |
Invoked to handle a MUDPI/RTMS Leader Packet. | |
virtual void | HandlePayloadPacket (mudpiif::mudpiPacketJumbo &packet) |
Invoked to handle a MUDPI/RTMS Payload Packet. | |
virtual void | HandleTrailerPacket () |
Invoked to handle a MUDPI/RTMS Trailer Packet. | |
virtual void | HandleLostPackets () |
Handle the case where packets are lost. | |
![]() | |
RtmsReceiver (std::string address, int port, std::string net_if, int width, int height, int bpp, const int rcv_buf_factor=3) | |
virtual | ~RtmsReceiver () |
int | GetSize () const |
Get image size in bytes. | |
int | GetWidth () const |
int | GetHeight () const |
void | ReceivePacket (const boost::system::error_code &error, size_t bytes_transferred) |
Callback to process RTMS packets. | |
virtual void | HandleWrongFrameId () |
Handle the case where a wrong frame ID is received. | |
virtual void | Wait () |
Wait for incoming network data (for asynchroneous use) | |
void | StartReceiver () |
Network configuration. | |
void | StopReceiver () |
int32_t | GetCurrentSampleId () const |
Public Attributes | |
std::shared_ptr< DdtImage > | m_ddt_image |
![]() | |
std::string | m_address |
int | m_port |
std::string | m_net_if |
int | m_width |
int | m_height |
int | m_bpp |
long unsigned int | m_prev_frames_expected |
long unsigned int | m_prev_frames_received |
bool | m_execute |
int | m_rcv_buf_factor {3} |
double | m_last_lost_packets_log {0.0} |
double | m_last_diff_sample_id_log {0.0} |
int32_t | m_current_sample_id {-1} |
unsigned int | m_sample {0} |
bool | m_io_service_running {false} |
boost::asio::io_service | m_io_service |
boost::asio::ip::udp::socket | m_socket {m_io_service} |
boost::array< char, PACKET_SIZE > | m_recv_buffer |
boost::asio::ip::udp::endpoint | m_remote_endpoint |
struct timeval m_start | m_end |
int | m_num_frames = 0 |
log4cplus::Logger | m_logger |
The Rtms2DdtReceiver struct.
This structure is used to receive RTMS packages and assembly back the image when the last packet is received. If any packet is lost, the complete frame will be discarded. It uses BOOST asio library for handling the UDP networking.
ifw::rtmstools::Rtms2DdtReceiver::Rtms2DdtReceiver | ( | std::string | address, |
int | port, | ||
std::string | net_if, | ||
int | width, | ||
int | height, | ||
int | bpp ) |
|
virtual |
Invoked to handle a MUDPI/RTMS Leader Packet.
Reimplemented from ifw::rtmstools::RtmsReceiver.
|
virtual |
Handle the case where packets are lost.
Reimplemented from ifw::rtmstools::RtmsReceiver.
|
virtual |
Invoked to handle a MUDPI/RTMS Payload Packet.
Reimplemented from ifw::rtmstools::RtmsReceiver.
|
virtual |
Invoked to handle a MUDPI/RTMS Trailer Packet.
Reimplemented from ifw::rtmstools::RtmsReceiver.
std::shared_ptr<DdtImage> ifw::rtmstools::Rtms2DdtReceiver::m_ddt_image |