ifw-ccf 4.0.0
Loading...
Searching...
No Matches
rtmsCcfReceiver.hpp
Go to the documentation of this file.
1
8#ifndef RTMS_CCF_RECEIVER_HPP_
9#define RTMS_CCF_RECEIVER_HPP_
10
11//#define BOOST_BIND_NO_PLACEHOLDERS
12
14
15#include <ifw/rtmslib/rtmsReceiver.hpp>
16
17
19
25 class RtmsCcfReceiver : public ifw::rtmstools::RtmsReceiver {
26 public:
27
28 int m_packet_timeout{1000}; // Time to wait for next packet in ms.
33 uint16_t m_queue_size{0};
34 uint16_t m_receiver_index{0};
35 int64_t m_lost_frames{0};
36
37
38 RtmsCcfReceiver(std::string address,
39 int port,
40 std::string net_if,
41 int width,
42 int height,
43 int bpp,
44 ccf::DataType data_type,
45 int queue_size = 10);
46
47 virtual ~RtmsCcfReceiver();
48
50 virtual void HandleLeaderPacket();
51
53 virtual void HandlePayloadPacket(mudpiif::mudpiPacketJumbo& packet);
54
56 virtual void HandleTrailerPacket();
57
59 virtual void HandleLostPackets();
60
62 virtual void HandleWrongFrameId();
63
65 void GetFrame(ccf::common::DataFrame& data_frame,
66 double timeout,
67 bool& frame_received,
68 bool& timed_out);
69
70 int64_t GetLostFramesCount() const;
71
72 };
73}
74
75#endif // RTMS_CCF_RECEIVER_HPP_
Frame class used to store the data and metadata for one frames received from the camera.
Definition: dataFrame.hpp:17
The FrameQueue class implements a queue, to manage a set of CCF DataFrame instances as a ring buffer.
Definition: frameQueue.hpp:14
The RtmsCcfReceiver struct receives RTMS packets and package these in ccf::common::DataFrame objects.
Definition: rtmsCcfReceiver.hpp:25
virtual void HandleWrongFrameId()
Handle the case where a wrong frame ID is received.
Definition: rtmsCcfReceiver.cpp:102
virtual void HandlePayloadPacket(mudpiif::mudpiPacketJumbo &packet)
Invoked to handle a MUDPI/RTMS Payload Packet.
Definition: rtmsCcfReceiver.cpp:64
virtual ~RtmsCcfReceiver()
Definition: rtmsCcfReceiver.cpp:34
void GetFrame(ccf::common::DataFrame &data_frame, double timeout, bool &frame_received, bool &timed_out)
Receive one RTMS frame.
Definition: rtmsCcfReceiver.cpp:113
virtual void HandleLeaderPacket()
Invoked to handle a MUDPI/RTMS Leader Packet.
Definition: rtmsCcfReceiver.cpp:40
ccf::DataType m_data_type
Definition: rtmsCcfReceiver.hpp:32
virtual void HandleTrailerPacket()
Invoked to handle a MUDPI/RTMS Trailer Packet.
Definition: rtmsCcfReceiver.cpp:81
uint16_t m_receiver_index
Definition: rtmsCcfReceiver.hpp:34
int m_packet_timeout
Definition: rtmsCcfReceiver.hpp:28
int64_t GetLostFramesCount() const
Definition: rtmsCcfReceiver.cpp:144
int m_client_frame_index
Definition: rtmsCcfReceiver.hpp:31
ccf::common::DataFrame * m_cur_input_frame
Definition: rtmsCcfReceiver.hpp:30
uint16_t m_queue_size
Definition: rtmsCcfReceiver.hpp:33
ccf::common::FrameQueue * m_frame_queue
Definition: rtmsCcfReceiver.hpp:29
virtual void HandleLostPackets()
Handle the case where packets are lost.
Definition: rtmsCcfReceiver.cpp:91
int64_t m_lost_frames
Definition: rtmsCcfReceiver.hpp:35
RtmsCcfReceiver class file.
Definition: rtmsCcfReceiver.hpp:18
DataType
Definition: dataType.hpp:46