ifw-fgf 2.0.0
 
Loading...
Searching...
No Matches
statusParam.hpp
Go to the documentation of this file.
1
8
9#ifndef FGF_COM_STATUS_PARAM_HPP_H_
10#define FGF_COM_STATUS_PARAM_HPP_H_
11
12#include <boost/signals2.hpp>
13#include <boost/bimap.hpp>
14#include <boost/assign.hpp>
15#include <boost/algorithm/string.hpp>
16
17namespace ifw::fgf::common {
18 constexpr auto STAT_EXPO_TIME_STR = "expo_time";
19 constexpr auto STAT_FRAME_RATE_STR = "frame_rate";
20 constexpr auto STAT_FRAME_COUNTER_STR = "frame_counter";
21 constexpr auto STAT_TOTAL_FRAME_COUNTER_STR = "total_frame_counter";
22 constexpr auto STAT_WIDTH_STR = "width";
23 constexpr auto STAT_HEIGHT_STR = "height";
24 constexpr auto STAT_CAMERA_INTERFACE_STR = "camera_interface";
25 constexpr auto STAT_CAMERA_MODEL_STR = "camera_model";
26 constexpr auto STAT_CAMERA_NAME_STR = "camera_name";
27 constexpr auto STAT_CAMERA_SERIAL_NUMBER_STR = "camera_serial_number";
28 constexpr auto STAT_STATE_STR = "state";
29 constexpr auto STAT_SUBSTATE_STR = "substate";
30 constexpr auto STAT_RPC_ERROR_TEXT_STR = "rpc_error_text";
31 constexpr auto STAT_SYSTEM_ERROR_TEXT_STR = "system_error_text";
32
36 struct StatusParam {
37 public:
38
58
59 using StatusParamMap_t = boost::bimap<std::string, StatusParam::StatusEnum>;
60
61 // C++17 feature: you can define static members when they are inline.
62 // Used BOOST bidirectional maps.
63
65 boost::assign::list_of<StatusParam::StatusParamMap_t::relation>
80
84 inline static std::optional<StatusParam::StatusEnum>
85 GetStatusParam(const std::string& param);
86
90 inline static std::optional<std::string> GetStatusParamStr(const StatusEnum param);
91
92 };
93}
94
95#include "statusParam.ipp"
96
97#endif // FGF_COM_STATUS_PARAM_HPP_H_
Definition binarySemaphore.hpp:45
constexpr auto STAT_CAMERA_SERIAL_NUMBER_STR
Definition statusParam.hpp:27
constexpr auto STAT_HEIGHT_STR
Definition statusParam.hpp:23
constexpr auto STAT_FRAME_COUNTER_STR
Definition statusParam.hpp:20
constexpr auto STAT_CAMERA_INTERFACE_STR
Definition statusParam.hpp:24
constexpr auto STAT_STATE_STR
Definition statusParam.hpp:28
constexpr auto STAT_SUBSTATE_STR
Definition statusParam.hpp:29
constexpr auto STAT_CAMERA_MODEL_STR
Definition statusParam.hpp:25
constexpr auto STAT_WIDTH_STR
Definition statusParam.hpp:22
constexpr auto STAT_TOTAL_FRAME_COUNTER_STR
Definition statusParam.hpp:21
constexpr auto STAT_CAMERA_NAME_STR
Definition statusParam.hpp:26
constexpr auto STAT_EXPO_TIME_STR
Definition statusParam.hpp:18
constexpr auto STAT_SYSTEM_ERROR_TEXT_STR
Definition statusParam.hpp:31
constexpr auto STAT_RPC_ERROR_TEXT_STR
Definition statusParam.hpp:30
constexpr auto STAT_FRAME_RATE_STR
Definition statusParam.hpp:19
The status parameters enums definitions.
Definition statusParam.hpp:36
StatusEnum
Status ("stat" category) parameters enums.
Definition statusParam.hpp:42
@ STAT_EXPO_TIME_CODE
Definition statusParam.hpp:44
@ STAT_STATE_CODE
Definition statusParam.hpp:53
@ STAT_RPC_ERROR_TEXT_CODE
Definition statusParam.hpp:55
@ STAT_CAMERA_MODEL_CODE
Definition statusParam.hpp:50
@ STAT_SUBSTATE_CODE
Definition statusParam.hpp:54
@ STAT_TOTAL_FRAME_COUNTER_CODE
Definition statusParam.hpp:46
@ STAT_CAMERA_NAME_CODE
Definition statusParam.hpp:51
@ STAT_SYSTEM_ERROR_TEXT_CODE
Definition statusParam.hpp:56
@ STAT_HEIGHT_CODE
Definition statusParam.hpp:48
@ STAT_WIDTH_CODE
Definition statusParam.hpp:47
@ STAT_FRAME_COUNTER_CODE
Definition statusParam.hpp:45
@ STAT_FRAME_RATE_CODE
Definition statusParam.hpp:43
@ STAT_CAMERA_SERIAL_NUMBER_CODE
Definition statusParam.hpp:52
@ STAT_CAMERA_INTERFACE_CODE
Definition statusParam.hpp:49
boost::bimap< std::string, StatusParam::StatusEnum > StatusParamMap_t
Definition statusParam.hpp:59
static std::optional< StatusParam::StatusEnum > GetStatusParam(const std::string &param)
Get state as an enumeration.
static std::optional< std::string > GetStatusParamStr(const StatusEnum param)
Get state as an optional string.
static StatusParamMap_t StatusParamMap
Definition statusParam.hpp:64