??? 06/14/06 10:34 Read: times |
#118269 - Individual buffers Responding to: ???'s previous message |
Circular buffer 9 bytes for receiving maximum sized packages 2 pointers and a timeout to clear the circular buf too.
buffer size 1 7 4+1(timeout)+1(repetion counter)+1(free) 2 8 5+1(timeout)+1(repetion counter)+1(free) 3 9 6+1(timeout)+1(repetion counter)+1(free) 4 12 9+1(timeout)+1(repetion counter)+1(free) After power on, the buffers 1 to 4 will be set as free. Once a package is received, then you can store the package in the corresponding buffer size and increment it repetion counter and set a timeout if the buffer is free. Like this you can do for other package sizes. The function of a package can be executed after a pre determined no of repetion counter or on timeout. The above approach is ok as long as the sender do not mix the package lengths. Also can have buffer 1 size 7 --> 2nos buffer 2 size 8 --> 2nos buffer 3 size 9 --> 2nos buffer 4 size 12 --> 2nos This depends on the maximum no. of senders at a time and maximum repetion of a package. V.Nagarajan |
Topic | Author | Date |
Buffer management optimalization | 01/01/70 00:00 | |
Simple things first ... | 01/01/70 00:00 | |
You can use circular buffer | 01/01/70 00:00 | |
Fragmentation problem... | 01/01/70 00:00 | |
all methods have some problems | 01/01/70 00:00 | |
Start of package or End of package | 01/01/70 00:00 | |
Packages explanation | 01/01/70 00:00 | |
Individual buffers | 01/01/70 00:00 | |
Good Idea | 01/01/70 00:00 | |
New packages | 01/01/70 00:00 | |
hash table unefective | 01/01/70 00:00 | |
why keep that many | 01/01/70 00:00 | |
Reason of 5 or more buffer | 01/01/70 00:00 | |
Protocol specifics | 01/01/70 00:00 | |
One way protocol | 01/01/70 00:00 | |
One way protocol | 01/01/70 00:00 | |
never | 01/01/70 00:00 | |
Definition of need | 01/01/70 00:00 | |
Grant, I agree with what you post re thi | 01/01/70 00:00 | |
Simply reason why one way transmission | 01/01/70 00:00 | |
then why not just do it the easy way![]() | 01/01/70 00:00 |