Remoting
Extends:
User API for remote control
Static Member Summary
Static Public Members | ||
public static get |
Get default deployment id associated to Remoting service |
Method Summary
Public Methods | ||
public |
addListener(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * Adds a listener |
|
public |
capabilities(objectPattern: {"askingResource": *, "capabilities": *, "answeringResource": *}): * Response to 'getCapabilities' |
|
public |
execute(objectPattern: {"resource": *, "cmd": *, "data": *, "owner": *}): * Executes a command |
|
public |
getCapabilities(): * Requests capabilities |
|
public |
notify(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * Notifies of some event |
|
public |
ping(objectPattern: {"action": *}): * Pings devices |
|
public |
pong(objectPattern: {"user": *, "resource": *, "available": *, "uid": *, "owner": *, "action": *}): * Response to ping |
|
public |
removeListener(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * Removes a listener |
Static Public Members
Public Methods
public addListener(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * source
Adds a listener
A user requests notifications from a device owned by anyone who granted him the right authorizations. Whenever the device calls 'notify', notifications will be sent to the caller of this verb.
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *} |
|
Return:
* |
public capabilities(objectPattern: {"askingResource": *, "capabilities": *, "answeringResource": *}): * source
Response to 'getCapabilities'
Params:
Name | Type | Attribute | Description |
objectPattern | {"askingResource": *, "capabilities": *, "answeringResource": *} |
|
Return:
* |
public execute(objectPattern: {"resource": *, "cmd": *, "data": *, "owner": *}): * source
Executes a command
A user executes a command on a device owned by anyone who granted him the right authorizations. The command is issued on channel 'command'
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "cmd": *, "data": *, "owner": *} |
|
Return:
* |
public getCapabilities(): * source
Requests capabilities
A user requests all his devices for the whole list of their capabilities. Devices are expected to answer on channel 'capabilities'
Return:
* |
public notify(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * source
Notifies of some event
A device notifies the registered users/devices on this channel. The server forwards the notification to said users.
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *} |
|
Return:
* |
public ping(objectPattern: {"action": *}): * source
Pings devices
A user requests all devices (of all owners) on which he has authorizations to respond on channel 'pong'
Params:
Name | Type | Attribute | Description |
objectPattern | {"action": *} |
|
Return:
* |
public pong(objectPattern: {"user": *, "resource": *, "available": *, "uid": *, "owner": *, "action": *}): * source
Response to ping
Params:
Name | Type | Attribute | Description |
objectPattern | {"user": *, "resource": *, "available": *, "uid": *, "owner": *, "action": *} |
|
Return:
* |
public removeListener(objectPattern: {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *}): * source
Removes a listener
A user stops requesting notifications from a device owned by anyone who granted him the right authorizations
Params:
Name | Type | Attribute | Description |
objectPattern | {"resource": *, "fromResource": *, "cmd": *, "from": *, "data": *, "owner": *} |
|
Return:
* |