new Command(properties, networkPropertiesopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
properties |
Object
|
|
|
the properties of the object |
networkProperties |
Object
|
<optional>
|
{}
|
Properties
Name |
Type |
Attributes |
Default |
Description |
endpointUrl |
String
|
|
|
defines the Http(s) endpoint URL |
tls |
Boolean
|
|
|
defines is use Http or Https secure protocol for fetching data |
streamProtocol |
String
|
<optional>
|
'ws'
|
the Stream protocol to use: 'ws' pr 'mqtt' |
mqttOpts |
Object
|
<optional>
|
{}
|
the Mqtt options if stream protocol is 'mqtt'
Properties
Name |
Type |
Description |
prefix |
String
|
the Mqtt prefix value |
endpointUrl |
String
|
the Mqtt specific endpointUrl |
|
|
- Source:
Methods
(async) searchStatus(commandFilteropt, pageSizeopt) → {Promise.<Collection.<JSON>>}
Get all status messages associated to a specific command
route: /systems/{sysid}/controls/{dsid}/commands/{cmdid}/status
Parameters:
Name |
Type |
Attributes |
Default |
Description |
commandFilter |
CommandFilter
|
<optional>
|
= new CommandFilter()
|
default Command filter |
pageSize |
Number
|
<optional>
|
10
|
default page size |
- Source:
Returns:
- response as JSON
-
Type
-
Promise.<Collection.<JSON>>
streamStatus(commandFilteropt, callback)
Stream all status messages associated to a specific command
route: /systems/{sysid}/controls/{dsid}/commands/{cmdid}/status
Parameters:
Name |
Type |
Attributes |
Default |
Description |
commandFilter |
CommandFilter
|
<optional>
|
= new CommandFilter()
|
default Command filter |
callback |
function
|
|
|
|
- Source: