waggle-sensor / wagman

The Waggle Manager (Wagman), a custom circuit board and control system for Wild Waggle Nodes
1 stars 3 forks source link

Add command acknowledgments for each part of the communication pipeline. #28

Closed seanshahkarami closed 7 years ago

seanshahkarami commented 7 years ago

After revisiting this, I remembered that in the driver-to-wagman part of the communications, I'd designed a message delimiting structure for message exchange.

This already adds an acknowledgement for this piece of the pipeline.

seanshahkarami commented 7 years ago

An ack mechanism kind of exists in the client-to-driver piece in that a random correlation id is generated and sent along with a message. The client only accepts the output if that correlation id shows up in a response message, otherwise it times out.

seanshahkarami commented 7 years ago

Finally, wagman itself indicates whether of command was actually a valid command or not.

seanshahkarami commented 7 years ago

We can still revisit the issue later, but I think in light of these three things, there's already quite a bit of acknowledgement built-in. One are to improve is providing a more uniform and thorough indication of errors, though. Currently this is handled by printing ad-hoc error messages or timing out.