ifw-ccf  3.0.0-pre2
comAdptRtms.hpp
Go to the documentation of this file.
1 
5 #ifndef CCF_PROTOCOLS_RTMS_LIB_COM_ADPT_HPP_H_
6 #define CCF_PROTOCOLS_RTMS_LIB_COM_ADPT_HPP_H_
7 
8 #include <stdint.h>
9 #include <vector>
10 #include <thread>
11 
15 
16 namespace ccf::protocols::rtms {
17 
18  constexpr auto RTMS_PROP_IP_ADDRESS = "IpAddress";
19  constexpr auto RTMS_PROP_PORT = "Port";
20  constexpr auto RTMS_PROP_NET_IF = "NetworkInterface";
21  constexpr auto RTMS_PROP_WIDTH = "Width";
22  constexpr auto RTMS_PROP_HEIGHT = "Height";
23  constexpr auto RTMS_PROP_DATA_TYPE = "DataType";
24  constexpr auto RTMS_PROP_QUEUE_SIZE = "QueueSize";
25 
30  public:
31 
32  ComAdptRtms();
33  virtual ~ComAdptRtms();
34 
35  virtual void InitialiseUser();
36 
37  virtual void ConnectUser();
38 
39  virtual void DisconnectUser();
40 
41  virtual void ReceiveUser(ccf::common::DataFrame& frame,
42  bool& frame_received,
43  const double timeout,
44  bool& timed_out);
45 
46  protected:
47  // TODO: Should be shared ptr?
49  std::thread* m_receiver_thread;
50 
52 
53  std::string m_ip_address;
54  int m_port;
55  std::string m_net_if;
56  std::string m_data_type_str;
57  std::optional<DataTypes> m_data_type;
59  };
60 
61  }
62 
63  #endif // CCF_PROTOCOLS_RTMS_LIB_COM_ADPT_HPP_H_
Class to be used as parent for CCF Communication Adapters.
Definition: comAdptBase.hpp:31
Frame class used to store the data and metadata for one frames received from the camera.
Definition: dataFrame.hpp:17
CCF Communication Adapter implementing RTMS communication.
Definition: comAdptRtms.hpp:29
virtual void InitialiseUser()
Definition: comAdptRtms.cpp:29
ComAdptRtms()
Definition: comAdptRtms.cpp:21
std::string m_data_type_str
Definition: comAdptRtms.hpp:56
int m_queue_size
Definition: comAdptRtms.hpp:58
std::thread * m_receiver_thread
Definition: comAdptRtms.hpp:49
int m_port
Definition: comAdptRtms.hpp:54
std::string m_ip_address
Definition: comAdptRtms.hpp:53
virtual void ReceiveUser(ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
Definition: comAdptRtms.cpp:89
std::string m_net_if
Definition: comAdptRtms.hpp:55
virtual void ConnectUser()
Definition: comAdptRtms.cpp:65
virtual void DisconnectUser()
Definition: comAdptRtms.cpp:78
std::optional< DataTypes > m_data_type
Definition: comAdptRtms.hpp:57
virtual ~ComAdptRtms()
Definition: comAdptRtms.cpp:53
ccf::tools::rtms2ccflib::RtmsCcfReceiver * m_rtms_receiver
Definition: comAdptRtms.hpp:48
int8_t m_bytes_per_pixel
Definition: comAdptRtms.hpp:51
The RtmsCcfReceiver struct receives RTMS packets and package these in ccf::common::DataFrame objects.
Definition: rtmsCcfReceiver.hpp:25
CCF Communication Adapter based on the Rtms SDK.
Definition: comAdptRtms.cpp:19
constexpr auto RTMS_PROP_NET_IF
Definition: comAdptRtms.hpp:20
constexpr auto RTMS_PROP_IP_ADDRESS
Definition: comAdptRtms.hpp:18
constexpr auto RTMS_PROP_QUEUE_SIZE
Definition: comAdptRtms.hpp:24
constexpr auto RTMS_PROP_WIDTH
Definition: comAdptRtms.hpp:21
constexpr auto RTMS_PROP_HEIGHT
Definition: comAdptRtms.hpp:22
constexpr auto RTMS_PROP_DATA_TYPE
Definition: comAdptRtms.hpp:23
constexpr auto RTMS_PROP_PORT
Definition: comAdptRtms.hpp:19