RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

WebSocketHelper

A Helper Class to abstract away the Lower-Level Socket.IO API to suit calls to the RICADO Gen 4 WebSocket Server

Constructor

new WebSocketHelper()

Source

Methods

static

emit(event, …args)

Emit an Event

Parameters

  • event string

    The Event to Emit

  • args Array.<any> <repeatable>

    Arguments to pass to the Event Handlers

Source

static

subscribe(keyopt)

Subscribe to a Site or RTU for Events

Parameters

  • key string <optional>

    The Site ID or RTU ID Key (e.g. site.2 or rtu.1200)

Source

static

unsubscribe(keyopt)

Unsubscribe from a Site or RTU for Events

Parameters

  • key string <optional>

    The Site ID or RTU ID Key (e.g. site.2 or rtu.1200)

Source

Type Definitions

eventCallback(…args) → {void}

The Events Callback

Parameters

  • args any <repeatable>

    The Callback Arguments

Returns

  • void

Source