194
W&T
Expanded services of the Com-Server
The structure COM_ERROR
The
COM_ERROR
structure has a length of one WORD (16-bit
integer) and contains all the error states of the serial port.
typedef struct _com_error
{ union
{ word error_flags;
struct _err_flags
{ word f_data
: 1; //not used/reserved
word f_net
: 2; //not used/reserved
word f_com
: 1; //Set when COM port error detected
word f_break
: 1; //Reflect the break flag
word f_cts_time
: 1; //Time out while waiting on CTS
word f_dsr_time
: 1; //Time out while waiting on DSR
word f_rlsd_time
: 1; //Time out while waiting on RLSD (CD)
word f_overrun
: 1; //Overrun error
word f_parity
: 1; //Parity error
word f_frame
: 1; //Framing error
word f_status
: 1; //not used/reserved
word no_use_1
: 1; //not used
word no_use_2
: 1; //not used
word f_rx_over
: 1; //Ring buffer overrun after handshake
word no_use_3
: 1; //not used
};
};
} COM_ERROR;
The structure COM_STAT
The
COM_STAT
structure has a length of three WORDS (16-bit
integer) and contains the status of the handshake lines as well
as the number of bytes which are in the send and receive buf-
fers of the serial port. It also allows you to directly influence
the handshake lines and buffer.
typedef struct _com_stat
{ union
{ word com_flags;
struct _com_flags
{
word
cts_hold
:1;
//CTS
line
-LowByte
word
dsr_hold
:1;
//DSR
line
|
word ri_hold
:1; //not used/reserved |is set with every
word rlsd_hold
:1; //reserved/reserved |received packet
word
dtr_hold
:1;
//DTR
line
|
word
rts_hold
:1;
//RTS
line
|
word
x_receive :1;
//XOFF
received
|
word x_send
:1; //XOFF was send
-
Summary of Contents for Com-Server++
Page 8: ...W T...
Page 26: ...26 W T Assigning the IP address...
Page 27: ...27 W T Subject to error and alteration 3 Supply voltage Com Server Com Server3x Isolated...
Page 30: ...30 W T Supply voltage...
Page 34: ...34 W T Network interface...
Page 41: ...41 W T Subject to error and alteration 6 LED displays Power Status Error LED Network LEDs...
Page 88: ...88 W T Packetizing serial datagrams...
Page 94: ...94 W T Mode TCP server...
Page 108: ...108 W T Mode TCP client...
Page 122: ...122 W T UDP bus mode...
Page 130: ...130 W T The Windows COM port redirector...
Page 138: ...138 W T Box to Box mode...
Page 154: ...154 W T Mode FTP client...
Page 164: ...164 W T Mode Telnet Client...
Page 182: ...182 W T OPC data transfer...
Page 186: ...186 W T Mode InQueueCopy...