hist_buffer2array

hist_buffer2array — generates an array from a binary buffer of historian data.

Syntax

hist_buffer2array (buffer)
    

Parameters

buffer

A binary buffer of X-Y pairs of doubles, as created by a call to hist_buffer_id_read.

Returns

An array of instances of the class HI_stVALUE, containing the data in buffer.

Description

This utility function simplifies access to a binary buffer of Cascade Historian data by creating an array of the data. Array access may be programmatically more convenient than using repeated calls to hist_access_buffer, as well as providing about 15% better performance.

Example

b = hist_read_buffer_id(historian,0);
a = hist_buffer2array (b);
n = length(a);
for (i=0; i< n; i++)
    princ (a[i], "\n");