-
Notifications
You must be signed in to change notification settings - Fork 2
RPC Commands
In order to provide the dynamic monitoring and commanding functionality, we use a TCP-based RPC system. This wiki page will provide a brief overview of the available functionality.
The RPC system is a simple text-based TCP interface, operating on port 12345. For simplicities sake, we only specify two types of messages: actions, and variables.
The syntax for an action is as follows:
<eid to act upon>\command[=optional parameters];
For example, to create a time-based report, containing the ICI_LARGE_POLL_SIZE and ICI_SMALL_POOL_SIZE parameters, which will be evaluated once on ipn:1.1, with a 10-second offset:
ipn:1.1\reports.time=0,10,1,{ICI_LARGE_POOL_SIZE},{ICI_SMALL_POOL_SIZE};
Syntactically, this is strange, since data MIDs can contain parameters. If this was the case for the PARAMETRIZED_DATA MID, the syntax would look like:
ipn:1.1\reports.time=0,10,1,{PARAMETRIZED_DATA,1,2,3},{ICI_SMALL_POOL_SIZE};
For another example, in order to register node ipn:2.1 on the manager:
ipn:2.1\manager.register;
As seen above, commands are organized into classes.
| Command | Parameters | Description |
|---|---|---|
| register | N/A | Register the acting EID to this manager |
| deregister | N/A | Deregister the acting EID from this register |
| Command | Parameters | Description |
|---|---|---|
| create.<CTRL_MID> | Any parameters required from the MID | Create a control rule for CTRL_MID, with all parameters passed. This command is datalist-aware. |
| Command | Parameters | Description |
|---|---|---|
| time | offset,period,#evals,{mid1},...,{midN} | Create a time-based report containing mid1-midN (see above) |
| number | N/A | respond with one variable per node, containing the number of reports for that node |
| show | N/A | Dump every report for , as variables. |
| delete | N/A | Delete all reports for |
Any variable generated by the manager (reports, internal variables, etc) are transmitted to the RPC user via variables. The format is simple:
v:<acting eid>@<timestamp>\variableName(type)=value;
so, for our report example, the returned result would look like: v:ipn:1.1@1430851444\ICI_LARGE_POOL_SIZE(uint32)=862856;