/* ************************************************************** */ /* * TMAG.H * * Zachary Wolf * 11/16/00 */ #ifndef __TMAG_HEADER #define __TMAG_HEADER #if defined(__cplusplus) || defined(__cplusplus__) extern "C" { #endif /* ************************************************************** */ /* CONSTANTS */ #define TMAG_MAX_CMD 80 #define TMAG_MAX_NUM_PROBES 8 #define TMAG_MAX_NAME_LENGTH 40 /* ************************************************************* */ /* ENUM DEFINITIONS */ enum tmag_device_type_enum {TMAG_THERMISTOR_HP3457, TMAG_THERMISTOR_K7011_HP3457, TMAG_NONE}; enum tmag_binary_enum {TMAG_TRUE, TMAG_FALSE}; /* ************************************************************* */ /* STRUCTURE DEFINITIONS */ struct tmag_probe { int chan_num; /* Channel number for the temperature probe */ char name[TMAG_MAX_NAME_LENGTH]; /* Name describing the temperature probe or what it is measuring */ }; struct tmag_param_struct { int board_addr; /* GPIB board addr */ int hp3457_addr; /* HP3457 GPIB address */ int k7011_addr; /* K7011 GPIB address */ enum tmag_device_type_enum device_type; /* Type of temperature readout system being used */ int k7011_card_num; /* K7011 multiplexer card number */ int k7011_hp3457_chan; /* HP3457 channel the K7011 multiplexer is plugged in to */ enum tmag_binary_enum show_ui; /* Show user interface if true, don't show otherwise */ int num_tmag_probes; /* Number of temperature probes in the system */ struct tmag_probe probe[TMAG_MAX_NUM_PROBES + 1]; /* Information about each temperature probe */ }; /* ************************************************************** */ /* PUBLIC FUNCTION DECLARATIONS */ void tmag_init(char log_file_in[], struct tmag_param_struct tmag_param); void tmag_get_num_probes(int* num_probes); void tmag_get_probe_name(int probe_num, char probe_name[]); void tmag_get_probe_temp(int probe_num, double* probe_temp); void tmag_exit(void); /* ************************************************************** */ /* DONE */ #if defined(__cplusplus) || defined(__cplusplus__) } #endif #endif