|
Online Help icom Data Suite |
Determining the command syntax for CLI and REST interface
The syntax of the available commands can easy be found out using the auto-complete function of the CLI.
The following describes the proceeding for determining the commands for manually setting a digital flag. Below listed sections and parameters depend on the router and the version of the application and may differ.
- Open a CLI session
- Press the Tab key
>
exit
status
datapoints
gateway
alu
messages
events
administration
help
All available sections from the first level are displayed (comparable to the main menu entries in the web interface).
- Enter "h" and press the Tab key
> help.
- Press the Tab key
> help.
debug
All available sections from the second level are displayed (only one here, comparable to the sub-menu entries in the web interface).
- Enter "d" and press the Tab key
> help.debug.
- Press the Tab key
> help.debug.
digital
analog
timer
function
message
sms
email
mqtt
profile
ascii
reboot
m3_cli
sleep
All available manual actions are displayed.
- Enter "d" and press the Tab key
> help.debug.digital.
- Press the Tab key
> help.debug.digital.
datapoint
change
submit
All available parameters for manual setting of a data point are displayed. The parameter "submit" is only relevant for CLI operation since it serves for triggering the command.
- Enter "d", press the Tab key, append an "=" and press the Tab key twice
> help.debug.digital.datapoint=
flag1
flag2
All available digital data points are displayed.
- Enter "c", press the Tab key, append an "=" and press the Tab key twice
> help.debug.digital.change=to
to_one
to_zero
toggle
All available options for changing the digital data point are displayed.
Therefore, the following syntax results for toggling the digital data point "flag1" via REST:
POST /operation
{
"method" : "manual_action",
"params" : {
"type" : "digital",
"options" : {
"datapoint" : "flag1",
"change" : "toggle"
}
}
}
Then, the CLI commands for toggling the digital data point "flag1" have the following syntax:
> help.debug.digital.datapoint=flag1
> help.debug.digital.change=toggle
> help.debug.digital.submit
Back to overview
|