Cascade Historian: Version 4.1
Prev |  | Next

# History Flags

History Flags -- control the behavior of a history.

## Description

These flags are returned by the `flags` parameter of the describe command. The flags associated with a history control key aspects of its behaviour. Each constant is a mask for the individual flag bits, and can be used to test the returned parameter. Separate commands are used to set the flags.

The flags are summarized as follows:

`HIST_DISABLED`

  Controls whether new values for the point associated with the history are logged. Set to `1` by the disable command, cleared (to `0`) by the enable command. The default state is `0` (active).

`HIST_REGISTERED`

  Controls whether the point associated with the history is registered with the Cascade DataHub. If the point is registered, then all changes to the value in the datahub will be sent to the Cascade Historian. This flag is set by the register command, and cleared by the unregister command. The default state is 0 (unregistered).

`HIST_DEADBAND`

  Controls whether a deadband is in use. A deadband is a range relative to the current value of the history within which value changes will be ignored. This is used to avoid storing values that represent just 'noise'. If no deadband is in effect, or the deadband value is `0`, then all value updates are stored. A deadband can be expressed as an absolute value or as a percent. This flag is set or cleared by the deadband command. The default state is `0` (no deadband).

`HIST_DEADBAND_PERCENT`

  When this flag bit is set the value of the deadband (if in use) is treated as a percent of the current history value. This flag is set or cleared by the deadband command. The default value is `0` (absolute deadband value).

## Example

        if (((flags & HIST_DISABLED) != HIST_DISABLED) &&
            ((flags & HIST_REGISTERED) == HIST_REGISTERED))
        {
            item.active = 1;
        }

Prev | Home | Next
Constants | Up | Index

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