diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/xml/example2.xml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/server/xml/example2.xml b/server/xml/example2.xml index 4f2c790..0bfee27 100644 --- a/server/xml/example2.xml +++ b/server/xml/example2.xml @@ -4,20 +4,22 @@ <macro name="example1" version="1.0" resume="${linse1}${linse2}"> <queries> - <query device_id="lensmeter" device_type="lensmeter" class="lensmeter" ttl="10000"/> + <query class="lensmeter" ttl="10000" automap="true"/> </queries> <maps> <map name="axis"> -- LUA program return math.pi, 1234567890 </map> - <map name="sphere"> + <map name="right.axis" uses="lensmeter, lensmeter.right.axis"> -- LUA program - return right.sphere.value, right.sphere.timestamp + right_axis = 0 + if( lensmeter.right.axis ) right_axis = lensmeter.right.axis.value + return right_axis, lensmeter.right.sphere.timestamp </map> <map name="cyl"> -- LUA program - return right.cyl.value, right.cyl.timestamp + return lensmeter.right.cyl.value, lensmeter.right.cyl.timestamp </map> </maps> <window name="mainwindow" @@ -28,7 +30,11 @@ <frame name="linse_frame" caption="Linser:" layout="vbox"> <frame name="linse_framea" layout="hbox"> <label name="a" width="300" caption="Akse rotation:"/> - <lineedit name="linse4" regexp="-{0,1}[0-9]{1,3}" map="axis2" value="90K"/> + <lineedit name="linse4" + regexp="[24]*" + map="axis" + lua_validator="if( tonumber(value) == 42 ) then return 'true' else return 'false' end" + value="90K"/> </frame> <frame name="linse_frameb" layout="hbox"> <label name="b" width="300" caption="Sphere:"/> |