View Single Post
  #74   Spotlight this post!  
Unread 13-06-2002, 20:23
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
Okay, so this part sure is the painful part... after about an hour discussing it, Ian and I decided to do something, just we wanna know if this is the 'correct' way of doing it...

Basically we're going to read in one byte at a time to a fixed queue of 28 positions. When the first two items and last two items are equal to 255, then we know that we have a full packet, and we read the queue for the appropriate information. If all four items aren't equal to 255, then we know we don't have a full packet, and we just continue adding to the queue.

For a visualization (they're easier to understand), I made a simple visualized version of what we're going to do... http://24.186.144.31:81/queue-visual/moo.html

I believe this is going to work, but if it doesn't, how are you supposed to parse the bytes, or, determine where a packet begins?
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies