I've been trying to write the module to control my
Cbus lighting system. The control is pretty easy, just open a socket to the Cbus
server, send a command and wait for a response.
But I've hit a little snag with the 'waiting for a
response' bit. To get the status of a light I'm using a bit of code
while( ! ($data =
This caused MisterHouse to lock up because I stoped
the main loopy bit from executing.
Is there anyway of nicely handling this sort
I don't want to return execution to the calling
routine before the response with the status arrives on the socket, after all
that is what the calling routine wanted made the call for.
The only way I can see around this is
to call the
'check_for_socket_data' inside my while loop, which doesn't seem a very nice
method of solving the problem.