From 8ca8f7fbf06ac9ce5f2817e31d6bae330f243aa1 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Thu, 23 Aug 2012 14:49:16 -0400 Subject: added full error checker --- error_utils.h | 80 ++--------------------------------------------------------- 1 file changed, 2 insertions(+), 78 deletions(-) (limited to 'error_utils.h') diff --git a/error_utils.h b/error_utils.h index ac9a8c9..3153c0a 100644 --- a/error_utils.h +++ b/error_utils.h @@ -1,89 +1,13 @@ #ifndef ERROR_UTILS_H_ #define ERROR_UTILS_H_ +#include "globals.h" #include -/* 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); +int Error_check(ChannelStruct ChannelStateToTest[max_channels]); #endif -- cgit