slowControlsPrompter

Name

slowControlsPrompter -- Prompt for slow controls server host and port

Synopsis

package require Tk package require usbcontrolclient

slowControlsPrompter path ?options? path update

DESCRIPTION

Provides a widget that allows users to select a slow controls server. The widget lists the set of servers registered on the selected host, allows a default port to be selected and also allows host and port to be simply typed in by the user. The path parameter on the constructor is a Tk widget path.

OPTIONS

-defaultport int

The value of this option is loaded into the port text entry when the Default Port button is clicked. If not configured, this defaults to 27000 which is also the default port used by the readout programs if the --port option is not specified for them.

-host string

Provides or gets the name or IP address of the host. The value of this option is loaded into the host entry. It is also the host queried for registereda applications in the event the Update button is clicked. If not configured, the default value is localhost

-port integer

Gets or sets the value in the port entry. If not configured or not set by the user or by double clicking an element in the list, this is defaulted to 27000

-type string

Specifies the type of server being queried. This should be one of VMUSBReaodut or CCUSBReadout.

-okcmd script

The script that is called at the global level when the Ok button is clicked. See SUBSTITUTIONS below for more information about how the script is started.

-cancelcmd script

The script that is called when the cancel button is clicked. See SUBSTITUTIONS below for more information about how this script is started.

METHODS

The widget supports the following public methods:

configureoptions...

Configures the options of an object. The options... are a set of parameter pairs. The first item of each pair is the option name and the second the value. For example, to configure the port to 1234:


path configure -port 1234
                    

Any number of options can be configured in a single method call. In the event the same option appears twice, the lexically later value is used.

cget option-name

Returns the current value of the specified configuration option-name.

update

Updates the contents of the listbox selector with the names of the controllers that are being served by readout programs that are using managed ports.

SUBSTITUTIONS

Callbacks specified by the -okcmd and -cancelcmd options are called at the global level. Any occurence of the string %W is replaced with the path of the widget doing the callback.