NAME
rpc_unit -- create remote NST-unit
PROTOTYPE
unitptr rpc_unit( CLIENT *cl, int type, int ac, char **av, unitptr dest)
ARGUMENTS
- CLIENT *cl
- rpc handle to server
- int type
- int type specifier of unit to make
- int ac
- number of parameters transmitted
- char **av
- array of pointers to the parameters themselves
- unitptr dest
- host unit of local `handle''
DESCRIPTION:
This routine dispatches a request to server cl to create a NST-unit
of type type (an int type id) on the server side. Successful
operation requires that the NST-remote unit daemon nstrd is running
on the server side.
Arguments
(ac,av) are passed as parameters to the creation routine on the server side.
If creation of the remote unit was successful, a `handle'' for the remote
unit will be created on the client side in the form of
a NST-unit with the same interface as the remotely created unit.
The handle will be created as a subunit of dest and its pins will be
initialized to the pin values of the remote unit.
SPECIAL CASE:
For type==RPC_UTYPE_NEO, ac[0] is assumed to contain a description of
an neo-icon unit that will be built on the server side. The description
must use the description format recognized by Neo to read NST-circuit
descriptions from *.NST files.
EXECUTION:
Execution of the handle unit issues an rpc-call to the remote unit
that 1. transports the current values at the input pins of the handle
to the remote unit, 2. executes the remote unit and 3. backtransports
the result values to the client handle unit.
The set of transported values can be restricted to the subset of
connected pins.
ADAPTATION:
Analogous to execution.
LOAD AND SAVE:
A save_unit of the local handle unit saves a header containing some
info about the status of the local handle unit, followed by the
complete save data of the remote unit (enclosed between a pair
of delimiter strings). [Implementation: remote unit is saved
to remote tmp file, then file data is transferred to client and
inserted in the save file there]. Likewise, a load_unit
of the handle unit reads its save file, uses the header to init
the handle unit, and sends the remaining data part (between the
delimiter strings) to the remote host were it is used as load file
for the remote unit.
CTRL_UNIT:
All control calls are transmitted unchanged to the remote unit.
Exceptions:
NST_RPC_TRSP_I_CON transport only values of handle input pins
that are connected to some other pins
NST_RPC_TRSP_I_CON1 transport all input pins, except
uncontacted vector input pins
NST_RPC_TRSP_I_ALL transport all input pins
NST_RPC_TRSP_I_CON analogous transport
NST_RPC_TRSP_I_CON1 modes for
NST_RPC_TRSP_I_ALL output pins
These are ALSO transmitted to the remote unit, so that rpc_units on
the server side will also be affected accordingly.
REMOVE_UNIT:
Removal of the handle unit will also remove the remote unit on the
server side.
SEE ALSO:
nst_rpc
FILE
/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../nstsrc/nst_rpc.c