summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:49:54 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:49:54 -0500
commit6f54d6f2efeb88630e69cd673f5be55e16735f22 (patch)
tree5a4757adfb20e2fe9b7fe66bb3b9135389cb4774 /parser.c
parent26fbe0556b9260c29ac1aa082d7ce3baacadb665 (diff)
removed parity and databit settings, because they are now automatic
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c95
1 files changed, 9 insertions, 86 deletions
diff --git a/parser.c b/parser.c
index 54bae16..046ff22 100644
--- a/parser.c
+++ b/parser.c
@@ -144,9 +144,9 @@ static int Parser_id_word(char *id_me, int *channel, int *with_id_code)
}
- if (!strcmp(id_me,"") ) {
- id_code = 0;
- } else if (!strcmp(id_me,"*cls") ) {
+ if (!strcmp(id_me,"") ) {
+ id_code = 0;
+ } else if (!strcmp(id_me,"*cls") ) {
id_code = 1;
} else if (!strcmp(id_me,"*ese") ) {
id_code = 2;
@@ -443,8 +443,8 @@ static int Parser_find_commands(int commands[], int command_depth)
{23,67,45}, /* diag:test:delay - 58 */
{13,68,70,69}, /* syst:comm:gpib:addr - 59 */
{13,68,71,72|optional,73}, /* syst:comm:ser:rec:baud - 60 */
- {13,68,71,72|optional,74,75|optional}, /* syst:comm:ser:rec:parity - 61 */
- {13,68,71,72|optional,76}, /* syst:comm:ser:rec:bits - 62 */
+ {13,68,71,72|optional,74,75|optional}, /* syst:comm:ser:rec:parity - 61 - not used */
+ {13,68,71,72|optional,76}, /* syst:comm:ser:rec:bits - 62 - not used */
{13,68,71,72|optional,77}, /* syst:comm:ser:rec:sbits - 63 */
{13,68,71,80,79}, /* syst:comm:ser:control:rts - 64 */
{13,68,71,72|optional,78}, /* syst:comm:ser:rec:echo - 65 */
@@ -945,12 +945,6 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer
case 60:
error_num=Go_ser_baud_60(&response,channel,parameter,units,command_type);
break;
- case 61:
- error_num=Go_ser_par_61(&response,channel,parameter,units,command_type);
- break;
- case 62:
- error_num=Go_ser_bits_62(&response,channel,parameter,units,command_type);
- break;
case 63:
error_num=Go_ser_sbits_63(&response,channel,parameter,units,command_type);
break;
@@ -2748,7 +2742,7 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u
if (status = process_int_param (parameter, &new_baud, 4, valid_choices, NO_ON_OFF)) {
return status;
}
- return IO_Setup_RS232(new_baud, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
+ return IO_Setup_RS232(new_baud, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
break;
case query_simple:
@@ -2769,77 +2763,6 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u
}
-static int Go_ser_par_61(gchar** response, int channel, char *parameter,char *units,int command_type)
-{
-
- int new_parity;
-
- switch (command_type) {
- case command_withparam:
- if (!strcmp(parameter,"even")) {
- new_parity = rs232_parity_even;
- } else if (!strcmp(parameter,"odd")) {
- new_parity = rs232_parity_odd;
- } else if (!strcmp(parameter,"none")) {
- new_parity = rs232_parity_none;
- } else {
- return IllegalParameter;
- }
-
- return IO_Setup_RS232(globals.Flash.baud, (char) new_parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
- break;
-
- case query_simple:
- if (globals.Flash.parity==rs232_parity_even) {
- return query_string(response, "EVEN");
- } else if (globals.Flash.parity==rs232_parity_odd) {
- return query_string(response, "ODD");
- } else if (globals.Flash.parity==rs232_parity_none) {
- return query_string(response, "NONE");
- }
- return OK;
- break;
-
- default:
- return SyntaxError;
- break;
- }
-
- return ThisShouldntHappen;
-}
-
-
-static int Go_ser_bits_62(gchar** response, int channel, char *parameter,char *units,int command_type)
-{
- int new_databits;
- int status;
-
- switch (command_type) {
- case command_withparam:
- if (status=process_two_ints (parameter, &new_databits, 7, 8)) {
- return status;
- }
-
- return IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, globals.Flash.stopbits, (char) new_databits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
- break;
-
- case query_simple:
- return query_int (response, globals.Flash.databits);
- break;
-
- case query_param:
- return query_min_max_int (response, parameter, 7, 8);
- break;
-
- default:
- return SyntaxError;
- break;
- }
-
- return ThisShouldntHappen;
-}
-
-
static int Go_ser_sbits_63(gchar** response, int channel, char *parameter,char *units,int command_type)
{
int new_stopbits;
@@ -2851,7 +2774,7 @@ static int Go_ser_sbits_63(gchar** response, int channel, char *parameter,char *
return status;
}
- return IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, (char) new_stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
+ return IO_Setup_RS232(globals.Flash.baud, (char) new_stopbits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
break;
case query_simple:
@@ -2889,7 +2812,7 @@ static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *un
return IllegalParameter;
}
- return IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, new_hardhand, globals.Flash.echo, TRUE);
+ return IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, new_hardhand, globals.Flash.echo, TRUE);
break;
case query_simple:
@@ -2922,7 +2845,7 @@ static int Go_ser_echo_65(gchar** response, int channel, char *parameter,char *u
if (status=process_on_off (parameter, &new_echo)) {
return status;
}
- return IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, (char) new_echo, TRUE);
+ return IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, globals.Flash.hardhand, (char) new_echo, TRUE);
break;
case query_simple: