RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

Points

This Class provides Methods to interact with Points on RICADO Gen 4

Constructor

new Points()

Source

Methods

static

getDefinition(siteId, pointId) → {PointModel|undefined}

Get Point Definition

Parameters

  • siteId number

    The Site ID

  • pointId number

    The Point ID

Returns

  • PointModel undefined
    • The Point Definition

Source

static

getValue(siteId, pointId) → {Points.PointValueItem|undefined}

Get Point Value

Parameters

  • siteId number

    The Site ID

  • pointId number

    The Point ID

Returns

  • Points.PointValueItem undefined
    • The Point Value

Source

static

isInitialized() → {boolean}

Returns the Initialized Status

Returns

  • boolean

Source

static

off(event, handler)

Un-Register Events Handler

Parameters

  • event string

    The Event to Un-Register a Handler from

  • handler Points.eventCallback

    The Handler Callback

Source

static

setValue(siteId, pointId, value) → {Promise.<string>}

Set Point Value

Parameters

  • siteId number

    The Site ID

  • pointId number

    The Point ID

  • value any

    The Point Value to Write

Returns

  • Promise.<string>

Source

static

subscribe(siteId) → {Promise.<boolean>}

Subscribe to a Site for Points

Parameters

  • siteId number

    The Site ID

Returns

  • Promise.<boolean>

Source

static

unsubscribe(siteId)

Unsubscribe from a Site for Points

Parameters

  • siteId number

    The Site ID

Source

Type Definitions

eventCallback(…args) → {void}

The Events Callback

Parameters

  • args any <repeatable>

    The Callback Arguments

Returns

  • void

Source

PointValueItem

A Point Value Item used in a Read Points Callback

Type

  • Object

Properties

  • id number

    The Point ID

  • value any

    The Point Value

  • timestamp Date

    When the Point Value last changed

Source

readPointsCallback(siteId, pointValues) → {void}

The Read Points Callback

Parameters

Returns

  • void

Source