If you know how many there are: 1. Initialize array with zeros, at least one in each packet. 2. Initialize counter with how many you expect. 3. When a packet comes, decrease counter IF it goes into empty (zero) position, otherwise not. 4. When counter is zero, you have them all. Cat > To: AVR-Chat@yahoogroups.com > From: microbrix@gmail.com > Date: Mon, 7 Jun 2010 17:08:25 -0600 > Subject: Re: [AVR-Chat] Bit fields > > > You could subtract the sequence number of the last packet of the last > > batch from the highest sequence number packet of the latest batch of > > received packets. The difference should agree with a counter for the > > packets received in this batch so far. > > I think I follow you, but I don't see how this tells me wether I've > received all of them. > Not that I expect this, but say the last packet arrives first... > Or the middle packet arrives three times. (very possible) > > > ------------------------------------ > > Yahoo! Groups Links > > > [Non-text portions of this message have been removed]
Message
RE: [AVR-Chat] Bit fields
2010-06-07 by Cat C
Attachments
- No local attachments were found for this message.