Protocol packet |
And here'a sequence diagram that represents the exchange of messages in a situation where the first reply is lost. We can see that the transmitter then retransmit the same message, in this case the receiver realizes it is the same message it received a while ago and sends a reply again, this time succesflly.
Protocol sequece diagram |
So, for those interessed, i'm working now in a second version of it using CRC16 for error detection instead of checksum. And here's a nice link to a Hack A Day post where some debate is going on on my post, pretty nice arguments by the way.
2 comments:
Wow, I didn't expect such a output :)
As CVBruce said, which benefit has a random ID?
Another thing I'm thinking about is... a 16bit checksum for 1 byte payload?
@wft, hope it is what you were expecting.
I didn't think of the random number as a benefit, i just thought about using it and implemented. I'll give it some attention.
Yeah, a 16 bit can be too much now, but what if the need changes and i (or someone else) have to send more than 1 byte?
Postar um comentário