[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: X10 scripting in HAL
More questions coming up...
1) Is there a possibility to pass multiple parameters to a triggered sub ?
Here is a piece of the code:
Const MAXVERIFYTRIES = 2
Const WAITFORRETRYSECS = 15
'sort of recursion: event added in the procedure points to itself
sub VerifySuccessState(device, state, trycount)
if x10.attrib(device,X10_STATE) <> state then
if trycount < MAXVERIFYTRIES then 'try again
call SendX10(device, state)
trycount = trycount + 1
call sys.singleevent(DateAdd("s", WAITFORRETRYSECS,Now),
_ "VerifySuccessState", "X_X_X",
"VerifyState")
else 'too many tries, no success
Call LogIt(device & " not set to state " & state &
" after " &
trycount & " tries",2)
end if
else 'success!
if trycount>0 then 'but had retries
Call LogIt(device & " set to state " & state & "
after " &
trycount & " tries", 1)
end if
end if
end sub
What do I replace "X_X_X" with ??
2) What is the granularity of time the scheduler handles ? Can I set
the execution time to something like now + 15 secs ?
Thanks,
Tom
(btw, HAL is cool :-)
xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe: ukha_xpl-subscribe@xxxxxxx
To Unsubscribe: ukha_xpl-unsubscribe@xxxxxxx
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|