External Interfaces Previous page   Next Page
BytesAvailable

Indicate the number of bytes available in the input buffer

Description

BytesAvailable indicates the number of bytes currently available to be read from the input buffer. The property value is continuously updated as the input buffer is filled, and is set to 0 after the fopen function is issued.

You can make use of BytesAvailable only when reading data asynchronously. This is because when reading data synchronously, control is returned to the MATLAB command line only after the input buffer is empty. Therefore, the BytesAvailable value is always 0. Refer to Reading Text Data to learn how to read data asynchronously.

The BytesAvailable value can range from zero to the size of the input buffer. Use the InputBufferSize property to specify the size of the input buffer. Use the ValuesReceived property to return the total number of values read.

Characteristics

Read only
Always
Data type
Double

Values

The default value is 0.

See Also

Functions

fopen

Properties

InputBufferSize, TransferStatus, ValuesReceived


Previous page  ByteOrder BytesAvailableFcn Next page

© 1994-2005 The MathWorks, Inc.