tioreg

Index Home MAE > MAE Architecture > MAE Utilities > tioreg

Manage registry of MAE I/O resources.

Synopsis

tioreg option

Description

The tioreg utility is for managing the mapping of MAE I/O resources to actual I/O resources, which may be from a MAE spoke. MAE maintains a unique resource name that is used to reference the resource.  The resource name must contain no spaces; it is case sensitive.  The resource is specified using a URL-style parameter.

An I/O resource may be a file, directory, socket, (pseudo) tty, udp service, tcp service, serial device, or web page.

Options

Option

Description

-list [spoke]

List of I/O resources (perhaps for a specific spoke)

-add name url

Add an I/O resource with type, spoke, path and params from URL.

If name begins with / then it is part of the MAE filesystem.

-view name

View a specific I/O resource

-rm name

Remove an I/O resources

-status [spoke]

Status I/O resources (perhaps for a specific spoke)

-change name url

Specify new type, spoke, path and params from URL

-start name

Start an I/O resources

-stop name

Start an I/O resources

-spokes

List of spokes with I/O resources

-fs

List of filesystem files and directories

-ls [path]

Filesystem I/O resources at the path

-find text

Find a filesystem I/O resource containing the text


Resource URLs

A resource URL takes the general form:  type:[//spoke]/path[?param=value[&param2=value2[&...]]]

The spoke may be omitted if the resource is hosted by the root commhub system.  Otherwise, spoke must be a known and connected commhub spoke.

The path is interpreted based upon the type.

One or more optional parameters may be specified.  Use %26 in place of & in the value since & is the parameter separator.

Type

Path

Parameters

file

Filesystem path and filename for this static regular file. It is static in that it is not monitored for change; if a change occurs, an update is not sent to any listening apps. Upon reaching EOF, the listening app will receive EOF.

dfile

Filesystem path and filename for this dynamic regular file that may change. It is monitored for additional appended text (like a log file) or for replacement (new inode). It is not monitored for internal change. Upon reaching EOF, the listening app will not receive EOF since newly detected additional text will be relayed.

poll=seconds

Check every seconds to see if the file has changed. This is handy for monitoring log files.


dir

Filesystem path of the directory.  A directory can be queried for its files.  Files that do not have resource names may be accessed in this directory.

This is useful for filenames that change, such as logfile.1.

n/a

pipe

Filesystem path and filename for this pipe (Unix filesystem pipe/fifo).

n/a

socket

Filesystem path and filename for this socket (Unix socket).

n/a

ptty

Path ignored.

exec=cmd

Command to execute connected to the ptty

TERM=termtype

Specify the terminal type Curses should use to output to terminal.

uid=userid

The system uid to use when running the command.

hello=message

Display this banner before the first line of output from the executed command. Default: (blank)

bye=message

Display this banner when the executed command finishes. Default: Session terminated.

restart=T|F

If the executed command terminates, should it be restarted?  Default: F (no)

Be careful using this option if your process is prone to failing frequently - it will be restarted just as fast as it fails.

echo=T|F

Should text from the input source be echoed back to the input source, so it can be displayed there, e.g. a terminal.  Default: false.

Be careful using this option if your source echoes keystrokes from the user, then you'll have an infinite echo loop.

oecho=T|F

Should text from the application be echoed back to the application, so it can be displayed there if interactive. Default: false.

Be careful using this option if your application echoes keystrokes from the I/O resource, then you'll have an infinite echo loop.

icrlf=T|F

Should CR from the application be treated as LF (newline). If so, any CR received from the application will be translated to LF. Default: false.

ocrlf=T|F

Should CR from the USB device be treated as LF (newline). If so, any CR received from the device will be translated to LF. Default: false.


exec

Path ignored.

exec=cmd

Command to execute.

uid=userid

The system uid to use when running the command.

hello=message

Display this banner before the first line of output from the executed command. Default: (blank)

bye=message

Display this banner when the executed command finishes. Default: Session terminated.

restart=T|F

If the executed command terminates, should it be restarted?  Default: F (no)

Be careful using this option if your process is prone to failing frequently - it will be restarted just as fast as it fails.

echo=T|F

Should text from the input source be echoed back to the input source, so it can be displayed there, e.g. a terminal.  Default: false.

Be careful using this option if your source echoes keystrokes from the user, then you'll have an infinite echo loop.

oecho=T|F

Should text from the application be echoed back to the application, so it can be displayed there if interactive. Default: false.

Be careful using this option if your application echoes keystrokes from the I/O resource, then you'll have an infinite echo loop.

icrlf=T|F

Should CR from the application be treated as LF (newline). If so, any CR received from the application will be translated to LF. Default: false.


udp

The path takes the form address/port.

address

Host to query.  address is an IP address.

port

TCP port to query.


query=query Text to send to the UDP port to prompt the response.

tcp

The path takes the form address/port.

address

Host to query.  address is an IP address.

port

TCP port to query.


query=query

Text to send to the TCP port to prompt the response.


serial

Filesystem filename for this serial port under /dev, e.g. ttyS0.

baud=rate

Baud rate for the connection. Default: 19200. Options: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800.

bits=bits

Number of bits per byte transmitted. Default: 8.  Options: 5, 6, 7, 8.

stop=stopbits

Stop bits to use.  Default: 1.  Options: 1, 2.

parity=parity

Parity to use.  Default: 0. Options: 0, 1.

echo=T|F

Should text from the input source be echoed back to the input source, so it can be displayed there, e.g. a terminal.

Be careful using this option if your source echoes keystrokes from the user, then you'll have an infinite echo loop.

oecho=T|F

Should text from the application be echoed back to the application, so it can be displayed there if interactive. Default: false.

Be careful using this option if your application echoes keystrokes from the I/O resource, then you'll have an infinite echo loop.

icrlf=T|F

Should CR from the application be treated as LF (newline). If so, any CR received from the application will be translated to LF. Default: false.

ocrlf=T|F

Should CR from the USB device be treated as LF (newline). If so, any CR received from the device will be translated to LF. Default: false.


usb

Filesystem filename for this raw USB port under /dev, e.g. hiddev0.

echo=T|F

Should text from the input source be echoed back to the input source, so it can be displayed there, e.g. a terminal.  Default: false.

Be careful using this option if your source echoes keystrokes from the user, then you'll have an infinite echo loop.

oecho=T|F

Should text from the application be echoed back to the application, so it can be displayed there if interactive. Default: false.

Be careful using this option if your application echoes keystrokes from the I/O resource, then you'll have an infinite echo loop.

icrlf=T|F

Should CR from the application be treated as LF (newline). If so, any CR received from the application will be translated to LF. Default: false.

ocrlf=T|F

Should CR from the USB device be treated as LF (newline). If so, any CR received from the device will be translated to LF. Default: false.


http

Base URL to query with spoke name prefixed. For example:  http://spoke//server/path or http:////server/path for root.

Parameters are per URL convention, but any parameters that start with $ will be used as headers instead, e.g. $AuthToken=SeCrEt becomes the header AuthToken: SeCrEt.

https

Base URL to query with spoke name prefixed. For example:  http://spoke//server/path or http:////server/path for root.

Parameters are per URL convention, but any parameters that start with $ will be used as headers instead, e.g. $AuthToken=SeCrEt becomes the header AuthToken: SeCrEt.


See Also

iogw, IORegistry database table