To send a command to a unit, use the request unit/exec_cmd:
svc=unit/exec_cmd¶ms={"itemId":<long>, "cmdName":<text>, "cmdParam":<text>, "linkType":<text>, "timeout":<uint>}
Name | Description |
---|---|
itemId | unit ID |
cmdName | command name |
linkType | link type (see Command parameters) |
cmdParam | parameters (if necessary) |
timeout | timeout for command to wait in commands queue, in seconds |
{} /* empty object if execution successful, if not - error code */
|