summaryrefslogtreecommitdiff
path: root/globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'globals.h')
-rw-r--r--globals.h99
1 files changed, 58 insertions, 41 deletions
diff --git a/globals.h b/globals.h
index 9e008dc..805e7aa 100644
--- a/globals.h
+++ b/globals.h
@@ -87,20 +87,11 @@
#define SelfCalError 73
#define NetworkNotFound 74
#define ThisShouldntHappen 75
+#define Startup_Not_Finished 76
#define YES 1
#define NO 0
-
-#define LOCS_ctrl 0
-#define LWLS_ctrl 1
-#define REMS_ctrl 2
-#define RWLS_ctrl 3
-#define RS232_ctrl 4
-#define TELNET_ctrl 5
-#define WEB_ctrl 6 // FIXME
-
-
#define max_commands_in_input 12
#define max_output_length 512
#define max_channels 2
@@ -195,9 +186,9 @@
#define ROUTE_PRIMARY 0
#define ROUTE_SECONDARY 1
-#define rs232_parity_none 0
-#define rs232_parity_odd 1
-#define rs232_parity_even 2
+#define rs232_parity_none 0 // no longer used
+#define rs232_parity_odd 1 // no longer used
+#define rs232_parity_even 2 // no longer used
#define smallest_allowed_number 1.0e-18
#define zero_equiv_timing 1e-10
@@ -252,8 +243,8 @@
#define Submenu2_load 1500
#define Submenu2_rs232 1600
#define Submenu2_rs232_baud 1700
-#define Submenu2_rs232_databits 1800
-#define Submenu2_rs232_parity 1900
+#define Submenu2_rs232_databits 1800 // no longer used
+#define Submenu2_rs232_parity 1900 // no longer used
#define Submenu2_rs232_stopbits 2000
#define Submenu2_rs232_hardhand 2100
#define Submenu2_rs232_echo 2200
@@ -284,7 +275,8 @@ typedef struct {
int ques_enable_register; /* for stat:enable command */
int avrq_reg;
int last_rise_time_relay_setting;
- char gpib_buffer[max_gpib_input_length];
+ char gpib_input_buffer[max_gpib_input_length];
+ gchar *pending_output_message;
} HWregStruct;
@@ -297,25 +289,10 @@ typedef struct {
typedef struct {
- int update_freq;
- int update_func;
- int update_delay;
- int update_pw;
int update_amp;
int update_os;
int update_zout;
int update_load;
- int update_output;
- int update_inv;
- int update_gate;
- int update_logic_level;
- int update_routes;
- int update_burst_count;
- int update_burst_time;
- int update_rise_time;
- int update_soft_current_limit;
- int update_slew;
- int update_whole_main_menu;
} ChangeStruct;
@@ -328,7 +305,7 @@ typedef struct {
float avg_change;
int total_errors;
float total_max_change;
- char response[max_output_length];
+ GString *response;
} CalStruct;
@@ -397,8 +374,8 @@ typedef struct {
short spare2; /* 59 */
char ChanKey_route; /* 61 */
char on_off_used; /* 62 */
- char password[32]; /* 63 */
- char username[32]; /* 95 */
+ char password[32]; /* 63 - no longer used */
+ char username[32]; /* 95 - no longer used */
char pcb116c_mon; /* 127 */
@@ -407,11 +384,11 @@ typedef struct {
char warn_even_if_output_off; /* 129 */
int baud; /* 130 */
- char parity;
- char stopbits;
- char databits;
+ char parity; // no longer used
+ char stopbits; // no longer used
+ char databits; // no longer used
char hardhand;
- char echo;
+ char echo; // no longer used
char spare1[23]; /* 139 */
@@ -716,6 +693,11 @@ typedef struct {
char use_high_ampl_ranges_for_high_pw_ranges[max_channels]; /* addr 10066 - for AVMP-4 */
+ char couple_first_N_pw_ranges_to_ampl_ranges[max_channels]; // addr 10068
+ // for example, if N = 2 (as for AVR-E3-B-R5-N-M5)
+ // PG A = pw range 0, ampl range 0
+ // PG B = pw range 1, ampl range 1
+ // PG C = pw range 2+, ampl range 2
char spare_end;
char flash_end;
@@ -766,16 +748,23 @@ typedef struct {
// note flags with non-zero default/reset values in globals.c
// for example, do_check_settings=1 by default
+// These flags are reset by Main_Rst
typedef struct {
int extended_ampl_min_max;
int do_check_settings;
int flash_writes_suspended;
int force_output_fully_off;
- int shutdown_started;
- int flash_write_in_progress;
} FlagStruct;
+// These flags are NOT reset by Main_Rst, and default to 0
+typedef struct {
+ int shutdown_started;
+ int flash_write_in_progress;
+ int startup_complete;
+} SysFlagStruct;
+
+
typedef struct {
long startup_timer_value;
long last_activity_at[max_channels];
@@ -784,6 +773,31 @@ typedef struct {
} TimeStruct;
+// maximum number of ssh/getty sessions.
+// same as max number of vxi sessions
+#define MAX_SESSIONS 8
+
+typedef struct {
+ int terminal_connections;
+ int vxi_connections;
+ int vxi_service_request;
+ int gpib_remote;
+ int gpib_lock;
+} RemoteStruct;
+
+
+typedef struct {
+ int beaglebone;
+ int gpib;
+} HWDetectStruct;
+
+
+#define NO_SERVER_LOCKED -1
+typedef struct {
+ int command_in_progress;
+ int locked_network_server;
+} LockStruct;
+
typedef struct {
ConstraintsStruct Constraints;
ChannelStruct ChannelState[max_channels];
@@ -793,9 +807,12 @@ typedef struct {
ErrorStruct Errors;
FlagStruct Flags;
FlagStruct DefaultFlags;
+ SysFlagStruct Sys;
TimeStruct Timers;
MenuStatusStruct MenuStatus;
- int control_mode; // FIXME and all instances of control_mode
+ RemoteStruct Remote;
+ HWDetectStruct HWDetect;
+ LockStruct VxiLocks;
} GlobalStruct;