next up previous
Next: Query Functions Up: Host (PC) RTDX API Previous: Channel Read Functions

Channel Write Functions



Write data


long Write( VARIANT Arr, long * numBytes )

Writes a message (SAFEARRAY) to a channel. The parameter Arr is a VARIANT that contains a pointer to the SAFEARRAY. The SAFEARRAY can contain: 8-bit integers, 16-bit integers, 32-bit integers, 32-bit floats, or 64-bit floats.

Parameters:

Arr A VARIANT that contains a pointer to a SAFEARRAY.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Write a single byte


long WriteI1( unsigned char Data, long * numBytes )

Write the byte in Data to the target. Any attempt to write to a data channel that is open for reading is undefined. Any attempt to write to the "ALL" channel is undefined.

Parameters:

Data The variable holding the byte that the host client is writing to the target.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Write a single 16-bit integer


long WriteI2( short Data, long * numBytes )

Write the 16-bit integer in Data to the target. Any attempt to write to a data channel that is open for reading is undefined. Any attempt to write to the "ALL" channel is undefined.

Parameters:

Data The variable holding the 16-bit integer that the host client is writing to the target.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Write a single 32-bit integer


long WriteI4( long Data, long * numBytes )

Write the 32-bit integer in Data to the target. Any attempt to write to a data channel that is open for reading is undefined. Any attempt to write to the "ALL" channel is undefined.

Parameters:

Data The variable holding the 32-bit integer that the host client is writing to the target.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Write a single 32-bit float


long WriteF4( float Data, long * numBytes )

Write the 32-bit float in Data to the target. Any attempt to write to a data channel that is open for reading is undefined. Any attempt to write to the "ALL" channel is undefined.

Parameters:

Data The variable holding the 32-bit float that the host client is writing to the target.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Write a single 64-bit float


long WriteF8( float Data, long * numBytes )

Write the 64-bit float in Data to the target. Any attempt to write to a data channel that is open for reading is undefined. Any attempt to write to the "ALL" channel is undefined.

Parameters:

Data The variable holding the 64-bit float that the host client is writing to the target.
numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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


Read status of Write


long StatusOfWrite( long * numBytes )

Inquire about a previous WriteI or WriteF operation.

Parameters:

numBytes Data is passed from the host client to the RTDX Host Library. The RTDX Host Library stores the data in an internal buffer until a read request is received from the target application. The numBytes parameter returns the state of this internal buffer. On return, numBytes will be one of the following:
  Negative value - The number of bytes that the target application has requested to read, but have not yet been written by the host client. The target application is waiting for more data.
  Positive value - The number of bytes that have been written by the host client, but have not yet been read by the target. The buffer contains this number of bytes.
  0 (zero) - No bytes in the buffer can indicate that either no activity has occurred or the buffer is empty (the number of bytes written by the host client equals the number of bytes read by the target application).
   
Returns:

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



next up previous
Next: Query Functions Up: Host (PC) RTDX API Previous: Channel Read Functions
H. Rogalla 2005-12-07