From: Lieven H. <li...@li...> - 2012-12-22 20:58:01
|
Hi Neil, Op 22-dec.-2012, om 21:44 heeft Neil Cherry <nc...@li...> het volgende geschreven: > Hi Guys, I'm working on a new driver and I have a question on polling the interface and > timeouts. Does anyone know of a good way to timeout the interface (abort) when polling? Did you already have a look at the xpl-perl framework from Mark Hindess (https://github.com/beanz/xpl-perl/). Has a very nice way to provide an xPL interface to any type of device (serial, network, …). And MH automatically speaks xPL. Might be a way to go (I did it like that for controlling RF-enabled mains plugs). The cool thing of going the xPL way is that the device interface is completely independent from the MH code. So no issues with blocking the event loop in MH when you're waiting for a device to respond. Kind regards, Lieven. |