WPILibC++  2018.4.1-20180823210227-1173-gde212a9
 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 SAMPLE_RATE_TOO_HIGH 1001
43 #define SAMPLE_RATE_TOO_HIGH_MESSAGE \
44  "HAL: Analog module sample rate is too high"
45 #define VOLTAGE_OUT_OF_RANGE 1002
46 #define VOLTAGE_OUT_OF_RANGE_MESSAGE \
47  "HAL: Voltage to convert to raw value is out of range [0; 5]"
48 #define LOOP_TIMING_ERROR 1004
49 #define LOOP_TIMING_ERROR_MESSAGE \
50  "HAL: Digital module loop timing is not the expected value"
51 #define SPI_WRITE_NO_MOSI 1012
52 #define SPI_WRITE_NO_MOSI_MESSAGE \
53  "HAL: Cannot write to SPI port with no MOSI output"
54 #define SPI_READ_NO_MISO 1013
55 #define SPI_READ_NO_MISO_MESSAGE \
56  "HAL: Cannot read from SPI port with no MISO input"
57 #define SPI_READ_NO_DATA 1014
58 #define SPI_READ_NO_DATA_MESSAGE "HAL: No data available to read from SPI"
59 #define INCOMPATIBLE_STATE 1015
60 #define INCOMPATIBLE_STATE_MESSAGE \
61  "HAL: Incompatible State: The operation cannot be completed"
62 #define NO_AVAILABLE_RESOURCES -1004
63 #define NO_AVAILABLE_RESOURCES_MESSAGE "HAL: No available resources to allocate"
64 #define NULL_PARAMETER -1005
65 #define NULL_PARAMETER_MESSAGE "HAL: A pointer parameter to a method is NULL"
66 #define ANALOG_TRIGGER_LIMIT_ORDER_ERROR -1010
67 #define ANALOG_TRIGGER_LIMIT_ORDER_ERROR_MESSAGE \
68  "HAL: AnalogTrigger limits error. Lower limit > Upper Limit"
69 #define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR -1011
70 #define ANALOG_TRIGGER_PULSE_OUTPUT_ERROR_MESSAGE \
71  "HAL: Attempted to read AnalogTrigger pulse output."
72 #define PARAMETER_OUT_OF_RANGE -1028
73 #define PARAMETER_OUT_OF_RANGE_MESSAGE "HAL: A parameter is out of range."
74 #define RESOURCE_IS_ALLOCATED -1029
75 #define RESOURCE_IS_ALLOCATED_MESSAGE "HAL: Resource already allocated"
76 #define RESOURCE_OUT_OF_RANGE -1030
77 #define RESOURCE_OUT_OF_RANGE_MESSAGE \
78  "HAL: The requested resource is out of range."
79 #define HAL_INVALID_ACCUMULATOR_CHANNEL -1035
80 #define HAL_INVALID_ACCUMULATOR_CHANNEL_MESSAGE \
81  "HAL: The requested input is not an accumulator channel"
82 #define HAL_COUNTER_NOT_SUPPORTED -1058
83 #define HAL_COUNTER_NOT_SUPPORTED_MESSAGE \
84  "HAL: Counter mode not supported for encoder method"
85 #define HAL_PWM_SCALE_ERROR -1072
86 #define HAL_PWM_SCALE_ERROR_MESSAGE \
87  "HAL: The PWM Scale Factors are out of range"
88 #define HAL_HANDLE_ERROR -1098
89 #define HAL_HANDLE_ERROR_MESSAGE \
90  "HAL: A handle parameter was passed incorrectly"
91 
92 #define HAL_SERIAL_PORT_NOT_FOUND -1123
93 #define HAL_SERIAL_PORT_NOT_FOUND_MESSAGE \
94  "HAL: The specified serial port device was not found"
95 
96 #define HAL_SERIAL_PORT_OPEN_ERROR -1124
97 #define HAL_SERIAL_PORT_OPEN_ERROR_MESSAGE \
98  "HAL: The serial port could not be opened"
99 
100 #define HAL_SERIAL_PORT_ERROR -1125
101 #define HAL_SERIAL_PORT_ERROR_MESSAGE \
102  "HAL: There was an error on the serial port"
103 
104 #define HAL_THREAD_PRIORITY_ERROR -1152
105 #define HAL_THREAD_PRIORITY_ERROR_MESSAGE \
106  "HAL: Getting or setting the priority of a thread has failed";
107 
108 #define HAL_THREAD_PRIORITY_RANGE_ERROR -1153
109 #define HAL_THREAD_PRIORITY_RANGE_ERROR_MESSAGE \
110  "HAL: The priority requested to be set is invalid"
111 
112 #define HAL_CAN_TIMEOUT -1154
113 #define HAL_CAN_TIMEOUT_MESSAGE "HAL: CAN Receive has Timed Out"
114 
115 #define VI_ERROR_SYSTEM_ERROR_MESSAGE "HAL - VISA: System Error";
116 #define VI_ERROR_INV_OBJECT_MESSAGE "HAL - VISA: Invalid Object"
117 #define VI_ERROR_RSRC_LOCKED_MESSAGE "HAL - VISA: Resource Locked"
118 #define VI_ERROR_RSRC_NFOUND_MESSAGE "HAL - VISA: Resource Not Found"
119 #define VI_ERROR_INV_RSRC_NAME_MESSAGE "HAL - VISA: Invalid Resource Name"
120 #define VI_ERROR_QUEUE_OVERFLOW_MESSAGE "HAL - VISA: Queue Overflow"
121 #define VI_ERROR_IO_MESSAGE "HAL - VISA: General IO Error"
122 #define VI_ERROR_ASRL_PARITY_MESSAGE "HAL - VISA: Parity Error"
123 #define VI_ERROR_ASRL_FRAMING_MESSAGE "HAL - VISA: Framing Error"
124 #define VI_ERROR_ASRL_OVERRUN_MESSAGE "HAL - VISA: Buffer Overrun Error"
125 #define VI_ERROR_RSRC_BUSY_MESSAGE "HAL - VISA: Resource Busy"
126 #define VI_ERROR_INV_PARAMETER_MESSAGE "HAL - VISA: Invalid Parameter"
127