Commit 3c3e928f authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/develop' into issue324_gccwarnings

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parents 000f5e80 e8ea2f10
......@@ -1090,8 +1090,8 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
else
return((n+6)%10);
LOG_E(PHY, "%s %s:%i pdcch allocation error\n",__FUNCTION__,__FILE__,__LINE__);
return 0;
LOG_E(PHY, "%s %s:%i pdcch allocation error\n",__FUNCTION__,__FILE__,__LINE__);
return 0;
}
uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n)
......
......@@ -21,7 +21,7 @@ typedef enum operationModeInf{
iNB_IoTand_DifferentPCI_r13 = 2,
guardband_r13 = 3,
standalone_r13 = 4
}operationModeInf_t;
} operationModeInf_t;
///SIB1_SchedulingInfo_NB_IoT_r13
typedef enum si_Periodicity{
......@@ -32,14 +32,14 @@ typedef enum si_Periodicity{
si_Periodicity_rf1024=10240,
si_Periodicity_rf2048=20480,
si_Periodicity_rf4096=40960
}si_Periodicity_NB_IoT;
} si_Periodicity_NB_IoT;
typedef enum si_RepetitionPattern{
si_RepetitionPattern_every2ndRF=0,
si_RepetitionPattern_every4thRF,
si_RepetitionPattern_every8thRF,
si_RepetitionPattern_every16thRF
}si_RepetitionPattern_NB_IoT;
} si_RepetitionPattern_NB_IoT;
typedef enum sib_MappingInfo{
sib2_v=0x1,
......@@ -48,7 +48,7 @@ typedef enum sib_MappingInfo{
sib5_v=0x8,
sib14_v=0x10,
sib16_v=0x20
}sib_MappingInfo_NB_IoT;
} sib_MappingInfo_NB_IoT;
typedef enum si_TB{
si_TB_56=2,
......@@ -59,7 +59,7 @@ typedef enum si_TB{
si_TB_440=8,
si_TB_552=8,
si_TB_680=8
}si_TB_NB_IoT;
} si_TB_NB_IoT;
///RACH_ConfigCommon configuration
......@@ -72,7 +72,7 @@ typedef enum ra_ResponseWindowSize{
ra_ResponseWindowSize_pp7=7,
ra_ResponseWindowSize_pp8=8,
ra_ResponseWindowSize_pp10=10
}ra_ResponseWindowSize_NB_IoT;
} ra_ResponseWindowSize_NB_IoT;
typedef enum mac_ContentionResolutionTimer{
mac_ContentionResolutionTimer_pp1=1,
......@@ -83,7 +83,7 @@ typedef enum mac_ContentionResolutionTimer{
mac_ContentionResolutionTimer_pp16=16,
mac_ContentionResolutionTimer_pp32=32,
mac_ContentionResolutionTimer_pp64=64
}mac_ContentionResolutionTimer_NB_IoT;
} mac_ContentionResolutionTimer_NB_IoT;
///NPRACH_ConfigSIB configuration
......@@ -96,7 +96,7 @@ typedef enum nprach_Periodicity{
nprach_Periodicity_ms640=640,
nprach_Periodicity_ms1280=1280,
nprach_Periodicity_ms2560=2560
}nprach_Periodicity_NB_IoT;
} nprach_Periodicity_NB_IoT;
typedef enum nprach_StartTime{
nprach_StartTime_ms8=8,
......@@ -107,7 +107,7 @@ typedef enum nprach_StartTime{
nprach_StartTime_ms256=256,
nprach_StartTime_ms512=512,
nprach_StartTime_ms1024=1024
}nprach_StartTime_NB_IoT;
} nprach_StartTime_NB_IoT;
typedef enum nprach_SubcarrierOffset{
nprach_SubcarrierOffset_n0=0,
......@@ -117,21 +117,21 @@ typedef enum nprach_SubcarrierOffset{
nprach_SubcarrierOffset_n2=2,
nprach_SubcarrierOffset_n18=18,
nprach_SubcarrierOffset_n34=34
}nprach_SubcarrierOffset_NB_IoT;
} nprach_SubcarrierOffset_NB_IoT;
typedef enum nprach_NumSubcarriers{
nprach_NumSubcarriers_n12=12,
nprach_NumSubcarriers_n24=24,
nprach_NumSubcarriers_n36=36,
nprach_NumSubcarriers_n48=48
}nprach_NumSubcarriers_NB_IoT;
} nprach_NumSubcarriers_NB_IoT;
typedef enum nprach_SubcarrierMSG3_RangeStart{
nprach_SubcarrierMSG3_RangeStart_zero=0,
nprach_SubcarrierMSG3_RangeStart_oneThird=1/3,
nprach_SubcarrierMSG3_RangeStart_twoThird=2/3,
nprach_SubcarrierMSG3_RangeStart_one=1
}nprach_SubcarrierMSG3_RangeStart_NB_IoT;
} nprach_SubcarrierMSG3_RangeStart_NB_IoT;
typedef enum maxNumPreambleAttemptCE{
maxNumPreambleAttemptCE_n3=3,
......@@ -141,7 +141,7 @@ typedef enum maxNumPreambleAttemptCE{
maxNumPreambleAttemptCE_n7=7,
maxNumPreambleAttemptCE_n8=8,
maxNumPreambleAttemptCE_n10=10
}maxNumPreambleAttemptCE_NB_IoT;
} maxNumPreambleAttemptCE_NB_IoT;
typedef enum numRepetitionsPerPreambleAttempt{
numRepetitionsPerPreambleAttempt_n1=1,
......@@ -152,7 +152,7 @@ typedef enum numRepetitionsPerPreambleAttempt{
numRepetitionsPerPreambleAttempt_n32=32,
numRepetitionsPerPreambleAttempt_n64=64,
numRepetitionsPerPreambleAttempt_n128=128
}numRepetitionsPerPreambleAttempt_NB_IoT;
} numRepetitionsPerPreambleAttempt_NB_IoT;
typedef enum npdcch_NumRepetitions_RA{
npdcch_NumRepetitions_RA_r1=1,
......@@ -167,7 +167,7 @@ typedef enum npdcch_NumRepetitions_RA{
npdcch_NumRepetitions_RA_r512=512,
npdcch_NumRepetitions_RA_r1024=1024,
npdcch_NumRepetitions_RA_r2048=2048
}npdcch_NumRepetitions_RA_NB_IoT;
} npdcch_NumRepetitions_RA_NB_IoT;
typedef enum npdcch_StartSF_CSS_RA{
npdcch_StartSF_CSS_RA_v1dot5=3/2,
......@@ -178,14 +178,14 @@ typedef enum npdcch_StartSF_CSS_RA{
npdcch_StartSF_CSS_RA_v32=32,
npdcch_StartSF_CSS_RA_v48=48,
npdcch_StartSF_CSS_RA_v64=64
}npdcch_StartSF_CSS_RA_NB_IoT;
} npdcch_StartSF_CSS_RA_NB_IoT;
typedef enum npdcch_Offset_RA{
zero=0,
oneEighth=1/8,
oneFourth=1/4,
threeEighth=3/8
}npdcch_Offset_RA_NB_IoT;
} npdcch_Offset_RA_NB_IoT;
typedef enum si_window_length_e{
ms160=160,
......@@ -195,7 +195,7 @@ typedef enum si_window_length_e{
ms960=960,
ms1280=1280,
ms1600=1600
}si_window_length_t;
} si_window_length_t;
typedef enum si_periodicity_e{
rf64=640,
......@@ -205,14 +205,14 @@ typedef enum si_periodicity_e{
rf1024=10240,
rf2048=20480,
rf4096=40960
}si_periodicity_t;
} si_periodicity_t;
typedef enum si_repetition_pattern_e{
every2ndRF=20,
every4thRF=40,
every8thRF=80,
every16thRF=160
}si_repetition_pattern_t;
} si_repetition_pattern_t;
typedef enum si_tb_e{
b56=2,
......@@ -223,7 +223,7 @@ typedef enum si_tb_e{
b440=8,
b552=8,
b680=8
}si_tb_t;
} si_tb_t;
typedef struct sibs_NB_IoT_sched_s{
......@@ -232,21 +232,21 @@ typedef struct sibs_NB_IoT_sched_s{
sib_MappingInfo_NB_IoT sib_mapping_info; //bit vector
si_tb_t si_tb;
}sibs_NB_IoT_sched_t;
} sibs_NB_IoT_sched_t;
///-------------------------------------------------------MAC--------------------------------------------------------------------///
typedef struct sib1_NB_IoT_sched_s{
int repetitions; // 4, 8, 16
int starting_rf;
}sib1_NB_IoT_sched_t;
} sib1_NB_IoT_sched_t;
typedef struct {
uint32_t mac_ra_ResponseWindowSize_NB_IoT;
uint32_t mac_ContentionResolutionTimer_NB_IoT;
}mac_RACH_ConfigCommon_NB_IoT;
} mac_RACH_ConfigCommon_NB_IoT;
typedef struct {
......@@ -262,7 +262,7 @@ typedef struct {
uint32_t mac_npdcch_StartSF_CSS_RA_NB_IoT; // G
uint32_t mac_npdcch_Offset_RA_NB_IoT; // alpha offset
}mac_NPRACH_ConfigSIB_NB_IoT;
} mac_NPRACH_ConfigSIB_NB_IoT;
typedef struct{
//npdcch-NumRepetitions-r13
......@@ -271,7 +271,7 @@ typedef struct{
double G;
//npdcch-Offset-USS-r13
double a_offset;
}npdcch_ConfigDedicated_NB_IoT;
} npdcch_ConfigDedicated_NB_IoT;
typedef struct rrc_config_NB_IoT_s{
......@@ -296,6 +296,6 @@ typedef struct rrc_config_NB_IoT_s{
///NPDCCH Dedicated config
npdcch_ConfigDedicated_NB_IoT npdcch_ConfigDedicated[3];
}rrc_config_NB_IoT_t;
} rrc_config_NB_IoT_t;
#endif
This diff is collapsed.
......@@ -200,7 +200,7 @@ void
config_req_rlc_am (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
rlc_am_info_t * const config_am_pP,
const rlc_am_info_t * config_am_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP
)
......
......@@ -35,21 +35,6 @@
# ifndef __RLC_AM_H__
# define __RLC_AM_H__
# ifdef RLC_AM_C
# define private_rlc_am(x)
# define protected_rlc_am(x)
# define public_rlc_am(x)
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am(x)
# define protected_rlc_am(x) extern x
# define public_rlc_am(x) extern x
# else
# define private_rlc_am(x)
# define protected_rlc_am(x)
# define public_rlc_am(x) extern x
# endif
# endif
# include "platform_types.h"
# include "rlc_def.h"
# include "rlc_def_lte.h"
......@@ -117,9 +102,9 @@
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
public_rlc_am(void rlc_am_release (
void rlc_am_release (
const protocol_ctxt_t* const ctxtP,
rlc_am_entity_t * const rlc_pP);)
rlc_am_entity_t * const rlc_pP);
/** @addtogroup _rlc_am_init_impl_
* @{
......@@ -133,12 +118,14 @@ public_rlc_am(void rlc_am_release (
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am(void config_req_rlc_am (
const protocol_ctxt_t* const ctxtP,
void
config_req_rlc_am (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_am_info_t * const config_amP,
const rlc_am_info_t * config_am_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP
);
/*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP, logical_chan_id_t chan_idP)
* \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs
......@@ -148,12 +135,12 @@ public_rlc_am(void config_req_rlc_am (
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am(void config_req_rlc_am_asn1 (
void config_req_rlc_am_asn1 (
const protocol_ctxt_t* const ctxtP,
const srb_flag_t srb_flagP,
const struct RLC_Config__am * const config_amP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP);
/** @} */
......@@ -218,7 +205,7 @@ public_rlc_am(void config_req_rlc_am_asn1 (
* \param[out] stat_timer_poll_retransmit_timed_out Number of times the timer "poll_retransmit" has timed-out.
* \param[out] stat_timer_status_prohibit_timed_out Number of times the timer "status_prohibit" has timed-out.
*/
public_rlc_am(void rlc_am_stat_req (
void rlc_am_stat_req (
const protocol_ctxt_t* const ctxtP,
rlc_am_entity_t * const rlc_pP,
unsigned int* stat_tx_pdcp_sdu,
......@@ -247,14 +234,18 @@ public_rlc_am(void rlc_am_stat_req (
unsigned int* stat_rx_control_bytes,
unsigned int* stat_timer_reordering_timed_out,
unsigned int* stat_timer_poll_retransmit_timed_out,
unsigned int* stat_timer_status_prohibit_timed_out);)
unsigned int* stat_timer_status_prohibit_timed_out);
/*! \fn void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP, void * const rlc_pP)
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);)
void
rlc_am_get_pdus (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP
);
/*! \fn void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indication)
* \brief Process the received PDUs from lower layer.
......@@ -262,7 +253,7 @@ private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,v
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] data_indication PDUs from MAC.
*/
protected_rlc_am( void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);)
void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
......@@ -273,14 +264,14 @@ protected_rlc_am( void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void *
* \param[in] enb_flagP eNB or UE flag indication.
* \return The maximum number of bytes that can be served by RLC instance to MAC.
*/
public_rlc_am( struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);)
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP)
* \brief Set available TBS for RLC Tx just before am_mac_data_request. Used for UE only.
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] tb_sizeP Available Tx Transport Block size in bytes.
*/
public_rlc_am( void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);)
void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);
/*! \fn struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP)
* \brief Gives PDUs to lower layer MAC.
......@@ -289,7 +280,7 @@ public_rlc_am( void rlc_am_set_nb_bytes_requested_by_mac (void * const
* \param[in] enb_flagP eNB or UE flag
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
*/
public_rlc_am( struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP);)
struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP)
* \brief Receive PDUs from lower layer MAC.
......@@ -297,14 +288,14 @@ public_rlc_am( struct mac_data_req rlc_am_mac_data_request (const protocol_ct
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] data_indP PDUs from MAC.
*/
public_rlc_am( void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP);)
void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP);
/*! \fn uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP)
* \brief Get Tx Buffer Occupancy.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
public_rlc_am( uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP);)
uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP);
/*! \fn void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP)
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
......@@ -312,6 +303,6 @@ public_rlc_am( uint32_t rlc_am_get_buffer_occupancy_in_bytes (const protocol_
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] sduP SDU. (A struct rlc_am_data_req is mapped on sduP->data.)
*/
public_rlc_am( void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP);)
void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP);
/** @} */
# endif
......@@ -34,22 +34,6 @@
*/
# ifndef __RLC_AM_IN_SDU_H__
# define __RLC_AM_IN_SDU_H__
//-----------------------------------------------------------------------------
# ifdef RLC_AM_IN_SDU_C
# define private_rlc_am_in_sdu(x) x
# define protected_rlc_am_in_sdu(x) x
# define public_rlc_am_in_sdu(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_in_sdu(x)
# define protected_rlc_am_in_sdu(x) extern x
# define public_rlc_am_in_sdu(x) extern x
# else
# define private_rlc_am_in_sdu(x)
# define protected_rlc_am_in_sdu(x)
# define public_rlc_am_in_sdu(x) extern x
# endif
# endif
/*! \fn void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
* \brief Free a higher layer SDU stored in input_sdus[] buffer.
* \param[in] ctxtP Running context.
......@@ -57,7 +41,7 @@
* \param[in] index_in_bufferP Position index of the SDU.
* \note Update also the RLC AM instance variables nb_sdu, current_sdu_index, nb_sdu_no_segmented.
*/
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);
/*! \fn void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
......@@ -67,7 +51,7 @@ protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (const protocol_ctxt_t* con
* \param[in] index_in_bufferP Position index of the SDU.
* \note This procedure is called when the SDU segmentation is done for this SDU. Update also the RLC AM instance variable nb_sdu_no_segmented.
*/
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);
/*! \fn signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP)
......@@ -76,7 +60,7 @@ protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (const protocol_ctxt_t* con
* \param[in] rlcP RLC AM protocol instance pointer.
* \return 1 if the buffer is empty, else 0.
*/
protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP);)
signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP);
/*! \fn void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP)
* \brief Process SDU cnf of a ACKED PDU for all SDUs concatenated in this PDU.
......@@ -84,6 +68,6 @@ protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t*
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number of the PDU.
*/
protected_rlc_am_in_sdu(void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP);)
void rlc_am_pdu_sdu_data_cnf(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,const rlc_sn_t snP);
/** @} */
# endif
......@@ -37,21 +37,6 @@
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# ifdef RLC_AM_INIT_C
# define private_rlc_am_init(x) x
# define protected_rlc_am_init(x) x
# define public_rlc_am_init(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_init(x)
# define protected_rlc_am_init(x) extern x
# define public_rlc_am_init(x) extern x
# else
# define private_rlc_am_init(x)
# define protected_rlc_am_init(x)
# define public_rlc_am_init(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -76,13 +61,13 @@ typedef volatile struct {
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
public_rlc_am_init( void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);
/*! \fn void rlc_am_cleanup(rlc_am_entity_t *const rlc_pP)
* \brief Free all memory resources allocated and kept by this RLC AM instance.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
public_rlc_am_init( void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);)
void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);
/*! \fn void rlc_am_configure(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
* \brief Set RLC AM protocol parameters.
......@@ -96,14 +81,14 @@ AMD PDU.
* \param[in] t_reorderingP This timer is used by the receiving side of an AM RLC entity in order to detect loss of RLC PDUs at lower layer, value in frames.
* \param[in] t_status_prohibitP This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU, value in frames.
*/
public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
rlc_am_entity_t * const rlc_pP,
const uint16_t max_retx_thresholdP,
const uint16_t poll_pduP,
const uint16_t poll_byteP,
const uint32_t t_poll_retransmitP,
const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP);)
const uint32_t t_status_prohibitP);
/*! \fn void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP)
......@@ -114,6 +99,6 @@ public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am_init( void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP);)
void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP);
/** @} */
#endif
......@@ -34,27 +34,12 @@
*/
#ifndef __RLC_AM_REASSEMBLY_H__
# define __RLC_AM_REASSEMBLY_H__
# ifdef RLC_AM_REASSEMBLY_C
# define private_rlc_am_reassembly(x) x
# define protected_rlc_am_reassembly(x) x
# define public_rlc_am_reassembly(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_reassembly(x)
# define protected_rlc_am_reassembly(x) extern x
# define public_rlc_am_reassembly(x) extern x
# else
# define private_rlc_am_reassembly(x)
# define protected_rlc_am_reassembly(x)
# define public_rlc_am_reassembly(x) extern x
# endif
# endif
/*! \fn void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
* \brief Reset the data cursor index in the output SDU buffer to zero.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);)
void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
/*! \fn void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pPuint8_t * srcP, int32_t lengthP)
* \brief Concatenate datas at the tail of the output SDU in construction. This SDU in construction will be sent to higher layer.
......@@ -63,14 +48,14 @@ private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (const protocol_ctxt_t* co
* \param[in] srcP Pointer on data to be reassemblied.
* \param[in] lengthP Length of data to be reassemblied.
*/
private_rlc_am_reassembly( void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint8_t * srcP, int32_t lengthP);)
void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint8_t * srcP, int32_t lengthP);
/*! \fn void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP)
* \brief Send the output SDU in construction to higher layer.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
private_rlc_am_reassembly( void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);)
void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP,boolean_t free_rlc_pdu)
* \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
......@@ -79,7 +64,7 @@ private_rlc_am_reassembly( void rlc_am_send_sdu (const protocol_ctxt_t* co
* \param[in] tb_pP RLC AM PDU embedded in a mem_block_t.
* \param[in] free_rlc_pdu Flag for freeing RLC AM PDU after reassembly.
*/
protected_rlc_am_reassembly( void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP,boolean_t free_rlc_pdu);)
void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP,boolean_t free_rlc_pdu);
/** @} */
#endif
......@@ -34,21 +34,6 @@
*/
# ifndef __RLC_AM_RECEIVER_H__
# define __RLC_AM_RECEIVER_H__
# ifdef RLC_AM_RECEIVER_C
# define private_rlc_am_receiver(x) x
# define protected_rlc_am_receiver(x) x
# define public_rlc_am_receiver(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_receiver(x)
# define protected_rlc_am_receiver(x) extern x
# define public_rlc_am_receiver(x) extern x
# else
# define private_rlc_am_receiver(x)
# define protected_rlc_am_receiver(x)
# define public_rlc_am_receiver(x) extern x
# endif
# endif
/*! \fn signed int rlc_am_get_data_pdu_infos( const protocol_ctxt_t* const ctxt_pP, const rlc_am_entity_t * const rlc_pP,rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP)
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
* \param[in] ctxt_pP Running context.
......@@ -58,12 +43,12 @@
* \param[in] pdu_infoP Structure containing extracted informations from PDU.
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
*/
protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(
signed int rlc_am_get_data_pdu_infos(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t * const rlc_pP,
rlc_am_pdu_sn_10_t* headerP,
int16_t sizeP,
rlc_am_pdu_info_t* pdu_infoP));
rlc_am_pdu_info_t* pdu_infoP);
/*! \fn void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP)
* \brief Display RLC AM PDU informations.
......@@ -71,7 +56,7 @@ protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] pdu_infoP Structure containing extracted informations of a PDU.
*/
protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP);)
void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP);
/*! \fn void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
* \brief Update RLC AM protocol variable VR(MS).
......@@ -80,7 +65,7 @@ protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(const protocol_ctx
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
* \note It is assumed that the sequence number of the transport block is equal to VR(MS)
*/
protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);
/*! \fn void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
* \brief Update RLC AM protocol variable VR(R).
......@@ -89,7 +74,7 @@ protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* co
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
* \note It is assumed that the sequence number of the transport block is equal to VR(R)
*/
protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);
/*! \fn void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP)
* \brief Convert transport blocks received from MAC layer into RLC AM PDUs, and dispatch to the right processing block these PDUS upon their type (CONTROL/DATA).
......@@ -97,7 +82,7 @@ protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (const protocol_ctxt_t* co
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] data_indP Transport blocks received from MAC layer.
*/
protected_rlc_am_receiver( void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP));
void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP);
/*! \fn void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP)
* \brief Process an incoming data PDU received from MAC layer.
......@@ -107,7 +92,7 @@ protected_rlc_am_receiver( void rlc_am_receive_routing (const protocol_ctxt_t* c
* \param[in] first_byteP Pointer on first byte of the PDU.
* \param[in] tb_size_in_bytesP Transport block size in bytes (same as PDU size in bytes).
*/
private_rlc_am_receiver( void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP,
uint16_t tb_size_in_bytesP));
void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP,
uint16_t tb_size_in_bytesP);
/** @} */
# endif
......@@ -35,21 +35,6 @@
# ifndef __RLC_AM_RETRANSMIT_H__
# define __RLC_AM_RETRANSMIT_H__
//-----------------------------------------------------------------------------
# ifdef RLC_AM_RETRANSMIT_C
# define private_rlc_am_retransmit(x) x
# define protected_rlc_am_retransmit(x) x
# define public_rlc_am_retransmit(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_retransmit(x)
# define protected_rlc_am_retransmit(x) extern x
# define public_rlc_am_retransmit(x) extern x
# else
# define private_rlc_am_retransmit(x)
# define protected_rlc_am_retransmit(x)
# define public_rlc_am_retransmit(x) extern x
# endif
# endif
/*! \fn boolean_t rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
* \param[in] ctxtP Running context.
......@@ -61,13 +46,13 @@
* \return OK/KO
* \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
*/
protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
boolean_t rlc_am_nack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP);)
sdu_size_t so_endP);
/*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
......@@ -77,11 +62,11 @@ protected_rlc_am_retransmit(boolean_t rlc_am_nack_pdu (
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
*/
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
boolean_t free_pdu);)
boolean_t free_pdu);
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
......@@ -90,29 +75,51 @@ protected_rlc_am_retransmit(void rlc_am_ack_pdu (
* \param[in] snP Sequence number of the PDU to be copied.
* \return A copy of the PDU having sequence number equal to parameter snP.
*/
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
mem_block_t* rlc_am_retransmit_get_copy (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP));
const rlc_sn_t snP);
/*! \fn mem_block_t* rlc_am_retransmit_get_subsegment (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP,rlc_sn_t snP, sdu_size_t *sizeP)
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number of the PDU to be copied.
* \param[in,out] sizeP Maximum size allowed for the subsegment, it is updated with the amount of bytes not used (sizeP[out] = sizeP[in] - size of segment).
* \return A copy of a segment of the PDU having sequence number equal to parameter snP.
*/
mem_block_t* rlc_am_retransmit_get_subsegment (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
sdu_size_t *const sizeP);
/*! \fn mem_block_t* rlc_am_get_pdu_to_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
* \brief Find a PDU or PDU segment to retransmit.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \return A copy of the retransmitted PDU or PDU segment or NULL if TBS was not big enough
*/
protected_rlc_am_retransmit(mem_block_t* rlc_am_get_pdu_to_retransmit(
mem_block_t* rlc_am_get_pdu_to_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlcP);
/*! \fn void rlc_am_retransmit_any_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
* \brief Retransmit any PDU in order to unblock peer entity, if no suitable PDU is found (depending on requested MAC size) to be retransmitted, then try to retransmit a subsegment of any PDU.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
*/
void rlc_am_retransmit_any_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlcP);)
rlc_am_entity_t* const rlcP);
/*! \fn void rlc_am_tx_buffer_display (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* rlcP, char* message_pP)
* \brief Display the dump of the retransmission buffer.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] message_pP Message to be displayed along with the display of the dump of the retransmission buffer.
*/
protected_rlc_am_retransmit(void rlc_am_tx_buffer_display (
void rlc_am_tx_buffer_display (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlcP,
char* const message_pP);)
char* const message_pP);
/** @} */
# endif
......@@ -38,22 +38,6 @@
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# ifdef RLC_AM_RX_LIST_C
# define private_rlc_am_rx_list(x) x
# define protected_rlc_am_rx_list(x) x
# define public_rlc_am_rx_list(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_rx_list(x)
# define protected_rlc_am_rx_list(x) extern x
# define public_rlc_am_rx_list(x) extern x
# else
# define private_rlc_am_rx_list(x)
# define protected_rlc_am_rx_list(x)
# define public_rlc_am_rx_list(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
//#include "PHY/defs.h"
......@@ -66,7 +50,16 @@
* \param[in] tbP A PDU embedded in a mem_block_t.
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
*/
protected_rlc_am_rx_list( rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,mem_block_t* const tb_pP);)
rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,mem_block_t* const tb_pP);
/*! \fn signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP , mem_block_t* const tbP)
* \brief Insert a PDU in the RX buffer (implemented with a list).
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] tbP A PDU embedded in a mem_block_t.
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
*/
signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);
/*! \fn boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
* \brief Check if reassembly taking into account potential new vrR value
......@@ -74,7 +67,7 @@ protected_rlc_am_rx_list( rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_
* \param[in] rlcP RLC AM protocol instance pointer.
* \return TRUE if reassembly must be done, FALSE else
*/
protected_rlc_am_rx_list( boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);)
boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP)
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
......@@ -82,7 +75,7 @@ protected_rlc_am_rx_list( boolean_t rlc_am_rx_check_vr_reassemble(const protocol
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] tbP A PDU embedded in a mem_block_t.
*/
protected_rlc_am_rx_list( void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);)
void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);
/*! \fn void rlc_am_rx_mark_all_segments_received (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP)
* \brief Mark all PDUs having the same sequence number as first_segment_tbP with the information that all segments have been received.
......@@ -90,14 +83,14 @@ protected_rlc_am_rx_list( void rlc_am_rx_check_all_byte_segments(const protocol_
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] first_segment_tbP A PDU embedded in a mem_block_t, it is the first PDU in the RX buffer (list) that have its sequence number.
*/
protected_rlc_am_rx_list( void rlc_am_rx_mark_all_segments_received(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP);)
void rlc_am_rx_mark_all_segments_received(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP);
/*! \fn void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP)
* \brief Reassembly all SDUS that it is possible to reassembly by parsing the RX buffer and looking for PDUs having the flag 'all segments received'.
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
*/
protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP);)
void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP);
/*! \fn mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
* \brief Insert a PDU embedded in a mem_block_t in a list at a position before a designated element of the list.
......@@ -105,7 +98,7 @@ protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(const protocol
* \param[in] elementP Element in the list.
* \param[in] listP List where elements are linked.
*/
public_rlc_am_rx_list( mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);
/*! \fn mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
* \brief Insert a PDU embedded in a mem_block_t in a list at a position after a designated element of the list.
......@@ -113,13 +106,13 @@ public_rlc_am_rx_list( mem_block_t* list2_insert_before_element (mem_block_t * e
* \param[in] elementP Element in the list.
* \param[in] listP List where elements are linked.
*/
public_rlc_am_rx_list( mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);
/*! \fn void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP)
* \brief Display the dump of the RX buffer.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] messageP Message to be displayed along with the display of the dump of the RX buffer.
*/
protected_rlc_am_rx_list( void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP);)
void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP);
/** @} */
#endif
......@@ -35,21 +35,6 @@
# ifndef __RLC_AM_SEGMENT_H__
# define __RLC_AM_SEGMENT_H__
//-----------------------------------------------------------------------------
# ifdef RLC_AM_SEGMENT_C
# define private_rlc_am_segment(x) x
# define protected_rlc_am_segment(x) x
# define public_rlc_am_segment(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_segment(x)
# define protected_rlc_am_segment(x) extern x
# define public_rlc_am_segment(x) extern x
# else
# define private_rlc_am_segment(x)
# define protected_rlc_am_segment(x)
# define public_rlc_am_segment(x) extern x
# endif
# endif
/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu)
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
......@@ -58,13 +43,13 @@
* \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
* \param[in] payload_sizeP Size of the payload of the PDU.
*/
protected_rlc_am_segment(void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu);)
void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu);
/*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP)
* \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
*/
protected_rlc_am_segment(void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *const rlcP);)
void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *const rlcP);
/** @} */
# endif
......@@ -32,5 +32,63 @@
* @ingroup _rlc_am_internal_segment_impl_
* @{
*/
/* This file is empty. Should be removed */
#ifndef __RLC_AM_SEGMENT_HOLES_H__
# define __RLC_AM_SEGMENT_HOLES_H__
//-----------------------------------------------------------------------------
/*! \fn void rlc_am_clear_holes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP)
* \brief Remove all marked holes for PDU with sequence number "snP".
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number.
*/
void rlc_am_clear_holes (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP);
/*! \fn void rlc_am_remove_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
* \brief Remove for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number.
* \param[in] so_startP Start of segment offset.
* \param[in] so_stopP End of segment offset.
*/
void rlc_am_remove_hole (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const sdu_size_t so_startP,
const sdu_size_t so_stopP);
/*! \fn void rlc_am_get_next_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t* so_startP, sdu_size_t* so_stopP)
* \brief Get for PDU with sequence number "snP" the first hole start and stop parameters.
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number.
* \param[in,out] so_startP Start of segment offset.
* \param[in,out] so_stopP End of segment offset.
*/
void rlc_am_get_next_hole (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
sdu_size_t* const so_startP,
sdu_size_t* const so_stopP);
/*! \fn void rlc_am_add_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
* \brief Mark for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \param[in] snP Sequence number.
* \param[in,out] so_startP Start of segment offset.
* \param[in,out] so_stopP End of segment offset.
*/
void rlc_am_add_hole (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const sdu_size_t so_startP,
sdu_size_t so_stopP);
/** @} */
#endif
......@@ -37,21 +37,6 @@
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# ifdef RLC_AM_STATUS_REPORT_C
# define private_rlc_am_status_report(x) x
# define protected_rlc_am_status_report(x) x
# define public_rlc_am_status_report(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_status_report(x)
# define protected_rlc_am_status_report(x) extern x
# define public_rlc_am_status_report(x) extern x
# else
# define private_rlc_am_status_report(x)
# define protected_rlc_am_status_report(x)
# define public_rlc_am_status_report(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -65,7 +50,7 @@
* \param[in] bits_to_readP Number of bits to read (max 16).
* \return Value read on 16 bits, bits read are shifted to least significant bits of returned short value.
*/
protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP);)
uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP);
/*! \fn void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP)
* \brief Write N bits (max 8) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
......@@ -74,7 +59,7 @@ protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field
* \param[in] bits_to_writeP Number of bits to write (max 8).
* \param[in] valueP Value to write.
*/
protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP);)
void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP);
/*! \fn void rlc_am_write16_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint16_t valueP)
* \brief Write N bits (max 16) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
......@@ -83,11 +68,11 @@ protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dat
* \param[in] bits_to_writeP Number of bits to write (max 16).
* \param[in] valueP Value to write.
*/
protected_rlc_am_status_report(void rlc_am_write16_bit_field(
void rlc_am_write16_bit_field(
uint8_t** dataP,
unsigned int* bit_posP,
signed int bits_to_writeP,
const uint16_t valueP);)
const uint16_t valueP);
/*! \fn signed int rlc_am_get_control_pdu_infos (rlc_am_pdu_sn_10_t* const headerP, sdu_size_t * const total_sizeP, rlc_am_control_pdu_info_t* const pdu_infoP)
* \brief Retrieve control PDU informations from a serialized control PDU.
......@@ -95,16 +80,16 @@ protected_rlc_am_status_report(void rlc_am_write16_bit_field(
* \param[in] total_size_pP Pointer on PDU size in bytes.
* \param[in,out] pdu_infoP Struct containing interpreted PDU control informations.
*/
protected_rlc_am_status_report( signed int rlc_am_get_control_pdu_infos (
signed int rlc_am_get_control_pdu_infos (
rlc_am_pdu_sn_10_t* const headerP,
sdu_size_t * const total_size_pP,
rlc_am_control_pdu_info_t* const pdu_infoP);)
rlc_am_control_pdu_info_t* const pdu_infoP);
/*! \fn void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP)
* \brief Dump on LOG output the informations contained in the pdu_infoP structure.
* \param[in] pdu_infoP Struct containing interpreted PDU control informations.
*/
protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP);)
void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP);
/*! \fn void rlc_am_receive_process_control_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, mem_block_t* const tbP, uint8_t* first_byte, const uint16_t tb_size_in_bytes)
* \brief Process the informations contained in the control PDU.
......@@ -114,12 +99,12 @@ protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(const rlc_
* \param[in] first_byte Pointer on first byte of control PDU.
* \param[in] tb_size_in_bytes Pointer on size of serialized control PDU in bytes.
*/
protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
void rlc_am_receive_process_control_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
mem_block_t* const tbP,
uint8_t** first_byte,
sdu_size_t * const tb_size_in_bytes);)
sdu_size_t * const tb_size_in_bytes);
/*! \fn int rlc_am_write_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P, rlc_am_control_pdu_info_t* const pdu_infoP)
* \brief Remove all marked holes for PDU with sequence number "snP".
......@@ -129,19 +114,19 @@ protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
* \param[in] pdu_infoP Struct containing PDU control informations elements.
* \return The number of bytes that have been written.
*/
protected_rlc_am_status_report(int rlc_am_write_status_pdu(
int rlc_am_write_status_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P,
rlc_am_control_pdu_info_t* const pdu_infoP);)
rlc_am_control_pdu_info_t* const pdu_infoP);
/*! \fn void rlc_am_send_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Send a status PDU based on the receiver buffer content.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_status_report(void rlc_am_send_status_pdu(
void rlc_am_send_status_pdu(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP);)
rlc_am_entity_t *const rlc_pP);
/** @} */
#endif
......@@ -32,34 +32,19 @@
*/
# ifndef __RLC_AM_TEST_H__
# define __RLC_AM_TEST_H__
# ifdef RLC_AM_TEST_C
# define private_rlc_am_test(x) x
# define protected_rlc_am_test(x) x
# define public_rlc_am_test(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_test(x)
# define protected_rlc_am_test(x) extern x
# define public_rlc_am_test(x) extern x
# else
# define private_rlc_am_test(x)
# define protected_rlc_am_test(x)
# define public_rlc_am_test(x) extern x
# endif
# endif
public_rlc_am_test(rlc_am_entity_t g_am_tx;)
public_rlc_am_test(rlc_am_entity_t g_am_rx;)
rlc_am_entity_t g_am_tx;
rlc_am_entity_t g_am_rx;
protected_rlc_am_test(void rlc_am_v9_3_0_test_windows();)
protected_rlc_am_test(void rlc_am_v9_3_0_test_read_write_bit_field();)
protected_rlc_am_test(void rlc_am_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);)
protected_rlc_am_test(void rlc_am_v9_3_0_test_send_sdu(rlc_am_entity_t *am_txP, int sdu_indexP);)
protected_rlc_am_test(void rlc_am_v9_3_0_test_exchange_pdus(rlc_am_entity_t *am_txP,rlc_am_entity_t *am_RxP,
uint16_t bytes_txP,uint16_t bytes_rxP);)
protected_rlc_am_test(void rlc_am_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);)
protected_rlc_am_test(void rlc_am_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
mem_block_t *sduP);)
protected_rlc_am_test(void rlc_am_v9_3_0_test_tx_rx();)
public_rlc_am_test( void rlc_am_v9_3_0_test_print_trace (void);)
public_rlc_am_test( void rlc_am_v9_3_0_test());
void rlc_am_v9_3_0_test_windows();
void rlc_am_v9_3_0_test_read_write_bit_field();
void rlc_am_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);
void rlc_am_v9_3_0_test_send_sdu(rlc_am_entity_t *am_txP, int sdu_indexP);
void rlc_am_v9_3_0_test_exchange_pdus(rlc_am_entity_t *am_txP,rlc_am_entity_t *am_RxP,
uint16_t bytes_txP,uint16_t bytes_rxP);
void rlc_am_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);
void rlc_am_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
mem_block_t *sduP);
void rlc_am_v9_3_0_test_tx_rx();
void rlc_am_v9_3_0_test_print_trace (void);
void rlc_am_v9_3_0_test();
# endif
......@@ -35,21 +35,6 @@
#ifndef __RLC_AM_TIMER_POLL_RETRANSMIT_H__
# define __RLC_AM_TIMER_POLL_RETRANSMIT_H__
# ifdef RLC_AM_TIMER_POLL_RETRANSMIT_C
# define private_rlc_am_timer_poll_retransmit(x) x
# define protected_rlc_am_timer_poll_retransmit(x) x
# define public_rlc_am_timer_poll_retransmit(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_timer_poll_retransmit(x)
# define protected_rlc_am_timer_poll_retransmit(x) extern x
# define public_rlc_am_timer_poll_retransmit(x) extern x
# else
# define private_rlc_am_timer_poll_retransmit(x)
# define protected_rlc_am_timer_poll_retransmit(x)
# define public_rlc_am_timer_poll_retransmit(x) extern x
# endif
# endif
/*! \fn void rlc_am_check_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Check if timer Poll-retransmit has timed-out, if so it is stopped and has the status "timed-out".
......@@ -57,9 +42,9 @@
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_poll_retransmit(void rlc_am_check_timer_poll_retransmit(
void rlc_am_check_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP));
rlc_am_entity_t* const rlc_pP);
/*! \fn int rlc_am_is_timer_poll_retransmit_timed_out(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Boolean function, check if timer Poll-retransmit has timed-out.
......@@ -67,9 +52,9 @@ protected_rlc_am_timer_poll_retransmit(void rlc_am_check_timer_poll_retransmit(
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \return 1 if timer Poll-retransmit has timed-out, else 0.
*/
protected_rlc_am_timer_poll_retransmit(int rlc_am_is_timer_poll_retransmit_timed_out(
int rlc_am_is_timer_poll_retransmit_timed_out(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP);)
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_stop_and_reset_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Stop and reset the timer Poll-retransmit.
......@@ -77,9 +62,9 @@ protected_rlc_am_timer_poll_retransmit(int rlc_am_is_timer_poll_retransmit_time
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_poll_retransmit(void rlc_am_stop_and_reset_timer_poll_retransmit(
void rlc_am_stop_and_reset_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP);)
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_start_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Re-arm (based on RLC AM config parameter) and start timer Poll-retransmit.
......@@ -87,9 +72,9 @@ protected_rlc_am_timer_poll_retransmit(void rlc_am_stop_and_reset_timer_poll_ret
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] frame Frame index
*/
protected_rlc_am_timer_poll_retransmit(void rlc_am_start_timer_poll_retransmit(
void rlc_am_start_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP);)
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_init_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
* \brief Initialize the timer Poll-retransmit with RLC AM time-out config parameter.
......@@ -97,9 +82,9 @@ protected_rlc_am_timer_poll_retransmit(void rlc_am_start_timer_poll_retransmit(
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] time_outP Time-out in frame units.
*/
protected_rlc_am_timer_poll_retransmit(void rlc_am_init_timer_poll_retransmit(
void rlc_am_init_timer_poll_retransmit(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
const uint32_t time_outP);)
const uint32_t time_outP);
/** @} */
#endif
......@@ -34,48 +34,33 @@
*/
#ifndef __RLC_AM_TIMER_REORDERING_H__
# define __RLC_AM_TIMER_REORDERING_H__
# ifdef RLC_AM_TIMER_POLL_REORDERING_C
# define private_rlc_am_timer_reordering(x) x
# define protected_rlc_am_timer_reordering(x) x
# define public_rlc_am_timer_reordering(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_timer_reordering(x)
# define protected_rlc_am_timer_reordering(x) extern x
# define public_rlc_am_timer_reordering(x) extern x
# else
# define private_rlc_am_timer_reordering(x)
# define protected_rlc_am_timer_reordering(x)
# define public_rlc_am_timer_reordering(x) extern x
# endif
# endif
/*! \fn void rlc_am_check_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out".
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_reordering(void rlc_am_check_timer_reordering(
void rlc_am_check_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP));
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_stop_and_reset_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Stop and reset the timer reordering.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_reordering(void rlc_am_stop_and_reset_timer_reordering(
void rlc_am_stop_and_reset_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP);)
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_start_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Re-arm (based on RLC AM config parameter) and start timer reordering.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_reordering(void rlc_am_start_timer_reordering(
void rlc_am_start_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP);)
rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_init_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
* \brief Initialize the timer reordering with RLC AM time-out config parameter.
......@@ -83,9 +68,9 @@ protected_rlc_am_timer_reordering(void rlc_am_start_timer_reordering(
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] time_outP Time-out in frameP units.
*/
protected_rlc_am_timer_reordering(void rlc_am_init_timer_reordering(
void rlc_am_init_timer_reordering(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP,
const uint32_t time_outP);)
const uint32_t time_outP);
/** @} */
#endif
......@@ -34,42 +34,28 @@
*/
#ifndef __RLC_AM_TIMER_STATUS_PROHIBIT_H__
# define __RLC_AM_TIMER_STATUS_PROHIBIT_H__
# ifdef RLC_AM_TIMER_STATUS_PROHIBIT_C
# define private_rlc_am_timer_status_prohibit(x) x
# define protected_rlc_am_timer_status_prohibit(x) x
# define public_rlc_am_timer_status_prohibit(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_timer_status_prohibit(x)
# define protected_rlc_am_timer_status_prohibit(x) extern x
# define public_rlc_am_timer_status_prohibit(x) extern x
# else
# define private_rlc_am_timer_status_prohibit(x)
# define protected_rlc_am_timer_status_prohibit(x)
# define public_rlc_am_timer_status_prohibit(x) extern x
# endif
# endif
/*! \fn void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Check if timer status-prohibit has timed-out, if so it is stopped and has the status "timed-out".
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_status_prohibit(void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP));
void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_stop_and_reset_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Stop and reset the timer status-prohibit.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_status_prohibit(void rlc_am_stop_and_reset_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);)
void rlc_am_stop_and_reset_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_start_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
* \brief Re-arm (based on RLC AM config parameter) and start timer status-prohibit.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
protected_rlc_am_timer_status_prohibit(void rlc_am_start_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);)
void rlc_am_start_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);
/*! \fn void rlc_am_init_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
* \brief Initialize the timer status-prohibit with RLC AM time-out config parameter.
......@@ -77,6 +63,6 @@ protected_rlc_am_timer_status_prohibit(void rlc_am_start_timer_status_prohibit(c
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] time_outP Time-out in frameP units.
*/
protected_rlc_am_timer_status_prohibit(void rlc_am_init_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP);)
void rlc_am_init_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP);
/** @} */
#endif
......@@ -35,21 +35,6 @@
# ifndef __RLC_AM_WINDOWS_H__
# define __RLC_AM_WINDOWS_H__
//-----------------------------------------------------------------------------
# ifdef RLC_AM_WINDOWS_C
# define private_rlc_am_windows(x) x
# define protected_rlc_am_windows(x) x
# define public_rlc_am_windows(x) x
# else
# ifdef RLC_AM_MODULE
# define private_rlc_am_windows(x)
# define protected_rlc_am_windows(x) extern x
# define public_rlc_am_windows(x) extern x
# else
# define private_rlc_am_windows(x)
# define protected_rlc_am_windows(x)
# define public_rlc_am_windows(x) extern x
# endif
# endif
/*! \fn signed int rlc_am_in_tx_window(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
* \brief Boolean function, check if sequence number is VT(A) <= snP < VT(MS).
......@@ -58,10 +43,10 @@
* \param[in] snP Sequence number.
* \return 1 if snP in tx window, else 0.
*/
protected_rlc_am_windows(signed int rlc_am_in_tx_window(
signed int rlc_am_in_tx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP);)
const rlc_sn_t snP);
/*! \fn signed int rlc_am_in_rx_window(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
* \brief Boolean function, check if sequence number is VR(R) <= snP < VR(MR).
......@@ -70,10 +55,10 @@ protected_rlc_am_windows(signed int rlc_am_in_tx_window(
* \param[in] snP Sequence number.
* \return 1 if snP in rx window, else 0.
*/
protected_rlc_am_windows(signed int rlc_am_in_rx_window(
signed int rlc_am_in_rx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP);)
const rlc_sn_t snP);
/*! \fn signed int rlc_am_sn_gte_vr_h (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
* \brief Boolean function, check if sequence number is greater than or equal VR(R).
......@@ -82,10 +67,10 @@ protected_rlc_am_windows(signed int rlc_am_in_rx_window(
* \param[in] snP Sequence number.
* \return 1 if sequence number is greater than or equal VR(R), else 0.
*/
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_h (
signed int rlc_am_sn_gte_vr_h (
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP);)
const rlc_sn_t snP);
/*! \fn signed int rlc_am_sn_gte_vr_x (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
* \brief Boolean function, check if sequence number is greater than or equal VR(X).
......@@ -94,10 +79,10 @@ protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_h (
* \param[in] snP Sequence number.
* \return 1 if sequence number is greater than or equal VR(X), else 0.
*/
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_x (
signed int rlc_am_sn_gte_vr_x (
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP);)
const rlc_sn_t snP);
/*! \fn signed int rlc_am_sn_gt_vr_ms (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
* \brief Boolean function, check if sequence number is greater than VR(MS).
......@@ -106,10 +91,10 @@ protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_x (
* \param[in] snP Sequence number.
* \return 1 if sequence number is greater than VR(MS), else 0.
*/
protected_rlc_am_windows(signed int rlc_am_sn_gt_vr_ms(
signed int rlc_am_sn_gt_vr_ms(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP);)
const rlc_sn_t snP);
/*! \fn signed int rlc_am_tx_sn1_gt_sn2 (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t sn1P, const rlc_sn_t sn2P)
* \brief Boolean function, in the context of the tx window, check if sn1P is greater than sn2P.
......@@ -119,11 +104,11 @@ protected_rlc_am_windows(signed int rlc_am_sn_gt_vr_ms(
* \param[in] sn2P Sequence number.
* \return 1 if sn1P is greater than sn2P, else 0.
*/
protected_rlc_am_windows(signed int rlc_am_tx_sn1_gt_sn2(
signed int rlc_am_tx_sn1_gt_sn2(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P);)
const rlc_sn_t sn2P);
/*! \fn signed int rlc_am_rx_sn1_gt_sn2(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t sn1P, const rlc_sn_t sn2P)
* \brief Boolean function, in the context of the rx window, check if sn1P is greater than sn2P.
......@@ -133,10 +118,10 @@ protected_rlc_am_windows(signed int rlc_am_tx_sn1_gt_sn2(
* \param[in] sn2P Sequence number.
* \return 1 if sn1P is greater than sn2P, else 0.
*/
protected_rlc_am_windows(signed int rlc_am_rx_sn1_gt_sn2(
signed int rlc_am_rx_sn1_gt_sn2(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P);)
const rlc_sn_t sn2P);
/** @} */
# endif
......@@ -34,21 +34,6 @@
*/
# ifndef __RLC_TM_H__
# define __RLC_TM_H__
# ifdef RLC_TM_C
# define private_rlc_tm(x)
# define protected_rlc_tm(x)
# define public_rlc_tm(x)
# else
# ifdef RLC_TM_MODULE
# define private_rlc_tm(x)
# define protected_rlc_tm(x) extern x
# define public_rlc_tm(x) extern x
# else
# define private_rlc_tm(x)
# define protected_rlc_tm(x)
# define public_rlc_tm(x) extern x
# endif
# endif
# include "platform_types.h"
# include "rlc_def.h"
# include "rlc_def_lte.h"
......@@ -75,21 +60,21 @@
* \param[in] srcP SDU data pointer.
* \param[in] length_in_bitsP Length of SDU in bits.
*/
private_rlc_tm(void rlc_tm_send_sdu (
void rlc_tm_send_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlc_pP,
const boolean_t error_indicationP,
uint8_t * const srcP,
const sdu_size_t length_in_bitsP);)
const sdu_size_t length_in_bitsP);
/*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Schedule a SDU to be transmited by lower layers.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
private_rlc_tm(void rlc_tm_no_segment (
void rlc_tm_no_segment (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t *const rlcP);)
rlc_tm_entity_t *const rlcP);
/*! \fn void rlc_tm_rx (const protocol_ctxt_t* const ctxt_pP,void *const rlcP, struct mac_data_ind data_indP)
* \brief Process the received PDUs from lower layer.
......@@ -97,10 +82,10 @@ private_rlc_tm(void rlc_tm_no_segment (
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] data_indP PDUs from MAC.
*/
private_rlc_tm( void rlc_tm_rx (
void rlc_tm_rx (
const protocol_ctxt_t* const ctxt_pP,
void *const rlcP,
struct mac_data_ind data_indP);)
struct mac_data_ind data_indP);
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, const uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
......@@ -111,11 +96,12 @@ private_rlc_tm( void rlc_tm_rx (
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
* \return The maximum number of bytes that can be served by RLC instance to MAC.
*/
public_rlc_tm( struct mac_status_resp rlc_tm_mac_status_indication (
struct mac_status_resp
rlc_tm_mac_status_indication (
const protocol_ctxt_t* const ctxt_pP,
void * const rlcP,
const uint16_t tb_sizeP,
struct mac_status_ind tx_statusP);)
void * const rlc_pP,
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP);
/*! \fn struct mac_data_req rlc_tm_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void * const rlcP)
......@@ -124,9 +110,9 @@ public_rlc_tm( struct mac_status_resp rlc_tm_mac_status_indication (
* \param[in] rlcP RLC TM protocol instance pointer.
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
*/
public_rlc_tm( struct mac_data_req rlc_tm_mac_data_request (
struct mac_data_req rlc_tm_mac_data_request (
const protocol_ctxt_t* const ctxt_pP,
void * const rlcP);)
void * const rlcP);
/*! \fn void rlc_tm_mac_data_indication (const protocol_ctxt_t* const ctxt_pP,void * const rlcP, struct mac_data_ind data_indP)
......@@ -135,10 +121,10 @@ public_rlc_tm( struct mac_data_req rlc_tm_mac_data_request (
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] data_indP PDUs from MAC.
*/
public_rlc_tm( void rlc_tm_mac_data_indication (
void rlc_tm_mac_data_indication (
const protocol_ctxt_t* const ctxt_pP,
void * const rlcP,
struct mac_data_ind data_indP);)
struct mac_data_ind data_indP);
/*! \fn void rlc_tm_data_req (const protocol_ctxt_t* const ctxt_pP,void * const rlcP, mem_block_t * const sduP)
......@@ -147,10 +133,10 @@ public_rlc_tm( void rlc_tm_mac_data_indication (
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] sduP SDU. (A struct rlc_tm_data_req is mapped on sduP->data.)
*/
public_rlc_tm( void rlc_tm_data_req (
void rlc_tm_data_req (
const protocol_ctxt_t* const ctxt_pP,
void * const rlcP,
mem_block_t * const sduP);)
mem_block_t * const sduP);
/** @} */
# endif
......@@ -42,21 +42,6 @@
//# include "rlc.h"
# include "platform_types.h"
//-----------------------------------------------------------------------------
# ifdef RLC_TM_INIT_C
# define private_rlc_tm_init(x) x
# define protected_rlc_tm_init(x) x
# define public_rlc_tm_init(x) x
# else
# ifdef RLC_TM_MODULE
# define private_rlc_tm_init(x)
# define protected_rlc_tm_init(x) extern x
# define public_rlc_tm_init(x) extern x
# else
# define private_rlc_tm_init(x)
# define protected_rlc_tm_init(x)
# define public_rlc_tm_init(x) extern x
# endif
# endif
typedef volatile struct rlc_tm_info_s {
uint8_t is_uplink_downlink;
......@@ -75,35 +60,35 @@ typedef volatile struct rlc_tm_info_s {
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_tm_init( void config_req_rlc_tm (
void config_req_rlc_tm (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_tm_info_t * const config_tmP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP);
/*! \fn void rlc_tm_init (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Initialize a RLC TM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC TM protocol instance will be in RLC_NULL_STATE state.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
protected_rlc_tm_init(void rlc_tm_init (
void rlc_tm_init (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);)
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Reset protocol variables and state variables to initial values.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
protected_rlc_tm_init(void rlc_tm_reset_state_variables (
void rlc_tm_reset_state_variables (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);)
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
public_rlc_tm_init( void rlc_tm_cleanup(
rlc_tm_entity_t * const rlcP);)
void rlc_tm_cleanup(
rlc_tm_entity_t * const rlcP);
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
* \brief Configure RLC TM protocol parameters.
......@@ -111,10 +96,10 @@ public_rlc_tm_init( void rlc_tm_cleanup(
* \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY,
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
*/
protected_rlc_tm_init(void rlc_tm_configure(
void rlc_tm_configure(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const boolean_t is_uplink_downlinkP);)
const boolean_t is_uplink_downlinkP);
/*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
* \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
......@@ -123,12 +108,12 @@ protected_rlc_tm_init(void rlc_tm_configure(
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier
*/
protected_rlc_tm_init(void rlc_tm_set_debug_infos(
void rlc_tm_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP);
/** @} */
# endif
......@@ -34,21 +34,6 @@
*/
# ifndef __RLC_UM_H__
# define __RLC_UM_H__
# ifdef RLC_UM_C
# define private_rlc_um(x)
# define protected_rlc_um(x)
# define public_rlc_um(x)
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um(x)
# define protected_rlc_um(x) extern x
# define public_rlc_um(x) extern x
# else
# define private_rlc_um(x)
# define protected_rlc_um(x)
# define public_rlc_um(x) extern x
# endif
# endif
# include <errno.h>
# include "platform_types.h"
# include "rlc_def.h"
......@@ -141,7 +126,7 @@
* \param[out] stat_rx_data_bytes_out_of_window Number of data bytes received out of the receive window.
* \param[out] stat_timer_reordering_timed_out Number of times the timer "reordering" has timed-out.
*/
public_rlc_um(void rlc_um_stat_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,
void rlc_um_stat_req (rlc_um_entity_t *rlc_pP,
unsigned int* stat_tx_pdcp_sdu,
unsigned int* stat_tx_pdcp_bytes,
unsigned int* stat_tx_pdcp_sdu_discarded,
......@@ -158,23 +143,23 @@ public_rlc_um(void rlc_um_stat_req (const protocol_ctxt_t* const ctxt_pP
unsigned int* stat_rx_data_bytes_dropped,
unsigned int* stat_rx_data_pdu_out_of_window,
unsigned int* stat_rx_data_bytes_out_of_window,
unsigned int* stat_timer_reordering_timed_out);)
unsigned int* stat_timer_reordering_timed_out);
/*! \fn void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
private_rlc_um( void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP);)
void
rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP);
/*! \fn void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication)
* \brief Process the received PDUs from lower layer.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] data_indication PDUs from MAC.
*/
protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication);)
void
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP);
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
* \param[in] ctxt_pP Running context.
......@@ -183,14 +168,19 @@ protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
* \return The maximum number of bytes that can be served by RLC instance to MAC.
*/
public_rlc_um( struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP, const eNB_flag_t enb_flagP);)
struct mac_status_resp
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP)
* \brief Set available TBS size for MAC Tx.
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] tb_sizeP remaining TBS in bytes.
*/
public_rlc_um( void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP);)
void
rlc_um_set_nb_bytes_requested_by_mac (
void * rlc_pP,
const tb_size_t tb_sizeP
);
/*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP)
* \brief Gives PDUs to lower layer MAC.
......@@ -199,8 +189,8 @@ public_rlc_um( void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t
* \param[in] enb_flagP eNB or UE flag.
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
*/
public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP);)
struct mac_data_req
rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,struct mac_data_ind data_indP)
* \brief Receive PDUs from lower layer MAC.
......@@ -208,13 +198,12 @@ public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ct
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] data_indP PDUs from MAC.
*/
public_rlc_um( void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP);)
/*! \fn uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
* \brief Gets Tx Buffer Occupancy.
* \param[in] rlc_pP RLC UM protocol instance pointer.)
*/
public_rlc_um( uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP);)
uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP);
/*! \fn void rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *sduP)
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
......@@ -222,6 +211,9 @@ public_rlc_um( uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] sduP SDU. (A struct rlc_um_data_req is mapped on sduP->data.)
*/
public_rlc_um( void rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *sduP);)
void
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP);
void
rlc_um_data_req (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP) ;
/** @} */
# endif
......@@ -43,21 +43,6 @@
# include "DL-UM-RLC.h"
# include "UL-UM-RLC.h"
//-----------------------------------------------------------------------------
# ifdef RLC_UM_CONTROL_PRIMITIVES_C
# define private_rlc_um_control_primitives(x) x
# define protected_rlc_um_control_primitives(x) x
# define public_rlc_um_control_primitives(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_control_primitives(x)
# define protected_rlc_um_control_primitives(x) extern x
# define public_rlc_um_control_primitives(x) extern x
# else
# define private_rlc_um_control_primitives(x)
# define protected_rlc_um_control_primitives(x)
# define public_rlc_um_control_primitives(x) extern x
# endif
# endif
typedef volatile struct {
uint32_t is_uplink_downlink;
......@@ -79,12 +64,12 @@ typedef volatile struct {
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_um_control_primitives( void config_req_rlc_um (
void config_req_rlc_um (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_um_info_t * const config_umP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP);
/*! \fn void config_req_rlc_um_asn1 (
* const protocol_ctxt_t* const ctxt_pP,
......@@ -106,7 +91,7 @@ public_rlc_um_control_primitives( void config_req_rlc_um (
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
void config_req_rlc_um_asn1 (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t mbms_flagP,
......@@ -120,32 +105,32 @@ public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
);
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
protected_rlc_um_control_primitives(void rlc_um_init (
void rlc_um_init (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP);)
rlc_um_entity_t * const rlc_pP);
/*! \fn void rlc_um_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Reset protocol variables and state variables to initial values.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (
void rlc_um_reset_state_variables (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP);)
rlc_um_entity_t * const rlc_pP);
/*! \fn void rlc_um_cleanup(rlc_um_entity_t * const rlc_pP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
public_rlc_um_control_primitives( void rlc_um_cleanup(
rlc_um_entity_t * const rlc_pP);)
void rlc_um_cleanup(
rlc_um_entity_t * const rlc_pP);
/*! \fn void rlc_um_configure(
* const protocol_ctxt_t* const ctxt_pP,
......@@ -162,13 +147,13 @@ public_rlc_um_control_primitives( void rlc_um_cleanup(
* \param[in] tx_sn_field_lengthP Length of the sequence number, 5 or 10 bits in transmission.
* \param[in] is_mXchP Is the radio bearer for MCCH, MTCH.
*/
protected_rlc_um_control_primitives(void rlc_um_configure(
void rlc_um_configure(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t *const rlc_pP,
const uint32_t timer_reorderingP,
const uint32_t rx_sn_field_lengthP,
const uint32_t tx_sn_field_lengthP,
const uint32_t is_mXchP);)
const uint32_t is_mXchP);
/*! \fn void rlc_um_set_debug_infos(
* const protocol_ctxt_t* const ctxt_pP,
......@@ -182,11 +167,11 @@ protected_rlc_um_control_primitives(void rlc_um_configure(
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
protected_rlc_um_control_primitives(void rlc_um_set_debug_infos(
void rlc_um_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP);
/** @} */
# endif
This diff is collapsed.
......@@ -35,21 +35,6 @@
# ifndef __RLC_UM_FSM_PROTO_EXTERN_H__
# define __RLC_UM_FSM_PROTO_EXTERN_H__
//-----------------------------------------------------------------------------
# ifdef RLC_UM_FSM_C
# define private_rlc_um_fsm(x) x
# define protected_rlc_um_fsm(x) x
# define public_rlc_um_fsm(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_fsm(x)
# define protected_rlc_um_fsm(x) extern x
# define public_rlc_um_fsm(x) extern x
# else
# define private_rlc_um_fsm(x)
# define protected_rlc_um_fsm(x)
# define public_rlc_um_fsm(x) extern x
# endif
# endif
# include "platform_types.h"
# include "rlc_um_entity.h"
//-----------------------------------------------------------------------------
......@@ -65,6 +50,6 @@
* \return 1 if no error was encountered, 0 if the event was not processed.
* \Note This FSM is not LTE 9.3.0 compliant, it has to be modified or removed.
*/
protected_rlc_um_fsm(int rlc_um_fsm_notify_event (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t eventP));
int rlc_um_fsm_notify_event (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t eventP);
/** @} */
# endif
......@@ -35,21 +35,6 @@
# ifndef __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__
# define __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__
//-----------------------------------------------------------------------------
# ifdef RLC_UM_REASSEMBLY_C
# define private_rlc_um_reassembly(x) x
# define protected_rlc_um_reassembly(x) x
# define public_rlc_um_reassembly(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_reassembly(x)
# define protected_rlc_um_reassembly(x) extern x
# define public_rlc_um_reassembly(x) extern x
# else
# define private_rlc_um_reassembly(x)
# define protected_rlc_um_reassembly(x)
# define public_rlc_um_reassembly(x) extern x
# endif
# endif
# include "rlc_um_entity.h"
//-----------------------------------------------------------------------------
/*! \fn void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
......@@ -57,7 +42,7 @@
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC UM protocol instance pointer.
*/
protected_rlc_um_reassembly(void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP);
/*! \fn void rlc_um_reassembly (uint8_t * srcP, int32_t lengthP, rlc_um_entity_t *rlcP, frame_t frame)
* \brief Reassembly lengthP bytes to the end of the SDU in construction.
......@@ -66,13 +51,13 @@ protected_rlc_um_reassembly(void rlc_um_clear_rx_sdu (const protocol_ctxt_t* con
* \param[in] srcP Pointer on data to be reassemblied.
* \param[in] lengthP Length to reassembly.
*/
protected_rlc_um_reassembly(void rlc_um_reassembly (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t * srcP, int32_t lengthP));
void rlc_um_reassembly (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t * srcP, int32_t lengthP);
/*! \fn void rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
* \brief Send SDU if any reassemblied to upper layer.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC UM protocol instance pointer.
*/
protected_rlc_um_reassembly(void rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
void rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP);
/** @} */
# endif
......@@ -33,22 +33,6 @@
*/
# ifndef __RLC_UM_RECEIVER_PROTO_EXTERN_H__
# define __RLC_UM_RECEIVER_PROTO_EXTERN_H__
# ifdef RLC_UM_RECEIVER_C
# define private_rlc_um_receiver(x) x
# define protected_rlc_um_receiver(x) x
# define public_rlc_um_receiver(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_receiver(x)
# define protected_rlc_um_receiver(x) extern x
# define public_rlc_um_receiver(x) extern x
# else
# define private_rlc_um_receiver(x)
# define protected_rlc_um_receiver(x)
# define public_rlc_um_receiver(x) extern x
# endif
# endif
# include "rlc_um_entity.h"
# include "mac_primitives.h"
......@@ -57,7 +41,7 @@
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
protected_rlc_um_receiver( void rlc_um_display_rx_window(const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP);)
void rlc_um_display_rx_window(const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP);
/*! \fn void rlc_um_receive (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP)
* \brief Handle the MAC data indication, retreive the transport blocks and send them one by one to the DAR process.
......@@ -65,6 +49,6 @@ protected_rlc_um_receiver( void rlc_um_display_rx_window(const protocol_ctxt_t*
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] data_indP Data indication structure containing transport block received from MAC layer.
*/
protected_rlc_um_receiver( void rlc_um_receive (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP));
void rlc_um_receive (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP);
/** @} */
# endif
......@@ -40,27 +40,12 @@
# include "rlc_um_constants.h"
# include "list.h"
//-----------------------------------------------------------------------------
# ifdef RLC_UM_SEGMENT_C
# define private_rlc_um_segment(x) x
# define protected_rlc_um_segment(x) x
# define public_rlc_um_segment(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_segment(x)
# define protected_rlc_um_segment(x) extern x
# define public_rlc_um_segment(x) extern x
# else
# define private_rlc_um_segment(x)
# define protected_rlc_um_segment(x)
# define public_rlc_um_segment(x) extern x
# endif
# endif
/*! \fn void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
* \brief Segmentation procedure with 10 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer".
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC UM protocol instance pointer.
*/
protected_rlc_um_segment(void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP);
/*! \fn void rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
......@@ -68,6 +53,6 @@ protected_rlc_um_segment(void rlc_um_segment_10 (const protocol_ctxt_t* const ct
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC UM protocol instance pointer.
*/
protected_rlc_um_segment(void rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
void rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP);
/** @} */
# endif
......@@ -21,37 +21,22 @@
# ifndef __RLC_UM_TEST_H__
# define __RLC_UM_TEST_H__
# ifdef RLC_UM_TEST_C
# define private_rlc_um_test(x) x
# define protected_rlc_um_test(x) x
# define public_rlc_um_test(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_test(x)
# define protected_rlc_um_test(x) extern x
# define public_rlc_um_test(x) extern x
# else
# define private_rlc_um_test(x)
# define protected_rlc_um_test(x)
# define public_rlc_um_test(x) extern x
# endif
# endif
public_rlc_um_test(rlc_um_entity_t um_tx;)
public_rlc_um_test(rlc_um_entity_t um_rx;)
rlc_um_entity_t um_tx;
rlc_um_entity_t um_rx;
protected_rlc_um_test(void rlc_um_v9_3_0_test_windows_5(void);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_windows_10(void);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_send_sdu(rlc_um_entity_t *um_txP, int sdu_indexP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_exchange_pdus(rlc_um_entity_t *um_txP,rlc_um_entity_t *um_RxP, uint16_t bytes_txP,uint16_t bytes_rxP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_exchange_delayed_pdus(rlc_um_entity_t *um_txP, rlc_um_entity_t *um_rxP, uint16_t bytes_txP, uint16_t bytes_rxP, signed int time_tx_delayedP,
signed int time_rx_delayedP, int is_frame_incrementedP);)
protected_rlc_um_test(void rlc_um_v9_3_0_buffer_delayed_rx_mac_data_ind(struct mac_data_ind* data_ind_rxP, signed int time_tx_delayedP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
mem_block_t *sduP);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_tx_rx_10(void);)
protected_rlc_um_test(void rlc_um_v9_3_0_test_tx_rx_5(void);)
public_rlc_um_test( void rlc_um_v9_3_0_test_print_trace (void);)
public_rlc_um_test( void rlc_um_v9_3_0_test(void));
void rlc_um_v9_3_0_test_windows_5(void);
void rlc_um_v9_3_0_test_windows_10(void);
void rlc_um_v9_3_0_test_data_conf(module_id_t module_idP, rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP);
void rlc_um_v9_3_0_test_send_sdu(rlc_um_entity_t *um_txP, int sdu_indexP);
void rlc_um_v9_3_0_test_exchange_pdus(rlc_um_entity_t *um_txP,rlc_um_entity_t *um_RxP, uint16_t bytes_txP,uint16_t bytes_rxP);
void rlc_um_v9_3_0_test_exchange_delayed_pdus(rlc_um_entity_t *um_txP, rlc_um_entity_t *um_rxP, uint16_t bytes_txP, uint16_t bytes_rxP, signed int time_tx_delayedP,
signed int time_rx_delayedP, int is_frame_incrementedP);
void rlc_um_v9_3_0_buffer_delayed_rx_mac_data_ind(struct mac_data_ind* data_ind_rxP, signed int time_tx_delayedP);
void rlc_um_v9_3_0_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP);
void rlc_um_v9_3_0_test_data_ind (module_id_t module_idP, rb_id_t rb_idP, sdu_size_t sizeP,
mem_block_t *sduP);
void rlc_um_v9_3_0_test_tx_rx_10(void);
void rlc_um_v9_3_0_test_tx_rx_5(void);
void rlc_um_v9_3_0_test_print_trace (void);
void rlc_um_v9_3_0_test(void);
# endif
......@@ -37,21 +37,6 @@
# include "rlc_um_structs.h"
# include "rlc_um_constants.h"
//-----------------------------------------------------------------------------
# ifdef RLC_UM_VERY_SIMPLE_TEST_C
# define private_rlc_um_very_simple_test(x) x
# define protected_rlc_um_very_simple_test(x) x
# define public_rlc_um_very_simple_test(x) x
# else
# ifdef RLC_UM_MODULE
# define private_rlc_um_very_simple_test(x)
# define protected_rlc_um_very_simple_test(x) extern x
# define public_rlc_um_very_simple_test(x) extern x
# else
# define private_rlc_um_very_simple_test(x)
# define protected_rlc_um_very_simple_test(x)
# define public_rlc_um_very_simple_test(x) extern x
# endif
# endif
#define RLC_UM_TEST_SDU_TYPE_TCPIP 0
#define RLC_UM_TEST_SDU_TYPE_VOIP 1
#define RLC_UM_TEST_SDU_TYPE_SMALL 2
......@@ -61,5 +46,5 @@
#define voip_sdu "Nos tests montrent que le nouveau Toshiba MK7559GSXP, un disque dur de 750 Go"
#define very_small_sdu "NoS tEsTs MoNtReNt"
public_rlc_um_very_simple_test(void rlc_um_test_send_sdu (rlc_um_entity_t* rlcP, uint32_t frame, unsigned int sdu_typeP));
void rlc_um_test_send_sdu (rlc_um_entity_t* rlcP, uint32_t frame, unsigned int sdu_typeP);
# endif
......@@ -30,6 +30,7 @@
#include "rlc.h"
#include "mem_block.h"
#include "../MAC/mac_extern.h"
#include "LAYER2/RLC/UM_v9.3.0/rlc_um.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
......@@ -226,8 +227,7 @@ rlc_op_status_t rlc_stat_req (
*stat_rx_data_bytes_out_of_window = 0;
*stat_timer_poll_retransmit_timed_out = 0;
*stat_timer_status_prohibit_timed_out = 0;
rlc_um_stat_req (ctxt_pP,
&rlc_union_p->rlc.um,
rlc_um_stat_req (&rlc_union_p->rlc.um,
stat_tx_pdcp_sdu,
stat_tx_pdcp_bytes,
stat_tx_pdcp_sdu_discarded,
......
This diff is collapsed.
......@@ -30,6 +30,7 @@
//-----------------------------------------------------------------------------
#define RLC_MAC_C
#include "rlc.h"
#include "LAYER2/RLC/UM_v9.3.0/rlc_um.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h"
......
......@@ -30,21 +30,6 @@
#ifndef __RRC_UE_RAL_H__
# define __RRC_UE_RAL_H__
//-----------------------------------------------------------------------------
# ifdef RRC_UE_RAL_C
# define private_rrc_ue_ral(x) x
# define protected_rrc_ue_ral(x) x
# define public_rrc_ue_ral(x) x
# else
# ifdef RRC_UE
# define private_rrc_ue_ral(x)
# define protected_rrc_ue_ral(x) extern x
# define public_rrc_ue_ral(x) extern x
# else
# define private_rrc_ue_ral(x)
# define protected_rrc_ue_ral(x)
# define public_rrc_ue_ral(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
......@@ -58,7 +43,7 @@
#include "ral_messages_types.h"
#include "defs.h"
private_rrc_ue_ral( int rrc_ue_ral_delete_all_thresholds_type (unsigned int mod_idP, ral_link_param_type_t *param_type_pP);)
private_rrc_ue_ral( int rrc_ue_ral_delete_threshold (unsigned int mod_idP, ral_link_param_type_t *param_type_pP, ral_threshold_t *threshold_pP);)
protected_rrc_ue_ral(int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageDef *msg_pP);)
int rrc_ue_ral_delete_all_thresholds_type (unsigned int mod_idP, ral_link_param_type_t *param_type_pP);
int rrc_ue_ral_delete_threshold (unsigned int mod_idP, ral_link_param_type_t *param_type_pP, ral_threshold_t *threshold_pP);
int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageDef *msg_pP);
#endif
......@@ -30,21 +30,6 @@
#ifndef __RRC_ENB_RAL_H__
# define __RRC_ENB_RAL_H__
//-----------------------------------------------------------------------------
# ifdef RRC_ENB_RAL_C
# define private_rrc_enb_ral(x) x
# define protected_rrc_enb_ral(x) x
# define public_rrc_enb_ral(x) x
# else
# ifdef RRC_ENB
# define private_rrc_enb_ral(x)
# define protected_rrc_enb_ral(x) extern x
# define public_rrc_enb_ral(x) extern x
# else
# define private_rrc_enb_ral(x)
# define protected_rrc_enb_ral(x)
# define public_rrc_enb_ral(x) extern x
# endif
# endif
//-----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
......@@ -59,9 +44,9 @@
#include "defs.h"
private_rrc_enb_ral( int rrc_enb_ral_delete_all_thresholds_type (unsigned int mod_idP, ral_link_param_type_t *param_type_pP);)
private_rrc_enb_ral( int rrc_enb_ral_delete_threshold (unsigned int mod_idP, ral_link_param_type_t* param_type_pP,
ral_threshold_t* threshold_pP);)
protected_rrc_enb_ral(int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageDef *msg_pP);)
int rrc_enb_ral_delete_all_thresholds_type (unsigned int mod_idP, ral_link_param_type_t *param_type_pP);
int rrc_enb_ral_delete_threshold (unsigned int mod_idP, ral_link_param_type_t* param_type_pP,
ral_threshold_t* threshold_pP);
int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageDef *msg_pP);
#endif
......@@ -38,30 +38,14 @@
extern "C" {
#endif
# ifdef COMPONENT_CLI
# ifdef COMPONENT_CLI_IF
# define private_cli_if(x) x
# define friend_cli_if(x) x
# define public_cli_if(x) x
# else
# define private_cli_if(x)
# define friend_cli_if(x) extern x
# define public_cli_if(x) extern x
# endif
# else
# define private_cli_if(x)
# define friend_cli_if(x)
# define public_cli_if(x) extern x
# endif
/** @defgroup _cli_if Interfaces of CLI
* @{*/
public_cli_if( void cli_init (void); )
public_cli_if( int cli_server_init(cli_handler_t handler); )
public_cli_if(void cli_server_cleanup(void);)
public_cli_if(void cli_server_recv(const void * data, socklen_t len);)
void cli_init (void);
int cli_server_init(cli_handler_t handler);
void cli_server_cleanup(void);
void cli_server_recv(const void * data, socklen_t len);
/* @}*/
#ifdef __cplusplus
......
......@@ -32,21 +32,6 @@
#include "types.h"
//-----------------------------------------------------------------------------
# ifdef list_C
# define private_list(x) x
# define public_list(x) x
# else
# define private_list(x)
# define public_list(x) extern x
# endif
# ifdef LIST2_C
# define private_list2(x) x
# define public_list2(x) x
# else
# define private_list2(x)
# define public_list2(x) extern x
# endif
//-----------------------------------------------------------------------------
typedef struct Job_List_s {
Job_elt_t *head;
......@@ -67,36 +52,36 @@ typedef struct Packet_OTG_List_s {
} Packet_OTG_List_t;
//-----------------------------------------------------------------------------
public_list( void job_list_init (Job_List_t*);)
public_list( void job_list_free (Job_List_t* listP);)
public_list( Job_elt_t* job_list_get_head (Job_List_t*);)
public_list( Job_elt_t* job_list_remove_head (Job_List_t* );)
public_list( Job_elt_t* job_list_remove_element (Job_elt_t*, Job_List_t*);)
public_list( void job_list_add_head (Job_elt_t* , Job_List_t* );)
public_list( void job_list_add_tail_eurecom (Job_elt_t* , Job_List_t* );)
public_list( void job_list_add_list (Job_List_t* , Job_List_t* );)
public_list( void job_list_display (Job_List_t* );)
void job_list_init (Job_List_t*);
void job_list_free (Job_List_t* listP);
Job_elt_t* job_list_get_head (Job_List_t*);
Job_elt_t* job_list_remove_head (Job_List_t* );
Job_elt_t* job_list_remove_element (Job_elt_t*, Job_List_t*);
void job_list_add_head (Job_elt_t* , Job_List_t* );
void job_list_add_tail_eurecom (Job_elt_t* , Job_List_t* );
void job_list_add_list (Job_List_t* , Job_List_t* );
void job_list_display (Job_List_t* );
public_list( void event_list_init (Event_List_t*);)
public_list( void event_list_free (Event_List_t* listP);)
public_list( Event_elt_t* event_list_get_head (Event_List_t*);)
public_list( Event_elt_t* event_list_remove_head (Event_List_t* );)
public_list( Event_elt_t* event_list_remove_element (Event_elt_t*, Event_List_t*);)
public_list( void event_list_add_head (Event_elt_t* , Event_List_t* );)
public_list( void event_list_add_element (Event_elt_t* , Event_elt_t* , Event_List_t* );)
public_list( void event_list_add_tail_eurecom (Event_elt_t* , Event_List_t* );)
public_list( void event_list_add_list (Event_List_t* , Event_List_t* );)
public_list( void event_list_display (Event_List_t* );)
void event_list_init (Event_List_t*);
void event_list_free (Event_List_t* listP);
Event_elt_t* event_list_get_head (Event_List_t*);
Event_elt_t* event_list_remove_head (Event_List_t* );
Event_elt_t* event_list_remove_element (Event_elt_t*, Event_List_t*);
void event_list_add_head (Event_elt_t* , Event_List_t* );
void event_list_add_element (Event_elt_t* , Event_elt_t* , Event_List_t* );
void event_list_add_tail_eurecom (Event_elt_t* , Event_List_t* );
void event_list_add_list (Event_List_t* , Event_List_t* );
void event_list_display (Event_List_t* );
public_list( void pkt_list_init (Packet_OTG_List_t*);)
public_list( void pkt_list_free (Packet_OTG_List_t* listP);)
public_list( Packet_otg_elt_t* pkt_list_get_head (Packet_OTG_List_t*);)
public_list( Packet_otg_elt_t* pkt_list_remove_head (Packet_OTG_List_t* );)
public_list( Packet_otg_elt_t* pkt_list_remove_element (Packet_otg_elt_t*, Packet_OTG_List_t*);)
public_list( void pkt_list_add_head (Packet_otg_elt_t* , Packet_OTG_List_t* );)
public_list( void pkt_list_add_element (Packet_otg_elt_t* , Packet_otg_elt_t* , Packet_OTG_List_t* );)
public_list( void pkt_list_add_tail_eurecom (Packet_otg_elt_t* , Packet_OTG_List_t* );)
public_list( void pkt_list_add_list (Packet_OTG_List_t* , Packet_OTG_List_t* );)
public_list( void pkt_list_display (Packet_OTG_List_t* );)
void pkt_list_init (Packet_OTG_List_t*);
void pkt_list_free (Packet_OTG_List_t* listP);
Packet_otg_elt_t* pkt_list_get_head (Packet_OTG_List_t*);
Packet_otg_elt_t* pkt_list_remove_head (Packet_OTG_List_t* );
Packet_otg_elt_t* pkt_list_remove_element (Packet_otg_elt_t*, Packet_OTG_List_t*);
void pkt_list_add_head (Packet_otg_elt_t* , Packet_OTG_List_t* );
void pkt_list_add_element (Packet_otg_elt_t* , Packet_otg_elt_t* , Packet_OTG_List_t* );
void pkt_list_add_tail_eurecom (Packet_otg_elt_t* , Packet_OTG_List_t* );
void pkt_list_add_list (Packet_OTG_List_t* , Packet_OTG_List_t* );
void pkt_list_display (Packet_OTG_List_t* );
#endif
......@@ -39,66 +39,36 @@
#ifndef __LIST_H__
# define __LIST_H__
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# ifdef LIST_C
# define private_list(x) x
# define public_list(x) x
# else
# define private_list(x)
# define public_list(x) extern x
# endif
# ifdef LIST2_C
# define private_list2(x) x
# define public_list2(x) x
# else
# define private_list2(x)
# define public_list2(x) extern x
# endif
//-----------------------------------------------------------------------------
#include "platform_constants.h"
#include<linux/types.h>
#include<stdlib.h>
#include<sys/queue.h>
#define LIST_NAME_MAX_CHAR 32
#include "UTIL/MEM/mem_block.h"
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list2_t;
//-----------------------------------------------------------------------------
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list_t;
//-----------------------------------------------------------------------------
public_list( void list_init (list_t* , char *);)
public_list( void list_free (list_t* listP);)
public_list( mem_block_t* list_get_head (list_t*);)
public_list( mem_block_t* list_remove_head (list_t* );)
public_list( mem_block_t* list_remove_element (mem_block_t*, list_t*);)
public_list( void list_add_head (mem_block_t* , list_t* );)
public_list( void list_add_tail_eurecom (mem_block_t* , list_t* );)
public_list( void list_add_list (list_t* , list_t* );)
public_list( void list_display (list_t* );)
void list_init (list_t* , char *);
void list_free (list_t* listP);
mem_block_t* list_get_head (list_t*);
mem_block_t* list_remove_head (list_t* );
mem_block_t* list_remove_element (mem_block_t*, list_t*);
void list_add_head (mem_block_t* , list_t* );
void list_add_tail_eurecom (mem_block_t* , list_t* );
void list_add_list (list_t* , list_t* );
void list_display (list_t* );
//-----------------------------------------------------------------------------
public_list2( void list2_init (list2_t*, char*);)
public_list2( void list2_free (list2_t* );)
public_list2( mem_block_t* list2_get_head (list2_t*);)
public_list2( mem_block_t* list2_get_tail (list2_t*);)
public_list2( mem_block_t* list2_remove_element (mem_block_t* , list2_t* );)
public_list2( mem_block_t* list2_remove_head (list2_t* );)
public_list2( mem_block_t* list2_remove_tail (list2_t* );)
public_list2( void list2_add_head (mem_block_t* , list2_t* );)
public_list2( void list2_add_tail (mem_block_t* , list2_t* );)
public_list2( void list2_add_list (list2_t* , list2_t* );)
public_list2( void list2_display (list2_t* );)
void list2_init (list2_t*, char*);
void list2_free (list2_t* );
mem_block_t* list2_get_head (list2_t*);
mem_block_t* list2_get_tail (list2_t*);
mem_block_t* list2_remove_element (mem_block_t* , list2_t* );
mem_block_t* list2_remove_head (list2_t* );
mem_block_t* list2_remove_tail (list2_t* );
void list2_add_head (mem_block_t* , list2_t* );
void list2_add_tail (mem_block_t* , list2_t* );
void list2_add_list (list2_t* , list2_t* );
void list2_display (list2_t* );
//-----------------------------------------------------------------------------
/* The following lists are used for sorting numbers */
#ifndef LINUX_LIST
......@@ -126,11 +96,11 @@ struct list {
};
#endif
//-----------------------------------------------------------------------------
public_list2( void push_front (struct list*, double); )
public_list2( void initialize (struct list*); )
public_list2( void del (struct list*); )
public_list2( void totable (double*, struct list*);)
public_list2( int compare (const void * a, const void * b);)
public_list2( int32_t calculate_median(struct list *loc_list);)
void push_front (struct list*, double);
void initialize (struct list*);
void del (struct list*);
void totable (double*, struct list*);
int compare (const void * a, const void * b);
int32_t calculate_median(struct list *loc_list);
#endif
......@@ -32,13 +32,7 @@
# define __MEM_BLOCK_H__
#include <stdint.h>
#ifdef MEM_BLOCK_C
# define public_mem_block(x) x
# define private_mem_block(x) x
#else
# define public_mem_block(x) extern x
# define private_mem_block(x)
#endif
#include "openair2/COMMON/platform_constants.h"
//-----------------------------------------------------------------------------
typedef struct mem_block_t {
......@@ -47,21 +41,20 @@ typedef struct mem_block_t {
unsigned char pool_id;
unsigned char *data;
} mem_block_t;
#include "UTIL/LISTS/list.h"
//-----------------------------------------------------------------------------
public_mem_block(void *pool_buffer_init (void);)
public_mem_block(void *pool_buffer_clean (void *arg);)
public_mem_block(void free_mem_block (mem_block_t * leP, const char* caller);)
public_mem_block(mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);)
public_mem_block(mem_block_t *get_free_copy_mem_block (void);)
public_mem_block(mem_block_t *get_free_copy_mem_block_up (void);)
public_mem_block(mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);)
public_mem_block(void display_mem_load (void);)
public_mem_block(void check_mem_area (void);)
private_mem_block(void check_free_mem_block (mem_block_t * leP);)
void *pool_buffer_init (void);
void *pool_buffer_clean (void *arg);
void free_mem_block (mem_block_t * leP, const char* caller);
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);
mem_block_t *get_free_copy_mem_block (void);
mem_block_t *get_free_copy_mem_block_up (void);
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);
void display_mem_load (void);
void check_mem_area (void);
void check_free_mem_block (mem_block_t * leP);
# define MEM_SCALE MAX_MOBILES_PER_ENB
// definition of the size of the allocated memory area
# define MEM_MNGT_MB0_BLOCK_SIZE 64
......@@ -139,9 +132,26 @@ private_mem_block(void check_free_mem_block (mem_block_t * leP);)
# define MEM_MNGT_NB_ELEMENTS MEM_MNGT_MB0_NB_BLOCKS + MEM_MNGT_MB1_NB_BLOCKS + MEM_MNGT_MB2_NB_BLOCKS + MEM_MNGT_MB3_NB_BLOCKS + MEM_MNGT_MB4_NB_BLOCKS + MEM_MNGT_MB5_NB_BLOCKS + MEM_MNGT_MB6_NB_BLOCKS + MEM_MNGT_MB7_NB_BLOCKS + MEM_MNGT_MB8_NB_BLOCKS + MEM_MNGT_MB9_NB_BLOCKS + MEM_MNGT_MB10_NB_BLOCKS + MEM_MNGT_MB11_NB_BLOCKS + MEM_MNGT_MB12_NB_BLOCKS + MEM_MNGT_MBCOPY_NB_BLOCKS
# define MEM_MNGT_POOL_ID_COPY 13
#define LIST_NAME_MAX_CHAR 32
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list2_t;
//-----------------------------------------------------------------------------
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list_t;
private_mem_block(typedef struct {
typedef struct {
//-----------------------------------------------------------
// basic memory management
//-----------------------------------------------------------
......@@ -161,9 +171,9 @@ private_mem_block(typedef struct {
mem_block_t mem_blocks[MEM_MNGT_NB_ELEMENTS];
list_t mem_lists[14];
} mem_pool;)
} mem_pool;
private_mem_block(mem_pool mem_block_var;)
mem_pool mem_block_var;
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment