CTRE Phoenix 6 C++ 24.50.0-alpha-2
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 phoenix6 {
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 ControlEnabled_11 = 11;
38 static constexpr int Fault = 12;
39 static constexpr int Recover = 13;
40 static constexpr int NotLicensed = 14;
41 static constexpr int Production = 15;
42
43 constexpr System_StateValue(int value) :
45 {}
46
47 constexpr System_StateValue() :
48 value{-1}
49 {}
50
51 constexpr bool operator==(System_StateValue data) const
52 {
53 return this->value == data.value;
54 }
55 constexpr bool operator==(int data) const
56 {
57 return this->value == data;
58 }
59 constexpr bool operator!=(System_StateValue data) const
60 {
61 return this->value != data.value;
62 }
63 constexpr bool operator!=(int data) const
64 {
65 return this->value != data;
66 }
67 constexpr bool operator<(System_StateValue data) const
68 {
69 return this->value < data.value;
70 }
71 constexpr bool operator<(int data) const
72 {
73 return this->value < data;
74 }
75
76 /**
77 * \brief Gets the string representation of this enum
78 *
79 * \returns String representation of this enum
80 */
81 std::string ToString() const
82 {
83 switch (value)
84 {
85 case System_StateValue::Bootup_0: return "Bootup_0";
86 case System_StateValue::Bootup_1: return "Bootup_1";
87 case System_StateValue::Bootup_2: return "Bootup_2";
88 case System_StateValue::Bootup_3: return "Bootup_3";
89 case System_StateValue::Bootup_4: return "Bootup_4";
90 case System_StateValue::Bootup_5: return "Bootup_5";
91 case System_StateValue::Bootup_6: return "Bootup_6";
92 case System_StateValue::Bootup_7: return "Bootup_7";
93 case System_StateValue::BootBeep: return "BootBeep";
94 case System_StateValue::ControlDisabled: return "ControlDisabled";
95 case System_StateValue::ControlEnabled: return "ControlEnabled";
96 case System_StateValue::ControlEnabled_11: return "ControlEnabled_11";
97 case System_StateValue::Fault: return "Fault";
98 case System_StateValue::Recover: return "Recover";
99 case System_StateValue::NotLicensed: return "NotLicensed";
100 case System_StateValue::Production: return "Production";
101 default: return "Invalid Value";
102 }
103 }
104
105 friend std::ostream& operator<<(std::ostream &os, System_StateValue data)
106 {
107 os << data.ToString();
108 return os;
109 }
110
111 std::string Serialize() const
112 {
113 std::stringstream ss;
114 ss << "u_" << this->value;
115 return ss.str();
116 }
117};
118
119/**
120 * \brief Whether the device is Pro licensed
121 */
123{
124public:
125 int value;
126
127 static constexpr int NotLicensed = 0;
128 static constexpr int Licensed = 1;
129
130 constexpr IsPROLicensedValue(int value) :
131 value{value}
132 {}
133
134 constexpr IsPROLicensedValue() :
135 value{-1}
136 {}
137
138 constexpr bool operator==(IsPROLicensedValue data) const
139 {
140 return this->value == data.value;
141 }
142 constexpr bool operator==(int data) const
143 {
144 return this->value == data;
145 }
146 constexpr bool operator!=(IsPROLicensedValue data) const
147 {
148 return this->value != data.value;
149 }
150 constexpr bool operator!=(int data) const
151 {
152 return this->value != data;
153 }
154 constexpr bool operator<(IsPROLicensedValue data) const
155 {
156 return this->value < data.value;
157 }
158 constexpr bool operator<(int data) const
159 {
160 return this->value < data;
161 }
162
163 /**
164 * \brief Gets the string representation of this enum
165 *
166 * \returns String representation of this enum
167 */
168 std::string ToString() const
169 {
170 switch (value)
171 {
172 case IsPROLicensedValue::NotLicensed: return "Not Licensed";
173 case IsPROLicensedValue::Licensed: return "Licensed";
174 default: return "Invalid Value";
175 }
176 }
177
178 friend std::ostream& operator<<(std::ostream &os, IsPROLicensedValue data)
179 {
180 os << data.ToString();
181 return os;
182 }
183
184 std::string Serialize() const
185 {
186 std::stringstream ss;
187 ss << "u_" << this->value;
188 return ss.str();
189 }
190};
191
192/**
193 * \brief Whether the device is Season Pass licensed
194 */
196{
197public:
198 int value;
199
200 static constexpr int NotLicensed = 0;
201 static constexpr int Licensed = 1;
202
204 value{value}
205 {}
206
208 value{-1}
209 {}
210
211 constexpr bool operator==(Licensing_IsSeasonPassedValue data) const
212 {
213 return this->value == data.value;
214 }
215 constexpr bool operator==(int data) const
216 {
217 return this->value == data;
218 }
219 constexpr bool operator!=(Licensing_IsSeasonPassedValue data) const
220 {
221 return this->value != data.value;
222 }
223 constexpr bool operator!=(int data) const
224 {
225 return this->value != data;
226 }
227 constexpr bool operator<(Licensing_IsSeasonPassedValue data) const
228 {
229 return this->value < data.value;
230 }
231 constexpr bool operator<(int data) const
232 {
233 return this->value < data;
234 }
235
236 /**
237 * \brief Gets the string representation of this enum
238 *
239 * \returns String representation of this enum
240 */
241 std::string ToString() const
242 {
243 switch (value)
244 {
245 case Licensing_IsSeasonPassedValue::NotLicensed: return "Not Licensed";
246 case Licensing_IsSeasonPassedValue::Licensed: return "Licensed";
247 default: return "Invalid Value";
248 }
249 }
250
251 friend std::ostream& operator<<(std::ostream &os, Licensing_IsSeasonPassedValue data)
252 {
253 os << data.ToString();
254 return os;
255 }
256
257 std::string Serialize() const
258 {
259 std::stringstream ss;
260 ss << "u_" << this->value;
261 return ss.str();
262 }
263};
264
265/**
266 * \brief Direction of the sensor to determine positive rotation, as seen facing
267 * the LED side of the CANcoder.
268 */
270{
271public:
272 int value;
273
274 static constexpr int CounterClockwise_Positive = 0;
275 static constexpr int Clockwise_Positive = 1;
276
278 value{value}
279 {}
280
282 value{-1}
283 {}
284
285 constexpr bool operator==(SensorDirectionValue data) const
286 {
287 return this->value == data.value;
288 }
289 constexpr bool operator==(int data) const
290 {
291 return this->value == data;
292 }
293 constexpr bool operator!=(SensorDirectionValue data) const
294 {
295 return this->value != data.value;
296 }
297 constexpr bool operator!=(int data) const
298 {
299 return this->value != data;
300 }
301 constexpr bool operator<(SensorDirectionValue data) const
302 {
303 return this->value < data.value;
304 }
305 constexpr bool operator<(int data) const
306 {
307 return this->value < data;
308 }
309
310 /**
311 * \brief Gets the string representation of this enum
312 *
313 * \returns String representation of this enum
314 */
315 std::string ToString() const
316 {
317 switch (value)
318 {
319 case SensorDirectionValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
320 case SensorDirectionValue::Clockwise_Positive: return "Clockwise_Positive";
321 default: return "Invalid Value";
322 }
323 }
324
325 friend std::ostream& operator<<(std::ostream &os, SensorDirectionValue data)
326 {
327 os << data.ToString();
328 return os;
329 }
330
331 std::string Serialize() const
332 {
333 std::stringstream ss;
334 ss << "u_" << this->value;
335 return ss.str();
336 }
337};
338
339/**
340 * \brief Whether device is locked by FRC.
341 */
343{
344public:
345 int value;
346
347 static constexpr int Frc_Locked = 1;
348 static constexpr int Frc_Unlocked = 0;
349
350 constexpr FrcLockValue(int value) :
351 value{value}
352 {}
353
354 constexpr FrcLockValue() :
355 value{-1}
356 {}
357
358 constexpr bool operator==(FrcLockValue data) const
359 {
360 return this->value == data.value;
361 }
362 constexpr bool operator==(int data) const
363 {
364 return this->value == data;
365 }
366 constexpr bool operator!=(FrcLockValue data) const
367 {
368 return this->value != data.value;
369 }
370 constexpr bool operator!=(int data) const
371 {
372 return this->value != data;
373 }
374 constexpr bool operator<(FrcLockValue data) const
375 {
376 return this->value < data.value;
377 }
378 constexpr bool operator<(int data) const
379 {
380 return this->value < data;
381 }
382
383 /**
384 * \brief Gets the string representation of this enum
385 *
386 * \returns String representation of this enum
387 */
388 std::string ToString() const
389 {
390 switch (value)
391 {
392 case FrcLockValue::Frc_Locked: return "Frc_Locked";
393 case FrcLockValue::Frc_Unlocked: return "Frc_Unlocked";
394 default: return "Invalid Value";
395 }
396 }
397
398 friend std::ostream& operator<<(std::ostream &os, FrcLockValue data)
399 {
400 os << data.ToString();
401 return os;
402 }
403
404 std::string Serialize() const
405 {
406 std::stringstream ss;
407 ss << "u_" << this->value;
408 return ss.str();
409 }
410};
411
412/**
413 * \brief Whether the robot is enabled.
414 */
416{
417public:
418 int value;
419
420 static constexpr int Enabled = 1;
421 static constexpr int Disabled = 0;
422
423 constexpr RobotEnableValue(int value) :
424 value{value}
425 {}
426
427 constexpr RobotEnableValue() :
428 value{-1}
429 {}
430
431 constexpr bool operator==(RobotEnableValue data) const
432 {
433 return this->value == data.value;
434 }
435 constexpr bool operator==(int data) const
436 {
437 return this->value == data;
438 }
439 constexpr bool operator!=(RobotEnableValue data) const
440 {
441 return this->value != data.value;
442 }
443 constexpr bool operator!=(int data) const
444 {
445 return this->value != data;
446 }
447 constexpr bool operator<(RobotEnableValue data) const
448 {
449 return this->value < data.value;
450 }
451 constexpr bool operator<(int data) const
452 {
453 return this->value < data;
454 }
455
456 /**
457 * \brief Gets the string representation of this enum
458 *
459 * \returns String representation of this enum
460 */
461 std::string ToString() const
462 {
463 switch (value)
464 {
465 case RobotEnableValue::Enabled: return "Enabled";
466 case RobotEnableValue::Disabled: return "Disabled";
467 default: return "Invalid Value";
468 }
469 }
470
471 friend std::ostream& operator<<(std::ostream &os, RobotEnableValue data)
472 {
473 os << data.ToString();
474 return os;
475 }
476
477 std::string Serialize() const
478 {
479 std::stringstream ss;
480 ss << "u_" << this->value;
481 return ss.str();
482 }
483};
484
485/**
486 * \brief The Color of LED1 when it's "On".
487 */
489{
490public:
491 int value;
492
493 static constexpr int Off = 0;
494 static constexpr int Red = 1;
495 static constexpr int Green = 2;
496 static constexpr int Orange = 3;
497 static constexpr int Blue = 4;
498 static constexpr int Pink = 5;
499 static constexpr int Cyan = 6;
500 static constexpr int White = 7;
501
502 constexpr Led1OnColorValue(int value) :
503 value{value}
504 {}
505
506 constexpr Led1OnColorValue() :
507 value{-1}
508 {}
509
510 constexpr bool operator==(Led1OnColorValue data) const
511 {
512 return this->value == data.value;
513 }
514 constexpr bool operator==(int data) const
515 {
516 return this->value == data;
517 }
518 constexpr bool operator!=(Led1OnColorValue data) const
519 {
520 return this->value != data.value;
521 }
522 constexpr bool operator!=(int data) const
523 {
524 return this->value != data;
525 }
526 constexpr bool operator<(Led1OnColorValue data) const
527 {
528 return this->value < data.value;
529 }
530 constexpr bool operator<(int data) const
531 {
532 return this->value < data;
533 }
534
535 /**
536 * \brief Gets the string representation of this enum
537 *
538 * \returns String representation of this enum
539 */
540 std::string ToString() const
541 {
542 switch (value)
543 {
544 case Led1OnColorValue::Off: return "Off";
545 case Led1OnColorValue::Red: return "Red";
546 case Led1OnColorValue::Green: return "Green";
547 case Led1OnColorValue::Orange: return "Orange";
548 case Led1OnColorValue::Blue: return "Blue";
549 case Led1OnColorValue::Pink: return "Pink";
550 case Led1OnColorValue::Cyan: return "Cyan";
551 case Led1OnColorValue::White: return "White";
552 default: return "Invalid Value";
553 }
554 }
555
556 friend std::ostream& operator<<(std::ostream &os, Led1OnColorValue data)
557 {
558 os << data.ToString();
559 return os;
560 }
561
562 std::string Serialize() const
563 {
564 std::stringstream ss;
565 ss << "u_" << this->value;
566 return ss.str();
567 }
568};
569
570/**
571 * \brief The Color of LED1 when it's "Off".
572 */
574{
575public:
576 int value;
577
578 static constexpr int Off = 0;
579 static constexpr int Red = 1;
580 static constexpr int Green = 2;
581 static constexpr int Orange = 3;
582 static constexpr int Blue = 4;
583 static constexpr int Pink = 5;
584 static constexpr int Cyan = 6;
585 static constexpr int White = 7;
586
587 constexpr Led1OffColorValue(int value) :
588 value{value}
589 {}
590
591 constexpr Led1OffColorValue() :
592 value{-1}
593 {}
594
595 constexpr bool operator==(Led1OffColorValue data) const
596 {
597 return this->value == data.value;
598 }
599 constexpr bool operator==(int data) const
600 {
601 return this->value == data;
602 }
603 constexpr bool operator!=(Led1OffColorValue data) const
604 {
605 return this->value != data.value;
606 }
607 constexpr bool operator!=(int data) const
608 {
609 return this->value != data;
610 }
611 constexpr bool operator<(Led1OffColorValue data) const
612 {
613 return this->value < data.value;
614 }
615 constexpr bool operator<(int data) const
616 {
617 return this->value < data;
618 }
619
620 /**
621 * \brief Gets the string representation of this enum
622 *
623 * \returns String representation of this enum
624 */
625 std::string ToString() const
626 {
627 switch (value)
628 {
629 case Led1OffColorValue::Off: return "Off";
630 case Led1OffColorValue::Red: return "Red";
631 case Led1OffColorValue::Green: return "Green";
632 case Led1OffColorValue::Orange: return "Orange";
633 case Led1OffColorValue::Blue: return "Blue";
634 case Led1OffColorValue::Pink: return "Pink";
635 case Led1OffColorValue::Cyan: return "Cyan";
636 case Led1OffColorValue::White: return "White";
637 default: return "Invalid Value";
638 }
639 }
640
641 friend std::ostream& operator<<(std::ostream &os, Led1OffColorValue data)
642 {
643 os << data.ToString();
644 return os;
645 }
646
647 std::string Serialize() const
648 {
649 std::stringstream ss;
650 ss << "u_" << this->value;
651 return ss.str();
652 }
653};
654
655/**
656 * \brief The Color of LED2 when it's "On".
657 */
659{
660public:
661 int value;
662
663 static constexpr int Off = 0;
664 static constexpr int Red = 1;
665 static constexpr int Green = 2;
666 static constexpr int Orange = 3;
667 static constexpr int Blue = 4;
668 static constexpr int Pink = 5;
669 static constexpr int Cyan = 6;
670 static constexpr int White = 7;
671
672 constexpr Led2OnColorValue(int value) :
673 value{value}
674 {}
675
676 constexpr Led2OnColorValue() :
677 value{-1}
678 {}
679
680 constexpr bool operator==(Led2OnColorValue data) const
681 {
682 return this->value == data.value;
683 }
684 constexpr bool operator==(int data) const
685 {
686 return this->value == data;
687 }
688 constexpr bool operator!=(Led2OnColorValue data) const
689 {
690 return this->value != data.value;
691 }
692 constexpr bool operator!=(int data) const
693 {
694 return this->value != data;
695 }
696 constexpr bool operator<(Led2OnColorValue data) const
697 {
698 return this->value < data.value;
699 }
700 constexpr bool operator<(int data) const
701 {
702 return this->value < data;
703 }
704
705 /**
706 * \brief Gets the string representation of this enum
707 *
708 * \returns String representation of this enum
709 */
710 std::string ToString() const
711 {
712 switch (value)
713 {
714 case Led2OnColorValue::Off: return "Off";
715 case Led2OnColorValue::Red: return "Red";
716 case Led2OnColorValue::Green: return "Green";
717 case Led2OnColorValue::Orange: return "Orange";
718 case Led2OnColorValue::Blue: return "Blue";
719 case Led2OnColorValue::Pink: return "Pink";
720 case Led2OnColorValue::Cyan: return "Cyan";
721 case Led2OnColorValue::White: return "White";
722 default: return "Invalid Value";
723 }
724 }
725
726 friend std::ostream& operator<<(std::ostream &os, Led2OnColorValue data)
727 {
728 os << data.ToString();
729 return os;
730 }
731
732 std::string Serialize() const
733 {
734 std::stringstream ss;
735 ss << "u_" << this->value;
736 return ss.str();
737 }
738};
739
740/**
741 * \brief The Color of LED2 when it's "Off".
742 */
744{
745public:
746 int value;
747
748 static constexpr int Off = 0;
749 static constexpr int Red = 1;
750 static constexpr int Green = 2;
751 static constexpr int Orange = 3;
752 static constexpr int Blue = 4;
753 static constexpr int Pink = 5;
754 static constexpr int Cyan = 6;
755 static constexpr int White = 7;
756
757 constexpr Led2OffColorValue(int value) :
758 value{value}
759 {}
760
761 constexpr Led2OffColorValue() :
762 value{-1}
763 {}
764
765 constexpr bool operator==(Led2OffColorValue data) const
766 {
767 return this->value == data.value;
768 }
769 constexpr bool operator==(int data) const
770 {
771 return this->value == data;
772 }
773 constexpr bool operator!=(Led2OffColorValue data) const
774 {
775 return this->value != data.value;
776 }
777 constexpr bool operator!=(int data) const
778 {
779 return this->value != data;
780 }
781 constexpr bool operator<(Led2OffColorValue data) const
782 {
783 return this->value < data.value;
784 }
785 constexpr bool operator<(int data) const
786 {
787 return this->value < data;
788 }
789
790 /**
791 * \brief Gets the string representation of this enum
792 *
793 * \returns String representation of this enum
794 */
795 std::string ToString() const
796 {
797 switch (value)
798 {
799 case Led2OffColorValue::Off: return "Off";
800 case Led2OffColorValue::Red: return "Red";
801 case Led2OffColorValue::Green: return "Green";
802 case Led2OffColorValue::Orange: return "Orange";
803 case Led2OffColorValue::Blue: return "Blue";
804 case Led2OffColorValue::Pink: return "Pink";
805 case Led2OffColorValue::Cyan: return "Cyan";
806 case Led2OffColorValue::White: return "White";
807 default: return "Invalid Value";
808 }
809 }
810
811 friend std::ostream& operator<<(std::ostream &os, Led2OffColorValue data)
812 {
813 os << data.ToString();
814 return os;
815 }
816
817 std::string Serialize() const
818 {
819 std::stringstream ss;
820 ss << "u_" << this->value;
821 return ss.str();
822 }
823};
824
825/**
826 * \brief The range of the absolute sensor in rotations, either [-0.5, 0.5) or
827 * [0, 1).
828 */
830{
831public:
832 int value;
833
834 static constexpr int Unsigned_0To1 = 0;
835 static constexpr int Signed_PlusMinusHalf = 1;
836
838 value{value}
839 {}
840
842 value{-1}
843 {}
844
845 constexpr bool operator==(AbsoluteSensorRangeValue data) const
846 {
847 return this->value == data.value;
848 }
849 constexpr bool operator==(int data) const
850 {
851 return this->value == data;
852 }
853 constexpr bool operator!=(AbsoluteSensorRangeValue data) const
854 {
855 return this->value != data.value;
856 }
857 constexpr bool operator!=(int data) const
858 {
859 return this->value != data;
860 }
861 constexpr bool operator<(AbsoluteSensorRangeValue data) const
862 {
863 return this->value < data.value;
864 }
865 constexpr bool operator<(int data) const
866 {
867 return this->value < data;
868 }
869
870 /**
871 * \brief Gets the string representation of this enum
872 *
873 * \returns String representation of this enum
874 */
875 std::string ToString() const
876 {
877 switch (value)
878 {
879 case AbsoluteSensorRangeValue::Unsigned_0To1: return "Unsigned_0To1";
880 case AbsoluteSensorRangeValue::Signed_PlusMinusHalf: return "Signed_PlusMinusHalf";
881 default: return "Invalid Value";
882 }
883 }
884
885 friend std::ostream& operator<<(std::ostream &os, AbsoluteSensorRangeValue data)
886 {
887 os << data.ToString();
888 return os;
889 }
890
891 std::string Serialize() const
892 {
893 std::stringstream ss;
894 ss << "u_" << this->value;
895 return ss.str();
896 }
897};
898
899/**
900 * \brief Whether the device is enabled.
901 */
903{
904public:
905 int value;
906
907 static constexpr int Enabled = 1;
908 static constexpr int Disabled = 0;
909
910 constexpr DeviceEnableValue(int value) :
911 value{value}
912 {}
913
914 constexpr DeviceEnableValue() :
915 value{-1}
916 {}
917
918 constexpr bool operator==(DeviceEnableValue data) const
919 {
920 return this->value == data.value;
921 }
922 constexpr bool operator==(int data) const
923 {
924 return this->value == data;
925 }
926 constexpr bool operator!=(DeviceEnableValue data) const
927 {
928 return this->value != data.value;
929 }
930 constexpr bool operator!=(int data) const
931 {
932 return this->value != data;
933 }
934 constexpr bool operator<(DeviceEnableValue data) const
935 {
936 return this->value < data.value;
937 }
938 constexpr bool operator<(int data) const
939 {
940 return this->value < data;
941 }
942
943 /**
944 * \brief Gets the string representation of this enum
945 *
946 * \returns String representation of this enum
947 */
948 std::string ToString() const
949 {
950 switch (value)
951 {
952 case DeviceEnableValue::Enabled: return "Enabled";
953 case DeviceEnableValue::Disabled: return "Disabled";
954 default: return "Invalid Value";
955 }
956 }
957
958 friend std::ostream& operator<<(std::ostream &os, DeviceEnableValue data)
959 {
960 os << data.ToString();
961 return os;
962 }
963
964 std::string Serialize() const
965 {
966 std::stringstream ss;
967 ss << "u_" << this->value;
968 return ss.str();
969 }
970};
971
972/**
973 * \brief Forward Limit Pin.
974 */
976{
977public:
978 int value;
979
980 static constexpr int ClosedToGround = 0;
981 static constexpr int Open = 1;
982
983 constexpr ForwardLimitValue(int value) :
984 value{value}
985 {}
986
987 constexpr ForwardLimitValue() :
988 value{-1}
989 {}
990
991 constexpr bool operator==(ForwardLimitValue data) const
992 {
993 return this->value == data.value;
994 }
995 constexpr bool operator==(int data) const
996 {
997 return this->value == data;
998 }
999 constexpr bool operator!=(ForwardLimitValue data) const
1000 {
1001 return this->value != data.value;
1002 }
1003 constexpr bool operator!=(int data) const
1004 {
1005 return this->value != data;
1006 }
1007 constexpr bool operator<(ForwardLimitValue data) const
1008 {
1009 return this->value < data.value;
1010 }
1011 constexpr bool operator<(int data) const
1012 {
1013 return this->value < data;
1014 }
1015
1016 /**
1017 * \brief Gets the string representation of this enum
1018 *
1019 * \returns String representation of this enum
1020 */
1021 std::string ToString() const
1022 {
1023 switch (value)
1024 {
1025 case ForwardLimitValue::ClosedToGround: return "Closed To Ground";
1026 case ForwardLimitValue::Open: return "Open";
1027 default: return "Invalid Value";
1028 }
1029 }
1030
1031 friend std::ostream& operator<<(std::ostream &os, ForwardLimitValue data)
1032 {
1033 os << data.ToString();
1034 return os;
1035 }
1036
1037 std::string Serialize() const
1038 {
1039 std::stringstream ss;
1040 ss << "u_" << this->value;
1041 return ss.str();
1042 }
1043};
1044
1045/**
1046 * \brief Reverse Limit Pin.
1047 */
1049{
1050public:
1052
1053 static constexpr int ClosedToGround = 0;
1054 static constexpr int Open = 1;
1055
1056 constexpr ReverseLimitValue(int value) :
1057 value{value}
1058 {}
1059
1060 constexpr ReverseLimitValue() :
1061 value{-1}
1062 {}
1063
1064 constexpr bool operator==(ReverseLimitValue data) const
1065 {
1066 return this->value == data.value;
1067 }
1068 constexpr bool operator==(int data) const
1069 {
1070 return this->value == data;
1071 }
1072 constexpr bool operator!=(ReverseLimitValue data) const
1073 {
1074 return this->value != data.value;
1075 }
1076 constexpr bool operator!=(int data) const
1077 {
1078 return this->value != data;
1079 }
1080 constexpr bool operator<(ReverseLimitValue data) const
1081 {
1082 return this->value < data.value;
1083 }
1084 constexpr bool operator<(int data) const
1085 {
1086 return this->value < data;
1087 }
1088
1089 /**
1090 * \brief Gets the string representation of this enum
1091 *
1092 * \returns String representation of this enum
1093 */
1094 std::string ToString() const
1095 {
1096 switch (value)
1097 {
1098 case ReverseLimitValue::ClosedToGround: return "Closed To Ground";
1099 case ReverseLimitValue::Open: return "Open";
1100 default: return "Invalid Value";
1101 }
1102 }
1103
1104 friend std::ostream& operator<<(std::ostream &os, ReverseLimitValue data)
1105 {
1106 os << data.ToString();
1107 return os;
1108 }
1109
1110 std::string Serialize() const
1111 {
1112 std::stringstream ss;
1113 ss << "u_" << this->value;
1114 return ss.str();
1115 }
1116};
1117
1118/**
1119 * \brief The applied rotor polarity as seen from the front of the motor. This
1120 * typically is determined by the Inverted config, but can be overridden
1121 * if using Follower features.
1122 */
1124{
1125public:
1127
1128 static constexpr int PositiveIsCounterClockwise = 0;
1129 static constexpr int PositiveIsClockwise = 1;
1130
1132 value{value}
1133 {}
1134
1136 value{-1}
1137 {}
1138
1139 constexpr bool operator==(AppliedRotorPolarityValue data) const
1140 {
1141 return this->value == data.value;
1142 }
1143 constexpr bool operator==(int data) const
1144 {
1145 return this->value == data;
1146 }
1147 constexpr bool operator!=(AppliedRotorPolarityValue data) const
1148 {
1149 return this->value != data.value;
1150 }
1151 constexpr bool operator!=(int data) const
1152 {
1153 return this->value != data;
1154 }
1155 constexpr bool operator<(AppliedRotorPolarityValue data) const
1156 {
1157 return this->value < data.value;
1158 }
1159 constexpr bool operator<(int data) const
1160 {
1161 return this->value < data;
1162 }
1163
1164 /**
1165 * \brief Gets the string representation of this enum
1166 *
1167 * \returns String representation of this enum
1168 */
1169 std::string ToString() const
1170 {
1171 switch (value)
1172 {
1173 case AppliedRotorPolarityValue::PositiveIsCounterClockwise: return "PositiveIsCounterClockwise";
1174 case AppliedRotorPolarityValue::PositiveIsClockwise: return "PositiveIsClockwise";
1175 default: return "Invalid Value";
1176 }
1177 }
1178
1179 friend std::ostream& operator<<(std::ostream &os, AppliedRotorPolarityValue data)
1180 {
1181 os << data.ToString();
1182 return os;
1183 }
1184
1185 std::string Serialize() const
1186 {
1187 std::stringstream ss;
1188 ss << "u_" << this->value;
1189 return ss.str();
1190 }
1191};
1192
1193/**
1194 * \brief The active control mode of the motor controller
1195 */
1197{
1198public:
1200
1201 static constexpr int DisabledOutput = 0;
1202 static constexpr int NeutralOut = 1;
1203 static constexpr int StaticBrake = 2;
1204 static constexpr int DutyCycleOut = 3;
1205 static constexpr int PositionDutyCycle = 4;
1206 static constexpr int VelocityDutyCycle = 5;
1207 static constexpr int MotionMagicDutyCycle = 6;
1208 static constexpr int DutyCycleFOC = 7;
1209 static constexpr int PositionDutyCycleFOC = 8;
1210 static constexpr int VelocityDutyCycleFOC = 9;
1211 static constexpr int MotionMagicDutyCycleFOC = 10;
1212 static constexpr int VoltageOut = 11;
1213 static constexpr int PositionVoltage = 12;
1214 static constexpr int VelocityVoltage = 13;
1215 static constexpr int MotionMagicVoltage = 14;
1216 static constexpr int VoltageFOC = 15;
1217 static constexpr int PositionVoltageFOC = 16;
1218 static constexpr int VelocityVoltageFOC = 17;
1219 static constexpr int MotionMagicVoltageFOC = 18;
1220 static constexpr int TorqueCurrentFOC = 19;
1221 static constexpr int PositionTorqueCurrentFOC = 20;
1222 static constexpr int VelocityTorqueCurrentFOC = 21;
1223 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1224 static constexpr int Follower = 23;
1225 static constexpr int Reserved = 24;
1226 static constexpr int CoastOut = 25;
1227 static constexpr int UnauthorizedDevice = 26;
1228 static constexpr int MusicTone = 27;
1229 static constexpr int MotionMagicVelocityDutyCycle = 28;
1230 static constexpr int MotionMagicVelocityDutyCycleFOC = 29;
1231 static constexpr int MotionMagicVelocityVoltage = 30;
1232 static constexpr int MotionMagicVelocityVoltageFOC = 31;
1233 static constexpr int MotionMagicVelocityTorqueCurrentFOC = 32;
1234 static constexpr int MotionMagicExpoDutyCycle = 33;
1235 static constexpr int MotionMagicExpoDutyCycleFOC = 34;
1236 static constexpr int MotionMagicExpoVoltage = 35;
1237 static constexpr int MotionMagicExpoVoltageFOC = 36;
1238 static constexpr int MotionMagicExpoTorqueCurrentFOC = 37;
1239
1240 constexpr ControlModeValue(int value) :
1241 value{value}
1242 {}
1243
1244 constexpr ControlModeValue() :
1245 value{-1}
1246 {}
1247
1248 constexpr bool operator==(ControlModeValue data) const
1249 {
1250 return this->value == data.value;
1251 }
1252 constexpr bool operator==(int data) const
1253 {
1254 return this->value == data;
1255 }
1256 constexpr bool operator!=(ControlModeValue data) const
1257 {
1258 return this->value != data.value;
1259 }
1260 constexpr bool operator!=(int data) const
1261 {
1262 return this->value != data;
1263 }
1264 constexpr bool operator<(ControlModeValue data) const
1265 {
1266 return this->value < data.value;
1267 }
1268 constexpr bool operator<(int data) const
1269 {
1270 return this->value < data;
1271 }
1272
1273 /**
1274 * \brief Gets the string representation of this enum
1275 *
1276 * \returns String representation of this enum
1277 */
1278 std::string ToString() const
1279 {
1280 switch (value)
1281 {
1282 case ControlModeValue::DisabledOutput: return "DisabledOutput";
1283 case ControlModeValue::NeutralOut: return "NeutralOut";
1284 case ControlModeValue::StaticBrake: return "StaticBrake";
1285 case ControlModeValue::DutyCycleOut: return "DutyCycleOut";
1286 case ControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1287 case ControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1288 case ControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1289 case ControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1290 case ControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1291 case ControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1292 case ControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1293 case ControlModeValue::VoltageOut: return "VoltageOut";
1294 case ControlModeValue::PositionVoltage: return "PositionVoltage";
1295 case ControlModeValue::VelocityVoltage: return "VelocityVoltage";
1296 case ControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1297 case ControlModeValue::VoltageFOC: return "VoltageFOC";
1298 case ControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1299 case ControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1300 case ControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1301 case ControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1302 case ControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1303 case ControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1304 case ControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1305 case ControlModeValue::Follower: return "Follower";
1306 case ControlModeValue::Reserved: return "Reserved";
1307 case ControlModeValue::CoastOut: return "CoastOut";
1308 case ControlModeValue::UnauthorizedDevice: return "UnauthorizedDevice";
1309 case ControlModeValue::MusicTone: return "MusicTone";
1310 case ControlModeValue::MotionMagicVelocityDutyCycle: return "MotionMagicVelocityDutyCycle";
1311 case ControlModeValue::MotionMagicVelocityDutyCycleFOC: return "MotionMagicVelocityDutyCycleFOC";
1312 case ControlModeValue::MotionMagicVelocityVoltage: return "MotionMagicVelocityVoltage";
1313 case ControlModeValue::MotionMagicVelocityVoltageFOC: return "MotionMagicVelocityVoltageFOC";
1314 case ControlModeValue::MotionMagicVelocityTorqueCurrentFOC: return "MotionMagicVelocityTorqueCurrentFOC";
1315 case ControlModeValue::MotionMagicExpoDutyCycle: return "MotionMagicExpoDutyCycle";
1316 case ControlModeValue::MotionMagicExpoDutyCycleFOC: return "MotionMagicExpoDutyCycleFOC";
1317 case ControlModeValue::MotionMagicExpoVoltage: return "MotionMagicExpoVoltage";
1318 case ControlModeValue::MotionMagicExpoVoltageFOC: return "MotionMagicExpoVoltageFOC";
1319 case ControlModeValue::MotionMagicExpoTorqueCurrentFOC: return "MotionMagicExpoTorqueCurrentFOC";
1320 default: return "Invalid Value";
1321 }
1322 }
1323
1324 friend std::ostream& operator<<(std::ostream &os, ControlModeValue data)
1325 {
1326 os << data.ToString();
1327 return os;
1328 }
1329
1330 std::string Serialize() const
1331 {
1332 std::stringstream ss;
1333 ss << "u_" << this->value;
1334 return ss.str();
1335 }
1336};
1337
1338/**
1339 * \brief Check if Motion Magic® is running. This is equivalent to checking
1340 * that the reported control mode is a Motion Magic® based mode.
1341 */
1343{
1344public:
1346
1347 static constexpr int Enabled = 1;
1348 static constexpr int Disabled = 0;
1349
1351 value{value}
1352 {}
1353
1355 value{-1}
1356 {}
1357
1358 constexpr bool operator==(MotionMagicIsRunningValue data) const
1359 {
1360 return this->value == data.value;
1361 }
1362 constexpr bool operator==(int data) const
1363 {
1364 return this->value == data;
1365 }
1366 constexpr bool operator!=(MotionMagicIsRunningValue data) const
1367 {
1368 return this->value != data.value;
1369 }
1370 constexpr bool operator!=(int data) const
1371 {
1372 return this->value != data;
1373 }
1374 constexpr bool operator<(MotionMagicIsRunningValue data) const
1375 {
1376 return this->value < data.value;
1377 }
1378 constexpr bool operator<(int data) const
1379 {
1380 return this->value < data;
1381 }
1382
1383 /**
1384 * \brief Gets the string representation of this enum
1385 *
1386 * \returns String representation of this enum
1387 */
1388 std::string ToString() const
1389 {
1390 switch (value)
1391 {
1392 case MotionMagicIsRunningValue::Enabled: return "Enabled";
1393 case MotionMagicIsRunningValue::Disabled: return "Disabled";
1394 default: return "Invalid Value";
1395 }
1396 }
1397
1398 friend std::ostream& operator<<(std::ostream &os, MotionMagicIsRunningValue data)
1399 {
1400 os << data.ToString();
1401 return os;
1402 }
1403
1404 std::string Serialize() const
1405 {
1406 std::stringstream ss;
1407 ss << "u_" << this->value;
1408 return ss.str();
1409 }
1410};
1411
1412/**
1413 * \brief The active control mode of the differential controller
1414 */
1416{
1417public:
1419
1420 static constexpr int DisabledOutput = 0;
1421 static constexpr int NeutralOut = 1;
1422 static constexpr int StaticBrake = 2;
1423 static constexpr int DutyCycleOut = 3;
1424 static constexpr int PositionDutyCycle = 4;
1425 static constexpr int VelocityDutyCycle = 5;
1426 static constexpr int MotionMagicDutyCycle = 6;
1427 static constexpr int DutyCycleFOC = 7;
1428 static constexpr int PositionDutyCycleFOC = 8;
1429 static constexpr int VelocityDutyCycleFOC = 9;
1430 static constexpr int MotionMagicDutyCycleFOC = 10;
1431 static constexpr int VoltageOut = 11;
1432 static constexpr int PositionVoltage = 12;
1433 static constexpr int VelocityVoltage = 13;
1434 static constexpr int MotionMagicVoltage = 14;
1435 static constexpr int VoltageFOC = 15;
1436 static constexpr int PositionVoltageFOC = 16;
1437 static constexpr int VelocityVoltageFOC = 17;
1438 static constexpr int MotionMagicVoltageFOC = 18;
1439 static constexpr int TorqueCurrentFOC = 19;
1440 static constexpr int PositionTorqueCurrentFOC = 20;
1441 static constexpr int VelocityTorqueCurrentFOC = 21;
1442 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1443 static constexpr int Follower = 23;
1444 static constexpr int Reserved = 24;
1445 static constexpr int CoastOut = 25;
1446
1448 value{value}
1449 {}
1450
1452 value{-1}
1453 {}
1454
1455 constexpr bool operator==(DifferentialControlModeValue data) const
1456 {
1457 return this->value == data.value;
1458 }
1459 constexpr bool operator==(int data) const
1460 {
1461 return this->value == data;
1462 }
1463 constexpr bool operator!=(DifferentialControlModeValue data) const
1464 {
1465 return this->value != data.value;
1466 }
1467 constexpr bool operator!=(int data) const
1468 {
1469 return this->value != data;
1470 }
1471 constexpr bool operator<(DifferentialControlModeValue data) const
1472 {
1473 return this->value < data.value;
1474 }
1475 constexpr bool operator<(int data) const
1476 {
1477 return this->value < data;
1478 }
1479
1480 /**
1481 * \brief Gets the string representation of this enum
1482 *
1483 * \returns String representation of this enum
1484 */
1485 std::string ToString() const
1486 {
1487 switch (value)
1488 {
1489 case DifferentialControlModeValue::DisabledOutput: return "DisabledOutput";
1490 case DifferentialControlModeValue::NeutralOut: return "NeutralOut";
1491 case DifferentialControlModeValue::StaticBrake: return "StaticBrake";
1492 case DifferentialControlModeValue::DutyCycleOut: return "DutyCycleOut";
1493 case DifferentialControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1494 case DifferentialControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1495 case DifferentialControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1496 case DifferentialControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1497 case DifferentialControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1498 case DifferentialControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1499 case DifferentialControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1500 case DifferentialControlModeValue::VoltageOut: return "VoltageOut";
1501 case DifferentialControlModeValue::PositionVoltage: return "PositionVoltage";
1502 case DifferentialControlModeValue::VelocityVoltage: return "VelocityVoltage";
1503 case DifferentialControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1504 case DifferentialControlModeValue::VoltageFOC: return "VoltageFOC";
1505 case DifferentialControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1506 case DifferentialControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1507 case DifferentialControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1508 case DifferentialControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1509 case DifferentialControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1510 case DifferentialControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1511 case DifferentialControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1512 case DifferentialControlModeValue::Follower: return "Follower";
1513 case DifferentialControlModeValue::Reserved: return "Reserved";
1514 case DifferentialControlModeValue::CoastOut: return "CoastOut";
1515 default: return "Invalid Value";
1516 }
1517 }
1518
1519 friend std::ostream& operator<<(std::ostream &os, DifferentialControlModeValue data)
1520 {
1521 os << data.ToString();
1522 return os;
1523 }
1524
1525 std::string Serialize() const
1526 {
1527 std::stringstream ss;
1528 ss << "u_" << this->value;
1529 return ss.str();
1530 }
1531};
1532
1533/**
1534 * \brief Gravity Feedforward/Feedback Type
1535 *
1536 * \details This determines the type of the gravity feedforward/feedback.
1537 *
1538 * Choose Elevator_Static for systems where the gravity feedforward is
1539 * constant, such as an elevator. The gravity feedforward output will
1540 * always have the same sign.
1541 *
1542 * Choose Arm_Cosine for systems where the gravity feedback is
1543 * dependent on the angular position of the mechanism, such as an arm.
1544 * The gravity feedback output will vary depending on the mechanism
1545 * angular position. Note that the sensor offset and ratios must be
1546 * configured so that the sensor reports a position of 0 when the
1547 * mechanism is horizonal (parallel to the ground), and the reported
1548 * sensor position is 1:1 with the mechanism.
1549 */
1551{
1552public:
1554
1555 static constexpr int Elevator_Static = 0;
1556 static constexpr int Arm_Cosine = 1;
1557
1558 constexpr GravityTypeValue(int value) :
1559 value{value}
1560 {}
1561
1562 constexpr GravityTypeValue() :
1563 value{-1}
1564 {}
1565
1566 constexpr bool operator==(GravityTypeValue data) const
1567 {
1568 return this->value == data.value;
1569 }
1570 constexpr bool operator==(int data) const
1571 {
1572 return this->value == data;
1573 }
1574 constexpr bool operator!=(GravityTypeValue data) const
1575 {
1576 return this->value != data.value;
1577 }
1578 constexpr bool operator!=(int data) const
1579 {
1580 return this->value != data;
1581 }
1582 constexpr bool operator<(GravityTypeValue data) const
1583 {
1584 return this->value < data.value;
1585 }
1586 constexpr bool operator<(int data) const
1587 {
1588 return this->value < data;
1589 }
1590
1591 /**
1592 * \brief Gets the string representation of this enum
1593 *
1594 * \returns String representation of this enum
1595 */
1596 std::string ToString() const
1597 {
1598 switch (value)
1599 {
1600 case GravityTypeValue::Elevator_Static: return "Elevator_Static";
1601 case GravityTypeValue::Arm_Cosine: return "Arm_Cosine";
1602 default: return "Invalid Value";
1603 }
1604 }
1605
1606 friend std::ostream& operator<<(std::ostream &os, GravityTypeValue data)
1607 {
1608 os << data.ToString();
1609 return os;
1610 }
1611
1612 std::string Serialize() const
1613 {
1614 std::stringstream ss;
1615 ss << "u_" << this->value;
1616 return ss.str();
1617 }
1618};
1619
1620/**
1621 * \brief Invert state of the device as seen from the front of the motor.
1622 */
1624{
1625public:
1627
1628 static constexpr int CounterClockwise_Positive = 0;
1629 static constexpr int Clockwise_Positive = 1;
1630
1631 constexpr InvertedValue(int value) :
1632 value{value}
1633 {}
1634
1635 constexpr InvertedValue() :
1636 value{-1}
1637 {}
1638
1639 constexpr bool operator==(InvertedValue data) const
1640 {
1641 return this->value == data.value;
1642 }
1643 constexpr bool operator==(int data) const
1644 {
1645 return this->value == data;
1646 }
1647 constexpr bool operator!=(InvertedValue data) const
1648 {
1649 return this->value != data.value;
1650 }
1651 constexpr bool operator!=(int data) const
1652 {
1653 return this->value != data;
1654 }
1655 constexpr bool operator<(InvertedValue data) const
1656 {
1657 return this->value < data.value;
1658 }
1659 constexpr bool operator<(int data) const
1660 {
1661 return this->value < data;
1662 }
1663
1664 /**
1665 * \brief Gets the string representation of this enum
1666 *
1667 * \returns String representation of this enum
1668 */
1669 std::string ToString() const
1670 {
1671 switch (value)
1672 {
1673 case InvertedValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
1674 case InvertedValue::Clockwise_Positive: return "Clockwise_Positive";
1675 default: return "Invalid Value";
1676 }
1677 }
1678
1679 friend std::ostream& operator<<(std::ostream &os, InvertedValue data)
1680 {
1681 os << data.ToString();
1682 return os;
1683 }
1684
1685 std::string Serialize() const
1686 {
1687 std::stringstream ss;
1688 ss << "u_" << this->value;
1689 return ss.str();
1690 }
1691};
1692
1693/**
1694 * \brief The state of the motor controller bridge when output is neutral or
1695 * disabled.
1696 */
1698{
1699public:
1701
1702 static constexpr int Coast = 0;
1703 static constexpr int Brake = 1;
1704
1705 constexpr NeutralModeValue(int value) :
1706 value{value}
1707 {}
1708
1709 constexpr NeutralModeValue() :
1710 value{-1}
1711 {}
1712
1713 constexpr bool operator==(NeutralModeValue data) const
1714 {
1715 return this->value == data.value;
1716 }
1717 constexpr bool operator==(int data) const
1718 {
1719 return this->value == data;
1720 }
1721 constexpr bool operator!=(NeutralModeValue data) const
1722 {
1723 return this->value != data.value;
1724 }
1725 constexpr bool operator!=(int data) const
1726 {
1727 return this->value != data;
1728 }
1729 constexpr bool operator<(NeutralModeValue data) const
1730 {
1731 return this->value < data.value;
1732 }
1733 constexpr bool operator<(int data) const
1734 {
1735 return this->value < data;
1736 }
1737
1738 /**
1739 * \brief Gets the string representation of this enum
1740 *
1741 * \returns String representation of this enum
1742 */
1743 std::string ToString() const
1744 {
1745 switch (value)
1746 {
1747 case NeutralModeValue::Coast: return "Coast";
1748 case NeutralModeValue::Brake: return "Brake";
1749 default: return "Invalid Value";
1750 }
1751 }
1752
1753 friend std::ostream& operator<<(std::ostream &os, NeutralModeValue data)
1754 {
1755 os << data.ToString();
1756 return os;
1757 }
1758
1759 std::string Serialize() const
1760 {
1761 std::stringstream ss;
1762 ss << "u_" << this->value;
1763 return ss.str();
1764 }
1765};
1766
1767/**
1768 * \brief Choose what sensor source is reported via API and used by closed-loop
1769 * and limit features. The default is RotorSensor, which uses the
1770 * internal rotor sensor in the Talon FX.
1771 *
1772 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1773 * (this also requires setting FeedbackRemoteSensorID). Talon FX will
1774 * update its position and velocity whenever CANcoder publishes its
1775 * information on CAN bus.
1776 *
1777 * Choose FusedCANcoder (requires Phoenix Pro) and Talon FX will fuse
1778 * another CANcoder's information with the internal rotor, which provides
1779 * the best possible position and velocity for accuracy and bandwidth
1780 * (this also requires setting FeedbackRemoteSensorID). FusedCANcoder
1781 * was developed for applications such as swerve-azimuth.
1782 *
1783 * Choose SyncCANcoder (requires Phoenix Pro) and Talon FX will
1784 * synchronize its internal rotor position against another CANcoder, then
1785 * continue to use the rotor sensor for closed loop control (this also
1786 * requires setting FeedbackRemoteSensorID). The TalonFX will report if
1787 * its internal position differs significantly from the reported CANcoder
1788 * position. SyncCANcoder was developed for mechanisms where there is a
1789 * risk of the CANcoder failing in such a way that it reports a position
1790 * that does not match the mechanism, such as the sensor mounting
1791 * assembly breaking off.
1792 *
1793 * Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll
1794 * to use another Pigeon2 on the same CAN bus (this also requires setting
1795 * FeedbackRemoteSensorID). Talon FX will update its position to match
1796 * the selected value whenever Pigeon2 publishes its information on CAN
1797 * bus. Note that the Talon FX position will be in rotations and not
1798 * degrees.
1799 *
1800 * \details Note: When the feedback source is changed to FusedCANcoder, the
1801 * Talon FX needs a period of time to fuse before sensor-based
1802 * (soft-limit, closed loop, etc.) features are used. This period of
1803 * time is determined by the update frequency of the CANcoder's
1804 * Position signal.
1805 */
1807{
1808public:
1810
1811 static constexpr int RotorSensor = 0;
1812 static constexpr int RemoteCANcoder = 1;
1813 static constexpr int RemotePigeon2_Yaw = 2;
1814 static constexpr int RemotePigeon2_Pitch = 3;
1815 static constexpr int RemotePigeon2_Roll = 4;
1816 static constexpr int FusedCANcoder = 5;
1817 static constexpr int SyncCANcoder = 6;
1818
1820 value{value}
1821 {}
1822
1824 value{-1}
1825 {}
1826
1827 constexpr bool operator==(FeedbackSensorSourceValue data) const
1828 {
1829 return this->value == data.value;
1830 }
1831 constexpr bool operator==(int data) const
1832 {
1833 return this->value == data;
1834 }
1835 constexpr bool operator!=(FeedbackSensorSourceValue data) const
1836 {
1837 return this->value != data.value;
1838 }
1839 constexpr bool operator!=(int data) const
1840 {
1841 return this->value != data;
1842 }
1843 constexpr bool operator<(FeedbackSensorSourceValue data) const
1844 {
1845 return this->value < data.value;
1846 }
1847 constexpr bool operator<(int data) const
1848 {
1849 return this->value < data;
1850 }
1851
1852 /**
1853 * \brief Gets the string representation of this enum
1854 *
1855 * \returns String representation of this enum
1856 */
1857 std::string ToString() const
1858 {
1859 switch (value)
1860 {
1861 case FeedbackSensorSourceValue::RotorSensor: return "RotorSensor";
1862 case FeedbackSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1863 case FeedbackSensorSourceValue::RemotePigeon2_Yaw: return "RemotePigeon2_Yaw";
1864 case FeedbackSensorSourceValue::RemotePigeon2_Pitch: return "RemotePigeon2_Pitch";
1865 case FeedbackSensorSourceValue::RemotePigeon2_Roll: return "RemotePigeon2_Roll";
1866 case FeedbackSensorSourceValue::FusedCANcoder: return "FusedCANcoder";
1867 case FeedbackSensorSourceValue::SyncCANcoder: return "SyncCANcoder";
1868 default: return "Invalid Value";
1869 }
1870 }
1871
1872 friend std::ostream& operator<<(std::ostream &os, FeedbackSensorSourceValue data)
1873 {
1874 os << data.ToString();
1875 return os;
1876 }
1877
1878 std::string Serialize() const
1879 {
1880 std::stringstream ss;
1881 ss << "u_" << this->value;
1882 return ss.str();
1883 }
1884};
1885
1886/**
1887 * \brief Determines if the forward limit switch is normally-open (default) or
1888 * normally-closed.
1889 */
1891{
1892public:
1894
1895 static constexpr int NormallyOpen = 0;
1896 static constexpr int NormallyClosed = 1;
1897
1899 value{value}
1900 {}
1901
1903 value{-1}
1904 {}
1905
1906 constexpr bool operator==(ForwardLimitTypeValue data) const
1907 {
1908 return this->value == data.value;
1909 }
1910 constexpr bool operator==(int data) const
1911 {
1912 return this->value == data;
1913 }
1914 constexpr bool operator!=(ForwardLimitTypeValue data) const
1915 {
1916 return this->value != data.value;
1917 }
1918 constexpr bool operator!=(int data) const
1919 {
1920 return this->value != data;
1921 }
1922 constexpr bool operator<(ForwardLimitTypeValue data) const
1923 {
1924 return this->value < data.value;
1925 }
1926 constexpr bool operator<(int data) const
1927 {
1928 return this->value < data;
1929 }
1930
1931 /**
1932 * \brief Gets the string representation of this enum
1933 *
1934 * \returns String representation of this enum
1935 */
1936 std::string ToString() const
1937 {
1938 switch (value)
1939 {
1940 case ForwardLimitTypeValue::NormallyOpen: return "NormallyOpen";
1941 case ForwardLimitTypeValue::NormallyClosed: return "NormallyClosed";
1942 default: return "Invalid Value";
1943 }
1944 }
1945
1946 friend std::ostream& operator<<(std::ostream &os, ForwardLimitTypeValue data)
1947 {
1948 os << data.ToString();
1949 return os;
1950 }
1951
1952 std::string Serialize() const
1953 {
1954 std::stringstream ss;
1955 ss << "u_" << this->value;
1956 return ss.str();
1957 }
1958};
1959
1960/**
1961 * \brief Determines where to poll the forward limit switch. This defaults to
1962 * the forward limit switch pin on the limit switch connector.
1963 *
1964 * Choose RemoteTalonFX to use the forward limit switch attached to
1965 * another Talon FX on the same CAN bus (this also requires setting
1966 * ForwardLimitRemoteSensorID).
1967 *
1968 * Choose RemoteCANifier to use the forward limit switch attached to
1969 * another CANifier on the same CAN bus (this also requires setting
1970 * ForwardLimitRemoteSensorID).
1971 *
1972 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1973 * (this also requires setting ForwardLimitRemoteSensorID). The forward
1974 * limit will assert when the CANcoder magnet strength changes from BAD
1975 * (red) to ADEQUATE (orange) or GOOD (green).
1976 */
1978{
1979public:
1981
1982 static constexpr int LimitSwitchPin = 0;
1983 static constexpr int RemoteTalonFX = 1;
1984 static constexpr int RemoteCANifier = 2;
1985 static constexpr int RemoteCANcoder = 4;
1986 static constexpr int Disabled = 3;
1987
1989 value{value}
1990 {}
1991
1993 value{-1}
1994 {}
1995
1996 constexpr bool operator==(ForwardLimitSourceValue data) const
1997 {
1998 return this->value == data.value;
1999 }
2000 constexpr bool operator==(int data) const
2001 {
2002 return this->value == data;
2003 }
2004 constexpr bool operator!=(ForwardLimitSourceValue data) const
2005 {
2006 return this->value != data.value;
2007 }
2008 constexpr bool operator!=(int data) const
2009 {
2010 return this->value != data;
2011 }
2012 constexpr bool operator<(ForwardLimitSourceValue data) const
2013 {
2014 return this->value < data.value;
2015 }
2016 constexpr bool operator<(int data) const
2017 {
2018 return this->value < data;
2019 }
2020
2021 /**
2022 * \brief Gets the string representation of this enum
2023 *
2024 * \returns String representation of this enum
2025 */
2026 std::string ToString() const
2027 {
2028 switch (value)
2029 {
2030 case ForwardLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
2031 case ForwardLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
2032 case ForwardLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
2033 case ForwardLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2034 case ForwardLimitSourceValue::Disabled: return "Disabled";
2035 default: return "Invalid Value";
2036 }
2037 }
2038
2039 friend std::ostream& operator<<(std::ostream &os, ForwardLimitSourceValue data)
2040 {
2041 os << data.ToString();
2042 return os;
2043 }
2044
2045 std::string Serialize() const
2046 {
2047 std::stringstream ss;
2048 ss << "u_" << this->value;
2049 return ss.str();
2050 }
2051};
2052
2053/**
2054 * \brief Determines if the reverse limit switch is normally-open (default) or
2055 * normally-closed.
2056 */
2058{
2059public:
2061
2062 static constexpr int NormallyOpen = 0;
2063 static constexpr int NormallyClosed = 1;
2064
2066 value{value}
2067 {}
2068
2070 value{-1}
2071 {}
2072
2073 constexpr bool operator==(ReverseLimitTypeValue data) const
2074 {
2075 return this->value == data.value;
2076 }
2077 constexpr bool operator==(int data) const
2078 {
2079 return this->value == data;
2080 }
2081 constexpr bool operator!=(ReverseLimitTypeValue data) const
2082 {
2083 return this->value != data.value;
2084 }
2085 constexpr bool operator!=(int data) const
2086 {
2087 return this->value != data;
2088 }
2089 constexpr bool operator<(ReverseLimitTypeValue data) const
2090 {
2091 return this->value < data.value;
2092 }
2093 constexpr bool operator<(int data) const
2094 {
2095 return this->value < data;
2096 }
2097
2098 /**
2099 * \brief Gets the string representation of this enum
2100 *
2101 * \returns String representation of this enum
2102 */
2103 std::string ToString() const
2104 {
2105 switch (value)
2106 {
2107 case ReverseLimitTypeValue::NormallyOpen: return "NormallyOpen";
2108 case ReverseLimitTypeValue::NormallyClosed: return "NormallyClosed";
2109 default: return "Invalid Value";
2110 }
2111 }
2112
2113 friend std::ostream& operator<<(std::ostream &os, ReverseLimitTypeValue data)
2114 {
2115 os << data.ToString();
2116 return os;
2117 }
2118
2119 std::string Serialize() const
2120 {
2121 std::stringstream ss;
2122 ss << "u_" << this->value;
2123 return ss.str();
2124 }
2125};
2126
2127/**
2128 * \brief Determines where to poll the reverse limit switch. This defaults to
2129 * the reverse limit switch pin on the limit switch connector.
2130 *
2131 * Choose RemoteTalonFX to use the reverse limit switch attached to
2132 * another Talon FX on the same CAN bus (this also requires setting
2133 * ReverseLimitRemoteSensorID).
2134 *
2135 * Choose RemoteCANifier to use the reverse limit switch attached to
2136 * another CANifier on the same CAN bus (this also requires setting
2137 * ReverseLimitRemoteSensorID).
2138 *
2139 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
2140 * (this also requires setting ReverseLimitRemoteSensorID). The reverse
2141 * limit will assert when the CANcoder magnet strength changes from BAD
2142 * (red) to ADEQUATE (orange) or GOOD (green).
2143 */
2145{
2146public:
2148
2149 static constexpr int LimitSwitchPin = 0;
2150 static constexpr int RemoteTalonFX = 1;
2151 static constexpr int RemoteCANifier = 2;
2152 static constexpr int RemoteCANcoder = 4;
2153 static constexpr int Disabled = 3;
2154
2156 value{value}
2157 {}
2158
2160 value{-1}
2161 {}
2162
2163 constexpr bool operator==(ReverseLimitSourceValue data) const
2164 {
2165 return this->value == data.value;
2166 }
2167 constexpr bool operator==(int data) const
2168 {
2169 return this->value == data;
2170 }
2171 constexpr bool operator!=(ReverseLimitSourceValue data) const
2172 {
2173 return this->value != data.value;
2174 }
2175 constexpr bool operator!=(int data) const
2176 {
2177 return this->value != data;
2178 }
2179 constexpr bool operator<(ReverseLimitSourceValue data) const
2180 {
2181 return this->value < data.value;
2182 }
2183 constexpr bool operator<(int data) const
2184 {
2185 return this->value < data;
2186 }
2187
2188 /**
2189 * \brief Gets the string representation of this enum
2190 *
2191 * \returns String representation of this enum
2192 */
2193 std::string ToString() const
2194 {
2195 switch (value)
2196 {
2197 case ReverseLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
2198 case ReverseLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
2199 case ReverseLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
2200 case ReverseLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2201 case ReverseLimitSourceValue::Disabled: return "Disabled";
2202 default: return "Invalid Value";
2203 }
2204 }
2205
2206 friend std::ostream& operator<<(std::ostream &os, ReverseLimitSourceValue data)
2207 {
2208 os << data.ToString();
2209 return os;
2210 }
2211
2212 std::string Serialize() const
2213 {
2214 std::stringstream ss;
2215 ss << "u_" << this->value;
2216 return ss.str();
2217 }
2218};
2219
2220/**
2221 * \brief Magnet health as measured by CANcoder.
2222 *
2223 * \details Magnet health as measured by CANcoder. Red indicates too close or
2224 * too far, Orange is adequate but with reduced accuracy, green is
2225 * ideal. Invalid means the accuracy cannot be determined.
2226 */
2228{
2229public:
2231
2232 static constexpr int Magnet_Red = 1;
2233 static constexpr int Magnet_Orange = 2;
2234 static constexpr int Magnet_Green = 3;
2235 static constexpr int Magnet_Invalid = 0;
2236
2237 constexpr MagnetHealthValue(int value) :
2238 value{value}
2239 {}
2240
2241 constexpr MagnetHealthValue() :
2242 value{-1}
2243 {}
2244
2245 constexpr bool operator==(MagnetHealthValue data) const
2246 {
2247 return this->value == data.value;
2248 }
2249 constexpr bool operator==(int data) const
2250 {
2251 return this->value == data;
2252 }
2253 constexpr bool operator!=(MagnetHealthValue data) const
2254 {
2255 return this->value != data.value;
2256 }
2257 constexpr bool operator!=(int data) const
2258 {
2259 return this->value != data;
2260 }
2261 constexpr bool operator<(MagnetHealthValue data) const
2262 {
2263 return this->value < data.value;
2264 }
2265 constexpr bool operator<(int data) const
2266 {
2267 return this->value < data;
2268 }
2269
2270 /**
2271 * \brief Gets the string representation of this enum
2272 *
2273 * \returns String representation of this enum
2274 */
2275 std::string ToString() const
2276 {
2277 switch (value)
2278 {
2279 case MagnetHealthValue::Magnet_Red: return "Magnet_Red";
2280 case MagnetHealthValue::Magnet_Orange: return "Magnet_Orange";
2281 case MagnetHealthValue::Magnet_Green: return "Magnet_Green";
2282 case MagnetHealthValue::Magnet_Invalid: return "Magnet_Invalid";
2283 default: return "Invalid Value";
2284 }
2285 }
2286
2287 friend std::ostream& operator<<(std::ostream &os, MagnetHealthValue data)
2288 {
2289 os << data.ToString();
2290 return os;
2291 }
2292
2293 std::string Serialize() const
2294 {
2295 std::stringstream ss;
2296 ss << "u_" << this->value;
2297 return ss.str();
2298 }
2299};
2300
2301/**
2302 * \brief The applied output of the bridge.
2303 */
2305{
2306public:
2308
2309 static constexpr int BridgeReq_Coast = 0;
2310 static constexpr int BridgeReq_Brake = 1;
2311 static constexpr int BridgeReq_Trapez = 6;
2312 static constexpr int BridgeReq_FOCTorque = 7;
2313 static constexpr int BridgeReq_MusicTone = 8;
2314 static constexpr int BridgeReq_FOCEasy = 9;
2315 static constexpr int BridgeReq_FaultBrake = 12;
2316 static constexpr int BridgeReq_FaultCoast = 13;
2317 static constexpr int BridgeReq_ActiveBrake = 14;
2318
2319 constexpr BridgeOutputValue(int value) :
2320 value{value}
2321 {}
2322
2323 constexpr BridgeOutputValue() :
2324 value{-1}
2325 {}
2326
2327 constexpr bool operator==(BridgeOutputValue data) const
2328 {
2329 return this->value == data.value;
2330 }
2331 constexpr bool operator==(int data) const
2332 {
2333 return this->value == data;
2334 }
2335 constexpr bool operator!=(BridgeOutputValue data) const
2336 {
2337 return this->value != data.value;
2338 }
2339 constexpr bool operator!=(int data) const
2340 {
2341 return this->value != data;
2342 }
2343 constexpr bool operator<(BridgeOutputValue data) const
2344 {
2345 return this->value < data.value;
2346 }
2347 constexpr bool operator<(int data) const
2348 {
2349 return this->value < data;
2350 }
2351
2352 /**
2353 * \brief Gets the string representation of this enum
2354 *
2355 * \returns String representation of this enum
2356 */
2357 std::string ToString() const
2358 {
2359 switch (value)
2360 {
2361 case BridgeOutputValue::BridgeReq_Coast: return "BridgeReq_Coast";
2362 case BridgeOutputValue::BridgeReq_Brake: return "BridgeReq_Brake";
2363 case BridgeOutputValue::BridgeReq_Trapez: return "BridgeReq_Trapez";
2364 case BridgeOutputValue::BridgeReq_FOCTorque: return "BridgeReq_FOCTorque";
2365 case BridgeOutputValue::BridgeReq_MusicTone: return "BridgeReq_MusicTone";
2366 case BridgeOutputValue::BridgeReq_FOCEasy: return "BridgeReq_FOCEasy";
2367 case BridgeOutputValue::BridgeReq_FaultBrake: return "BridgeReq_FaultBrake";
2368 case BridgeOutputValue::BridgeReq_FaultCoast: return "BridgeReq_FaultCoast";
2369 case BridgeOutputValue::BridgeReq_ActiveBrake: return "BridgeReq_ActiveBrake";
2370 default: return "Invalid Value";
2371 }
2372 }
2373
2374 friend std::ostream& operator<<(std::ostream &os, BridgeOutputValue data)
2375 {
2376 os << data.ToString();
2377 return os;
2378 }
2379
2380 std::string Serialize() const
2381 {
2382 std::stringstream ss;
2383 ss << "u_" << this->value;
2384 return ss.str();
2385 }
2386};
2387
2388/**
2389 * \brief Choose what sensor source is used for differential control of a
2390 * mechanism. The default is Disabled. All other options require
2391 * setting the DifferentialTalonFXSensorID, as the average of this Talon
2392 * FX's sensor and the remote TalonFX's sensor is used for the
2393 * differential controller's primary targets.
2394 *
2395 * Choose RemoteTalonFX_Diff to use another TalonFX on the same CAN bus.
2396 * Talon FX will update its differential position and velocity whenever
2397 * the remote TalonFX publishes its information on CAN bus. The
2398 * differential controller will use the difference between this TalonFX's
2399 * sensor and the remote Talon FX's sensor for the differential component
2400 * of the output.
2401 *
2402 * Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll
2403 * to use another Pigeon2 on the same CAN bus (this also requires setting
2404 * DifferentialRemoteSensorID). Talon FX will update its differential
2405 * position to match the selected value whenever Pigeon2 publishes its
2406 * information on CAN bus. Note that the Talon FX differential position
2407 * will be in rotations and not degrees.
2408 *
2409 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
2410 * (this also requires setting DifferentialRemoteSensorID). Talon FX
2411 * will update its differential position and velocity to match the
2412 * CANcoder whenever CANcoder publishes its information on CAN bus.
2413 */
2415{
2416public:
2418
2419 static constexpr int Disabled = 0;
2420 static constexpr int RemoteTalonFX_Diff = 1;
2421 static constexpr int RemotePigeon2_Yaw = 2;
2422 static constexpr int RemotePigeon2_Pitch = 3;
2423 static constexpr int RemotePigeon2_Roll = 4;
2424 static constexpr int RemoteCANcoder = 5;
2425
2427 value{value}
2428 {}
2429
2431 value{-1}
2432 {}
2433
2435 {
2436 return this->value == data.value;
2437 }
2438 constexpr bool operator==(int data) const
2439 {
2440 return this->value == data;
2441 }
2443 {
2444 return this->value != data.value;
2445 }
2446 constexpr bool operator!=(int data) const
2447 {
2448 return this->value != data;
2449 }
2450 constexpr bool operator<(DifferentialSensorSourceValue data) const
2451 {
2452 return this->value < data.value;
2453 }
2454 constexpr bool operator<(int data) const
2455 {
2456 return this->value < data;
2457 }
2458
2459 /**
2460 * \brief Gets the string representation of this enum
2461 *
2462 * \returns String representation of this enum
2463 */
2464 std::string ToString() const
2465 {
2466 switch (value)
2467 {
2468 case DifferentialSensorSourceValue::Disabled: return "Disabled";
2469 case DifferentialSensorSourceValue::RemoteTalonFX_Diff: return "RemoteTalonFX_Diff";
2470 case DifferentialSensorSourceValue::RemotePigeon2_Yaw: return "RemotePigeon2_Yaw";
2471 case DifferentialSensorSourceValue::RemotePigeon2_Pitch: return "RemotePigeon2_Pitch";
2472 case DifferentialSensorSourceValue::RemotePigeon2_Roll: return "RemotePigeon2_Roll";
2473 case DifferentialSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2474 default: return "Invalid Value";
2475 }
2476 }
2477
2478 friend std::ostream& operator<<(std::ostream &os, DifferentialSensorSourceValue data)
2479 {
2480 os << data.ToString();
2481 return os;
2482 }
2483
2484 std::string Serialize() const
2485 {
2486 std::stringstream ss;
2487 ss << "u_" << this->value;
2488 return ss.str();
2489 }
2490};
2491
2492/**
2493 * \brief Static Feedforward Sign during position closed loop
2494 *
2495 * \details This determines the sign of the applied kS during position
2496 * closed-loop modes. The default behavior uses the velocity reference
2497 * sign. This works well with velocity closed loop, Motion Magic®
2498 * controls, and position closed loop when velocity reference is
2499 * specified (motion profiling).
2500 *
2501 * However, when using position closed loop with zero velocity
2502 * reference (no motion profiling), the application may want to apply
2503 * static feedforward based on the closed loop error sign instead. When
2504 * doing so, we recommend the minimal amount of kS, otherwise the motor
2505 * output may dither when closed loop error is near zero.
2506 */
2508{
2509public:
2511
2512 static constexpr int UseVelocitySign = 0;
2513 static constexpr int UseClosedLoopSign = 1;
2514
2516 value{value}
2517 {}
2518
2520 value{-1}
2521 {}
2522
2523 constexpr bool operator==(StaticFeedforwardSignValue data) const
2524 {
2525 return this->value == data.value;
2526 }
2527 constexpr bool operator==(int data) const
2528 {
2529 return this->value == data;
2530 }
2531 constexpr bool operator!=(StaticFeedforwardSignValue data) const
2532 {
2533 return this->value != data.value;
2534 }
2535 constexpr bool operator!=(int data) const
2536 {
2537 return this->value != data;
2538 }
2539 constexpr bool operator<(StaticFeedforwardSignValue data) const
2540 {
2541 return this->value < data.value;
2542 }
2543 constexpr bool operator<(int data) const
2544 {
2545 return this->value < data;
2546 }
2547
2548 /**
2549 * \brief Gets the string representation of this enum
2550 *
2551 * \returns String representation of this enum
2552 */
2553 std::string ToString() const
2554 {
2555 switch (value)
2556 {
2557 case StaticFeedforwardSignValue::UseVelocitySign: return "UseVelocitySign";
2558 case StaticFeedforwardSignValue::UseClosedLoopSign: return "UseClosedLoopSign";
2559 default: return "Invalid Value";
2560 }
2561 }
2562
2563 friend std::ostream& operator<<(std::ostream &os, StaticFeedforwardSignValue data)
2564 {
2565 os << data.ToString();
2566 return os;
2567 }
2568
2569 std::string Serialize() const
2570 {
2571 std::stringstream ss;
2572 ss << "u_" << this->value;
2573 return ss.str();
2574 }
2575};
2576
2577/**
2578 * \brief The type of motor attached to the Talon FX
2579 *
2580 * \details This can be used to determine what motor is attached to the Talon
2581 * FX. Return will be "Unknown" if firmware is too old or device is
2582 * not present.
2583 */
2585{
2586public:
2588
2589 static constexpr int Unknown = 0;
2590 static constexpr int Falcon500 = 1;
2591 static constexpr int KrakenX60 = 2;
2592
2593 constexpr MotorTypeValue(int value) :
2594 value{value}
2595 {}
2596
2597 constexpr MotorTypeValue() :
2598 value{-1}
2599 {}
2600
2601 constexpr bool operator==(MotorTypeValue data) const
2602 {
2603 return this->value == data.value;
2604 }
2605 constexpr bool operator==(int data) const
2606 {
2607 return this->value == data;
2608 }
2609 constexpr bool operator!=(MotorTypeValue data) const
2610 {
2611 return this->value != data.value;
2612 }
2613 constexpr bool operator!=(int data) const
2614 {
2615 return this->value != data;
2616 }
2617 constexpr bool operator<(MotorTypeValue data) const
2618 {
2619 return this->value < data.value;
2620 }
2621 constexpr bool operator<(int data) const
2622 {
2623 return this->value < data;
2624 }
2625
2626 /**
2627 * \brief Gets the string representation of this enum
2628 *
2629 * \returns String representation of this enum
2630 */
2631 std::string ToString() const
2632 {
2633 switch (value)
2634 {
2635 case MotorTypeValue::Unknown: return "Unknown";
2636 case MotorTypeValue::Falcon500: return "Falcon500";
2637 case MotorTypeValue::KrakenX60: return "KrakenX60";
2638 default: return "Invalid Value";
2639 }
2640 }
2641
2642 friend std::ostream& operator<<(std::ostream &os, MotorTypeValue data)
2643 {
2644 os << data.ToString();
2645 return os;
2646 }
2647
2648 std::string Serialize() const
2649 {
2650 std::stringstream ss;
2651 ss << "u_" << this->value;
2652 return ss.str();
2653 }
2654};
2655
2656/**
2657 * \brief Assess the status of the motor output with respect to load and supply.
2658 *
2659 * \details This routine can be used to determine the general status of motor
2660 * commutation. Off means that motor output is disabled.
2661 * StaticBraking typically means the motor is in neutral-brake.
2662 * Motoring means motor is loaded in a typical fashion, drawing current
2663 * from the supply, and successfully turning the rotor in the direction
2664 * of applied voltage. Discordant Motoring is the same as Motoring,
2665 * expect the rotor is being backdriven as the motor output is not
2666 * enough to defeat load forces. RegenBraking means the motor is
2667 * braking in such a way where motor current is traveling back to the
2668 * supply (typically a battery).
2669 */
2671{
2672public:
2674
2675 static constexpr int Unknown = 0;
2676 static constexpr int Off = 1;
2677 static constexpr int StaticBraking = 2;
2678 static constexpr int Motoring = 3;
2679 static constexpr int DiscordantMotoring = 4;
2680 static constexpr int RegenBraking = 5;
2681
2683 value{value}
2684 {}
2685
2687 value{-1}
2688 {}
2689
2690 constexpr bool operator==(MotorOutputStatusValue data) const
2691 {
2692 return this->value == data.value;
2693 }
2694 constexpr bool operator==(int data) const
2695 {
2696 return this->value == data;
2697 }
2698 constexpr bool operator!=(MotorOutputStatusValue data) const
2699 {
2700 return this->value != data.value;
2701 }
2702 constexpr bool operator!=(int data) const
2703 {
2704 return this->value != data;
2705 }
2706 constexpr bool operator<(MotorOutputStatusValue data) const
2707 {
2708 return this->value < data.value;
2709 }
2710 constexpr bool operator<(int data) const
2711 {
2712 return this->value < data;
2713 }
2714
2715 /**
2716 * \brief Gets the string representation of this enum
2717 *
2718 * \returns String representation of this enum
2719 */
2720 std::string ToString() const
2721 {
2722 switch (value)
2723 {
2724 case MotorOutputStatusValue::Unknown: return "Unknown";
2725 case MotorOutputStatusValue::Off: return "Off";
2726 case MotorOutputStatusValue::StaticBraking: return "StaticBraking";
2727 case MotorOutputStatusValue::Motoring: return "Motoring";
2728 case MotorOutputStatusValue::DiscordantMotoring: return "DiscordantMotoring";
2729 case MotorOutputStatusValue::RegenBraking: return "RegenBraking";
2730 default: return "Invalid Value";
2731 }
2732 }
2733
2734 friend std::ostream& operator<<(std::ostream &os, MotorOutputStatusValue data)
2735 {
2736 os << data.ToString();
2737 return os;
2738 }
2739
2740 std::string Serialize() const
2741 {
2742 std::stringstream ss;
2743 ss << "u_" << this->value;
2744 return ss.str();
2745 }
2746};
2747
2748
2749}
2750}
2751}
Definition: Serializable.hpp:15
The range of the absolute sensor in rotations, either [-0.5, 0.5) or [0, 1).
Definition: SpnEnums.hpp:830
constexpr AbsoluteSensorRangeValue()
Definition: SpnEnums.hpp:841
constexpr bool operator<(AbsoluteSensorRangeValue data) const
Definition: SpnEnums.hpp:861
constexpr bool operator==(AbsoluteSensorRangeValue data) const
Definition: SpnEnums.hpp:845
constexpr bool operator!=(AbsoluteSensorRangeValue data) const
Definition: SpnEnums.hpp:853
std::string Serialize() const
Definition: SpnEnums.hpp:891
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:865
constexpr AbsoluteSensorRangeValue(int value)
Definition: SpnEnums.hpp:837
static constexpr int Signed_PlusMinusHalf
Definition: SpnEnums.hpp:835
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:857
static constexpr int Unsigned_0To1
Definition: SpnEnums.hpp:834
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:849
friend std::ostream & operator<<(std::ostream &os, AbsoluteSensorRangeValue data)
Definition: SpnEnums.hpp:885
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:875
The applied rotor polarity as seen from the front of the motor.
Definition: SpnEnums.hpp:1124
constexpr AppliedRotorPolarityValue(int value)
Definition: SpnEnums.hpp:1131
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1143
std::string Serialize() const
Definition: SpnEnums.hpp:1185
constexpr bool operator!=(AppliedRotorPolarityValue data) const
Definition: SpnEnums.hpp:1147
friend std::ostream & operator<<(std::ostream &os, AppliedRotorPolarityValue data)
Definition: SpnEnums.hpp:1179
int value
Definition: SpnEnums.hpp:1126
constexpr bool operator==(AppliedRotorPolarityValue data) const
Definition: SpnEnums.hpp:1139
constexpr AppliedRotorPolarityValue()
Definition: SpnEnums.hpp:1135
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1169
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1159
static constexpr int PositiveIsClockwise
Definition: SpnEnums.hpp:1129
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1151
static constexpr int PositiveIsCounterClockwise
Definition: SpnEnums.hpp:1128
constexpr bool operator<(AppliedRotorPolarityValue data) const
Definition: SpnEnums.hpp:1155
The applied output of the bridge.
Definition: SpnEnums.hpp:2305
constexpr bool operator<(BridgeOutputValue data) const
Definition: SpnEnums.hpp:2343
constexpr bool operator==(BridgeOutputValue data) const
Definition: SpnEnums.hpp:2327
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2347
constexpr bool operator!=(BridgeOutputValue data) const
Definition: SpnEnums.hpp:2335
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2331
friend std::ostream & operator<<(std::ostream &os, BridgeOutputValue data)
Definition: SpnEnums.hpp:2374
static constexpr int BridgeReq_FaultCoast
Definition: SpnEnums.hpp:2316
static constexpr int BridgeReq_FOCEasy
Definition: SpnEnums.hpp:2314
std::string Serialize() const
Definition: SpnEnums.hpp:2380
static constexpr int BridgeReq_Trapez
Definition: SpnEnums.hpp:2311
static constexpr int BridgeReq_ActiveBrake
Definition: SpnEnums.hpp:2317
constexpr BridgeOutputValue(int value)
Definition: SpnEnums.hpp:2319
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2357
static constexpr int BridgeReq_MusicTone
Definition: SpnEnums.hpp:2313
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2339
static constexpr int BridgeReq_Brake
Definition: SpnEnums.hpp:2310
static constexpr int BridgeReq_FOCTorque
Definition: SpnEnums.hpp:2312
constexpr BridgeOutputValue()
Definition: SpnEnums.hpp:2323
int value
Definition: SpnEnums.hpp:2307
static constexpr int BridgeReq_FaultBrake
Definition: SpnEnums.hpp:2315
static constexpr int BridgeReq_Coast
Definition: SpnEnums.hpp:2309
The active control mode of the motor controller.
Definition: SpnEnums.hpp:1197
static constexpr int MotionMagicVoltage
Definition: SpnEnums.hpp:1215
static constexpr int PositionDutyCycle
Definition: SpnEnums.hpp:1205
static constexpr int Follower
Definition: SpnEnums.hpp:1224
static constexpr int MotionMagicExpoDutyCycleFOC
Definition: SpnEnums.hpp:1235
static constexpr int VelocityVoltage
Definition: SpnEnums.hpp:1214
static constexpr int VoltageFOC
Definition: SpnEnums.hpp:1216
static constexpr int MotionMagicDutyCycleFOC
Definition: SpnEnums.hpp:1211
static constexpr int DutyCycleFOC
Definition: SpnEnums.hpp:1208
static constexpr int MusicTone
Definition: SpnEnums.hpp:1228
static constexpr int VelocityDutyCycleFOC
Definition: SpnEnums.hpp:1210
int value
Definition: SpnEnums.hpp:1199
static constexpr int MotionMagicExpoDutyCycle
Definition: SpnEnums.hpp:1234
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1278
static constexpr int MotionMagicVoltageFOC
Definition: SpnEnums.hpp:1219
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1252
static constexpr int CoastOut
Definition: SpnEnums.hpp:1226
static constexpr int DisabledOutput
Definition: SpnEnums.hpp:1201
constexpr bool operator==(ControlModeValue data) const
Definition: SpnEnums.hpp:1248
static constexpr int NeutralOut
Definition: SpnEnums.hpp:1202
static constexpr int MotionMagicVelocityVoltageFOC
Definition: SpnEnums.hpp:1232
static constexpr int MotionMagicExpoVoltage
Definition: SpnEnums.hpp:1236
static constexpr int VoltageOut
Definition: SpnEnums.hpp:1212
static constexpr int MotionMagicExpoTorqueCurrentFOC
Definition: SpnEnums.hpp:1238
static constexpr int VelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1222
static constexpr int MotionMagicExpoVoltageFOC
Definition: SpnEnums.hpp:1237
constexpr ControlModeValue()
Definition: SpnEnums.hpp:1244
std::string Serialize() const
Definition: SpnEnums.hpp:1330
constexpr bool operator<(ControlModeValue data) const
Definition: SpnEnums.hpp:1264
static constexpr int MotionMagicVelocityVoltage
Definition: SpnEnums.hpp:1231
static constexpr int MotionMagicVelocityDutyCycle
Definition: SpnEnums.hpp:1229
constexpr bool operator!=(ControlModeValue data) const
Definition: SpnEnums.hpp:1256
friend std::ostream & operator<<(std::ostream &os, ControlModeValue data)
Definition: SpnEnums.hpp:1324
static constexpr int PositionVoltage
Definition: SpnEnums.hpp:1213
static constexpr int PositionTorqueCurrentFOC
Definition: SpnEnums.hpp:1221
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1260
static constexpr int VelocityVoltageFOC
Definition: SpnEnums.hpp:1218
static constexpr int Reserved
Definition: SpnEnums.hpp:1225
static constexpr int MotionMagicTorqueCurrentFOC
Definition: SpnEnums.hpp:1223
static constexpr int PositionVoltageFOC
Definition: SpnEnums.hpp:1217
static constexpr int MotionMagicDutyCycle
Definition: SpnEnums.hpp:1207
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1268
static constexpr int PositionDutyCycleFOC
Definition: SpnEnums.hpp:1209
static constexpr int TorqueCurrentFOC
Definition: SpnEnums.hpp:1220
static constexpr int UnauthorizedDevice
Definition: SpnEnums.hpp:1227
static constexpr int StaticBrake
Definition: SpnEnums.hpp:1203
static constexpr int MotionMagicVelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1233
static constexpr int VelocityDutyCycle
Definition: SpnEnums.hpp:1206
static constexpr int DutyCycleOut
Definition: SpnEnums.hpp:1204
constexpr ControlModeValue(int value)
Definition: SpnEnums.hpp:1240
static constexpr int MotionMagicVelocityDutyCycleFOC
Definition: SpnEnums.hpp:1230
Whether the device is enabled.
Definition: SpnEnums.hpp:903
std::string Serialize() const
Definition: SpnEnums.hpp:964
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:948
constexpr bool operator==(DeviceEnableValue data) const
Definition: SpnEnums.hpp:918
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:930
int value
Definition: SpnEnums.hpp:905
static constexpr int Enabled
Definition: SpnEnums.hpp:907
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:938
constexpr DeviceEnableValue()
Definition: SpnEnums.hpp:914
friend std::ostream & operator<<(std::ostream &os, DeviceEnableValue data)
Definition: SpnEnums.hpp:958
constexpr bool operator!=(DeviceEnableValue data) const
Definition: SpnEnums.hpp:926
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:922
constexpr bool operator<(DeviceEnableValue data) const
Definition: SpnEnums.hpp:934
constexpr DeviceEnableValue(int value)
Definition: SpnEnums.hpp:910
static constexpr int Disabled
Definition: SpnEnums.hpp:908
The active control mode of the differential controller.
Definition: SpnEnums.hpp:1416
static constexpr int MotionMagicVoltage
Definition: SpnEnums.hpp:1434
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1459
static constexpr int NeutralOut
Definition: SpnEnums.hpp:1421
static constexpr int PositionDutyCycle
Definition: SpnEnums.hpp:1424
constexpr bool operator!=(DifferentialControlModeValue data) const
Definition: SpnEnums.hpp:1463
static constexpr int VelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1441
static constexpr int Reserved
Definition: SpnEnums.hpp:1444
static constexpr int PositionVoltageFOC
Definition: SpnEnums.hpp:1436
static constexpr int MotionMagicTorqueCurrentFOC
Definition: SpnEnums.hpp:1442
static constexpr int VelocityDutyCycleFOC
Definition: SpnEnums.hpp:1429
static constexpr int TorqueCurrentFOC
Definition: SpnEnums.hpp:1439
static constexpr int VoltageOut
Definition: SpnEnums.hpp:1431
static constexpr int VelocityVoltageFOC
Definition: SpnEnums.hpp:1437
static constexpr int MotionMagicDutyCycleFOC
Definition: SpnEnums.hpp:1430
static constexpr int MotionMagicVoltageFOC
Definition: SpnEnums.hpp:1438
static constexpr int Follower
Definition: SpnEnums.hpp:1443
static constexpr int DisabledOutput
Definition: SpnEnums.hpp:1420
static constexpr int VoltageFOC
Definition: SpnEnums.hpp:1435
constexpr DifferentialControlModeValue()
Definition: SpnEnums.hpp:1451
static constexpr int DutyCycleOut
Definition: SpnEnums.hpp:1423
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1467
std::string Serialize() const
Definition: SpnEnums.hpp:1525
static constexpr int PositionVoltage
Definition: SpnEnums.hpp:1432
static constexpr int StaticBrake
Definition: SpnEnums.hpp:1422
friend std::ostream & operator<<(std::ostream &os, DifferentialControlModeValue data)
Definition: SpnEnums.hpp:1519
static constexpr int PositionTorqueCurrentFOC
Definition: SpnEnums.hpp:1440
static constexpr int MotionMagicDutyCycle
Definition: SpnEnums.hpp:1426
constexpr bool operator<(DifferentialControlModeValue data) const
Definition: SpnEnums.hpp:1471
static constexpr int VelocityDutyCycle
Definition: SpnEnums.hpp:1425
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1485
static constexpr int PositionDutyCycleFOC
Definition: SpnEnums.hpp:1428
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1475
static constexpr int CoastOut
Definition: SpnEnums.hpp:1445
constexpr bool operator==(DifferentialControlModeValue data) const
Definition: SpnEnums.hpp:1455
static constexpr int DutyCycleFOC
Definition: SpnEnums.hpp:1427
constexpr DifferentialControlModeValue(int value)
Definition: SpnEnums.hpp:1447
static constexpr int VelocityVoltage
Definition: SpnEnums.hpp:1433
Choose what sensor source is used for differential control of a mechanism.
Definition: SpnEnums.hpp:2415
static constexpr int Disabled
Definition: SpnEnums.hpp:2419
static constexpr int RemoteTalonFX_Diff
Definition: SpnEnums.hpp:2420
constexpr bool operator<(DifferentialSensorSourceValue data) const
Definition: SpnEnums.hpp:2450
constexpr bool operator==(DifferentialSensorSourceValue data) const
Definition: SpnEnums.hpp:2434
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:2424
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2438
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2454
static constexpr int RemotePigeon2_Pitch
Definition: SpnEnums.hpp:2422
static constexpr int RemotePigeon2_Roll
Definition: SpnEnums.hpp:2423
static constexpr int RemotePigeon2_Yaw
Definition: SpnEnums.hpp:2421
constexpr bool operator!=(DifferentialSensorSourceValue data) const
Definition: SpnEnums.hpp:2442
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2446
std::string Serialize() const
Definition: SpnEnums.hpp:2484
friend std::ostream & operator<<(std::ostream &os, DifferentialSensorSourceValue data)
Definition: SpnEnums.hpp:2478
constexpr DifferentialSensorSourceValue()
Definition: SpnEnums.hpp:2430
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2464
constexpr DifferentialSensorSourceValue(int value)
Definition: SpnEnums.hpp:2426
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition: SpnEnums.hpp:1807
constexpr FeedbackSensorSourceValue(int value)
Definition: SpnEnums.hpp:1819
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1812
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1847
static constexpr int RemotePigeon2_Pitch
Definition: SpnEnums.hpp:1814
static constexpr int RemotePigeon2_Yaw
Definition: SpnEnums.hpp:1813
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1839
static constexpr int RemotePigeon2_Roll
Definition: SpnEnums.hpp:1815
constexpr FeedbackSensorSourceValue()
Definition: SpnEnums.hpp:1823
constexpr bool operator==(FeedbackSensorSourceValue data) const
Definition: SpnEnums.hpp:1827
constexpr bool operator<(FeedbackSensorSourceValue data) const
Definition: SpnEnums.hpp:1843
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1831
int value
Definition: SpnEnums.hpp:1809
static constexpr int SyncCANcoder
Definition: SpnEnums.hpp:1817
static constexpr int RotorSensor
Definition: SpnEnums.hpp:1811
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1857
std::string Serialize() const
Definition: SpnEnums.hpp:1878
static constexpr int FusedCANcoder
Definition: SpnEnums.hpp:1816
constexpr bool operator!=(FeedbackSensorSourceValue data) const
Definition: SpnEnums.hpp:1835
friend std::ostream & operator<<(std::ostream &os, FeedbackSensorSourceValue data)
Definition: SpnEnums.hpp:1872
Determines where to poll the forward limit switch.
Definition: SpnEnums.hpp:1978
constexpr bool operator!=(ForwardLimitSourceValue data) const
Definition: SpnEnums.hpp:2004
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1982
std::string Serialize() const
Definition: SpnEnums.hpp:2045
static constexpr int RemoteTalonFX
Definition: SpnEnums.hpp:1983
constexpr bool operator==(ForwardLimitSourceValue data) const
Definition: SpnEnums.hpp:1996
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2008
constexpr ForwardLimitSourceValue(int value)
Definition: SpnEnums.hpp:1988
constexpr ForwardLimitSourceValue()
Definition: SpnEnums.hpp:1992
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2026
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2016
constexpr bool operator<(ForwardLimitSourceValue data) const
Definition: SpnEnums.hpp:2012
friend std::ostream & operator<<(std::ostream &os, ForwardLimitSourceValue data)
Definition: SpnEnums.hpp:2039
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2000
static constexpr int RemoteCANifier
Definition: SpnEnums.hpp:1984
int value
Definition: SpnEnums.hpp:1980
static constexpr int Disabled
Definition: SpnEnums.hpp:1986
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1985
Determines if the forward limit switch is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1891
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:1896
constexpr bool operator<(ForwardLimitTypeValue data) const
Definition: SpnEnums.hpp:1922
constexpr bool operator==(ForwardLimitTypeValue data) const
Definition: SpnEnums.hpp:1906
constexpr ForwardLimitTypeValue()
Definition: SpnEnums.hpp:1902
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1918
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1910
constexpr ForwardLimitTypeValue(int value)
Definition: SpnEnums.hpp:1898
constexpr bool operator!=(ForwardLimitTypeValue data) const
Definition: SpnEnums.hpp:1914
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1936
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1895
std::string Serialize() const
Definition: SpnEnums.hpp:1952
friend std::ostream & operator<<(std::ostream &os, ForwardLimitTypeValue data)
Definition: SpnEnums.hpp:1946
int value
Definition: SpnEnums.hpp:1893
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1926
Forward Limit Pin.
Definition: SpnEnums.hpp:976
constexpr ForwardLimitValue(int value)
Definition: SpnEnums.hpp:983
constexpr bool operator<(ForwardLimitValue data) const
Definition: SpnEnums.hpp:1007
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1011
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:980
constexpr ForwardLimitValue()
Definition: SpnEnums.hpp:987
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1003
std::string Serialize() const
Definition: SpnEnums.hpp:1037
friend std::ostream & operator<<(std::ostream &os, ForwardLimitValue data)
Definition: SpnEnums.hpp:1031
int value
Definition: SpnEnums.hpp:978
constexpr bool operator!=(ForwardLimitValue data) const
Definition: SpnEnums.hpp:999
constexpr bool operator==(ForwardLimitValue data) const
Definition: SpnEnums.hpp:991
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1021
static constexpr int Open
Definition: SpnEnums.hpp:981
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:995
Whether device is locked by FRC.
Definition: SpnEnums.hpp:343
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:370
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:388
static constexpr int Frc_Locked
Definition: SpnEnums.hpp:347
constexpr FrcLockValue(int value)
Definition: SpnEnums.hpp:350
static constexpr int Frc_Unlocked
Definition: SpnEnums.hpp:348
int value
Definition: SpnEnums.hpp:345
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:378
constexpr FrcLockValue()
Definition: SpnEnums.hpp:354
friend std::ostream & operator<<(std::ostream &os, FrcLockValue data)
Definition: SpnEnums.hpp:398
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:362
constexpr bool operator==(FrcLockValue data) const
Definition: SpnEnums.hpp:358
constexpr bool operator<(FrcLockValue data) const
Definition: SpnEnums.hpp:374
std::string Serialize() const
Definition: SpnEnums.hpp:404
constexpr bool operator!=(FrcLockValue data) const
Definition: SpnEnums.hpp:366
Gravity Feedforward/Feedback Type.
Definition: SpnEnums.hpp:1551
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1586
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1596
constexpr GravityTypeValue()
Definition: SpnEnums.hpp:1562
constexpr GravityTypeValue(int value)
Definition: SpnEnums.hpp:1558
static constexpr int Elevator_Static
Definition: SpnEnums.hpp:1555
int value
Definition: SpnEnums.hpp:1553
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1578
std::string Serialize() const
Definition: SpnEnums.hpp:1612
constexpr bool operator!=(GravityTypeValue data) const
Definition: SpnEnums.hpp:1574
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1570
friend std::ostream & operator<<(std::ostream &os, GravityTypeValue data)
Definition: SpnEnums.hpp:1606
constexpr bool operator==(GravityTypeValue data) const
Definition: SpnEnums.hpp:1566
constexpr bool operator<(GravityTypeValue data) const
Definition: SpnEnums.hpp:1582
static constexpr int Arm_Cosine
Definition: SpnEnums.hpp:1556
Invert state of the device as seen from the front of the motor.
Definition: SpnEnums.hpp:1624
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1659
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:1628
constexpr bool operator!=(InvertedValue data) const
Definition: SpnEnums.hpp:1647
constexpr InvertedValue(int value)
Definition: SpnEnums.hpp:1631
int value
Definition: SpnEnums.hpp:1626
static constexpr int Clockwise_Positive
Definition: SpnEnums.hpp:1629
std::string Serialize() const
Definition: SpnEnums.hpp:1685
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1669
friend std::ostream & operator<<(std::ostream &os, InvertedValue data)
Definition: SpnEnums.hpp:1679
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1643
constexpr InvertedValue()
Definition: SpnEnums.hpp:1635
constexpr bool operator<(InvertedValue data) const
Definition: SpnEnums.hpp:1655
constexpr bool operator==(InvertedValue data) const
Definition: SpnEnums.hpp:1639
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1651
Whether the device is Pro licensed.
Definition: SpnEnums.hpp:123
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:142
static constexpr int NotLicensed
Definition: SpnEnums.hpp:127
int value
Definition: SpnEnums.hpp:125
constexpr bool operator!=(IsPROLicensedValue data) const
Definition: SpnEnums.hpp:146
constexpr bool operator==(IsPROLicensedValue data) const
Definition: SpnEnums.hpp:138
static constexpr int Licensed
Definition: SpnEnums.hpp:128
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:150
constexpr IsPROLicensedValue(int value)
Definition: SpnEnums.hpp:130
constexpr bool operator<(IsPROLicensedValue data) const
Definition: SpnEnums.hpp:154
constexpr IsPROLicensedValue()
Definition: SpnEnums.hpp:134
friend std::ostream & operator<<(std::ostream &os, IsPROLicensedValue data)
Definition: SpnEnums.hpp:178
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:158
std::string Serialize() const
Definition: SpnEnums.hpp:184
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:168
The Color of LED1 when it's "Off".
Definition: SpnEnums.hpp:574
constexpr bool operator<(Led1OffColorValue data) const
Definition: SpnEnums.hpp:611
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:625
constexpr Led1OffColorValue()
Definition: SpnEnums.hpp:591
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:599
static constexpr int Orange
Definition: SpnEnums.hpp:581
static constexpr int Red
Definition: SpnEnums.hpp:579
static constexpr int White
Definition: SpnEnums.hpp:585
static constexpr int Off
Definition: SpnEnums.hpp:578
constexpr bool operator!=(Led1OffColorValue data) const
Definition: SpnEnums.hpp:603
static constexpr int Blue
Definition: SpnEnums.hpp:582
static constexpr int Cyan
Definition: SpnEnums.hpp:584
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:607
int value
Definition: SpnEnums.hpp:576
std::string Serialize() const
Definition: SpnEnums.hpp:647
constexpr bool operator==(Led1OffColorValue data) const
Definition: SpnEnums.hpp:595
static constexpr int Pink
Definition: SpnEnums.hpp:583
constexpr Led1OffColorValue(int value)
Definition: SpnEnums.hpp:587
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:615
friend std::ostream & operator<<(std::ostream &os, Led1OffColorValue data)
Definition: SpnEnums.hpp:641
static constexpr int Green
Definition: SpnEnums.hpp:580
The Color of LED1 when it's "On".
Definition: SpnEnums.hpp:489
static constexpr int Cyan
Definition: SpnEnums.hpp:499
constexpr Led1OnColorValue()
Definition: SpnEnums.hpp:506
constexpr bool operator==(Led1OnColorValue data) const
Definition: SpnEnums.hpp:510
static constexpr int Pink
Definition: SpnEnums.hpp:498
constexpr Led1OnColorValue(int value)
Definition: SpnEnums.hpp:502
static constexpr int Blue
Definition: SpnEnums.hpp:497
static constexpr int White
Definition: SpnEnums.hpp:500
static constexpr int Green
Definition: SpnEnums.hpp:495
static constexpr int Red
Definition: SpnEnums.hpp:494
static constexpr int Off
Definition: SpnEnums.hpp:493
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:530
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:522
static constexpr int Orange
Definition: SpnEnums.hpp:496
constexpr bool operator!=(Led1OnColorValue data) const
Definition: SpnEnums.hpp:518
constexpr bool operator<(Led1OnColorValue data) const
Definition: SpnEnums.hpp:526
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:540
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:514
int value
Definition: SpnEnums.hpp:491
std::string Serialize() const
Definition: SpnEnums.hpp:562
friend std::ostream & operator<<(std::ostream &os, Led1OnColorValue data)
Definition: SpnEnums.hpp:556
The Color of LED2 when it's "Off".
Definition: SpnEnums.hpp:744
static constexpr int Pink
Definition: SpnEnums.hpp:753
static constexpr int Red
Definition: SpnEnums.hpp:749
static constexpr int Blue
Definition: SpnEnums.hpp:752
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:795
constexpr bool operator<(Led2OffColorValue data) const
Definition: SpnEnums.hpp:781
constexpr Led2OffColorValue()
Definition: SpnEnums.hpp:761
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:769
static constexpr int Cyan
Definition: SpnEnums.hpp:754
int value
Definition: SpnEnums.hpp:746
static constexpr int Off
Definition: SpnEnums.hpp:748
std::string Serialize() const
Definition: SpnEnums.hpp:817
static constexpr int White
Definition: SpnEnums.hpp:755
friend std::ostream & operator<<(std::ostream &os, Led2OffColorValue data)
Definition: SpnEnums.hpp:811
constexpr bool operator==(Led2OffColorValue data) const
Definition: SpnEnums.hpp:765
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:785
constexpr bool operator!=(Led2OffColorValue data) const
Definition: SpnEnums.hpp:773
constexpr Led2OffColorValue(int value)
Definition: SpnEnums.hpp:757
static constexpr int Orange
Definition: SpnEnums.hpp:751
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:777
static constexpr int Green
Definition: SpnEnums.hpp:750
The Color of LED2 when it's "On".
Definition: SpnEnums.hpp:659
static constexpr int Red
Definition: SpnEnums.hpp:664
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:692
std::string Serialize() const
Definition: SpnEnums.hpp:732
constexpr bool operator==(Led2OnColorValue data) const
Definition: SpnEnums.hpp:680
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:684
static constexpr int Green
Definition: SpnEnums.hpp:665
static constexpr int Pink
Definition: SpnEnums.hpp:668
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:710
static constexpr int Cyan
Definition: SpnEnums.hpp:669
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:700
constexpr bool operator<(Led2OnColorValue data) const
Definition: SpnEnums.hpp:696
friend std::ostream & operator<<(std::ostream &os, Led2OnColorValue data)
Definition: SpnEnums.hpp:726
static constexpr int Blue
Definition: SpnEnums.hpp:667
static constexpr int Orange
Definition: SpnEnums.hpp:666
static constexpr int White
Definition: SpnEnums.hpp:670
static constexpr int Off
Definition: SpnEnums.hpp:663
int value
Definition: SpnEnums.hpp:661
constexpr Led2OnColorValue(int value)
Definition: SpnEnums.hpp:672
constexpr Led2OnColorValue()
Definition: SpnEnums.hpp:676
constexpr bool operator!=(Led2OnColorValue data) const
Definition: SpnEnums.hpp:688
Whether the device is Season Pass licensed.
Definition: SpnEnums.hpp:196
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:231
static constexpr int NotLicensed
Definition: SpnEnums.hpp:200
constexpr bool operator!=(Licensing_IsSeasonPassedValue data) const
Definition: SpnEnums.hpp:219
constexpr Licensing_IsSeasonPassedValue()
Definition: SpnEnums.hpp:207
friend std::ostream & operator<<(std::ostream &os, Licensing_IsSeasonPassedValue data)
Definition: SpnEnums.hpp:251
constexpr bool operator<(Licensing_IsSeasonPassedValue data) const
Definition: SpnEnums.hpp:227
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:223
std::string Serialize() const
Definition: SpnEnums.hpp:257
constexpr bool operator==(Licensing_IsSeasonPassedValue data) const
Definition: SpnEnums.hpp:211
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:215
constexpr Licensing_IsSeasonPassedValue(int value)
Definition: SpnEnums.hpp:203
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:241
static constexpr int Licensed
Definition: SpnEnums.hpp:201
Magnet health as measured by CANcoder.
Definition: SpnEnums.hpp:2228
friend std::ostream & operator<<(std::ostream &os, MagnetHealthValue data)
Definition: SpnEnums.hpp:2287
static constexpr int Magnet_Orange
Definition: SpnEnums.hpp:2233
constexpr bool operator!=(MagnetHealthValue data) const
Definition: SpnEnums.hpp:2253
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2275
static constexpr int Magnet_Red
Definition: SpnEnums.hpp:2232
constexpr bool operator==(MagnetHealthValue data) const
Definition: SpnEnums.hpp:2245
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2249
static constexpr int Magnet_Green
Definition: SpnEnums.hpp:2234
std::string Serialize() const
Definition: SpnEnums.hpp:2293
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2257
constexpr MagnetHealthValue()
Definition: SpnEnums.hpp:2241
int value
Definition: SpnEnums.hpp:2230
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2265
static constexpr int Magnet_Invalid
Definition: SpnEnums.hpp:2235
constexpr MagnetHealthValue(int value)
Definition: SpnEnums.hpp:2237
constexpr bool operator<(MagnetHealthValue data) const
Definition: SpnEnums.hpp:2261
Check if Motion Magic® is running.
Definition: SpnEnums.hpp:1343
constexpr bool operator<(MotionMagicIsRunningValue data) const
Definition: SpnEnums.hpp:1374
int value
Definition: SpnEnums.hpp:1345
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1370
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1362
constexpr bool operator!=(MotionMagicIsRunningValue data) const
Definition: SpnEnums.hpp:1366
constexpr MotionMagicIsRunningValue()
Definition: SpnEnums.hpp:1354
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1388
constexpr bool operator==(MotionMagicIsRunningValue data) const
Definition: SpnEnums.hpp:1358
constexpr MotionMagicIsRunningValue(int value)
Definition: SpnEnums.hpp:1350
std::string Serialize() const
Definition: SpnEnums.hpp:1404
static constexpr int Disabled
Definition: SpnEnums.hpp:1348
friend std::ostream & operator<<(std::ostream &os, MotionMagicIsRunningValue data)
Definition: SpnEnums.hpp:1398
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1378
static constexpr int Enabled
Definition: SpnEnums.hpp:1347
Assess the status of the motor output with respect to load and supply.
Definition: SpnEnums.hpp:2671
std::string Serialize() const
Definition: SpnEnums.hpp:2740
constexpr MotorOutputStatusValue()
Definition: SpnEnums.hpp:2686
static constexpr int RegenBraking
Definition: SpnEnums.hpp:2680
static constexpr int Off
Definition: SpnEnums.hpp:2676
static constexpr int Motoring
Definition: SpnEnums.hpp:2678
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2720
constexpr MotorOutputStatusValue(int value)
Definition: SpnEnums.hpp:2682
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2710
constexpr bool operator==(MotorOutputStatusValue data) const
Definition: SpnEnums.hpp:2690
constexpr bool operator!=(MotorOutputStatusValue data) const
Definition: SpnEnums.hpp:2698
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2694
friend std::ostream & operator<<(std::ostream &os, MotorOutputStatusValue data)
Definition: SpnEnums.hpp:2734
constexpr bool operator<(MotorOutputStatusValue data) const
Definition: SpnEnums.hpp:2706
static constexpr int StaticBraking
Definition: SpnEnums.hpp:2677
int value
Definition: SpnEnums.hpp:2673
static constexpr int Unknown
Definition: SpnEnums.hpp:2675
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2702
static constexpr int DiscordantMotoring
Definition: SpnEnums.hpp:2679
The type of motor attached to the Talon FX.
Definition: SpnEnums.hpp:2585
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2631
std::string Serialize() const
Definition: SpnEnums.hpp:2648
int value
Definition: SpnEnums.hpp:2587
static constexpr int KrakenX60
Definition: SpnEnums.hpp:2591
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2621
constexpr MotorTypeValue()
Definition: SpnEnums.hpp:2597
constexpr bool operator<(MotorTypeValue data) const
Definition: SpnEnums.hpp:2617
static constexpr int Falcon500
Definition: SpnEnums.hpp:2590
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2605
constexpr bool operator!=(MotorTypeValue data) const
Definition: SpnEnums.hpp:2609
constexpr MotorTypeValue(int value)
Definition: SpnEnums.hpp:2593
static constexpr int Unknown
Definition: SpnEnums.hpp:2589
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2613
friend std::ostream & operator<<(std::ostream &os, MotorTypeValue data)
Definition: SpnEnums.hpp:2642
constexpr bool operator==(MotorTypeValue data) const
Definition: SpnEnums.hpp:2601
The state of the motor controller bridge when output is neutral or disabled.
Definition: SpnEnums.hpp:1698
constexpr NeutralModeValue(int value)
Definition: SpnEnums.hpp:1705
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1717
constexpr bool operator==(NeutralModeValue data) const
Definition: SpnEnums.hpp:1713
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1733
std::string Serialize() const
Definition: SpnEnums.hpp:1759
constexpr bool operator<(NeutralModeValue data) const
Definition: SpnEnums.hpp:1729
friend std::ostream & operator<<(std::ostream &os, NeutralModeValue data)
Definition: SpnEnums.hpp:1753
static constexpr int Brake
Definition: SpnEnums.hpp:1703
constexpr bool operator!=(NeutralModeValue data) const
Definition: SpnEnums.hpp:1721
constexpr NeutralModeValue()
Definition: SpnEnums.hpp:1709
int value
Definition: SpnEnums.hpp:1700
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1743
static constexpr int Coast
Definition: SpnEnums.hpp:1702
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1725
Determines where to poll the reverse limit switch.
Definition: SpnEnums.hpp:2145
static constexpr int RemoteTalonFX
Definition: SpnEnums.hpp:2150
constexpr ReverseLimitSourceValue(int value)
Definition: SpnEnums.hpp:2155
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2193
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:2152
std::string Serialize() const
Definition: SpnEnums.hpp:2212
int value
Definition: SpnEnums.hpp:2147
friend std::ostream & operator<<(std::ostream &os, ReverseLimitSourceValue data)
Definition: SpnEnums.hpp:2206
static constexpr int RemoteCANifier
Definition: SpnEnums.hpp:2151
constexpr bool operator==(ReverseLimitSourceValue data) const
Definition: SpnEnums.hpp:2163
constexpr bool operator<(ReverseLimitSourceValue data) const
Definition: SpnEnums.hpp:2179
constexpr bool operator!=(ReverseLimitSourceValue data) const
Definition: SpnEnums.hpp:2171
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:2149
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2183
constexpr ReverseLimitSourceValue()
Definition: SpnEnums.hpp:2159
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2175
static constexpr int Disabled
Definition: SpnEnums.hpp:2153
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2167
Determines if the reverse limit switch is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:2058
friend std::ostream & operator<<(std::ostream &os, ReverseLimitTypeValue data)
Definition: SpnEnums.hpp:2113
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:2063
constexpr bool operator!=(ReverseLimitTypeValue data) const
Definition: SpnEnums.hpp:2081
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2093
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2103
constexpr ReverseLimitTypeValue()
Definition: SpnEnums.hpp:2069
constexpr bool operator<(ReverseLimitTypeValue data) const
Definition: SpnEnums.hpp:2089
constexpr bool operator==(ReverseLimitTypeValue data) const
Definition: SpnEnums.hpp:2073
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2077
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:2062
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2085
std::string Serialize() const
Definition: SpnEnums.hpp:2119
int value
Definition: SpnEnums.hpp:2060
constexpr ReverseLimitTypeValue(int value)
Definition: SpnEnums.hpp:2065
Reverse Limit Pin.
Definition: SpnEnums.hpp:1049
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:1084
constexpr bool operator==(ReverseLimitValue data) const
Definition: SpnEnums.hpp:1064
static constexpr int Open
Definition: SpnEnums.hpp:1054
constexpr bool operator<(ReverseLimitValue data) const
Definition: SpnEnums.hpp:1080
int value
Definition: SpnEnums.hpp:1051
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:1076
std::string Serialize() const
Definition: SpnEnums.hpp:1110
friend std::ostream & operator<<(std::ostream &os, ReverseLimitValue data)
Definition: SpnEnums.hpp:1104
constexpr bool operator!=(ReverseLimitValue data) const
Definition: SpnEnums.hpp:1072
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:1053
constexpr ReverseLimitValue()
Definition: SpnEnums.hpp:1060
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:1068
constexpr ReverseLimitValue(int value)
Definition: SpnEnums.hpp:1056
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1094
Whether the robot is enabled.
Definition: SpnEnums.hpp:416
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:451
friend std::ostream & operator<<(std::ostream &os, RobotEnableValue data)
Definition: SpnEnums.hpp:471
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:435
static constexpr int Disabled
Definition: SpnEnums.hpp:421
constexpr bool operator<(RobotEnableValue data) const
Definition: SpnEnums.hpp:447
constexpr RobotEnableValue(int value)
Definition: SpnEnums.hpp:423
constexpr RobotEnableValue()
Definition: SpnEnums.hpp:427
static constexpr int Enabled
Definition: SpnEnums.hpp:420
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:443
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:461
std::string Serialize() const
Definition: SpnEnums.hpp:477
constexpr bool operator!=(RobotEnableValue data) const
Definition: SpnEnums.hpp:439
int value
Definition: SpnEnums.hpp:418
constexpr bool operator==(RobotEnableValue data) const
Definition: SpnEnums.hpp:431
Direction of the sensor to determine positive rotation, as seen facing the LED side of the CANcoder.
Definition: SpnEnums.hpp:270
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:274
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:315
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:305
friend std::ostream & operator<<(std::ostream &os, SensorDirectionValue data)
Definition: SpnEnums.hpp:325
constexpr SensorDirectionValue(int value)
Definition: SpnEnums.hpp:277
constexpr bool operator==(SensorDirectionValue data) const
Definition: SpnEnums.hpp:285
static constexpr int Clockwise_Positive
Definition: SpnEnums.hpp:275
constexpr bool operator!=(SensorDirectionValue data) const
Definition: SpnEnums.hpp:293
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:297
int value
Definition: SpnEnums.hpp:272
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:289
constexpr bool operator<(SensorDirectionValue data) const
Definition: SpnEnums.hpp:301
std::string Serialize() const
Definition: SpnEnums.hpp:331
constexpr SensorDirectionValue()
Definition: SpnEnums.hpp:281
Static Feedforward Sign during position closed loop.
Definition: SpnEnums.hpp:2508
std::string Serialize() const
Definition: SpnEnums.hpp:2569
friend std::ostream & operator<<(std::ostream &os, StaticFeedforwardSignValue data)
Definition: SpnEnums.hpp:2563
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:2527
constexpr bool operator!=(StaticFeedforwardSignValue data) const
Definition: SpnEnums.hpp:2531
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2553
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:2543
static constexpr int UseVelocitySign
Definition: SpnEnums.hpp:2512
constexpr StaticFeedforwardSignValue()
Definition: SpnEnums.hpp:2519
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:2535
constexpr bool operator==(StaticFeedforwardSignValue data) const
Definition: SpnEnums.hpp:2523
static constexpr int UseClosedLoopSign
Definition: SpnEnums.hpp:2513
constexpr bool operator<(StaticFeedforwardSignValue data) const
Definition: SpnEnums.hpp:2539
constexpr StaticFeedforwardSignValue(int value)
Definition: SpnEnums.hpp:2515
System state of the device.
Definition: SpnEnums.hpp:22
static constexpr int Bootup_3
Definition: SpnEnums.hpp:29
static constexpr int ControlEnabled
Definition: SpnEnums.hpp:36
constexpr bool operator==(int data) const
Definition: SpnEnums.hpp:55
constexpr bool operator!=(System_StateValue data) const
Definition: SpnEnums.hpp:59
constexpr bool operator==(System_StateValue data) const
Definition: SpnEnums.hpp:51
static constexpr int Production
Definition: SpnEnums.hpp:41
static constexpr int Bootup_4
Definition: SpnEnums.hpp:30
std::string Serialize() const
Definition: SpnEnums.hpp:111
static constexpr int ControlDisabled
Definition: SpnEnums.hpp:35
static constexpr int NotLicensed
Definition: SpnEnums.hpp:40
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:81
static constexpr int Recover
Definition: SpnEnums.hpp:39
static constexpr int Bootup_1
Definition: SpnEnums.hpp:27
static constexpr int Bootup_0
Definition: SpnEnums.hpp:26
static constexpr int BootBeep
Definition: SpnEnums.hpp:34
static constexpr int Bootup_6
Definition: SpnEnums.hpp:32
int value
Definition: SpnEnums.hpp:24
static constexpr int Fault
Definition: SpnEnums.hpp:38
static constexpr int ControlEnabled_11
Definition: SpnEnums.hpp:37
constexpr System_StateValue(int value)
Definition: SpnEnums.hpp:43
constexpr bool operator<(int data) const
Definition: SpnEnums.hpp:71
friend std::ostream & operator<<(std::ostream &os, System_StateValue data)
Definition: SpnEnums.hpp:105
static constexpr int Bootup_5
Definition: SpnEnums.hpp:31
constexpr bool operator!=(int data) const
Definition: SpnEnums.hpp:63
static constexpr int Bootup_7
Definition: SpnEnums.hpp:33
constexpr System_StateValue()
Definition: SpnEnums.hpp:47
static constexpr int Bootup_2
Definition: SpnEnums.hpp:28
constexpr bool operator<(System_StateValue data) const
Definition: SpnEnums.hpp:67
Represents the state of one swerve module.
Definition: StatusCodes.h:18