6
Arguments of the list command are optional. If no arguments are provided, all scripts will be
listed without details. Use the
–l
option to show the details of the scripts. Details include the
file size, date, the system/user designation and a run/idle status indication. The
–r
option shows
only those scripts that are currently running. Both options may be included in a single
list
command. If the optional
[script]
argument is passed only scripts of the specified name will
be listed.
In the output of the
list
command, each script listing is terminated with a “new line” character
(‘\n’ or 0xA). The entire list is terminated with a carriage return (‘\r’ or 0xD).
2.1.5
Read
The
read
command will return the source code of the specified script via the interface from
which the command was sent. For example, if in the scripting socket interface you type
read
myscript.lua
the source code of
myscript.lua
will appear in the terminal window. If you
send the same command via the VXI-11 interface, the next VXI-11 read will return the source
code of the script. Note that the VXI-11 interface has a 16 kilobyte limit therefore any script
greater than 16 kilobytes will not be returned properly. An alternative to the
read
command is
the
retrieve
command detailed in section 2.1.7.
read <script>
2.1.6
Remove
The
remove
command will delete the specified script from both volatile and non-volatile
memory. A removed script is not recoverable therefore care must be taken to ensure a script is
saved on a host computer before sending the
remove
command.
remove <script>
2.1.7
Retrieve
The
retrieve
command is used to download a script from the EM405-8 to the host computer.
A download port must be specified.
retrieve [options] <script> <port>
options:
-d
delete the file upon retrieval
Upon receiving the
retrieve
command, the EM405-8 will search for the specified script and
return a 4-byte acknowledge (“ack\n” if found or “nck\n” if not found) via the same interface
from which the command was received. If the script was found, the EM405-8 will launch a
small TCP/IP server at the specified port. The host application must then connect to this server
to download the script. The TCP/IP server will automatically exit once the script has been
downloaded. Therefore, a new
retrieve
command must be used for each script to be
downloaded.