
Remote Control
Users Guide
6-20
#endif /* !_MFC_VER */
#endif
#include <stdio.h>
/*
* "\\.\com<num>" in order to support "COM10" and above.
*
* More info: MSKB article Q115831:
*
* http://support.microsoft.com/default.aspx?scid=kb;EN-US;q115831
*/
#define SIO_PORT "\\\\.\\com1"
#define SIO_BAUDRATE 115200
#define SIO_INPUT_BUFSIZE 4096
#define SIO_OUTPUT_BUFSIZE 4096
#define MAX(a,b) ( (a) > (b) ? (a) : (b) )
#if WIN
/* serial port handle ('CreateFile("COMx:",...)'): */
typedef HANDLE sio_handle_t;
#endif
typedef unsigned char byte;
typedef struct {
sio_handle_t handle;
/*
* I/O buffer (similar to 'FILE'):
*/
struct {
byte *base; /* address of allocated buffer */
byte *ptr; /* pointer to first available byte in buffer 'base' */
int size; /* size in bytes of allocated buffer 'base' */
int cnt; /* current number of bytes available in buffer at 'ptr'
*/
} buf;
} sio_t;
/****************************************************************************
**/
static void Delay(double seconds)
{
Sleep((DWORD)(seconds * 1000));
}
/****************************************************************************
**/
static void sio_error(char *func)
{
fprintf(stderr,"%s() failed, error %ld\n",func,GetLastError());
}
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 ...