Class GetStateDataObject

An object representation of a single CSV response column (ignoring the first row of the raw input!).

Hierarchy (view full)

Indexable

  • [key: string]: unknown

    Making GetStateDataObject objects extensible, also allows accessing object keys using string variables.

Constructors

  • Passthru all parameters to GetStateDataObject.set.

    Parameters

    • index: number

      Column id/index

    • name: string

      Column or data portion name

    • unit: string

      Column or data portion unit (if applicable in any way)

    • offset: string

      Column value offset

    • gain: string

      Column value gain

    • measure: string

      Column value raw measurement

    Returns GetStateDataObject

Properties

active: boolean

Indicates whether the object is considered to be active.

Indeed this only means the name is not 'n.a.'.

category: string

Object instance category string.

categoryId: number

Sub-index for each category.

Starts counting from 0 at the first object of the instances category. Used to determine e.g. the relay IDs.

displayValue: string

Object display value.

gain: number

Object value gain.

id: number

Object id aka column index.

label: string

Object label.

offset: number

Object value offset.

raw: number

Raw object input value.

unit: string

Object unit.

value: string | number

Plain (calculated) object value.

Methods

  • Iterate all fields of this object.

    Parameters

    • callback: ((field: string) => void)

      A user-defined callback.

        • (field): void
        • Parameters

          • field: string

          Returns void

    Returns void

  • Set object values based on the raw input values.

    The input values correspond to the data rows of the represented column (except the index paramter which indeed is the column id/index itself).

    Parameters

    • index: number

      Column id/index

    • name: string

      Column or data portion name

    • unit: string

      Column or data portion unit (if applicable in any way)

    • offset: string

      Column value offset

    • gain: string

      Column value gain

    • measure: string

      Column value raw measurement

    Returns void