create_server()

Creates a handle to a server process that can be controlled through AEL. If the server process is not currently running, the server process is spawned automatically when it is sent a message. That is, you do not need to invoke the server process explicitly, but can simply start sending commands and data to it through AEL and you can be assured the process will be up and running. The server process receives commands and data and returns information through AEL.

Typically the server program is an EEsof program that communicates dynamically through a special message protocol, but it can be an ordinary program communicating using stdin and stdout. For non-EEsof programs, every data message sent to the server is received by the program as a line to stdin and every line printed to stdout by the program is returned as a data message. Returns the handle of the server.

See also: send_server_command(), send_server_data(), send_server_interrupt(), send_server_kill(), start_server(), push_message_handler(), pop_message_handler().

Syntax:

create_server( name, label, hostMachine [, params, nonEmx, paramAelFunc, createUnique, fReinstate]);

where

name is the name of the server program.

label is the description of program.

hostMachine is the name of host machine.

params is optional; the parameter string to be passed to program when spawned.

nonEmx is optional; the flag indicating whether server will be non-EEsof program, which cannot take advantage of special communications protocol, where:

  • 0 = (default) for EEsof programs
  • 1 = non-EEsof program

paramAelFunc is optional; the name of an AEL function which can be used to generate information to be passed to server when it is spawned. The name of the AEL function is provided as a string (enclosed in quotes). The function will be passed the original parameter string, and should return a new parameter string.

createUnique is optional; the flag indicating that more than 1 server process with the same name can be invoked: 0 = (default) for returning existing server with the same name, and 1 = create another server process even if one with the same name is already running
fReinstate is optional; the flag indicating whether to notify other processes that a new server process has been invoked, where:

  • 0 = (default) Invoke a new server process and do not notify the other processes in the session
  • 1 = Invoke a new server process and notify other processes in the session

If the server process was spawned previously, but has died since, the reinstate flag indicates whether or not other processes in the session get notified of the newly-spawned server process. Notification ensures that the newly-spawned server will be able to communicate with these processes.

Example:

decl surHandle=create_server("myserver", "MyServerProcess", "");

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources