Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/chips/ahelp/connect.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 ChIPS v1

connect

Context: server

Synopsis

Attaches a ChIPS client to the specified server.

Syntax

connect()
connect(server_id)

Description

The function arguments.

Argument Description
server_id The id of the ChIPS server to query as a string.

The connect command is used to attach a ChIPS client to a ChIPS server process. When a ChIPS command is invoked which requires the server (almost all commands require the server), a ChIPS server is automatically launched. Users can connect to an existing server in order to modify the ChIPS from a different application. For example, a user may create a plot from the CIAO GUI Prism, then connect to the server from an xterm and continue working in that ChIPS session.

The user may specify a server id to connect to a specific server which is running. A list of existing servers can be determined by the list_servers command. If no server id is supplied, then ChIPS will attempt to connect to an existing server. This will fail if multiple servers are running on the system.

If the ChIPS session is already attached to a server (either through a connect call or by creating plots) and the user issues a connect command, ChIPS automatically disconnects from the current server. Note that if that server only has one ChIPS session attached to it, disconnecting from it causes it to close and any work done during the session is discarded.

Example 1

chips> print(get_server_id())
ChipsServer_6979_1
chips> print(list_servers())
['ChipsServer_6979_1', 'ChipsServer_20997_1']
chips> connect("ChipsServer_20997_1")

The client is initially connected to the server with id "ChipsServer_6979_1". The connect request reconnect ChIPS with a new server.

Example 2

chips> print(get_server_id() == "")
True
chips> print(list_servers())
['ChipsServer_5643_1']
chips> connect()

The client is initially not connected to any server. There is another server running. The connect command automatically attaches itself to the server that is running.

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

server
check_server_exists, create_server, disconnect, get_server_cwd, get_server_id, list_servers, lock, unlock

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.