rtconf

manage configuration parameters

Author: Geoffrey Biggs and contributors
Date: 2011-10-24
Copyright: EPL-1.0
Version: 3.0
Manual section:1
Manual group:User commands

Synopsis

rtconf <path> [options] [command] [args]

Description

Display and edit configuration parameters and sets.

A command should be one of:

  • list
  • set
  • get
  • act

If no command is specified, the list command will be executed.

list

The list command displays the configuration sets and parameters. It takes no arguments. By default, hidden sets (sets who's name is surrounded by __) are not displayed.

set <parameter> <value>

The set command changes the value of a configuration parameter in one set. It requires a parameter name and a value as arguments. If no configuration set is specified (using --set), the parameter is changed in the currently active configuration set.

get <parameter>

The get command prints the value of a configuration parameter in one configuration set. It requires a parameter name as its argument. If no configuration set is specified (using --set), the parameter value from the currently activate configuration set is retrieved.

act

The act command requires no arguments, but a configuration set must be specified using --set. It activates that set.

Options

-a, --all Do not ignore hidden sets. This option must be specified to work with hidden configuration sets.
-l Show more information.
-s SET_NAME, --set=SET_NAME
 Choose the configuration set to work with. If not specified, the current active set is used.
--version Show program's version number and exit
-h, --help Show a help message and exit
-v, --verbose Output verbose information. [Default: False]

Paths

rtshell uses paths to indicate objects in the RTC Tree. A path is the address of object. Name servers and naming contexts on name servers are considered directories. Managers and RT-Components are considered 'files'. As with the POSIX cat command, the path specified as an argument to commands is appended to the current rtshell working directory, which is stored in the RTCSH_CWD environment variable and changeable using the rtcwd command.

The available paths depend on the known name servers at the time the command is executed. This is a combination of the servers listed in the RTCSH_NAMESERVERS environment variable and the servers used in given paths.

For example, /localhost/comp0.rtc refers to the component named comp0.rtc registered on the name server at localhost. /localhost/manager/comp0.rtc refers to the component comp0.rtc in the directory manager on the localhost name server. ./comp0.rtc refers to that component in the current directory.

When specifying a port on an RT-Component, it should be placed after the path, separated by a colon. For example, /localhost/comp0.rtc:data refers to the port data on the component comp0.rtc.

Some commands that create new ports accept extra options in the paths, such as a name for the automatically generated port, or a formatter. The format for specifying these paths is:

path:port.name#formatter

For example:

/localhost/blurg.host_cxt/comp0.rtc:input.stuff#a_printer

This specifies that the automatically generated port should be named stuff, and the data type it handles should be printed using the a_printer function (which must be available, usually it is provided by the user in a loadable module). The port will be connected to the input port of the comp0.rtc component.

The name component is optional. If it is not present, neither should the . character be. For example:

/localhost/blurg.host_cxt/comp0.rtc:input#a_printer

The formatter component is optional. If it is not present, neither should the # character be. For example:

/localhost/blurg.host_cxt/comp0.rtc:input.stuff

Environment

RTCTREE_ORB_ARGS
A list of arguments, separated by semi-colons, to pass to the ORB when creating it. Optional.
RTCTREE_NAMESERVERS
A list of name server addresses, separated by semi-colons, to parse when creating the RTCTree. Each server in the list will be added to the tree, making it available for browsing with rtshell. Optional.
RTSH_CWD
The current working directory in the tree. Do not set this variable; it is set automatically by rtshell.

The only variable that should normally be set by the user is RTCTREE_NAMESERVERS. Set this to a list of name server addresses, separated by semi-colons, that rtshell should interact with. For example, in a Bash shell, the following command will set the known name serves to localhost, 192.168.0.1:65346 and example.com:

$ export RTCTREE_NAMESERVERS=localhost;192.168.0.1:65346;example.com

Diagnostics

Returns zero on success and non-zero on failure.

Verbose output and error messages are printed to stderr.

Examples

$ rtconf /localhost/ConfigSample0.rtc list
+default*
+mode0
+mode1

Display the configuration sets in the ConfigSample0.rtc component.

$ rtconf /localhost/ConfigSample0.rtc -l list
-default*
  double_param0  0.99
  double_param1  -0.99
...

Display the configuration sets and their parameters in the ConfigSample0.rtc component.

$ rtconf /localhost/ConfigSample0.rtc -a list
+__constraints__
+__widget__
+default*
+mode0
+mode1

Display the configuration sets in the ConfigSample0.rtc component, including hidden sets.

$ rtconf /localhost/ConfigSample0.rtc -l -s default list
-__constraints__
  double_param0  0<=x<=100
  double_param1
...

Display the parameters of the default configuration set in the ConfigSample0.rtc component.

$ rtconf /localhost/ConfigSample0.rtc set int_param0 42

Change the value of the int_param0 parameter to 42 in the currently-active configuration set.

$ rtconf /localhost/ConfigSample0.rtc -s mode0 set int_param0 42

Change the value of the int_param0 parameter to 42 in the mode0 set.

$ rtconf /localhost/ConfigSample0.rtc get int_param0
0

Get the value of the int_param0 parameter in the currently-active configuration set.

$ rtconf /localhost/ConfigSample0.rtc -s mode0 get int_param0
12345

Get the value of the int_param0 parameter in the mode0 configuration set.

$ rtconf /localhost/ConfigSample0.rtc act mode1

Activate the mode1 configuration set.

$ rtconf /localhost/ConfigSample0.rtc -a act __widget__

Activate the __widget__ configuration set.

See Also

rtcat (1)