ifw-ccf  2.0.0
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& timed_out);
78 
79  };
80 }
81 
82 #endif // RTMS_CCF_RECEIVER_HPP_
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_cur_input_frame
ccf::common::DataFrame * m_cur_input_frame
Definition: rtmsCcfReceiver.hpp:30
ccf::tools::rtms2ccflib
Definition: rtmsCcfReceiver.hpp:18
frameQueue.hpp
ccf::tools::rtms2ccflib::RtmsCcfReceiver::HandleLostPackets
virtual void HandleLostPackets()
Handle the case where packets are lost.
Definition: rtmsCcfReceiver.cpp:90
ccf::tools::rtms2ccflib::RtmsCcfReceiver
The RtmsCcfReceiver struct receives RTMS packets and package these in ccf::common::DataFrame objects.
Definition: rtmsCcfReceiver.hpp:25
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_receiver_index
uint16_t m_receiver_index
Definition: rtmsCcfReceiver.hpp:34
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_packet_timeout
int m_packet_timeout
Definition: rtmsCcfReceiver.hpp:28
ccf::tools::rtms2ccflib::RtmsCcfReceiver::HandleWrongFrameId
virtual void HandleWrongFrameId()
Handle the case where a wrong frame ID is received.
Definition: rtmsCcfReceiver.cpp:100
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_data_type
ccf::DataTypes m_data_type
Definition: rtmsCcfReceiver.hpp:32
ccf::tools::rtms2ccflib::RtmsCcfReceiver::HandleTrailerPacket
virtual void HandleTrailerPacket()
Invoked to handle a MUDPI/RTMS Trailer Packet.
Definition: rtmsCcfReceiver.cpp:80
ccf::common::FrameQueue
The FrameQueue class implements a queue, to manage a set of CCF DataFrame instances as a ring buffer.
Definition: frameQueue.hpp:14
ccf::tools::rtms2ccflib::RtmsCcfReceiver::GetFrame
void GetFrame(ccf::common::DataFrame &data_frame, double timeout, bool &timed_out)
Receive one RTMS frame.
Definition: rtmsCcfReceiver.cpp:110
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_queue_size
uint16_t m_queue_size
Definition: rtmsCcfReceiver.hpp:33
ccf::tools::rtms2ccflib::RtmsCcfReceiver::RtmsCcfReceiver
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
ccf::tools::rtms2ccflib::RtmsCcfReceiver::HandlePayloadPacket
virtual void HandlePayloadPacket(mudpiif::mudpiPacketJumbo &packet)
Invoked to handle a MUDPI/RTMS Payload Packet.
Definition: rtmsCcfReceiver.cpp:64
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_client_frame_index
int m_client_frame_index
Definition: rtmsCcfReceiver.hpp:31
ccf::tools::rtms2ccflib::RtmsCcfReceiver::~RtmsCcfReceiver
virtual ~RtmsCcfReceiver()
Definition: rtmsCcfReceiver.cpp:34
ccf::tools::rtms2ccflib::RtmsCcfReceiver::m_frame_queue
ccf::common::FrameQueue * m_frame_queue
Definition: rtmsCcfReceiver.hpp:29
ccf::DataTypes
DataTypes
Definition: dataType.hpp:46
ccf::common::DataFrame
Frame class used to store the data and metadata for one frames received from the camera.
Definition: dataFrame.hpp:17
ccf::tools::rtms2ccflib::RtmsCcfReceiver::HandleLeaderPacket
virtual void HandleLeaderPacket()
Invoked to handle a MUDPI/RTMS Leader Packet.
Definition: rtmsCcfReceiver.cpp:40