cbrx_connection_open
Open a connection to the hub specified. A successful open results in a connection handle that can be used for further calls.
Syntax: see API Call Structure
{ "method": "cbrx_connection_open", "params": [ hub-serial , location ] } |
Parameters | Description |
---|---|
hub-serial |
This is the serial number of the hub returned from cbrx_discover |
location | see below table, if not included will default to local |
Location parameter | Description |
---|---|
local | connect to the local hub |
docks | connect to a hub in a Docks the id must be specified which can be found from cbrx_discover |
Returns:
{ "result": [connection-handle] } |
connection-handle is the Connection Handles as an integer
Errors
If there is an error in the API method then a JSON-RPC Error Object will be returned.
Examples
Example JSON-RPC request:
Copy
{
"jsonrpc": "2.0",
"id": 0,
"method": "cbrx_connection_open",
"params": [
"DB0074F5"
]
}
Example successful response:
Copy
{
"jsonrpc": "2.0",
"id": 0,
"result": 579
}