ifw-ccf  3.0.0-pre2
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 <rtmslib/rtmsReceiver.hpp>
16 
17 
19 
25  class RtmsCcfReceiver : public rtmstools::rtmslib::RtmsReceiver {
26  public:
27 
28  int m_packet_timeout = 1000; // Time to wait for next packet in ms.
33  uint16_t m_queue_size = -1;
34  uint16_t m_receiver_index = 0;
35 
36  RtmsCcfReceiver(std::string address,
37  int port,
38  std::string net_if,
39  int width,
40  int height,
41  int bpp,
42  ccf::DataTypes data_type,
43  int queue_size = 10);
44 
45  virtual ~RtmsCcfReceiver();
46 
50  virtual void HandleLeaderPacket();
51 
55  virtual void HandlePayloadPacket(mudpiif::mudpiPacketJumbo& packet);
56 
60  virtual void HandleTrailerPacket();
61 
65  virtual void HandleLostPackets();
66 
70  virtual void HandleWrongFrameId();
71 
75  void GetFrame(ccf::common::DataFrame& data_frame,
76  double timeout,
77  bool& frame_received,
78  bool& timed_out);
79 
80  };
81 }
82 
83 #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:100
virtual void HandlePayloadPacket(mudpiif::mudpiPacketJumbo &packet)
Invoked to handle a MUDPI/RTMS Payload Packet.
Definition: rtmsCcfReceiver.cpp:64
ccf::DataTypes m_data_type
Definition: rtmsCcfReceiver.hpp:32
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:110
virtual void HandleLeaderPacket()
Invoked to handle a MUDPI/RTMS Leader Packet.
Definition: rtmsCcfReceiver.cpp:40
virtual void HandleTrailerPacket()
Invoked to handle a MUDPI/RTMS Trailer Packet.
Definition: rtmsCcfReceiver.cpp:80
uint16_t m_receiver_index
Definition: rtmsCcfReceiver.hpp:34
int m_packet_timeout
Definition: rtmsCcfReceiver.hpp:28
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:90
RtmsCcfReceiver(std::string address, int port, std::string net_if, int width, int height, int bpp, ccf::DataTypes data_type, int queue_size=10)
Definition: rtmsCcfReceiver.cpp:20
Definition: rtmsCcfReceiver.hpp:18
DataTypes
Definition: dataType.hpp:46