ifw-fgf 2.0.0
 
Loading...
Searching...
No Matches
statusParam.hpp
Go to the documentation of this file.
1
6
7#ifndef ANDOR_COM_STATUS_PARAM_HPP_H_
8#define ANDOR_COM_STATUS_PARAM_HPP_H_
9
10#include <boost/signals2.hpp>
11#include <boost/bimap.hpp>
12#include <boost/assign.hpp>
13#include <boost/algorithm/string.hpp>
14
15namespace ifw::fgf::andor {
16 constexpr auto STAT_STRIDE_STR = "stride";
17 constexpr auto STAT_OVERLAP_STR = "overlap";
18 constexpr auto STAT_SENSOR_COOLING_STR = "sensor_cooling";
19 constexpr auto STAT_SENSOR_TEMPERATURE_STR = "sensor_temperature";
20 constexpr auto STAT_TEMPERATURE_CTRL_STR = "temperature_control";
21 constexpr auto STAT_TEMPERATURE_STAT_STR = "temperature_status";
22 constexpr auto STAT_PIXEL_ENCODING_STR = "pixel_encoding";
23 constexpr auto STAT_PIXEL_READOUT_RATE_STR = "pixel_readout_rate";
24 constexpr auto STAT_PRE_AMP_GAIN_CTRL_STR = "pre_amp_gain_control";
25 constexpr auto STAT_SIMPLE_PRE_AMP_GAIN_CTRL_STR = "simple_pre_amp_gain_control";
26 constexpr auto STAT_CAMERA_STATUS_STR = "camera_status";
27 constexpr auto STAT_BIT_DEPTH_STR = "bit_depth";
28 constexpr auto STAT_ELECTRONIC_SHUTTERING_MODE_STR = "electronic_shuttering_mode";
29 constexpr auto STAT_CMD_ERROR_TEXT_STR = "cmd_error_text";
30 constexpr auto STAT_FAN_SPEED_STR = "fan_speed";
31 constexpr auto STAT_METADATA_ENABLE_STR = "metadata_enable";
32 constexpr auto STAT_TRIGGER_MODE_STR = "trigger_mode";
33
41 struct StatusParam {
42 public:
43
64
65 using StatusParamMap_t = boost::bimap<std::string, StatusParam::StatusEnum>;
66
67 // C++17 feature: you can define static members when they are inline.
68 // Used BOOST bidirectional maps.
69
71 boost::assign::list_of<StatusParam::StatusParamMap_t::relation>
72
90
96 inline static std::optional<StatusParam::StatusEnum>
97 GetStatusParam(const std::string& param);
98
104 inline static std::optional<std::string> GetStatusParamStr(const StatusEnum param);
105
106 };
107}
108
109#include "statusParam.ipp"
110
111#endif // ANDOR_COM_STATUS_PARAM_HPP_H_
Definition commAdaptor.cpp:34
constexpr auto STAT_SENSOR_TEMPERATURE_STR
Definition statusParam.hpp:19
constexpr auto STAT_PIXEL_READOUT_RATE_STR
Definition statusParam.hpp:23
constexpr auto STAT_CAMERA_STATUS_STR
Definition statusParam.hpp:26
constexpr auto STAT_ELECTRONIC_SHUTTERING_MODE_STR
Definition statusParam.hpp:28
constexpr auto STAT_STRIDE_STR
Definition statusParam.hpp:16
constexpr auto STAT_SENSOR_COOLING_STR
Definition statusParam.hpp:18
constexpr auto STAT_METADATA_ENABLE_STR
Definition statusParam.hpp:31
constexpr auto STAT_CMD_ERROR_TEXT_STR
Definition statusParam.hpp:29
constexpr auto STAT_TEMPERATURE_STAT_STR
Definition statusParam.hpp:21
constexpr auto STAT_PRE_AMP_GAIN_CTRL_STR
Definition statusParam.hpp:24
constexpr auto STAT_PIXEL_ENCODING_STR
Definition statusParam.hpp:22
constexpr auto STAT_FAN_SPEED_STR
Definition statusParam.hpp:30
constexpr auto STAT_BIT_DEPTH_STR
Definition statusParam.hpp:27
constexpr auto STAT_TRIGGER_MODE_STR
Definition statusParam.hpp:32
constexpr auto STAT_TEMPERATURE_CTRL_STR
Definition statusParam.hpp:20
constexpr auto STAT_OVERLAP_STR
Definition statusParam.hpp:17
constexpr auto STAT_SIMPLE_PRE_AMP_GAIN_CTRL_STR
Definition statusParam.hpp:25
The State struct.
Definition statusParam.hpp:41
static std::optional< std::string > GetStatusParamStr(const StatusEnum param)
Get state as an optional string.
static std::optional< StatusParam::StatusEnum > GetStatusParam(const std::string &param)
Get state as an enumeration.
StatusEnum
Definition statusParam.hpp:44
@ STAT_CAMERA_STATUS_CODE
Definition statusParam.hpp:55
@ STAT_SENSOR_COOLING_CODE
Definition statusParam.hpp:47
@ STAT_CMD_ERROR_TEXT_CODE
Definition statusParam.hpp:58
@ STAT_PIXEL_ENCODING_CODE
Definition statusParam.hpp:51
@ STAT_OVERLAP_CODE
Definition statusParam.hpp:46
@ STAT_TEMPERATURE_STAT_CODE
Definition statusParam.hpp:50
@ STAT_BIT_DEPTH_CODE
Definition statusParam.hpp:56
@ STAT_TEMPERATURE_CTRL_CODE
Definition statusParam.hpp:49
@ STAT_SIMPLE_PRE_AMP_GAIN_CTRL_CODE
Definition statusParam.hpp:54
@ STAT_PRE_AMP_GAIN_CTRL_CODE
Definition statusParam.hpp:53
@ STAT_METADATA_ENABLE_CODE
Definition statusParam.hpp:60
@ STAT_PIXEL_READOUT_RATE_CODE
Definition statusParam.hpp:52
@ STAT_STRIDE_CODE
Definition statusParam.hpp:45
@ STAT_SENSOR_TEMPERATURE_CODE
Definition statusParam.hpp:48
@ STAT_TRIGGER_MODE_CODE
Definition statusParam.hpp:61
@ STAT_FAN_SPEED_CODE
Definition statusParam.hpp:59
@ STAT_ELECTRONIC_SHUTTERING_MODE_CODE
Definition statusParam.hpp:57
static StatusParamMap_t StatusParamMap
Definition statusParam.hpp:70
boost::bimap< std::string, StatusParam::StatusEnum > StatusParamMap_t
Definition statusParam.hpp:65