Methods
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
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
initialize()
Initialize
Source
isInitialized() → {boolean}
Returns the Initialized Status
Returns
-
boolean
Source
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
offReadPoints(handler)
Un-Register 'readpoints' Event Handler
Parameters
-
handler
Points.readPointsCallback
The Handler Callback
Source
on(event, handler)
Register Events Handler
Parameters
-
event
string
The Event to Register a Handler for
-
handler
Points.eventCallback
The Handler Callback
Source
onReadPoints(handler)
Register 'readpoints' Event Handler
Parameters
-
handler
Points.readPointsCallback
The Handler Callback
Source
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
subscribe(siteId) → {Promise.<boolean>}
Subscribe to a Site for Points
Parameters
-
siteId
number
The Site ID
Returns
-
Promise.<boolean>
Source
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
-
siteId
number
The Site ID
-
pointValues
Array.<Points.PointValueItem>
An Object of Point Values
Returns
-
void