ifw-ccf 4.0.0
Loading...
Searching...
No Matches
base.hpp
Go to the documentation of this file.
1
5#ifndef CCF_COMMON_BASE_HPP_H_
6#define CCF_COMMON_BASE_HPP_H_
7
8#include <fmt/format.h>
9
10#include <boost/exception/diagnostic_information.hpp>
11
12#include <config-ng/ciiConfigApi.hpp>
13
14#include <Recif.hpp>
15#include <core/utils/base/base.hpp>
16#include <core/utils/system/system.hpp>
17#include <core/utils/time/time.hpp>
18#include <core/utils/conversion/conversion.hpp>
19#include <utils/bat/config.hpp>
20
21#include <ccf/mptk/manager.hpp>
23
24namespace ccf {
25 log4cplus::Logger& Logger();
26 log4cplus::Logger& FastLogger();
27
29 constexpr auto CCF_VERSION = "1.2.0";
30
32 constexpr auto IFW_VERSION = "4.0";
33
34 constexpr auto NO_VALUE = "__NO__VALUE__";
35
37 const std::string DB_DELIM = std::string(utils::bat::CONFIG_DB_DELIMITER);
38
39 // @{
40 const std::string DB_NODE_SM_STATUS_STATE =
41 ("sm" + DB_DELIM + "status" + DB_DELIM + "state");
42 const std::string DB_NODE_SM_STATUS_SUBSTATE =
43 ("sm" + DB_DELIM + "status" + DB_DELIM + "substate");
44 const std::string DB_NODE_SM_STATE =
45 ("sm" + DB_DELIM + "state");
46 // @}
47
48
50 ccf::DataType CiiCfgNodeToCcfType(elt::configng::CiiConfigInstanceNode& node);
51
52 // }
53
55 // @{
56 constexpr auto META_KEY_EXPO_RATE = "MetaExpoType";
57 constexpr auto META_KEY_EXPO_TIME = "MetaExpoTime";
58 constexpr auto META_KEY_EXPO_WIN_BINX = "MetaExpoWinBinX";
59 constexpr auto META_KEY_EXPO_WIN_BINY = "MetaExpoWinBinY";
60 constexpr auto META_KEY_EXPO_WIN_STARTX = "MetaExpoWinStartX";
61 constexpr auto META_KEY_EXPO_WIN_STARTY = "MetaExpoWinStartY";
62 constexpr auto META_KEY_SYSTEM = "MetaSystem";
63 constexpr auto META_KEY_CAM_NAME = "MetaCamName";
64 constexpr auto META_KEY_CAM_ID = "MetaCamId";
65 constexpr auto META_KEY_CAM_MODEL = "MetaCamModel";
66 constexpr auto META_KEY_CAM_CHIPMODEL = "MetaCamChipModel";
67 constexpr auto META_KEY_CAM_TYPE = "MetaCamType";
68 // @}
69
71 // @{
72 constexpr auto STATE_ON_NOT_OP_NOT_READY = "On::NotOperational::NotReady";
73 constexpr auto STATE_ON_NOT_OP_READY = "On::NotOperational::Ready";
74 constexpr auto STATE_ON_OP_IDLE = "On::Operational::Idle";
75 constexpr auto STATE_ON_OP_ACQ = "On::Operational::Acquisition";
76 constexpr auto STATE_ON_OP_ACQ_NOT_REC = "On::Operational::Acquisition::NotRecording";
77 constexpr auto STATE_ON_OP_ACQ_REC = "On::Operational::Acquisition::Recording";
78 // @}
79
80 enum class ThreadType {
81 MONITOR = 1,
85 UNDEFINED = -1
86 };
87
89 void SendThrMsg(const std::string& command,
90 const std::string& sender_thread_name,
91 const std::string& receiver_thread_name,
92 const std::string& data);
93
95 bool ReceiveThrMsg(const std::string& receiver_thread_name,
96 const double time_out,
97 ccf::mptk::Message& message);
98
102 void DecomposeSmStatus(const std::string& sm_state,
103 std::string& sum_state,
104 std::string& sum_substate);
105
107 class Base {
108 public:
109
112 return s_mptk_mgr;
113 }
114
115
116 Base();
117 ~Base();
118
120 const std::string& GetClassName() const;
121
122 protected:
124 void SetClassName(const std::string& class_name);
125
126 private:
127 static ccf::mptk::Manager s_mptk_mgr;
128 std::string m_class_name;
129 };
130
132 void AssertPtr(const void* ptr,
133 const std::string& object,
134 const std::string& location);
135
137 enum class HwStatus {
138 NOT_OK = 0,
139 OK
140 };
141
143 enum class Status {
144 FAILURE = 0,
145 SUCCESS = 1
146 };
147
149 // @{
150 constexpr auto SUCCESS = "Success";
151 constexpr auto FAILURE = "Failure";
152 // @}
153
155 std::string StatusToStr(ccf::Status status);
156
158 inline DataType BitpixToDataType(const int8_t bitpix) {
159 switch (bitpix) {
160 case BYTE_IMG:
161 return DataType::BYTE;
162 case SHORT_IMG:
163 return DataType::INT16;
164 case USHORT_IMG:
165 return DataType::UINT16;
166 case LONG_IMG:
167 return DataType::INT32;
168 case FLOAT_IMG:
169 return DataType::FLOAT;
170 case LONGLONG_IMG:
171 return DataType::INT64;
172 case DOUBLE_IMG:
173 return DataType::DOUBLE;
174 default:
175 return DataType::INVALID;
176 }
177 }
178
180 inline static int8_t DataTypeToBitpix(const DataType data_type) {
181 switch (data_type) {
182 case DataType::BYTE:
183 return BYTE_IMG;
184 break;
185 case DataType::INT16:
186 return SHORT_IMG;
187 break;
188 case DataType::UINT16:
189 return USHORT_IMG;
190 break;
191 case DataType::INT32:
192 return LONG_IMG;
193 break;
194 case DataType::FLOAT:
195 return FLOAT_IMG;
196 break;
197 case DataType::DOUBLE:
198 return DOUBLE_IMG;
199 break;
200 default:
201 return 0;
202 }
203 }
204
206 enum class PubType {
207 UNDEFINED = -1,
208 RECORDING = 1,
210 };
211
213 enum class PubStatus {
214 ACTIVE = recif::RecStatusNames::Active,
215 COMPLETED = recif::RecStatusNames::Completed,
216 STOPPED = recif::RecStatusNames::Stopped,
217 ABORTED = recif::RecStatusNames::Aborted,
218 FAILED = recif::RecStatusNames::Failed,
219 UNDEFINED = recif::RecStatusNames::Undefined
220 };
221
223 void ResetRecStatusObj(std::shared_ptr<recif::RecStatus>& rec_status_obj,
224 const recif::RecStatusNames rec_status = recif::RecStatusNames::Undefined);
225
227 void CopyRecStatusObj(const std::shared_ptr<recif::RecStatus>& src_rec_status_obj,
228 const std::shared_ptr<recif::RecStatus>& trg_rec_status_obj);
229
231 enum class ProcStatus {
232 UNDEFINED = -1,
233 IDLE = 1,
234 PROCESSING = 32,
235 FINISHED = 128,
236 FAILED = 256
237 };
238
239 // TODO: Change name to Acquisition Mode.
241 enum class ExpoMode {
242 FINITE = 1,
245 };
246
248// @{
249 constexpr auto CFG_NODE_ACQUISITION = "acquisition";
250 constexpr auto CFG_NODE_MONITORING = "monitoring";
251 constexpr auto CFG_NODE_TELEMETRY = "telemetry";
252 constexpr auto CFG_NODE_PROCESSING = "processing";
253 constexpr auto CFG_NODE_RECORDING = "recording";
254 constexpr auto CFG_NODE_SERVER = "server";
255 constexpr auto CFG_NODE_TASKS = "tasks";
256
257 constexpr auto CFG_KEY_ADAPTER = "adapter";
258 constexpr auto CFG_KEY_ADDRESS = "address";
259 constexpr auto CFG_KEY_ALLOW_FRAME_SKIPPING = "allow_frame_skipping";
260 constexpr auto CFG_KEY_ALLOW_LOST_FRAMES = "allow_lost_frames";
261 constexpr auto CFG_KEY_AUTO_STOP_ACQ_AFTER_REC = "auto_stop_acq_after_rec";
262 constexpr auto CFG_KEY_ENABLED = "enabled";
263 constexpr auto CFG_KEY_DEVICES = "devices";
264 constexpr auto CFG_KEY_HEIGHT = "height";
265 constexpr auto CFG_KEY_ID = "id";
266 constexpr auto CFG_KEY_INIT_SETUP = "init_setup";
267 constexpr auto CFG_KEY_INPUT_QUEUE_SIZE = "input_queue_size";
268 constexpr auto CFG_KEY_MANUFACTURER = "manufacturer";
269 constexpr auto CFG_KEY_MAPPING = "mapping";
270 constexpr auto CFG_KEY_MAX_RATE = "max_rate";
271 constexpr auto CFG_KEY_MAX_RESOLUTION = "max_resolution";
272 constexpr auto CFG_KEY_METADATA_MAP = "metadata_map";
273 constexpr auto CFG_KEY_MODEL = "model";
274 constexpr auto CFG_KEY_NAME = "name";
275 constexpr auto CFG_KEY_NAMES = "names";
276 constexpr auto CFG_KEY_NB_OF_SAMPLES = "nb_of_samples";
277 constexpr auto CFG_KEY_OLDB_NODE = "oldb_node";
278 constexpr auto CFG_KEY_OUPUT_QUEUE_SIZE = "output_queue_size";
279 constexpr auto CFG_KEY_PERIOD = "period";
280 constexpr auto CFG_KEY_PIPELINE = "pipeline";
281 constexpr auto CFG_KEY_PROPERTIES = "properties";
282 constexpr auto CFG_KEY_PROTOCOL = "protocol";
283 constexpr auto CFG_KEY_PUBLISHERS = "publishers";
284 constexpr auto CFG_KEY_RECIPES = "recipes";
285 constexpr auto CFG_KEY_REC_HIST_EXP = "rec_hist_expiration";
286 constexpr auto CFG_KEY_REC_HIST_SIZE = "rec_hist_size";
287 constexpr auto CFG_KEY_RESOLUTION = "resolution";
288 constexpr auto CFG_KEY_SDK = "sdk";
289 constexpr auto CFG_KEY_SIMULATION = "simulation";
290 constexpr auto CFG_KEY_SIM_ADDRESS = "sim_address";
291 constexpr auto CFG_KEY_TYPE = "type";
292 constexpr auto CFG_KEY_VALUE = "value";
293 constexpr auto CFG_KEY_WIDTH = "width";
294 constexpr auto CFG_KEY_WRITE_ON_INIT = "write_on_init";
295// @}
296
298 // @{
299 constexpr auto SETUP_NODE_EXPO = "expo";
300 constexpr auto SETUP_NODE_SIM = "sim";
301
302 constexpr auto SETUP_KEY_ADDRESS = "address";
303 constexpr auto SETUP_KEY_BASENAME = "basename";
304 constexpr auto SETUP_KEY_BIN_X = "bin_x";
305 constexpr auto SETUP_KEY_BIN_Y = "bin_y";
306 constexpr auto SETUP_KEY_DELAY = "delay";
307 constexpr auto SETUP_KEY_ENABLED = "enabled";
308 constexpr auto SETUP_KEY_FILE = "file";
309 constexpr auto SETUP_KEY_FORMAT = "format";
310 constexpr auto SETUP_KEY_FRAME_RATE = "frame_rate";
311 constexpr auto SETUP_KEY_FRAME_RATE_LIMIT = "frame_rate_limit";
312 constexpr auto SETUP_KEY_INTERFACE = "interface";
313 constexpr auto SETUP_KEY_MAX_RATE = "max_rate";
314 constexpr auto SETUP_KEY_MAX_SHIFT = "max_shift";
315 constexpr auto SETUP_KEY_MAX_SHIFT_PR_FRAME = "max_shift_pr_frame";
316 constexpr auto SETUP_KEY_MAX_SIZE = "max_size";
317 constexpr auto SETUP_KEY_MODE = "mode";
318 constexpr auto SETUP_KEY_NB = "nb";
319 constexpr auto SETUP_KEY_RATE = "rate";
320 constexpr auto SETUP_KEY_NOISE = "noise";
321 constexpr auto SETUP_KEY_PORT = "port";
322 constexpr auto SETUP_KEY_TIME = "time";
323 constexpr auto SETUP_KEY_TYPE = "type";
324 constexpr auto SETUP_KEY_WIN_START_X = "win_start_x";
325 constexpr auto SETUP_KEY_WIN_START_Y = "win_start_y";
326 constexpr auto SETUP_KEY_WIN_WIDTH = "win_width";
327 constexpr auto SETUP_KEY_WIN_HEIGHT = "win_height";
328// @}
329
331 // @{
332 constexpr auto EXPO_MODE_FINITE = "Finite";
333 constexpr auto EXPO_MODE_CONTINUOUS = "Continuous";
334 constexpr auto EXPO_MODE_INACTIVE = "Inactive";
335 // @}
336
337 // Prefix prepended to Recording Session IDs.
338 constexpr auto REC_ID_PREFIX = "RecId";
339
341 ExpoMode ExpoModeToNb(const std::string& expo_mode);
342
344 enum class SimType {
345 FILE = 1,
347 };
348
350 // @{
351 constexpr auto SIM_TYPE_FILE_STR = "File";
352 constexpr auto SIM_TYPE_PATTERN1_STR = "Pattern1";
353 // @}
354
356 // @{
357 constexpr auto PUB_STAT_NAME_ACTIVE = "Active";
358 constexpr auto PUB_STAT_NAME_COMPLETED = "Completed";
359 constexpr auto PUB_STAT_NAME_STOPPED = "Stopped";
360 constexpr auto PUB_STAT_NAME_ABORTED = "Aborted";
361 constexpr auto PUB_STAT_NAME_FAILED = "Failed";
362 constexpr auto PUB_STAT_NAME_UNDEFINED = "Undefined";
363 // @}
364
366 std::string RecStatusNameToStr(recif::RecStatusNames rec_status_nb);
367
369 std::string PubStatusNameToStr(PubStatus pub_status_nb);
370
372 std::string BuildKey(const std::vector<std::string>& elements);
373
375 std::vector<std::string> SplitKey(const std::string& key);
376
377}
378
380inline std::string CcfThreadName() {
381 char thread_name[32];
382 pthread_getname_np(pthread_self(), thread_name, 32);
383 return thread_name;
384}
385
387#define CCFLOC (std::string(__FILE__) + ":" + std::to_string(__LINE__) + ":" + \
388 std::string(__FUNCTION__) + ":" + CcfThreadName())
389#define CCFL0C (std::string(__FILE__) + ":" + std::to_string(__LINE__) + ":" + \
390 std::string(__FUNCTION__) + ":" + CcfThreadName() + ": ")
391
392#define CCFTIME core::utils::time::Time()
393
396inline void CcfDebug(const std::string& location,
397 const std::string& msg) {
398 fmt::print("{}:{}#> {}\n", core::utils::time::IsoTimeNow(), location, msg);
399 fflush(stdout);
400}
401
402// /// Guard for INFO logs. Ensures log text is only generated when the given log level is enabled.
403// #define INFO_LOG_GUARD if (ccf::Base::GetLogLevel() >= ccf::LogLevel::INFO)
404
405// /// Guard for DEBUG logs. Ensures log text is only generated when the given log level is enabled.
406// #define DEBUG_LOG_GUARD if (ccf::Base::GetLogLevel() >= ccf::LogLevel::DEBUG)
407
408// /// Guard for DEBUG2 logs. Ensures log text is only generated when the given log level is enabled.
409// #define DEBUG2_LOG_GUARD if (ccf::Base::GetLogLevel() >= ccf::LogLevel::DEBUG2)
410
411// /// Guard for DEBUG3 logs. Ensures log text is only generated when the given log level is enabled.
412// #define DEBUG3_LOG_GUARD if (ccf::Base::GetLogLevel() >= ccf::LogLevel::DEBUG3)
413
416#define CCFTHROW(msg) throw rad::Exception(CCFLOC + ": " + msg)
417
418#endif // CCF_COMMON_BASE_HPP_H_
void CcfDebug(const std::string &location, const std::string &msg)
Definition: base.hpp:396
std::string CcfThreadName()
Return thread name allocated.
Definition: base.hpp:380
Class to be used as parent all CCF classes.
Definition: base.hpp:107
~Base()
Definition: base.cpp:120
static ccf::mptk::Manager & Mptk()
Return reference to internal MPTK instance (singleton).
Definition: base.hpp:111
Base()
Definition: base.cpp:118
const std::string & GetClassName() const
Return the allocated name of the class.
Definition: base.cpp:122
void SetClassName(const std::string &class_name)
Set the name of the class in question.
Definition: base.cpp:127
IFW CTD Multiprocessing Toolkit Manager class.
Definition: manager.hpp:21
IFW CTD Multiprocessing Toolkit Message class.
Definition: message.hpp:24
Definition: appBase.cpp:8
constexpr auto SETUP_NODE_EXPO
Definition: base.hpp:299
constexpr auto SETUP_KEY_BIN_X
Definition: base.hpp:304
ProcStatus
Possible states for a Processing Recipe defined.
Definition: base.hpp:231
const std::string DB_DELIM
Definition: base.hpp:37
constexpr auto CFG_KEY_MODEL
Definition: base.hpp:273
constexpr auto SETUP_KEY_TIME
Definition: base.hpp:322
constexpr auto META_KEY_EXPO_WIN_BINY
Definition: base.hpp:59
constexpr auto META_KEY_SYSTEM
Definition: base.hpp:62
constexpr auto CFG_KEY_REC_HIST_EXP
Definition: base.hpp:285
std::string RecStatusNameToStr(recif::RecStatusNames rec_status_nb)
Recording Status name, number to string representation.
Definition: base.cpp:164
void SendThrMsg(const std::string &command, const std::string &sender_thread_name, const std::string &receiver_thread_name, const std::string &data)
Send MPTK message via internal Message Bus.
Definition: base.cpp:45
constexpr auto CFG_KEY_ADDRESS
Definition: base.hpp:258
constexpr auto CFG_KEY_RESOLUTION
Definition: base.hpp:287
constexpr auto META_KEY_CAM_NAME
Definition: base.hpp:63
std::string PubStatusNameToStr(PubStatus pub_status_nb)
Publisher status, number representation to string.
Definition: base.cpp:152
constexpr auto SETUP_KEY_MAX_SHIFT
Definition: base.hpp:314
constexpr auto META_KEY_CAM_TYPE
Definition: base.hpp:67
constexpr auto META_KEY_CAM_ID
Definition: base.hpp:64
constexpr auto CFG_NODE_SERVER
Definition: base.hpp:254
log4cplus::Logger & FastLogger()
Definition: base.cpp:22
const std::string DB_NODE_SM_STATUS_STATE
Definition: base.hpp:40
constexpr auto CFG_NODE_MONITORING
Definition: base.hpp:250
constexpr auto CCF_VERSION
Version of CCF.
Definition: base.hpp:29
constexpr auto EXPO_MODE_CONTINUOUS
Definition: base.hpp:333
constexpr auto CFG_KEY_SIMULATION
Definition: base.hpp:289
constexpr auto SETUP_KEY_WIN_START_Y
Definition: base.hpp:325
const std::string DB_NODE_SM_STATUS_SUBSTATE
Definition: base.hpp:42
std::string BuildKey(const std::vector< std::string > &elements)
Build a concatenated key from a number of elements (<el1>.<el2.>...).
Definition: base.cpp:238
constexpr auto CFG_KEY_DEVICES
Definition: base.hpp:263
constexpr auto CFG_KEY_TYPE
Definition: base.hpp:291
ThreadType
Definition: base.hpp:80
void AssertPtr(const void *ptr, const std::string &object, const std::string &location)
Check that pointer is not nullptr and raise rad::exception in case it is.
Definition: base.cpp:63
constexpr auto CFG_NODE_RECORDING
Definition: base.hpp:253
constexpr auto CFG_KEY_PUBLISHERS
Definition: base.hpp:283
constexpr auto CFG_KEY_MAX_RATE
Definition: base.hpp:270
constexpr auto SETUP_KEY_NOISE
Definition: base.hpp:320
constexpr auto CFG_KEY_WRITE_ON_INIT
Definition: base.hpp:294
constexpr auto SETUP_KEY_FRAME_RATE_LIMIT
Definition: base.hpp:311
constexpr auto CFG_KEY_METADATA_MAP
Definition: base.hpp:272
constexpr auto CFG_KEY_MANUFACTURER
Definition: base.hpp:268
constexpr auto STATE_ON_OP_IDLE
Definition: base.hpp:74
constexpr auto META_KEY_EXPO_WIN_BINX
Definition: base.hpp:58
constexpr auto META_KEY_CAM_CHIPMODEL
Definition: base.hpp:66
constexpr auto CFG_KEY_ALLOW_FRAME_SKIPPING
Definition: base.hpp:259
PubType
A Publisher may be Recording or Not-Recording. A Recording Publisher publishes data into files.
Definition: base.hpp:206
constexpr auto IFW_VERSION
Version of IFW.
Definition: base.hpp:32
constexpr auto PUB_STAT_NAME_FAILED
Definition: base.hpp:361
constexpr auto SETUP_KEY_ADDRESS
Definition: base.hpp:302
constexpr auto SETUP_KEY_MAX_SIZE
Definition: base.hpp:316
constexpr auto META_KEY_CAM_MODEL
Definition: base.hpp:65
constexpr auto CFG_KEY_SDK
Definition: base.hpp:288
constexpr auto PUB_STAT_NAME_ABORTED
Definition: base.hpp:360
constexpr auto META_KEY_EXPO_WIN_STARTY
Definition: base.hpp:61
constexpr auto META_KEY_EXPO_WIN_STARTX
Definition: base.hpp:60
constexpr auto SETUP_NODE_SIM
Definition: base.hpp:300
log4cplus::Logger & Logger()
Definition: base.cpp:11
constexpr auto CFG_KEY_NAME
Definition: base.hpp:274
constexpr auto SIM_TYPE_PATTERN1_STR
Definition: base.hpp:352
constexpr auto CFG_KEY_REC_HIST_SIZE
Definition: base.hpp:286
constexpr auto PUB_STAT_NAME_ACTIVE
Definition: base.hpp:357
PubStatus
Defines the various possible states of a Data Publisher.
Definition: base.hpp:213
constexpr auto SETUP_KEY_DELAY
Definition: base.hpp:306
constexpr auto CFG_KEY_PERIOD
Definition: base.hpp:279
constexpr auto SETUP_KEY_MAX_SHIFT_PR_FRAME
Definition: base.hpp:315
constexpr auto CFG_KEY_WIDTH
Definition: base.hpp:293
constexpr auto CFG_KEY_ENABLED
Definition: base.hpp:262
constexpr auto CFG_KEY_MAPPING
Definition: base.hpp:269
constexpr auto NO_VALUE
Definition: base.hpp:34
constexpr auto CFG_KEY_PROPERTIES
Definition: base.hpp:281
constexpr auto SUCCESS
Definition: base.hpp:150
constexpr auto CFG_KEY_OUPUT_QUEUE_SIZE
Definition: base.hpp:278
constexpr auto CFG_NODE_ACQUISITION
Definition: base.hpp:249
constexpr auto CFG_KEY_ID
Definition: base.hpp:265
void ResetRecStatusObj(std::shared_ptr< recif::RecStatus > &rec_status_obj, const recif::RecStatusNames rec_status)
Reset the members of the Recording Status Object.
Definition: base.cpp:169
constexpr auto CFG_NODE_TASKS
Definition: base.hpp:255
constexpr auto STATE_ON_NOT_OP_NOT_READY
Definition: base.hpp:72
constexpr auto CFG_KEY_RECIPES
Definition: base.hpp:284
constexpr auto SETUP_KEY_PORT
Definition: base.hpp:321
constexpr auto PUB_STAT_NAME_STOPPED
Definition: base.hpp:359
HwStatus
HW status values.
Definition: base.hpp:137
std::vector< std::string > SplitKey(const std::string &key)
Split up a concatenated key.
Definition: base.cpp:242
constexpr auto SETUP_KEY_INTERFACE
Definition: base.hpp:312
constexpr auto CFG_NODE_TELEMETRY
Definition: base.hpp:251
ccf::DataType CiiCfgNodeToCcfType(elt::configng::CiiConfigInstanceNode &node)
Determine CCF data type from a CII Cfg Node.
Definition: base.cpp:73
constexpr auto SETUP_KEY_FILE
Definition: base.hpp:308
ExpoMode
Exposure modes.
Definition: base.hpp:241
constexpr auto SETUP_KEY_ENABLED
Definition: base.hpp:307
DataType BitpixToDataType(const int8_t bitpix)
Converts the FITS BITPIX value into a data type.
Definition: base.hpp:158
constexpr auto EXPO_MODE_INACTIVE
Definition: base.hpp:334
constexpr auto SETUP_KEY_TYPE
Definition: base.hpp:323
constexpr auto CFG_KEY_ALLOW_LOST_FRAMES
Definition: base.hpp:260
ExpoMode ExpoModeToNb(const std::string &expo_mode)
Convert exposure mode from number representation to string.
Definition: base.cpp:132
constexpr auto STATE_ON_OP_ACQ
Definition: base.hpp:75
constexpr auto SETUP_KEY_BIN_Y
Definition: base.hpp:305
constexpr auto FAILURE
Definition: base.hpp:151
constexpr auto CFG_KEY_PROTOCOL
Definition: base.hpp:282
constexpr auto SETUP_KEY_RATE
Definition: base.hpp:319
constexpr auto SETUP_KEY_BASENAME
Definition: base.hpp:303
constexpr auto SETUP_KEY_NB
Definition: base.hpp:318
constexpr auto CFG_KEY_MAX_RESOLUTION
Definition: base.hpp:271
constexpr auto SETUP_KEY_WIN_START_X
Definition: base.hpp:324
DataType
Definition: dataType.hpp:46
constexpr auto SETUP_KEY_WIN_HEIGHT
Definition: base.hpp:327
constexpr auto CFG_KEY_AUTO_STOP_ACQ_AFTER_REC
Definition: base.hpp:261
std::string StatusToStr(ccf::Status status)
Convert the status from number to string.
Definition: base.cpp:144
constexpr auto PUB_STAT_NAME_COMPLETED
Definition: base.hpp:358
constexpr auto CFG_KEY_NB_OF_SAMPLES
Definition: base.hpp:276
constexpr auto CFG_KEY_VALUE
Definition: base.hpp:292
constexpr auto CFG_KEY_INIT_SETUP
Definition: base.hpp:266
constexpr auto CFG_KEY_ADAPTER
Definition: base.hpp:257
void DecomposeSmStatus(const std::string &sm_state, std::string &sum_state, std::string &sum_substate)
Definition: base.cpp:204
constexpr auto SETUP_KEY_FRAME_RATE
Definition: base.hpp:310
constexpr auto CFG_KEY_PIPELINE
Definition: base.hpp:280
constexpr auto EXPO_MODE_FINITE
Definition: base.hpp:332
constexpr auto META_KEY_EXPO_TIME
Definition: base.hpp:57
constexpr auto SIM_TYPE_FILE_STR
Definition: base.hpp:351
constexpr auto STATE_ON_OP_ACQ_REC
Definition: base.hpp:77
constexpr auto CFG_KEY_INPUT_QUEUE_SIZE
Definition: base.hpp:267
bool ReceiveThrMsg(const std::string &receiver_thread_name, const double time_out, ccf::mptk::Message &message)
Receive a message from the given thread. Returns true if message received.
Definition: base.cpp:55
SimType
Simulation type.
Definition: base.hpp:344
constexpr auto SETUP_KEY_MODE
Definition: base.hpp:317
constexpr auto PUB_STAT_NAME_UNDEFINED
Definition: base.hpp:362
constexpr auto CFG_KEY_NAMES
Definition: base.hpp:275
constexpr auto CFG_NODE_PROCESSING
Definition: base.hpp:252
void CopyRecStatusObj(const std::shared_ptr< recif::RecStatus > &src_rec_status_obj, const std::shared_ptr< recif::RecStatus > &trg_rec_status_obj)
Cope the members of one Recording Status Object to another.
Definition: base.cpp:187
constexpr auto SETUP_KEY_MAX_RATE
Definition: base.hpp:313
constexpr auto META_KEY_EXPO_RATE
Definition: base.hpp:56
constexpr auto SETUP_KEY_FORMAT
Definition: base.hpp:309
constexpr auto CFG_KEY_OLDB_NODE
Definition: base.hpp:277
constexpr auto CFG_KEY_HEIGHT
Definition: base.hpp:264
Status
General status variable.
Definition: base.hpp:143
constexpr auto CFG_KEY_SIM_ADDRESS
Definition: base.hpp:290
constexpr auto STATE_ON_NOT_OP_READY
Definition: base.hpp:73
constexpr auto STATE_ON_OP_ACQ_NOT_REC
Definition: base.hpp:76
const std::string DB_NODE_SM_STATE
Definition: base.hpp:44
constexpr auto SETUP_KEY_WIN_WIDTH
Definition: base.hpp:326
constexpr auto REC_ID_PREFIX
Definition: base.hpp:338