GobySoft / goby

The Goby Underwater Autonomy Project
Other
26 stars 11 forks source link

Added contents of triggering message to signal_queue_size_change #46

Open tsaubergine opened 5 years ago

tsaubergine commented 5 years ago

Add the DCCL message that triggers the queue size change, if one exists. For a shrinking queue this is the message that was just popped, for a growing queue this is the message that was just pushed.

Rather than modify the signature of signal_queue_size_changed, I added this as an additional optional field to the QueueSize message.

@glgrobe Could you please review and see if this fits your needs.

This block of the Queue3 unit test shows how to extract the encoded message: https://github.com/GobySoft/goby/compare/2.1-queue-size-add-encoded-message?expand=1#diff-0846765b1bb6e76a7fed8bdf73a334e9R203