CTRE Phoenix Pro C++ 23.0.12
SpnEnums.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
10#include <sstream>
11#include <string>
12
13namespace ctre {
14namespace phoenixpro {
15namespace signals {
16
17
18/**
19 * \brief System state of the device
20 */
22{
23public:
24 int value;
25
26 static constexpr int Bootup_0 = 0;
27 static constexpr int Bootup_1 = 1;
28 static constexpr int Bootup_2 = 2;
29 static constexpr int Bootup_3 = 3;
30 static constexpr int Bootup_4 = 4;
31 static constexpr int Bootup_5 = 5;
32 static constexpr int Bootup_6 = 6;
33 static constexpr int Bootup_7 = 7;
34 static constexpr int BootBeep = 8;
35 static constexpr int ControlDisabled = 9;
36 static constexpr int ControlEnabled = 10;
37 static constexpr int Fault = 11;
38 static constexpr int Recover = 12;
39 static constexpr int NotLicensed = 13;
40
43 {}
44
46 value{-1}
47 {}
48
49 /**
50 * \brief Gets the string representation of this enum
51 *
52 * \returns String representation of this enum
53 */
54 std::string ToString() const
55 {
56 switch(value)
57 {
58 case System_StateValue::Bootup_0: return "Bootup_0";
59 case System_StateValue::Bootup_1: return "Bootup_1";
60 case System_StateValue::Bootup_2: return "Bootup_2";
61 case System_StateValue::Bootup_3: return "Bootup_3";
62 case System_StateValue::Bootup_4: return "Bootup_4";
63 case System_StateValue::Bootup_5: return "Bootup_5";
64 case System_StateValue::Bootup_6: return "Bootup_6";
65 case System_StateValue::Bootup_7: return "Bootup_7";
66 case System_StateValue::BootBeep: return "BootBeep";
67 case System_StateValue::ControlDisabled: return "ControlDisabled";
68 case System_StateValue::ControlEnabled: return "ControlEnabled";
69 case System_StateValue::Fault: return "Fault";
70 case System_StateValue::Recover: return "Recover";
71 case System_StateValue::NotLicensed: return "NotLicensed";
72 default: return "Invalid Value";
73 }
74 }
75
76 friend std::ostream& operator<<(std::ostream& os, const System_StateValue& data)
77 {
78 os << data.ToString();
79 return os;
80 }
81
82 std::string Serialize() const
83 {
84 std::stringstream ss;
85 ss << "u_" << this->value;
86 return ss.str();
87 }
88
89 bool operator==(const System_StateValue& data) const
90 {
91 return this->value == data.value;
92 }
93 bool operator==(int data) const
94 {
95 return this->value == data;
96 }
97 bool operator<(const System_StateValue& data) const
98 {
99 return this->value < data.value;
100 }
101 bool operator<(int data) const
102 {
103 return this->value < data;
104 }
105};
106
107/**
108 * \brief Whether the device is pro licensed or not
109 */
111{
112public:
113 int value;
114
115 static constexpr int NotLicensed = 0;
116 static constexpr int Licensed = 1;
117
119 value{value}
120 {}
121
123 value{-1}
124 {}
125
126 /**
127 * \brief Gets the string representation of this enum
128 *
129 * \returns String representation of this enum
130 */
131 std::string ToString() const
132 {
133 switch(value)
134 {
135 case IsPROLicensedValue::NotLicensed: return "Not Licensed";
136 case IsPROLicensedValue::Licensed: return "Licensed";
137 default: return "Invalid Value";
138 }
139 }
140
141 friend std::ostream& operator<<(std::ostream& os, const IsPROLicensedValue& data)
142 {
143 os << data.ToString();
144 return os;
145 }
146
147 std::string Serialize() const
148 {
149 std::stringstream ss;
150 ss << "u_" << this->value;
151 return ss.str();
152 }
153
154 bool operator==(const IsPROLicensedValue& data) const
155 {
156 return this->value == data.value;
157 }
158 bool operator==(int data) const
159 {
160 return this->value == data;
161 }
162 bool operator<(const IsPROLicensedValue& data) const
163 {
164 return this->value < data.value;
165 }
166 bool operator<(int data) const
167 {
168 return this->value < data;
169 }
170};
171
172/**
173 * \brief Direction of the sensor to determine positive facing the LED side of
174 * the CANcoder.
175 */
177{
178public:
179 int value;
180
181 static constexpr int CounterClockwise_Positive = 0;
182 static constexpr int Clockwise_Positive = 1;
183
185 value{value}
186 {}
187
189 value{-1}
190 {}
191
192 /**
193 * \brief Gets the string representation of this enum
194 *
195 * \returns String representation of this enum
196 */
197 std::string ToString() const
198 {
199 switch(value)
200 {
201 case SensorDirectionValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
202 case SensorDirectionValue::Clockwise_Positive: return "Clockwise_Positive";
203 default: return "Invalid Value";
204 }
205 }
206
207 friend std::ostream& operator<<(std::ostream& os, const SensorDirectionValue& data)
208 {
209 os << data.ToString();
210 return os;
211 }
212
213 std::string Serialize() const
214 {
215 std::stringstream ss;
216 ss << "u_" << this->value;
217 return ss.str();
218 }
219
220 bool operator==(const SensorDirectionValue& data) const
221 {
222 return this->value == data.value;
223 }
224 bool operator==(int data) const
225 {
226 return this->value == data;
227 }
228 bool operator<(const SensorDirectionValue& data) const
229 {
230 return this->value < data.value;
231 }
232 bool operator<(int data) const
233 {
234 return this->value < data;
235 }
236};
237
238/**
239 * \brief True if device is locked by FRC.
240 */
242{
243public:
244 int value;
245
246 static constexpr int Frc_Locked = 1;
247 static constexpr int Frc_Unlocked = 0;
248
250 value{value}
251 {}
252
254 value{-1}
255 {}
256
257 /**
258 * \brief Gets the string representation of this enum
259 *
260 * \returns String representation of this enum
261 */
262 std::string ToString() const
263 {
264 switch(value)
265 {
266 case FrcLockValue::Frc_Locked: return "Frc_Locked";
267 case FrcLockValue::Frc_Unlocked: return "Frc_Unlocked";
268 default: return "Invalid Value";
269 }
270 }
271
272 friend std::ostream& operator<<(std::ostream& os, const FrcLockValue& data)
273 {
274 os << data.ToString();
275 return os;
276 }
277
278 std::string Serialize() const
279 {
280 std::stringstream ss;
281 ss << "u_" << this->value;
282 return ss.str();
283 }
284
285 bool operator==(const FrcLockValue& data) const
286 {
287 return this->value == data.value;
288 }
289 bool operator==(int data) const
290 {
291 return this->value == data;
292 }
293 bool operator<(const FrcLockValue& data) const
294 {
295 return this->value < data.value;
296 }
297 bool operator<(int data) const
298 {
299 return this->value < data;
300 }
301};
302
303/**
304 * \brief True if the robot is enabled.
305 */
307{
308public:
309 int value;
310
311 static constexpr int Enabled = 1;
312 static constexpr int Disabled = 0;
313
315 value{value}
316 {}
317
319 value{-1}
320 {}
321
322 /**
323 * \brief Gets the string representation of this enum
324 *
325 * \returns String representation of this enum
326 */
327 std::string ToString() const
328 {
329 switch(value)
330 {
331 case RobotEnableValue::Enabled: return "Enabled";
332 case RobotEnableValue::Disabled: return "Disabled";
333 default: return "Invalid Value";
334 }
335 }
336
337 friend std::ostream& operator<<(std::ostream& os, const RobotEnableValue& data)
338 {
339 os << data.ToString();
340 return os;
341 }
342
343 std::string Serialize() const
344 {
345 std::stringstream ss;
346 ss << "u_" << this->value;
347 return ss.str();
348 }
349
350 bool operator==(const RobotEnableValue& data) const
351 {
352 return this->value == data.value;
353 }
354 bool operator==(int data) const
355 {
356 return this->value == data;
357 }
358 bool operator<(const RobotEnableValue& data) const
359 {
360 return this->value < data.value;
361 }
362 bool operator<(int data) const
363 {
364 return this->value < data;
365 }
366};
367
368/**
369 * \brief The Color of LED1 when it's "On".
370 */
372{
373public:
374 int value;
375
376 static constexpr int Off = 0;
377 static constexpr int Red = 1;
378 static constexpr int Green = 2;
379 static constexpr int Orange = 3;
380 static constexpr int Blue = 4;
381 static constexpr int Pink = 5;
382 static constexpr int Cyan = 6;
383 static constexpr int White = 7;
384
386 value{value}
387 {}
388
390 value{-1}
391 {}
392
393 /**
394 * \brief Gets the string representation of this enum
395 *
396 * \returns String representation of this enum
397 */
398 std::string ToString() const
399 {
400 switch(value)
401 {
402 case Led1OnColorValue::Off: return "Off";
403 case Led1OnColorValue::Red: return "Red";
404 case Led1OnColorValue::Green: return "Green";
405 case Led1OnColorValue::Orange: return "Orange";
406 case Led1OnColorValue::Blue: return "Blue";
407 case Led1OnColorValue::Pink: return "Pink";
408 case Led1OnColorValue::Cyan: return "Cyan";
409 case Led1OnColorValue::White: return "White";
410 default: return "Invalid Value";
411 }
412 }
413
414 friend std::ostream& operator<<(std::ostream& os, const Led1OnColorValue& data)
415 {
416 os << data.ToString();
417 return os;
418 }
419
420 std::string Serialize() const
421 {
422 std::stringstream ss;
423 ss << "u_" << this->value;
424 return ss.str();
425 }
426
427 bool operator==(const Led1OnColorValue& data) const
428 {
429 return this->value == data.value;
430 }
431 bool operator==(int data) const
432 {
433 return this->value == data;
434 }
435 bool operator<(const Led1OnColorValue& data) const
436 {
437 return this->value < data.value;
438 }
439 bool operator<(int data) const
440 {
441 return this->value < data;
442 }
443};
444
445/**
446 * \brief The Color of LED1 when it's "Off".
447 */
449{
450public:
451 int value;
452
453 static constexpr int Off = 0;
454 static constexpr int Red = 1;
455 static constexpr int Green = 2;
456 static constexpr int Orange = 3;
457 static constexpr int Blue = 4;
458 static constexpr int Pink = 5;
459 static constexpr int Cyan = 6;
460 static constexpr int White = 7;
461
463 value{value}
464 {}
465
467 value{-1}
468 {}
469
470 /**
471 * \brief Gets the string representation of this enum
472 *
473 * \returns String representation of this enum
474 */
475 std::string ToString() const
476 {
477 switch(value)
478 {
479 case Led1OffColorValue::Off: return "Off";
480 case Led1OffColorValue::Red: return "Red";
481 case Led1OffColorValue::Green: return "Green";
482 case Led1OffColorValue::Orange: return "Orange";
483 case Led1OffColorValue::Blue: return "Blue";
484 case Led1OffColorValue::Pink: return "Pink";
485 case Led1OffColorValue::Cyan: return "Cyan";
486 case Led1OffColorValue::White: return "White";
487 default: return "Invalid Value";
488 }
489 }
490
491 friend std::ostream& operator<<(std::ostream& os, const Led1OffColorValue& data)
492 {
493 os << data.ToString();
494 return os;
495 }
496
497 std::string Serialize() const
498 {
499 std::stringstream ss;
500 ss << "u_" << this->value;
501 return ss.str();
502 }
503
504 bool operator==(const Led1OffColorValue& data) const
505 {
506 return this->value == data.value;
507 }
508 bool operator==(int data) const
509 {
510 return this->value == data;
511 }
512 bool operator<(const Led1OffColorValue& data) const
513 {
514 return this->value < data.value;
515 }
516 bool operator<(int data) const
517 {
518 return this->value < data;
519 }
520};
521
522/**
523 * \brief The Color of LED2 when it's "On".
524 */
526{
527public:
528 int value;
529
530 static constexpr int Off = 0;
531 static constexpr int Red = 1;
532 static constexpr int Green = 2;
533 static constexpr int Orange = 3;
534 static constexpr int Blue = 4;
535 static constexpr int Pink = 5;
536 static constexpr int Cyan = 6;
537 static constexpr int White = 7;
538
540 value{value}
541 {}
542
544 value{-1}
545 {}
546
547 /**
548 * \brief Gets the string representation of this enum
549 *
550 * \returns String representation of this enum
551 */
552 std::string ToString() const
553 {
554 switch(value)
555 {
556 case Led2OnColorValue::Off: return "Off";
557 case Led2OnColorValue::Red: return "Red";
558 case Led2OnColorValue::Green: return "Green";
559 case Led2OnColorValue::Orange: return "Orange";
560 case Led2OnColorValue::Blue: return "Blue";
561 case Led2OnColorValue::Pink: return "Pink";
562 case Led2OnColorValue::Cyan: return "Cyan";
563 case Led2OnColorValue::White: return "White";
564 default: return "Invalid Value";
565 }
566 }
567
568 friend std::ostream& operator<<(std::ostream& os, const Led2OnColorValue& data)
569 {
570 os << data.ToString();
571 return os;
572 }
573
574 std::string Serialize() const
575 {
576 std::stringstream ss;
577 ss << "u_" << this->value;
578 return ss.str();
579 }
580
581 bool operator==(const Led2OnColorValue& data) const
582 {
583 return this->value == data.value;
584 }
585 bool operator==(int data) const
586 {
587 return this->value == data;
588 }
589 bool operator<(const Led2OnColorValue& data) const
590 {
591 return this->value < data.value;
592 }
593 bool operator<(int data) const
594 {
595 return this->value < data;
596 }
597};
598
599/**
600 * \brief The Color of LED2 when it's "Off".
601 */
603{
604public:
605 int value;
606
607 static constexpr int Off = 0;
608 static constexpr int Red = 1;
609 static constexpr int Green = 2;
610 static constexpr int Orange = 3;
611 static constexpr int Blue = 4;
612 static constexpr int Pink = 5;
613 static constexpr int Cyan = 6;
614 static constexpr int White = 7;
615
617 value{value}
618 {}
619
621 value{-1}
622 {}
623
624 /**
625 * \brief Gets the string representation of this enum
626 *
627 * \returns String representation of this enum
628 */
629 std::string ToString() const
630 {
631 switch(value)
632 {
633 case Led2OffColorValue::Off: return "Off";
634 case Led2OffColorValue::Red: return "Red";
635 case Led2OffColorValue::Green: return "Green";
636 case Led2OffColorValue::Orange: return "Orange";
637 case Led2OffColorValue::Blue: return "Blue";
638 case Led2OffColorValue::Pink: return "Pink";
639 case Led2OffColorValue::Cyan: return "Cyan";
640 case Led2OffColorValue::White: return "White";
641 default: return "Invalid Value";
642 }
643 }
644
645 friend std::ostream& operator<<(std::ostream& os, const Led2OffColorValue& data)
646 {
647 os << data.ToString();
648 return os;
649 }
650
651 std::string Serialize() const
652 {
653 std::stringstream ss;
654 ss << "u_" << this->value;
655 return ss.str();
656 }
657
658 bool operator==(const Led2OffColorValue& data) const
659 {
660 return this->value == data.value;
661 }
662 bool operator==(int data) const
663 {
664 return this->value == data;
665 }
666 bool operator<(const Led2OffColorValue& data) const
667 {
668 return this->value < data.value;
669 }
670 bool operator<(int data) const
671 {
672 return this->value < data;
673 }
674};
675
676/**
677 * \brief The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
678 */
680{
681public:
682 int value;
683
684 static constexpr int Unsigned_0To1 = 0;
685 static constexpr int Signed_PlusMinusHalf = 1;
686
688 value{value}
689 {}
690
692 value{-1}
693 {}
694
695 /**
696 * \brief Gets the string representation of this enum
697 *
698 * \returns String representation of this enum
699 */
700 std::string ToString() const
701 {
702 switch(value)
703 {
704 case AbsoluteSensorRangeValue::Unsigned_0To1: return "Unsigned_0To1";
705 case AbsoluteSensorRangeValue::Signed_PlusMinusHalf: return "Signed_PlusMinusHalf";
706 default: return "Invalid Value";
707 }
708 }
709
710 friend std::ostream& operator<<(std::ostream& os, const AbsoluteSensorRangeValue& data)
711 {
712 os << data.ToString();
713 return os;
714 }
715
716 std::string Serialize() const
717 {
718 std::stringstream ss;
719 ss << "u_" << this->value;
720 return ss.str();
721 }
722
723 bool operator==(const AbsoluteSensorRangeValue& data) const
724 {
725 return this->value == data.value;
726 }
727 bool operator==(int data) const
728 {
729 return this->value == data;
730 }
731 bool operator<(const AbsoluteSensorRangeValue& data) const
732 {
733 return this->value < data.value;
734 }
735 bool operator<(int data) const
736 {
737 return this->value < data;
738 }
739};
740
741/**
742 * \brief True if the device is enabled.
743 */
745{
746public:
747 int value;
748
749 static constexpr int Enabled = 1;
750 static constexpr int Disabled = 0;
751
753 value{value}
754 {}
755
757 value{-1}
758 {}
759
760 /**
761 * \brief Gets the string representation of this enum
762 *
763 * \returns String representation of this enum
764 */
765 std::string ToString() const
766 {
767 switch(value)
768 {
769 case DeviceEnableValue::Enabled: return "Enabled";
770 case DeviceEnableValue::Disabled: return "Disabled";
771 default: return "Invalid Value";
772 }
773 }
774
775 friend std::ostream& operator<<(std::ostream& os, const DeviceEnableValue& data)
776 {
777 os << data.ToString();
778 return os;
779 }
780
781 std::string Serialize() const
782 {
783 std::stringstream ss;
784 ss << "u_" << this->value;
785 return ss.str();
786 }
787
788 bool operator==(const DeviceEnableValue& data) const
789 {
790 return this->value == data.value;
791 }
792 bool operator==(int data) const
793 {
794 return this->value == data;
795 }
796 bool operator<(const DeviceEnableValue& data) const
797 {
798 return this->value < data.value;
799 }
800 bool operator<(int data) const
801 {
802 return this->value < data;
803 }
804};
805
806/**
807 * \brief Forward Limit Pin.
808 */
810{
811public:
812 int value;
813
814 static constexpr int ClosedToGround = 0;
815 static constexpr int Open = 1;
816
818 value{value}
819 {}
820
822 value{-1}
823 {}
824
825 /**
826 * \brief Gets the string representation of this enum
827 *
828 * \returns String representation of this enum
829 */
830 std::string ToString() const
831 {
832 switch(value)
833 {
834 case ForwardLimitValue::ClosedToGround: return "Closed To Ground";
835 case ForwardLimitValue::Open: return "Open";
836 default: return "Invalid Value";
837 }
838 }
839
840 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitValue& data)
841 {
842 os << data.ToString();
843 return os;
844 }
845
846 std::string Serialize() const
847 {
848 std::stringstream ss;
849 ss << "u_" << this->value;
850 return ss.str();
851 }
852
853 bool operator==(const ForwardLimitValue& data) const
854 {
855 return this->value == data.value;
856 }
857 bool operator==(int data) const
858 {
859 return this->value == data;
860 }
861 bool operator<(const ForwardLimitValue& data) const
862 {
863 return this->value < data.value;
864 }
865 bool operator<(int data) const
866 {
867 return this->value < data;
868 }
869};
870
871/**
872 * \brief Reverse Limit Pin.
873 */
875{
876public:
877 int value;
878
879 static constexpr int ClosedToGround = 0;
880 static constexpr int Open = 1;
881
883 value{value}
884 {}
885
887 value{-1}
888 {}
889
890 /**
891 * \brief Gets the string representation of this enum
892 *
893 * \returns String representation of this enum
894 */
895 std::string ToString() const
896 {
897 switch(value)
898 {
899 case ReverseLimitValue::ClosedToGround: return "Closed To Ground";
900 case ReverseLimitValue::Open: return "Open";
901 default: return "Invalid Value";
902 }
903 }
904
905 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitValue& data)
906 {
907 os << data.ToString();
908 return os;
909 }
910
911 std::string Serialize() const
912 {
913 std::stringstream ss;
914 ss << "u_" << this->value;
915 return ss.str();
916 }
917
918 bool operator==(const ReverseLimitValue& data) const
919 {
920 return this->value == data.value;
921 }
922 bool operator==(int data) const
923 {
924 return this->value == data;
925 }
926 bool operator<(const ReverseLimitValue& data) const
927 {
928 return this->value < data.value;
929 }
930 bool operator<(int data) const
931 {
932 return this->value < data;
933 }
934};
935
936/**
937 * \brief The applied rotor polarity. This typically is determined by the
938 * Inverted config, but can be overridden if using Follower features.
939 */
941{
942public:
943 int value;
944
945 static constexpr int PositiveIsCounterClockwise = 0;
946 static constexpr int PositiveIsClockwise = 1;
947
949 value{value}
950 {}
951
953 value{-1}
954 {}
955
956 /**
957 * \brief Gets the string representation of this enum
958 *
959 * \returns String representation of this enum
960 */
961 std::string ToString() const
962 {
963 switch(value)
964 {
965 case AppliedRotorPolarityValue::PositiveIsCounterClockwise: return "PositiveIsCounterClockwise";
966 case AppliedRotorPolarityValue::PositiveIsClockwise: return "PositiveIsClockwise";
967 default: return "Invalid Value";
968 }
969 }
970
971 friend std::ostream& operator<<(std::ostream& os, const AppliedRotorPolarityValue& data)
972 {
973 os << data.ToString();
974 return os;
975 }
976
977 std::string Serialize() const
978 {
979 std::stringstream ss;
980 ss << "u_" << this->value;
981 return ss.str();
982 }
983
984 bool operator==(const AppliedRotorPolarityValue& data) const
985 {
986 return this->value == data.value;
987 }
988 bool operator==(int data) const
989 {
990 return this->value == data;
991 }
992 bool operator<(const AppliedRotorPolarityValue& data) const
993 {
994 return this->value < data.value;
995 }
996 bool operator<(int data) const
997 {
998 return this->value < data;
999 }
1000};
1001
1002/**
1003 * \brief The active control mode of the motor controller
1004 */
1006{
1007public:
1009
1010 static constexpr int DisabledOutput = 0;
1011 static constexpr int NeutralOut = 1;
1012 static constexpr int StaticBrake = 2;
1013 static constexpr int DutyCycleOut = 3;
1014 static constexpr int PositionDutyCycle = 4;
1015 static constexpr int VelocityDutyCycle = 5;
1016 static constexpr int MotionMagicDutyCycle = 6;
1017 static constexpr int DutyCycleFOC = 7;
1018 static constexpr int PositionDutyCycleFOC = 8;
1019 static constexpr int VelocityDutyCycleFOC = 9;
1020 static constexpr int MotionMagicDutyCycleFOC = 10;
1021 static constexpr int VoltageOut = 11;
1022 static constexpr int PositionVoltage = 12;
1023 static constexpr int VelocityVoltage = 13;
1024 static constexpr int MotionMagicVoltage = 14;
1025 static constexpr int VoltageFOC = 15;
1026 static constexpr int PositionVoltageFOC = 16;
1027 static constexpr int VelocityVoltageFOC = 17;
1028 static constexpr int MotionMagicVoltageFOC = 18;
1029 static constexpr int TorqueCurrentFOC = 19;
1030 static constexpr int PositionTorqueCurrentFOC = 20;
1031 static constexpr int VelocityTorqueCurrentFOC = 21;
1032 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1033 static constexpr int Follower = 23;
1034 static constexpr int Reserved = 24;
1035 static constexpr int CoastOut = 25;
1036
1038 value{value}
1039 {}
1040
1042 value{-1}
1043 {}
1044
1045 /**
1046 * \brief Gets the string representation of this enum
1047 *
1048 * \returns String representation of this enum
1049 */
1050 std::string ToString() const
1051 {
1052 switch(value)
1053 {
1054 case ControlModeValue::DisabledOutput: return "DisabledOutput";
1055 case ControlModeValue::NeutralOut: return "NeutralOut";
1056 case ControlModeValue::StaticBrake: return "StaticBrake";
1057 case ControlModeValue::DutyCycleOut: return "DutyCycleOut";
1058 case ControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1059 case ControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1060 case ControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1061 case ControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1062 case ControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1063 case ControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1064 case ControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1065 case ControlModeValue::VoltageOut: return "VoltageOut";
1066 case ControlModeValue::PositionVoltage: return "PositionVoltage";
1067 case ControlModeValue::VelocityVoltage: return "VelocityVoltage";
1068 case ControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1069 case ControlModeValue::VoltageFOC: return "VoltageFOC";
1070 case ControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1071 case ControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1072 case ControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1073 case ControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1074 case ControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1075 case ControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1076 case ControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1077 case ControlModeValue::Follower: return "Follower";
1078 case ControlModeValue::Reserved: return "Reserved";
1079 case ControlModeValue::CoastOut: return "CoastOut";
1080 default: return "Invalid Value";
1081 }
1082 }
1083
1084 friend std::ostream& operator<<(std::ostream& os, const ControlModeValue& data)
1085 {
1086 os << data.ToString();
1087 return os;
1088 }
1089
1090 std::string Serialize() const
1091 {
1092 std::stringstream ss;
1093 ss << "u_" << this->value;
1094 return ss.str();
1095 }
1096
1097 bool operator==(const ControlModeValue& data) const
1098 {
1099 return this->value == data.value;
1100 }
1101 bool operator==(int data) const
1102 {
1103 return this->value == data;
1104 }
1105 bool operator<(const ControlModeValue& data) const
1106 {
1107 return this->value < data.value;
1108 }
1109 bool operator<(int data) const
1110 {
1111 return this->value < data;
1112 }
1113};
1114
1115/**
1116 * \brief Check if Motion Magic® is running. This is equivalent to checking
1117 * that the reported control mode is a Motion Magic® based mode.
1118 */
1120{
1121public:
1123
1124 static constexpr int Enabled = 1;
1125 static constexpr int Disabled = 0;
1126
1128 value{value}
1129 {}
1130
1132 value{-1}
1133 {}
1134
1135 /**
1136 * \brief Gets the string representation of this enum
1137 *
1138 * \returns String representation of this enum
1139 */
1140 std::string ToString() const
1141 {
1142 switch(value)
1143 {
1144 case MotionMagicIsRunningValue::Enabled: return "Enabled";
1145 case MotionMagicIsRunningValue::Disabled: return "Disabled";
1146 default: return "Invalid Value";
1147 }
1148 }
1149
1150 friend std::ostream& operator<<(std::ostream& os, const MotionMagicIsRunningValue& data)
1151 {
1152 os << data.ToString();
1153 return os;
1154 }
1155
1156 std::string Serialize() const
1157 {
1158 std::stringstream ss;
1159 ss << "u_" << this->value;
1160 return ss.str();
1161 }
1162
1164 {
1165 return this->value == data.value;
1166 }
1167 bool operator==(int data) const
1168 {
1169 return this->value == data;
1170 }
1171 bool operator<(const MotionMagicIsRunningValue& data) const
1172 {
1173 return this->value < data.value;
1174 }
1175 bool operator<(int data) const
1176 {
1177 return this->value < data;
1178 }
1179};
1180
1181/**
1182 * \brief Invert state of the device
1183 */
1185{
1186public:
1188
1189 static constexpr int CounterClockwise_Positive = 0;
1190 static constexpr int Clockwise_Positive = 1;
1191
1193 value{value}
1194 {}
1195
1197 value{-1}
1198 {}
1199
1200 /**
1201 * \brief Gets the string representation of this enum
1202 *
1203 * \returns String representation of this enum
1204 */
1205 std::string ToString() const
1206 {
1207 switch(value)
1208 {
1209 case InvertedValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
1210 case InvertedValue::Clockwise_Positive: return "Clockwise_Positive";
1211 default: return "Invalid Value";
1212 }
1213 }
1214
1215 friend std::ostream& operator<<(std::ostream& os, const InvertedValue& data)
1216 {
1217 os << data.ToString();
1218 return os;
1219 }
1220
1221 std::string Serialize() const
1222 {
1223 std::stringstream ss;
1224 ss << "u_" << this->value;
1225 return ss.str();
1226 }
1227
1228 bool operator==(const InvertedValue& data) const
1229 {
1230 return this->value == data.value;
1231 }
1232 bool operator==(int data) const
1233 {
1234 return this->value == data;
1235 }
1236 bool operator<(const InvertedValue& data) const
1237 {
1238 return this->value < data.value;
1239 }
1240 bool operator<(int data) const
1241 {
1242 return this->value < data;
1243 }
1244};
1245
1246/**
1247 * \brief The state of the motor controller bridge when output is neutral or
1248 * disabled.
1249 */
1251{
1252public:
1254
1255 static constexpr int Coast = 0;
1256 static constexpr int Brake = 1;
1257
1259 value{value}
1260 {}
1261
1263 value{-1}
1264 {}
1265
1266 /**
1267 * \brief Gets the string representation of this enum
1268 *
1269 * \returns String representation of this enum
1270 */
1271 std::string ToString() const
1272 {
1273 switch(value)
1274 {
1275 case NeutralModeValue::Coast: return "Coast";
1276 case NeutralModeValue::Brake: return "Brake";
1277 default: return "Invalid Value";
1278 }
1279 }
1280
1281 friend std::ostream& operator<<(std::ostream& os, const NeutralModeValue& data)
1282 {
1283 os << data.ToString();
1284 return os;
1285 }
1286
1287 std::string Serialize() const
1288 {
1289 std::stringstream ss;
1290 ss << "u_" << this->value;
1291 return ss.str();
1292 }
1293
1294 bool operator==(const NeutralModeValue& data) const
1295 {
1296 return this->value == data.value;
1297 }
1298 bool operator==(int data) const
1299 {
1300 return this->value == data;
1301 }
1302 bool operator<(const NeutralModeValue& data) const
1303 {
1304 return this->value < data.value;
1305 }
1306 bool operator<(int data) const
1307 {
1308 return this->value < data;
1309 }
1310};
1311
1312/**
1313 * \brief Choose what sensor source is reported via API and used by closed-loop
1314 * and limit features. The default is RotorSensor, which uses the
1315 * internal rotor sensor in the Talon FX. Choose RemoteCANcoder to use
1316 * another CANcoder on the same CAN bus (this also requires setting
1317 * FeedbackRemoteSensorID). Talon FX will update its position and
1318 * velocity whenever CANcoder publishes its information on CAN bus.
1319 * Choose FusedCANcoder and Talon FX will fuse another CANcoder's
1320 * information with the internal rotor, which provides the best possible
1321 * position and velocity for accuracy and bandwidth (note this requires
1322 * setting FeedbackRemoteSensorID). FusedCANcoder was developed for
1323 * applications such as swerve-azimuth.
1324 *
1325 * \details Note: When the Talon Source is changed to FusedCANcoder, the Talon
1326 * needs a period of time to fuse before sensor-based (soft-limit,
1327 * closed loop, etc.) features are used. This period of time is
1328 * determined by the update frequency of the CANcoder's Position
1329 * signal.
1330 */
1332{
1333public:
1335
1336 static constexpr int RotorSensor = 0;
1337 static constexpr int RemoteCANcoder = 1;
1338 static constexpr int FusedCANcoder = 5;
1339
1341 value{value}
1342 {}
1343
1345 value{-1}
1346 {}
1347
1348 /**
1349 * \brief Gets the string representation of this enum
1350 *
1351 * \returns String representation of this enum
1352 */
1353 std::string ToString() const
1354 {
1355 switch(value)
1356 {
1357 case FeedbackSensorSourceValue::RotorSensor: return "RotorSensor";
1358 case FeedbackSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1359 case FeedbackSensorSourceValue::FusedCANcoder: return "FusedCANcoder";
1360 default: return "Invalid Value";
1361 }
1362 }
1363
1364 friend std::ostream& operator<<(std::ostream& os, const FeedbackSensorSourceValue& data)
1365 {
1366 os << data.ToString();
1367 return os;
1368 }
1369
1370 std::string Serialize() const
1371 {
1372 std::stringstream ss;
1373 ss << "u_" << this->value;
1374 return ss.str();
1375 }
1376
1378 {
1379 return this->value == data.value;
1380 }
1381 bool operator==(int data) const
1382 {
1383 return this->value == data;
1384 }
1385 bool operator<(const FeedbackSensorSourceValue& data) const
1386 {
1387 return this->value < data.value;
1388 }
1389 bool operator<(int data) const
1390 {
1391 return this->value < data;
1392 }
1393};
1394
1395/**
1396 * \brief Determines if limit is normally-open (default) or normally-closed.
1397 */
1399{
1400public:
1402
1403 static constexpr int NormallyOpen = 0;
1404 static constexpr int NormallyClosed = 1;
1405
1407 value{value}
1408 {}
1409
1411 value{-1}
1412 {}
1413
1414 /**
1415 * \brief Gets the string representation of this enum
1416 *
1417 * \returns String representation of this enum
1418 */
1419 std::string ToString() const
1420 {
1421 switch(value)
1422 {
1423 case ForwardLimitTypeValue::NormallyOpen: return "NormallyOpen";
1424 case ForwardLimitTypeValue::NormallyClosed: return "NormallyClosed";
1425 default: return "Invalid Value";
1426 }
1427 }
1428
1429 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitTypeValue& data)
1430 {
1431 os << data.ToString();
1432 return os;
1433 }
1434
1435 std::string Serialize() const
1436 {
1437 std::stringstream ss;
1438 ss << "u_" << this->value;
1439 return ss.str();
1440 }
1441
1442 bool operator==(const ForwardLimitTypeValue& data) const
1443 {
1444 return this->value == data.value;
1445 }
1446 bool operator==(int data) const
1447 {
1448 return this->value == data;
1449 }
1450 bool operator<(const ForwardLimitTypeValue& data) const
1451 {
1452 return this->value < data.value;
1453 }
1454 bool operator<(int data) const
1455 {
1456 return this->value < data;
1457 }
1458};
1459
1460/**
1461 * \brief Determines where to poll the forward limit switch. This defaults to
1462 * the limit switch pin on the limit switch connector.
1463 */
1465{
1466public:
1468
1469 static constexpr int LimitSwitchPin = 0;
1470
1472 value{value}
1473 {}
1474
1476 value{-1}
1477 {}
1478
1479 /**
1480 * \brief Gets the string representation of this enum
1481 *
1482 * \returns String representation of this enum
1483 */
1484 std::string ToString() const
1485 {
1486 switch(value)
1487 {
1488 case ForwardLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
1489 default: return "Invalid Value";
1490 }
1491 }
1492
1493 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitSourceValue& data)
1494 {
1495 os << data.ToString();
1496 return os;
1497 }
1498
1499 std::string Serialize() const
1500 {
1501 std::stringstream ss;
1502 ss << "u_" << this->value;
1503 return ss.str();
1504 }
1505
1506 bool operator==(const ForwardLimitSourceValue& data) const
1507 {
1508 return this->value == data.value;
1509 }
1510 bool operator==(int data) const
1511 {
1512 return this->value == data;
1513 }
1514 bool operator<(const ForwardLimitSourceValue& data) const
1515 {
1516 return this->value < data.value;
1517 }
1518 bool operator<(int data) const
1519 {
1520 return this->value < data;
1521 }
1522};
1523
1524/**
1525 * \brief Determines if limit is normally-open (default) or normally-closed.
1526 */
1528{
1529public:
1531
1532 static constexpr int NormallyOpen = 0;
1533 static constexpr int NormallyClosed = 1;
1534
1536 value{value}
1537 {}
1538
1540 value{-1}
1541 {}
1542
1543 /**
1544 * \brief Gets the string representation of this enum
1545 *
1546 * \returns String representation of this enum
1547 */
1548 std::string ToString() const
1549 {
1550 switch(value)
1551 {
1552 case ReverseLimitTypeValue::NormallyOpen: return "NormallyOpen";
1553 case ReverseLimitTypeValue::NormallyClosed: return "NormallyClosed";
1554 default: return "Invalid Value";
1555 }
1556 }
1557
1558 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitTypeValue& data)
1559 {
1560 os << data.ToString();
1561 return os;
1562 }
1563
1564 std::string Serialize() const
1565 {
1566 std::stringstream ss;
1567 ss << "u_" << this->value;
1568 return ss.str();
1569 }
1570
1571 bool operator==(const ReverseLimitTypeValue& data) const
1572 {
1573 return this->value == data.value;
1574 }
1575 bool operator==(int data) const
1576 {
1577 return this->value == data;
1578 }
1579 bool operator<(const ReverseLimitTypeValue& data) const
1580 {
1581 return this->value < data.value;
1582 }
1583 bool operator<(int data) const
1584 {
1585 return this->value < data;
1586 }
1587};
1588
1589/**
1590 * \brief Determines where to poll the reverse limit switch. This defaults to
1591 * the limit switch pin on the limit switch connector.
1592 */
1594{
1595public:
1597
1598 static constexpr int LimitSwitchPin = 0;
1599
1601 value{value}
1602 {}
1603
1605 value{-1}
1606 {}
1607
1608 /**
1609 * \brief Gets the string representation of this enum
1610 *
1611 * \returns String representation of this enum
1612 */
1613 std::string ToString() const
1614 {
1615 switch(value)
1616 {
1617 case ReverseLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
1618 default: return "Invalid Value";
1619 }
1620 }
1621
1622 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitSourceValue& data)
1623 {
1624 os << data.ToString();
1625 return os;
1626 }
1627
1628 std::string Serialize() const
1629 {
1630 std::stringstream ss;
1631 ss << "u_" << this->value;
1632 return ss.str();
1633 }
1634
1635 bool operator==(const ReverseLimitSourceValue& data) const
1636 {
1637 return this->value == data.value;
1638 }
1639 bool operator==(int data) const
1640 {
1641 return this->value == data;
1642 }
1643 bool operator<(const ReverseLimitSourceValue& data) const
1644 {
1645 return this->value < data.value;
1646 }
1647 bool operator<(int data) const
1648 {
1649 return this->value < data;
1650 }
1651};
1652
1653/**
1654 * \brief Magnet health as measured by CANcoder.
1655 *
1656 * \details Magnet health as measured by CANcoder. Red indicates too close or
1657 * too far, Orange is adequate but with reduced accuracy, green is
1658 * ideal. Invalid means the accuracy cannot be determined.
1659 */
1661{
1662public:
1664
1665 static constexpr int Magnet_Red = 1;
1666 static constexpr int Magnet_Orange = 2;
1667 static constexpr int Magnet_Green = 3;
1668 static constexpr int Magnet_Invalid = 0;
1669
1671 value{value}
1672 {}
1673
1675 value{-1}
1676 {}
1677
1678 /**
1679 * \brief Gets the string representation of this enum
1680 *
1681 * \returns String representation of this enum
1682 */
1683 std::string ToString() const
1684 {
1685 switch(value)
1686 {
1687 case MagnetHealthValue::Magnet_Red: return "Magnet_Red";
1688 case MagnetHealthValue::Magnet_Orange: return "Magnet_Orange";
1689 case MagnetHealthValue::Magnet_Green: return "Magnet_Green";
1690 case MagnetHealthValue::Magnet_Invalid: return "Magnet_Invalid";
1691 default: return "Invalid Value";
1692 }
1693 }
1694
1695 friend std::ostream& operator<<(std::ostream& os, const MagnetHealthValue& data)
1696 {
1697 os << data.ToString();
1698 return os;
1699 }
1700
1701 std::string Serialize() const
1702 {
1703 std::stringstream ss;
1704 ss << "u_" << this->value;
1705 return ss.str();
1706 }
1707
1708 bool operator==(const MagnetHealthValue& data) const
1709 {
1710 return this->value == data.value;
1711 }
1712 bool operator==(int data) const
1713 {
1714 return this->value == data;
1715 }
1716 bool operator<(const MagnetHealthValue& data) const
1717 {
1718 return this->value < data.value;
1719 }
1720 bool operator<(int data) const
1721 {
1722 return this->value < data;
1723 }
1724};
1725
1726/**
1727 * \brief The applied output of the bridge.
1728 */
1730{
1731public:
1733
1734 static constexpr int BridgeReq_Coast = 0;
1735 static constexpr int BridgeReq_Brake = 1;
1736 static constexpr int BridgeReq_Trapez = 6;
1737 static constexpr int BridgeReq_FOCTorque = 7;
1738 static constexpr int BridgeReq_MusicTone = 8;
1739 static constexpr int BridgeReq_FOCEasy = 9;
1740 static constexpr int BridgeReq_FaultBrake = 12;
1741 static constexpr int BridgeReq_FaultCoast = 13;
1742
1744 value{value}
1745 {}
1746
1748 value{-1}
1749 {}
1750
1751 /**
1752 * \brief Gets the string representation of this enum
1753 *
1754 * \returns String representation of this enum
1755 */
1756 std::string ToString() const
1757 {
1758 switch(value)
1759 {
1760 case BridgeOuputValue::BridgeReq_Coast: return "BridgeReq_Coast";
1761 case BridgeOuputValue::BridgeReq_Brake: return "BridgeReq_Brake";
1762 case BridgeOuputValue::BridgeReq_Trapez: return "BridgeReq_Trapez";
1763 case BridgeOuputValue::BridgeReq_FOCTorque: return "BridgeReq_FOCTorque";
1764 case BridgeOuputValue::BridgeReq_MusicTone: return "BridgeReq_MusicTone";
1765 case BridgeOuputValue::BridgeReq_FOCEasy: return "BridgeReq_FOCEasy";
1766 case BridgeOuputValue::BridgeReq_FaultBrake: return "BridgeReq_FaultBrake";
1767 case BridgeOuputValue::BridgeReq_FaultCoast: return "BridgeReq_FaultCoast";
1768 default: return "Invalid Value";
1769 }
1770 }
1771
1772 friend std::ostream& operator<<(std::ostream& os, const BridgeOuputValue& data)
1773 {
1774 os << data.ToString();
1775 return os;
1776 }
1777
1778 std::string Serialize() const
1779 {
1780 std::stringstream ss;
1781 ss << "u_" << this->value;
1782 return ss.str();
1783 }
1784
1785 bool operator==(const BridgeOuputValue& data) const
1786 {
1787 return this->value == data.value;
1788 }
1789 bool operator==(int data) const
1790 {
1791 return this->value == data;
1792 }
1793 bool operator<(const BridgeOuputValue& data) const
1794 {
1795 return this->value < data.value;
1796 }
1797 bool operator<(int data) const
1798 {
1799 return this->value < data;
1800 }
1801};
1802
1803
1804}
1805}
1806}
Definition: Serializable.hpp:15
The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
Definition: SpnEnums.hpp:680
std::string Serialize() const
Definition: SpnEnums.hpp:716
bool operator<(int data) const
Definition: SpnEnums.hpp:735
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:700
bool operator<(const AbsoluteSensorRangeValue &data) const
Definition: SpnEnums.hpp:731
static constexpr int Signed_PlusMinusHalf
Definition: SpnEnums.hpp:685
bool operator==(const AbsoluteSensorRangeValue &data) const
Definition: SpnEnums.hpp:723
static constexpr int Unsigned_0To1
Definition: SpnEnums.hpp:684
friend std::ostream & operator<<(std::ostream &os, const AbsoluteSensorRangeValue &data)
Definition: SpnEnums.hpp:710
AbsoluteSensorRangeValue(int value)
Definition: SpnEnums.hpp:687
bool operator==(int data) const
Definition: SpnEnums.hpp:727
AbsoluteSensorRangeValue()
Definition: SpnEnums.hpp:691
The applied rotor polarity.
Definition: SpnEnums.hpp:941
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:961
bool operator==(const AppliedRotorPolarityValue &data) const
Definition: SpnEnums.hpp:984
bool operator<(int data) const
Definition: SpnEnums.hpp:996
AppliedRotorPolarityValue()
Definition: SpnEnums.hpp:952
bool operator==(int data) const
Definition: SpnEnums.hpp:988
bool operator<(const AppliedRotorPolarityValue &data) const
Definition: SpnEnums.hpp:992
friend std::ostream & operator<<(std::ostream &os, const AppliedRotorPolarityValue &data)
Definition: SpnEnums.hpp:971
static constexpr int PositiveIsClockwise
Definition: SpnEnums.hpp:946
static constexpr int PositiveIsCounterClockwise
Definition: SpnEnums.hpp:945
AppliedRotorPolarityValue(int value)
Definition: SpnEnums.hpp:948
std::string Serialize() const
Definition: SpnEnums.hpp:977
The applied output of the bridge.
Definition: SpnEnums.hpp:1730
static constexpr int BridgeReq_Trapez
Definition: SpnEnums.hpp:1736
static constexpr int BridgeReq_FaultCoast
Definition: SpnEnums.hpp:1741
BridgeOuputValue()
Definition: SpnEnums.hpp:1747
static constexpr int BridgeReq_FOCEasy
Definition: SpnEnums.hpp:1739
static constexpr int BridgeReq_Brake
Definition: SpnEnums.hpp:1735
friend std::ostream & operator<<(std::ostream &os, const BridgeOuputValue &data)
Definition: SpnEnums.hpp:1772
bool operator<(const BridgeOuputValue &data) const
Definition: SpnEnums.hpp:1793
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1756
bool operator==(int data) const
Definition: SpnEnums.hpp:1789
bool operator<(int data) const
Definition: SpnEnums.hpp:1797
static constexpr int BridgeReq_FaultBrake
Definition: SpnEnums.hpp:1740
static constexpr int BridgeReq_MusicTone
Definition: SpnEnums.hpp:1738
static constexpr int BridgeReq_Coast
Definition: SpnEnums.hpp:1734
static constexpr int BridgeReq_FOCTorque
Definition: SpnEnums.hpp:1737
bool operator==(const BridgeOuputValue &data) const
Definition: SpnEnums.hpp:1785
std::string Serialize() const
Definition: SpnEnums.hpp:1778
int value
Definition: SpnEnums.hpp:1732
BridgeOuputValue(int value)
Definition: SpnEnums.hpp:1743
The active control mode of the motor controller.
Definition: SpnEnums.hpp:1006
static constexpr int MotionMagicDutyCycle
Definition: SpnEnums.hpp:1016
static constexpr int MotionMagicDutyCycleFOC
Definition: SpnEnums.hpp:1020
static constexpr int DutyCycleOut
Definition: SpnEnums.hpp:1013
std::string Serialize() const
Definition: SpnEnums.hpp:1090
static constexpr int Follower
Definition: SpnEnums.hpp:1033
static constexpr int VoltageOut
Definition: SpnEnums.hpp:1021
static constexpr int DisabledOutput
Definition: SpnEnums.hpp:1010
static constexpr int CoastOut
Definition: SpnEnums.hpp:1035
static constexpr int VelocityDutyCycle
Definition: SpnEnums.hpp:1015
static constexpr int DutyCycleFOC
Definition: SpnEnums.hpp:1017
static constexpr int MotionMagicVoltageFOC
Definition: SpnEnums.hpp:1028
static constexpr int TorqueCurrentFOC
Definition: SpnEnums.hpp:1029
static constexpr int VelocityVoltageFOC
Definition: SpnEnums.hpp:1027
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1050
bool operator==(const ControlModeValue &data) const
Definition: SpnEnums.hpp:1097
static constexpr int MotionMagicVoltage
Definition: SpnEnums.hpp:1024
static constexpr int VelocityVoltage
Definition: SpnEnums.hpp:1023
static constexpr int PositionDutyCycleFOC
Definition: SpnEnums.hpp:1018
int value
Definition: SpnEnums.hpp:1008
static constexpr int PositionVoltage
Definition: SpnEnums.hpp:1022
static constexpr int VelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1031
static constexpr int VoltageFOC
Definition: SpnEnums.hpp:1025
static constexpr int NeutralOut
Definition: SpnEnums.hpp:1011
static constexpr int MotionMagicTorqueCurrentFOC
Definition: SpnEnums.hpp:1032
static constexpr int VelocityDutyCycleFOC
Definition: SpnEnums.hpp:1019
bool operator<(int data) const
Definition: SpnEnums.hpp:1109
friend std::ostream & operator<<(std::ostream &os, const ControlModeValue &data)
Definition: SpnEnums.hpp:1084
static constexpr int StaticBrake
Definition: SpnEnums.hpp:1012
bool operator<(const ControlModeValue &data) const
Definition: SpnEnums.hpp:1105
ControlModeValue()
Definition: SpnEnums.hpp:1041
static constexpr int Reserved
Definition: SpnEnums.hpp:1034
bool operator==(int data) const
Definition: SpnEnums.hpp:1101
ControlModeValue(int value)
Definition: SpnEnums.hpp:1037
static constexpr int PositionTorqueCurrentFOC
Definition: SpnEnums.hpp:1030
static constexpr int PositionDutyCycle
Definition: SpnEnums.hpp:1014
static constexpr int PositionVoltageFOC
Definition: SpnEnums.hpp:1026
True if the device is enabled.
Definition: SpnEnums.hpp:745
DeviceEnableValue()
Definition: SpnEnums.hpp:756
static constexpr int Disabled
Definition: SpnEnums.hpp:750
static constexpr int Enabled
Definition: SpnEnums.hpp:749
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:765
bool operator<(int data) const
Definition: SpnEnums.hpp:800
friend std::ostream & operator<<(std::ostream &os, const DeviceEnableValue &data)
Definition: SpnEnums.hpp:775
int value
Definition: SpnEnums.hpp:747
bool operator<(const DeviceEnableValue &data) const
Definition: SpnEnums.hpp:796
std::string Serialize() const
Definition: SpnEnums.hpp:781
DeviceEnableValue(int value)
Definition: SpnEnums.hpp:752
bool operator==(int data) const
Definition: SpnEnums.hpp:792
bool operator==(const DeviceEnableValue &data) const
Definition: SpnEnums.hpp:788
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition: SpnEnums.hpp:1332
bool operator<(const FeedbackSensorSourceValue &data) const
Definition: SpnEnums.hpp:1385
std::string Serialize() const
Definition: SpnEnums.hpp:1370
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1353
friend std::ostream & operator<<(std::ostream &os, const FeedbackSensorSourceValue &data)
Definition: SpnEnums.hpp:1364
static constexpr int FusedCANcoder
Definition: SpnEnums.hpp:1338
bool operator==(const FeedbackSensorSourceValue &data) const
Definition: SpnEnums.hpp:1377
bool operator==(int data) const
Definition: SpnEnums.hpp:1381
static constexpr int RotorSensor
Definition: SpnEnums.hpp:1336
FeedbackSensorSourceValue(int value)
Definition: SpnEnums.hpp:1340
FeedbackSensorSourceValue()
Definition: SpnEnums.hpp:1344
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1337
bool operator<(int data) const
Definition: SpnEnums.hpp:1389
Determines where to poll the forward limit switch.
Definition: SpnEnums.hpp:1465
ForwardLimitSourceValue(int value)
Definition: SpnEnums.hpp:1471
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitSourceValue &data)
Definition: SpnEnums.hpp:1493
bool operator==(int data) const
Definition: SpnEnums.hpp:1510
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1469
bool operator==(const ForwardLimitSourceValue &data) const
Definition: SpnEnums.hpp:1506
std::string Serialize() const
Definition: SpnEnums.hpp:1499
int value
Definition: SpnEnums.hpp:1467
bool operator<(int data) const
Definition: SpnEnums.hpp:1518
bool operator<(const ForwardLimitSourceValue &data) const
Definition: SpnEnums.hpp:1514
ForwardLimitSourceValue()
Definition: SpnEnums.hpp:1475
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1484
Determines if limit is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1399
bool operator==(int data) const
Definition: SpnEnums.hpp:1446
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1419
std::string Serialize() const
Definition: SpnEnums.hpp:1435
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1403
bool operator<(const ForwardLimitTypeValue &data) const
Definition: SpnEnums.hpp:1450
ForwardLimitTypeValue(int value)
Definition: SpnEnums.hpp:1406
ForwardLimitTypeValue()
Definition: SpnEnums.hpp:1410
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitTypeValue &data)
Definition: SpnEnums.hpp:1429
bool operator<(int data) const
Definition: SpnEnums.hpp:1454
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:1404
bool operator==(const ForwardLimitTypeValue &data) const
Definition: SpnEnums.hpp:1442
int value
Definition: SpnEnums.hpp:1401
Forward Limit Pin.
Definition: SpnEnums.hpp:810
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:814
bool operator==(const ForwardLimitValue &data) const
Definition: SpnEnums.hpp:853
bool operator==(int data) const
Definition: SpnEnums.hpp:857
static constexpr int Open
Definition: SpnEnums.hpp:815
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitValue &data)
Definition: SpnEnums.hpp:840
ForwardLimitValue(int value)
Definition: SpnEnums.hpp:817
bool operator<(const ForwardLimitValue &data) const
Definition: SpnEnums.hpp:861
ForwardLimitValue()
Definition: SpnEnums.hpp:821
int value
Definition: SpnEnums.hpp:812
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:830
bool operator<(int data) const
Definition: SpnEnums.hpp:865
std::string Serialize() const
Definition: SpnEnums.hpp:846
True if device is locked by FRC.
Definition: SpnEnums.hpp:242
bool operator==(const FrcLockValue &data) const
Definition: SpnEnums.hpp:285
bool operator<(int data) const
Definition: SpnEnums.hpp:297
bool operator==(int data) const
Definition: SpnEnums.hpp:289
FrcLockValue(int value)
Definition: SpnEnums.hpp:249
static constexpr int Frc_Locked
Definition: SpnEnums.hpp:246
int value
Definition: SpnEnums.hpp:244
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:262
friend std::ostream & operator<<(std::ostream &os, const FrcLockValue &data)
Definition: SpnEnums.hpp:272
std::string Serialize() const
Definition: SpnEnums.hpp:278
FrcLockValue()
Definition: SpnEnums.hpp:253
static constexpr int Frc_Unlocked
Definition: SpnEnums.hpp:247
bool operator<(const FrcLockValue &data) const
Definition: SpnEnums.hpp:293
Invert state of the device.
Definition: SpnEnums.hpp:1185
bool operator==(const InvertedValue &data) const
Definition: SpnEnums.hpp:1228
friend std::ostream & operator<<(std::ostream &os, const InvertedValue &data)
Definition: SpnEnums.hpp:1215
InvertedValue(int value)
Definition: SpnEnums.hpp:1192
static constexpr int Clockwise_Positive
Definition: SpnEnums.hpp:1190
bool operator==(int data) const
Definition: SpnEnums.hpp:1232
int value
Definition: SpnEnums.hpp:1187
bool operator<(const InvertedValue &data) const
Definition: SpnEnums.hpp:1236
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:1189
std::string Serialize() const
Definition: SpnEnums.hpp:1221
InvertedValue()
Definition: SpnEnums.hpp:1196
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1205
bool operator<(int data) const
Definition: SpnEnums.hpp:1240
Whether the device is pro licensed or not.
Definition: SpnEnums.hpp:111
bool operator<(const IsPROLicensedValue &data) const
Definition: SpnEnums.hpp:162
IsPROLicensedValue()
Definition: SpnEnums.hpp:122
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:131
friend std::ostream & operator<<(std::ostream &os, const IsPROLicensedValue &data)
Definition: SpnEnums.hpp:141
bool operator==(int data) const
Definition: SpnEnums.hpp:158
static constexpr int Licensed
Definition: SpnEnums.hpp:116
bool operator==(const IsPROLicensedValue &data) const
Definition: SpnEnums.hpp:154
static constexpr int NotLicensed
Definition: SpnEnums.hpp:115
int value
Definition: SpnEnums.hpp:113
IsPROLicensedValue(int value)
Definition: SpnEnums.hpp:118
bool operator<(int data) const
Definition: SpnEnums.hpp:166
std::string Serialize() const
Definition: SpnEnums.hpp:147
The Color of LED1 when it's "Off".
Definition: SpnEnums.hpp:449
bool operator<(int data) const
Definition: SpnEnums.hpp:516
static constexpr int Orange
Definition: SpnEnums.hpp:456
static constexpr int Cyan
Definition: SpnEnums.hpp:459
static constexpr int Pink
Definition: SpnEnums.hpp:458
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:475
bool operator==(int data) const
Definition: SpnEnums.hpp:508
Led1OffColorValue(int value)
Definition: SpnEnums.hpp:462
bool operator==(const Led1OffColorValue &data) const
Definition: SpnEnums.hpp:504
static constexpr int Off
Definition: SpnEnums.hpp:453
bool operator<(const Led1OffColorValue &data) const
Definition: SpnEnums.hpp:512
std::string Serialize() const
Definition: SpnEnums.hpp:497
static constexpr int Blue
Definition: SpnEnums.hpp:457
int value
Definition: SpnEnums.hpp:451
static constexpr int Green
Definition: SpnEnums.hpp:455
friend std::ostream & operator<<(std::ostream &os, const Led1OffColorValue &data)
Definition: SpnEnums.hpp:491
static constexpr int White
Definition: SpnEnums.hpp:460
Led1OffColorValue()
Definition: SpnEnums.hpp:466
static constexpr int Red
Definition: SpnEnums.hpp:454
The Color of LED1 when it's "On".
Definition: SpnEnums.hpp:372
bool operator==(const Led1OnColorValue &data) const
Definition: SpnEnums.hpp:427
static constexpr int Green
Definition: SpnEnums.hpp:378
Led1OnColorValue()
Definition: SpnEnums.hpp:389
static constexpr int Cyan
Definition: SpnEnums.hpp:382
friend std::ostream & operator<<(std::ostream &os, const Led1OnColorValue &data)
Definition: SpnEnums.hpp:414
std::string Serialize() const
Definition: SpnEnums.hpp:420
static constexpr int Orange
Definition: SpnEnums.hpp:379
static constexpr int Blue
Definition: SpnEnums.hpp:380
static constexpr int Red
Definition: SpnEnums.hpp:377
bool operator<(const Led1OnColorValue &data) const
Definition: SpnEnums.hpp:435
bool operator<(int data) const
Definition: SpnEnums.hpp:439
static constexpr int Pink
Definition: SpnEnums.hpp:381
static constexpr int Off
Definition: SpnEnums.hpp:376
int value
Definition: SpnEnums.hpp:374
bool operator==(int data) const
Definition: SpnEnums.hpp:431
static constexpr int White
Definition: SpnEnums.hpp:383
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:398
Led1OnColorValue(int value)
Definition: SpnEnums.hpp:385
The Color of LED2 when it's "Off".
Definition: SpnEnums.hpp:603
bool operator==(const Led2OffColorValue &data) const
Definition: SpnEnums.hpp:658
bool operator<(const Led2OffColorValue &data) const
Definition: SpnEnums.hpp:666
bool operator==(int data) const
Definition: SpnEnums.hpp:662
Led2OffColorValue(int value)
Definition: SpnEnums.hpp:616
int value
Definition: SpnEnums.hpp:605
static constexpr int Red
Definition: SpnEnums.hpp:608
static constexpr int Cyan
Definition: SpnEnums.hpp:613
static constexpr int White
Definition: SpnEnums.hpp:614
Led2OffColorValue()
Definition: SpnEnums.hpp:620
static constexpr int Blue
Definition: SpnEnums.hpp:611
std::string Serialize() const
Definition: SpnEnums.hpp:651
static constexpr int Orange
Definition: SpnEnums.hpp:610
static constexpr int Off
Definition: SpnEnums.hpp:607
static constexpr int Pink
Definition: SpnEnums.hpp:612
static constexpr int Green
Definition: SpnEnums.hpp:609
bool operator<(int data) const
Definition: SpnEnums.hpp:670
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:629
friend std::ostream & operator<<(std::ostream &os, const Led2OffColorValue &data)
Definition: SpnEnums.hpp:645
The Color of LED2 when it's "On".
Definition: SpnEnums.hpp:526
bool operator<(int data) const
Definition: SpnEnums.hpp:593
Led2OnColorValue()
Definition: SpnEnums.hpp:543
std::string Serialize() const
Definition: SpnEnums.hpp:574
static constexpr int Pink
Definition: SpnEnums.hpp:535
int value
Definition: SpnEnums.hpp:528
bool operator==(int data) const
Definition: SpnEnums.hpp:585
bool operator<(const Led2OnColorValue &data) const
Definition: SpnEnums.hpp:589
static constexpr int Off
Definition: SpnEnums.hpp:530
static constexpr int White
Definition: SpnEnums.hpp:537
bool operator==(const Led2OnColorValue &data) const
Definition: SpnEnums.hpp:581
static constexpr int Green
Definition: SpnEnums.hpp:532
static constexpr int Orange
Definition: SpnEnums.hpp:533
Led2OnColorValue(int value)
Definition: SpnEnums.hpp:539
static constexpr int Cyan
Definition: SpnEnums.hpp:536
friend std::ostream & operator<<(std::ostream &os, const Led2OnColorValue &data)
Definition: SpnEnums.hpp:568
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:552
static constexpr int Blue
Definition: SpnEnums.hpp:534
static constexpr int Red
Definition: SpnEnums.hpp:531
Magnet health as measured by CANcoder.
Definition: SpnEnums.hpp:1661
MagnetHealthValue()
Definition: SpnEnums.hpp:1674
bool operator==(int data) const
Definition: SpnEnums.hpp:1712
friend std::ostream & operator<<(std::ostream &os, const MagnetHealthValue &data)
Definition: SpnEnums.hpp:1695
static constexpr int Magnet_Green
Definition: SpnEnums.hpp:1667
static constexpr int Magnet_Red
Definition: SpnEnums.hpp:1665
MagnetHealthValue(int value)
Definition: SpnEnums.hpp:1670
bool operator==(const MagnetHealthValue &data) const
Definition: SpnEnums.hpp:1708
bool operator<(const MagnetHealthValue &data) const
Definition: SpnEnums.hpp:1716
bool operator<(int data) const
Definition: SpnEnums.hpp:1720
static constexpr int Magnet_Invalid
Definition: SpnEnums.hpp:1668
static constexpr int Magnet_Orange
Definition: SpnEnums.hpp:1666
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1683
int value
Definition: SpnEnums.hpp:1663
std::string Serialize() const
Definition: SpnEnums.hpp:1701
Check if Motion Magic® is running.
Definition: SpnEnums.hpp:1120
static constexpr int Enabled
Definition: SpnEnums.hpp:1124
MotionMagicIsRunningValue()
Definition: SpnEnums.hpp:1131
bool operator==(int data) const
Definition: SpnEnums.hpp:1167
bool operator==(const MotionMagicIsRunningValue &data) const
Definition: SpnEnums.hpp:1163
static constexpr int Disabled
Definition: SpnEnums.hpp:1125
std::string Serialize() const
Definition: SpnEnums.hpp:1156
bool operator<(const MotionMagicIsRunningValue &data) const
Definition: SpnEnums.hpp:1171
bool operator<(int data) const
Definition: SpnEnums.hpp:1175
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1140
MotionMagicIsRunningValue(int value)
Definition: SpnEnums.hpp:1127
friend std::ostream & operator<<(std::ostream &os, const MotionMagicIsRunningValue &data)
Definition: SpnEnums.hpp:1150
The state of the motor controller bridge when output is neutral or disabled.
Definition: SpnEnums.hpp:1251
NeutralModeValue()
Definition: SpnEnums.hpp:1262
friend std::ostream & operator<<(std::ostream &os, const NeutralModeValue &data)
Definition: SpnEnums.hpp:1281
bool operator<(int data) const
Definition: SpnEnums.hpp:1306
NeutralModeValue(int value)
Definition: SpnEnums.hpp:1258
static constexpr int Brake
Definition: SpnEnums.hpp:1256
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1271
bool operator==(int data) const
Definition: SpnEnums.hpp:1298
std::string Serialize() const
Definition: SpnEnums.hpp:1287
int value
Definition: SpnEnums.hpp:1253
bool operator==(const NeutralModeValue &data) const
Definition: SpnEnums.hpp:1294
bool operator<(const NeutralModeValue &data) const
Definition: SpnEnums.hpp:1302
static constexpr int Coast
Definition: SpnEnums.hpp:1255
Determines where to poll the reverse limit switch.
Definition: SpnEnums.hpp:1594
bool operator==(int data) const
Definition: SpnEnums.hpp:1639
ReverseLimitSourceValue(int value)
Definition: SpnEnums.hpp:1600
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1598
bool operator<(const ReverseLimitSourceValue &data) const
Definition: SpnEnums.hpp:1643
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitSourceValue &data)
Definition: SpnEnums.hpp:1622
ReverseLimitSourceValue()
Definition: SpnEnums.hpp:1604
std::string Serialize() const
Definition: SpnEnums.hpp:1628
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1613
bool operator<(int data) const
Definition: SpnEnums.hpp:1647
int value
Definition: SpnEnums.hpp:1596
bool operator==(const ReverseLimitSourceValue &data) const
Definition: SpnEnums.hpp:1635
Determines if limit is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1528
bool operator<(int data) const
Definition: SpnEnums.hpp:1583
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitTypeValue &data)
Definition: SpnEnums.hpp:1558
bool operator<(const ReverseLimitTypeValue &data) const
Definition: SpnEnums.hpp:1579
ReverseLimitTypeValue(int value)
Definition: SpnEnums.hpp:1535
std::string Serialize() const
Definition: SpnEnums.hpp:1564
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1532
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1548
ReverseLimitTypeValue()
Definition: SpnEnums.hpp:1539
bool operator==(int data) const
Definition: SpnEnums.hpp:1575
bool operator==(const ReverseLimitTypeValue &data) const
Definition: SpnEnums.hpp:1571
int value
Definition: SpnEnums.hpp:1530
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:1533
Reverse Limit Pin.
Definition: SpnEnums.hpp:875
bool operator<(int data) const
Definition: SpnEnums.hpp:930
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:879
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:895
static constexpr int Open
Definition: SpnEnums.hpp:880
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitValue &data)
Definition: SpnEnums.hpp:905
ReverseLimitValue(int value)
Definition: SpnEnums.hpp:882
bool operator<(const ReverseLimitValue &data) const
Definition: SpnEnums.hpp:926
int value
Definition: SpnEnums.hpp:877
bool operator==(const ReverseLimitValue &data) const
Definition: SpnEnums.hpp:918
std::string Serialize() const
Definition: SpnEnums.hpp:911
ReverseLimitValue()
Definition: SpnEnums.hpp:886
bool operator==(int data) const
Definition: SpnEnums.hpp:922
True if the robot is enabled.
Definition: SpnEnums.hpp:307
RobotEnableValue(int value)
Definition: SpnEnums.hpp:314
static constexpr int Enabled
Definition: SpnEnums.hpp:311
bool operator==(int data) const
Definition: SpnEnums.hpp:354
RobotEnableValue()
Definition: SpnEnums.hpp:318
bool operator<(const RobotEnableValue &data) const
Definition: SpnEnums.hpp:358
friend std::ostream & operator<<(std::ostream &os, const RobotEnableValue &data)
Definition: SpnEnums.hpp:337
std::string Serialize() const
Definition: SpnEnums.hpp:343
static constexpr int Disabled
Definition: SpnEnums.hpp:312
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:327
bool operator<(int data) const
Definition: SpnEnums.hpp:362
bool operator==(const RobotEnableValue &data) const
Definition: SpnEnums.hpp:350
int value
Definition: SpnEnums.hpp:309
Direction of the sensor to determine positive facing the LED side of the CANcoder.
Definition: SpnEnums.hpp:177
bool operator==(const SensorDirectionValue &data) const
Definition: SpnEnums.hpp:220
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:181
bool operator<(int data) const
Definition: SpnEnums.hpp:232
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:197
SensorDirectionValue(int value)
Definition: SpnEnums.hpp:184
std::string Serialize() const
Definition: SpnEnums.hpp:213
int value
Definition: SpnEnums.hpp:179
bool operator==(int data) const
Definition: SpnEnums.hpp:224
bool operator<(const SensorDirectionValue &data) const
Definition: SpnEnums.hpp:228
friend std::ostream & operator<<(std::ostream &os, const SensorDirectionValue &data)
Definition: SpnEnums.hpp:207
static constexpr int Clockwise_Positive
Definition: SpnEnums.hpp:182
SensorDirectionValue()
Definition: SpnEnums.hpp:188
System state of the device.
Definition: SpnEnums.hpp:22
System_StateValue()
Definition: SpnEnums.hpp:45
static constexpr int Bootup_2
Definition: SpnEnums.hpp:28
static constexpr int ControlDisabled
Definition: SpnEnums.hpp:35
std::string Serialize() const
Definition: SpnEnums.hpp:82
static constexpr int Bootup_1
Definition: SpnEnums.hpp:27
static constexpr int Bootup_5
Definition: SpnEnums.hpp:31
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:54
static constexpr int Recover
Definition: SpnEnums.hpp:38
static constexpr int Fault
Definition: SpnEnums.hpp:37
static constexpr int NotLicensed
Definition: SpnEnums.hpp:39
System_StateValue(int value)
Definition: SpnEnums.hpp:41
static constexpr int ControlEnabled
Definition: SpnEnums.hpp:36
static constexpr int BootBeep
Definition: SpnEnums.hpp:34
bool operator<(int data) const
Definition: SpnEnums.hpp:101
bool operator<(const System_StateValue &data) const
Definition: SpnEnums.hpp:97
static constexpr int Bootup_3
Definition: SpnEnums.hpp:29
static constexpr int Bootup_7
Definition: SpnEnums.hpp:33
bool operator==(const System_StateValue &data) const
Definition: SpnEnums.hpp:89
static constexpr int Bootup_4
Definition: SpnEnums.hpp:30
int value
Definition: SpnEnums.hpp:24
friend std::ostream & operator<<(std::ostream &os, const System_StateValue &data)
Definition: SpnEnums.hpp:76
static constexpr int Bootup_0
Definition: SpnEnums.hpp:26
static constexpr int Bootup_6
Definition: SpnEnums.hpp:32
bool operator==(int data) const
Definition: SpnEnums.hpp:93
Definition: string_util.hpp:14