API
 
Loading...
Searching...
No Matches
logCodes.hpp
Go to the documentation of this file.
1#ifndef logger_logCodes_hpp
2#define logger_logCodes_hpp
4namespace MagAOX
5{
6namespace logger
7{
8namespace eventCodes
9{
10 constexpr static flatlogs::eventCodeT GIT_STATE = 0;
11 constexpr static flatlogs::eventCodeT TEXT_LOG = 10;
12 constexpr static flatlogs::eventCodeT USER_LOG = 12;
13 constexpr static flatlogs::eventCodeT STATE_CHANGE = 20;
14 constexpr static flatlogs::eventCodeT SOFTWARE_LOG = 50;
15 constexpr static flatlogs::eventCodeT CONFIG_LOG = 60;
16 constexpr static flatlogs::eventCodeT INDIDRIVER_START = 140;
17 constexpr static flatlogs::eventCodeT INDIDRIVER_STOP = 141;
18 constexpr static flatlogs::eventCodeT LOOP_CLOSED = 1001;
19 constexpr static flatlogs::eventCodeT LOOP_PAUSED = 1002;
20 constexpr static flatlogs::eventCodeT LOOP_OPEN = 1003;
21 constexpr static flatlogs::eventCodeT OBSERVER = 1050;
22 constexpr static flatlogs::eventCodeT AO_OPERATOR = 1051;
23 constexpr static flatlogs::eventCodeT PICO_CHANNEL = 11025;
24 constexpr static flatlogs::eventCodeT OUTLET_STATE = 12001;
26 constexpr static flatlogs::eventCodeT TELEM_SAVING_STATE = 12053;
27 constexpr static flatlogs::eventCodeT TELEM_FXNGEN = 12100;
28 constexpr static flatlogs::eventCodeT TTMMOD_PARAMS = 12110;
29 constexpr static flatlogs::eventCodeT OCAM_TEMPS = 12120;
30 constexpr static flatlogs::eventCodeT SAVING_START = 12500;
31 constexpr static flatlogs::eventCodeT SAVING_STOP = 12501;
32 constexpr static flatlogs::eventCodeT TELEM_SAVING = 12502;
33 constexpr static flatlogs::eventCodeT TELEM_TELPOS = 20000;
34 constexpr static flatlogs::eventCodeT TELEM_TELDATA = 20001;
35 constexpr static flatlogs::eventCodeT TELEM_TELVANE = 20002;
36 constexpr static flatlogs::eventCodeT TELEM_TELENV = 20003;
37 constexpr static flatlogs::eventCodeT TELEM_TELCAT = 20004;
38 constexpr static flatlogs::eventCodeT TELEM_TELSEE = 20005;
39 constexpr static flatlogs::eventCodeT TELEM_STAGE = 20050;
40 constexpr static flatlogs::eventCodeT TELEM_ZABER = 20055;
41 constexpr static flatlogs::eventCodeT TELEM_PICO = 20060;
42 constexpr static flatlogs::eventCodeT TELEM_POSITION = 20065;
43 constexpr static flatlogs::eventCodeT TELEM_POKECENTER = 20067;
44 constexpr static flatlogs::eventCodeT TELEM_POKELOOP = 20068;
45 constexpr static flatlogs::eventCodeT TELEM_OBSERVER = 20070;
46 constexpr static flatlogs::eventCodeT TELEM_RHUSB = 20100;
47 constexpr static flatlogs::eventCodeT TELEM_TEMPS = 20250;
48 constexpr static flatlogs::eventCodeT TELEM_STDCAM = 20260;
49 constexpr static flatlogs::eventCodeT TELEM_CORETEMPS = 20825;
50 constexpr static flatlogs::eventCodeT TELEM_CORELOADS = 20826;
51 constexpr static flatlogs::eventCodeT TELEM_DRIVETEMPS = 20827;
52 constexpr static flatlogs::eventCodeT TELEM_USAGE = 20828;
53 constexpr static flatlogs::eventCodeT TELEM_COOLER = 20850;
54 constexpr static flatlogs::eventCodeT TELEM_CHRONY_STATUS = 20860;
55 constexpr static flatlogs::eventCodeT TELEM_CHRONY_STATS = 20861;
56 constexpr static flatlogs::eventCodeT TELEM_DMSPECK = 20890;
57 constexpr static flatlogs::eventCodeT TELEM_FGTIMINGS = 20905;
58 constexpr static flatlogs::eventCodeT TELEM_DMMODES = 20910;
59 constexpr static flatlogs::eventCodeT TELEM_LOOPGAIN = 20915;
60 constexpr static flatlogs::eventCodeT TELEM_BLOCKGAINS = 20920;
61 constexpr static flatlogs::eventCodeT TELEM_OFFLOADING = 20923;
62 constexpr static flatlogs::eventCodeT TELEM_PI335 = 20930;
63 constexpr static flatlogs::eventCodeT TELEM_SPARKLECLOCK = 20940;
64 constexpr static flatlogs::eventCodeT TELEM_POLTRACK = 20945;
65 constexpr static flatlogs::eventCodeT UNKNOWN = 65535;
66}
67
68inline
69flatlogs::eventCodeT eventCode( const std::string & cn /**< [in] the code name to convert */)
70{
71 if(cn == "git_state" )
72 {
74 }
75 else if(cn == "text_log" )
76 {
78 }
79 else if(cn == "user_log" )
80 {
82 }
83 else if(cn == "state_change" )
84 {
86 }
87 else if(cn == "software_log" )
88 {
90 }
91 else if(cn == "config_log" )
92 {
94 }
95 else if(cn == "indidriver_start" )
96 {
98 }
99 else if(cn == "indidriver_stop" )
100 {
102 }
103 else if(cn == "loop_closed" )
104 {
106 }
107 else if(cn == "loop_paused" )
108 {
110 }
111 else if(cn == "loop_open" )
112 {
114 }
115 else if(cn == "observer" )
116 {
118 }
119 else if(cn == "ao_operator" )
120 {
122 }
123 else if(cn == "pico_channel" )
124 {
126 }
127 else if(cn == "outlet_state" )
128 {
130 }
131 else if(cn == "outlet_channel_state" )
132 {
134 }
135 else if(cn == "telem_saving_state" )
136 {
138 }
139 else if(cn == "telem_fxngen" )
140 {
142 }
143 else if(cn == "ttmmod_params" )
144 {
146 }
147 else if(cn == "ocam_temps" )
148 {
150 }
151 else if(cn == "saving_start" )
152 {
154 }
155 else if(cn == "saving_stop" )
156 {
158 }
159 else if(cn == "telem_saving" )
160 {
162 }
163 else if(cn == "telem_telpos" )
164 {
166 }
167 else if(cn == "telem_teldata" )
168 {
170 }
171 else if(cn == "telem_telvane" )
172 {
174 }
175 else if(cn == "telem_telenv" )
176 {
178 }
179 else if(cn == "telem_telcat" )
180 {
182 }
183 else if(cn == "telem_telsee" )
184 {
186 }
187 else if(cn == "telem_stage" )
188 {
190 }
191 else if(cn == "telem_zaber" )
192 {
194 }
195 else if(cn == "telem_pico" )
196 {
198 }
199 else if(cn == "telem_position" )
200 {
202 }
203 else if(cn == "telem_pokecenter" )
204 {
206 }
207 else if(cn == "telem_pokeloop" )
208 {
210 }
211 else if(cn == "telem_observer" )
212 {
214 }
215 else if(cn == "telem_rhusb" )
216 {
218 }
219 else if(cn == "telem_temps" )
220 {
222 }
223 else if(cn == "telem_stdcam" )
224 {
226 }
227 else if(cn == "telem_coretemps" )
228 {
230 }
231 else if(cn == "telem_coreloads" )
232 {
234 }
235 else if(cn == "telem_drivetemps" )
236 {
238 }
239 else if(cn == "telem_usage" )
240 {
242 }
243 else if(cn == "telem_cooler" )
244 {
246 }
247 else if(cn == "telem_chrony_status" )
248 {
250 }
251 else if(cn == "telem_chrony_stats" )
252 {
254 }
255 else if(cn == "telem_dmspeck" )
256 {
258 }
259 else if(cn == "telem_fgtimings" )
260 {
262 }
263 else if(cn == "telem_dmmodes" )
264 {
266 }
267 else if(cn == "telem_loopgain" )
268 {
270 }
271 else if(cn == "telem_blockgains" )
272 {
274 }
275 else if(cn == "telem_offloading" )
276 {
278 }
279 else if(cn == "telem_pi335" )
280 {
282 }
283 else if(cn == "telem_sparkleclock" )
284 {
286 }
287 else if(cn == "telem_poltrack" )
288 {
290 }
291 else
292 {
293 return eventCodes::UNKNOWN;
294 }
295} // flatlogs::eventCodeT eventCode(const std::string &)
296
297inline
298std::string eventCodeName( flatlogs::eventCodeT ec/**< [in] the code to convert to its name */)
299{
300 if(ec == eventCodes::GIT_STATE )
301 {
302 return "git_state";
303 }
304 else if(ec == eventCodes::TEXT_LOG )
305 {
306 return "text_log";
307 }
308 else if(ec == eventCodes::USER_LOG )
309 {
310 return "user_log";
311 }
312 else if(ec == eventCodes::STATE_CHANGE )
313 {
314 return "state_change";
315 }
316 else if(ec == eventCodes::SOFTWARE_LOG )
317 {
318 return "software_log";
319 }
320 else if(ec == eventCodes::CONFIG_LOG )
321 {
322 return "config_log";
323 }
324 else if(ec == eventCodes::INDIDRIVER_START )
325 {
326 return "indidriver_start";
327 }
328 else if(ec == eventCodes::INDIDRIVER_STOP )
329 {
330 return "indidriver_stop";
331 }
332 else if(ec == eventCodes::LOOP_CLOSED )
333 {
334 return "loop_closed";
335 }
336 else if(ec == eventCodes::LOOP_PAUSED )
337 {
338 return "loop_paused";
339 }
340 else if(ec == eventCodes::LOOP_OPEN )
341 {
342 return "loop_open";
343 }
344 else if(ec == eventCodes::OBSERVER )
345 {
346 return "observer";
347 }
348 else if(ec == eventCodes::AO_OPERATOR )
349 {
350 return "ao_operator";
351 }
352 else if(ec == eventCodes::PICO_CHANNEL )
353 {
354 return "pico_channel";
355 }
356 else if(ec == eventCodes::OUTLET_STATE )
357 {
358 return "outlet_state";
359 }
361 {
362 return "outlet_channel_state";
363 }
364 else if(ec == eventCodes::TELEM_SAVING_STATE )
365 {
366 return "telem_saving_state";
367 }
368 else if(ec == eventCodes::TELEM_FXNGEN )
369 {
370 return "telem_fxngen";
371 }
372 else if(ec == eventCodes::TTMMOD_PARAMS )
373 {
374 return "ttmmod_params";
375 }
376 else if(ec == eventCodes::OCAM_TEMPS )
377 {
378 return "ocam_temps";
379 }
380 else if(ec == eventCodes::SAVING_START )
381 {
382 return "saving_start";
383 }
384 else if(ec == eventCodes::SAVING_STOP )
385 {
386 return "saving_stop";
387 }
388 else if(ec == eventCodes::TELEM_SAVING )
389 {
390 return "telem_saving";
391 }
392 else if(ec == eventCodes::TELEM_TELPOS )
393 {
394 return "telem_telpos";
395 }
396 else if(ec == eventCodes::TELEM_TELDATA )
397 {
398 return "telem_teldata";
399 }
400 else if(ec == eventCodes::TELEM_TELVANE )
401 {
402 return "telem_telvane";
403 }
404 else if(ec == eventCodes::TELEM_TELENV )
405 {
406 return "telem_telenv";
407 }
408 else if(ec == eventCodes::TELEM_TELCAT )
409 {
410 return "telem_telcat";
411 }
412 else if(ec == eventCodes::TELEM_TELSEE )
413 {
414 return "telem_telsee";
415 }
416 else if(ec == eventCodes::TELEM_STAGE )
417 {
418 return "telem_stage";
419 }
420 else if(ec == eventCodes::TELEM_ZABER )
421 {
422 return "telem_zaber";
423 }
424 else if(ec == eventCodes::TELEM_PICO )
425 {
426 return "telem_pico";
427 }
428 else if(ec == eventCodes::TELEM_POSITION )
429 {
430 return "telem_position";
431 }
432 else if(ec == eventCodes::TELEM_POKECENTER )
433 {
434 return "telem_pokecenter";
435 }
436 else if(ec == eventCodes::TELEM_POKELOOP )
437 {
438 return "telem_pokeloop";
439 }
440 else if(ec == eventCodes::TELEM_OBSERVER )
441 {
442 return "telem_observer";
443 }
444 else if(ec == eventCodes::TELEM_RHUSB )
445 {
446 return "telem_rhusb";
447 }
448 else if(ec == eventCodes::TELEM_TEMPS )
449 {
450 return "telem_temps";
451 }
452 else if(ec == eventCodes::TELEM_STDCAM )
453 {
454 return "telem_stdcam";
455 }
456 else if(ec == eventCodes::TELEM_CORETEMPS )
457 {
458 return "telem_coretemps";
459 }
460 else if(ec == eventCodes::TELEM_CORELOADS )
461 {
462 return "telem_coreloads";
463 }
464 else if(ec == eventCodes::TELEM_DRIVETEMPS )
465 {
466 return "telem_drivetemps";
467 }
468 else if(ec == eventCodes::TELEM_USAGE )
469 {
470 return "telem_usage";
471 }
472 else if(ec == eventCodes::TELEM_COOLER )
473 {
474 return "telem_cooler";
475 }
476 else if(ec == eventCodes::TELEM_CHRONY_STATUS )
477 {
478 return "telem_chrony_status";
479 }
480 else if(ec == eventCodes::TELEM_CHRONY_STATS )
481 {
482 return "telem_chrony_stats";
483 }
484 else if(ec == eventCodes::TELEM_DMSPECK )
485 {
486 return "telem_dmspeck";
487 }
488 else if(ec == eventCodes::TELEM_FGTIMINGS )
489 {
490 return "telem_fgtimings";
491 }
492 else if(ec == eventCodes::TELEM_DMMODES )
493 {
494 return "telem_dmmodes";
495 }
496 else if(ec == eventCodes::TELEM_LOOPGAIN )
497 {
498 return "telem_loopgain";
499 }
500 else if(ec == eventCodes::TELEM_BLOCKGAINS )
501 {
502 return "telem_blockgains";
503 }
504 else if(ec == eventCodes::TELEM_OFFLOADING )
505 {
506 return "telem_offloading";
507 }
508 else if(ec == eventCodes::TELEM_PI335 )
509 {
510 return "telem_pi335";
511 }
512 else if(ec == eventCodes::TELEM_SPARKLECLOCK )
513 {
514 return "telem_sparkleclock";
515 }
516 else if(ec == eventCodes::TELEM_POLTRACK )
517 {
518 return "telem_poltrack";
519 }
520 else
521 {
522 return "unknown event code";
523 }
524} // std::string eventCodeName(flatlogs::eventCodeT)
525
526}
527}
528#endif
Flatlogs single include file.
uint16_t eventCodeT
The type of an event code (16-bit unsigned int).
Definition logDefs.hpp:40
static constexpr flatlogs::eventCodeT PICO_CHANNEL
Definition logCodes.hpp:23
static constexpr flatlogs::eventCodeT TELEM_USAGE
Definition logCodes.hpp:52
static constexpr flatlogs::eventCodeT TELEM_POLTRACK
Definition logCodes.hpp:64
static constexpr flatlogs::eventCodeT TELEM_DRIVETEMPS
Definition logCodes.hpp:51
static constexpr flatlogs::eventCodeT TELEM_POKECENTER
Definition logCodes.hpp:43
static constexpr flatlogs::eventCodeT SOFTWARE_LOG
Definition logCodes.hpp:14
static constexpr flatlogs::eventCodeT INDIDRIVER_START
Definition logCodes.hpp:16
static constexpr flatlogs::eventCodeT TELEM_OFFLOADING
Definition logCodes.hpp:61
static constexpr flatlogs::eventCodeT TELEM_STAGE
Definition logCodes.hpp:39
static constexpr flatlogs::eventCodeT TELEM_RHUSB
Definition logCodes.hpp:46
static constexpr flatlogs::eventCodeT TELEM_TELENV
Definition logCodes.hpp:36
static constexpr flatlogs::eventCodeT TELEM_FGTIMINGS
Definition logCodes.hpp:57
static constexpr flatlogs::eventCodeT TELEM_POSITION
Definition logCodes.hpp:42
static constexpr flatlogs::eventCodeT TELEM_TELVANE
Definition logCodes.hpp:35
static constexpr flatlogs::eventCodeT TELEM_POKELOOP
Definition logCodes.hpp:44
static constexpr flatlogs::eventCodeT INDIDRIVER_STOP
Definition logCodes.hpp:17
static constexpr flatlogs::eventCodeT TELEM_CHRONY_STATS
Definition logCodes.hpp:55
static constexpr flatlogs::eventCodeT CONFIG_LOG
Definition logCodes.hpp:15
static constexpr flatlogs::eventCodeT TELEM_SAVING_STATE
Definition logCodes.hpp:26
static constexpr flatlogs::eventCodeT TELEM_SAVING
Definition logCodes.hpp:32
static constexpr flatlogs::eventCodeT LOOP_PAUSED
Definition logCodes.hpp:19
static constexpr flatlogs::eventCodeT USER_LOG
Definition logCodes.hpp:12
static constexpr flatlogs::eventCodeT TELEM_LOOPGAIN
Definition logCodes.hpp:59
static constexpr flatlogs::eventCodeT GIT_STATE
Definition logCodes.hpp:10
static constexpr flatlogs::eventCodeT TELEM_DMSPECK
Definition logCodes.hpp:56
static constexpr flatlogs::eventCodeT OUTLET_STATE
Definition logCodes.hpp:24
static constexpr flatlogs::eventCodeT TELEM_ZABER
Definition logCodes.hpp:40
static constexpr flatlogs::eventCodeT TELEM_COOLER
Definition logCodes.hpp:53
static constexpr flatlogs::eventCodeT TELEM_CORETEMPS
Definition logCodes.hpp:49
static constexpr flatlogs::eventCodeT TELEM_TELCAT
Definition logCodes.hpp:37
static constexpr flatlogs::eventCodeT OCAM_TEMPS
Definition logCodes.hpp:29
static constexpr flatlogs::eventCodeT TELEM_TELDATA
Definition logCodes.hpp:34
static constexpr flatlogs::eventCodeT SAVING_STOP
Definition logCodes.hpp:31
static constexpr flatlogs::eventCodeT LOOP_CLOSED
Definition logCodes.hpp:18
static constexpr flatlogs::eventCodeT TTMMOD_PARAMS
Definition logCodes.hpp:28
static constexpr flatlogs::eventCodeT TELEM_PI335
Definition logCodes.hpp:62
static constexpr flatlogs::eventCodeT TELEM_TELSEE
Definition logCodes.hpp:38
static constexpr flatlogs::eventCodeT AO_OPERATOR
Definition logCodes.hpp:22
static constexpr flatlogs::eventCodeT TELEM_TEMPS
Definition logCodes.hpp:47
static constexpr flatlogs::eventCodeT TELEM_CHRONY_STATUS
Definition logCodes.hpp:54
static constexpr flatlogs::eventCodeT TELEM_OBSERVER
Definition logCodes.hpp:45
static constexpr flatlogs::eventCodeT SAVING_START
Definition logCodes.hpp:30
static constexpr flatlogs::eventCodeT TELEM_SPARKLECLOCK
Definition logCodes.hpp:63
static constexpr flatlogs::eventCodeT TELEM_CORELOADS
Definition logCodes.hpp:50
static constexpr flatlogs::eventCodeT LOOP_OPEN
Definition logCodes.hpp:20
static constexpr flatlogs::eventCodeT TELEM_TELPOS
Definition logCodes.hpp:33
static constexpr flatlogs::eventCodeT STATE_CHANGE
Definition logCodes.hpp:13
static constexpr flatlogs::eventCodeT OBSERVER
Definition logCodes.hpp:21
static constexpr flatlogs::eventCodeT TELEM_STDCAM
Definition logCodes.hpp:48
static constexpr flatlogs::eventCodeT TELEM_DMMODES
Definition logCodes.hpp:58
static constexpr flatlogs::eventCodeT TELEM_BLOCKGAINS
Definition logCodes.hpp:60
static constexpr flatlogs::eventCodeT OUTLET_CHANNEL_STATE
Definition logCodes.hpp:25
static constexpr flatlogs::eventCodeT TELEM_FXNGEN
Definition logCodes.hpp:27
static constexpr flatlogs::eventCodeT TEXT_LOG
Definition logCodes.hpp:11
static constexpr flatlogs::eventCodeT TELEM_PICO
Definition logCodes.hpp:41
static constexpr flatlogs::eventCodeT UNKNOWN
Definition logCodes.hpp:65
flatlogs::eventCodeT eventCode(const std::string &cn)
Definition logCodes.hpp:69
std::string eventCodeName(flatlogs::eventCodeT ec)
Definition logCodes.hpp:298
Definition dm.hpp:19