Interface representing a Point object

interface IPoint {
    data: ((params) => Promise<Value[]>);
    isChanged: (() => boolean);
    read: ((propertyIdentifier?) => Promise<ReadResult>);
    trueFor: ((duration, selector) => Promise<boolean>);
    write: ((value, priority?, options?) => Promise<PointWriteResult>);
}

Hierarchy

  • BasePoint
    • IPoint

Properties

data: ((params) => Promise<Value[]>)

Type declaration

    • (params): Promise<Value[]>
    • Get points timeseries values between two Timestamps

      Parameters

      • params: {
            from?: Partial<Timestamp>;
            to?: Partial<Timestamp>;
        }
        • Optional from?: Partial<Timestamp>
        • Optional to?: Partial<Timestamp>

      Returns Promise<Value[]>

isChanged: (() => boolean)

Type declaration

    • (): boolean
    • Write a value to the point

      Returns boolean

read: ((propertyIdentifier?) => Promise<ReadResult>)

Type declaration

    • (propertyIdentifier?): Promise<ReadResult>
    • Read Value from Point

      Parameters

      • Optional propertyIdentifier: PropertyIdentifier

      Returns Promise<ReadResult>

trueFor: ((duration, selector) => Promise<boolean>)

Type declaration

    • (duration, selector): Promise<boolean>
    • Check if a point value has met a certain condition for a given time (in milliseconds)

      Example:

      module.exports = async ({ points }) => {
      const point = points.byLabel("some-class").first();
      const damperHigh = await DamperPosition.trueFor("1m",(v) => Number(v.value) > 95)
      };

      Parameters

      • duration: `${number}h` | `${number}m` | `${number}s`
      • selector: ValueSelector

      Returns Promise<boolean>

write: ((value, priority?, options?) => Promise<PointWriteResult>)

Type declaration

    • (value, priority?, options?): Promise<PointWriteResult>
    • Write a value to the point

      Parameters

      • value: CommandValue
      • Optional priority: number
      • Optional options: Partial<BACnetWriteCommandOptions>

      Returns Promise<PointWriteResult>

Generated using TypeDoc