Settings
Perform command line interface operation on the connected hub and return the complete result. This allows you to run commands directly on the hub’s command line without stopping the API service. In order to update the settings the CLI setting will require a settings_unlock\n prefix to the command for more information on using CLI commands please see the CLI documentation https://www.cambrionix.com/cambrionix-cli.
Syntax: see Call Structure
{ "method": "cbrx_connection_set", "params": [ connection-handle, "Settings", "settings_unlock\nCommand" ] } |
Parameter | Description |
---|---|
connection-handle | The Connection Handles as an integer |
Command | The Command you wish to send to the hub For all CLI commands see the CLI Documentation https://www.cambrionix.com/cambrionix-cli |
Returns:
{ "jsonrpc": "2.0", "id": 0, "result": "Unlocked \nSetting updated" } |
Errors
If there is an error in the API method then a JSON-RPC Error Object will be returned.
If you attempt to update a setting that is already set you will receive a message stating that the setting is already set such as the example of sending the ports on below
{
"jsonrpc": "2.0",
"id": 0,
"result": "Unlocked \nForcing ports on has already been defined."
}
Example
{
"jsonrpc": "2.0",
"id": 0,
"method": "cbrx_hub_set",
"params": [
"DM01K2A8",
"settings",
"settings_unlock\nsettings_set ports_on 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"
]
}