Suggestions (#3) - Timeout handling (#57) - Message List

Timeout handling
 unsolved

I used to use the callback functionality in libcwiid to get update messages but switched to cwiid_get_state because that way I can implement a purely object-oriented wrapper around libcwiid (without a need for C-like callback functions).

However, with callbacks I could keep track of the time that elapsed since data arrived from the Wiimote and decide to disconnect if no data arrived in X seconds. With cwiid_get_state this does not work anymore.

Could you add functionality that either allows to request for the time stamp when information was received from the Wiimote for the last time or that or functionality that lets cwiid_get_state return a non-zero value if no data has been received in a specified amount of time?

Thanks! -Jonas

  • Message #24284

    Yeah, that's an oversight on my part. I'll do it, but it's probably going to be the first of the year before I can get back to CWiid. Any other takers?

    • Message #24285

      That's probably a bit over my head.

      • Message #24286

        It really shouldn't be too bad. I'm thinking just put a timestamp in the state vector, and update it whenever new state comes in.

Attachments

No attachments created.