Erweiterte Dienste des Com-Servers
Die Struktur BOX_CNTRL:
In der Struktur BOX_CNTRL (20 Bytes) wird die Konfiguration der Schnittstelle gespeichert
(Baudrate, Datenbits, Parity, Stopbits, Handshakeverhalten, Timingwerte etc.). Hier kann Ein-
fluß auf die Parameter und deren Speicherung genommen werden.
typedef struct _box_cntrl
{
char baud;
char bits;
word
RLS_time_out;
word
CTS_time_out;
word
DSR_time_out;
char XONChar;
char
XOFFChar;
word
hs_on_limit;
word
hs_off_limit;
char PEChar;
struct
{
unsigned char save_command
unsigned char clear_error
unsigned char set_fact_def
unsigned char free_cmd
};
union
{
word hs_flags;
struct_hs_flags
{
};
};
//Baud rate for channel
// 0 = 57600
// 1 = 38400
// 2 = 19200
//20 = 14400
// 3 = 9600
//000x.xxxx
//
//
//
//
//
//
//Timer before f_rlsd_time will be set
//Timer before f_cts_time will be set
//Timer before f_dsr_time will be set
//Char excepted as XON
//Char excepted as XOFF
//if number of free bytes in ring buffer
// > hs_on_limit then clearing handshake stop
//if number of free bytes in ring buffer
// < hs_off_limit then setting handshake stop
//Replace this char if serial parity error (function
//first must enabled by setting f_flags.f_pechar= 1)
_commands
word f_cts_connect
word f_dsr_connect
word f_cts_accept
word f_dsr_accept
word no_use0
5 = 4800
6 = 2400
7 = 1200
8 = 600
9 = 300
data bits, stop bits, parity
10 = 7 data bits
11 = 8 data bits
0 = 1
1 = 1½, 2 stop bits
1 = parity enable
0 = odd, 1 = even parity
:4; //Save COM-Configuation
//0 = no save
//1 = save without EEPROM Update
//2 = save with EEPROM Update
:1; //1 = clear error in display/lamps
:1; //1 = set factory defaults and reset
:2; //not used
:1; //Connect/Disconnect with CTS (HIGH/LOW)
:1; //Connect/Disconnect with DSR (HIGH/LOW)
:1; //Accept Connection only by CTS=HIGH
:1; //Accept Connection only by DSR=HIGH
:12;// not used
W&T
w w w . w u t . d e
68