
Remote Control
Users Guide
6-22
/*
* Hand-shake:
*/
dcb.fRtsControl = RTS_CONTROL_ENABLE;
dcb.fOutxCtsFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_ENABLE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDsrSensitivity = FALSE;
dcb.fOutX = FALSE;
dcb.fInX = FALSE;
dcb.fTXContinueOnXoff = FALSE;
dcb.fAbortOnError = TRUE;
if ( !SetCommState(handle,&dcb) )
{
sio_error("SetCommState");
return -1;
}
/*
* Read timeout: MAXDWORD, 0, 0
* - read operation is to return immediately with the characters
* that have already been received, even if no characters have
* been received (i.e. read operation does not block)
*/
timeouts.ReadIntervalTimeout = MAXDWORD;
timeouts.ReadTotalTimeoutMultiplier = 0;
timeouts.ReadTotalTimeoutConstant = 0;
/*
* Write timeout: 0, n
* - write operation will not block
*/
timeouts.WriteTotalTimeoutMultiplier = 0;
timeouts.WriteTotalTimeoutConstant = 0;
if ( !SetCommTimeouts(handle,&timeouts) )
{
sio_error("SetCommTimeouts");
return -1;
}
/*
* Set up I/O buffers:
*/
if ( !SetupComm(handle,SIO_INPUT_BUFSIZE,SIO_OUTPUT_BUFSIZE) )
{
sio_error("SetupComm");
return -1;
}
sio->buf.size = MAX(SIO_INPUT_BUFSIZE,SIO_OUTPUT_BUFSIZE);
sio->buf.base = malloc(sio->buf.size);
if ( !sio->buf.base)
return -1;
sio->buf.ptr = sio->buf.base;
sio->buf.cnt = 0;
Summary of Contents for NORMA 4000 Operators
Page 6: ...Remote Control Users Guide iv ...
Page 8: ...Remote Control Users Guide vi ...
Page 10: ...Remote Control Users Guide viii ...
Page 26: ...Remote Control Users Guide 2 2 ...
Page 38: ...Remote Control Users Guide 3 2 ...
Page 50: ...Remote Control Users Guide 4 2 ...
Page 150: ...Remote Control Users Guide 4 102 ...
Page 152: ...Remote Control Users Guide 5 2 ...
Page 160: ...Remote Control Users Guide 6 2 ...
Page 184: ...Remote Control Users Guide 6 26 ...