From 4985de53421e6e9e9fa6f11f42918de76f141f54 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Fri, 7 Dec 2012 15:13:02 -0500 Subject: flag VXI service requests, rename STB function --- globals.h | 1 + gpib.c | 4 +++- gpib.h | 2 +- parser.c | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/globals.h b/globals.h index 856f4fa..afca843 100644 --- a/globals.h +++ b/globals.h @@ -771,6 +771,7 @@ typedef struct { typedef struct { int terminal_connections; int vxi_connections; + int vxi_service_request; int mode; } RemoteStruct; diff --git a/gpib.c b/gpib.c index 6471373..b3f07db 100644 --- a/gpib.c +++ b/gpib.c @@ -295,8 +295,10 @@ void TNT_4882_Status(int status_register,unsigned int byte,int operation) set_srq = (MR_4882_status[STB]&MR_4882_status[SRE])? TRUE : FALSE; if(set_srq) { // If SRQ desired + globals.Remote.vxi_service_request = 1; TNT_Out(R_auxmr,F_reqt); // Set request true } else { + globals.Remote.vxi_service_request = 0; TNT_Out(R_auxmr,F_reqf); // Set request false } @@ -977,7 +979,7 @@ unsigned int GPIB_get_ESE () } -unsigned int GPIB_get_STB () +unsigned int GPIB_and_VXI_get_STB () { if (!globals.HWDetect.gpib) { return 0; diff --git a/gpib.h b/gpib.h index 65b263b..b3ba05d 100644 --- a/gpib.h +++ b/gpib.h @@ -20,7 +20,7 @@ void GPIB_clear_events (); unsigned int GPIB_get_ESR (); unsigned int GPIB_get_SRE (); unsigned int GPIB_get_ESE (); -unsigned int GPIB_get_STB (); +unsigned int GPIB_and_VXI_get_STB (); void GPIB_set_ESR (unsigned int byte,int operation); void GPIB_set_SRE (unsigned int byte,int operation); void GPIB_set_ESE (unsigned int byte,int operation); diff --git a/parser.c b/parser.c index 791561d..65729a4 100644 --- a/parser.c +++ b/parser.c @@ -2489,7 +2489,7 @@ static int Go_stb_8(gchar** response, int channel, char *parameter,char *units,i { switch (command_type) { case query_simple: - return query_int (response, GPIB_get_STB()); + return query_int (response, GPIB_and_VXI_get_STB()); break; default: -- cgit