hist_length

Cascade Historian: Version 4.1
Prev |  | Next

# `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 API function `HI_Length`.

Prev | Home | Next
`hist_latest` | Up | `hist_length_buffer`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.