RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

RTUController

Controller Class for RTUs

Constructor

new RTUController()

Source

Methods

static

create(createData) → {Promise.<RTUModel>}

Create a RTU [POST /rtus]

Parameters

  • createData RTUController.CreateData

    The RTU Create Data

Returns

  • Promise.<RTUModel>

Source

static

getAll(queryParametersopt) → {Promise.<Array.<RTUModel>>}

List all RTUs [GET /rtus]

Parameters

  • queryParameters RTUController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<RTUModel>>

Source

static

getAllStatuses(queryParametersopt) → {Promise.<Array.<RTUController.RTUStatusItem>>}

Retrieve the Statuses of all RTUs [GET /rtus/statuses]

An Array of Statuses for all RTUs

Parameters

  • queryParameters RTUController.GetAllStatusesQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<RTUController.RTUStatusItem>>

Source

static

getOneStatus(id) → {Promise.<RTUController.RTUStatusItem>}

Retrieve the Status of an RTU [GET /rtus/{id}/status]

Parameters

  • id number

    The RTU ID

Returns

  • Promise.<RTUController.RTUStatusItem>

Source

static

update(id, updateData) → {Promise.<RTUModel>}

Update a RTU [PATCH /rtus/{id}]

Parameters

  • id number

    The RTU ID

  • updateData RTUController.UpdateData

    The RTU Update Data

Returns

  • Promise.<RTUModel>

Source

Type Definitions

CreateData

The Create Data for a RTU

Type

  • Object

Properties

  • siteId number

    The Site this RTU belongs to

  • name string

    The RTU Name

  • enabled boolean <optional>

    Whether the RTU is Enabled

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • siteId number <optional>

    The Site this RTU belongs to

  • name string <optional>

    The RTU Name

  • enabled boolean <optional>

    Whether the RTU is Enabled

Source

GetAllStatusesQueryParameters

The Optional Query Parameters for the getAllStatuses Function

Type

  • Object

Properties

  • rtuIds Array.<number> <optional>

    A List of RTU IDs to Filter by

Source

RTUStatusItem

A RTUStatusItem Type

Type

  • Object

Properties

  • id number

    ID of the RTU

  • latency number <nullable>

    Round-Trip Latency of the RTU represented in milliseconds

  • latencyTimestamp Date <nullable>

    When the Latency was last Updated

  • lastSeenTimestamp Date <nullable>

    When the Last Message was Received from the RTU

  • onlineStatus boolean

    Whether the RTU is considered as Online

Source

UpdateData

The Update Data for a RTU

Type

  • Object

Properties

  • name string <optional>

    The RTU Name

  • enabled boolean <optional>

    Whether the RTU is Enabled

Source