WPILibC++
2024.3.2
Errors.h
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#pragma once
6
7
/**
8
* @defgroup hal_errors Error Defines
9
* @ingroup hal_capi
10
* @{
11
*/
12
13
#define CTR_RxTimeout_MESSAGE "CTRE CAN Receive Timeout"
14
#define CTR_TxTimeout_MESSAGE "CTRE CAN Transmit Timeout"
15
#define CTR_InvalidParamValue_MESSAGE "CTRE CAN Invalid Parameter"
16
#define CTR_UnexpectedArbId_MESSAGE \
17
"CTRE Unexpected Arbitration ID (CAN Node ID)"
18
#define CTR_TxFailed_MESSAGE "CTRE CAN Transmit Error"
19
#define CTR_SigNotUpdated_MESSAGE "CTRE CAN Signal Not Updated"
20
21
#define NiFpga_Status_FifoTimeout_MESSAGE "NIFPGA: FIFO timeout error"
22
#define NiFpga_Status_TransferAborted_MESSAGE "NIFPGA: Transfer aborted error"
23
#define NiFpga_Status_MemoryFull_MESSAGE \
24
"NIFPGA: Memory Allocation failed, memory full"
25
#define NiFpga_Status_SoftwareFault_MESSAGE "NIFPGA: Unexpected software error"
26
#define NiFpga_Status_InvalidParameter_MESSAGE "NIFPGA: Invalid Parameter"
27
#define NiFpga_Status_ResourceNotFound_MESSAGE "NIFPGA: Resource not found"
28
#define NiFpga_Status_ResourceNotInitialized_MESSAGE \
29
"NIFPGA: Resource not initialized"
30
#define NiFpga_Status_HardwareFault_MESSAGE "NIFPGA: Hardware Fault"
31
#define NiFpga_Status_IrqTimeout_MESSAGE "NIFPGA: Interrupt timeout"
32
33
#define ERR_CANSessionMux_InvalidBuffer_MESSAGE "CAN: Invalid Buffer"
34
#define ERR_CANSessionMux_MessageNotFound_MESSAGE "CAN: Message not found"
35
#define WARN_CANSessionMux_NoToken_MESSAGE "CAN: No token"
36
#define ERR_CANSessionMux_NotAllowed_MESSAGE "CAN: Not allowed"
37
#define ERR_CANSessionMux_NotInitialized_MESSAGE "CAN: Not initialized"
38
39
#define ERR_FRCSystem_NetCommNotResponding_MESSAGE \
40
"FRCSystem: NetComm not responding"
41
#define ERR_FRCSystem_NoDSConnection_MESSAGE \
42
"FRCSystem: No driver station connected"
43
44
#define HAL_SUCCESS 0
45
46
#define SAMPLE_RATE_TOO_HIGH 1001
47
#define SAMPLE_RATE_TOO_HIGH_MESSAGE \
48
"HAL: Analog module sample rate is too high"
49
#define VOLTAGE_OUT_OF_RANGE 1002
50
#define VOLTAGE_OUT_OF_RANGE_MESSAGE \
51
"HAL: Voltage to convert to raw value is out of range [0; 5]"
52
#define LOOP_TIMING_ERROR 1004
53
#define LOOP_TIMING_ERROR_MESSAGE \
54
"HAL: Digital module loop timing is not the expected value"
55
#define SPI_WRITE_NO_MOSI 1012
56
#define SPI_WRITE_NO_MOSI_MESSAGE \
57
"HAL: Cannot write to SPI port with no MOSI output"
58
#define SPI_READ_NO_MISO 1013
59
#define SPI_READ_NO_MISO_MESSAGE \
60
"HAL: Cannot read from SPI port with no MISO input"
61
#define SPI_READ_NO_DATA 1014
62
#define SPI_READ_NO_DATA_MESSAGE "HAL: No data available to read from SPI"
63
#define INCOMPATIBLE_STATE 1015
64
#define INCOMPATIBLE_STATE_MESSAGE \
65
"HAL: Incompatible State: The operation cannot be completed"
66
#define NO_AVAILABLE_RESOURCES -1004
67
#define NO_AVAILABLE_RESOURCES_MESSAGE "HAL: No available resources to allocate"
68
#define NULL_PARAMETER -1005
69
#define NULL_PARAMETER_MESSAGE "HAL: A pointer parameter to a method is NULL"
70
#define ANALOG_TRIGGER_LIMIT_ORDER_ERROR -1010
71
#define ANALOG_TRIGGER_LIMIT_ORDER_ERROR_MESSAGE \
72
"HAL: AnalogTrigger limits error. Lower limit > Upper Limit"
73
#define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR -1011
74
#define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR_MESSAGE \
75
"HAL: Attempted to read AnalogTrigger pulse output."
76
#define PARAMETER_OUT_OF_RANGE -1028
77
#define PARAMETER_OUT_OF_RANGE_MESSAGE "HAL: A parameter is out of range."
78
#define RESOURCE_IS_ALLOCATED -1029
79
#define RESOURCE_IS_ALLOCATED_MESSAGE "HAL: Resource already allocated"
80
#define RESOURCE_OUT_OF_RANGE -1030
81
#define RESOURCE_OUT_OF_RANGE_MESSAGE \
82
"HAL: The requested resource is out of range."
83
#define HAL_INVALID_ACCUMULATOR_CHANNEL -1035
84
#define HAL_INVALID_ACCUMULATOR_CHANNEL_MESSAGE \
85
"HAL: The requested input is not an accumulator channel"
86
#define HAL_COUNTER_NOT_SUPPORTED -1058
87
#define HAL_COUNTER_NOT_SUPPORTED_MESSAGE \
88
"HAL: Counter mode not supported for encoder method"
89
#define HAL_PWM_SCALE_ERROR -1072
90
#define HAL_PWM_SCALE_ERROR_MESSAGE \
91
"HAL: The PWM Scale Factors are out of range"
92
#define HAL_HANDLE_ERROR -1098
93
#define HAL_HANDLE_ERROR_MESSAGE \
94
"HAL: A handle parameter was passed incorrectly"
95
96
#define HAL_LED_CHANNEL_ERROR -1099
97
#define HAL_LED_CHANNEL_ERROR_MESSAGE \
98
"HAL: Addressable LEDs only supported on PWM Headers, not MXP or DIO"
99
100
#define HAL_INVALID_DMA_ADDITION -1102
101
#define HAL_INVALID_DMA_ADDITION_MESSAGE \
102
"HAL_AddDMA() only works before HAL_StartDMA()"
103
104
#define HAL_INVALID_DMA_STATE -1103
105
#define HAL_INVALID_DMA_STATE_MESSAGE \
106
"HAL_SetPause() only works before HAL_StartDMA()"
107
108
#define HAL_SERIAL_PORT_NOT_FOUND -1123
109
#define HAL_SERIAL_PORT_NOT_FOUND_MESSAGE \
110
"HAL: The specified serial port device was not found"
111
112
#define HAL_SERIAL_PORT_OPEN_ERROR -1124
113
#define HAL_SERIAL_PORT_OPEN_ERROR_MESSAGE \
114
"HAL: The serial port could not be opened"
115
116
#define HAL_SERIAL_PORT_ERROR -1125
117
#define HAL_SERIAL_PORT_ERROR_MESSAGE \
118
"HAL: There was an error on the serial port"
119
120
#define HAL_THREAD_PRIORITY_ERROR -1152
121
#define HAL_THREAD_PRIORITY_ERROR_MESSAGE \
122
"HAL: Getting or setting the priority of a thread has failed"
123
124
#define HAL_THREAD_PRIORITY_RANGE_ERROR -1153
125
#define HAL_THREAD_PRIORITY_RANGE_ERROR_MESSAGE \
126
"HAL: The priority requested to be set is invalid"
127
128
#define HAL_CAN_TIMEOUT -1154
129
#define HAL_CAN_TIMEOUT_MESSAGE "HAL: CAN Receive has Timed Out"
130
131
#define HAL_SIM_NOT_SUPPORTED -1155
132
#define HAL_SIM_NOT_SUPPORTED_MESSAGE "HAL: Method not supported in sim"
133
134
#define HAL_USE_LAST_ERROR -1156
135
#define HAL_USE_LAST_ERROR_MESSAGE \
136
"HAL: Use HAL_GetLastError(status) to get last error"
137
138
#define HAL_CONSOLE_OUT_ENABLED_ERROR -1157
139
#define HAL_CONSOLE_OUT_ENABLED_ERROR_MESSAGE \
140
"HAL: Onboard serial port is requested, but Console Out is enabled. "
\
141
"Disable Console Out using imaging tool"
142
143
#define HAL_CAN_BUFFER_OVERRUN -35007
144
#define HAL_CAN_BUFFER_OVERRUN_MESSAGE \
145
"HAL: CAN Output Buffer Full. Ensure a device is attached"
146
147
#define VI_ERROR_SYSTEM_ERROR_MESSAGE "HAL - VISA: System Error"
148
#define VI_ERROR_INV_OBJECT_MESSAGE "HAL - VISA: Invalid Object"
149
#define VI_ERROR_RSRC_LOCKED_MESSAGE "HAL - VISA: Resource Locked"
150
#define VI_ERROR_RSRC_NFOUND_MESSAGE "HAL - VISA: Resource Not Found"
151
#define VI_ERROR_INV_RSRC_NAME_MESSAGE "HAL - VISA: Invalid Resource Name"
152
#define VI_ERROR_QUEUE_OVERFLOW_MESSAGE "HAL - VISA: Queue Overflow"
153
#define VI_ERROR_IO_MESSAGE "HAL - VISA: General IO Error"
154
#define VI_ERROR_ASRL_PARITY_MESSAGE "HAL - VISA: Parity Error"
155
#define VI_ERROR_ASRL_FRAMING_MESSAGE "HAL - VISA: Framing Error"
156
#define VI_ERROR_ASRL_OVERRUN_MESSAGE "HAL - VISA: Buffer Overrun Error"
157
#define VI_ERROR_RSRC_BUSY_MESSAGE "HAL - VISA: Resource Busy"
158
#define VI_ERROR_INV_PARAMETER_MESSAGE "HAL - VISA: Invalid Parameter"
159
/** @} */
hal
Errors.h
Generated on Wed Mar 13 2024 05:20:40 for WPILibC++ by
1.9.4