Obr_read, Obr_clear – Casio IT-2000D User Manual

Page 175

Advertising
background image

175

Readout of Received Data

Acquires the first barcode in the reception buffer and writes it to the specified buffer. The reception

data SYNTAX is as follows:

Barcode

O

Fig. 7.20

SYNTAX

#include "obrlib.h"

int OBR_Read (unsigned char *pBuf);

INPUT

pBuf = Pointer to the buffer that stores the received barcode

OUTPUT

The absolute value shows the number of characters in the received barcode.

The sign indicates the validity of the barcode.

> 0 The read barcode has no data error.

= 0 Either the reception acknowledgment is not performed (OBR_Stat function is

not used) or there is no received data.

< 0 The read barcode has a data error.

Note :

Before reading a barcode using this function, acknowledge reception with the OBR_Stat function.

Note that received barcode data will be cleared from the reception buffer after it has been read by the

OBR_Read function. This means that the following barcode can be read immediately after the

preceding one, even if there is an error, has been read.

Invalidating Code in Buffer

Invalidates a barcode in the reception buffer.

SYNTAX

#include "obrlib.h"

void OBR_Clear();

INPUT

None

OUTPUT

None

Advertising