Commands & Usage

Last updated 2 months ago

Synchronous and asynchronous communication

  • Use of xMsg to control SmartScreen (Asynchronous)

Function: xmsg.send()
{"in":"{"fm":"(from DDN)","to":"(to DDN)"}","data":"{"cmd":"(SmartScreen command)", 'attribute' key_value pairs...}""}
Example: {"in":"{"fm":"koYh3Ik1","to":"pJRt6H9G"}","data":"{"cmd":“drop”,“type”:”url”,“src”:[“”]}""}
  • Use of xRPC to control SmartScreen (Synchronous)

target: {"target":"demo"} //'demo' being the user-defined target_device name (an 'alias' in lieu of the target_device 'DDN')
func: {"cmd":"(SmartScreen API command)", 'attribute' key_value pairs)...}
body: "data":func
Example: {"target":"demo","data":"{"cmd":”drop”,“type”:”url”,“src”:[“”]}"}
  • Command Format

    • CLI: Command line command, type is 'string '

    • JSON: {"cmd":"drop",…}