View Single Post
Old March 15th, 2013   #6
Join Date: Feb 2006
Posts: 421
Send a message via AIM to sblair Send a message via MSN to sblair

When the controller requests QUEUED_MESSAGES from the device if there are no queued messages to report, the device can then respond back with STATUS_MESSAGES.

In my implementations I would add the error condition to my status messages queue to report back. I keep seperate queues for status messages vs. queued messages.

Since it is a status message I would not increment the queued message count field. When the controller requests QUEUED_MESSAGES then you can report the status message back providing there are no queued messages indicated as pending.

Some controllers may also use the STATUS_MESSAGES PID directly to request status messages rather than relying completely on QUEUED_MESSAGES PID as the delivery. That can be useful if the responder is "chatty" with it's use of queued messages.

If you have an error condition that is important to get back, I would suggest internally prioritizing your use of queued messages so the status message is not always sitting at the back of the bus. In other words queue important messages, but you may choose not to queue up or delay queueing less significant messages until the status message has been delivered.

There are different ways it can be implemented, but this is how I would personally implement it myself.
Scott M. Blair
RDM Protocol Forums Admin
sblair is offline   Reply With Quote