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

al_receiving.h

Go to the documentation of this file.
00001 /* AL_RECEIVING.H */
00002 
00003 #ifndef _AL_RECEIVING_H_
00004 #define _AL_RECEIVING_H_
00005 
00006 #include "Buffer.h"
00007 #include "al_sending.h"
00008 #include "al.h"
00009 #include "arq.h"
00010 #include "rcpc.h"
00011 #include "LList.h"
00012 
00013 typedef struct {
00014   int logical_channel;             /* channel number it receives from         */
00015   al_type type;                    /* one of AL1M, AL2M, AL3M, etc.           */
00016   int framed;                      /* Frame SDU with HDLC flags?              */
00017   int seq_num;                     /* Packets contain sequence number (FCF)   */
00018   int rcpc_code;                   /* PDU Payload is RCPC coded?              */
00019   int rcpc_rate;                   /* Rate Payload was coded at               */
00020   int arq_type;                    /* what type of arq (type 1,2,3)           */
00021   int crc_bytes;                   /* how many CRC bytes to use               */
00022   int last_recd;                   /* seq_num of last new packet received     */
00023   int last_written;                /* seq_num of last packet written out      */
00024   list *outlist;                   /* output buffer (linked list)             */
00025   int initialized;                 /* if output buffer is intialized          */
00026   int old_threshold;               /* Threshold to determine if packet is old */
00027   int max_arq;                     /* Max number of retransmit requests.      */
00028   
00029   Buffer *outgoing_data;           /* (byte) buffer */
00030   Buffer *incoming_data;           /* (byte) buffer */
00031   Buffer *rcpcs;                   /* buffer of rcpc info (old H.223/a)       */
00032 
00033   al_sending_entity *back_channel; /* al_sending entity to send arq's through (old
00034                                       h.223/a) */
00035   int bad_payloads;                /* number of times the payload crc failed  */
00036 } al_receiving_entity;
00037 
00038 /* function prototypes */
00039 
00040 al_receiving_entity *new_al_receiving_entity(channel_info *nfo);
00041 /*
00042  * this function creates a new al_receiving_entity based on the 
00043  *   given channel_info structure
00044  */
00045 
00046 void send_to_al(al_receiving_entity *which, byte b);
00047 /*
00048  * writes byte b to the incoming data buffer of the
00049  *   al_receiving entity
00050  */
00051 
00052 int al_indication(al_receiving_entity *which);
00053 /*
00054  * Called by AL user (receiver) to check if there is any data
00055  *   waiting for it in the receiver buffer.  
00056  * 
00057  *   Returns 1 if data is there, 0 if not
00058  */
00059 
00060 byte al_receive(al_receiving_entity *which);
00061 /*
00062  * Called by al_user, reads data out of the incoming buffer
00063  */
00064 
00065 void send_closing_flag(al_receiving_entity *which);
00066 /*
00067  * called by mux to signal the end of an AL-PDU.
00068  *
00069  * check the crc on the data in incoming buffer (incoming_data).  if it
00070  * is good, transfers the data to the outgoing buffer (outgoing_data).
00071  */
00072 
00073 #endif

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