CTRE Phoenix 6 C++ 24.3.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 rotation, as seen facing
243 * the LED side of 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 Whether 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 Whether 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 in rotations, either [-0.5, 0.5) or
747 * [0, 1).
748 */
750{
751public:
752 int value;
753
754 static constexpr int Unsigned_0To1 = 0;
755 static constexpr int Signed_PlusMinusHalf = 1;
756
758 value{value}
759 {}
760
762 value{-1}
763 {}
764
765 /**
766 * \brief Gets the string representation of this enum
767 *
768 * \returns String representation of this enum
769 */
770 std::string ToString() const
771 {
772 switch(value)
773 {
774 case AbsoluteSensorRangeValue::Unsigned_0To1: return "Unsigned_0To1";
775 case AbsoluteSensorRangeValue::Signed_PlusMinusHalf: return "Signed_PlusMinusHalf";
776 default: return "Invalid Value";
777 }
778 }
779
780 friend std::ostream& operator<<(std::ostream& os, const AbsoluteSensorRangeValue& data)
781 {
782 os << data.ToString();
783 return os;
784 }
785
786 std::string Serialize() const
787 {
788 std::stringstream ss;
789 ss << "u_" << this->value;
790 return ss.str();
791 }
792
793 bool operator==(const AbsoluteSensorRangeValue& data) const
794 {
795 return this->value == data.value;
796 }
797 bool operator==(int data) const
798 {
799 return this->value == data;
800 }
801 bool operator<(const AbsoluteSensorRangeValue& data) const
802 {
803 return this->value < data.value;
804 }
805 bool operator<(int data) const
806 {
807 return this->value < data;
808 }
809};
810
811/**
812 * \brief Whether the device is enabled.
813 */
815{
816public:
817 int value;
818
819 static constexpr int Enabled = 1;
820 static constexpr int Disabled = 0;
821
823 value{value}
824 {}
825
827 value{-1}
828 {}
829
830 /**
831 * \brief Gets the string representation of this enum
832 *
833 * \returns String representation of this enum
834 */
835 std::string ToString() const
836 {
837 switch(value)
838 {
839 case DeviceEnableValue::Enabled: return "Enabled";
840 case DeviceEnableValue::Disabled: return "Disabled";
841 default: return "Invalid Value";
842 }
843 }
844
845 friend std::ostream& operator<<(std::ostream& os, const DeviceEnableValue& data)
846 {
847 os << data.ToString();
848 return os;
849 }
850
851 std::string Serialize() const
852 {
853 std::stringstream ss;
854 ss << "u_" << this->value;
855 return ss.str();
856 }
857
858 bool operator==(const DeviceEnableValue& data) const
859 {
860 return this->value == data.value;
861 }
862 bool operator==(int data) const
863 {
864 return this->value == data;
865 }
866 bool operator<(const DeviceEnableValue& data) const
867 {
868 return this->value < data.value;
869 }
870 bool operator<(int data) const
871 {
872 return this->value < data;
873 }
874};
875
876/**
877 * \brief Forward Limit Pin.
878 */
880{
881public:
882 int value;
883
884 static constexpr int ClosedToGround = 0;
885 static constexpr int Open = 1;
886
888 value{value}
889 {}
890
892 value{-1}
893 {}
894
895 /**
896 * \brief Gets the string representation of this enum
897 *
898 * \returns String representation of this enum
899 */
900 std::string ToString() const
901 {
902 switch(value)
903 {
904 case ForwardLimitValue::ClosedToGround: return "Closed To Ground";
905 case ForwardLimitValue::Open: return "Open";
906 default: return "Invalid Value";
907 }
908 }
909
910 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitValue& data)
911 {
912 os << data.ToString();
913 return os;
914 }
915
916 std::string Serialize() const
917 {
918 std::stringstream ss;
919 ss << "u_" << this->value;
920 return ss.str();
921 }
922
923 bool operator==(const ForwardLimitValue& data) const
924 {
925 return this->value == data.value;
926 }
927 bool operator==(int data) const
928 {
929 return this->value == data;
930 }
931 bool operator<(const ForwardLimitValue& data) const
932 {
933 return this->value < data.value;
934 }
935 bool operator<(int data) const
936 {
937 return this->value < data;
938 }
939};
940
941/**
942 * \brief Reverse Limit Pin.
943 */
945{
946public:
947 int value;
948
949 static constexpr int ClosedToGround = 0;
950 static constexpr int Open = 1;
951
953 value{value}
954 {}
955
957 value{-1}
958 {}
959
960 /**
961 * \brief Gets the string representation of this enum
962 *
963 * \returns String representation of this enum
964 */
965 std::string ToString() const
966 {
967 switch(value)
968 {
969 case ReverseLimitValue::ClosedToGround: return "Closed To Ground";
970 case ReverseLimitValue::Open: return "Open";
971 default: return "Invalid Value";
972 }
973 }
974
975 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitValue& data)
976 {
977 os << data.ToString();
978 return os;
979 }
980
981 std::string Serialize() const
982 {
983 std::stringstream ss;
984 ss << "u_" << this->value;
985 return ss.str();
986 }
987
988 bool operator==(const ReverseLimitValue& data) const
989 {
990 return this->value == data.value;
991 }
992 bool operator==(int data) const
993 {
994 return this->value == data;
995 }
996 bool operator<(const ReverseLimitValue& data) const
997 {
998 return this->value < data.value;
999 }
1000 bool operator<(int data) const
1001 {
1002 return this->value < data;
1003 }
1004};
1005
1006/**
1007 * \brief The applied rotor polarity. This typically is determined by the
1008 * Inverted config, but can be overridden if using Follower features.
1009 */
1011{
1012public:
1014
1015 static constexpr int PositiveIsCounterClockwise = 0;
1016 static constexpr int PositiveIsClockwise = 1;
1017
1019 value{value}
1020 {}
1021
1023 value{-1}
1024 {}
1025
1026 /**
1027 * \brief Gets the string representation of this enum
1028 *
1029 * \returns String representation of this enum
1030 */
1031 std::string ToString() const
1032 {
1033 switch(value)
1034 {
1035 case AppliedRotorPolarityValue::PositiveIsCounterClockwise: return "PositiveIsCounterClockwise";
1036 case AppliedRotorPolarityValue::PositiveIsClockwise: return "PositiveIsClockwise";
1037 default: return "Invalid Value";
1038 }
1039 }
1040
1041 friend std::ostream& operator<<(std::ostream& os, const AppliedRotorPolarityValue& data)
1042 {
1043 os << data.ToString();
1044 return os;
1045 }
1046
1047 std::string Serialize() const
1048 {
1049 std::stringstream ss;
1050 ss << "u_" << this->value;
1051 return ss.str();
1052 }
1053
1055 {
1056 return this->value == data.value;
1057 }
1058 bool operator==(int data) const
1059 {
1060 return this->value == data;
1061 }
1062 bool operator<(const AppliedRotorPolarityValue& data) const
1063 {
1064 return this->value < data.value;
1065 }
1066 bool operator<(int data) const
1067 {
1068 return this->value < data;
1069 }
1070};
1071
1072/**
1073 * \brief The active control mode of the motor controller
1074 */
1076{
1077public:
1079
1080 static constexpr int DisabledOutput = 0;
1081 static constexpr int NeutralOut = 1;
1082 static constexpr int StaticBrake = 2;
1083 static constexpr int DutyCycleOut = 3;
1084 static constexpr int PositionDutyCycle = 4;
1085 static constexpr int VelocityDutyCycle = 5;
1086 static constexpr int MotionMagicDutyCycle = 6;
1087 static constexpr int DutyCycleFOC = 7;
1088 static constexpr int PositionDutyCycleFOC = 8;
1089 static constexpr int VelocityDutyCycleFOC = 9;
1090 static constexpr int MotionMagicDutyCycleFOC = 10;
1091 static constexpr int VoltageOut = 11;
1092 static constexpr int PositionVoltage = 12;
1093 static constexpr int VelocityVoltage = 13;
1094 static constexpr int MotionMagicVoltage = 14;
1095 static constexpr int VoltageFOC = 15;
1096 static constexpr int PositionVoltageFOC = 16;
1097 static constexpr int VelocityVoltageFOC = 17;
1098 static constexpr int MotionMagicVoltageFOC = 18;
1099 static constexpr int TorqueCurrentFOC = 19;
1100 static constexpr int PositionTorqueCurrentFOC = 20;
1101 static constexpr int VelocityTorqueCurrentFOC = 21;
1102 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1103 static constexpr int Follower = 23;
1104 static constexpr int Reserved = 24;
1105 static constexpr int CoastOut = 25;
1106 static constexpr int UnauthorizedDevice = 26;
1107 static constexpr int MusicTone = 27;
1108 static constexpr int MotionMagicVelocityDutyCycle = 28;
1109 static constexpr int MotionMagicVelocityDutyCycleFOC = 29;
1110 static constexpr int MotionMagicVelocityVoltage = 30;
1111 static constexpr int MotionMagicVelocityVoltageFOC = 31;
1112 static constexpr int MotionMagicVelocityTorqueCurrentFOC = 32;
1113 static constexpr int MotionMagicExpoDutyCycle = 33;
1114 static constexpr int MotionMagicExpoDutyCycleFOC = 34;
1115 static constexpr int MotionMagicExpoVoltage = 35;
1116 static constexpr int MotionMagicExpoVoltageFOC = 36;
1117 static constexpr int MotionMagicExpoTorqueCurrentFOC = 37;
1118
1120 value{value}
1121 {}
1122
1124 value{-1}
1125 {}
1126
1127 /**
1128 * \brief Gets the string representation of this enum
1129 *
1130 * \returns String representation of this enum
1131 */
1132 std::string ToString() const
1133 {
1134 switch(value)
1135 {
1136 case ControlModeValue::DisabledOutput: return "DisabledOutput";
1137 case ControlModeValue::NeutralOut: return "NeutralOut";
1138 case ControlModeValue::StaticBrake: return "StaticBrake";
1139 case ControlModeValue::DutyCycleOut: return "DutyCycleOut";
1140 case ControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1141 case ControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1142 case ControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1143 case ControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1144 case ControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1145 case ControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1146 case ControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1147 case ControlModeValue::VoltageOut: return "VoltageOut";
1148 case ControlModeValue::PositionVoltage: return "PositionVoltage";
1149 case ControlModeValue::VelocityVoltage: return "VelocityVoltage";
1150 case ControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1151 case ControlModeValue::VoltageFOC: return "VoltageFOC";
1152 case ControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1153 case ControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1154 case ControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1155 case ControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1156 case ControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1157 case ControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1158 case ControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1159 case ControlModeValue::Follower: return "Follower";
1160 case ControlModeValue::Reserved: return "Reserved";
1161 case ControlModeValue::CoastOut: return "CoastOut";
1162 case ControlModeValue::UnauthorizedDevice: return "UnauthorizedDevice";
1163 case ControlModeValue::MusicTone: return "MusicTone";
1164 case ControlModeValue::MotionMagicVelocityDutyCycle: return "MotionMagicVelocityDutyCycle";
1165 case ControlModeValue::MotionMagicVelocityDutyCycleFOC: return "MotionMagicVelocityDutyCycleFOC";
1166 case ControlModeValue::MotionMagicVelocityVoltage: return "MotionMagicVelocityVoltage";
1167 case ControlModeValue::MotionMagicVelocityVoltageFOC: return "MotionMagicVelocityVoltageFOC";
1168 case ControlModeValue::MotionMagicVelocityTorqueCurrentFOC: return "MotionMagicVelocityTorqueCurrentFOC";
1169 case ControlModeValue::MotionMagicExpoDutyCycle: return "MotionMagicExpoDutyCycle";
1170 case ControlModeValue::MotionMagicExpoDutyCycleFOC: return "MotionMagicExpoDutyCycleFOC";
1171 case ControlModeValue::MotionMagicExpoVoltage: return "MotionMagicExpoVoltage";
1172 case ControlModeValue::MotionMagicExpoVoltageFOC: return "MotionMagicExpoVoltageFOC";
1173 case ControlModeValue::MotionMagicExpoTorqueCurrentFOC: return "MotionMagicExpoTorqueCurrentFOC";
1174 default: return "Invalid Value";
1175 }
1176 }
1177
1178 friend std::ostream& operator<<(std::ostream& os, const ControlModeValue& data)
1179 {
1180 os << data.ToString();
1181 return os;
1182 }
1183
1184 std::string Serialize() const
1185 {
1186 std::stringstream ss;
1187 ss << "u_" << this->value;
1188 return ss.str();
1189 }
1190
1191 bool operator==(const ControlModeValue& data) const
1192 {
1193 return this->value == data.value;
1194 }
1195 bool operator==(int data) const
1196 {
1197 return this->value == data;
1198 }
1199 bool operator<(const ControlModeValue& data) const
1200 {
1201 return this->value < data.value;
1202 }
1203 bool operator<(int data) const
1204 {
1205 return this->value < data;
1206 }
1207};
1208
1209/**
1210 * \brief Check if Motion Magic® is running. This is equivalent to checking
1211 * that the reported control mode is a Motion Magic® based mode.
1212 */
1214{
1215public:
1217
1218 static constexpr int Enabled = 1;
1219 static constexpr int Disabled = 0;
1220
1222 value{value}
1223 {}
1224
1226 value{-1}
1227 {}
1228
1229 /**
1230 * \brief Gets the string representation of this enum
1231 *
1232 * \returns String representation of this enum
1233 */
1234 std::string ToString() const
1235 {
1236 switch(value)
1237 {
1238 case MotionMagicIsRunningValue::Enabled: return "Enabled";
1239 case MotionMagicIsRunningValue::Disabled: return "Disabled";
1240 default: return "Invalid Value";
1241 }
1242 }
1243
1244 friend std::ostream& operator<<(std::ostream& os, const MotionMagicIsRunningValue& data)
1245 {
1246 os << data.ToString();
1247 return os;
1248 }
1249
1250 std::string Serialize() const
1251 {
1252 std::stringstream ss;
1253 ss << "u_" << this->value;
1254 return ss.str();
1255 }
1256
1258 {
1259 return this->value == data.value;
1260 }
1261 bool operator==(int data) const
1262 {
1263 return this->value == data;
1264 }
1265 bool operator<(const MotionMagicIsRunningValue& data) const
1266 {
1267 return this->value < data.value;
1268 }
1269 bool operator<(int data) const
1270 {
1271 return this->value < data;
1272 }
1273};
1274
1275/**
1276 * \brief The active control mode of the differential controller
1277 */
1279{
1280public:
1282
1283 static constexpr int DisabledOutput = 0;
1284 static constexpr int NeutralOut = 1;
1285 static constexpr int StaticBrake = 2;
1286 static constexpr int DutyCycleOut = 3;
1287 static constexpr int PositionDutyCycle = 4;
1288 static constexpr int VelocityDutyCycle = 5;
1289 static constexpr int MotionMagicDutyCycle = 6;
1290 static constexpr int DutyCycleFOC = 7;
1291 static constexpr int PositionDutyCycleFOC = 8;
1292 static constexpr int VelocityDutyCycleFOC = 9;
1293 static constexpr int MotionMagicDutyCycleFOC = 10;
1294 static constexpr int VoltageOut = 11;
1295 static constexpr int PositionVoltage = 12;
1296 static constexpr int VelocityVoltage = 13;
1297 static constexpr int MotionMagicVoltage = 14;
1298 static constexpr int VoltageFOC = 15;
1299 static constexpr int PositionVoltageFOC = 16;
1300 static constexpr int VelocityVoltageFOC = 17;
1301 static constexpr int MotionMagicVoltageFOC = 18;
1302 static constexpr int TorqueCurrentFOC = 19;
1303 static constexpr int PositionTorqueCurrentFOC = 20;
1304 static constexpr int VelocityTorqueCurrentFOC = 21;
1305 static constexpr int MotionMagicTorqueCurrentFOC = 22;
1306 static constexpr int Follower = 23;
1307 static constexpr int Reserved = 24;
1308 static constexpr int CoastOut = 25;
1309
1311 value{value}
1312 {}
1313
1315 value{-1}
1316 {}
1317
1318 /**
1319 * \brief Gets the string representation of this enum
1320 *
1321 * \returns String representation of this enum
1322 */
1323 std::string ToString() const
1324 {
1325 switch(value)
1326 {
1327 case DifferentialControlModeValue::DisabledOutput: return "DisabledOutput";
1328 case DifferentialControlModeValue::NeutralOut: return "NeutralOut";
1329 case DifferentialControlModeValue::StaticBrake: return "StaticBrake";
1330 case DifferentialControlModeValue::DutyCycleOut: return "DutyCycleOut";
1331 case DifferentialControlModeValue::PositionDutyCycle: return "PositionDutyCycle";
1332 case DifferentialControlModeValue::VelocityDutyCycle: return "VelocityDutyCycle";
1333 case DifferentialControlModeValue::MotionMagicDutyCycle: return "MotionMagicDutyCycle";
1334 case DifferentialControlModeValue::DutyCycleFOC: return "DutyCycleFOC";
1335 case DifferentialControlModeValue::PositionDutyCycleFOC: return "PositionDutyCycleFOC";
1336 case DifferentialControlModeValue::VelocityDutyCycleFOC: return "VelocityDutyCycleFOC";
1337 case DifferentialControlModeValue::MotionMagicDutyCycleFOC: return "MotionMagicDutyCycleFOC";
1338 case DifferentialControlModeValue::VoltageOut: return "VoltageOut";
1339 case DifferentialControlModeValue::PositionVoltage: return "PositionVoltage";
1340 case DifferentialControlModeValue::VelocityVoltage: return "VelocityVoltage";
1341 case DifferentialControlModeValue::MotionMagicVoltage: return "MotionMagicVoltage";
1342 case DifferentialControlModeValue::VoltageFOC: return "VoltageFOC";
1343 case DifferentialControlModeValue::PositionVoltageFOC: return "PositionVoltageFOC";
1344 case DifferentialControlModeValue::VelocityVoltageFOC: return "VelocityVoltageFOC";
1345 case DifferentialControlModeValue::MotionMagicVoltageFOC: return "MotionMagicVoltageFOC";
1346 case DifferentialControlModeValue::TorqueCurrentFOC: return "TorqueCurrentFOC";
1347 case DifferentialControlModeValue::PositionTorqueCurrentFOC: return "PositionTorqueCurrentFOC";
1348 case DifferentialControlModeValue::VelocityTorqueCurrentFOC: return "VelocityTorqueCurrentFOC";
1349 case DifferentialControlModeValue::MotionMagicTorqueCurrentFOC: return "MotionMagicTorqueCurrentFOC";
1350 case DifferentialControlModeValue::Follower: return "Follower";
1351 case DifferentialControlModeValue::Reserved: return "Reserved";
1352 case DifferentialControlModeValue::CoastOut: return "CoastOut";
1353 default: return "Invalid Value";
1354 }
1355 }
1356
1357 friend std::ostream& operator<<(std::ostream& os, const DifferentialControlModeValue& data)
1358 {
1359 os << data.ToString();
1360 return os;
1361 }
1362
1363 std::string Serialize() const
1364 {
1365 std::stringstream ss;
1366 ss << "u_" << this->value;
1367 return ss.str();
1368 }
1369
1371 {
1372 return this->value == data.value;
1373 }
1374 bool operator==(int data) const
1375 {
1376 return this->value == data;
1377 }
1379 {
1380 return this->value < data.value;
1381 }
1382 bool operator<(int data) const
1383 {
1384 return this->value < data;
1385 }
1386};
1387
1388/**
1389 * \brief Gravity Feedforward/Feedback Type
1390 *
1391 * \details This determines the type of the gravity feedforward/feedback.
1392 *
1393 * Choose Elevator_Static for systems where the gravity feedforward is
1394 * constant, such as an elevator. The gravity feedforward output will
1395 * always have the same sign.
1396 *
1397 * Choose Arm_Cosine for systems where the gravity feedback is
1398 * dependent on the angular position of the mechanism, such as an arm.
1399 * The gravity feedback output will vary depending on the mechanism
1400 * angular position. Note that the sensor offset and ratios must be
1401 * configured so that the sensor reports a position of 0 when the
1402 * mechanism is horizonal (parallel to the ground), and the reported
1403 * sensor position is 1:1 with the mechanism.
1404 */
1406{
1407public:
1409
1410 static constexpr int Elevator_Static = 0;
1411 static constexpr int Arm_Cosine = 1;
1412
1414 value{value}
1415 {}
1416
1418 value{-1}
1419 {}
1420
1421 /**
1422 * \brief Gets the string representation of this enum
1423 *
1424 * \returns String representation of this enum
1425 */
1426 std::string ToString() const
1427 {
1428 switch(value)
1429 {
1430 case GravityTypeValue::Elevator_Static: return "Elevator_Static";
1431 case GravityTypeValue::Arm_Cosine: return "Arm_Cosine";
1432 default: return "Invalid Value";
1433 }
1434 }
1435
1436 friend std::ostream& operator<<(std::ostream& os, const GravityTypeValue& data)
1437 {
1438 os << data.ToString();
1439 return os;
1440 }
1441
1442 std::string Serialize() const
1443 {
1444 std::stringstream ss;
1445 ss << "u_" << this->value;
1446 return ss.str();
1447 }
1448
1449 bool operator==(const GravityTypeValue& data) const
1450 {
1451 return this->value == data.value;
1452 }
1453 bool operator==(int data) const
1454 {
1455 return this->value == data;
1456 }
1457 bool operator<(const GravityTypeValue& data) const
1458 {
1459 return this->value < data.value;
1460 }
1461 bool operator<(int data) const
1462 {
1463 return this->value < data;
1464 }
1465};
1466
1467/**
1468 * \brief Invert state of the device.
1469 */
1471{
1472public:
1474
1475 static constexpr int CounterClockwise_Positive = 0;
1476 static constexpr int Clockwise_Positive = 1;
1477
1479 value{value}
1480 {}
1481
1483 value{-1}
1484 {}
1485
1486 /**
1487 * \brief Gets the string representation of this enum
1488 *
1489 * \returns String representation of this enum
1490 */
1491 std::string ToString() const
1492 {
1493 switch(value)
1494 {
1495 case InvertedValue::CounterClockwise_Positive: return "CounterClockwise_Positive";
1496 case InvertedValue::Clockwise_Positive: return "Clockwise_Positive";
1497 default: return "Invalid Value";
1498 }
1499 }
1500
1501 friend std::ostream& operator<<(std::ostream& os, const InvertedValue& data)
1502 {
1503 os << data.ToString();
1504 return os;
1505 }
1506
1507 std::string Serialize() const
1508 {
1509 std::stringstream ss;
1510 ss << "u_" << this->value;
1511 return ss.str();
1512 }
1513
1514 bool operator==(const InvertedValue& data) const
1515 {
1516 return this->value == data.value;
1517 }
1518 bool operator==(int data) const
1519 {
1520 return this->value == data;
1521 }
1522 bool operator<(const InvertedValue& data) const
1523 {
1524 return this->value < data.value;
1525 }
1526 bool operator<(int data) const
1527 {
1528 return this->value < data;
1529 }
1530};
1531
1532/**
1533 * \brief The state of the motor controller bridge when output is neutral or
1534 * disabled.
1535 */
1537{
1538public:
1540
1541 static constexpr int Coast = 0;
1542 static constexpr int Brake = 1;
1543
1545 value{value}
1546 {}
1547
1549 value{-1}
1550 {}
1551
1552 /**
1553 * \brief Gets the string representation of this enum
1554 *
1555 * \returns String representation of this enum
1556 */
1557 std::string ToString() const
1558 {
1559 switch(value)
1560 {
1561 case NeutralModeValue::Coast: return "Coast";
1562 case NeutralModeValue::Brake: return "Brake";
1563 default: return "Invalid Value";
1564 }
1565 }
1566
1567 friend std::ostream& operator<<(std::ostream& os, const NeutralModeValue& data)
1568 {
1569 os << data.ToString();
1570 return os;
1571 }
1572
1573 std::string Serialize() const
1574 {
1575 std::stringstream ss;
1576 ss << "u_" << this->value;
1577 return ss.str();
1578 }
1579
1580 bool operator==(const NeutralModeValue& data) const
1581 {
1582 return this->value == data.value;
1583 }
1584 bool operator==(int data) const
1585 {
1586 return this->value == data;
1587 }
1588 bool operator<(const NeutralModeValue& data) const
1589 {
1590 return this->value < data.value;
1591 }
1592 bool operator<(int data) const
1593 {
1594 return this->value < data;
1595 }
1596};
1597
1598/**
1599 * \brief Choose what sensor source is reported via API and used by closed-loop
1600 * and limit features. The default is RotorSensor, which uses the
1601 * internal rotor sensor in the Talon FX.
1602 *
1603 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1604 * (this also requires setting FeedbackRemoteSensorID). Talon FX will
1605 * update its position and velocity whenever CANcoder publishes its
1606 * information on CAN bus.
1607 *
1608 * Choose FusedCANcoder (requires Phoenix Pro) and Talon FX will fuse
1609 * another CANcoder's information with the internal rotor, which provides
1610 * the best possible position and velocity for accuracy and bandwidth
1611 * (this also requires setting FeedbackRemoteSensorID). FusedCANcoder
1612 * was developed for applications such as swerve-azimuth.
1613 *
1614 * Choose SyncCANcoder (requires Phoenix Pro) and Talon FX will
1615 * synchronize its internal rotor position against another CANcoder, then
1616 * continue to use the rotor sensor for closed loop control (this also
1617 * requires setting FeedbackRemoteSensorID). The TalonFX will report if
1618 * its internal position differs significantly from the reported CANcoder
1619 * position. SyncCANcoder was developed for mechanisms where there is a
1620 * risk of the CANcoder failing in such a way that it reports a position
1621 * that does not match the mechanism, such as the sensor mounting
1622 * assembly breaking off.
1623 *
1624 * Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll
1625 * to use another Pigeon2 on the same CAN bus (this also requires setting
1626 * FeedbackRemoteSensorID). Talon FX will update its position to match
1627 * the selected value whenever Pigeon2 publishes its information on CAN
1628 * bus. Note that the Talon FX position will be in rotations and not
1629 * degrees.
1630 *
1631 * \details Note: When the feedback source is changed to FusedCANcoder, the
1632 * Talon FX needs a period of time to fuse before sensor-based
1633 * (soft-limit, closed loop, etc.) features are used. This period of
1634 * time is determined by the update frequency of the CANcoder's
1635 * Position signal.
1636 */
1638{
1639public:
1641
1642 static constexpr int RotorSensor = 0;
1643 static constexpr int RemoteCANcoder = 1;
1644 static constexpr int RemotePigeon2_Yaw = 2;
1645 static constexpr int RemotePigeon2_Pitch = 3;
1646 static constexpr int RemotePigeon2_Roll = 4;
1647 static constexpr int FusedCANcoder = 5;
1648 static constexpr int SyncCANcoder = 6;
1649
1651 value{value}
1652 {}
1653
1655 value{-1}
1656 {}
1657
1658 /**
1659 * \brief Gets the string representation of this enum
1660 *
1661 * \returns String representation of this enum
1662 */
1663 std::string ToString() const
1664 {
1665 switch(value)
1666 {
1667 case FeedbackSensorSourceValue::RotorSensor: return "RotorSensor";
1668 case FeedbackSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1669 case FeedbackSensorSourceValue::RemotePigeon2_Yaw: return "RemotePigeon2_Yaw";
1670 case FeedbackSensorSourceValue::RemotePigeon2_Pitch: return "RemotePigeon2_Pitch";
1671 case FeedbackSensorSourceValue::RemotePigeon2_Roll: return "RemotePigeon2_Roll";
1672 case FeedbackSensorSourceValue::FusedCANcoder: return "FusedCANcoder";
1673 case FeedbackSensorSourceValue::SyncCANcoder: return "SyncCANcoder";
1674 default: return "Invalid Value";
1675 }
1676 }
1677
1678 friend std::ostream& operator<<(std::ostream& os, const FeedbackSensorSourceValue& data)
1679 {
1680 os << data.ToString();
1681 return os;
1682 }
1683
1684 std::string Serialize() const
1685 {
1686 std::stringstream ss;
1687 ss << "u_" << this->value;
1688 return ss.str();
1689 }
1690
1692 {
1693 return this->value == data.value;
1694 }
1695 bool operator==(int data) const
1696 {
1697 return this->value == data;
1698 }
1699 bool operator<(const FeedbackSensorSourceValue& data) const
1700 {
1701 return this->value < data.value;
1702 }
1703 bool operator<(int data) const
1704 {
1705 return this->value < data;
1706 }
1707};
1708
1709/**
1710 * \brief Determines if the forward limit switch is normally-open (default) or
1711 * normally-closed.
1712 */
1714{
1715public:
1717
1718 static constexpr int NormallyOpen = 0;
1719 static constexpr int NormallyClosed = 1;
1720
1722 value{value}
1723 {}
1724
1726 value{-1}
1727 {}
1728
1729 /**
1730 * \brief Gets the string representation of this enum
1731 *
1732 * \returns String representation of this enum
1733 */
1734 std::string ToString() const
1735 {
1736 switch(value)
1737 {
1738 case ForwardLimitTypeValue::NormallyOpen: return "NormallyOpen";
1739 case ForwardLimitTypeValue::NormallyClosed: return "NormallyClosed";
1740 default: return "Invalid Value";
1741 }
1742 }
1743
1744 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitTypeValue& data)
1745 {
1746 os << data.ToString();
1747 return os;
1748 }
1749
1750 std::string Serialize() const
1751 {
1752 std::stringstream ss;
1753 ss << "u_" << this->value;
1754 return ss.str();
1755 }
1756
1757 bool operator==(const ForwardLimitTypeValue& data) const
1758 {
1759 return this->value == data.value;
1760 }
1761 bool operator==(int data) const
1762 {
1763 return this->value == data;
1764 }
1765 bool operator<(const ForwardLimitTypeValue& data) const
1766 {
1767 return this->value < data.value;
1768 }
1769 bool operator<(int data) const
1770 {
1771 return this->value < data;
1772 }
1773};
1774
1775/**
1776 * \brief Determines where to poll the forward limit switch. This defaults to
1777 * the forward limit switch pin on the limit switch connector.
1778 *
1779 * Choose RemoteTalonFX to use the forward limit switch attached to
1780 * another Talon FX on the same CAN bus (this also requires setting
1781 * ForwardLimitRemoteSensorID).
1782 *
1783 * Choose RemoteCANifier to use the forward limit switch attached to
1784 * another CANifier on the same CAN bus (this also requires setting
1785 * ForwardLimitRemoteSensorID).
1786 *
1787 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1788 * (this also requires setting ForwardLimitRemoteSensorID). The forward
1789 * limit will assert when the CANcoder magnet strength changes from BAD
1790 * (red) to ADEQUATE (orange) or GOOD (green).
1791 */
1793{
1794public:
1796
1797 static constexpr int LimitSwitchPin = 0;
1798 static constexpr int RemoteTalonFX = 1;
1799 static constexpr int RemoteCANifier = 2;
1800 static constexpr int RemoteCANcoder = 4;
1801 static constexpr int Disabled = 3;
1802
1804 value{value}
1805 {}
1806
1808 value{-1}
1809 {}
1810
1811 /**
1812 * \brief Gets the string representation of this enum
1813 *
1814 * \returns String representation of this enum
1815 */
1816 std::string ToString() const
1817 {
1818 switch(value)
1819 {
1820 case ForwardLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
1821 case ForwardLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
1822 case ForwardLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
1823 case ForwardLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1824 case ForwardLimitSourceValue::Disabled: return "Disabled";
1825 default: return "Invalid Value";
1826 }
1827 }
1828
1829 friend std::ostream& operator<<(std::ostream& os, const ForwardLimitSourceValue& data)
1830 {
1831 os << data.ToString();
1832 return os;
1833 }
1834
1835 std::string Serialize() const
1836 {
1837 std::stringstream ss;
1838 ss << "u_" << this->value;
1839 return ss.str();
1840 }
1841
1842 bool operator==(const ForwardLimitSourceValue& data) const
1843 {
1844 return this->value == data.value;
1845 }
1846 bool operator==(int data) const
1847 {
1848 return this->value == data;
1849 }
1850 bool operator<(const ForwardLimitSourceValue& data) const
1851 {
1852 return this->value < data.value;
1853 }
1854 bool operator<(int data) const
1855 {
1856 return this->value < data;
1857 }
1858};
1859
1860/**
1861 * \brief Determines if the reverse limit switch is normally-open (default) or
1862 * normally-closed.
1863 */
1865{
1866public:
1868
1869 static constexpr int NormallyOpen = 0;
1870 static constexpr int NormallyClosed = 1;
1871
1873 value{value}
1874 {}
1875
1877 value{-1}
1878 {}
1879
1880 /**
1881 * \brief Gets the string representation of this enum
1882 *
1883 * \returns String representation of this enum
1884 */
1885 std::string ToString() const
1886 {
1887 switch(value)
1888 {
1889 case ReverseLimitTypeValue::NormallyOpen: return "NormallyOpen";
1890 case ReverseLimitTypeValue::NormallyClosed: return "NormallyClosed";
1891 default: return "Invalid Value";
1892 }
1893 }
1894
1895 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitTypeValue& data)
1896 {
1897 os << data.ToString();
1898 return os;
1899 }
1900
1901 std::string Serialize() const
1902 {
1903 std::stringstream ss;
1904 ss << "u_" << this->value;
1905 return ss.str();
1906 }
1907
1908 bool operator==(const ReverseLimitTypeValue& data) const
1909 {
1910 return this->value == data.value;
1911 }
1912 bool operator==(int data) const
1913 {
1914 return this->value == data;
1915 }
1916 bool operator<(const ReverseLimitTypeValue& data) const
1917 {
1918 return this->value < data.value;
1919 }
1920 bool operator<(int data) const
1921 {
1922 return this->value < data;
1923 }
1924};
1925
1926/**
1927 * \brief Determines where to poll the reverse limit switch. This defaults to
1928 * the reverse limit switch pin on the limit switch connector.
1929 *
1930 * Choose RemoteTalonFX to use the reverse limit switch attached to
1931 * another Talon FX on the same CAN bus (this also requires setting
1932 * ReverseLimitRemoteSensorID).
1933 *
1934 * Choose RemoteCANifier to use the reverse limit switch attached to
1935 * another CANifier on the same CAN bus (this also requires setting
1936 * ReverseLimitRemoteSensorID).
1937 *
1938 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
1939 * (this also requires setting ReverseLimitRemoteSensorID). The reverse
1940 * limit will assert when the CANcoder magnet strength changes from BAD
1941 * (red) to ADEQUATE (orange) or GOOD (green).
1942 */
1944{
1945public:
1947
1948 static constexpr int LimitSwitchPin = 0;
1949 static constexpr int RemoteTalonFX = 1;
1950 static constexpr int RemoteCANifier = 2;
1951 static constexpr int RemoteCANcoder = 4;
1952 static constexpr int Disabled = 3;
1953
1955 value{value}
1956 {}
1957
1959 value{-1}
1960 {}
1961
1962 /**
1963 * \brief Gets the string representation of this enum
1964 *
1965 * \returns String representation of this enum
1966 */
1967 std::string ToString() const
1968 {
1969 switch(value)
1970 {
1971 case ReverseLimitSourceValue::LimitSwitchPin: return "LimitSwitchPin";
1972 case ReverseLimitSourceValue::RemoteTalonFX: return "RemoteTalonFX";
1973 case ReverseLimitSourceValue::RemoteCANifier: return "RemoteCANifier";
1974 case ReverseLimitSourceValue::RemoteCANcoder: return "RemoteCANcoder";
1975 case ReverseLimitSourceValue::Disabled: return "Disabled";
1976 default: return "Invalid Value";
1977 }
1978 }
1979
1980 friend std::ostream& operator<<(std::ostream& os, const ReverseLimitSourceValue& data)
1981 {
1982 os << data.ToString();
1983 return os;
1984 }
1985
1986 std::string Serialize() const
1987 {
1988 std::stringstream ss;
1989 ss << "u_" << this->value;
1990 return ss.str();
1991 }
1992
1993 bool operator==(const ReverseLimitSourceValue& data) const
1994 {
1995 return this->value == data.value;
1996 }
1997 bool operator==(int data) const
1998 {
1999 return this->value == data;
2000 }
2001 bool operator<(const ReverseLimitSourceValue& data) const
2002 {
2003 return this->value < data.value;
2004 }
2005 bool operator<(int data) const
2006 {
2007 return this->value < data;
2008 }
2009};
2010
2011/**
2012 * \brief Magnet health as measured by CANcoder.
2013 *
2014 * \details Magnet health as measured by CANcoder. Red indicates too close or
2015 * too far, Orange is adequate but with reduced accuracy, green is
2016 * ideal. Invalid means the accuracy cannot be determined.
2017 */
2019{
2020public:
2022
2023 static constexpr int Magnet_Red = 1;
2024 static constexpr int Magnet_Orange = 2;
2025 static constexpr int Magnet_Green = 3;
2026 static constexpr int Magnet_Invalid = 0;
2027
2029 value{value}
2030 {}
2031
2033 value{-1}
2034 {}
2035
2036 /**
2037 * \brief Gets the string representation of this enum
2038 *
2039 * \returns String representation of this enum
2040 */
2041 std::string ToString() const
2042 {
2043 switch(value)
2044 {
2045 case MagnetHealthValue::Magnet_Red: return "Magnet_Red";
2046 case MagnetHealthValue::Magnet_Orange: return "Magnet_Orange";
2047 case MagnetHealthValue::Magnet_Green: return "Magnet_Green";
2048 case MagnetHealthValue::Magnet_Invalid: return "Magnet_Invalid";
2049 default: return "Invalid Value";
2050 }
2051 }
2052
2053 friend std::ostream& operator<<(std::ostream& os, const MagnetHealthValue& data)
2054 {
2055 os << data.ToString();
2056 return os;
2057 }
2058
2059 std::string Serialize() const
2060 {
2061 std::stringstream ss;
2062 ss << "u_" << this->value;
2063 return ss.str();
2064 }
2065
2066 bool operator==(const MagnetHealthValue& data) const
2067 {
2068 return this->value == data.value;
2069 }
2070 bool operator==(int data) const
2071 {
2072 return this->value == data;
2073 }
2074 bool operator<(const MagnetHealthValue& data) const
2075 {
2076 return this->value < data.value;
2077 }
2078 bool operator<(int data) const
2079 {
2080 return this->value < data;
2081 }
2082};
2083
2084/**
2085 * \brief The applied output of the bridge.
2086 */
2088{
2089public:
2091
2092 static constexpr int BridgeReq_Coast = 0;
2093 static constexpr int BridgeReq_Brake = 1;
2094 static constexpr int BridgeReq_Trapez = 6;
2095 static constexpr int BridgeReq_FOCTorque = 7;
2096 static constexpr int BridgeReq_MusicTone = 8;
2097 static constexpr int BridgeReq_FOCEasy = 9;
2098 static constexpr int BridgeReq_FaultBrake = 12;
2099 static constexpr int BridgeReq_FaultCoast = 13;
2100 static constexpr int BridgeReq_ActiveBrake = 14;
2101
2103 value{value}
2104 {}
2105
2107 value{-1}
2108 {}
2109
2110 /**
2111 * \brief Gets the string representation of this enum
2112 *
2113 * \returns String representation of this enum
2114 */
2115 std::string ToString() const
2116 {
2117 switch(value)
2118 {
2119 case BridgeOutputValue::BridgeReq_Coast: return "BridgeReq_Coast";
2120 case BridgeOutputValue::BridgeReq_Brake: return "BridgeReq_Brake";
2121 case BridgeOutputValue::BridgeReq_Trapez: return "BridgeReq_Trapez";
2122 case BridgeOutputValue::BridgeReq_FOCTorque: return "BridgeReq_FOCTorque";
2123 case BridgeOutputValue::BridgeReq_MusicTone: return "BridgeReq_MusicTone";
2124 case BridgeOutputValue::BridgeReq_FOCEasy: return "BridgeReq_FOCEasy";
2125 case BridgeOutputValue::BridgeReq_FaultBrake: return "BridgeReq_FaultBrake";
2126 case BridgeOutputValue::BridgeReq_FaultCoast: return "BridgeReq_FaultCoast";
2127 case BridgeOutputValue::BridgeReq_ActiveBrake: return "BridgeReq_ActiveBrake";
2128 default: return "Invalid Value";
2129 }
2130 }
2131
2132 friend std::ostream& operator<<(std::ostream& os, const BridgeOutputValue& data)
2133 {
2134 os << data.ToString();
2135 return os;
2136 }
2137
2138 std::string Serialize() const
2139 {
2140 std::stringstream ss;
2141 ss << "u_" << this->value;
2142 return ss.str();
2143 }
2144
2145 bool operator==(const BridgeOutputValue& data) const
2146 {
2147 return this->value == data.value;
2148 }
2149 bool operator==(int data) const
2150 {
2151 return this->value == data;
2152 }
2153 bool operator<(const BridgeOutputValue& data) const
2154 {
2155 return this->value < data.value;
2156 }
2157 bool operator<(int data) const
2158 {
2159 return this->value < data;
2160 }
2161};
2162
2163/**
2164 * \brief Choose what sensor source is used for differential control of a
2165 * mechanism. The default is Disabled. All other options require
2166 * setting the DifferentialTalonFXSensorID, as the average of this Talon
2167 * FX's sensor and the remote TalonFX's sensor is used for the
2168 * differential controller's primary targets.
2169 *
2170 * Choose RemoteTalonFX_Diff to use another TalonFX on the same CAN bus.
2171 * Talon FX will update its differential position and velocity whenever
2172 * the remote TalonFX publishes its information on CAN bus. The
2173 * differential controller will use the difference between this TalonFX's
2174 * sensor and the remote Talon FX's sensor for the differential component
2175 * of the output.
2176 *
2177 * Choose RemotePigeon2_Yaw, RemotePigeon2_Pitch, and RemotePigeon2_Roll
2178 * to use another Pigeon2 on the same CAN bus (this also requires setting
2179 * DifferentialRemoteSensorID). Talon FX will update its differential
2180 * position to match the selected value whenever Pigeon2 publishes its
2181 * information on CAN bus. Note that the Talon FX differential position
2182 * will be in rotations and not degrees.
2183 *
2184 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
2185 * (this also requires setting DifferentialRemoteSensorID). Talon FX
2186 * will update its differential position and velocity to match the
2187 * CANcoder whenever CANcoder publishes its information on CAN bus.
2188 */
2190{
2191public:
2193
2194 static constexpr int Disabled = 0;
2195 static constexpr int RemoteTalonFX_Diff = 1;
2196 static constexpr int RemotePigeon2_Yaw = 2;
2197 static constexpr int RemotePigeon2_Pitch = 3;
2198 static constexpr int RemotePigeon2_Roll = 4;
2199 static constexpr int RemoteCANcoder = 5;
2200
2202 value{value}
2203 {}
2204
2206 value{-1}
2207 {}
2208
2209 /**
2210 * \brief Gets the string representation of this enum
2211 *
2212 * \returns String representation of this enum
2213 */
2214 std::string ToString() const
2215 {
2216 switch(value)
2217 {
2218 case DifferentialSensorSourceValue::Disabled: return "Disabled";
2219 case DifferentialSensorSourceValue::RemoteTalonFX_Diff: return "RemoteTalonFX_Diff";
2220 case DifferentialSensorSourceValue::RemotePigeon2_Yaw: return "RemotePigeon2_Yaw";
2221 case DifferentialSensorSourceValue::RemotePigeon2_Pitch: return "RemotePigeon2_Pitch";
2222 case DifferentialSensorSourceValue::RemotePigeon2_Roll: return "RemotePigeon2_Roll";
2223 case DifferentialSensorSourceValue::RemoteCANcoder: return "RemoteCANcoder";
2224 default: return "Invalid Value";
2225 }
2226 }
2227
2228 friend std::ostream& operator<<(std::ostream& os, const DifferentialSensorSourceValue& data)
2229 {
2230 os << data.ToString();
2231 return os;
2232 }
2233
2234 std::string Serialize() const
2235 {
2236 std::stringstream ss;
2237 ss << "u_" << this->value;
2238 return ss.str();
2239 }
2240
2242 {
2243 return this->value == data.value;
2244 }
2245 bool operator==(int data) const
2246 {
2247 return this->value == data;
2248 }
2250 {
2251 return this->value < data.value;
2252 }
2253 bool operator<(int data) const
2254 {
2255 return this->value < data;
2256 }
2257};
2258
2259/**
2260 * \brief Static Feedforward Sign during position closed loop
2261 *
2262 * \details This determines the sign of the applied kS during position
2263 * closed-loop modes. The default behavior uses the velocity reference
2264 * sign. This works well with velocity closed loop, Motion Magic®
2265 * controls, and position closed loop when velocity reference is
2266 * specified (motion profiling).
2267 *
2268 * However, when using position closed loop with zero velocity
2269 * reference (no motion profiling), the application may want to apply
2270 * static feedforward based on the closed loop error sign instead. When
2271 * doing so, we recommend the minimal amount of kS, otherwise the motor
2272 * output may dither when closed loop error is near zero.
2273 */
2275{
2276public:
2278
2279 static constexpr int UseVelocitySign = 0;
2280 static constexpr int UseClosedLoopSign = 1;
2281
2283 value{value}
2284 {}
2285
2287 value{-1}
2288 {}
2289
2290 /**
2291 * \brief Gets the string representation of this enum
2292 *
2293 * \returns String representation of this enum
2294 */
2295 std::string ToString() const
2296 {
2297 switch(value)
2298 {
2299 case StaticFeedforwardSignValue::UseVelocitySign: return "UseVelocitySign";
2300 case StaticFeedforwardSignValue::UseClosedLoopSign: return "UseClosedLoopSign";
2301 default: return "Invalid Value";
2302 }
2303 }
2304
2305 friend std::ostream& operator<<(std::ostream& os, const StaticFeedforwardSignValue& data)
2306 {
2307 os << data.ToString();
2308 return os;
2309 }
2310
2311 std::string Serialize() const
2312 {
2313 std::stringstream ss;
2314 ss << "u_" << this->value;
2315 return ss.str();
2316 }
2317
2319 {
2320 return this->value == data.value;
2321 }
2322 bool operator==(int data) const
2323 {
2324 return this->value == data;
2325 }
2327 {
2328 return this->value < data.value;
2329 }
2330 bool operator<(int data) const
2331 {
2332 return this->value < data;
2333 }
2334};
2335
2336/**
2337 * \brief The type of motor attached to the Talon FX
2338 *
2339 * \details This can be used to determine what motor is attached to the Talon
2340 * FX. Return will be "Unknown" if firmware is too old or device is
2341 * not present.
2342 */
2344{
2345public:
2347
2348 static constexpr int Unknown = 0;
2349 static constexpr int Falcon500 = 1;
2350 static constexpr int KrakenX60 = 2;
2351
2353 value{value}
2354 {}
2355
2357 value{-1}
2358 {}
2359
2360 /**
2361 * \brief Gets the string representation of this enum
2362 *
2363 * \returns String representation of this enum
2364 */
2365 std::string ToString() const
2366 {
2367 switch(value)
2368 {
2369 case MotorTypeValue::Unknown: return "Unknown";
2370 case MotorTypeValue::Falcon500: return "Falcon500";
2371 case MotorTypeValue::KrakenX60: return "KrakenX60";
2372 default: return "Invalid Value";
2373 }
2374 }
2375
2376 friend std::ostream& operator<<(std::ostream& os, const MotorTypeValue& data)
2377 {
2378 os << data.ToString();
2379 return os;
2380 }
2381
2382 std::string Serialize() const
2383 {
2384 std::stringstream ss;
2385 ss << "u_" << this->value;
2386 return ss.str();
2387 }
2388
2389 bool operator==(const MotorTypeValue& data) const
2390 {
2391 return this->value == data.value;
2392 }
2393 bool operator==(int data) const
2394 {
2395 return this->value == data;
2396 }
2397 bool operator<(const MotorTypeValue& data) const
2398 {
2399 return this->value < data.value;
2400 }
2401 bool operator<(int data) const
2402 {
2403 return this->value < data;
2404 }
2405};
2406
2407/**
2408 * \brief Assess the status of the motor output with respect to load and supply.
2409 *
2410 * \details This routine can be used to determine the general status of motor
2411 * commutation. Off means that motor output is disabled.
2412 * StaticBraking typically means the motor is in neutral-brake.
2413 * Motoring means motor is loaded in a typical fashion, drawing current
2414 * from the supply, and successfully turning the rotor in the direction
2415 * of applied voltage. Discordant Motoring is the same as Motoring,
2416 * expect the rotor is being backdriven as the motor output is not
2417 * enough to defeat load forces. RegenBraking means the motor is
2418 * braking in such a way where motor current is traveling back to the
2419 * supply (typically a battery).
2420 */
2422{
2423public:
2425
2426 static constexpr int Unknown = 0;
2427 static constexpr int Off = 1;
2428 static constexpr int StaticBraking = 2;
2429 static constexpr int Motoring = 3;
2430 static constexpr int DiscordantMotoring = 4;
2431 static constexpr int RegenBraking = 5;
2432
2434 value{value}
2435 {}
2436
2438 value{-1}
2439 {}
2440
2441 /**
2442 * \brief Gets the string representation of this enum
2443 *
2444 * \returns String representation of this enum
2445 */
2446 std::string ToString() const
2447 {
2448 switch(value)
2449 {
2450 case MotorOutputStatusValue::Unknown: return "Unknown";
2451 case MotorOutputStatusValue::Off: return "Off";
2452 case MotorOutputStatusValue::StaticBraking: return "StaticBraking";
2453 case MotorOutputStatusValue::Motoring: return "Motoring";
2454 case MotorOutputStatusValue::DiscordantMotoring: return "DiscordantMotoring";
2455 case MotorOutputStatusValue::RegenBraking: return "RegenBraking";
2456 default: return "Invalid Value";
2457 }
2458 }
2459
2460 friend std::ostream& operator<<(std::ostream& os, const MotorOutputStatusValue& data)
2461 {
2462 os << data.ToString();
2463 return os;
2464 }
2465
2466 std::string Serialize() const
2467 {
2468 std::stringstream ss;
2469 ss << "u_" << this->value;
2470 return ss.str();
2471 }
2472
2473 bool operator==(const MotorOutputStatusValue& data) const
2474 {
2475 return this->value == data.value;
2476 }
2477 bool operator==(int data) const
2478 {
2479 return this->value == data;
2480 }
2481 bool operator<(const MotorOutputStatusValue& data) const
2482 {
2483 return this->value < data.value;
2484 }
2485 bool operator<(int data) const
2486 {
2487 return this->value < data;
2488 }
2489};
2490
2491
2492}
2493}
2494}
Definition: Serializable.hpp:15
The range of the absolute sensor in rotations, either [-0.5, 0.5) or [0, 1).
Definition: SpnEnums.hpp:750
bool operator<(const AbsoluteSensorRangeValue &data) const
Definition: SpnEnums.hpp:801
bool operator<(int data) const
Definition: SpnEnums.hpp:805
bool operator==(const AbsoluteSensorRangeValue &data) const
Definition: SpnEnums.hpp:793
AbsoluteSensorRangeValue(int value)
Definition: SpnEnums.hpp:757
bool operator==(int data) const
Definition: SpnEnums.hpp:797
std::string Serialize() const
Definition: SpnEnums.hpp:786
friend std::ostream & operator<<(std::ostream &os, const AbsoluteSensorRangeValue &data)
Definition: SpnEnums.hpp:780
static constexpr int Signed_PlusMinusHalf
Definition: SpnEnums.hpp:755
AbsoluteSensorRangeValue()
Definition: SpnEnums.hpp:761
static constexpr int Unsigned_0To1
Definition: SpnEnums.hpp:754
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:770
The applied rotor polarity.
Definition: SpnEnums.hpp:1011
bool operator==(int data) const
Definition: SpnEnums.hpp:1058
bool operator==(const AppliedRotorPolarityValue &data) const
Definition: SpnEnums.hpp:1054
std::string Serialize() const
Definition: SpnEnums.hpp:1047
AppliedRotorPolarityValue()
Definition: SpnEnums.hpp:1022
AppliedRotorPolarityValue(int value)
Definition: SpnEnums.hpp:1018
int value
Definition: SpnEnums.hpp:1013
bool operator<(const AppliedRotorPolarityValue &data) const
Definition: SpnEnums.hpp:1062
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1031
friend std::ostream & operator<<(std::ostream &os, const AppliedRotorPolarityValue &data)
Definition: SpnEnums.hpp:1041
static constexpr int PositiveIsClockwise
Definition: SpnEnums.hpp:1016
bool operator<(int data) const
Definition: SpnEnums.hpp:1066
static constexpr int PositiveIsCounterClockwise
Definition: SpnEnums.hpp:1015
The applied output of the bridge.
Definition: SpnEnums.hpp:2088
BridgeOutputValue()
Definition: SpnEnums.hpp:2106
bool operator<(int data) const
Definition: SpnEnums.hpp:2157
bool operator==(const BridgeOutputValue &data) const
Definition: SpnEnums.hpp:2145
static constexpr int BridgeReq_FaultCoast
Definition: SpnEnums.hpp:2099
static constexpr int BridgeReq_FOCEasy
Definition: SpnEnums.hpp:2097
std::string Serialize() const
Definition: SpnEnums.hpp:2138
static constexpr int BridgeReq_Trapez
Definition: SpnEnums.hpp:2094
bool operator==(int data) const
Definition: SpnEnums.hpp:2149
static constexpr int BridgeReq_ActiveBrake
Definition: SpnEnums.hpp:2100
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2115
static constexpr int BridgeReq_MusicTone
Definition: SpnEnums.hpp:2096
bool operator<(const BridgeOutputValue &data) const
Definition: SpnEnums.hpp:2153
friend std::ostream & operator<<(std::ostream &os, const BridgeOutputValue &data)
Definition: SpnEnums.hpp:2132
BridgeOutputValue(int value)
Definition: SpnEnums.hpp:2102
static constexpr int BridgeReq_Brake
Definition: SpnEnums.hpp:2093
static constexpr int BridgeReq_FOCTorque
Definition: SpnEnums.hpp:2095
int value
Definition: SpnEnums.hpp:2090
static constexpr int BridgeReq_FaultBrake
Definition: SpnEnums.hpp:2098
static constexpr int BridgeReq_Coast
Definition: SpnEnums.hpp:2092
The active control mode of the motor controller.
Definition: SpnEnums.hpp:1076
static constexpr int MotionMagicVoltage
Definition: SpnEnums.hpp:1094
static constexpr int PositionDutyCycle
Definition: SpnEnums.hpp:1084
static constexpr int Follower
Definition: SpnEnums.hpp:1103
static constexpr int MotionMagicExpoDutyCycleFOC
Definition: SpnEnums.hpp:1114
static constexpr int VelocityVoltage
Definition: SpnEnums.hpp:1093
bool operator==(const ControlModeValue &data) const
Definition: SpnEnums.hpp:1191
static constexpr int VoltageFOC
Definition: SpnEnums.hpp:1095
static constexpr int MotionMagicDutyCycleFOC
Definition: SpnEnums.hpp:1090
static constexpr int DutyCycleFOC
Definition: SpnEnums.hpp:1087
static constexpr int MusicTone
Definition: SpnEnums.hpp:1107
static constexpr int VelocityDutyCycleFOC
Definition: SpnEnums.hpp:1089
int value
Definition: SpnEnums.hpp:1078
static constexpr int MotionMagicExpoDutyCycle
Definition: SpnEnums.hpp:1113
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1132
static constexpr int MotionMagicVoltageFOC
Definition: SpnEnums.hpp:1098
static constexpr int CoastOut
Definition: SpnEnums.hpp:1105
static constexpr int DisabledOutput
Definition: SpnEnums.hpp:1080
static constexpr int NeutralOut
Definition: SpnEnums.hpp:1081
static constexpr int MotionMagicVelocityVoltageFOC
Definition: SpnEnums.hpp:1111
static constexpr int MotionMagicExpoVoltage
Definition: SpnEnums.hpp:1115
static constexpr int VoltageOut
Definition: SpnEnums.hpp:1091
static constexpr int MotionMagicExpoTorqueCurrentFOC
Definition: SpnEnums.hpp:1117
static constexpr int VelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1101
bool operator<(const ControlModeValue &data) const
Definition: SpnEnums.hpp:1199
static constexpr int MotionMagicExpoVoltageFOC
Definition: SpnEnums.hpp:1116
std::string Serialize() const
Definition: SpnEnums.hpp:1184
friend std::ostream & operator<<(std::ostream &os, const ControlModeValue &data)
Definition: SpnEnums.hpp:1178
static constexpr int MotionMagicVelocityVoltage
Definition: SpnEnums.hpp:1110
static constexpr int MotionMagicVelocityDutyCycle
Definition: SpnEnums.hpp:1108
ControlModeValue()
Definition: SpnEnums.hpp:1123
static constexpr int PositionVoltage
Definition: SpnEnums.hpp:1092
ControlModeValue(int value)
Definition: SpnEnums.hpp:1119
static constexpr int PositionTorqueCurrentFOC
Definition: SpnEnums.hpp:1100
static constexpr int VelocityVoltageFOC
Definition: SpnEnums.hpp:1097
static constexpr int Reserved
Definition: SpnEnums.hpp:1104
static constexpr int MotionMagicTorqueCurrentFOC
Definition: SpnEnums.hpp:1102
static constexpr int PositionVoltageFOC
Definition: SpnEnums.hpp:1096
static constexpr int MotionMagicDutyCycle
Definition: SpnEnums.hpp:1086
static constexpr int PositionDutyCycleFOC
Definition: SpnEnums.hpp:1088
bool operator==(int data) const
Definition: SpnEnums.hpp:1195
static constexpr int TorqueCurrentFOC
Definition: SpnEnums.hpp:1099
bool operator<(int data) const
Definition: SpnEnums.hpp:1203
static constexpr int UnauthorizedDevice
Definition: SpnEnums.hpp:1106
static constexpr int StaticBrake
Definition: SpnEnums.hpp:1082
static constexpr int MotionMagicVelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1112
static constexpr int VelocityDutyCycle
Definition: SpnEnums.hpp:1085
static constexpr int DutyCycleOut
Definition: SpnEnums.hpp:1083
static constexpr int MotionMagicVelocityDutyCycleFOC
Definition: SpnEnums.hpp:1109
Whether the device is enabled.
Definition: SpnEnums.hpp:815
std::string Serialize() const
Definition: SpnEnums.hpp:851
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:835
DeviceEnableValue(int value)
Definition: SpnEnums.hpp:822
int value
Definition: SpnEnums.hpp:817
bool operator<(int data) const
Definition: SpnEnums.hpp:870
static constexpr int Enabled
Definition: SpnEnums.hpp:819
DeviceEnableValue()
Definition: SpnEnums.hpp:826
bool operator==(int data) const
Definition: SpnEnums.hpp:862
bool operator<(const DeviceEnableValue &data) const
Definition: SpnEnums.hpp:866
friend std::ostream & operator<<(std::ostream &os, const DeviceEnableValue &data)
Definition: SpnEnums.hpp:845
bool operator==(const DeviceEnableValue &data) const
Definition: SpnEnums.hpp:858
static constexpr int Disabled
Definition: SpnEnums.hpp:820
The active control mode of the differential controller.
Definition: SpnEnums.hpp:1279
static constexpr int MotionMagicVoltage
Definition: SpnEnums.hpp:1297
static constexpr int NeutralOut
Definition: SpnEnums.hpp:1284
static constexpr int PositionDutyCycle
Definition: SpnEnums.hpp:1287
DifferentialControlModeValue()
Definition: SpnEnums.hpp:1314
static constexpr int VelocityTorqueCurrentFOC
Definition: SpnEnums.hpp:1304
static constexpr int Reserved
Definition: SpnEnums.hpp:1307
friend std::ostream & operator<<(std::ostream &os, const DifferentialControlModeValue &data)
Definition: SpnEnums.hpp:1357
static constexpr int PositionVoltageFOC
Definition: SpnEnums.hpp:1299
static constexpr int MotionMagicTorqueCurrentFOC
Definition: SpnEnums.hpp:1305
static constexpr int VelocityDutyCycleFOC
Definition: SpnEnums.hpp:1292
bool operator==(const DifferentialControlModeValue &data) const
Definition: SpnEnums.hpp:1370
static constexpr int TorqueCurrentFOC
Definition: SpnEnums.hpp:1302
bool operator<(int data) const
Definition: SpnEnums.hpp:1382
static constexpr int VoltageOut
Definition: SpnEnums.hpp:1294
static constexpr int VelocityVoltageFOC
Definition: SpnEnums.hpp:1300
static constexpr int MotionMagicDutyCycleFOC
Definition: SpnEnums.hpp:1293
static constexpr int MotionMagicVoltageFOC
Definition: SpnEnums.hpp:1301
static constexpr int Follower
Definition: SpnEnums.hpp:1306
static constexpr int DisabledOutput
Definition: SpnEnums.hpp:1283
DifferentialControlModeValue(int value)
Definition: SpnEnums.hpp:1310
static constexpr int VoltageFOC
Definition: SpnEnums.hpp:1298
bool operator<(const DifferentialControlModeValue &data) const
Definition: SpnEnums.hpp:1378
static constexpr int DutyCycleOut
Definition: SpnEnums.hpp:1286
std::string Serialize() const
Definition: SpnEnums.hpp:1363
static constexpr int PositionVoltage
Definition: SpnEnums.hpp:1295
static constexpr int StaticBrake
Definition: SpnEnums.hpp:1285
static constexpr int PositionTorqueCurrentFOC
Definition: SpnEnums.hpp:1303
bool operator==(int data) const
Definition: SpnEnums.hpp:1374
static constexpr int MotionMagicDutyCycle
Definition: SpnEnums.hpp:1289
static constexpr int VelocityDutyCycle
Definition: SpnEnums.hpp:1288
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1323
static constexpr int PositionDutyCycleFOC
Definition: SpnEnums.hpp:1291
static constexpr int CoastOut
Definition: SpnEnums.hpp:1308
static constexpr int DutyCycleFOC
Definition: SpnEnums.hpp:1290
static constexpr int VelocityVoltage
Definition: SpnEnums.hpp:1296
Choose what sensor source is used for differential control of a mechanism.
Definition: SpnEnums.hpp:2190
static constexpr int Disabled
Definition: SpnEnums.hpp:2194
static constexpr int RemoteTalonFX_Diff
Definition: SpnEnums.hpp:2195
bool operator<(int data) const
Definition: SpnEnums.hpp:2253
friend std::ostream & operator<<(std::ostream &os, const DifferentialSensorSourceValue &data)
Definition: SpnEnums.hpp:2228
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:2199
static constexpr int RemotePigeon2_Pitch
Definition: SpnEnums.hpp:2197
bool operator==(const DifferentialSensorSourceValue &data) const
Definition: SpnEnums.hpp:2241
static constexpr int RemotePigeon2_Roll
Definition: SpnEnums.hpp:2198
static constexpr int RemotePigeon2_Yaw
Definition: SpnEnums.hpp:2196
bool operator<(const DifferentialSensorSourceValue &data) const
Definition: SpnEnums.hpp:2249
DifferentialSensorSourceValue()
Definition: SpnEnums.hpp:2205
std::string Serialize() const
Definition: SpnEnums.hpp:2234
DifferentialSensorSourceValue(int value)
Definition: SpnEnums.hpp:2201
bool operator==(int data) const
Definition: SpnEnums.hpp:2245
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2214
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition: SpnEnums.hpp:1638
FeedbackSensorSourceValue()
Definition: SpnEnums.hpp:1654
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1643
static constexpr int RemotePigeon2_Pitch
Definition: SpnEnums.hpp:1645
static constexpr int RemotePigeon2_Yaw
Definition: SpnEnums.hpp:1644
static constexpr int RemotePigeon2_Roll
Definition: SpnEnums.hpp:1646
int value
Definition: SpnEnums.hpp:1640
friend std::ostream & operator<<(std::ostream &os, const FeedbackSensorSourceValue &data)
Definition: SpnEnums.hpp:1678
static constexpr int SyncCANcoder
Definition: SpnEnums.hpp:1648
static constexpr int RotorSensor
Definition: SpnEnums.hpp:1642
bool operator==(int data) const
Definition: SpnEnums.hpp:1695
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1663
bool operator==(const FeedbackSensorSourceValue &data) const
Definition: SpnEnums.hpp:1691
std::string Serialize() const
Definition: SpnEnums.hpp:1684
static constexpr int FusedCANcoder
Definition: SpnEnums.hpp:1647
bool operator<(int data) const
Definition: SpnEnums.hpp:1703
FeedbackSensorSourceValue(int value)
Definition: SpnEnums.hpp:1650
bool operator<(const FeedbackSensorSourceValue &data) const
Definition: SpnEnums.hpp:1699
Determines where to poll the forward limit switch.
Definition: SpnEnums.hpp:1793
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1797
std::string Serialize() const
Definition: SpnEnums.hpp:1835
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitSourceValue &data)
Definition: SpnEnums.hpp:1829
ForwardLimitSourceValue()
Definition: SpnEnums.hpp:1807
static constexpr int RemoteTalonFX
Definition: SpnEnums.hpp:1798
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1816
bool operator==(int data) const
Definition: SpnEnums.hpp:1846
static constexpr int RemoteCANifier
Definition: SpnEnums.hpp:1799
ForwardLimitSourceValue(int value)
Definition: SpnEnums.hpp:1803
bool operator<(int data) const
Definition: SpnEnums.hpp:1854
int value
Definition: SpnEnums.hpp:1795
bool operator<(const ForwardLimitSourceValue &data) const
Definition: SpnEnums.hpp:1850
static constexpr int Disabled
Definition: SpnEnums.hpp:1801
bool operator==(const ForwardLimitSourceValue &data) const
Definition: SpnEnums.hpp:1842
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1800
Determines if the forward limit switch is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1714
bool operator==(int data) const
Definition: SpnEnums.hpp:1761
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:1719
bool operator==(const ForwardLimitTypeValue &data) const
Definition: SpnEnums.hpp:1757
ForwardLimitTypeValue(int value)
Definition: SpnEnums.hpp:1721
bool operator<(const ForwardLimitTypeValue &data) const
Definition: SpnEnums.hpp:1765
bool operator<(int data) const
Definition: SpnEnums.hpp:1769
ForwardLimitTypeValue()
Definition: SpnEnums.hpp:1725
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitTypeValue &data)
Definition: SpnEnums.hpp:1744
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1734
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1718
std::string Serialize() const
Definition: SpnEnums.hpp:1750
int value
Definition: SpnEnums.hpp:1716
Forward Limit Pin.
Definition: SpnEnums.hpp:880
friend std::ostream & operator<<(std::ostream &os, const ForwardLimitValue &data)
Definition: SpnEnums.hpp:910
bool operator==(const ForwardLimitValue &data) const
Definition: SpnEnums.hpp:923
bool operator<(const ForwardLimitValue &data) const
Definition: SpnEnums.hpp:931
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:884
ForwardLimitValue()
Definition: SpnEnums.hpp:891
std::string Serialize() const
Definition: SpnEnums.hpp:916
int value
Definition: SpnEnums.hpp:882
ForwardLimitValue(int value)
Definition: SpnEnums.hpp:887
bool operator<(int data) const
Definition: SpnEnums.hpp:935
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:900
bool operator==(int data) const
Definition: SpnEnums.hpp:927
static constexpr int Open
Definition: SpnEnums.hpp:885
Whether 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/Feedback Type.
Definition: SpnEnums.hpp:1406
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1426
bool operator==(const GravityTypeValue &data) const
Definition: SpnEnums.hpp:1449
static constexpr int Elevator_Static
Definition: SpnEnums.hpp:1410
int value
Definition: SpnEnums.hpp:1408
friend std::ostream & operator<<(std::ostream &os, const GravityTypeValue &data)
Definition: SpnEnums.hpp:1436
std::string Serialize() const
Definition: SpnEnums.hpp:1442
GravityTypeValue(int value)
Definition: SpnEnums.hpp:1413
bool operator<(const GravityTypeValue &data) const
Definition: SpnEnums.hpp:1457
bool operator<(int data) const
Definition: SpnEnums.hpp:1461
static constexpr int Arm_Cosine
Definition: SpnEnums.hpp:1411
bool operator==(int data) const
Definition: SpnEnums.hpp:1453
GravityTypeValue()
Definition: SpnEnums.hpp:1417
Invert state of the device.
Definition: SpnEnums.hpp:1471
bool operator<(const InvertedValue &data) const
Definition: SpnEnums.hpp:1522
static constexpr int CounterClockwise_Positive
Definition: SpnEnums.hpp:1475
friend std::ostream & operator<<(std::ostream &os, const InvertedValue &data)
Definition: SpnEnums.hpp:1501
int value
Definition: SpnEnums.hpp:1473
static constexpr int Clockwise_Positive
Definition: SpnEnums.hpp:1476
std::string Serialize() const
Definition: SpnEnums.hpp:1507
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1491
InvertedValue()
Definition: SpnEnums.hpp:1482
InvertedValue(int value)
Definition: SpnEnums.hpp:1478
bool operator==(int data) const
Definition: SpnEnums.hpp:1518
bool operator<(int data) const
Definition: SpnEnums.hpp:1526
bool operator==(const InvertedValue &data) const
Definition: SpnEnums.hpp:1514
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:2019
static constexpr int Magnet_Orange
Definition: SpnEnums.hpp:2024
friend std::ostream & operator<<(std::ostream &os, const MagnetHealthValue &data)
Definition: SpnEnums.hpp:2053
bool operator==(const MagnetHealthValue &data) const
Definition: SpnEnums.hpp:2066
bool operator<(int data) const
Definition: SpnEnums.hpp:2078
MagnetHealthValue(int value)
Definition: SpnEnums.hpp:2028
bool operator==(int data) const
Definition: SpnEnums.hpp:2070
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2041
static constexpr int Magnet_Red
Definition: SpnEnums.hpp:2023
static constexpr int Magnet_Green
Definition: SpnEnums.hpp:2025
std::string Serialize() const
Definition: SpnEnums.hpp:2059
int value
Definition: SpnEnums.hpp:2021
bool operator<(const MagnetHealthValue &data) const
Definition: SpnEnums.hpp:2074
static constexpr int Magnet_Invalid
Definition: SpnEnums.hpp:2026
MagnetHealthValue()
Definition: SpnEnums.hpp:2032
Check if Motion Magic® is running.
Definition: SpnEnums.hpp:1214
int value
Definition: SpnEnums.hpp:1216
bool operator<(int data) const
Definition: SpnEnums.hpp:1269
bool operator<(const MotionMagicIsRunningValue &data) const
Definition: SpnEnums.hpp:1265
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1234
bool operator==(const MotionMagicIsRunningValue &data) const
Definition: SpnEnums.hpp:1257
std::string Serialize() const
Definition: SpnEnums.hpp:1250
static constexpr int Disabled
Definition: SpnEnums.hpp:1219
MotionMagicIsRunningValue(int value)
Definition: SpnEnums.hpp:1221
friend std::ostream & operator<<(std::ostream &os, const MotionMagicIsRunningValue &data)
Definition: SpnEnums.hpp:1244
bool operator==(int data) const
Definition: SpnEnums.hpp:1261
MotionMagicIsRunningValue()
Definition: SpnEnums.hpp:1225
static constexpr int Enabled
Definition: SpnEnums.hpp:1218
Assess the status of the motor output with respect to load and supply.
Definition: SpnEnums.hpp:2422
bool operator<(int data) const
Definition: SpnEnums.hpp:2485
std::string Serialize() const
Definition: SpnEnums.hpp:2466
bool operator==(const MotorOutputStatusValue &data) const
Definition: SpnEnums.hpp:2473
MotorOutputStatusValue()
Definition: SpnEnums.hpp:2437
static constexpr int RegenBraking
Definition: SpnEnums.hpp:2431
static constexpr int Off
Definition: SpnEnums.hpp:2427
static constexpr int Motoring
Definition: SpnEnums.hpp:2429
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2446
bool operator<(const MotorOutputStatusValue &data) const
Definition: SpnEnums.hpp:2481
MotorOutputStatusValue(int value)
Definition: SpnEnums.hpp:2433
static constexpr int StaticBraking
Definition: SpnEnums.hpp:2428
int value
Definition: SpnEnums.hpp:2424
bool operator==(int data) const
Definition: SpnEnums.hpp:2477
static constexpr int Unknown
Definition: SpnEnums.hpp:2426
friend std::ostream & operator<<(std::ostream &os, const MotorOutputStatusValue &data)
Definition: SpnEnums.hpp:2460
static constexpr int DiscordantMotoring
Definition: SpnEnums.hpp:2430
The type of motor attached to the Talon FX.
Definition: SpnEnums.hpp:2344
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2365
MotorTypeValue(int value)
Definition: SpnEnums.hpp:2352
friend std::ostream & operator<<(std::ostream &os, const MotorTypeValue &data)
Definition: SpnEnums.hpp:2376
std::string Serialize() const
Definition: SpnEnums.hpp:2382
bool operator<(const MotorTypeValue &data) const
Definition: SpnEnums.hpp:2397
int value
Definition: SpnEnums.hpp:2346
bool operator<(int data) const
Definition: SpnEnums.hpp:2401
static constexpr int KrakenX60
Definition: SpnEnums.hpp:2350
bool operator==(const MotorTypeValue &data) const
Definition: SpnEnums.hpp:2389
bool operator==(int data) const
Definition: SpnEnums.hpp:2393
MotorTypeValue()
Definition: SpnEnums.hpp:2356
static constexpr int Falcon500
Definition: SpnEnums.hpp:2349
static constexpr int Unknown
Definition: SpnEnums.hpp:2348
The state of the motor controller bridge when output is neutral or disabled.
Definition: SpnEnums.hpp:1537
friend std::ostream & operator<<(std::ostream &os, const NeutralModeValue &data)
Definition: SpnEnums.hpp:1567
bool operator==(int data) const
Definition: SpnEnums.hpp:1584
std::string Serialize() const
Definition: SpnEnums.hpp:1573
bool operator<(const NeutralModeValue &data) const
Definition: SpnEnums.hpp:1588
static constexpr int Brake
Definition: SpnEnums.hpp:1542
NeutralModeValue()
Definition: SpnEnums.hpp:1548
int value
Definition: SpnEnums.hpp:1539
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1557
static constexpr int Coast
Definition: SpnEnums.hpp:1541
NeutralModeValue(int value)
Definition: SpnEnums.hpp:1544
bool operator==(const NeutralModeValue &data) const
Definition: SpnEnums.hpp:1580
bool operator<(int data) const
Definition: SpnEnums.hpp:1592
Determines where to poll the reverse limit switch.
Definition: SpnEnums.hpp:1944
static constexpr int RemoteTalonFX
Definition: SpnEnums.hpp:1949
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1967
static constexpr int RemoteCANcoder
Definition: SpnEnums.hpp:1951
ReverseLimitSourceValue(int value)
Definition: SpnEnums.hpp:1954
std::string Serialize() const
Definition: SpnEnums.hpp:1986
int value
Definition: SpnEnums.hpp:1946
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitSourceValue &data)
Definition: SpnEnums.hpp:1980
static constexpr int RemoteCANifier
Definition: SpnEnums.hpp:1950
static constexpr int LimitSwitchPin
Definition: SpnEnums.hpp:1948
ReverseLimitSourceValue()
Definition: SpnEnums.hpp:1958
bool operator<(const ReverseLimitSourceValue &data) const
Definition: SpnEnums.hpp:2001
static constexpr int Disabled
Definition: SpnEnums.hpp:1952
bool operator<(int data) const
Definition: SpnEnums.hpp:2005
bool operator==(int data) const
Definition: SpnEnums.hpp:1997
bool operator==(const ReverseLimitSourceValue &data) const
Definition: SpnEnums.hpp:1993
Determines if the reverse limit switch is normally-open (default) or normally-closed.
Definition: SpnEnums.hpp:1865
static constexpr int NormallyClosed
Definition: SpnEnums.hpp:1870
bool operator==(const ReverseLimitTypeValue &data) const
Definition: SpnEnums.hpp:1908
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitTypeValue &data)
Definition: SpnEnums.hpp:1895
bool operator<(int data) const
Definition: SpnEnums.hpp:1920
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:1885
ReverseLimitTypeValue()
Definition: SpnEnums.hpp:1876
bool operator<(const ReverseLimitTypeValue &data) const
Definition: SpnEnums.hpp:1916
bool operator==(int data) const
Definition: SpnEnums.hpp:1912
static constexpr int NormallyOpen
Definition: SpnEnums.hpp:1869
std::string Serialize() const
Definition: SpnEnums.hpp:1901
int value
Definition: SpnEnums.hpp:1867
ReverseLimitTypeValue(int value)
Definition: SpnEnums.hpp:1872
Reverse Limit Pin.
Definition: SpnEnums.hpp:945
friend std::ostream & operator<<(std::ostream &os, const ReverseLimitValue &data)
Definition: SpnEnums.hpp:975
static constexpr int Open
Definition: SpnEnums.hpp:950
int value
Definition: SpnEnums.hpp:947
std::string Serialize() const
Definition: SpnEnums.hpp:981
ReverseLimitValue()
Definition: SpnEnums.hpp:956
bool operator==(int data) const
Definition: SpnEnums.hpp:992
ReverseLimitValue(int value)
Definition: SpnEnums.hpp:952
bool operator==(const ReverseLimitValue &data) const
Definition: SpnEnums.hpp:988
static constexpr int ClosedToGround
Definition: SpnEnums.hpp:949
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:965
bool operator<(int data) const
Definition: SpnEnums.hpp:1000
bool operator<(const ReverseLimitValue &data) const
Definition: SpnEnums.hpp:996
Whether 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 rotation, as seen 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:2275
std::string Serialize() const
Definition: SpnEnums.hpp:2311
bool operator==(int data) const
Definition: SpnEnums.hpp:2322
friend std::ostream & operator<<(std::ostream &os, const StaticFeedforwardSignValue &data)
Definition: SpnEnums.hpp:2305
StaticFeedforwardSignValue()
Definition: SpnEnums.hpp:2286
std::string ToString() const
Gets the string representation of this enum.
Definition: SpnEnums.hpp:2295
bool operator<(int data) const
Definition: SpnEnums.hpp:2330
bool operator==(const StaticFeedforwardSignValue &data) const
Definition: SpnEnums.hpp:2318
bool operator<(const StaticFeedforwardSignValue &data) const
Definition: SpnEnums.hpp:2326
static constexpr int UseVelocitySign
Definition: SpnEnums.hpp:2279
static constexpr int UseClosedLoopSign
Definition: SpnEnums.hpp:2280
StaticFeedforwardSignValue(int value)
Definition: SpnEnums.hpp:2282
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: string_util.hpp:15