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