summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-24 10:15:36 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-24 10:15:36 -0400
commitc116bc537041827e438cec9d49c5249c33f0377e (patch)
treeb60d09aa46abcdfe3fa63a293d1fb4398c9f54a9 /parser.c
parent3764cf19983e58a471ac0359509ca81b60526ce3 (diff)
fix attempt at full set of device functions
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/parser.c b/parser.c
index 9edd7e5..f2439ad 100644
--- a/parser.c
+++ b/parser.c
@@ -9,6 +9,7 @@ SUPPORT LIB'S:
END DESCRIPTION **********************************************************/
+#include "error_utils.h"
#include "parser.h"
#include "flash.h"
#include "nicutils.h"
@@ -1614,10 +1615,10 @@ static int Go_syst_err_11(gchar** response, int channel, char *parameter,char *u
{
switch (command_type) {
case query_simple:
- if (globals.number_of_errors==0) {
+ if (globals.Errors.number_of_errors==0) {
get_error_text(response, OK);
} else {
- get_error_text(response,globals.error_queue[1]);
+ get_error_text(response,globals.Errors.error_queue[1]);
Error_Remove_From_Queue();
}
return OK;
@@ -1633,7 +1634,7 @@ static int Go_syst_errcnt66(gchar** response, int channel, char *parameter,char
{
switch (command_type) {
case query_simple:
- return query_int (response, globals.number_of_errors);
+ return query_int (response, globals.Errors.number_of_errors);
break;
default:
@@ -2393,7 +2394,7 @@ static int Go_cls_1(gchar** response, int channel, char *parameter,char *units,i
switch (command_type) {
case command_simple:
GPIB_clear_events();
- globals.number_of_errors=0;
+ globals.Errors.number_of_errors=0;
return OK;
break;
@@ -2494,12 +2495,12 @@ static int Go_oper_enable15(gchar** response, int channel, char *parameter,char
if (status = process_int_range (parameter, &value, 0, 255)) {
return status;
}
- globals.oper_enable_register=value;
+ globals.Registers.oper_enable_register=value;
return OK;
break;
case query_simple:
- return query_int (response, globals.oper_enable_register);
+ return query_int (response, globals.Registers.oper_enable_register);
break;
default:
@@ -2518,12 +2519,12 @@ static int Go_ques_enable18(gchar** response, int channel, char *parameter,char
if (status = process_int_range (parameter, &value, 0, 255)) {
return status;
}
- globals.ques_enable_register=value;
+ globals.Registers.ques_enable_register=value;
return OK;
break;
case query_simple:
- return query_int (response, globals.ques_enable_register);
+ return query_int (response, globals.Registers.ques_enable_register);
break;
default:
@@ -2537,8 +2538,8 @@ static int Go_preset_19(gchar** response, int channel, char *parameter,char *uni
{
switch (command_type) {
case command_simple:
- globals.oper_enable_register=0;
- globals.ques_enable_register=0;
+ globals.Registers.oper_enable_register=0;
+ globals.Registers.ques_enable_register=0;
return OK;
break;
@@ -3694,9 +3695,9 @@ static int Go_eprom_sus_93(gchar** response, int channel, char *parameter,int co
switch (command_type) {
case command_withparam:
if (!strcmp(parameter,"1")) {
- globals.flash_writes_suspended=1;
+ globals.Flags.flash_writes_suspended=1;
} else if (!strcmp(parameter,"0")) {
- globals.flash_writes_suspended=0;
+ globals.Flags.flash_writes_suspended=0;
writeUserBlock(&globals.Flash,0,sizeof(globals.Flash));
} else {
return SyntaxError;
@@ -3707,7 +3708,7 @@ static int Go_eprom_sus_93(gchar** response, int channel, char *parameter,int co
break;
case query_simple:
- return query_int (response, globals.flash_writes_suspended);
+ return query_int (response, globals.Flags.flash_writes_suspended);
break;
default: