mad_rlc.h

Go to the documentation of this file.
00001 
00039 #ifndef _MAD_RLC_H_
00040 #define _MAD_RLC_H_
00041 
00042 #include "defines.h"
00043 #include "utils.h"
00044 #include "alc_session.h"
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049 
00055 typedef struct rlc_hdr {
00056 
00057 #ifdef  _BIT_FIELDS_LTOH
00058         unsigned char   reserved:7;             
00059         unsigned char   sp:1;                   
00060 #else
00061         unsigned char   sp:1;                   
00062         unsigned char   reserved:7;             
00063 #endif
00064 
00065         unsigned char   layer;                  
00066         unsigned short  seqid;                  
00068 } rlc_hdr_t;
00069 
00075 typedef struct late_list {
00076         struct late_list *next; 
00077         unsigned short seq_num; 
00078         double losttime;                
00079 } late_list_t;
00080 
00086 typedef struct lost_list {
00087         struct lost_list *next;         
00088         int pkt_remaining;                      
00089 } lost_list_t;
00090 
00096 typedef struct mad_rlc {
00097         int sp_cycle;           
00098         int pkt_timeout;        
00099         int deaf_period;        
00100         int late_accepted;      
00102         int loss_accepted;      
00105         int loss_limit;         
00107         int loss_timeout;       
00111         unsigned short tx_layers_seq[MAX_CHANNELS_IN_SESSION];
00112 
00114         double tx_next_sp[MAX_CHANNELS_IN_SESSION];
00115 
00117         char rx_first_pkt[MAX_CHANNELS_IN_SESSION];
00118 
00121         char rx_first_sp[MAX_CHANNELS_IN_SESSION];
00122 
00124         unsigned short rx_wait_for[MAX_CHANNELS_IN_SESSION];
00125 
00127         late_list_t     rx_missing[MAX_CHANNELS_IN_SESSION];
00128         
00129         unsigned short rx_nblate_since_sp;      
00130         unsigned short  rx_nblate;                      
00131         unsigned short  rx_nblost_since_sp;     
00132         unsigned short  rx_nblost;                      
00133         lost_list_t     rx_lost;                                
00134         double rx_deaf_wait;                            
00135         BOOL drop_highest_layer;                        
00137 } mad_rlc_t;
00138 
00148 int init_mad_rlc(alc_session_t *s);
00149 
00157 void close_mad_rlc(alc_session_t *s);
00158 
00169 double mad_rlc_next_sp(alc_session_t *s, int layer);
00170 
00178 void mad_rlc_reset_tx_sp(alc_session_t *s);
00179 
00191 int mad_rlc_fill_header(alc_session_t *s, rlc_hdr_t *rlc_hdr, int layer);
00192 
00203 int mad_rlc_analyze_cci(alc_session_t *s, rlc_hdr_t *rlc_hdr);
00204 
00205 #ifdef __cplusplus
00206 }; //extern "C"
00207 #endif
00208 
00209 
00210 #endif
00211 

Generated on Fri Mar 9 19:59:52 2007 for MAD-FCL by  doxygen 1.5.0