Lua Scripting

inmation’s entire concept of customizing the system is based on the Lua scripting language. Lua (from the Portuguese lua, meaning moon) is a lightweight multi-paradigm programming language designed as a scripting language with extensible semantics as a primary goal. system:inmation supports Lua version 5.3. For more information about this version and for links to other resources visit the Lua website. As Lua is an open standard, there is a huge amount of support and documentation available online and plenty of reference books available.

Lua Scripting in inmation

Lua Support in system:inmation

In order to preserve the real-time mass data processing character of system:inmation, only a subset of the entire functional scope of Lua is fully supported. Lua script bodies in the system are executed in a fast and efficient manner and therefore blocking code or extensive output would undermine consistency with respect to that. The system supports all logical and mathematical constructs to build real-time, event-driven online models which can channel result data back into the system (and also into external systems). With the Lua API, the system provides a library of functions specific to the product, enabling your Lua scripts to access objects and properties in any of the available model panels. With this simple set of Lua feature extensions you are able to build real-time models (and event-driven models) of any complexity. A custom model in the system can be thought of as a combination of user-defined objects executing user-defined code which can be bound to variables managed by the system. Application logic which you can express in code can interact with the system model, thus creating any extensions to the ‘real’ I/O model.

In what follows, we will frequently use the term inmation object. This refers to a Lua table object which is a result of the functions syslib.createobject or syslib.getobject.