Tektronix WFM 601E Wheelchair User Manual


 
WFM 601A, WFM 601E & WFM 601M User Manual
C–55
Remote Command Processing Code
The following code ensures that the waveform monitor does not drop any
characters during remote command operations. This procedure expects a
character string to send and places to put two types of responses: expected and
unexpected.
/*
* wfmto601.c
*
* This module contains the processing functions required for a DOS or
* Windows based PC to communicate effectively with the WFM601x family of
* instruments. This code provides an example of the message buffering
* required due to the lack of a hardware UART.
*
*
* This module uses a DOS communications code library included as a part
* of the book "C Asynch Manager" copyright 1991 Blaise Computing Inc,
* 819 Bancroft Way, Berkeley, CA 94701. The library is freely
* redistributable as part of the product when you purchase the book.
* Aside from purchasing its products, Tektronix has no business
* relationship with Blaise, and under no circumstances warrants this
* software for use to any particular purpose. Use this code at your own risk.
*/
#include "asynch_1.h"
#include <ctype.h>
/*
* ASYNC library constants
*/
#define IO_BUFSIZ 2300
#define OKAY 0x600b
/* Number of connection attempts to make to the instrument */
#define NUMBER_OF_RETRIES 2
/*
* Blaise Computing error code definitions (not a complete list):
*
* #define A_OK 0 // Operation successful
* #define INV_PORT 1 // Invalid or uninitialized port
* #define NO_PORT_FOUND 6 // Port not found at address
* #define OUT_Q_FULL 7 // Output queue is filled
* #define IN_Q_EMPTY 10 // Input queue is empty
* #define TIMEOUT 12 // Timeout waiting for event
* #define CANCEL 13 // Wait event cancelled by user
*/