diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-23 14:49:16 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-23 14:49:16 -0400 |
commit | 8ca8f7fbf06ac9ce5f2817e31d6bae330f243aa1 (patch) | |
tree | c4c5f0f70234d8dc3a6e3fc4995af0053e144035 /globals.h | |
parent | 913fc3cf402788ec671102f76ad27dc9436be6f6 (diff) |
added full error checker
Diffstat (limited to 'globals.h')
-rw-r--r-- | globals.h | 85 |
1 files changed, 84 insertions, 1 deletions
@@ -4,7 +4,6 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include "error_utils.h" #define DEBUG_ON - uncomment this to have debug messages @@ -14,6 +13,85 @@ #define g_print_debug(...) {} #endif + +/* 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 + + +#define LCD_cols 32 +#define YES 1 +#define NO 0 + + #define error_queue_length 512 #define max_commands_in_input 12 #define max_output_length 512 @@ -126,6 +204,10 @@ #define rs232_echo_off 0x00 #define rs232_echo_on 0x20 + +#define smallest_allowed_number 1.0e-18 + + long sec_timer (void); typedef struct { @@ -596,6 +678,7 @@ typedef struct { int ques_enable_register; /* for stat:enable command */ int flash_writes_suspended; long startup_timer_value; + long last_activity_at[max_channels]; } GlobalStruct; |