next up previous
Next: Channel Write Functions Up: Host (PC) RTDX API Previous: Channel Open/Close Functions

Channel Read Functions



Read array of 8-bit integers (bytes)


long ReadSAI1( VARIANT * pArr )

The ReadSAI1 functions read a message from a channel. The entire message is placed into a single dimensional SAFEARRAYof 8-bit integers (bytes), and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
   
Returns:

Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.


Read array of 16-bit integers


long ReadSAI2( VARIANT * pArr )

The ReadSAI2 functions read a message from a channel. The entire message is placed into a single dimensional SAFEARRAYof 16-bit integers, and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
   
Returns:

Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.


Read array of 32-bit integers


long ReadSAI4( VARIANT * pArr )

The ReadSAI4 functions read a message from a channel. The entire message is placed into a single dimensional SAFEARRAYof 32-bit integers, and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
   
Returns:

Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.


Read array of 32-bit floats


long ReadSAF4( VARIANT * pArr )

The ReadSAF4 functions read a message from a channel. The entire message is placed into a single dimensional SAFEARRAYof 32-bit floats, and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
   
Returns:

Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.


Read array of 64-bit floats


long ReadSAF8( VARIANT * pArr )

The ReadSAF8 functions read a message from a channel. The entire message is placed into a single dimensional SAFEARRAYof 64-bit floats, and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
   
Returns:

Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.


Read array of 16-bit data


VARIANT ReadSAI2V( long * pStatus )

Reads a message from a channel. The entire message is placed into a single dimensional SAFEARRAY of 16-bit data, and a pointer to the SAFEARRAY is returned in VARIANT. These functions are provided because some host clients cannot support parameters that are referenced to variants of SAFEARRAYs.

Parameters:

pStatus Pointer to the return status. The status can be one of:
Success Data read is valid.
Failure Error occurred during read.
Warning Message read, but incomplete. Some data was padded for alignment.
ENoDataAvailable No data was available. However, more data may be available in the future as the target application has not yet terminated.
EEndOfLogFile No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.
   
Returns:

VARIANT Contains a pointer to a SAFEARRAY.


Read array of 32-bit data


VARIANT ReadSAI4V( long * pStatus )

Reads a message from a channel. The entire message is placed into a single dimensional SAFEARRAY of 32-bit data, and a pointer to the SAFEARRAY is returned in VARIANT. These functions are provided because some host clients cannot support parameters that are referenced to variants of SAFEARRAYs.

Parameters:

pStatus Pointer to the return status. The status can be one of:
  Success - Data read is valid.
  Failure - Error occurred during read.
  Warning - Message read, but incomplete. Some data was padded for alignment.
  ENoDataAvailable - No data was available. However, more data may be available in the future as the target application has not yet terminated.
  EEndOfLogFile - No data was available. In Live mode, this signifies that the target application has terminated (halted at the breakpoint at C$$EXIT). In Playback mode, this signifies that the end of the log file has been reached.
   
Returns:

VARIANT Contains a pointer to a SAFEARRAY.


Read


long Read( VARIANT * pArr, long dataType, long numBytes )

The Read function reads the specified amount of data of the specified type from a channel. The entire message is placed into a single dimensional SAFEARRAY, and a pointer to the SAFEARRAY is returned in the parameter pArr.

Parameters:

pArr A pointer to a VARIANT that contains a pointer to a SAFEARRAY.
dataType Type of data.
numBytes Amount of data in bytes.
  0 - 8-Bit integer data access (BYTE)
  1 - 16-Bit integer data access (short)
pStatus Pointer to the return status. The status can be one of:
  Success - Data read is valid.
  Failure - Error occurred during read.
  2 - 32-Bit integer data access (long)
  3 - 32-Bit floating-point data access (float)
  4 - 64-Bit floating-point data access (double)
   
Returns:

  Success - Data read is valid.
  Failure - Error occurred during read.


Read single byte


long ReadI1( BYTE * pData )

The ReadI1 functions read a single 8-bit integer (byte) from the data channel. The byte is returned in pData. The functions will not block if no data is available from the target application. Any attempt to read from a channel that is open for writing is undefined.

Parameters:

pData A pointer to the byte being read.
   
Returns:

long Success - Data read is valid.
  Failure - Error occurred during read.


Read single 16-bit integer


long ReadI2( short * pData )

The ReadI2 functions read a single 16-bit integer from the data channel. The integer is returned in pData. The functions will not block if no data is available from the target application. Any attempt to read from a channel that is open for writing is undefined.

Parameters:

pData A pointer to the 16-bit integer being read.
   
Returns:

long Success - Data read is valid.
  Failure - Error occurred during read.


Read single 32-bit integer


long ReadI4( long * pData )

The ReadI4 functions read a single 32-bit integer from the data channel. The integer is returned in pData. The functions will not block if no data is available from the target application. Any attempt to read from a channel that is open for writing is undefined.

Parameters:

pData A pointer to the 32-bit integer being read.
   
Returns:

long Success - Data read is valid.
  Failure - Error occurred during read.


Read single 32-bit float


long ReadF4( float * pData )

The ReadF4 functions read a single 32-bit float from the data channel. The float is returned in pData. The functions will not block if no data is available from the target application. Any attempt to read from a channel that is open for writing is undefined.

Parameters:

pData A pointer to the float being read.
   
Returns:

long Success - Data read is valid.
  Failure - Error occurred during read.


Read single 64-bit float


long ReadF8( double * pData )

The ReadF8 functions read a single 64-bit float from the data channel. The double is returned in pData. The functions will not block if no data is available from the target application. Any attempt to read from a channel that is open for writing is undefined.

Parameters:

pData A pointer to the double being read.
   
Returns:

long Success - Data read is valid.
  Failure - Error occurred during read.



next up previous
Next: Channel Write Functions Up: Host (PC) RTDX API Previous: Channel Open/Close Functions
H. Rogalla 2005-12-07