22
CONTENTS
7
Scripting
On its own, a power switch isn't very smart. Programmers can easily add custom functionality by using the built-in
Lua-based scripting language in power controllers.
7.1
Hardware requirements
Lua-based scripting is available in all LPC9 controllers. Beeper, backlight, LCD, voltage and current monitoring
functions are limited to products with appropriate hardware installed.
7.2
Configuration
The scripting server has the following configurable parameters:
Scripting settings
Script step delay
1
seconds.
User message force display
timeout
0
seconds.
User message timeout
seconds.
Start on reboot at
Trace script
Submit
[Disabled]
User script configuration
• Script step delay — the time in seconds to wait after execution of a legacy API function (e.g. ON, OFF, see
below). Modern API functions (see below) don't have internal delays unless documented; the
delay()
function should be used there.
• User message timeout — the time in seconds after which user messages (displayed e.g. with the DISPLAY
command) disappear even if no keys are pressed on the LCD and no changes have been made to the outlet
state (leave empty to have the messages displayed indefinitely).
• User message force display timeout — the time in seconds during which user messages are displayed even
despite keys being pressed on the LCD or changes to the outlet state (leave empty to have the messages
forcefully displayed indefinitely).
• Start on reboot at — the scripting function to start at cold boot.
• Trace script — enable diagnostic output about script progress to system log.
DLI LPC9 User’s Guide: 1.7.24.0
Содержание LPC9
Страница 1: ...DLI LPC9 User s Guide 1 7 24 0 ...
Страница 81: ......