diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:37:14 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:37:14 -0500 |
commit | 8f433cde879a40fc96f295bfa35e5869781adc5d (patch) | |
tree | e497e9118c5cca14806718aa2e74446d5a07d7bd | |
parent | 047fcb18ded8438d5763ad537c64a2c110052a11 (diff) |
gpib queries should work fully now
-rw-r--r-- | gpib.c | 5 | ||||
-rw-r--r-- | gpib.h | 4 | ||||
-rw-r--r-- | instr-daemon.c | 2 | ||||
-rw-r--r-- | parser.c | 6 |
4 files changed, 10 insertions, 7 deletions
@@ -771,8 +771,11 @@ static void TNT_Holdoff_off() } -int GPIB_send_query_response(char *in_string) +int GPIB_send_query_response(gpointer *ignore_this, char *in_string) { + g_assert (ignore_this == NULL); + g_assert (in_string != NULL); + if (!globals.HWDetect.gpib) { return OK; } @@ -1,5 +1,7 @@ /* define macros */ +#include <glib.h> + void GPIB_Set_Execution_Error(void); void GPIB_Set_Command_Error(void); void GPIB_Set_Query_Error(void); @@ -10,7 +12,7 @@ int GPIB_check_for_device_clear_signal(void); int GPIB_check_for_device_clear_signal(void); int GPIB_check_for_messages(char *gpib_buf); int GPIB_handle_new_input(char *gpib_buf); -int GPIB_send_query_response(char *out_buffer); +int GPIB_send_query_response(gpointer *ignore_this, char *in_string); void GPIB_check_remote_status (int *is_remote, int *is_lockout); unsigned char GPIB_response_already_pending (); void GPIB_go_to_local (); diff --git a/instr-daemon.c b/instr-daemon.c index 2534d73..4c56ceb 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -345,7 +345,7 @@ static gboolean periodic_poll (void) GPIB_check_for_device_clear_signal(); if (GPIB_check_for_messages(globals.Registers.gpib_buffer)) { if (GPIB_handle_new_input(globals.Registers.gpib_buffer)) { - Parser_main(globals.Registers.gpib_buffer, 1, GPIB_send_query_response, NULL); + Parser_main(globals.Registers.gpib_buffer, 0, GPIB_send_query_response, NULL); } } GPIB_check_for_device_clear_signal(); @@ -1064,10 +1064,8 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer if (interactive_terminal) { (*cbfunc)(user_data, error_response); } - } else { - if (interactive_terminal) { - (*cbfunc)(user_data, response); - } + } else if (response != NULL) { + (*cbfunc)(user_data, response); } g_free (units); |