EMS commands
ems_connect
<socket> | <host port>
-
connects to a commu either through a unix-socket (e.g. "/var/tmp/emscomm") or
through a TCP/IP socket (e.g. "zel407 4096"), returns nothing.
ems_disconnect
-
disconnects from a commu and all open VEDs. Procedurenames for VEDs and ISs
are no longer valid.
ems_connected
-
returns "1" if a connection to a commu exists, otherwise "0".
ems_connection
-
returns the parameters of the actual connection to a commu.
ems_open
<VED>
-
opens a VED, returns the name of the procedure
generated to be used to communicate with the VED. The generated procedure can
be renamed like any other TCL procedure. Renaming to the empty string destroys
the procedure and closes the connection to the VED.
see also: <VED> close
ems_veds
-
returns the names of the VED which are reachable through the current commu.
ems_openveds
-
reports open VEDs by returning a list of their actual procedure names.
Hint: A command like foreach i [ems_openveds] {$i close}
closes
all open VEDs.
ems_unsolcommand
<type> {<TCL script>}
-
defines the action to be performed when receiving an unsolicited message from
commu. All types of unsolicited messages (Nichts, ServerDisconnect, Bye, Test,
LAM, LogText, LogMessage, RuntimeError, Data, Text, Warning, Patience,
StatusChanged, ActionCompleted) or any integer number are recognized but
actually the commu will only send of one ServerDisconnect, Bye or Log*.
The previous definition is returned.
Invocation without <TCL script> or an empty <TCL script> deletes
the previous definition.
%h, %d and %v in the <TCL script> are replaced by the message header,
message data and (in the case of ServerDisconnect) by the name of the VED
procedure.
ems_confmode
[asynchron | synchron]
-
sets the default confirmation mode to "asynchron" (confirmation is returned
later) or "synchron" (the command blocks until the confirmation is received or
a timeout occurs).
Returns the previous status.
Only VEDs opened after this call will inherit the mode set.
ems_pending
-
returns the number of pending (unconfirmed) requests.
ems_flush
<timeout>
-
blocks until all outstanding confirmatios are received or the time set with
the timeout argument occurs. Returns the number of further outstanding
confirmations.
ems_timeout
<time>
-
sets the time in seconds after which for a confirmation of a pending request
is no longer waited for. There is no information available whether the request
is not handled by the server (normally server crash) or only the confirmation
is lost (network timeout).
Returns the previous value.