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_PI335 = 20930;
62 constexpr static flatlogs::eventCodeT TELEM_SPARKLECLOCK = 20940;
63 constexpr static flatlogs::eventCodeT UNKNOWN = 65535;
64}
65
66inline
67flatlogs::eventCodeT eventCode( const std::string & cn /**< [in] the code name to convert */)
68{
69 if(cn == "git_state" )
70 {
72 }
73 else if(cn == "text_log" )
74 {
76 }
77 else if(cn == "user_log" )
78 {
80 }
81 else if(cn == "state_change" )
82 {
84 }
85 else if(cn == "software_log" )
86 {
88 }
89 else if(cn == "config_log" )
90 {
92 }
93 else if(cn == "indidriver_start" )
94 {
96 }
97 else if(cn == "indidriver_stop" )
98 {
100 }
101 else if(cn == "loop_closed" )
102 {
104 }
105 else if(cn == "loop_paused" )
106 {
108 }
109 else if(cn == "loop_open" )
110 {
112 }
113 else if(cn == "observer" )
114 {
116 }
117 else if(cn == "ao_operator" )
118 {
120 }
121 else if(cn == "pico_channel" )
122 {
124 }
125 else if(cn == "outlet_state" )
126 {
128 }
129 else if(cn == "outlet_channel_state" )
130 {
132 }
133 else if(cn == "telem_saving_state" )
134 {
136 }
137 else if(cn == "telem_fxngen" )
138 {
140 }
141 else if(cn == "ttmmod_params" )
142 {
144 }
145 else if(cn == "ocam_temps" )
146 {
148 }
149 else if(cn == "saving_start" )
150 {
152 }
153 else if(cn == "saving_stop" )
154 {
156 }
157 else if(cn == "telem_saving" )
158 {
160 }
161 else if(cn == "telem_telpos" )
162 {
164 }
165 else if(cn == "telem_teldata" )
166 {
168 }
169 else if(cn == "telem_telvane" )
170 {
172 }
173 else if(cn == "telem_telenv" )
174 {
176 }
177 else if(cn == "telem_telcat" )
178 {
180 }
181 else if(cn == "telem_telsee" )
182 {
184 }
185 else if(cn == "telem_stage" )
186 {
188 }
189 else if(cn == "telem_zaber" )
190 {
192 }
193 else if(cn == "telem_pico" )
194 {
196 }
197 else if(cn == "telem_position" )
198 {
200 }
201 else if(cn == "telem_pokecenter" )
202 {
204 }
205 else if(cn == "telem_pokeloop" )
206 {
208 }
209 else if(cn == "telem_observer" )
210 {
212 }
213 else if(cn == "telem_rhusb" )
214 {
216 }
217 else if(cn == "telem_temps" )
218 {
220 }
221 else if(cn == "telem_stdcam" )
222 {
224 }
225 else if(cn == "telem_coretemps" )
226 {
228 }
229 else if(cn == "telem_coreloads" )
230 {
232 }
233 else if(cn == "telem_drivetemps" )
234 {
236 }
237 else if(cn == "telem_usage" )
238 {
240 }
241 else if(cn == "telem_cooler" )
242 {
244 }
245 else if(cn == "telem_chrony_status" )
246 {
248 }
249 else if(cn == "telem_chrony_stats" )
250 {
252 }
253 else if(cn == "telem_dmspeck" )
254 {
256 }
257 else if(cn == "telem_fgtimings" )
258 {
260 }
261 else if(cn == "telem_dmmodes" )
262 {
264 }
265 else if(cn == "telem_loopgain" )
266 {
268 }
269 else if(cn == "telem_blockgains" )
270 {
272 }
273 else if(cn == "telem_pi335" )
274 {
276 }
277 else if(cn == "telem_sparkleclock" )
278 {
280 }
281 else
282 {
283 return eventCodes::UNKNOWN;
284 }
285} // flatlogs::eventCodeT eventCode(const std::string &)
286
287inline
288std::string eventCodeName( flatlogs::eventCodeT ec/**< [in] the code to convert to its name */)
289{
290 if(ec == eventCodes::GIT_STATE )
291 {
292 return "git_state";
293 }
294 else if(ec == eventCodes::TEXT_LOG )
295 {
296 return "text_log";
297 }
298 else if(ec == eventCodes::USER_LOG )
299 {
300 return "user_log";
301 }
302 else if(ec == eventCodes::STATE_CHANGE )
303 {
304 return "state_change";
305 }
306 else if(ec == eventCodes::SOFTWARE_LOG )
307 {
308 return "software_log";
309 }
310 else if(ec == eventCodes::CONFIG_LOG )
311 {
312 return "config_log";
313 }
314 else if(ec == eventCodes::INDIDRIVER_START )
315 {
316 return "indidriver_start";
317 }
318 else if(ec == eventCodes::INDIDRIVER_STOP )
319 {
320 return "indidriver_stop";
321 }
322 else if(ec == eventCodes::LOOP_CLOSED )
323 {
324 return "loop_closed";
325 }
326 else if(ec == eventCodes::LOOP_PAUSED )
327 {
328 return "loop_paused";
329 }
330 else if(ec == eventCodes::LOOP_OPEN )
331 {
332 return "loop_open";
333 }
334 else if(ec == eventCodes::OBSERVER )
335 {
336 return "observer";
337 }
338 else if(ec == eventCodes::AO_OPERATOR )
339 {
340 return "ao_operator";
341 }
342 else if(ec == eventCodes::PICO_CHANNEL )
343 {
344 return "pico_channel";
345 }
346 else if(ec == eventCodes::OUTLET_STATE )
347 {
348 return "outlet_state";
349 }
351 {
352 return "outlet_channel_state";
353 }
354 else if(ec == eventCodes::TELEM_SAVING_STATE )
355 {
356 return "telem_saving_state";
357 }
358 else if(ec == eventCodes::TELEM_FXNGEN )
359 {
360 return "telem_fxngen";
361 }
362 else if(ec == eventCodes::TTMMOD_PARAMS )
363 {
364 return "ttmmod_params";
365 }
366 else if(ec == eventCodes::OCAM_TEMPS )
367 {
368 return "ocam_temps";
369 }
370 else if(ec == eventCodes::SAVING_START )
371 {
372 return "saving_start";
373 }
374 else if(ec == eventCodes::SAVING_STOP )
375 {
376 return "saving_stop";
377 }
378 else if(ec == eventCodes::TELEM_SAVING )
379 {
380 return "telem_saving";
381 }
382 else if(ec == eventCodes::TELEM_TELPOS )
383 {
384 return "telem_telpos";
385 }
386 else if(ec == eventCodes::TELEM_TELDATA )
387 {
388 return "telem_teldata";
389 }
390 else if(ec == eventCodes::TELEM_TELVANE )
391 {
392 return "telem_telvane";
393 }
394 else if(ec == eventCodes::TELEM_TELENV )
395 {
396 return "telem_telenv";
397 }
398 else if(ec == eventCodes::TELEM_TELCAT )
399 {
400 return "telem_telcat";
401 }
402 else if(ec == eventCodes::TELEM_TELSEE )
403 {
404 return "telem_telsee";
405 }
406 else if(ec == eventCodes::TELEM_STAGE )
407 {
408 return "telem_stage";
409 }
410 else if(ec == eventCodes::TELEM_ZABER )
411 {
412 return "telem_zaber";
413 }
414 else if(ec == eventCodes::TELEM_PICO )
415 {
416 return "telem_pico";
417 }
418 else if(ec == eventCodes::TELEM_POSITION )
419 {
420 return "telem_position";
421 }
422 else if(ec == eventCodes::TELEM_POKECENTER )
423 {
424 return "telem_pokecenter";
425 }
426 else if(ec == eventCodes::TELEM_POKELOOP )
427 {
428 return "telem_pokeloop";
429 }
430 else if(ec == eventCodes::TELEM_OBSERVER )
431 {
432 return "telem_observer";
433 }
434 else if(ec == eventCodes::TELEM_RHUSB )
435 {
436 return "telem_rhusb";
437 }
438 else if(ec == eventCodes::TELEM_TEMPS )
439 {
440 return "telem_temps";
441 }
442 else if(ec == eventCodes::TELEM_STDCAM )
443 {
444 return "telem_stdcam";
445 }
446 else if(ec == eventCodes::TELEM_CORETEMPS )
447 {
448 return "telem_coretemps";
449 }
450 else if(ec == eventCodes::TELEM_CORELOADS )
451 {
452 return "telem_coreloads";
453 }
454 else if(ec == eventCodes::TELEM_DRIVETEMPS )
455 {
456 return "telem_drivetemps";
457 }
458 else if(ec == eventCodes::TELEM_USAGE )
459 {
460 return "telem_usage";
461 }
462 else if(ec == eventCodes::TELEM_COOLER )
463 {
464 return "telem_cooler";
465 }
466 else if(ec == eventCodes::TELEM_CHRONY_STATUS )
467 {
468 return "telem_chrony_status";
469 }
470 else if(ec == eventCodes::TELEM_CHRONY_STATS )
471 {
472 return "telem_chrony_stats";
473 }
474 else if(ec == eventCodes::TELEM_DMSPECK )
475 {
476 return "telem_dmspeck";
477 }
478 else if(ec == eventCodes::TELEM_FGTIMINGS )
479 {
480 return "telem_fgtimings";
481 }
482 else if(ec == eventCodes::TELEM_DMMODES )
483 {
484 return "telem_dmmodes";
485 }
486 else if(ec == eventCodes::TELEM_LOOPGAIN )
487 {
488 return "telem_loopgain";
489 }
490 else if(ec == eventCodes::TELEM_BLOCKGAINS )
491 {
492 return "telem_blockgains";
493 }
494 else if(ec == eventCodes::TELEM_PI335 )
495 {
496 return "telem_pi335";
497 }
498 else if(ec == eventCodes::TELEM_SPARKLECLOCK )
499 {
500 return "telem_sparkleclock";
501 }
502 else
503 {
504 return "unknown event code";
505 }
506} // std::string eventCodeName(flatlogs::eventCodeT)
507
508}
509}
510#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_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_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:61
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:62
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:63
flatlogs::eventCodeT eventCode(const std::string &cn)
Definition logCodes.hpp:67
std::string eventCodeName(flatlogs::eventCodeT ec)
Definition logCodes.hpp:288
Definition dm.hpp:28