Commit 45599fe4 authored by Thomas Laurent's avatar Thomas Laurent

full remove of prototype macros in rlc and dpcp

parent fcd4aba0
This diff is collapsed.
......@@ -35,9 +35,6 @@
# ifndef __RLC_AM_H__
# define __RLC_AM_H__
# define private_rlc_am(x) x
# define protected_rlc_am(x) x
# define public_rlc_am(x) x
# include "platform_types.h"
# include "rlc_def.h"
# include "rlc_def_lte.h"
......@@ -105,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_
* @{
......@@ -138,12 +135,12 @@ 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);
/** @} */
......@@ -208,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,
......@@ -237,7 +234,7 @@ 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.
......@@ -256,7 +253,7 @@ rlc_am_get_pdus (
* \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.
......@@ -267,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.
......@@ -283,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.
......@@ -291,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.
......@@ -306,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,9 +34,6 @@
*/
# ifndef __RLC_AM_IN_SDU_H__
# define __RLC_AM_IN_SDU_H__
# define private_rlc_am_in_sdu(x) x
# define protected_rlc_am_in_sdu(x) x
# define public_rlc_am_in_sdu(x) x
/*! \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.
......@@ -44,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)
......@@ -54,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)
......@@ -63,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.
......@@ -71,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,9 +37,6 @@
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# define private_rlc_am_init(x) x
# define protected_rlc_am_init(x) x
# define public_rlc_am_init(x) x
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -64,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.
......@@ -84,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)
......@@ -102,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,15 +34,12 @@
*/
#ifndef __RLC_AM_REASSEMBLY_H__
# define __RLC_AM_REASSEMBLY_H__
# define private_rlc_am_reassembly(x) x
# define protected_rlc_am_reassembly(x) x
# define public_rlc_am_reassembly(x) x
/*! \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.
......@@ -51,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.
......@@ -67,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,9 +34,6 @@
*/
# ifndef __RLC_AM_RECEIVER_H__
# define __RLC_AM_RECEIVER_H__
# define private_rlc_am_receiver(x) x
# define protected_rlc_am_receiver(x) x
# define public_rlc_am_receiver(x) x
/*! \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.
......@@ -46,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.
......@@ -59,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).
......@@ -68,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).
......@@ -77,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).
......@@ -85,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.
......@@ -95,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,9 +35,6 @@
# ifndef __RLC_AM_RETRANSMIT_H__
# define __RLC_AM_RETRANSMIT_H__
//-----------------------------------------------------------------------------
# define private_rlc_am_retransmit(x) x
# define protected_rlc_am_retransmit(x) x
# define public_rlc_am_retransmit(x) x
/*! \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.
......@@ -49,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.
......@@ -65,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.
......@@ -78,10 +75,10 @@ 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);
#if 0
/*! \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)
......@@ -92,11 +89,11 @@ protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
* \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.
*/
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_subsegment (
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));
sdu_size_t *const sizeP);
#endif
/*! \fn mem_block_t* rlc_am_get_pdu_to_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
......@@ -105,18 +102,18 @@ protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_subsegment (
* \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);)
rlc_am_entity_t* const rlcP);
#if 0
/*! \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.
*/
protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
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);
#endif
/*! \fn void rlc_am_tx_buffer_display (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* rlcP, char* message_pP)
......@@ -125,9 +122,9 @@ protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
* \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
......@@ -37,9 +37,6 @@
# define __RLC_AM_RX_LIST_H__
# include "UTIL/MEM/mem_block.h"
# define private_rlc_am_rx_list(x) x
# define protected_rlc_am_rx_list(x) x
# define public_rlc_am_rx_list(x) x
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -53,7 +50,7 @@
* \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);
#if 0
/*! \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)
......@@ -63,7 +60,7 @@ protected_rlc_am_rx_list( rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_
* \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( 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);)
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);
#endif
/*! \fn boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
......@@ -72,7 +69,7 @@ protected_rlc_am_rx_list( signed int rlc_am_rx_list_insert_pdu(const protocol_ct
* \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.
......@@ -80,7 +77,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.
......@@ -88,14 +85,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.
......@@ -103,7 +100,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.
......@@ -111,13 +108,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,9 +35,6 @@
# ifndef __RLC_AM_SEGMENT_H__
# define __RLC_AM_SEGMENT_H__
//-----------------------------------------------------------------------------
# define private_rlc_am_segment(x) x
# define protected_rlc_am_segment(x) x
# define public_rlc_am_segment(x) x
/*! \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.
......@@ -46,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
......@@ -36,19 +36,16 @@
#ifndef __RLC_AM_SEGMENT_HOLES_H__
# define __RLC_AM_SEGMENT_HOLES_H__
//-----------------------------------------------------------------------------
# define private_rlc_am_segments_holes(x) x
# define protected_rlc_am_segments_holes(x) x
# define public_rlc_am_segments_holes(x) x
/*! \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.
*/
protected_rlc_am_segments_holes(void rlc_am_clear_holes (
void rlc_am_clear_holes (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP);)
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].
......@@ -58,12 +55,12 @@ protected_rlc_am_segments_holes(void rlc_am_clear_holes (
* \param[in] so_startP Start of segment offset.
* \param[in] so_stopP End of segment offset.
*/
protected_rlc_am_segments_holes(void rlc_am_remove_hole (
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);)
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.
......@@ -73,12 +70,12 @@ protected_rlc_am_segments_holes(void rlc_am_remove_hole (
* \param[in,out] so_startP Start of segment offset.
* \param[in,out] so_stopP End of segment offset.
*/
protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
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);)
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].
......@@ -88,12 +85,12 @@ protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
* \param[in,out] so_startP Start of segment offset.
* \param[in,out] so_stopP End of segment offset.
*/
protected_rlc_am_segments_holes(void rlc_am_add_hole (
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);)
sdu_size_t so_stopP);
/** @} */
#endif
#endif
......@@ -37,9 +37,6 @@
# include "UTIL/MEM/mem_block.h"
//-----------------------------------------------------------------------------
# define private_rlc_am_status_report(x) x
# define protected_rlc_am_status_report(x) x
# define public_rlc_am_status_report(x) x
//-----------------------------------------------------------------------------
#include "platform_types.h"