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