VED commands

syntax is: VEDproc command arguments
VEDproc is normally defined as "ved_<vedname>" but can be renamed as usual
caplist [proc | trigg]
lists the procedures which can be used as "command*" arguments, the "trigg" option lists the trigger procedures.
close
closes the connection to the VED. The VED will also be closed by renaming the procedure name to an emty string or remaming another procedure to the name of the VED procedure. IS commands associated with the VED are invalid after closing the VED.
closecommand {<TCL script>}
defines additional actions to perform when closing the connection to the VED, returns the previous script. An empty script will delete the previous script.
%n in the <TCL script> is replaced by the real name of the VED, %c is replaced by the procedure name of the VED.
command {<procedure1> {<arguments>} [<procedure2> {<arguments>} ...]}
executes a sequence of procedures.
command1 {<procedure> {<arguments>}}
executes one procedure.
confmode [asynchron | synchron]
sets confirmation mode to "asynchron" (confimation is returned later) or "synchron" (commands block until the confimation is received or a timeout occured), returns the previous status.
NOTE: actually doesn't work without argument
datain
create <datain index> <buffertype addresstype address>|<buffer address>
creates the data input channel specified by the integer number <datain index>
delete <datain index>
deletes the data input channel
upload <datain index>
returnes information about the data input channel
dataout
create <dataout index> <buffertype buffersize priority addresstype address>|<buffer address>
creates the data output channel specified by the integer number <dataout index>
delete <dataout index>
deletes the data output channel
enable <dataout index>
enables the data output channel
status <dataout index> {0 | 1}
returns the status of the data output channel, more information if the last argument is different from 0.
upload <dataout index>
returnes information about the data output channel
wind <dataout index> <offset>
only available for tape dataouts.
offset=0: writes a filemark
-2000<offset<2000: winds the tape <offset> files
-2000: rewinds the tape
2000: winds to end of data
write <dataout index> <list of strings>
writes the list of strings as a special record/cluster to the data output channel.
writefile <dataout index> <filename>
writes the content of <filename> as a special record/cluster to the data output channel.
event [<maximum number>]
returns one event, the size of a subevent is restricted to <maximum number> if it is specified.
flush [<timeout> [<list of transaction ids>]]
blocks until all outstanding confirmatios or all confirmations with the listed transaction ids for the VED are received or the timeout set with the timeout argument occures. Returns the number of outstanding confirmations.
identify [0 | 1 | 2]
returns information about the server.
0: three numbers: VED version (==4), version of table of ems requests (==2), version of table of unsolicited messages (==1)
1: like '0', in addition: server name and compilation date
2: like '1', in addition: all the definitions in effect at compilation time
initiate <id>
historical, now useless
is
create <IS index> <IS identification>
creates an instrumentation system with index <IS index> and assigns <IS identification> to it, returns the name of the procedure generated to be used to communicate with the IS. It leads to an error if the IS already exists.
delete <IS index>
deletes the instrumentation system <IS index>
exists <IS index>
returns '1' if the instrumentation system <IS index> exists, otherwise '0'.
id <IS index>
returns the <IS identification> of the instrumentation system <IS index>.
list
returns a list of indices of the defined instrumentation systems.
open <IS index> [<IS identification>]
returns the name of the procedure generated to be used to communicate with the IS. If <IS identification> is given the command is similar to the above 'create' command. Without <IS identification> the behaviour depend on whether or not the instrumentation systems is existing: for an existing IS a new procedure name is returned, a non-existing IS leads to an error.
lam
create <idx> <id> <IS index> {mystic arguments}
declares a LAM with index <idx>, identifier <id> for the instrumentation system <IS index>. A procedurelist have to be assigned later with the command lamproclist.
delete <LAM index>
deletes the lam <LAM index>.
reset <LAM index>
disable execution of the assoziated procedure list.
resume <LAM index>
reenables execution of the procedurelist after stop..
start <LAM index>
enables execution of the assoziated procedure list.
status <LAM index>
returns the status of the lam <LAM index>.
stop <LAM index>
stops (tomporarily)execution of the assoziated procedurelist.
lamproclist
create <LAM index> 0|1 {procedurelist}
creates a procedure list to be executed when LAM <LAM index> is activated, if the second argument is different from '0' the output of the procedurelist will be sent as unsolicited message.
delete <LAM index>
deletes the procedure list assigned to the LAM <LAM index>.
upload <LAM index>
returns all information about the procedure list assigned to the LAM <LAM index>.
modullist
create {<address1> <type1> [<address1> <type1> ...] } {{<bus type> <module id> <slot> <crate id>} [{<bus type> <module id> <slot> <crate id>} ...] }
creates a module list where each module is specified by a {address type} pair. {<bus type> <module id> <slot> <crate id>} list.
The <crate id> is also referred to as <branch id>.
delete
deletes the module list.
upload
returns the list of modules as {address type} pairs. {<bus type> <module id> <slot> <crate id>} lists.
name
returns the VED name which was used with the ems_open command.
namelist
0
returns the list of implemented object types:
1: VED
2: Domain
3: Instrumentation System
4: Variable
5: Program Invocation
6: Dataout Object
1|ved
returns the list of existing VEDs
2|domain
0
returns the list of implemented domain types:
1: Modullist
2: LAMproclist
3: Trigger
4: Event
5: Datain
6: Dataout
1|ml
returns the list of existing modullists
2|lam
returns the list of existing LAM domains
3|trig
returns the list of existing Triggerdomains
4|event
returns the list of existing Event domains
5|di
returns the list of existing Datain domains
6|do
returns the list of existing Dataout domains
3|is
returns the list of existing instrumentation systems
4|var
returns the list of existing EMS variables
5|pi
0
returns the list of implemented invocation types:
1: Readout
2: LAM
1|ro
returns the list of existing Readout objects
2|lam
returns the list of existing LAM objects
6|do
returns the list of existing dataout objects
openis
returns a list of the procedure names of all open instrumentation systems.
pending
returns the number of pending requests.
readout
reset
resets readout..
resume
resumes a stopped readout.
start
starts readout.
status
returns the status of the readout (status event_number).
stop
stops readout, i.e. halts it but doesn't reset it.
reset
resets VED. If there is a readout running the readout must be reset first.
status
historical; useless.
trigger
create <trigger procedure and arguments>
defines the trigger procedure.
delete
deletes the defined trigger procedure..
upload
returns name and arguments of the trigger procedure.
typedunsol <type> [{<TCL script>}]
defines the action to be performed when receiving an unsolicited message of one of the types applicable with the ems_unsolcommand command, returns the previous definition.
NOTE: specifying a wrong type leads to a core dump !!!
unsol [{<TCL script>}]
defines the action to be performed when receiving an unsolicited message, returns the previous definition.
var
create <index> [<size>]
defines an EMS variable.
delete <index>
deletes an EMS variable
read <index> [<first> [<num>]]
reads an EMS variable.
size <index>
returns the size of an EMS variable.
write <index> data ...
writes an EMS variable.
version_separator
defines the version separator for local procedures. Don't use it.