NodeOPCUA API Documentation
    Preparing search index...

    Interface IVariableHistorian

    interface IVariableHistorian {
        extractDataValues(
            historyReadRawModifiedDetails: ReadRawModifiedDetails,
            maxNumberToExtract: number,
            isReversed: boolean,
            reverseDataValue: boolean,
            callback: (err: Error | null, dataValue?: DataValue[]) => void,
        ): void;
        findBoundAfter?(date: Date): DataValue | null;
        findBoundBefore?(date: Date): DataValue | null;
        push(newDataValue: DataValue): Promise<void>;
    }

    Implemented by

    Index
    • Extract a series of dataValue from the History database for this value

      Parameters

      • historyReadRawModifiedDetails: ReadRawModifiedDetails
      • maxNumberToExtract: number
      • isReversed: boolean
      • reverseDataValue: boolean
      • callback: (err: Error | null, dataValue?: DataValue[]) => void

      Returns void

    • Find the oldest raw data value with a sourceTimestamp strictly after date.

      See findBoundBefore.

      Parameters

      • date: Date

      Returns DataValue | null

    • Find the most recent raw data value with a sourceTimestamp strictly before date.

      Used to compute a Bounding Value (OPC 10000-11 6.5.3.2 and 3.1.2) when a HistoryRead with ReadRawModifiedDetails.returnBounds set finds no raw value exactly at the start or end of the requested time domain. Returns null when no such value exists.

      Optional: a historian that does not implement it causes the bound to be reported as Bad_BoundNotSupported instead of being computed.

      Parameters

      • date: Date

      Returns DataValue | null

    • push a new value into the history for this variable the method should take a very small amount of time and not directly write to the underlying database

      Parameters

      Returns Promise<void>