Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
livebox:hah_plugboard_v2 [2014/01/03 02:31] – [BSC] brett | livebox:hah_plugboard_v2 [2015/01/20 00:37] (current) – [BSC] Explain input/output direction values. brett | ||
---|---|---|---|
Line 167: | Line 167: | ||
^^ **Return Type** ^^ **Method** ^^ **Description** ^^ | ^^ **Return Type** ^^ **Method** ^^ **Description** ^^ | ||
|| Filter || xap.Filter(filter) || Constructor || | || Filter || xap.Filter(filter) || Constructor || | ||
+ | || void || < | ||
|| void || < | || void || < | ||
+ | || void || < | ||
|| void || < | || void || < | ||
Line 256: | Line 258: | ||
<code lua> | <code lua> | ||
+ | require " | ||
elapsed = 0 | elapsed = 0 | ||
- | function tick(self) | + | function tick(self, userdata) |
elapsed = elapsed + self.interval | elapsed = elapsed + self.interval | ||
print(" | print(" | ||
if elapsed > 10 then | if elapsed > 10 then | ||
- | print(self.userdata) | + | print(userdata) |
self:stop() | self:stop() | ||
end | end | ||
Line 268: | Line 271: | ||
xap.Timer(tick, | xap.Timer(tick, | ||
+ | xap.process() | ||
</ | </ | ||
Line 389: | Line 393: | ||
**instance**: | **instance**: | ||
- | **direction**: | + | **direction**: |
**type**: BSC supports 3 endpoint types: bsc.STREAM, bsc.LEVEL and bsc.BINARY | **type**: BSC supports 3 endpoint types: bsc.STREAM, bsc.LEVEL and bsc.BINARY | ||
Line 555: | Line 559: | ||
The **init()** function will be invoked when the applet is loaded by the plugboard.lua script. | The **init()** function will be invoked when the applet is loaded by the plugboard.lua script. | ||
- | To be automatically loaded they must be placed in the / | + | **To be automatically loaded they must be placed in the / |
* hbeatWatchdogApplet.lua | * hbeatWatchdogApplet.lua | ||
* bindRelaysApplet.lua | * bindRelaysApplet.lua |