Methods
create(createData) → {Promise.<RTUModel>}
Create a RTU [POST /rtus]
Parameters
-
createData
RTUController.CreateDataThe RTU Create Data
Returns
-
Promise.<RTUModel>
Source
delete(id) → {Promise.<boolean>}
Delete a RTU [DELETE /rtus/{id}]
Parameters
-
id
numberThe RTU ID
Returns
-
Promise.<boolean>
Source
getAll(queryParametersopt) → {Promise.<Array.<RTUModel>>}
List all RTUs [GET /rtus]
Parameters
-
queryParameters
RTUController.GetAllQueryParameters<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<RTUModel>>
Source
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
getOne(id) → {Promise.<RTUModel>}
Retrieve a RTU [GET /rtus/{id}]
Parameters
-
id
numberThe RTU ID
Returns
-
Promise.<RTUModel>
Source
getOneStatus(id) → {Promise.<RTUController.RTUStatusItem>}
Retrieve the Status of an RTU [GET /rtus/{id}/status]
Parameters
-
id
numberThe RTU ID
Returns
-
Promise.<RTUController.RTUStatusItem>
Source
update(id, updateData) → {Promise.<RTUModel>}
Update a RTU [PATCH /rtus/{id}]
Parameters
-
id
numberThe RTU ID
-
updateData
RTUController.UpdateDataThe RTU Update Data
Returns
-
Promise.<RTUModel>
Source
Type Definitions
CreateData
The Create Data for a RTU
Type
-
Object
Properties
-
siteId
numberThe Site this RTU belongs to
-
name
stringThe 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
numberID 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
booleanWhether 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