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
packagestatic
initialize()
Initialize
Source
static
on(event, handler)
Register Events Handler
Parameters
-
event
string
The Event to Register a Handler for
-
handler
WebSocketHelper.eventCallback
The Handler Callback
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