The TMBlockStream API call is a general purpose block transfer function. This function simply does a stream of TMTouchByte(s) of all of the 'num_tran' bytes in the 'tran_buffer' data buffer. The values returned from the TMTouchByte(s) are placed back into the 'tran_buffer' data buffer. This call returns a byte length greater than or equal to 0 for success or one of the HARDWARE SPECIFIC error values described for a failure. This API call is similar to TMBlockIO but without the TMTouchReset at the beginning of communication. The maximum number of 'num_tran' is 1023 bytes.
short far pascal TMBlockStream(
For a description of the above types, see the TMEX Type Descriptions.
Parameters
session_handle
Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.
tran_buffer
Specifies a pointer to a memory location that contains the data to write and then read from the 1-Wire network.
num_tran
Specifies the number of bytes in the ‘tran_buffer’ to transfer to and from the 1-Wire network.
Return Value
>=0 => length of data sent and received from the 1-Wire network
<0 => TMEX Hardware Specific Error Return Code
See Also