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

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

Signed-off-by: Raphael Defosseux's 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,
const srb_flag_t srb_flagP,
const rlc_am_info_t * const config_amP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
void
config_req_rlc_am (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_am_info_t * config_am_pP,
const rb_id_t rb_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 *