Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: servers.create - Function Up: servers - Tool Previous: servers - Tool


servers.activate - Function



Package utility
Module tasking
Tool servers


Create a new server


Synopsis
activate(server, host, forcenewserver, async, terminateonempty)


Description

The activate function creates a new server of the specified type, if necessary. A server is an executable piece of code that has been written to communicate with glish. This function will start the specified process on the specified computer or, by default, on the current computer ie., the one running glish.

This function will only create new server process if one is not already running on the specified computer. However this can be overridden.

This function returns a positive integer that can be used by other functions in this tool indicate which server process you are referring to.

Normally servers are terminated when empty ie., contains no tools. One can override this using the terminateonempty flag. Use this only for servers that are likely to be restarted soon to avoid the overhead for reloading the executable.



Arguments

server   The name of the server to create
    Allowed: a string
    Default: no default
host   The name of the computer on which to start the server
    Allowed: any computer name
    Default: an empty string
forcenewserver   Start a new server even if one is running
    Allowed: T or F
    Default: F
async   Start the server asynchronously
    Allowed: T or F
    Default: F
terminateonempty   Terminate servers when empty
    Allowed: Boolean
    Default: T


Returns
A positive integer


Example
      include 'servers.g';
      private := [=];
      private.serverid := defaultservers.activate('numerics');
      private.toolid := defaultservers.create(private.serverid, 'fftserver');
This will start up the numerics process on the current machine. It then creates a fftserver tool, using the default constructor, that uses this server. See also the example for the create function.



next up previous contents index
Next: servers.create - Function Up: servers - Tool Previous: servers - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15