summaryrefslogtreecommitdiff
path: root/error_utils.h
blob: ac9a8c999c9afdb7c45a8c79fe14b12867d78df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef ERROR_UTILS_H_
#define ERROR_UTILS_H_

#include <glib.h>

/* error codes */
#define OK 0
#define Unrecognized 1
#define SyntaxError 2
#define OutOfRange 3
#define UnknownUnits 4
#define Overload_Detected 5
#define duty_cycle_upper_limit 6
#define AB_Mode_Error 7
#define Valid_For_RS232_TELNET_Only 8
#define PW_Exceeds_Period 9
#define Delay_Exceeds_95Period 10
#define Double_Separation_Too_Large 11
#define freq_lower_limit 12
#define freq_upper_limit 13
#define pw_lower_limit 14
#define pw_upper_limit 15
#define delay_upper_limit 16
#define delay_lower_limit 17
#define amplitude_lower_limit 18
#define amplitude_upper_limit 19
#define offset_lower_limit 20
#define offset_upper_limit 21
#define ampl_plus_os_lower_limit 22
#define ampl_plus_os_upper_limit 23
#define DutyTriggerError 24
#define PW_Exceeds_Double_Separation 25
#define queue_overflow 26
#define query_error_interrupted 27
#define IllegalParameter 28
#define Negative_Not_Allowed 29
#define query_error_unterminated 30
#define Overtemp_Detected 31
#define Overvolt_Detected 32
#define Device_Specific_Aux_Error_Detected 33
#define InvalidChannel 34
#define AsyncModeDisabled 36
#define CalibrationPercentError 37
#define NeedNonZeroAmpl 38
#define amplitude_confined_values 40
#define HardwareError 41
#define CalibrationZeroError 42
#define CalibrationMinMaxError 43
#define CalibrationClosenessError 44
#define CalibrationTimingProblem 45
#define CalibrationRangeError 46
#define CalibrationPolarityError 47
#define Coupled_OS_Ampl_Error 48
#define PW_Distort_Error 49
#define burst_duty_error 50
#define min_burst_period_error 51
#define min_burst_gap_error 52
#define max_burst_gap_error 53
#define max_burst_count_error 54
#define Burst_Exceeds_Period 55
#define password_change_error 56
#define min_rise_time_error 57
#define max_rise_time_error 58
#define min_soft_current_limit_error 59
#define max_soft_current_limit_error 60
#define Average_Amplitude_Too_High 61
#define Route_Range_Error 64
#define Soft_Limit_Exceeded 65
#define min_slew_error 67
#define max_slew_error 68
#define min_load_type_error 69
#define max_load_type_error 70
#define peak_power_limit 71
#define average_power_limit 72
#define SelfCalError 73
#define NetworkNotFound 74

// BEGIN CUSTOM DEFINES
#define LCD_cols 32
#define YES	1
#define NO	0
// END CUSTOM DEFINES

void get_error_text(gchar** response, int error_num);
void queue_error_from_parser(gchar** response, int error_num);
void queue_error_and_get_text(gchar** response, int error_num);
void Error_Remove_From_Queue(void);

#endif