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 CRED2_TEMPS = 12121;
31 constexpr static flatlogs::eventCodeT SAVING_START = 12500;
32 constexpr static flatlogs::eventCodeT SAVING_STOP = 12501;
33 constexpr static flatlogs::eventCodeT TELEM_SAVING = 12502;
34 constexpr static flatlogs::eventCodeT TELEM_TELPOS = 20000;
35 constexpr static flatlogs::eventCodeT TELEM_TELDATA = 20001;
36 constexpr static flatlogs::eventCodeT TELEM_TELVANE = 20002;
37 constexpr static flatlogs::eventCodeT TELEM_TELENV = 20003;
38 constexpr static flatlogs::eventCodeT TELEM_TELCAT = 20004;
39 constexpr static flatlogs::eventCodeT TELEM_TELSEE = 20005;
40 constexpr static flatlogs::eventCodeT TELEM_TCSI_TIPTILT = 20006;
41 constexpr static flatlogs::eventCodeT TELEM_TCSI_FOCUS = 20007;
42 constexpr static flatlogs::eventCodeT TELEM_TCSI_LABMODE = 20008;
43 constexpr static flatlogs::eventCodeT TELEM_STAGE = 20050;
44 constexpr static flatlogs::eventCodeT TELEM_ZABER = 20055;
45 constexpr static flatlogs::eventCodeT TELEM_PICO = 20060;
46 constexpr static flatlogs::eventCodeT TELEM_POSITION = 20065;
47 constexpr static flatlogs::eventCodeT TELEM_PSFACQ = 20066;
48 constexpr static flatlogs::eventCodeT TELEM_POKECENTER = 20067;
49 constexpr static flatlogs::eventCodeT TELEM_POKELOOP = 20068;
50 constexpr static flatlogs::eventCodeT TELEM_OBSERVER = 20070;
51 constexpr static flatlogs::eventCodeT TELEM_RHUSB = 20100;
52 constexpr static flatlogs::eventCodeT TELEM_TEMPS = 20250;
53 constexpr static flatlogs::eventCodeT TELEM_STDCAM = 20260;
54 constexpr static flatlogs::eventCodeT TELEM_CORETEMPS = 20825;
55 constexpr static flatlogs::eventCodeT TELEM_CORELOADS = 20826;
56 constexpr static flatlogs::eventCodeT TELEM_DRIVETEMPS = 20827;
57 constexpr static flatlogs::eventCodeT TELEM_USAGE = 20828;
58 constexpr static flatlogs::eventCodeT TELEM_COOLER = 20850;
59 constexpr static flatlogs::eventCodeT TELEM_CHRONY_STATUS = 20860;
60 constexpr static flatlogs::eventCodeT TELEM_CHRONY_STATS = 20861;
61 constexpr static flatlogs::eventCodeT TELEM_DMSPECK = 20890;
62 constexpr static flatlogs::eventCodeT TELEM_FGTIMINGS = 20905;
63 constexpr static flatlogs::eventCodeT TELEM_DMMODES = 20910;
64 constexpr static flatlogs::eventCodeT TELEM_LOOPGAIN = 20915;
65 constexpr static flatlogs::eventCodeT TELEM_MODALGAINOPT = 20916;
66 constexpr static flatlogs::eventCodeT TELEM_BLOCKGAINS = 20920;
67 constexpr static flatlogs::eventCodeT TELEM_OFFLOADING = 20923;
69 constexpr static flatlogs::eventCodeT TELEM_FLOWRPM = 20925;
70 constexpr static flatlogs::eventCodeT TELEM_PI335 = 20930;
71 constexpr static flatlogs::eventCodeT TELEM_SPARKLECLOCK = 20940;
72 constexpr static flatlogs::eventCodeT TELEM_POLTRACK = 20945;
73 constexpr static flatlogs::eventCodeT TELEM_ADCTRACK = 20946;
74 constexpr static flatlogs::eventCodeT UNKNOWN = 65535;
75}
76
77inline
78flatlogs::eventCodeT eventCode( const std::string & cn /**< [in] the code name to convert */)
79{
80 if(cn == "git_state" )
81 {
83 }
84 else if(cn == "text_log" )
85 {
87 }
88 else if(cn == "user_log" )
89 {
91 }
92 else if(cn == "state_change" )
93 {
95 }
96 else if(cn == "software_log" )
97 {
99 }
100 else if(cn == "config_log" )
101 {
103 }
104 else if(cn == "indidriver_start" )
105 {
107 }
108 else if(cn == "indidriver_stop" )
109 {
111 }
112 else if(cn == "loop_closed" )
113 {
115 }
116 else if(cn == "loop_paused" )
117 {
119 }
120 else if(cn == "loop_open" )
121 {
123 }
124 else if(cn == "observer" )
125 {
127 }
128 else if(cn == "ao_operator" )
129 {
131 }
132 else if(cn == "pico_channel" )
133 {
135 }
136 else if(cn == "outlet_state" )
137 {
139 }
140 else if(cn == "outlet_channel_state" )
141 {
143 }
144 else if(cn == "telem_saving_state" )
145 {
147 }
148 else if(cn == "telem_fxngen" )
149 {
151 }
152 else if(cn == "ttmmod_params" )
153 {
155 }
156 else if(cn == "ocam_temps" )
157 {
159 }
160 else if(cn == "cred2_temps" )
161 {
163 }
164 else if(cn == "saving_start" )
165 {
167 }
168 else if(cn == "saving_stop" )
169 {
171 }
172 else if(cn == "telem_saving" )
173 {
175 }
176 else if(cn == "telem_telpos" )
177 {
179 }
180 else if(cn == "telem_teldata" )
181 {
183 }
184 else if(cn == "telem_telvane" )
185 {
187 }
188 else if(cn == "telem_telenv" )
189 {
191 }
192 else if(cn == "telem_telcat" )
193 {
195 }
196 else if(cn == "telem_telsee" )
197 {
199 }
200 else if(cn == "telem_tcsi_tiptilt" )
201 {
203 }
204 else if(cn == "telem_tcsi_focus" )
205 {
207 }
208 else if(cn == "telem_tcsi_labmode" )
209 {
211 }
212 else if(cn == "telem_stage" )
213 {
215 }
216 else if(cn == "telem_zaber" )
217 {
219 }
220 else if(cn == "telem_pico" )
221 {
223 }
224 else if(cn == "telem_position" )
225 {
227 }
228 else if(cn == "telem_psfacq" )
229 {
231 }
232 else if(cn == "telem_pokecenter" )
233 {
235 }
236 else if(cn == "telem_pokeloop" )
237 {
239 }
240 else if(cn == "telem_observer" )
241 {
243 }
244 else if(cn == "telem_rhusb" )
245 {
247 }
248 else if(cn == "telem_temps" )
249 {
251 }
252 else if(cn == "telem_stdcam" )
253 {
255 }
256 else if(cn == "telem_coretemps" )
257 {
259 }
260 else if(cn == "telem_coreloads" )
261 {
263 }
264 else if(cn == "telem_drivetemps" )
265 {
267 }
268 else if(cn == "telem_usage" )
269 {
271 }
272 else if(cn == "telem_cooler" )
273 {
275 }
276 else if(cn == "telem_chrony_status" )
277 {
279 }
280 else if(cn == "telem_chrony_stats" )
281 {
283 }
284 else if(cn == "telem_dmspeck" )
285 {
287 }
288 else if(cn == "telem_fgtimings" )
289 {
291 }
292 else if(cn == "telem_dmmodes" )
293 {
295 }
296 else if(cn == "telem_loopgain" )
297 {
299 }
300 else if(cn == "telem_modalgainopt" )
301 {
303 }
304 else if(cn == "telem_blockgains" )
305 {
307 }
308 else if(cn == "telem_offloading" )
309 {
311 }
312 else if(cn == "telem_w2tcsoffloader" )
313 {
315 }
316 else if(cn == "telem_flowrpm" )
317 {
319 }
320 else if(cn == "telem_pi335" )
321 {
323 }
324 else if(cn == "telem_sparkleclock" )
325 {
327 }
328 else if(cn == "telem_poltrack" )
329 {
331 }
332 else if(cn == "telem_adctrack" )
333 {
335 }
336 else
337 {
338 return eventCodes::UNKNOWN;
339 }
340} // flatlogs::eventCodeT eventCode(const std::string &)
341
342inline
343std::string eventCodeName( flatlogs::eventCodeT ec/**< [in] the code to convert to its name */)
344{
345 if(ec == eventCodes::GIT_STATE )
346 {
347 return "git_state";
348 }
349 else if(ec == eventCodes::TEXT_LOG )
350 {
351 return "text_log";
352 }
353 else if(ec == eventCodes::USER_LOG )
354 {
355 return "user_log";
356 }
357 else if(ec == eventCodes::STATE_CHANGE )
358 {
359 return "state_change";
360 }
361 else if(ec == eventCodes::SOFTWARE_LOG )
362 {
363 return "software_log";
364 }
365 else if(ec == eventCodes::CONFIG_LOG )
366 {
367 return "config_log";
368 }
369 else if(ec == eventCodes::INDIDRIVER_START )
370 {
371 return "indidriver_start";
372 }
373 else if(ec == eventCodes::INDIDRIVER_STOP )
374 {
375 return "indidriver_stop";
376 }
377 else if(ec == eventCodes::LOOP_CLOSED )
378 {
379 return "loop_closed";
380 }
381 else if(ec == eventCodes::LOOP_PAUSED )
382 {
383 return "loop_paused";
384 }
385 else if(ec == eventCodes::LOOP_OPEN )
386 {
387 return "loop_open";
388 }
389 else if(ec == eventCodes::OBSERVER )
390 {
391 return "observer";
392 }
393 else if(ec == eventCodes::AO_OPERATOR )
394 {
395 return "ao_operator";
396 }
397 else if(ec == eventCodes::PICO_CHANNEL )
398 {
399 return "pico_channel";
400 }
401 else if(ec == eventCodes::OUTLET_STATE )
402 {
403 return "outlet_state";
404 }
406 {
407 return "outlet_channel_state";
408 }
409 else if(ec == eventCodes::TELEM_SAVING_STATE )
410 {
411 return "telem_saving_state";
412 }
413 else if(ec == eventCodes::TELEM_FXNGEN )
414 {
415 return "telem_fxngen";
416 }
417 else if(ec == eventCodes::TTMMOD_PARAMS )
418 {
419 return "ttmmod_params";
420 }
421 else if(ec == eventCodes::OCAM_TEMPS )
422 {
423 return "ocam_temps";
424 }
425 else if(ec == eventCodes::CRED2_TEMPS )
426 {
427 return "cred2_temps";
428 }
429 else if(ec == eventCodes::SAVING_START )
430 {
431 return "saving_start";
432 }
433 else if(ec == eventCodes::SAVING_STOP )
434 {
435 return "saving_stop";
436 }
437 else if(ec == eventCodes::TELEM_SAVING )
438 {
439 return "telem_saving";
440 }
441 else if(ec == eventCodes::TELEM_TELPOS )
442 {
443 return "telem_telpos";
444 }
445 else if(ec == eventCodes::TELEM_TELDATA )
446 {
447 return "telem_teldata";
448 }
449 else if(ec == eventCodes::TELEM_TELVANE )
450 {
451 return "telem_telvane";
452 }
453 else if(ec == eventCodes::TELEM_TELENV )
454 {
455 return "telem_telenv";
456 }
457 else if(ec == eventCodes::TELEM_TELCAT )
458 {
459 return "telem_telcat";
460 }
461 else if(ec == eventCodes::TELEM_TELSEE )
462 {
463 return "telem_telsee";
464 }
465 else if(ec == eventCodes::TELEM_TCSI_TIPTILT )
466 {
467 return "telem_tcsi_tiptilt";
468 }
469 else if(ec == eventCodes::TELEM_TCSI_FOCUS )
470 {
471 return "telem_tcsi_focus";
472 }
473 else if(ec == eventCodes::TELEM_TCSI_LABMODE )
474 {
475 return "telem_tcsi_labmode";
476 }
477 else if(ec == eventCodes::TELEM_STAGE )
478 {
479 return "telem_stage";
480 }
481 else if(ec == eventCodes::TELEM_ZABER )
482 {
483 return "telem_zaber";
484 }
485 else if(ec == eventCodes::TELEM_PICO )
486 {
487 return "telem_pico";
488 }
489 else if(ec == eventCodes::TELEM_POSITION )
490 {
491 return "telem_position";
492 }
493 else if(ec == eventCodes::TELEM_PSFACQ )
494 {
495 return "telem_psfacq";
496 }
497 else if(ec == eventCodes::TELEM_POKECENTER )
498 {
499 return "telem_pokecenter";
500 }
501 else if(ec == eventCodes::TELEM_POKELOOP )
502 {
503 return "telem_pokeloop";
504 }
505 else if(ec == eventCodes::TELEM_OBSERVER )
506 {
507 return "telem_observer";
508 }
509 else if(ec == eventCodes::TELEM_RHUSB )
510 {
511 return "telem_rhusb";
512 }
513 else if(ec == eventCodes::TELEM_TEMPS )
514 {
515 return "telem_temps";
516 }
517 else if(ec == eventCodes::TELEM_STDCAM )
518 {
519 return "telem_stdcam";
520 }
521 else if(ec == eventCodes::TELEM_CORETEMPS )
522 {
523 return "telem_coretemps";
524 }
525 else if(ec == eventCodes::TELEM_CORELOADS )
526 {
527 return "telem_coreloads";
528 }
529 else if(ec == eventCodes::TELEM_DRIVETEMPS )
530 {
531 return "telem_drivetemps";
532 }
533 else if(ec == eventCodes::TELEM_USAGE )
534 {
535 return "telem_usage";
536 }
537 else if(ec == eventCodes::TELEM_COOLER )
538 {
539 return "telem_cooler";
540 }
541 else if(ec == eventCodes::TELEM_CHRONY_STATUS )
542 {
543 return "telem_chrony_status";
544 }
545 else if(ec == eventCodes::TELEM_CHRONY_STATS )
546 {
547 return "telem_chrony_stats";
548 }
549 else if(ec == eventCodes::TELEM_DMSPECK )
550 {
551 return "telem_dmspeck";
552 }
553 else if(ec == eventCodes::TELEM_FGTIMINGS )
554 {
555 return "telem_fgtimings";
556 }
557 else if(ec == eventCodes::TELEM_DMMODES )
558 {
559 return "telem_dmmodes";
560 }
561 else if(ec == eventCodes::TELEM_LOOPGAIN )
562 {
563 return "telem_loopgain";
564 }
565 else if(ec == eventCodes::TELEM_MODALGAINOPT )
566 {
567 return "telem_modalgainopt";
568 }
569 else if(ec == eventCodes::TELEM_BLOCKGAINS )
570 {
571 return "telem_blockgains";
572 }
573 else if(ec == eventCodes::TELEM_OFFLOADING )
574 {
575 return "telem_offloading";
576 }
578 {
579 return "telem_w2tcsoffloader";
580 }
581 else if(ec == eventCodes::TELEM_FLOWRPM )
582 {
583 return "telem_flowrpm";
584 }
585 else if(ec == eventCodes::TELEM_PI335 )
586 {
587 return "telem_pi335";
588 }
589 else if(ec == eventCodes::TELEM_SPARKLECLOCK )
590 {
591 return "telem_sparkleclock";
592 }
593 else if(ec == eventCodes::TELEM_POLTRACK )
594 {
595 return "telem_poltrack";
596 }
597 else if(ec == eventCodes::TELEM_ADCTRACK )
598 {
599 return "telem_adctrack";
600 }
601 else
602 {
603 return "unknown event code";
604 }
605} // std::string eventCodeName(flatlogs::eventCodeT)
606
607}
608}
609#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:57
static constexpr flatlogs::eventCodeT TELEM_POLTRACK
Definition logCodes.hpp:72
static constexpr flatlogs::eventCodeT TELEM_DRIVETEMPS
Definition logCodes.hpp:56
static constexpr flatlogs::eventCodeT TELEM_POKECENTER
Definition logCodes.hpp:48
static constexpr flatlogs::eventCodeT SOFTWARE_LOG
Definition logCodes.hpp:14
static constexpr flatlogs::eventCodeT TELEM_W2TCSOFFLOADER
Definition logCodes.hpp:68
static constexpr flatlogs::eventCodeT INDIDRIVER_START
Definition logCodes.hpp:16
static constexpr flatlogs::eventCodeT TELEM_OFFLOADING
Definition logCodes.hpp:67
static constexpr flatlogs::eventCodeT TELEM_STAGE
Definition logCodes.hpp:43
static constexpr flatlogs::eventCodeT TELEM_RHUSB
Definition logCodes.hpp:51
static constexpr flatlogs::eventCodeT TELEM_TELENV
Definition logCodes.hpp:37
static constexpr flatlogs::eventCodeT TELEM_ADCTRACK
Definition logCodes.hpp:73
static constexpr flatlogs::eventCodeT TELEM_FGTIMINGS
Definition logCodes.hpp:62
static constexpr flatlogs::eventCodeT TELEM_TCSI_LABMODE
Definition logCodes.hpp:42
static constexpr flatlogs::eventCodeT TELEM_POSITION
Definition logCodes.hpp:46
static constexpr flatlogs::eventCodeT TELEM_TELVANE
Definition logCodes.hpp:36
static constexpr flatlogs::eventCodeT TELEM_POKELOOP
Definition logCodes.hpp:49
static constexpr flatlogs::eventCodeT INDIDRIVER_STOP
Definition logCodes.hpp:17
static constexpr flatlogs::eventCodeT TELEM_CHRONY_STATS
Definition logCodes.hpp:60
static constexpr flatlogs::eventCodeT TELEM_TCSI_FOCUS
Definition logCodes.hpp:41
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:33
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:64
static constexpr flatlogs::eventCodeT GIT_STATE
Definition logCodes.hpp:10
static constexpr flatlogs::eventCodeT TELEM_DMSPECK
Definition logCodes.hpp:61
static constexpr flatlogs::eventCodeT TELEM_MODALGAINOPT
Definition logCodes.hpp:65
static constexpr flatlogs::eventCodeT OUTLET_STATE
Definition logCodes.hpp:24
static constexpr flatlogs::eventCodeT TELEM_ZABER
Definition logCodes.hpp:44
static constexpr flatlogs::eventCodeT TELEM_COOLER
Definition logCodes.hpp:58
static constexpr flatlogs::eventCodeT TELEM_TCSI_TIPTILT
Definition logCodes.hpp:40
static constexpr flatlogs::eventCodeT TELEM_CORETEMPS
Definition logCodes.hpp:54
static constexpr flatlogs::eventCodeT TELEM_TELCAT
Definition logCodes.hpp:38
static constexpr flatlogs::eventCodeT OCAM_TEMPS
Definition logCodes.hpp:29
static constexpr flatlogs::eventCodeT TELEM_TELDATA
Definition logCodes.hpp:35
static constexpr flatlogs::eventCodeT SAVING_STOP
Definition logCodes.hpp:32
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:70
static constexpr flatlogs::eventCodeT TELEM_TELSEE
Definition logCodes.hpp:39
static constexpr flatlogs::eventCodeT AO_OPERATOR
Definition logCodes.hpp:22
static constexpr flatlogs::eventCodeT TELEM_TEMPS
Definition logCodes.hpp:52
static constexpr flatlogs::eventCodeT TELEM_CHRONY_STATUS
Definition logCodes.hpp:59
static constexpr flatlogs::eventCodeT TELEM_OBSERVER
Definition logCodes.hpp:50
static constexpr flatlogs::eventCodeT SAVING_START
Definition logCodes.hpp:31
static constexpr flatlogs::eventCodeT TELEM_SPARKLECLOCK
Definition logCodes.hpp:71
static constexpr flatlogs::eventCodeT CRED2_TEMPS
Definition logCodes.hpp:30
static constexpr flatlogs::eventCodeT TELEM_CORELOADS
Definition logCodes.hpp:55
static constexpr flatlogs::eventCodeT LOOP_OPEN
Definition logCodes.hpp:20
static constexpr flatlogs::eventCodeT TELEM_TELPOS
Definition logCodes.hpp:34
static constexpr flatlogs::eventCodeT STATE_CHANGE
Definition logCodes.hpp:13
static constexpr flatlogs::eventCodeT OBSERVER
Definition logCodes.hpp:21
static constexpr flatlogs::eventCodeT TELEM_PSFACQ
Definition logCodes.hpp:47
static constexpr flatlogs::eventCodeT TELEM_STDCAM
Definition logCodes.hpp:53
static constexpr flatlogs::eventCodeT TELEM_FLOWRPM
Definition logCodes.hpp:69
static constexpr flatlogs::eventCodeT TELEM_DMMODES
Definition logCodes.hpp:63
static constexpr flatlogs::eventCodeT TELEM_BLOCKGAINS
Definition logCodes.hpp:66
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:45
static constexpr flatlogs::eventCodeT UNKNOWN
Definition logCodes.hpp:74
flatlogs::eventCodeT eventCode(const std::string &cn)
Definition logCodes.hpp:78
std::string eventCodeName(flatlogs::eventCodeT ec)
Definition logCodes.hpp:343
Definition dm.hpp:19