Download PCI High Speed Interface User`s Manual
Transcript
1.8.4 Send serial data to the AR-4000 sensor Send a string of characters to the AR-4000 sensor. BOOL sendstr( COMMINFO *pCommInfo, char str[]) pCommInfo str Returns: TRUE FALSE pointer to a COMMINFO struct where relevant com port information is stored. null-terminated string of characters to transmit to the AR4000 sensor String was transmitted successfully String transmit failed. 1.8.5 Read a line of characters from the AR-4000 sensor Read a line of characters from the AR-4000 sensor when in ASCII output mode. unsigned int ascii_read_line( COMMINFO *pCommInfo, char *buf, unsigned int nMaxLength, BOOL crlf, int timeout) pointer to a COMMINFO struct where relevant com port information is stored. buf storage space for characters read from the AR-4000 sensor nMaxLength maximum number of characters that can be put in the buf storage space crlf TRUE - read a carriage return/line-feed pair as the end of line indicator. FALSE – read a line-feed as the end of line indicator. This should be set to TRUE for AR-4000 sensor. timeout Number of milliseconds to wait before returning from the call if no data is detected. pCommInfo Returns: number of bytes read ASCII_TIMEOUT User’s Manual AR4000 PCI HSIF If read was successful. If read times out. 34