CTRE Phoenix 6 C++ 26.3.0
Loading...
Searching...
No Matches
StatusCodes.h
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
9#ifdef __cplusplus
10
11/* Make sure this is still compiled with C++ linkage
12 * when included from an `extern "C"` block */
13extern "C++" {
14
15#if __has_include("ctre/phoenix/export.h")
16#include "ctre/phoenix/export.h"
17#endif
18#include <compare>
19#include <iosfwd>
20
21namespace ctre {
22namespace phoenix {
23
24 /**
25 * \brief Status codes reported by APIs, including OK,
26 * warnings, and errors.
27 */
28 class StatusCode {
29 int value;
30
31 public:
32 /**
33 * \brief No Error
34 */
35 static constexpr int OK = 0;
36 /**
37 * \brief Diagnostic Server is busy with another command.
38 */
39 static constexpr int TaskIsBusy = -100;
40 /**
41 * \brief InvalidDeviceSpec
42 */
43 static constexpr int InvalidDeviceSpec = -101;
44 /**
45 * \brief Device is not present. Verify the device is connected and powered, and
46 * that the CAN bus is terminated.
47 */
48 static constexpr int EcuIsNotPresent = -102;
49 /**
50 * \brief Could not put the device into bootloader mode.
51 */
52 static constexpr int CouldNotEnterBl = -103;
53 /**
54 * \brief Could not confirm the device has entered the bootloader.
55 */
56 static constexpr int CouldNotConfirmBl = -104;
57 /**
58 * \brief Could not erase flash.
59 */
60 static constexpr int CouldNotErase = -105;
61 /**
62 * \brief Could not field upgrade the device.
63 */
64 static constexpr int CouldNotSendFlash = -106;
65 /**
66 * \brief Bootloader could not verify integrity of the flashed application.
67 */
68 static constexpr int CouldNotValidate = -107;
69 /**
70 * \brief Could not run the device firmware application.
71 */
72 static constexpr int CouldNotRunApp = -108;
73 /**
74 * \brief Unable to set ID to this device. Confirm that this action is valid for
75 * this device and the ID is valid (0-62).
76 */
77 static constexpr int CouldNotReqSetId = -109;
78 /**
79 * \brief Could not verify that the changed ID took effect.
80 */
81 static constexpr int CouldNotConfirmId = -110;
82 /**
83 * \brief Device field upgrade was successful.
84 */
85 static constexpr int FlashWasGood = -111;
86 /**
87 * \brief Device firmware application is too old.
88 */
89 static constexpr int AppTooOld = -112;
90 /**
91 * \brief Unable to set name to this device.
92 */
93 static constexpr int CouldNotReqSetDesc = -113;
94 /**
95 * \brief CompileSzIsWrong
96 */
97 static constexpr int CompileSzIsWrong = -114;
98 /**
99 * \brief Cannot set the ID of a gadgeteer device.
100 */
101 static constexpr int GadgeteerDeviceNoSetId = -115;
102 /**
103 * \brief This diagnostic action is not supported.
104 */
105 static constexpr int InvalidTask = -116;
106 /**
107 * \brief Not Implemented, check latest installer.
108 */
109 static constexpr int NotImplemented = -117;
110 /**
111 * \brief NoDevicesOnBus
112 */
113 static constexpr int NoDevicesOnBus = -118;
114 /**
115 * \brief MoreThanOneFile
116 */
117 static constexpr int MoreThanOneFile = -119;
118 /**
119 * \brief Specified device was not found. Verify the device is connected and
120 * powered, and that the CAN bus is terminated.
121 */
122 static constexpr int NodeIsInvalid = -120;
123 /**
124 * \brief InvalidDeviceDescriptor
125 */
126 static constexpr int InvalidDeviceDescriptor = -121;
127 /**
128 * \brief CouldNotSendCanFrame
129 */
130 static constexpr int CouldNotSendCanFrame = -123;
131 /**
132 * \brief NormalModeMsgNotPresent
133 */
134 static constexpr int NormalModeMsgNotPresent = -124;
135 /**
136 * \brief This feature is not supported.
137 */
138 static constexpr int FeatureNotSupported = -125;
139 /**
140 * \brief The diagnostic server is not field upgrading any devices.
141 */
142 static constexpr int NotUpdating = -126;
143 /**
144 * \brief CorruptedPOST
145 */
146 static constexpr int CorruptedPOST = -127;
147 /**
148 * \brief This device did not report any available configs. Verify firmware and
149 * diagnostics are up-to-date.
150 */
151 static constexpr int NoConfigs = -128;
152 /**
153 * \brief ConfigFailed
154 */
155 static constexpr int ConfigFailed = -129;
156 /**
157 * \brief Unable to factory default this device.
158 */
159 static constexpr int CouldNotReqFactoryDefault = -130;
160 /**
161 * \brief CustomNameNotSupported
162 */
163 static constexpr int CustomNameNotSupported = -131;
164 /**
165 * \brief The configs read from the device do not match the configs that were
166 * written.
167 */
168 static constexpr int ConfigReadWriteMismatch = -132;
169 /**
170 * \brief Could not apply the device configs.
171 */
172 static constexpr int CouldNotReqSetConfigs = -133;
173 /**
174 * \brief InsufficientSz
175 */
176 static constexpr int InsufficientSz = -134;
177 /**
178 * \brief This feature is not supported for this device model.
179 */
180 static constexpr int InvalidModel = -135;
181 /**
182 * \brief CouldNotReqDevInfo
183 */
184 static constexpr int CouldNotReqDevInfo = -140;
185 /**
186 * \brief This device does not support new controls.
187 */
188 static constexpr int NoControls = -141;
189 /**
190 * \brief DeviceIsNull
191 */
192 static constexpr int DeviceIsNull = -142;
193 /**
194 * \brief DeviceDidNotRespondToDiagReq
195 */
196 static constexpr int DeviceDidNotRespondToDiagReq = -143;
197 /**
198 * \brief This feature requires Tuner X.
199 */
200 static constexpr int OnlySupportedInTunerX = -144;
201 /**
202 * \brief Command-line issue with caniv.
203 */
204 static constexpr int CanivCliError = -145;
205 /**
206 * \brief InvalidCrfBadHeader
207 */
208 static constexpr int InvalidCrfBadHeader = -200;
209 /**
210 * \brief InvalidCrfFileSzInvald
211 */
212 static constexpr int InvalidCrfFileSzInvald = -201;
213 /**
214 * \brief Specified CRF is for the wrong product.
215 */
216 static constexpr int InvalidCrfWrongProduct = -202;
217 /**
218 * \brief InvalidCrfNoSects
219 */
220 static constexpr int InvalidCrfNoSects = -203;
221 /**
222 * \brief InvalidCrfBadSectHeader
223 */
224 static constexpr int InvalidCrfBadSectHeader = -204;
225 /**
226 * \brief InvalidCrfBadSectSize
227 */
228 static constexpr int InvalidCrfBadSectSize = -205;
229 /**
230 * \brief Specified CRF file could not be found.
231 */
232 static constexpr int NoCrfFile = -206;
233 /**
234 * \brief CouldNotFindDynamicId
235 */
236 static constexpr int CouldNotFindDynamicId = -300;
237 /**
238 * \brief DidNotGetDhcp
239 */
240 static constexpr int DidNotGetDhcp = -301;
241 /**
242 * \brief DidNotGetFullDhcp
243 */
244 static constexpr int DidNotGetFullDhcp = -302;
245 /**
246 * \brief InvalidLicenseResp
247 */
248 static constexpr int InvalidLicenseResp = -350;
249 /**
250 * \brief InvalidCanivCache
251 */
252 static constexpr int InvalidCanivCache = -351;
253 /**
254 * \brief CannotOpenSerialPort
255 */
256 static constexpr int CannotOpenSerialPort = -500;
257 /**
258 * \brief CannotWriteSerialPort
259 */
260 static constexpr int CannotWriteSerialPort = -501;
261 /**
262 * \brief CannotReadSerialPort
263 */
264 static constexpr int CannotReadSerialPort = -502;
265 /**
266 * \brief CannotSerialToDevice
267 */
268 static constexpr int CannotSerialToDevice = -503;
269 /**
270 * \brief NoSerialControlFrameResp
271 */
272 static constexpr int NoSerialControlFrameResp = -504;
273 /**
274 * \brief CannotOpenUdpPort
275 */
276 static constexpr int CannotOpenUdpPort = -600;
277 /**
278 * \brief CannotWriteUdpPort
279 */
280 static constexpr int CannotWriteUdpPort = -601;
281 /**
282 * \brief CannotReadUdpPort
283 */
284 static constexpr int CannotReadUdpPort = -602;
285 /**
286 * \brief CannotUdpToDevice
287 */
288 static constexpr int CannotUdpToDevice = -603;
289 /**
290 * \brief NoUdpControlFrameResp
291 */
292 static constexpr int NoUdpControlFrameResp = -604;
293 /**
294 * \brief TimeoutIso15Response
295 */
296 static constexpr int TimeoutIso15Response = -605;
297 /**
298 * \brief InvalidJson
299 */
300 static constexpr int InvalidJson = -700;
301 /**
302 * \brief The user application is shutting down.
303 */
304 static constexpr int AppIsTerminating = -800;
305 /**
306 * \brief CAN message is stale, data is valid but old. Check the CAN bus wiring,
307 * CAN bus utilization, and power to the device.
308 */
309 static constexpr int CanMessageStale = 1000;
310 /**
311 * \brief Buffer is full, cannot insert more data.
312 */
313 static constexpr int BufferFull = 1006;
314 /**
315 * \brief PulseWidthSensorNotPresent
316 */
317 static constexpr int PulseWidthSensorNotPresent = 1010;
318 /**
319 * \brief General Warning Occurred.
320 */
321 static constexpr int GeneralWarning = 1100;
322 /**
323 * \brief Firm Vers could not be retrieved. Use Phoenix Tuner X to check ID and
324 * firmware(CRF) version.
325 */
326 static constexpr int FirmVersionCouldNotBeRetrieved = 1103;
327 /**
328 * \brief This feature will be supported in a future update.
329 */
330 static constexpr int FeaturesNotAvailableYet = 1104;
331 /**
332 * \brief The control mode is not valid for this function.
333 */
334 static constexpr int ControlModeNotValid = 1105;
335 /**
336 * \brief This control mode is not supported yet. A future release will
337 * supported this soon.
338 */
339 static constexpr int ControlModeNotSupportedYet = 1106;
340 /**
341 * \brief Motor Controller must have >= 3.2 firmware for motion profile control
342 * mode.
343 */
344 static constexpr int MotProfFirmThreshold = 1109;
345 /**
346 * \brief Motor Controller must have >= 3.4 firmware for advanced PID0/PID1
347 * features.
348 */
349 static constexpr int MotProfFirmThreshold2 = 1110;
350 /**
351 * \brief SimDeviceNotFound
352 */
353 static constexpr int SimDeviceNotFound = 1200;
354 /**
355 * \brief SimPhysicsTypeNotSupported
356 */
357 static constexpr int SimPhysicsTypeNotSupported = 1201;
358 /**
359 * \brief SimDeviceAlreadyExists
360 */
361 static constexpr int SimDeviceAlreadyExists = 1202;
362 /**
363 * \brief Could not transmit CAN Frame.
364 */
365 static constexpr int TxFailed = -1001;
366 /**
367 * \brief An invalid argument was passed into the function/VI, such as a null
368 * pointer.
369 */
370 static constexpr int InvalidParamValue = -1002;
371 /**
372 * \brief CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus
373 * utilization, and power to the device.
374 */
375 static constexpr int RxTimeout = -1003;
376 /**
377 * \brief CAN Transmit timed out.
378 */
379 static constexpr int TxTimeout = -1004;
380 /**
381 * \brief ArbID is incorrect.
382 */
383 static constexpr int UnexpectedArbId = -1005;
384 /**
385 * \brief CanOverflowed
386 */
387 static constexpr int CanOverflowed = -1006;
388 /**
389 * \brief Sensor Not Present.
390 */
391 static constexpr int SensorNotPresent = -1007;
392 /**
393 * \brief Firmware Too Old. Use Phoenix Tuner X to field upgrade your CTRE CAN
394 * device firmware(CRF). Then restart your robot application to clear
395 * this error.
396 */
397 static constexpr int FirmwareTooOld = -1008;
398 /**
399 * \brief Control Frame Period could not be changed. Most likely it is not
400 * being transmitted.
401 */
402 static constexpr int CouldNotChangePeriod = -1009;
403 /**
404 * \brief BufferFailure
405 */
406 static constexpr int BufferFailure = -1010;
407 /**
408 * \brief Firmware is legacy non-FRC version. Use Phoenix Tuner X to field
409 * upgrade your CTRE CAN device firmware(CRF). Firmware greater than
410 * 20.0 required.
411 */
412 static constexpr int FirmwareNonFRC = -1011;
413 /**
414 * \brief General Error Occurred.
415 */
416 static constexpr int GeneralError = -1100;
417 /**
418 * \brief No new response to update signal.
419 */
420 static constexpr int SigNotUpdated = -1200;
421 /**
422 * \brief NotAllPIDValuesUpdated
423 */
424 static constexpr int NotAllPIDValuesUpdated = -1201;
425 /**
426 * \brief GEN_PORT_ERROR
427 */
428 static constexpr int GEN_PORT_ERROR = -1300;
429 /**
430 * \brief PORT_MODULE_TYPE_MISMATCH
431 */
432 static constexpr int PORT_MODULE_TYPE_MISMATCH = -1301;
433 /**
434 * \brief GEN_MODULE_ERROR
435 */
436 static constexpr int GEN_MODULE_ERROR = -1400;
437 /**
438 * \brief MODULE_NOT_INIT_SET_ERROR
439 */
440 static constexpr int MODULE_NOT_INIT_SET_ERROR = -1401;
441 /**
442 * \brief MODULE_NOT_INIT_GET_ERROR
443 */
444 static constexpr int MODULE_NOT_INIT_GET_ERROR = -1402;
445 /**
446 * \brief Wheel Radius is too small, cannot get distance traveled.
447 */
448 static constexpr int WheelRadiusTooSmall = -1500;
449 /**
450 * \brief Ticks per revolution is 0, cannot get heading.
451 */
452 static constexpr int TicksPerRevZero = -1501;
453 /**
454 * \brief Distance between wheels is too small, cannot get heading.
455 */
456 static constexpr int DistanceBetweenWheelsTooSmall = -1502;
457 /**
458 * \brief GainsAreNotSet
459 */
460 static constexpr int GainsAreNotSet = -1503;
461 /**
462 * \brief Use RemoteLimitSwitchSource instead of LimitSwitchSource.
463 */
464 static constexpr int WrongRemoteLimitSwitchSource = -1504;
465 /**
466 * \brief Motor Controller Voltage Compensation should not be used with
467 * setVoltage(). This causes compensation to happen twice. Disable
468 * Voltage Compensation by calling enableVoltageCompensation(false) in
469 * order to use setVoltage().
470 */
471 static constexpr int DoubleVoltageCompensatingWPI = -1505;
472 /**
473 * \brief CANdleAnimSlotOutOfBounds
474 */
475 static constexpr int CANdleAnimSlotOutOfBounds = -1506;
476 /**
477 * \brief IncompatibleMode
478 */
479 static constexpr int IncompatibleMode = -1600;
480 /**
481 * \brief Handle passed into function is incorrect.
482 */
483 static constexpr int InvalidHandle = -1601;
484 /**
485 * \brief Features requires newer firmware version.
486 */
487 static constexpr int FeatureRequiresHigherFirm = -1700;
488 /**
489 * \brief Config factory default features require firmware >=3.10.
490 */
491 static constexpr int ConfigFactoryDefaultRequiresHigherFirm = -1702;
492 /**
493 * \brief Config Motion S Curve Strength features require firmware >=4.16.
494 */
495 static constexpr int ConfigMotionSCurveRequiresHigherFirm = -1703;
496 /**
497 * \brief Talon FX(Falcon 500) Firmware Too Old. Use Phoenix Tuner to field
498 * upgrade your CTRE CAN device firmware(CRF) to >=20.3. Then restart
499 * your robot application to clear this error.
500 */
501 static constexpr int TalonFXFirmwarePreVBatDetect = -1704;
502 /**
503 * \brief CANdleAnimationsRequireHigherFirm
504 */
505 static constexpr int CANdleAnimationsRequireHigherFirm = -1705;
506 /**
507 * \brief LibraryCouldNotBeLoaded
508 */
509 static constexpr int LibraryCouldNotBeLoaded = -1800;
510 /**
511 * \brief MissingRoutineInLibrary
512 */
513 static constexpr int MissingRoutineInLibrary = -1801;
514 /**
515 * \brief ResourceNotAvailable
516 */
517 static constexpr int ResourceNotAvailable = -1802;
518 /**
519 * \brief Could not find music file specified, try specifying an absolute path.
520 */
521 static constexpr int MusicFileNotFound = -1900;
522 /**
523 * \brief Music file size is incorrect, could not parse correctly. Ensure you're
524 * using Tuner to generate file.
525 */
526 static constexpr int MusicFileWrongSize = -1901;
527 /**
528 * \brief Music file version is too new, update Phoenix to utilize this file.
529 */
530 static constexpr int MusicFileTooNew = -1902;
531 /**
532 * \brief Music file is invalid. Ensure you're using Tuner to generate file.
533 */
534 static constexpr int MusicFileInvalid = -1903;
535 /**
536 * \brief An invalid orchestra action occurred. Ensure a music file is loaded.
537 */
538 static constexpr int InvalidOrchestraAction = -1904;
539 /**
540 * \brief This music file version is too old. Regenerate file using Tuner.
541 */
542 static constexpr int MusicFileTooOld = -1905;
543 /**
544 * \brief Music interrupted due to one of the instruments being commanded a
545 * different control mode. Press Play to resume music.
546 */
547 static constexpr int MusicInterrupted = -1906;
548 /**
549 * \brief This device doesn't support MusicTone control mode.
550 */
551 static constexpr int MusicNotSupported = -1907;
552 /**
553 * \brief kInvalidInterface
554 */
555 static constexpr int kInvalidInterface = -2000;
556 /**
557 * \brief kInvalidGuid
558 */
559 static constexpr int kInvalidGuid = -2001;
560 /**
561 * \brief kInvalidClass
562 */
563 static constexpr int kInvalidClass = -2002;
564 /**
565 * \brief kInvalidProtocol
566 */
567 static constexpr int kInvalidProtocol = -2003;
568 /**
569 * \brief kInvalidPath
570 */
571 static constexpr int kInvalidPath = -2004;
572 /**
573 * \brief kGeneralWinUsbError
574 */
575 static constexpr int kGeneralWinUsbError = -2005;
576 /**
577 * \brief kFailedSetup
578 */
579 static constexpr int kFailedSetup = -2006;
580 /**
581 * \brief kListenFailed
582 */
583 static constexpr int kListenFailed = -2007;
584 /**
585 * \brief kSendFailed
586 */
587 static constexpr int kSendFailed = -2008;
588 /**
589 * \brief kReceiveFailed
590 */
591 static constexpr int kReceiveFailed = -2009;
592 /**
593 * \brief kInvalidRespFormat
594 */
595 static constexpr int kInvalidRespFormat = -2010;
596 /**
597 * \brief kWinUsbInitFailed
598 */
599 static constexpr int kWinUsbInitFailed = -2011;
600 /**
601 * \brief kWinUsbQueryFailed
602 */
603 static constexpr int kWinUsbQueryFailed = -2012;
604 /**
605 * \brief kWinUsbGeneralError
606 */
607 static constexpr int kWinUsbGeneralError = -2013;
608 /**
609 * \brief kAccessDenied
610 */
611 static constexpr int kAccessDenied = -2014;
612 /**
613 * \brief kFirmwareInvalidResponse
614 */
615 static constexpr int kFirmwareInvalidResponse = -2015;
616 /**
617 * \brief This StatusCode has not been initialized. Make sure the StatusCode is
618 * getting assigned to the return of a method.
619 */
620 static constexpr int StatusCodeNotInitialized = -10000;
621 /**
622 * \brief WarningNotInitialized
623 */
624 static constexpr int WarningNotInitialized = 10000;
625 /**
626 * \brief The timestamp reported by CANivore is at least 10ms older than the
627 * timestamp reported by the system, indicating it's fallen out of sync.
628 * This does not impact the data of this message, only the timing.
629 */
630 static constexpr int HwTimestampOutOfSync = 10001;
631 /**
632 * \brief Do not apply or refresh configs periodically, as configs are blocking.
633 */
634 static constexpr int FrequentConfigCalls = 10002;
635 /**
636 * \brief The given network/CAN bus is invalid. Verify that any status signals
637 * provided are on the same network and that the network is present.
638 */
639 static constexpr int InvalidNetwork = -10001;
640 /**
641 * \brief The CAN bus does not support multi-signal synchronization.
642 */
643 static constexpr int MultiSignalNotSupported = -10002;
644 /**
645 * \brief Could not cast from base value to this particular signal's type
646 */
647 static constexpr int CouldNotCast = -10003;
648 /**
649 * \brief Could not find this value when searching for it
650 */
651 static constexpr int NotFound = -10004;
652 /**
653 * \brief This is not supported
654 */
655 static constexpr int NotSupported = -10005;
656 /**
657 * \brief Could not determine context from this device hash
658 */
659 static constexpr int MissingContext = -10006;
660 /**
661 * \brief Model name in license file does not match model name of selected
662 * device.
663 */
664 static constexpr int ModelMismatch = -10007;
665 /**
666 * \brief Serial Number in license file does not match model name of selected
667 * device.
668 */
669 static constexpr int SerialMismatch = -10008;
670 /**
671 * \brief Could not find specified file.
672 */
673 static constexpr int NoFile = -10009;
674 /**
675 * \brief License did not successfully download to Device.
676 */
677 static constexpr int LicenseDownloadFailed = -10010;
678 /**
679 * \brief Self Test report does not have any values, is the firmware up to date?
680 */
681 static constexpr int SelfTestIsEmpty = -10011;
682 /**
683 * \brief Failed to lookup signal properties. This can happen if the fimware is
684 * too new and supports signals that older APIs do not support.
685 */
686 static constexpr int SignalLookupFailed = -10012;
687 /**
688 * \brief The current mode of the device is invalid for getting this signal.
689 */
690 static constexpr int InvalidModeToGetSignal = -10013;
691 /**
692 * \brief Device is not licensed. Cannot get any data from it.
693 */
694 static constexpr int UnlicensedDevice = -10014;
695 /**
696 * \brief Size is invalid.
697 */
698 static constexpr int InvalidSize = -10015;
699 /**
700 * \brief InvalidLicenseResponse
701 */
702 static constexpr int InvalidLicenseResponse = -10016;
703 /**
704 * \brief InvalidContext
705 */
706 static constexpr int InvalidContext = -10017;
707 /**
708 * \brief InternalError
709 */
710 static constexpr int InternalError = -10018;
711 /**
712 * \brief kDeviceResponseIncorrect
713 */
714 static constexpr int kDeviceResponseIncorrect = -10019;
715 /**
716 * \brief kErrorPollingForDevices
717 */
718 static constexpr int kErrorPollingForDevices = -10020;
719 /**
720 * \brief Device firmware could not be retrieved. Check that the device is
721 * running v6 firmware, the device ID is correct, the specified CAN bus
722 * is correct, and the device is powered.
723 */
724 static constexpr int CouldNotRetrieveV6Firmware = -10021;
725 /**
726 * \brief Device firmware could not be decoded. Check that the device is running
727 * v6 firmware, the device ID is correct, the specified CAN bus is
728 * correct, and the device is powered.
729 */
730 static constexpr int CouldNotDecodeDeviceFirmware = -10022;
731 /**
732 * \brief The values specified for master are in valid. Make sure the Device ID
733 * of master are correct.
734 */
735 static constexpr int InvalidIDToFollow = -10023;
736 /**
737 * \brief Using a Pro only feature on an unlicensed device. The device may not
738 * behave as expected if it continues to operate while unlicensed.
739 */
740 static constexpr int UsingProFeatureOnUnlicensedDevice = -10024;
741 /**
742 * \brief Firmware Too New. Use Phoenix Tuner X to field upgrade your CTRE CAN
743 * device firmware(CRF) to a compatible version. Then restart your robot
744 * application to clear this error.
745 */
746 static constexpr int FirmwareTooNew = -10025;
747 /**
748 * \brief The data frame could not be serialized for transmit.
749 */
750 static constexpr int CouldNotSerialize = -10026;
751 /**
752 * \brief The mechanism is disabled due to a fault in one of the devices.
753 */
754 static constexpr int MechanismFaulted = -10027;
755 /**
756 * \brief Firmware version is not compatible with this version of Phoenix. Make
757 * sure your firmware and API major versions match.
758 */
759 static constexpr int FirmwareVersNotCompatible = -10028;
760 /**
761 * \brief Could not find specified directory.
762 */
763 static constexpr int DirectoryMissing = -10029;
764 /**
765 * \brief This API version is too old for the firmware on the device. Either
766 * upgrade the API to a newer version or downgrade the device firmware to
767 * an older version for correct behavior.
768 */
769 static constexpr int ApiTooOld = -10030;
770 /**
771 * \brief The signal logger is not running. Start the signal logger before
772 * writing any signals.
773 */
774 static constexpr int LoggerNotRunning = -10031;
775 /**
776 * \brief Blocking operations, such as configs, cannot have a timeout of 0. Pass
777 * in a non-zero timeout (typically 0.050+ seconds) for normal operation.
778 */
779 static constexpr int TimeoutCannotBeZero = -10032;
780 /**
781 * \brief Device cannot be licensed while it is control enabled. Disable and
782 * neutral the device to apply the licenses.
783 */
784 static constexpr int CannotLicenseWhileEnabled = -10033;
785 /**
786 * \brief Could not open or read the given file.
787 */
788 static constexpr int InvalidFile = -10034;
789 /**
790 * \brief The given hoot log requires an older version of Phoenix API.
791 */
792 static constexpr int HootLogTooOld = -10035;
793 /**
794 * \brief The given hoot log requires a newer version of Phoenix API.
795 */
796 static constexpr int HootLogTooNew = -10036;
797 /**
798 * \brief Hoot log is not licensed. Cannot get any data from it.
799 */
800 static constexpr int UnlicensedHootLog = -10037;
801 /**
802 * \brief The simulation timing cannot be advanced by a time step while
803 * unpaused. Pause the simulator before advancing time.
804 */
805 static constexpr int CannotStepWhileUnpaused = -10038;
806 /**
807 * \brief Hoot replay does not support replaying multiple files. Ensure that
808 * only one file is loaded at a time.
809 */
810 static constexpr int MultipleReplayNotSupported = -10039;
811 /**
812 * \brief The maximum number of loggable user signals has been exceeded.
813 * Additional user signals will not be logged.
814 */
815 static constexpr int UserSignalLimitExceeded = -10040;
816 /**
817 * \brief The provided model was not a valid device type.
818 */
819 static constexpr int InvalidDeviceModel = -10041;
820 /**
821 * \brief The requested signal is missing or not supported. Verify that the
822 * device firmware is up-to-date.
823 */
824 static constexpr int SignalNotSupportedOrMissing = -10042;
825 /**
826 * \brief The schema for the logged user signal is invalid or missing. Ensure
827 * that the schema is written before the user signal.
828 */
829 static constexpr int MissingSchema = -10043;
830 /**
831 * \brief The device ID is invalid. Ensure the device is constructed with a
832 * valid ID (0-62).
833 */
834 static constexpr int InvalidDeviceId = -10044;
835
836 constexpr StatusCode(int val) : value{val} {}
838
839 constexpr friend bool operator==(StatusCode, StatusCode) = default;
840 constexpr friend auto operator<=>(StatusCode, StatusCode) = default;
841
842 constexpr operator int() const { return value; }
843
844 constexpr bool operator==(int other) const
845 {
846 return value == other;
847 }
848 constexpr auto operator<=>(int other) const
849 {
850 return value <=> other;
851 }
852
853 /**
854 * \returns true if this code is an error
855 */
856 constexpr bool IsError() const { return value < 0; }
857 /**
858 * \returns true if this code is a warning
859 */
860 constexpr bool IsWarning() const { return value > 0; }
861 /**
862 * \returns true if this code is OK
863 */
864 constexpr bool IsOK() const { return value == OK; }
865
866 /**
867 * Gets the name of this StatusCode
868 *
869 * \returns Name of this StatusCode
870 */
871 constexpr const char *GetName() const
872 {
873 switch (value) {
874 case 0: return "OK";
875 case -100: return "TaskIsBusy";
876 case -101: return "InvalidDeviceSpec";
877 case -102: return "EcuIsNotPresent";
878 case -103: return "CouldNotEnterBl";
879 case -104: return "CouldNotConfirmBl";
880 case -105: return "CouldNotErase";
881 case -106: return "CouldNotSendFlash";
882 case -107: return "CouldNotValidate";
883 case -108: return "CouldNotRunApp";
884 case -109: return "CouldNotReqSetId";
885 case -110: return "CouldNotConfirmId";
886 case -111: return "FlashWasGood";
887 case -112: return "AppTooOld";
888 case -113: return "CouldNotReqSetDesc";
889 case -114: return "CompileSzIsWrong";
890 case -115: return "GadgeteerDeviceNoSetId";
891 case -116: return "InvalidTask";
892 case -117: return "NotImplemented";
893 case -118: return "NoDevicesOnBus";
894 case -119: return "MoreThanOneFile";
895 case -120: return "NodeIsInvalid";
896 case -121: return "InvalidDeviceDescriptor";
897 case -123: return "CouldNotSendCanFrame";
898 case -124: return "NormalModeMsgNotPresent";
899 case -125: return "FeatureNotSupported";
900 case -126: return "NotUpdating";
901 case -127: return "CorruptedPOST";
902 case -128: return "NoConfigs";
903 case -129: return "ConfigFailed";
904 case -130: return "CouldNotReqFactoryDefault";
905 case -131: return "CustomNameNotSupported";
906 case -132: return "ConfigReadWriteMismatch";
907 case -133: return "CouldNotReqSetConfigs";
908 case -134: return "InsufficientSz";
909 case -135: return "InvalidModel";
910 case -140: return "CouldNotReqDevInfo";
911 case -141: return "NoControls";
912 case -142: return "DeviceIsNull";
913 case -143: return "DeviceDidNotRespondToDiagReq";
914 case -144: return "OnlySupportedInTunerX";
915 case -145: return "CanivCliError";
916 case -200: return "InvalidCrfBadHeader";
917 case -201: return "InvalidCrfFileSzInvald";
918 case -202: return "InvalidCrfWrongProduct";
919 case -203: return "InvalidCrfNoSects";
920 case -204: return "InvalidCrfBadSectHeader";
921 case -205: return "InvalidCrfBadSectSize";
922 case -206: return "NoCrfFile";
923 case -300: return "CouldNotFindDynamicId";
924 case -301: return "DidNotGetDhcp";
925 case -302: return "DidNotGetFullDhcp";
926 case -350: return "InvalidLicenseResp";
927 case -351: return "InvalidCanivCache";
928 case -500: return "CannotOpenSerialPort";
929 case -501: return "CannotWriteSerialPort";
930 case -502: return "CannotReadSerialPort";
931 case -503: return "CannotSerialToDevice";
932 case -504: return "NoSerialControlFrameResp";
933 case -600: return "CannotOpenUdpPort";
934 case -601: return "CannotWriteUdpPort";
935 case -602: return "CannotReadUdpPort";
936 case -603: return "CannotUdpToDevice";
937 case -604: return "NoUdpControlFrameResp";
938 case -605: return "TimeoutIso15Response";
939 case -700: return "InvalidJson";
940 case -800: return "AppIsTerminating";
941 case 1000: return "CanMessageStale";
942 case 1006: return "BufferFull";
943 case 1010: return "PulseWidthSensorNotPresent";
944 case 1100: return "GeneralWarning";
945 case 1103: return "FirmVersionCouldNotBeRetrieved";
946 case 1104: return "FeaturesNotAvailableYet";
947 case 1105: return "ControlModeNotValid";
948 case 1106: return "ControlModeNotSupportedYet";
949 case 1109: return "MotProfFirmThreshold";
950 case 1110: return "MotProfFirmThreshold2";
951 case 1200: return "SimDeviceNotFound";
952 case 1201: return "SimPhysicsTypeNotSupported";
953 case 1202: return "SimDeviceAlreadyExists";
954 case -1001: return "TxFailed";
955 case -1002: return "InvalidParamValue";
956 case -1003: return "RxTimeout";
957 case -1004: return "TxTimeout";
958 case -1005: return "UnexpectedArbId";
959 case -1006: return "CanOverflowed";
960 case -1007: return "SensorNotPresent";
961 case -1008: return "FirmwareTooOld";
962 case -1009: return "CouldNotChangePeriod";
963 case -1010: return "BufferFailure";
964 case -1011: return "FirmwareNonFRC";
965 case -1100: return "GeneralError";
966 case -1200: return "SigNotUpdated";
967 case -1201: return "NotAllPIDValuesUpdated";
968 case -1300: return "GEN_PORT_ERROR";
969 case -1301: return "PORT_MODULE_TYPE_MISMATCH";
970 case -1400: return "GEN_MODULE_ERROR";
971 case -1401: return "MODULE_NOT_INIT_SET_ERROR";
972 case -1402: return "MODULE_NOT_INIT_GET_ERROR";
973 case -1500: return "WheelRadiusTooSmall";
974 case -1501: return "TicksPerRevZero";
975 case -1502: return "DistanceBetweenWheelsTooSmall";
976 case -1503: return "GainsAreNotSet";
977 case -1504: return "WrongRemoteLimitSwitchSource";
978 case -1505: return "DoubleVoltageCompensatingWPI";
979 case -1506: return "CANdleAnimSlotOutOfBounds";
980 case -1600: return "IncompatibleMode";
981 case -1601: return "InvalidHandle";
982 case -1700: return "FeatureRequiresHigherFirm";
983 case -1702: return "ConfigFactoryDefaultRequiresHigherFirm";
984 case -1703: return "ConfigMotionSCurveRequiresHigherFirm";
985 case -1704: return "TalonFXFirmwarePreVBatDetect";
986 case -1705: return "CANdleAnimationsRequireHigherFirm";
987 case -1800: return "LibraryCouldNotBeLoaded";
988 case -1801: return "MissingRoutineInLibrary";
989 case -1802: return "ResourceNotAvailable";
990 case -1900: return "MusicFileNotFound";
991 case -1901: return "MusicFileWrongSize";
992 case -1902: return "MusicFileTooNew";
993 case -1903: return "MusicFileInvalid";
994 case -1904: return "InvalidOrchestraAction";
995 case -1905: return "MusicFileTooOld";
996 case -1906: return "MusicInterrupted";
997 case -1907: return "MusicNotSupported";
998 case -2000: return "kInvalidInterface";
999 case -2001: return "kInvalidGuid";
1000 case -2002: return "kInvalidClass";
1001 case -2003: return "kInvalidProtocol";
1002 case -2004: return "kInvalidPath";
1003 case -2005: return "kGeneralWinUsbError";
1004 case -2006: return "kFailedSetup";
1005 case -2007: return "kListenFailed";
1006 case -2008: return "kSendFailed";
1007 case -2009: return "kReceiveFailed";
1008 case -2010: return "kInvalidRespFormat";
1009 case -2011: return "kWinUsbInitFailed";
1010 case -2012: return "kWinUsbQueryFailed";
1011 case -2013: return "kWinUsbGeneralError";
1012 case -2014: return "kAccessDenied";
1013 case -2015: return "kFirmwareInvalidResponse";
1014 case -10000: return "StatusCodeNotInitialized";
1015 case 10000: return "WarningNotInitialized";
1016 case 10001: return "HwTimestampOutOfSync";
1017 case 10002: return "FrequentConfigCalls";
1018 case -10001: return "InvalidNetwork";
1019 case -10002: return "MultiSignalNotSupported";
1020 case -10003: return "CouldNotCast";
1021 case -10004: return "NotFound";
1022 case -10005: return "NotSupported";
1023 case -10006: return "MissingContext";
1024 case -10007: return "ModelMismatch";
1025 case -10008: return "SerialMismatch";
1026 case -10009: return "NoFile";
1027 case -10010: return "LicenseDownloadFailed";
1028 case -10011: return "SelfTestIsEmpty";
1029 case -10012: return "SignalLookupFailed";
1030 case -10013: return "InvalidModeToGetSignal";
1031 case -10014: return "UnlicensedDevice";
1032 case -10015: return "InvalidSize";
1033 case -10016: return "InvalidLicenseResponse";
1034 case -10017: return "InvalidContext";
1035 case -10018: return "InternalError";
1036 case -10019: return "kDeviceResponseIncorrect";
1037 case -10020: return "kErrorPollingForDevices";
1038 case -10021: return "CouldNotRetrieveV6Firmware";
1039 case -10022: return "CouldNotDecodeDeviceFirmware";
1040 case -10023: return "InvalidIDToFollow";
1041 case -10024: return "UsingProFeatureOnUnlicensedDevice";
1042 case -10025: return "FirmwareTooNew";
1043 case -10026: return "CouldNotSerialize";
1044 case -10027: return "MechanismFaulted";
1045 case -10028: return "FirmwareVersNotCompatible";
1046 case -10029: return "DirectoryMissing";
1047 case -10030: return "ApiTooOld";
1048 case -10031: return "LoggerNotRunning";
1049 case -10032: return "TimeoutCannotBeZero";
1050 case -10033: return "CannotLicenseWhileEnabled";
1051 case -10034: return "InvalidFile";
1052 case -10035: return "HootLogTooOld";
1053 case -10036: return "HootLogTooNew";
1054 case -10037: return "UnlicensedHootLog";
1055 case -10038: return "CannotStepWhileUnpaused";
1056 case -10039: return "MultipleReplayNotSupported";
1057 case -10040: return "UserSignalLimitExceeded";
1058 case -10041: return "InvalidDeviceModel";
1059 case -10042: return "SignalNotSupportedOrMissing";
1060 case -10043: return "MissingSchema";
1061 case -10044: return "InvalidDeviceId";
1062 default:
1063 /* because we return const char*, we cannot create
1064 * a string with the status error code */
1065 return "Could not find name for StatusCode";
1066 }
1067 }
1068 /**
1069 * Gets the description of this StatusCode
1070 *
1071 * \returns Description of this StatusCode
1072 */
1073 constexpr const char *GetDescription() const
1074 {
1075 switch (value) {
1076 case 0: return "No Error";
1077 case -100: return "Diagnostic Server is busy with another command.";
1078 case -101: return "InvalidDeviceSpec";
1079 case -102: return "Device is not present. Verify the device is connected and powered, and that the CAN bus is terminated.";
1080 case -103: return "Could not put the device into bootloader mode.";
1081 case -104: return "Could not confirm the device has entered the bootloader.";
1082 case -105: return "Could not erase flash.";
1083 case -106: return "Could not field upgrade the device.";
1084 case -107: return "Bootloader could not verify integrity of the flashed application.";
1085 case -108: return "Could not run the device firmware application.";
1086 case -109: return "Unable to set ID to this device. Confirm that this action is valid for this device and the ID is valid (0-62).";
1087 case -110: return "Could not verify that the changed ID took effect.";
1088 case -111: return "Device field upgrade was successful.";
1089 case -112: return "Device firmware application is too old.";
1090 case -113: return "Unable to set name to this device.";
1091 case -114: return "CompileSzIsWrong";
1092 case -115: return "Cannot set the ID of a gadgeteer device.";
1093 case -116: return "This diagnostic action is not supported.";
1094 case -117: return "Not Implemented, check latest installer.";
1095 case -118: return "NoDevicesOnBus";
1096 case -119: return "MoreThanOneFile";
1097 case -120: return "Specified device was not found. Verify the device is connected and powered, and that the CAN bus is terminated.";
1098 case -121: return "InvalidDeviceDescriptor";
1099 case -123: return "CouldNotSendCanFrame";
1100 case -124: return "NormalModeMsgNotPresent";
1101 case -125: return "This feature is not supported.";
1102 case -126: return "The diagnostic server is not field upgrading any devices.";
1103 case -127: return "CorruptedPOST";
1104 case -128: return "This device did not report any available configs. Verify firmware and diagnostics are up-to-date.";
1105 case -129: return "ConfigFailed";
1106 case -130: return "Unable to factory default this device.";
1107 case -131: return "CustomNameNotSupported";
1108 case -132: return "The configs read from the device do not match the configs that were written.";
1109 case -133: return "Could not apply the device configs.";
1110 case -134: return "InsufficientSz";
1111 case -135: return "This feature is not supported for this device model.";
1112 case -140: return "CouldNotReqDevInfo";
1113 case -141: return "This device does not support new controls.";
1114 case -142: return "DeviceIsNull";
1115 case -143: return "DeviceDidNotRespondToDiagReq";
1116 case -144: return "This feature requires Tuner X.";
1117 case -145: return "Command-line issue with caniv.";
1118 case -200: return "InvalidCrfBadHeader";
1119 case -201: return "InvalidCrfFileSzInvald";
1120 case -202: return "Specified CRF is for the wrong product.";
1121 case -203: return "InvalidCrfNoSects";
1122 case -204: return "InvalidCrfBadSectHeader";
1123 case -205: return "InvalidCrfBadSectSize";
1124 case -206: return "Specified CRF file could not be found.";
1125 case -300: return "CouldNotFindDynamicId";
1126 case -301: return "DidNotGetDhcp";
1127 case -302: return "DidNotGetFullDhcp";
1128 case -350: return "InvalidLicenseResp";
1129 case -351: return "InvalidCanivCache";
1130 case -500: return "CannotOpenSerialPort";
1131 case -501: return "CannotWriteSerialPort";
1132 case -502: return "CannotReadSerialPort";
1133 case -503: return "CannotSerialToDevice";
1134 case -504: return "NoSerialControlFrameResp";
1135 case -600: return "CannotOpenUdpPort";
1136 case -601: return "CannotWriteUdpPort";
1137 case -602: return "CannotReadUdpPort";
1138 case -603: return "CannotUdpToDevice";
1139 case -604: return "NoUdpControlFrameResp";
1140 case -605: return "TimeoutIso15Response";
1141 case -700: return "InvalidJson";
1142 case -800: return "The user application is shutting down.";
1143 case 1000: return "CAN message is stale, data is valid but old. Check the CAN bus wiring, CAN bus utilization, and power to the device.";
1144 case 1006: return "Buffer is full, cannot insert more data.";
1145 case 1010: return "PulseWidthSensorNotPresent";
1146 case 1100: return "General Warning Occurred.";
1147 case 1103: return "Firm Vers could not be retrieved. Use Phoenix Tuner X to check ID and firmware(CRF) version.";
1148 case 1104: return "This feature will be supported in a future update.";
1149 case 1105: return "The control mode is not valid for this function.";
1150 case 1106: return "This control mode is not supported yet. A future release will supported this soon.";
1151 case 1109: return "Motor Controller must have >= 3.2 firmware for motion profile control mode.";
1152 case 1110: return "Motor Controller must have >= 3.4 firmware for advanced PID0/PID1 features.";
1153 case 1200: return "SimDeviceNotFound";
1154 case 1201: return "SimPhysicsTypeNotSupported";
1155 case 1202: return "SimDeviceAlreadyExists";
1156 case -1001: return "Could not transmit CAN Frame.";
1157 case -1002: return "An invalid argument was passed into the function/VI, such as a null pointer.";
1158 case -1003: return "CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device.";
1159 case -1004: return "CAN Transmit timed out.";
1160 case -1005: return "ArbID is incorrect.";
1161 case -1006: return "CanOverflowed";
1162 case -1007: return "Sensor Not Present.";
1163 case -1008: return "Firmware Too Old. Use Phoenix Tuner X to field upgrade your CTRE CAN device firmware(CRF). Then restart your robot application to clear this error.";
1164 case -1009: return "Control Frame Period could not be changed. Most likely it is not being transmitted.";
1165 case -1010: return "BufferFailure";
1166 case -1011: return "Firmware is legacy non-FRC version. Use Phoenix Tuner X to field upgrade your CTRE CAN device firmware(CRF). Firmware greater than 20.0 required.";
1167 case -1100: return "General Error Occurred.";
1168 case -1200: return "No new response to update signal.";
1169 case -1201: return "NotAllPIDValuesUpdated";
1170 case -1300: return "GEN_PORT_ERROR";
1171 case -1301: return "PORT_MODULE_TYPE_MISMATCH";
1172 case -1400: return "GEN_MODULE_ERROR";
1173 case -1401: return "MODULE_NOT_INIT_SET_ERROR";
1174 case -1402: return "MODULE_NOT_INIT_GET_ERROR";
1175 case -1500: return "Wheel Radius is too small, cannot get distance traveled.";
1176 case -1501: return "Ticks per revolution is 0, cannot get heading.";
1177 case -1502: return "Distance between wheels is too small, cannot get heading.";
1178 case -1503: return "GainsAreNotSet";
1179 case -1504: return "Use RemoteLimitSwitchSource instead of LimitSwitchSource.";
1180 case -1505: return "Motor Controller Voltage Compensation should not be used with setVoltage(). This causes compensation to happen twice. Disable Voltage Compensation by calling enableVoltageCompensation(false) in order to use setVoltage().";
1181 case -1506: return "CANdleAnimSlotOutOfBounds";
1182 case -1600: return "IncompatibleMode";
1183 case -1601: return "Handle passed into function is incorrect.";
1184 case -1700: return "Features requires newer firmware version.";
1185 case -1702: return "Config factory default features require firmware >=3.10.";
1186 case -1703: return "Config Motion S Curve Strength features require firmware >=4.16.";
1187 case -1704: return "Talon FX(Falcon 500) Firmware Too Old. Use Phoenix Tuner to field upgrade your CTRE CAN device firmware(CRF) to >=20.3. Then restart your robot application to clear this error.";
1188 case -1705: return "CANdleAnimationsRequireHigherFirm";
1189 case -1800: return "LibraryCouldNotBeLoaded";
1190 case -1801: return "MissingRoutineInLibrary";
1191 case -1802: return "ResourceNotAvailable";
1192 case -1900: return "Could not find music file specified, try specifying an absolute path.";
1193 case -1901: return "Music file size is incorrect, could not parse correctly. Ensure you're using Tuner to generate file.";
1194 case -1902: return "Music file version is too new, update Phoenix to utilize this file.";
1195 case -1903: return "Music file is invalid. Ensure you're using Tuner to generate file.";
1196 case -1904: return "An invalid orchestra action occurred. Ensure a music file is loaded.";
1197 case -1905: return "This music file version is too old. Regenerate file using Tuner.";
1198 case -1906: return "Music interrupted due to one of the instruments being commanded a different control mode. Press Play to resume music.";
1199 case -1907: return "This device doesn't support MusicTone control mode.";
1200 case -2000: return "kInvalidInterface";
1201 case -2001: return "kInvalidGuid";
1202 case -2002: return "kInvalidClass";
1203 case -2003: return "kInvalidProtocol";
1204 case -2004: return "kInvalidPath";
1205 case -2005: return "kGeneralWinUsbError";
1206 case -2006: return "kFailedSetup";
1207 case -2007: return "kListenFailed";
1208 case -2008: return "kSendFailed";
1209 case -2009: return "kReceiveFailed";
1210 case -2010: return "kInvalidRespFormat";
1211 case -2011: return "kWinUsbInitFailed";
1212 case -2012: return "kWinUsbQueryFailed";
1213 case -2013: return "kWinUsbGeneralError";
1214 case -2014: return "kAccessDenied";
1215 case -2015: return "kFirmwareInvalidResponse";
1216 case -10000: return "This StatusCode has not been initialized. Make sure the StatusCode is getting assigned to the return of a method.";
1217 case 10000: return "WarningNotInitialized";
1218 case 10001: return "The timestamp reported by CANivore is at least 10ms older than the timestamp reported by the system, indicating it's fallen out of sync. This does not impact the data of this message, only the timing.";
1219 case 10002: return "Do not apply or refresh configs periodically, as configs are blocking.";
1220 case -10001: return "The given network/CAN bus is invalid. Verify that any status signals provided are on the same network and that the network is present.";
1221 case -10002: return "The CAN bus does not support multi-signal synchronization.";
1222 case -10003: return "Could not cast from base value to this particular signal's type";
1223 case -10004: return "Could not find this value when searching for it";
1224 case -10005: return "This is not supported";
1225 case -10006: return "Could not determine context from this device hash";
1226 case -10007: return "Model name in license file does not match model name of selected device.";
1227 case -10008: return "Serial Number in license file does not match model name of selected device.";
1228 case -10009: return "Could not find specified file.";
1229 case -10010: return "License did not successfully download to Device.";
1230 case -10011: return "Self Test report does not have any values, is the firmware up to date?";
1231 case -10012: return "Failed to lookup signal properties. This can happen if the fimware is too new and supports signals that older APIs do not support.";
1232 case -10013: return "The current mode of the device is invalid for getting this signal.";
1233 case -10014: return "Device is not licensed. Cannot get any data from it.";
1234 case -10015: return "Size is invalid.";
1235 case -10016: return "InvalidLicenseResponse";
1236 case -10017: return "InvalidContext";
1237 case -10018: return "InternalError";
1238 case -10019: return "kDeviceResponseIncorrect";
1239 case -10020: return "kErrorPollingForDevices";
1240 case -10021: return "Device firmware could not be retrieved. Check that the device is running v6 firmware, the device ID is correct, the specified CAN bus is correct, and the device is powered.";
1241 case -10022: return "Device firmware could not be decoded. Check that the device is running v6 firmware, the device ID is correct, the specified CAN bus is correct, and the device is powered.";
1242 case -10023: return "The values specified for master are in valid. Make sure the Device ID of master are correct.";
1243 case -10024: return "Using a Pro only feature on an unlicensed device. The device may not behave as expected if it continues to operate while unlicensed.";
1244 case -10025: return "Firmware Too New. Use Phoenix Tuner X to field upgrade your CTRE CAN device firmware(CRF) to a compatible version. Then restart your robot application to clear this error.";
1245 case -10026: return "The data frame could not be serialized for transmit.";
1246 case -10027: return "The mechanism is disabled due to a fault in one of the devices.";
1247 case -10028: return "Firmware version is not compatible with this version of Phoenix. Make sure your firmware and API major versions match.";
1248 case -10029: return "Could not find specified directory.";
1249 case -10030: return "This API version is too old for the firmware on the device. Either upgrade the API to a newer version or downgrade the device firmware to an older version for correct behavior.";
1250 case -10031: return "The signal logger is not running. Start the signal logger before writing any signals.";
1251 case -10032: return "Blocking operations, such as configs, cannot have a timeout of 0. Pass in a non-zero timeout (typically 0.050+ seconds) for normal operation.";
1252 case -10033: return "Device cannot be licensed while it is control enabled. Disable and neutral the device to apply the licenses.";
1253 case -10034: return "Could not open or read the given file.";
1254 case -10035: return "The given hoot log requires an older version of Phoenix API.";
1255 case -10036: return "The given hoot log requires a newer version of Phoenix API.";
1256 case -10037: return "Hoot log is not licensed. Cannot get any data from it.";
1257 case -10038: return "The simulation timing cannot be advanced by a time step while unpaused. Pause the simulator before advancing time.";
1258 case -10039: return "Hoot replay does not support replaying multiple files. Ensure that only one file is loaded at a time.";
1259 case -10040: return "The maximum number of loggable user signals has been exceeded. Additional user signals will not be logged.";
1260 case -10041: return "The provided model was not a valid device type.";
1261 case -10042: return "The requested signal is missing or not supported. Verify that the device firmware is up-to-date.";
1262 case -10043: return "The schema for the logged user signal is invalid or missing. Ensure that the schema is written before the user signal.";
1263 case -10044: return "The device ID is invalid. Ensure the device is constructed with a valid ID (0-62).";
1264 default:
1265 /* because we return const char*, we cannot create
1266 * a string with the status error code */
1267 return "Could not find description for StatusCode";
1268 }
1269 }
1270
1271#ifdef CTREXPORT
1272 CTREXPORT
1273#endif
1274 friend std::ostream &operator<<(std::ostream &os, StatusCode status);
1275 };
1276
1277}
1278}
1279
1280} // extern "C++"
1281
1282#else // This is straight-C, so just create a typedef enum to use
1283
1284/**
1285 * \brief Typedef enum of the StatusCode for use in C projects
1286 */
1287typedef enum _StatusCode_t
1288{
1289 /**
1290 * \brief No Error
1291 */
1292 OK = 0,
1293 /**
1294 * \brief Diagnostic Server is busy with another command.
1295 */
1296 TaskIsBusy = -100,
1297 /**
1298 * \brief InvalidDeviceSpec
1299 */
1300 InvalidDeviceSpec = -101,
1301 /**
1302 * \brief Device is not present. Verify the device is connected and powered, and
1303 * that the CAN bus is terminated.
1304 */
1305 EcuIsNotPresent = -102,
1306 /**
1307 * \brief Could not put the device into bootloader mode.
1308 */
1309 CouldNotEnterBl = -103,
1310 /**
1311 * \brief Could not confirm the device has entered the bootloader.
1312 */
1313 CouldNotConfirmBl = -104,
1314 /**
1315 * \brief Could not erase flash.
1316 */
1317 CouldNotErase = -105,
1318 /**
1319 * \brief Could not field upgrade the device.
1320 */
1321 CouldNotSendFlash = -106,
1322 /**
1323 * \brief Bootloader could not verify integrity of the flashed application.
1324 */
1325 CouldNotValidate = -107,
1326 /**
1327 * \brief Could not run the device firmware application.
1328 */
1329 CouldNotRunApp = -108,
1330 /**
1331 * \brief Unable to set ID to this device. Confirm that this action is valid for
1332 * this device and the ID is valid (0-62).
1333 */
1334 CouldNotReqSetId = -109,
1335 /**
1336 * \brief Could not verify that the changed ID took effect.
1337 */
1338 CouldNotConfirmId = -110,
1339 /**
1340 * \brief Device field upgrade was successful.
1341 */
1342 FlashWasGood = -111,
1343 /**
1344 * \brief Device firmware application is too old.
1345 */
1346 AppTooOld = -112,
1347 /**
1348 * \brief Unable to set name to this device.
1349 */
1350 CouldNotReqSetDesc = -113,
1351 /**
1352 * \brief CompileSzIsWrong
1353 */
1354 CompileSzIsWrong = -114,
1355 /**
1356 * \brief Cannot set the ID of a gadgeteer device.
1357 */
1358 GadgeteerDeviceNoSetId = -115,
1359 /**
1360 * \brief This diagnostic action is not supported.
1361 */
1362 InvalidTask = -116,
1363 /**
1364 * \brief Not Implemented, check latest installer.
1365 */
1366 NotImplemented = -117,
1367 /**
1368 * \brief NoDevicesOnBus
1369 */
1370 NoDevicesOnBus = -118,
1371 /**
1372 * \brief MoreThanOneFile
1373 */
1374 MoreThanOneFile = -119,
1375 /**
1376 * \brief Specified device was not found. Verify the device is connected and
1377 * powered, and that the CAN bus is terminated.
1378 */
1379 NodeIsInvalid = -120,
1380 /**
1381 * \brief InvalidDeviceDescriptor
1382 */
1383 InvalidDeviceDescriptor = -121,
1384 /**
1385 * \brief CouldNotSendCanFrame
1386 */
1387 CouldNotSendCanFrame = -123,
1388 /**
1389 * \brief NormalModeMsgNotPresent
1390 */
1391 NormalModeMsgNotPresent = -124,
1392 /**
1393 * \brief This feature is not supported.
1394 */
1395 FeatureNotSupported = -125,
1396 /**
1397 * \brief The diagnostic server is not field upgrading any devices.
1398 */
1399 NotUpdating = -126,
1400 /**
1401 * \brief CorruptedPOST
1402 */
1403 CorruptedPOST = -127,
1404 /**
1405 * \brief This device did not report any available configs. Verify firmware and
1406 * diagnostics are up-to-date.
1407 */
1408 NoConfigs = -128,
1409 /**
1410 * \brief ConfigFailed
1411 */
1412 ConfigFailed = -129,
1413 /**
1414 * \brief Unable to factory default this device.
1415 */
1416 CouldNotReqFactoryDefault = -130,
1417 /**
1418 * \brief CustomNameNotSupported
1419 */
1420 CustomNameNotSupported = -131,
1421 /**
1422 * \brief The configs read from the device do not match the configs that were
1423 * written.
1424 */
1425 ConfigReadWriteMismatch = -132,
1426 /**
1427 * \brief Could not apply the device configs.
1428 */
1429 CouldNotReqSetConfigs = -133,
1430 /**
1431 * \brief InsufficientSz
1432 */
1433 InsufficientSz = -134,
1434 /**
1435 * \brief This feature is not supported for this device model.
1436 */
1437 InvalidModel = -135,
1438 /**
1439 * \brief CouldNotReqDevInfo
1440 */
1441 CouldNotReqDevInfo = -140,
1442 /**
1443 * \brief This device does not support new controls.
1444 */
1445 NoControls = -141,
1446 /**
1447 * \brief DeviceIsNull
1448 */
1449 DeviceIsNull = -142,
1450 /**
1451 * \brief DeviceDidNotRespondToDiagReq
1452 */
1453 DeviceDidNotRespondToDiagReq = -143,
1454 /**
1455 * \brief This feature requires Tuner X.
1456 */
1457 OnlySupportedInTunerX = -144,
1458 /**
1459 * \brief Command-line issue with caniv.
1460 */
1461 CanivCliError = -145,
1462 /**
1463 * \brief InvalidCrfBadHeader
1464 */
1465 InvalidCrfBadHeader = -200,
1466 /**
1467 * \brief InvalidCrfFileSzInvald
1468 */
1469 InvalidCrfFileSzInvald = -201,
1470 /**
1471 * \brief Specified CRF is for the wrong product.
1472 */
1473 InvalidCrfWrongProduct = -202,
1474 /**
1475 * \brief InvalidCrfNoSects
1476 */
1477 InvalidCrfNoSects = -203,
1478 /**
1479 * \brief InvalidCrfBadSectHeader
1480 */
1481 InvalidCrfBadSectHeader = -204,
1482 /**
1483 * \brief InvalidCrfBadSectSize
1484 */
1485 InvalidCrfBadSectSize = -205,
1486 /**
1487 * \brief Specified CRF file could not be found.
1488 */
1489 NoCrfFile = -206,
1490 /**
1491 * \brief CouldNotFindDynamicId
1492 */
1493 CouldNotFindDynamicId = -300,
1494 /**
1495 * \brief DidNotGetDhcp
1496 */
1497 DidNotGetDhcp = -301,
1498 /**
1499 * \brief DidNotGetFullDhcp
1500 */
1501 DidNotGetFullDhcp = -302,
1502 /**
1503 * \brief InvalidLicenseResp
1504 */
1505 InvalidLicenseResp = -350,
1506 /**
1507 * \brief InvalidCanivCache
1508 */
1509 InvalidCanivCache = -351,
1510 /**
1511 * \brief CannotOpenSerialPort
1512 */
1513 CannotOpenSerialPort = -500,
1514 /**
1515 * \brief CannotWriteSerialPort
1516 */
1517 CannotWriteSerialPort = -501,
1518 /**
1519 * \brief CannotReadSerialPort
1520 */
1521 CannotReadSerialPort = -502,
1522 /**
1523 * \brief CannotSerialToDevice
1524 */
1525 CannotSerialToDevice = -503,
1526 /**
1527 * \brief NoSerialControlFrameResp
1528 */
1529 NoSerialControlFrameResp = -504,
1530 /**
1531 * \brief CannotOpenUdpPort
1532 */
1533 CannotOpenUdpPort = -600,
1534 /**
1535 * \brief CannotWriteUdpPort
1536 */
1537 CannotWriteUdpPort = -601,
1538 /**
1539 * \brief CannotReadUdpPort
1540 */
1541 CannotReadUdpPort = -602,
1542 /**
1543 * \brief CannotUdpToDevice
1544 */
1545 CannotUdpToDevice = -603,
1546 /**
1547 * \brief NoUdpControlFrameResp
1548 */
1549 NoUdpControlFrameResp = -604,
1550 /**
1551 * \brief TimeoutIso15Response
1552 */
1553 TimeoutIso15Response = -605,
1554 /**
1555 * \brief InvalidJson
1556 */
1557 InvalidJson = -700,
1558 /**
1559 * \brief The user application is shutting down.
1560 */
1561 AppIsTerminating = -800,
1562 /**
1563 * \brief CAN message is stale, data is valid but old. Check the CAN bus wiring,
1564 * CAN bus utilization, and power to the device.
1565 */
1566 CanMessageStale = 1000,
1567 /**
1568 * \brief Buffer is full, cannot insert more data.
1569 */
1570 BufferFull = 1006,
1571 /**
1572 * \brief PulseWidthSensorNotPresent
1573 */
1574 PulseWidthSensorNotPresent = 1010,
1575 /**
1576 * \brief General Warning Occurred.
1577 */
1578 GeneralWarning = 1100,
1579 /**
1580 * \brief Firm Vers could not be retrieved. Use Phoenix Tuner X to check ID and
1581 * firmware(CRF) version.
1582 */
1583 FirmVersionCouldNotBeRetrieved = 1103,
1584 /**
1585 * \brief This feature will be supported in a future update.
1586 */
1587 FeaturesNotAvailableYet = 1104,
1588 /**
1589 * \brief The control mode is not valid for this function.
1590 */
1591 ControlModeNotValid = 1105,
1592 /**
1593 * \brief This control mode is not supported yet. A future release will
1594 * supported this soon.
1595 */
1596 ControlModeNotSupportedYet = 1106,
1597 /**
1598 * \brief Motor Controller must have &gt;= 3.2 firmware for motion profile
1599 * control mode.
1600 */
1601 MotProfFirmThreshold = 1109,
1602 /**
1603 * \brief Motor Controller must have &gt;= 3.4 firmware for advanced PID0/PID1
1604 * features.
1605 */
1606 MotProfFirmThreshold2 = 1110,
1607 /**
1608 * \brief SimDeviceNotFound
1609 */
1610 SimDeviceNotFound = 1200,
1611 /**
1612 * \brief SimPhysicsTypeNotSupported
1613 */
1614 SimPhysicsTypeNotSupported = 1201,
1615 /**
1616 * \brief SimDeviceAlreadyExists
1617 */
1618 SimDeviceAlreadyExists = 1202,
1619 /**
1620 * \brief Could not transmit CAN Frame.
1621 */
1622 TxFailed = -1001,
1623 /**
1624 * \brief An invalid argument was passed into the function/VI, such as a null
1625 * pointer.
1626 */
1627 InvalidParamValue = -1002,
1628 /**
1629 * \brief CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus
1630 * utilization, and power to the device.
1631 */
1632 RxTimeout = -1003,
1633 /**
1634 * \brief CAN Transmit timed out.
1635 */
1636 TxTimeout = -1004,
1637 /**
1638 * \brief ArbID is incorrect.
1639 */
1640 UnexpectedArbId = -1005,
1641 /**
1642 * \brief CanOverflowed
1643 */
1644 CanOverflowed = -1006,
1645 /**
1646 * \brief Sensor Not Present.
1647 */
1648 SensorNotPresent = -1007,
1649 /**
1650 * \brief Firmware Too Old. Use Phoenix Tuner X to field upgrade your CTRE CAN
1651 * device firmware(CRF). Then restart your robot application to clear
1652 * this error.
1653 */
1654 FirmwareTooOld = -1008,
1655 /**
1656 * \brief Control Frame Period could not be changed. Most likely it is not
1657 * being transmitted.
1658 */
1659 CouldNotChangePeriod = -1009,
1660 /**
1661 * \brief BufferFailure
1662 */
1663 BufferFailure = -1010,
1664 /**
1665 * \brief Firmware is legacy non-FRC version. Use Phoenix Tuner X to field
1666 * upgrade your CTRE CAN device firmware(CRF). Firmware greater than
1667 * 20.0 required.
1668 */
1669 FirmwareNonFRC = -1011,
1670 /**
1671 * \brief General Error Occurred.
1672 */
1673 GeneralError = -1100,
1674 /**
1675 * \brief No new response to update signal.
1676 */
1677 SigNotUpdated = -1200,
1678 /**
1679 * \brief NotAllPIDValuesUpdated
1680 */
1681 NotAllPIDValuesUpdated = -1201,
1682 /**
1683 * \brief GEN_PORT_ERROR
1684 */
1685 GEN_PORT_ERROR = -1300,
1686 /**
1687 * \brief PORT_MODULE_TYPE_MISMATCH
1688 */
1689 PORT_MODULE_TYPE_MISMATCH = -1301,
1690 /**
1691 * \brief GEN_MODULE_ERROR
1692 */
1693 GEN_MODULE_ERROR = -1400,
1694 /**
1695 * \brief MODULE_NOT_INIT_SET_ERROR
1696 */
1697 MODULE_NOT_INIT_SET_ERROR = -1401,
1698 /**
1699 * \brief MODULE_NOT_INIT_GET_ERROR
1700 */
1701 MODULE_NOT_INIT_GET_ERROR = -1402,
1702 /**
1703 * \brief Wheel Radius is too small, cannot get distance traveled.
1704 */
1705 WheelRadiusTooSmall = -1500,
1706 /**
1707 * \brief Ticks per revolution is 0, cannot get heading.
1708 */
1709 TicksPerRevZero = -1501,
1710 /**
1711 * \brief Distance between wheels is too small, cannot get heading.
1712 */
1713 DistanceBetweenWheelsTooSmall = -1502,
1714 /**
1715 * \brief GainsAreNotSet
1716 */
1717 GainsAreNotSet = -1503,
1718 /**
1719 * \brief Use RemoteLimitSwitchSource instead of LimitSwitchSource.
1720 */
1721 WrongRemoteLimitSwitchSource = -1504,
1722 /**
1723 * \brief Motor Controller Voltage Compensation should not be used with
1724 * setVoltage(). This causes compensation to happen twice. Disable
1725 * Voltage Compensation by calling enableVoltageCompensation(false) in
1726 * order to use setVoltage().
1727 */
1728 DoubleVoltageCompensatingWPI = -1505,
1729 /**
1730 * \brief CANdleAnimSlotOutOfBounds
1731 */
1732 CANdleAnimSlotOutOfBounds = -1506,
1733 /**
1734 * \brief IncompatibleMode
1735 */
1736 IncompatibleMode = -1600,
1737 /**
1738 * \brief Handle passed into function is incorrect.
1739 */
1740 InvalidHandle = -1601,
1741 /**
1742 * \brief Features requires newer firmware version.
1743 */
1744 FeatureRequiresHigherFirm = -1700,
1745 /**
1746 * \brief Config factory default features require firmware &gt;=3.10.
1747 */
1748 ConfigFactoryDefaultRequiresHigherFirm = -1702,
1749 /**
1750 * \brief Config Motion S Curve Strength features require firmware &gt;=4.16.
1751 */
1752 ConfigMotionSCurveRequiresHigherFirm = -1703,
1753 /**
1754 * \brief Talon FX(Falcon 500) Firmware Too Old. Use Phoenix Tuner to field
1755 * upgrade your CTRE CAN device firmware(CRF) to &gt;=20.3. Then restart
1756 * your robot application to clear this error.
1757 */
1758 TalonFXFirmwarePreVBatDetect = -1704,
1759 /**
1760 * \brief CANdleAnimationsRequireHigherFirm
1761 */
1762 CANdleAnimationsRequireHigherFirm = -1705,
1763 /**
1764 * \brief LibraryCouldNotBeLoaded
1765 */
1766 LibraryCouldNotBeLoaded = -1800,
1767 /**
1768 * \brief MissingRoutineInLibrary
1769 */
1770 MissingRoutineInLibrary = -1801,
1771 /**
1772 * \brief ResourceNotAvailable
1773 */
1774 ResourceNotAvailable = -1802,
1775 /**
1776 * \brief Could not find music file specified, try specifying an absolute path.
1777 */
1778 MusicFileNotFound = -1900,
1779 /**
1780 * \brief Music file size is incorrect, could not parse correctly. Ensure you're
1781 * using Tuner to generate file.
1782 */
1783 MusicFileWrongSize = -1901,
1784 /**
1785 * \brief Music file version is too new, update Phoenix to utilize this file.
1786 */
1787 MusicFileTooNew = -1902,
1788 /**
1789 * \brief Music file is invalid. Ensure you're using Tuner to generate file.
1790 */
1791 MusicFileInvalid = -1903,
1792 /**
1793 * \brief An invalid orchestra action occurred. Ensure a music file is loaded.
1794 */
1795 InvalidOrchestraAction = -1904,
1796 /**
1797 * \brief This music file version is too old. Regenerate file using Tuner.
1798 */
1799 MusicFileTooOld = -1905,
1800 /**
1801 * \brief Music interrupted due to one of the instruments being commanded a
1802 * different control mode. Press Play to resume music.
1803 */
1804 MusicInterrupted = -1906,
1805 /**
1806 * \brief This device doesn't support MusicTone control mode.
1807 */
1808 MusicNotSupported = -1907,
1809 /**
1810 * \brief kInvalidInterface
1811 */
1812 kInvalidInterface = -2000,
1813 /**
1814 * \brief kInvalidGuid
1815 */
1816 kInvalidGuid = -2001,
1817 /**
1818 * \brief kInvalidClass
1819 */
1820 kInvalidClass = -2002,
1821 /**
1822 * \brief kInvalidProtocol
1823 */
1824 kInvalidProtocol = -2003,
1825 /**
1826 * \brief kInvalidPath
1827 */
1828 kInvalidPath = -2004,
1829 /**
1830 * \brief kGeneralWinUsbError
1831 */
1832 kGeneralWinUsbError = -2005,
1833 /**
1834 * \brief kFailedSetup
1835 */
1836 kFailedSetup = -2006,
1837 /**
1838 * \brief kListenFailed
1839 */
1840 kListenFailed = -2007,
1841 /**
1842 * \brief kSendFailed
1843 */
1844 kSendFailed = -2008,
1845 /**
1846 * \brief kReceiveFailed
1847 */
1848 kReceiveFailed = -2009,
1849 /**
1850 * \brief kInvalidRespFormat
1851 */
1852 kInvalidRespFormat = -2010,
1853 /**
1854 * \brief kWinUsbInitFailed
1855 */
1856 kWinUsbInitFailed = -2011,
1857 /**
1858 * \brief kWinUsbQueryFailed
1859 */
1860 kWinUsbQueryFailed = -2012,
1861 /**
1862 * \brief kWinUsbGeneralError
1863 */
1864 kWinUsbGeneralError = -2013,
1865 /**
1866 * \brief kAccessDenied
1867 */
1868 kAccessDenied = -2014,
1869 /**
1870 * \brief kFirmwareInvalidResponse
1871 */
1872 kFirmwareInvalidResponse = -2015,
1873 /**
1874 * \brief This StatusCode has not been initialized. Make sure the StatusCode is
1875 * getting assigned to the return of a method.
1876 */
1877 StatusCodeNotInitialized = -10000,
1878 /**
1879 * \brief WarningNotInitialized
1880 */
1881 WarningNotInitialized = 10000,
1882 /**
1883 * \brief The timestamp reported by CANivore is at least 10ms older than the
1884 * timestamp reported by the system, indicating it's fallen out of sync.
1885 * This does not impact the data of this message, only the timing.
1886 */
1887 HwTimestampOutOfSync = 10001,
1888 /**
1889 * \brief Do not apply or refresh configs periodically, as configs are blocking.
1890 */
1891 FrequentConfigCalls = 10002,
1892 /**
1893 * \brief The given network/CAN bus is invalid. Verify that any status signals
1894 * provided are on the same network and that the network is present.
1895 */
1896 InvalidNetwork = -10001,
1897 /**
1898 * \brief The CAN bus does not support multi-signal synchronization.
1899 */
1900 MultiSignalNotSupported = -10002,
1901 /**
1902 * \brief Could not cast from base value to this particular signal's type
1903 */
1904 CouldNotCast = -10003,
1905 /**
1906 * \brief Could not find this value when searching for it
1907 */
1908 NotFound = -10004,
1909 /**
1910 * \brief This is not supported
1911 */
1912 NotSupported = -10005,
1913 /**
1914 * \brief Could not determine context from this device hash
1915 */
1916 MissingContext = -10006,
1917 /**
1918 * \brief Model name in license file does not match model name of selected
1919 * device.
1920 */
1921 ModelMismatch = -10007,
1922 /**
1923 * \brief Serial Number in license file does not match model name of selected
1924 * device.
1925 */
1926 SerialMismatch = -10008,
1927 /**
1928 * \brief Could not find specified file.
1929 */
1930 NoFile = -10009,
1931 /**
1932 * \brief License did not successfully download to Device.
1933 */
1934 LicenseDownloadFailed = -10010,
1935 /**
1936 * \brief Self Test report does not have any values, is the firmware up to date?
1937 */
1938 SelfTestIsEmpty = -10011,
1939 /**
1940 * \brief Failed to lookup signal properties. This can happen if the fimware is
1941 * too new and supports signals that older APIs do not support.
1942 */
1943 SignalLookupFailed = -10012,
1944 /**
1945 * \brief The current mode of the device is invalid for getting this signal.
1946 */
1947 InvalidModeToGetSignal = -10013,
1948 /**
1949 * \brief Device is not licensed. Cannot get any data from it.
1950 */
1951 UnlicensedDevice = -10014,
1952 /**
1953 * \brief Size is invalid.
1954 */
1955 InvalidSize = -10015,
1956 /**
1957 * \brief InvalidLicenseResponse
1958 */
1959 InvalidLicenseResponse = -10016,
1960 /**
1961 * \brief InvalidContext
1962 */
1963 InvalidContext = -10017,
1964 /**
1965 * \brief InternalError
1966 */
1967 InternalError = -10018,
1968 /**
1969 * \brief kDeviceResponseIncorrect
1970 */
1971 kDeviceResponseIncorrect = -10019,
1972 /**
1973 * \brief kErrorPollingForDevices
1974 */
1975 kErrorPollingForDevices = -10020,
1976 /**
1977 * \brief Device firmware could not be retrieved. Check that the device is
1978 * running v6 firmware, the device ID is correct, the specified CAN bus
1979 * is correct, and the device is powered.
1980 */
1981 CouldNotRetrieveV6Firmware = -10021,
1982 /**
1983 * \brief Device firmware could not be decoded. Check that the device is running
1984 * v6 firmware, the device ID is correct, the specified CAN bus is
1985 * correct, and the device is powered.
1986 */
1987 CouldNotDecodeDeviceFirmware = -10022,
1988 /**
1989 * \brief The values specified for master are in valid. Make sure the Device ID
1990 * of master are correct.
1991 */
1992 InvalidIDToFollow = -10023,
1993 /**
1994 * \brief Using a Pro only feature on an unlicensed device. The device may not
1995 * behave as expected if it continues to operate while unlicensed.
1996 */
1997 UsingProFeatureOnUnlicensedDevice = -10024,
1998 /**
1999 * \brief Firmware Too New. Use Phoenix Tuner X to field upgrade your CTRE CAN
2000 * device firmware(CRF) to a compatible version. Then restart your robot
2001 * application to clear this error.
2002 */
2003 FirmwareTooNew = -10025,
2004 /**
2005 * \brief The data frame could not be serialized for transmit.
2006 */
2007 CouldNotSerialize = -10026,
2008 /**
2009 * \brief The mechanism is disabled due to a fault in one of the devices.
2010 */
2011 MechanismFaulted = -10027,
2012 /**
2013 * \brief Firmware version is not compatible with this version of Phoenix. Make
2014 * sure your firmware and API major versions match.
2015 */
2016 FirmwareVersNotCompatible = -10028,
2017 /**
2018 * \brief Could not find specified directory.
2019 */
2020 DirectoryMissing = -10029,
2021 /**
2022 * \brief This API version is too old for the firmware on the device. Either
2023 * upgrade the API to a newer version or downgrade the device firmware to
2024 * an older version for correct behavior.
2025 */
2026 ApiTooOld = -10030,
2027 /**
2028 * \brief The signal logger is not running. Start the signal logger before
2029 * writing any signals.
2030 */
2031 LoggerNotRunning = -10031,
2032 /**
2033 * \brief Blocking operations, such as configs, cannot have a timeout of 0. Pass
2034 * in a non-zero timeout (typically 0.050+ seconds) for normal operation.
2035 */
2036 TimeoutCannotBeZero = -10032,
2037 /**
2038 * \brief Device cannot be licensed while it is control enabled. Disable and
2039 * neutral the device to apply the licenses.
2040 */
2041 CannotLicenseWhileEnabled = -10033,
2042 /**
2043 * \brief Could not open or read the given file.
2044 */
2045 InvalidFile = -10034,
2046 /**
2047 * \brief The given hoot log requires an older version of Phoenix API.
2048 */
2049 HootLogTooOld = -10035,
2050 /**
2051 * \brief The given hoot log requires a newer version of Phoenix API.
2052 */
2053 HootLogTooNew = -10036,
2054 /**
2055 * \brief Hoot log is not licensed. Cannot get any data from it.
2056 */
2057 UnlicensedHootLog = -10037,
2058 /**
2059 * \brief The simulation timing cannot be advanced by a time step while
2060 * unpaused. Pause the simulator before advancing time.
2061 */
2062 CannotStepWhileUnpaused = -10038,
2063 /**
2064 * \brief Hoot replay does not support replaying multiple files. Ensure that
2065 * only one file is loaded at a time.
2066 */
2067 MultipleReplayNotSupported = -10039,
2068 /**
2069 * \brief The maximum number of loggable user signals has been exceeded.
2070 * Additional user signals will not be logged.
2071 */
2072 UserSignalLimitExceeded = -10040,
2073 /**
2074 * \brief The provided model was not a valid device type.
2075 */
2076 InvalidDeviceModel = -10041,
2077 /**
2078 * \brief The requested signal is missing or not supported. Verify that the
2079 * device firmware is up-to-date.
2080 */
2081 SignalNotSupportedOrMissing = -10042,
2082 /**
2083 * \brief The schema for the logged user signal is invalid or missing. Ensure
2084 * that the schema is written before the user signal.
2085 */
2086 MissingSchema = -10043,
2087 /**
2088 * \brief The device ID is invalid. Ensure the device is constructed with a
2089 * valid ID (0-62).
2090 */
2091 InvalidDeviceId = -10044,
2092} StatusCode_t;
2093
2094/**
2095 * \brief Get the name of the StatusCode passed
2096 *
2097 * \param value StatusCode to get name of
2098 * \returns const char* Name of StatusCode
2099 */
2100const char *GetStatusCodeName(StatusCode_t value);
2101/**
2102 * \brief Get the description of the StatusCode passed
2103 *
2104 * \param value StatusCode to get description of
2105 * \returns const char* Description of StatusCode
2106 */
2107const char *GetStatusCodeDescription(StatusCode_t value);
2108
2109#endif
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:28
static constexpr int CANdleAnimationsRequireHigherFirm
CANdleAnimationsRequireHigherFirm.
Definition StatusCodes.h:505
static constexpr int InvalidContext
InvalidContext.
Definition StatusCodes.h:706
static constexpr int PulseWidthSensorNotPresent
PulseWidthSensorNotPresent.
Definition StatusCodes.h:317
static constexpr int kAccessDenied
kAccessDenied
Definition StatusCodes.h:611
static constexpr int FirmVersionCouldNotBeRetrieved
Firm Vers could not be retrieved.
Definition StatusCodes.h:326
static constexpr int NoFile
Could not find specified file.
Definition StatusCodes.h:673
static constexpr int FeatureRequiresHigherFirm
Features requires newer firmware version.
Definition StatusCodes.h:487
static constexpr int FirmwareNonFRC
Firmware is legacy non-FRC version.
Definition StatusCodes.h:412
friend std::ostream & operator<<(std::ostream &os, StatusCode status)
static constexpr int MusicFileWrongSize
Music file size is incorrect, could not parse correctly.
Definition StatusCodes.h:526
static constexpr int kGeneralWinUsbError
kGeneralWinUsbError
Definition StatusCodes.h:575
static constexpr int kWinUsbGeneralError
kWinUsbGeneralError
Definition StatusCodes.h:607
static constexpr int PORT_MODULE_TYPE_MISMATCH
PORT_MODULE_TYPE_MISMATCH.
Definition StatusCodes.h:432
static constexpr int SensorNotPresent
Sensor Not Present.
Definition StatusCodes.h:391
static constexpr int kFirmwareInvalidResponse
kFirmwareInvalidResponse
Definition StatusCodes.h:615
static constexpr int NotUpdating
The diagnostic server is not field upgrading any devices.
Definition StatusCodes.h:142
static constexpr int InvalidIDToFollow
The values specified for master are in valid.
Definition StatusCodes.h:735
static constexpr int CannotStepWhileUnpaused
The simulation timing cannot be advanced by a time step while unpaused.
Definition StatusCodes.h:805
static constexpr int InternalError
InternalError.
Definition StatusCodes.h:710
static constexpr int CouldNotChangePeriod
Control Frame Period could not be changed.
Definition StatusCodes.h:402
static constexpr int IncompatibleMode
IncompatibleMode.
Definition StatusCodes.h:479
static constexpr int ControlModeNotSupportedYet
This control mode is not supported yet.
Definition StatusCodes.h:339
static constexpr int NormalModeMsgNotPresent
NormalModeMsgNotPresent.
Definition StatusCodes.h:134
static constexpr int CouldNotReqDevInfo
CouldNotReqDevInfo.
Definition StatusCodes.h:184
static constexpr int SimPhysicsTypeNotSupported
SimPhysicsTypeNotSupported.
Definition StatusCodes.h:357
static constexpr int HootLogTooNew
The given hoot log requires a newer version of Phoenix API.
Definition StatusCodes.h:796
constexpr const char * GetDescription() const
Gets the description of this StatusCode.
Definition StatusCodes.h:1073
static constexpr int OK
No Error.
Definition StatusCodes.h:35
static constexpr int StatusCodeNotInitialized
This StatusCode has not been initialized.
Definition StatusCodes.h:620
static constexpr int AppIsTerminating
The user application is shutting down.
Definition StatusCodes.h:304
static constexpr int DoubleVoltageCompensatingWPI
Motor Controller Voltage Compensation should not be used with setVoltage().
Definition StatusCodes.h:471
static constexpr int GEN_MODULE_ERROR
GEN_MODULE_ERROR.
Definition StatusCodes.h:436
static constexpr int NotImplemented
Not Implemented, check latest installer.
Definition StatusCodes.h:109
static constexpr int SignalLookupFailed
Failed to lookup signal properties.
Definition StatusCodes.h:686
static constexpr int UnlicensedDevice
Device is not licensed.
Definition StatusCodes.h:694
static constexpr int kInvalidGuid
kInvalidGuid
Definition StatusCodes.h:559
static constexpr int CouldNotCast
Could not cast from base value to this particular signal's type.
Definition StatusCodes.h:647
constexpr friend auto operator<=>(StatusCode, StatusCode)=default
static constexpr int SimDeviceNotFound
SimDeviceNotFound.
Definition StatusCodes.h:353
static constexpr int CouldNotValidate
Bootloader could not verify integrity of the flashed application.
Definition StatusCodes.h:68
static constexpr int InvalidCrfNoSects
InvalidCrfNoSects.
Definition StatusCodes.h:220
static constexpr int CouldNotReqSetDesc
Unable to set name to this device.
Definition StatusCodes.h:93
static constexpr int CannotUdpToDevice
CannotUdpToDevice.
Definition StatusCodes.h:288
static constexpr int MusicFileTooOld
This music file version is too old.
Definition StatusCodes.h:542
static constexpr int InvalidHandle
Handle passed into function is incorrect.
Definition StatusCodes.h:483
static constexpr int CannotOpenSerialPort
CannotOpenSerialPort.
Definition StatusCodes.h:256
static constexpr int kInvalidInterface
kInvalidInterface
Definition StatusCodes.h:555
static constexpr int ConfigReadWriteMismatch
The configs read from the device do not match the configs that were written.
Definition StatusCodes.h:168
static constexpr int NotAllPIDValuesUpdated
NotAllPIDValuesUpdated.
Definition StatusCodes.h:424
static constexpr int TaskIsBusy
Diagnostic Server is busy with another command.
Definition StatusCodes.h:39
constexpr const char * GetName() const
Gets the name of this StatusCode.
Definition StatusCodes.h:871
static constexpr int kInvalidProtocol
kInvalidProtocol
Definition StatusCodes.h:567
static constexpr int CouldNotSendFlash
Could not field upgrade the device.
Definition StatusCodes.h:64
static constexpr int CannotOpenUdpPort
CannotOpenUdpPort.
Definition StatusCodes.h:276
static constexpr int CanivCliError
Command-line issue with caniv.
Definition StatusCodes.h:204
static constexpr int InsufficientSz
InsufficientSz.
Definition StatusCodes.h:176
static constexpr int AppTooOld
Device firmware application is too old.
Definition StatusCodes.h:89
static constexpr int MultipleReplayNotSupported
Hoot replay does not support replaying multiple files.
Definition StatusCodes.h:810
static constexpr int WarningNotInitialized
WarningNotInitialized.
Definition StatusCodes.h:624
static constexpr int MODULE_NOT_INIT_SET_ERROR
MODULE_NOT_INIT_SET_ERROR.
Definition StatusCodes.h:440
static constexpr int InvalidJson
InvalidJson.
Definition StatusCodes.h:300
static constexpr int BufferFull
Buffer is full, cannot insert more data.
Definition StatusCodes.h:313
static constexpr int MusicFileInvalid
Music file is invalid.
Definition StatusCodes.h:534
static constexpr int DidNotGetFullDhcp
DidNotGetFullDhcp.
Definition StatusCodes.h:244
static constexpr int CanOverflowed
CanOverflowed.
Definition StatusCodes.h:387
static constexpr int MotProfFirmThreshold2
Motor Controller must have >= 3.4 firmware for advanced PID0/PID1 features.
Definition StatusCodes.h:349
static constexpr int FlashWasGood
Device field upgrade was successful.
Definition StatusCodes.h:85
static constexpr int CouldNotRunApp
Could not run the device firmware application.
Definition StatusCodes.h:72
static constexpr int CouldNotConfirmBl
Could not confirm the device has entered the bootloader.
Definition StatusCodes.h:56
static constexpr int GeneralError
General Error Occurred.
Definition StatusCodes.h:416
static constexpr int GeneralWarning
General Warning Occurred.
Definition StatusCodes.h:321
static constexpr int HootLogTooOld
The given hoot log requires an older version of Phoenix API.
Definition StatusCodes.h:792
static constexpr int CouldNotErase
Could not erase flash.
Definition StatusCodes.h:60
static constexpr int HwTimestampOutOfSync
The timestamp reported by CANivore is at least 10ms older than the timestamp reported by the system,...
Definition StatusCodes.h:630
static constexpr int CouldNotEnterBl
Could not put the device into bootloader mode.
Definition StatusCodes.h:52
static constexpr int ModelMismatch
Model name in license file does not match model name of selected device.
Definition StatusCodes.h:664
static constexpr int NoConfigs
This device did not report any available configs.
Definition StatusCodes.h:151
constexpr bool IsWarning() const
Definition StatusCodes.h:860
static constexpr int SerialMismatch
Serial Number in license file does not match model name of selected device.
Definition StatusCodes.h:669
static constexpr int InvalidLicenseResp
InvalidLicenseResp.
Definition StatusCodes.h:248
static constexpr int ConfigFailed
ConfigFailed.
Definition StatusCodes.h:155
static constexpr int InvalidCrfBadHeader
InvalidCrfBadHeader.
Definition StatusCodes.h:208
static constexpr int CouldNotFindDynamicId
CouldNotFindDynamicId.
Definition StatusCodes.h:236
static constexpr int GainsAreNotSet
GainsAreNotSet.
Definition StatusCodes.h:460
static constexpr int BufferFailure
BufferFailure.
Definition StatusCodes.h:406
static constexpr int OnlySupportedInTunerX
This feature requires Tuner X.
Definition StatusCodes.h:200
static constexpr int InvalidModel
This feature is not supported for this device model.
Definition StatusCodes.h:180
static constexpr int CannotWriteSerialPort
CannotWriteSerialPort.
Definition StatusCodes.h:260
static constexpr int InvalidParamValue
An invalid argument was passed into the function/VI, such as a null pointer.
Definition StatusCodes.h:370
constexpr StatusCode()
Definition StatusCodes.h:837
static constexpr int DirectoryMissing
Could not find specified directory.
Definition StatusCodes.h:763
static constexpr int CanMessageStale
CAN message is stale, data is valid but old.
Definition StatusCodes.h:309
static constexpr int InvalidCrfBadSectHeader
InvalidCrfBadSectHeader.
Definition StatusCodes.h:224
static constexpr int kSendFailed
kSendFailed
Definition StatusCodes.h:587
static constexpr int NoSerialControlFrameResp
NoSerialControlFrameResp.
Definition StatusCodes.h:272
static constexpr int kInvalidRespFormat
kInvalidRespFormat
Definition StatusCodes.h:595
static constexpr int TalonFXFirmwarePreVBatDetect
Talon FX(Falcon 500) Firmware Too Old.
Definition StatusCodes.h:501
static constexpr int ControlModeNotValid
The control mode is not valid for this function.
Definition StatusCodes.h:334
static constexpr int InvalidOrchestraAction
An invalid orchestra action occurred.
Definition StatusCodes.h:538
static constexpr int InvalidCrfFileSzInvald
InvalidCrfFileSzInvald.
Definition StatusCodes.h:212
static constexpr int InvalidModeToGetSignal
The current mode of the device is invalid for getting this signal.
Definition StatusCodes.h:690
static constexpr int InvalidCrfWrongProduct
Specified CRF is for the wrong product.
Definition StatusCodes.h:216
static constexpr int kWinUsbQueryFailed
kWinUsbQueryFailed
Definition StatusCodes.h:603
static constexpr int SelfTestIsEmpty
Self Test report does not have any values, is the firmware up to date?
Definition StatusCodes.h:681
static constexpr int NoUdpControlFrameResp
NoUdpControlFrameResp.
Definition StatusCodes.h:292
static constexpr int DeviceDidNotRespondToDiagReq
DeviceDidNotRespondToDiagReq.
Definition StatusCodes.h:196
static constexpr int EcuIsNotPresent
Device is not present.
Definition StatusCodes.h:48
static constexpr int InvalidCrfBadSectSize
InvalidCrfBadSectSize.
Definition StatusCodes.h:228
static constexpr int CannotReadUdpPort
CannotReadUdpPort.
Definition StatusCodes.h:284
static constexpr int LoggerNotRunning
The signal logger is not running.
Definition StatusCodes.h:774
static constexpr int kListenFailed
kListenFailed
Definition StatusCodes.h:583
static constexpr int InvalidDeviceId
The device ID is invalid.
Definition StatusCodes.h:834
constexpr StatusCode(int val)
Definition StatusCodes.h:836
static constexpr int MotProfFirmThreshold
Motor Controller must have >= 3.2 firmware for motion profile control mode.
Definition StatusCodes.h:344
static constexpr int FeaturesNotAvailableYet
This feature will be supported in a future update.
Definition StatusCodes.h:330
static constexpr int TxFailed
Could not transmit CAN Frame.
Definition StatusCodes.h:365
static constexpr int InvalidTask
This diagnostic action is not supported.
Definition StatusCodes.h:105
static constexpr int FirmwareVersNotCompatible
Firmware version is not compatible with this version of Phoenix.
Definition StatusCodes.h:759
static constexpr int UserSignalLimitExceeded
The maximum number of loggable user signals has been exceeded.
Definition StatusCodes.h:815
static constexpr int InvalidLicenseResponse
InvalidLicenseResponse.
Definition StatusCodes.h:702
static constexpr int CompileSzIsWrong
CompileSzIsWrong.
Definition StatusCodes.h:97
static constexpr int CustomNameNotSupported
CustomNameNotSupported.
Definition StatusCodes.h:163
static constexpr int CouldNotDecodeDeviceFirmware
Device firmware could not be decoded.
Definition StatusCodes.h:730
constexpr bool operator==(int other) const
Definition StatusCodes.h:844
static constexpr int InvalidCanivCache
InvalidCanivCache.
Definition StatusCodes.h:252
static constexpr int FirmwareTooNew
Firmware Too New.
Definition StatusCodes.h:746
static constexpr int kReceiveFailed
kReceiveFailed
Definition StatusCodes.h:591
static constexpr int MusicInterrupted
Music interrupted due to one of the instruments being commanded a different control mode.
Definition StatusCodes.h:547
static constexpr int CouldNotRetrieveV6Firmware
Device firmware could not be retrieved.
Definition StatusCodes.h:724
static constexpr int FrequentConfigCalls
Do not apply or refresh configs periodically, as configs are blocking.
Definition StatusCodes.h:634
static constexpr int CannotReadSerialPort
CannotReadSerialPort.
Definition StatusCodes.h:264
static constexpr int MissingRoutineInLibrary
MissingRoutineInLibrary.
Definition StatusCodes.h:513
static constexpr int MusicFileNotFound
Could not find music file specified, try specifying an absolute path.
Definition StatusCodes.h:521
static constexpr int WrongRemoteLimitSwitchSource
Use RemoteLimitSwitchSource instead of LimitSwitchSource.
Definition StatusCodes.h:464
static constexpr int MoreThanOneFile
MoreThanOneFile.
Definition StatusCodes.h:117
static constexpr int kWinUsbInitFailed
kWinUsbInitFailed
Definition StatusCodes.h:599
static constexpr int CouldNotConfirmId
Could not verify that the changed ID took effect.
Definition StatusCodes.h:81
constexpr bool IsOK() const
Definition StatusCodes.h:864
static constexpr int CannotSerialToDevice
CannotSerialToDevice.
Definition StatusCodes.h:268
static constexpr int LibraryCouldNotBeLoaded
LibraryCouldNotBeLoaded.
Definition StatusCodes.h:509
static constexpr int NoControls
This device does not support new controls.
Definition StatusCodes.h:188
constexpr auto operator<=>(int other) const
Definition StatusCodes.h:848
static constexpr int ConfigMotionSCurveRequiresHigherFirm
Config Motion S Curve Strength features require firmware >=4.16.
Definition StatusCodes.h:495
static constexpr int MusicNotSupported
This device doesn't support MusicTone control mode.
Definition StatusCodes.h:551
static constexpr int GadgeteerDeviceNoSetId
Cannot set the ID of a gadgeteer device.
Definition StatusCodes.h:101
static constexpr int NodeIsInvalid
Specified device was not found.
Definition StatusCodes.h:122
static constexpr int InvalidSize
Size is invalid.
Definition StatusCodes.h:698
static constexpr int TimeoutCannotBeZero
Blocking operations, such as configs, cannot have a timeout of 0.
Definition StatusCodes.h:779
static constexpr int MODULE_NOT_INIT_GET_ERROR
MODULE_NOT_INIT_GET_ERROR.
Definition StatusCodes.h:444
static constexpr int CouldNotReqFactoryDefault
Unable to factory default this device.
Definition StatusCodes.h:159
static constexpr int ConfigFactoryDefaultRequiresHigherFirm
Config factory default features require firmware >=3.10.
Definition StatusCodes.h:491
static constexpr int FirmwareTooOld
Firmware Too Old.
Definition StatusCodes.h:397
static constexpr int CorruptedPOST
CorruptedPOST.
Definition StatusCodes.h:146
static constexpr int LicenseDownloadFailed
License did not successfully download to Device.
Definition StatusCodes.h:677
static constexpr int FeatureNotSupported
This feature is not supported.
Definition StatusCodes.h:138
static constexpr int kErrorPollingForDevices
kErrorPollingForDevices
Definition StatusCodes.h:718
static constexpr int NoCrfFile
Specified CRF file could not be found.
Definition StatusCodes.h:232
static constexpr int UnexpectedArbId
ArbID is incorrect.
Definition StatusCodes.h:383
static constexpr int GEN_PORT_ERROR
GEN_PORT_ERROR.
Definition StatusCodes.h:428
static constexpr int CANdleAnimSlotOutOfBounds
CANdleAnimSlotOutOfBounds.
Definition StatusCodes.h:475
static constexpr int CouldNotSendCanFrame
CouldNotSendCanFrame.
Definition StatusCodes.h:130
static constexpr int kInvalidClass
kInvalidClass
Definition StatusCodes.h:563
static constexpr int WheelRadiusTooSmall
Wheel Radius is too small, cannot get distance traveled.
Definition StatusCodes.h:448
static constexpr int CouldNotSerialize
The data frame could not be serialized for transmit.
Definition StatusCodes.h:750
static constexpr int InvalidDeviceSpec
InvalidDeviceSpec.
Definition StatusCodes.h:43
static constexpr int UnlicensedHootLog
Hoot log is not licensed.
Definition StatusCodes.h:800
static constexpr int NoDevicesOnBus
NoDevicesOnBus.
Definition StatusCodes.h:113
static constexpr int MechanismFaulted
The mechanism is disabled due to a fault in one of the devices.
Definition StatusCodes.h:754
static constexpr int ApiTooOld
This API version is too old for the firmware on the device.
Definition StatusCodes.h:769
static constexpr int DidNotGetDhcp
DidNotGetDhcp.
Definition StatusCodes.h:240
static constexpr int InvalidDeviceDescriptor
InvalidDeviceDescriptor.
Definition StatusCodes.h:126
static constexpr int MusicFileTooNew
Music file version is too new, update Phoenix to utilize this file.
Definition StatusCodes.h:530
static constexpr int UsingProFeatureOnUnlicensedDevice
Using a Pro only feature on an unlicensed device.
Definition StatusCodes.h:740
constexpr bool IsError() const
Definition StatusCodes.h:856
static constexpr int SignalNotSupportedOrMissing
The requested signal is missing or not supported.
Definition StatusCodes.h:824
static constexpr int kDeviceResponseIncorrect
kDeviceResponseIncorrect
Definition StatusCodes.h:714
static constexpr int SimDeviceAlreadyExists
SimDeviceAlreadyExists.
Definition StatusCodes.h:361
static constexpr int TicksPerRevZero
Ticks per revolution is 0, cannot get heading.
Definition StatusCodes.h:452
static constexpr int MissingSchema
The schema for the logged user signal is invalid or missing.
Definition StatusCodes.h:829
static constexpr int kFailedSetup
kFailedSetup
Definition StatusCodes.h:579
static constexpr int CannotLicenseWhileEnabled
Device cannot be licensed while it is control enabled.
Definition StatusCodes.h:784
constexpr friend bool operator==(StatusCode, StatusCode)=default
static constexpr int CouldNotReqSetConfigs
Could not apply the device configs.
Definition StatusCodes.h:172
static constexpr int InvalidDeviceModel
The provided model was not a valid device type.
Definition StatusCodes.h:819
static constexpr int CouldNotReqSetId
Unable to set ID to this device.
Definition StatusCodes.h:77
static constexpr int kInvalidPath
kInvalidPath
Definition StatusCodes.h:571
static constexpr int TxTimeout
CAN Transmit timed out.
Definition StatusCodes.h:379
static constexpr int InvalidNetwork
The given network/CAN bus is invalid.
Definition StatusCodes.h:639
static constexpr int MissingContext
Could not determine context from this device hash.
Definition StatusCodes.h:659
static constexpr int DeviceIsNull
DeviceIsNull.
Definition StatusCodes.h:192
static constexpr int MultiSignalNotSupported
The CAN bus does not support multi-signal synchronization.
Definition StatusCodes.h:643
static constexpr int SigNotUpdated
No new response to update signal.
Definition StatusCodes.h:420
static constexpr int TimeoutIso15Response
TimeoutIso15Response.
Definition StatusCodes.h:296
static constexpr int CannotWriteUdpPort
CannotWriteUdpPort.
Definition StatusCodes.h:280
static constexpr int ResourceNotAvailable
ResourceNotAvailable.
Definition StatusCodes.h:517
static constexpr int DistanceBetweenWheelsTooSmall
Distance between wheels is too small, cannot get heading.
Definition StatusCodes.h:456
static constexpr int RxTimeout
CAN frame not received/too-stale.
Definition StatusCodes.h:375
static constexpr int NotSupported
This is not supported.
Definition StatusCodes.h:655
static constexpr int InvalidFile
Could not open or read the given file.
Definition StatusCodes.h:788
static constexpr int NotFound
Could not find this value when searching for it.
Definition StatusCodes.h:651
#define CTREXPORT
Definition export.h:14
@ OK
The mechanism is running normally.
Definition motor_constants.h:14