Main Page | Class List | File List | Class Members | File Members

rcpc.h

Go to the documentation of this file.
00001 /* RCPC.H */
00002 
00003 #ifndef _RCPC_H_
00004 #define _RCPC_H_
00005 
00006 #include "Buffer.h"
00007 
00008 typedef struct {
00009   int sequence_number;  /* Number between 0 and 31 */
00010   int count;            /* How many blocks we have */
00011   int xmit_count;       /* How many times we have transmitted this info */
00012   byte *block[4];       /* the (at most 4) RCPC codes */
00013   int length;           /* the length of each block including CRC, TB */
00014 } buf_rcpc;
00015 
00016 
00017 /* Function Prototypes */
00018 
00019 int max_arq(int rtype);
00020 /*
00021  * returns the most arq's that can be sent for a given rate type rtype
00022  */
00023 
00024 int inc_xmit_count(buf_rcpc *br);
00025 /*
00026  * increments xmit count of br and returns it modulo 2
00027  */
00028 
00029 buf_rcpc *find_rcpc(Buffer *rcpcs, int seq_num);
00030 /*
00031  * Finds an rcpc buffer entry with a given timestamp
00032  * Returns a pointer to it if it exists, or NULL if it doesn't
00033  */
00034 
00035 buf_rcpc *place_rcpc(Buffer *rcpcs, int seq_num, byte *data, int num_bytes,
00036                      int arq_type, int last_written, int *last_recd,
00037                      int old_threshold);
00038 /*
00039  * Places a block of bytes in the correct rcpc structure, and returns
00040  *   a pointer to it.
00041  *   seq_num is the sequence number
00042  *   data is the byte array of data to put in the block
00043  *   num_bytes is the length of the byte array
00044  *   arq_type is the arq_type (1,2 or 3)
00045  *   last_written is the seq_num of last packet written out from buffer
00046  *   last_recd is seq_num of last new packet received
00047  */
00048 
00049 #endif

Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1