I am trying to write some agent code to send a command to an Imp. This is working. What I cannot work out how to do is to determine if the device.send() function has actually worked.
It may be that device.send() actually returns immediately, regardless of the status of the device itself, but I would love some clarification of this. Sure, I can use device.isconnected(), but that does not cover the situation where things fail after I have issued the device.isconnected() function.
If there is presently no way to determine this, that is fine, but it would be great to know this so I can work around it
There isn’t anything more elegant at this point; different users have different requirements here so we thought it was best to leave this to the application.
Bullwinkle is aimed at extending the agent/device communication mechanism to make it easier to do things like make sure messages are acked (which happens in the background automagically with this class), and “reply” to messages that you receive.
The example folder has code for a simple model that demonstrates some of the functionality, and the README.md explains very simple usage.
Feel free to shoot me any questions you might have
Taking this a bit further. From the agent, if I do a device.send()
am I guaranteed to either get: delivery of the message to the Imp device.disconnect();
Put another way, does a Timeout generate a disconnect. I can imagine it might, but I have not been able to find this documented