User Tools

Site Tools


public:ipaaca:tools

This is an old revision of the document!


IPAACA tools

General options

  • All IPAACA-tools/scripts provide a list of options – with some explanation – if called with the argument -h, e.g., ipaaca-iu-injector -h.
  • All tools/scripts also share the same basic RSB/IPAACA arguments.

ipaaca-iu-injector

ipaaca-iu-injector is a command line tool with which single IPAACA IUs or message-type-IUs can be send.

By default it sends message-type-IUs. This can be changed by specifying the argument -t IU, in which case the injector idles for a certain amount of time (3s default, configurable with the argument -k SECONDS, e.g., -k 10) before it exits. This is important when a receiving component makes a change to the published IU.

The injector has a single non-optional argument (-c CATEGORY, e.g., -c testcat), which specifies the category of the IU/Message that will be send. It is of course also possible to specify a payload, which is done with the argument -p KEY VALUE [KEY VALUE …], i.e., a list of alternating payload keys and payload values. By default, KEY and VALUE are interpreted as Strings, e.g., -p Hallo Welt bis bald will result in a Payload object {'Hallo': 'Welt', 'bis': 'bald'}. When specifying the argument -j, the VALUE arguments will be interpreted to be Python expressions and need to be escaped as such. For the example above, we would thus need to specify it as follows: -p Hallo "'Welt'" bis "'bald'". The double quotes instruct the cmd shell (e.g., bash) that a string, which may also contain spaces and other special characters, will follow. The single quotes are Python syntax for string literals.

Using the -j arguments also allows the specification of non-string payload values, such as boolean values, numbers, lists or maps. In this case shell double quotes simply enclose the Python syntax for specifying the data type (which may of course be nested):

  • -p send-data "True"{'send-data': true}
  • -p cmd "'set-streams'" streams "{'gaze': True, 'eyes': False}"{'cmd': 'set-streams', 'streams': {'gaze': true, 'eyes': false}}
  • -p resolution "[1920, 1080]"{'resolution': [1920, 1080]}
  • -p result "None"{'result': null}
public/ipaaca/tools.1485339921.txt.gz · Last modified: 2017/01/25 11:25 by hbuschme

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki