TeleBoss 850 2.06.280_STD User Manual
Page 154
Scripting
Scripting provides the ability to easily customize the operation of an Asentria device. Scripts are written in the Lua
scripting language, with access to Asentria-specific functionality via a rich set of library functions. Scripts can read or
change any setting on the unit, and can also create custom settings that can be accessed via Setting Keys. Scripting
capabilities open up all sorts of possibilities that would previously require custom factory programming.
This chapter covers the configuration and management of scripts in the Asentria T850, and assumes a level of
scripting knowledge that may not be applicable to all T850 users who wish to use scripting. For a basic primer in
scripting in the T850, titled “Scripting 101”, please contact
to have this document emailed to
you.
Configuration
General -
the steps for using a script are:
● Write the script code in a text editor.
● Transfer the script to the unit.
● Configure the script (can be done any time before running the script).
● Invoke the script (if not scheduled to start automatically).
● The details of these steps are given in later sections.
Requirements and Limitations
Scripts can be created in any text editor as long as they are saved in pure text format. Both DOS and Unix end-of
lines are supported.
A maximum of 20 scripts can be used on the unit. This includes both scripts that are loaded and scripts that are
running.
Running Scripts
Before a script can be run, it must be transferred to the unit and then configured. Simply putting the script file on
the unit will not allow it to be run.
Getting the Script Onto the Unit
The
SCRIPT GET
command can be used to transfer a script to the unit via XMODEM, YMODEM,
ZMODEM, or TFTP or via an SK set operation. There is also a Setup menu item for this. A simple script
could be created directly on the unit using the
SCRIPT EDIT
command or the equivalent Setup menu item.
Script Configuration
A script must be configured to tell the unit when the script should run, and provide any parameters required
by the script. Scripts are configured via the settings described in a following section.
Script Management
In addition to scripting settings, scripts are managed via a group of commands that are available in any command
processor. Here is a list of the commands with a brief description:
………………………………… Display list of script commands.
…………………………………… Display a list of configured scripts.
………………………………… <script> [<args>...] Start a script.
………………………………. <script> Display detailed status of a script.
………………………………….. <script> Stop a running script.
………………….Show/clear pending script records.
……………………………… Show script device allocations.
……………………………… <file> [<args>...] Transfer script file to/from the unit.
………………………………. <file> Delete a script file.
…………………………………… <file> Edit a script file (using VI editor).
…………………………………….. List script file directory.
…………………………………. <file> Display script file.
……………………………………<script> Enter interactive script interpreter.
Summary of Contents for Teleboss 850
Page 6: ......