rtmgr

utilise managers

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

Synopsis

rtmgr [options] <path>

Description

Control a manager, adding and removing shared libraries and components. Components can be instantiated from shared libraries loaded into the manager.

To set a mananger's configuration, use rtconf(1). To view a manager's information, use rtcat(1).

If multiple commands are given, they are executed in the order they are specified on the command line.

Options

-c MOD_NAME, --create=MOD_NAME
 Create a new component instance from the specified loaded module. Properties of the new component an be specified after the module name prefixed with a question mark.
-d INSTANCE_NAME, --delete=INSTANCE_NAME
 Shut down and delete the specified component instance.
-l MOD_PATH, --load=MOD_PATH
 Load the module into the manager. An initialisation function must be specified after the module path separated by a ":".
-u MOD_PATH_U, --unload=MOD_PATH_U
 Unload the module from the manager.
--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

$ rtmgr /localhost/manager.mgr -l /usr/local/lib/mycomp.so:mycomp_init

Load the mycomp.so shared library into the manager.

$ rtmgr /localhost/manager.mgr -c mycomp

Instantiate a new component from the mycomp shared library.

$ rtmgr /localhost/manager.mgr -d MyComp0

Shut down and delete the component named MyComp0 from the manager.

$ rtmgr /localhost/manager.mgr -u /usr/local/lib/mycomp.so

Unload the mycomp.so shared library from the manager.

$ rtmgr /localhost/manager.mgr -l /usr/local/lib/mycomp.so:mycomp_init
  -c mycomp

Load the mycomp.so shared library into the manager and create a component from it.

See Also

rtcat (1), rtconf (1), rtexit (1)