bufferIdData, bufferIdDataAscii

bufferIdData, bufferIdDataAscii — get data from an interpolate query.

Syntax

(bufferIdData id [start [count]])
(bufferIdDataAscii id [start [count]])
    

Parameters

id

The query buffer ID as returned from an interpolate command.

start

The offset into the buffer of the first required data value. The default is 0, the position of the first value.

count

The number of data points to be transferred. The default is the maximum number available (ie. the number required from start to the end of the buffer that will return those data point values in one transfer).

Returns

bufferIdData returns a binary data buffer, or nil.

bufferIdDataAscii returns the data in the buffer as an ASCII string, or nil. The format of the string is as follows:

(bufferIdDataAscii id start (timei datai) ... (timem datam))

where "i" is the value of start and "m" is start + count - 1. In other words, a total of count pairs of (time data) are sent.

Description

This command returns the result of the specified query as a binary buffer of X-Y doubles. To facilitate transfer of large buffers, the start and count parameters can be used to transfer the buffer in portions. The buffer will persist until it is explicitly destroyed with the bufferIdDestroy command.

The bufferIdDataAscii command gives you a way to get human-readable data with lsend, gsend, or Gamma, without using dll calls.

The bufferIdData command corresponds to the Cogent C API functionHI_BufferIDRead function, and the hist_buffer_id_read dynamic library function.

Example

Hist> (bufferIdData 4 97 3)
#î¸ÍA
Hist> (bufferIdDataAscii 4 97 3)
(bufferIdDataAscii 4 97 (991430001.863377 15.000000)
(991430001.888613 17.000000) (991430001.913531 19.000000))