Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

defineDataServer [-device string] [-server string] [-undefine]

defineDataServer is undoable, NOT queryable, and NOT editable.

Connects to the specified data servername, creating a named device which then can be attached to device handlers.

When the device is defined, it queries queries the server for data axis information. The "CapChannels" present are represented as axis in form "channelName"."usage" for scalar channels and "channelName"."component" for compound channels. See listInputDeviceAxes to list axis names.

Note that undoing

defineDataServer -d "myDevice" -s "myServer"
does not break the connection with the data server until it cannot be redone. Executing any other command (sphere for example) will cause this to occur. Similarly, the command
defineDataServer -d "myDevice" -u
does not break the connection with the data server until it cannot be undone. Either flushUndo, or the 'defineDataServer' command falling" off the end of the undo queue causes this to occur, and the connection. to be broken.

No return value.

Return value

None

Related

applyTake, defineVirtualDevice, enableDevice, filter, movIn, movOut, readTake, recordDevice, writeTake

Flags

device, server, undefine
Long name (short name) Argument types Properties
-device(-d) string create
specified the device name to be given to the server connection. device name must be unique or the command fails.
-server(-s) string create
specifies the name of the server with which the define device connects, and can be specifiied in two ways
name -- the name of the server socket
Server names of the form name connect to the server socket on the localhost corresponding to name. If name does not begin with "/", then /tmp/name is used. This is the default behavior of most servers. If name begins with "/", name denotes the full path to the socket.
host:service - a udp service on the specified host.
The service can be any one of a "udp service name," a "port number," or a named service of "tcpmux," and they are found in that order. If host is omitted, the localhost is used.

In any case, if the server cannot be found, the device is not defined (created) and the command fails.

-undefine(-u) create
undefines (destroys) the dataServer device, closing the connection with the server.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

defineDataServer -s "ultratrak_server" -d "melvin";

// Connects to the ultratrak_server running on the localhost and gives it
// the name "melvin"

defineDataServer -s "mocap_lab:5200" -d "labFlock";

// Creates a device called "labFlock" which connects to the server running
// on host "mocap_lab" at port "5200".

defineDataServer -undefine -d "labFlock";

// Delete the device "labFlock" closing the connection with the server
// specified when it was created.