User Tools

Site Tools


doc:lua:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:lua:start [2011/06/04 20:13] admindoc:lua:start [2014/03/02 07:24] (current) – removed admin
Line 1: Line 1:
-====== Make your own Lua Scripts ====== 
- FIXME under construction 
  
- 
-===== What is Lua? ===== 
- 
-Simply said, [[http://www.lua.org|Lua]] is "something" (a so called script interpreter) which is made to allow a program to run another program internally. The trick in that is, that the internal program does not need to be there when the "outer" program is made, it can be loaded later, just when you need it. 
- 
- 
-This allows to make a program now but change its behavior later as needed. This is widely used in the OOBD script engine: The script engine is there from the beginning, but what it does is defined by the script which is loaded at runtime. Another script, another functionality.. 
- 
- 
-Luckely Lua became quite popular in the last years, so it's available for all major platforms, like Desktop PCs, Smartphone and Mobile Phones. 
- 
- 
-There are tons of documentation about Lua available in the internet, so we'll not explain the wheel here once more, we'll just focus on how Lua works inside OOBD. 
- 
- 
-===== The Lua - OOBD Interface ===== 
- 
-If Lua runs inside another program, without further assistance it does it like in a black box: No connection from the inside to the outside, no inputs, no feedbacks. This is obviously not very senseful, so when Lua is implemented into another program, there a normally some interfaces made up to let Lua and its host communicate to each other. 
- 
- 
-From the Lua perspective, these interfaces look like normal Lua function calls, but when such a function is called, the execution branches into the outer program, does something there and finally returns from that function back to Lua. 
- 
-In the moment the OOBD interface supports two kinds of interfaces for Lua: Some for creating the menus, and some to talk to the serial line (( this is certainly subject to change in the future, when OOBD becomes more generic and the data links become more abstract)) 
- 
- 
-[[make|Compile your Scripts]] 
doc/lua/start.1307211180.txt.gz · Last modified: 2011/06/04 20:13 (external edit)