hist_length

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

Syntax

hist_length (hist_task, history[, start[, end]])
    

Parameters

hist_task

The task object corresponding to the Cascade Historian. See locate_task in the Gamma manual.

history

The name of the history to be queried.

start

Optional, the start of a desired time range in seconds, expressed as a real number. The default is the first value available.

end

Optional, the end of a desired time range in seconds, expressed as a real number. The default is the last value available.

Returns

The number of values collected by the history between the specified times, if successful. Otherwise returns nil and sets _last_error_ to the error string returned by the Cascade Historian.

Description

This function queries the history for the total number of values available.

This function corresponds to the length command, and the Cogent C API function HI_Length.