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