HI_Length

HI_Length — finds the total number of values in a history.

Syntax

#include <cogent.h>
ST_STATUS HI_Length(IP_hTASK  historian,
 char*  retbuf,
 int  buflen,
 char*  histname,
 int*  length);

Arguments

historian
The task pointer to the Cascade Historian program.
retbuf
An optional buffer containing an error message.
buflen
The length in bytes of retbuf. If retbuf is non-NULL, this must be a valid non-zero length. If retbuf is NULL, this parameter is ignored.
histname
The name of a history.
length
The return value containing the number of values in the history.

Returns

ST_OK on success. Otherwise ST_ERROR, and the retbuf will contain a NULL-terminated character string with an error message. If the return value is ST_OK, the retbuf may not contain useful information.

Description

This function queries the history for the total number of values available. It returns the result in length.

This function corresponds to the Cascade Historian length command and the hist_length dynamic library function.