hist_buffer_id_read

hist_buffer_id_read — reads a buffer of data from the Cascade Historian.

Syntax

hist_buffer_id_read (hist_task, queryid[, start[, count]])
    

Parameters

hist_task

The task object corresponding to the Cascade Historian. A task object is created by a call to the Gamma function locate_task, as follows:

hist_task = locate_task ("tfrc/histdb", nil);
queryid

The reference number for the result of a query made on the Cascade Historian using the hist_interpolate function or the interpolate command.

start

The index into the buffer of the first X-Y data pair to be transmitted. Permits access to a portion of the buffer. If not specified, a default of 0 is used.

count

The number of X-Y data pairs to be transmitted. Permits access to a portion of the buffer. If 0 or not specified, the entire buffer is read.

Returns

A binary buffer containing the requested count of X-Y pairs as doubles.

Description

This function provides a client with access to a buffer of data created in the Cascade Historian in response to a client query. Once created, a buffer remains available in the historian until it is explicitly deleted. This function will automatically segment a request for large buffers (those exceeding a reasonable IPC message size) into multiple partial requests, and will reassemble the segments into the complete resulting buffer in the client's process.

This function corresponds to the bufferIdData command and the Cogent C API function HI_BufferIDRead.

Example

See the example for the hist_exchange_buffer function.

See also

hist_interpolate