WPILibC++  2019.1.1-beta-3-1-g0c3b488
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Errors.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
16 #define CTR_RxTimeout_MESSAGE "CTRE CAN Receive Timeout"
17 #define CTR_TxTimeout_MESSAGE "CTRE CAN Transmit Timeout"
18 #define CTR_InvalidParamValue_MESSAGE "CTRE CAN Invalid Parameter"
19 #define CTR_UnexpectedArbId_MESSAGE \
20  "CTRE Unexpected Arbitration ID (CAN Node ID)"
21 #define CTR_TxFailed_MESSAGE "CTRE CAN Transmit Error"
22 #define CTR_SigNotUpdated_MESSAGE "CTRE CAN Signal Not Updated"
23 
24 #define NiFpga_Status_FifoTimeout_MESSAGE "NIFPGA: FIFO timeout error"
25 #define NiFpga_Status_TransferAborted_MESSAGE "NIFPGA: Transfer aborted error"
26 #define NiFpga_Status_MemoryFull_MESSAGE \
27  "NIFPGA: Memory Allocation failed, memory full"
28 #define NiFpga_Status_SoftwareFault_MESSAGE "NIFPGA: Unexpected software error"
29 #define NiFpga_Status_InvalidParameter_MESSAGE "NIFPGA: Invalid Parameter"
30 #define NiFpga_Status_ResourceNotFound_MESSAGE "NIFPGA: Resource not found"
31 #define NiFpga_Status_ResourceNotInitialized_MESSAGE \
32  "NIFPGA: Resource not initialized"
33 #define NiFpga_Status_HardwareFault_MESSAGE "NIFPGA: Hardware Fault"
34 #define NiFpga_Status_IrqTimeout_MESSAGE "NIFPGA: Interrupt timeout"
35 
36 #define ERR_CANSessionMux_InvalidBuffer_MESSAGE "CAN: Invalid Buffer"
37 #define ERR_CANSessionMux_MessageNotFound_MESSAGE "CAN: Message not found"
38 #define WARN_CANSessionMux_NoToken_MESSAGE "CAN: No token"
39 #define ERR_CANSessionMux_NotAllowed_MESSAGE "CAN: Not allowed"
40 #define ERR_CANSessionMux_NotInitialized_MESSAGE "CAN: Not initialized"
41 
42 #define ERR_FRCSystem_NetCommNotResponding_MESSAGE \
43  "FRCSystem: NetComm not responding"
44 #define ERR_FRCSystem_NoDSConnection_MESSAGE \
45  "FRCSystem: No driver station connected"
46 
47 #define SAMPLE_RATE_TOO_HIGH 1001
48 #define SAMPLE_RATE_TOO_HIGH_MESSAGE \
49  "HAL: Analog module sample rate is too high"
50 #define VOLTAGE_OUT_OF_RANGE 1002
51 #define VOLTAGE_OUT_OF_RANGE_MESSAGE \
52  "HAL: Voltage to convert to raw value is out of range [0; 5]"
53 #define LOOP_TIMING_ERROR 1004
54 #define LOOP_TIMING_ERROR_MESSAGE \
55  "HAL: Digital module loop timing is not the expected value"
56 #define SPI_WRITE_NO_MOSI 1012
57 #define SPI_WRITE_NO_MOSI_MESSAGE \
58  "HAL: Cannot write to SPI port with no MOSI output"
59 #define SPI_READ_NO_MISO 1013
60 #define SPI_READ_NO_MISO_MESSAGE \
61  "HAL: Cannot read from SPI port with no MISO input"
62 #define SPI_READ_NO_DATA 1014
63 #define SPI_READ_NO_DATA_MESSAGE "HAL: No data available to read from SPI"
64 #define INCOMPATIBLE_STATE 1015
65 #define INCOMPATIBLE_STATE_MESSAGE \
66  "HAL: Incompatible State: The operation cannot be completed"
67 #define NO_AVAILABLE_RESOURCES -1004
68 #define NO_AVAILABLE_RESOURCES_MESSAGE "HAL: No available resources to allocate"
69 #define NULL_PARAMETER -1005
70 #define NULL_PARAMETER_MESSAGE "HAL: A pointer parameter to a method is NULL"
71 #define ANALOG_TRIGGER_LIMIT_ORDER_ERROR -1010
72 #define ANALOG_TRIGGER_LIMIT_ORDER_ERROR_MESSAGE \
73  "HAL: AnalogTrigger limits error. Lower limit > Upper Limit"
74 #define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR -1011
75 #define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR_MESSAGE \
76  "HAL: Attempted to read AnalogTrigger pulse output."
77 #define PARAMETER_OUT_OF_RANGE -1028
78 #define PARAMETER_OUT_OF_RANGE_MESSAGE "HAL: A parameter is out of range."
79 #define RESOURCE_IS_ALLOCATED -1029
80 #define RESOURCE_IS_ALLOCATED_MESSAGE "HAL: Resource already allocated"
81 #define RESOURCE_OUT_OF_RANGE -1030
82 #define RESOURCE_OUT_OF_RANGE_MESSAGE \
83  "HAL: The requested resource is out of range."
84 #define HAL_INVALID_ACCUMULATOR_CHANNEL -1035
85 #define HAL_INVALID_ACCUMULATOR_CHANNEL_MESSAGE \
86  "HAL: The requested input is not an accumulator channel"
87 #define HAL_COUNTER_NOT_SUPPORTED -1058
88 #define HAL_COUNTER_NOT_SUPPORTED_MESSAGE \
89  "HAL: Counter mode not supported for encoder method"
90 #define HAL_PWM_SCALE_ERROR -1072
91 #define HAL_PWM_SCALE_ERROR_MESSAGE \
92  "HAL: The PWM Scale Factors are out of range"
93 #define HAL_HANDLE_ERROR -1098
94 #define HAL_HANDLE_ERROR_MESSAGE \
95  "HAL: A handle parameter was passed incorrectly"
96 
97 #define HAL_SERIAL_PORT_NOT_FOUND -1123
98 #define HAL_SERIAL_PORT_NOT_FOUND_MESSAGE \
99  "HAL: The specified serial port device was not found"
100 
101 #define HAL_SERIAL_PORT_OPEN_ERROR -1124
102 #define HAL_SERIAL_PORT_OPEN_ERROR_MESSAGE \
103  "HAL: The serial port could not be opened"
104 
105 #define HAL_SERIAL_PORT_ERROR -1125
106 #define HAL_SERIAL_PORT_ERROR_MESSAGE \
107  "HAL: There was an error on the serial port"
108 
109 #define HAL_THREAD_PRIORITY_ERROR -1152
110 #define HAL_THREAD_PRIORITY_ERROR_MESSAGE \
111  "HAL: Getting or setting the priority of a thread has failed";
112 
113 #define HAL_THREAD_PRIORITY_RANGE_ERROR -1153
114 #define HAL_THREAD_PRIORITY_RANGE_ERROR_MESSAGE \
115  "HAL: The priority requested to be set is invalid"
116 
117 #define HAL_CAN_TIMEOUT -1154
118 #define HAL_CAN_TIMEOUT_MESSAGE "HAL: CAN Receive has Timed Out"
119 
120 #define VI_ERROR_SYSTEM_ERROR_MESSAGE "HAL - VISA: System Error";
121 #define VI_ERROR_INV_OBJECT_MESSAGE "HAL - VISA: Invalid Object"
122 #define VI_ERROR_RSRC_LOCKED_MESSAGE "HAL - VISA: Resource Locked"
123 #define VI_ERROR_RSRC_NFOUND_MESSAGE "HAL - VISA: Resource Not Found"
124 #define VI_ERROR_INV_RSRC_NAME_MESSAGE "HAL - VISA: Invalid Resource Name"
125 #define VI_ERROR_QUEUE_OVERFLOW_MESSAGE "HAL - VISA: Queue Overflow"
126 #define VI_ERROR_IO_MESSAGE "HAL - VISA: General IO Error"
127 #define VI_ERROR_ASRL_PARITY_MESSAGE "HAL - VISA: Parity Error"
128 #define VI_ERROR_ASRL_FRAMING_MESSAGE "HAL - VISA: Framing Error"
129 #define VI_ERROR_ASRL_OVERRUN_MESSAGE "HAL - VISA: Buffer Overrun Error"
130 #define VI_ERROR_RSRC_BUSY_MESSAGE "HAL - VISA: Resource Busy"
131 #define VI_ERROR_INV_PARAMETER_MESSAGE "HAL - VISA: Invalid Parameter"
132