rlc_tm_init.h 6.55 KB
Newer Older
1
/*******************************************************************************
Lionel Gauthier's avatar
Lionel Gauthier committed
2 3
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom
4

Lionel Gauthier's avatar
Lionel Gauthier committed
5 6 7 8
    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
9 10


Lionel Gauthier's avatar
Lionel Gauthier committed
11 12 13 14
    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
15

Lionel Gauthier's avatar
Lionel Gauthier committed
16 17 18 19
    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
   included in this distribution in the file called "COPYING". If not,
   see <http://www.gnu.org/licenses/>.
20

Lionel Gauthier's avatar
Lionel Gauthier committed
21 22 23
  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
24
  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr
Lionel Gauthier's avatar
Lionel Gauthier committed
25

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
Lionel Gauthier's avatar
Lionel Gauthier committed
27 28

 *******************************************************************************/
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
/*! \file rlc_tm_init.h
* \brief This file defines the prototypes of the functions dealing with the control primitives and initialization.
* \author GAUTHIER Lionel
* \date 2010-2011
* \version
* \note
* \bug
* \warning
*/
/** @defgroup _rlc_tm_init_impl_ RLC TM Init Reference Implementation
* @ingroup _rlc_tm_impl_
* @{
*/
#    ifndef __RLC_TM_INIT_H__
#        define __RLC_TM_INIT_H__
//-----------------------------------------------------------------------------
#        include "rlc_tm_entity.h"
#        include "mem_block.h"
//#        include "rrm_config_structs.h"
#        include "rlc_tm_structs.h"
//#        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

68 69 70
typedef volatile struct rlc_tm_info_s {
  uint8_t             is_uplink_downlink;
} rlc_tm_info_t;
71 72


73
/*! \fn void config_req_rlc_tm (void config_req_rlc_tm (
74
    const protocol_ctxt_t* const  ctxt_pP,
75 76 77 78
    const srb_flag_t  srb_flagP,
    const rlc_tm_info_t * const config_tmP,
    const rb_id_t     rb_idP,
    const srb_flag_t  srb_flagP)
79
* \brief    Allocate memory for RLC TM instance, reset protocol variables, and set protocol parameters.
80
* \param[in]  srb_flagP                 Flag to indicate SRB (1) or DRB (0)
81 82
* \param[in]  config_tmP                Configuration parameters for RLC TM instance.
* \param[in]  rb_idP                    Radio bearer identifier.
83
* \param[in]  chan_idP                  Transport channel identifier.
84
*/
85
public_rlc_tm_init(   void config_req_rlc_tm (
86 87 88
                        const protocol_ctxt_t* const  ctxt_pP,
                        const srb_flag_t  srb_flagP,
                        const rlc_tm_info_t * const config_tmP,
89
                        const rb_id_t     rb_idP,
90
                        const logical_chan_id_t chan_idP);) 
91

92
/*! \fn void rlc_tm_init (const protocol_ctxt_t* const  ctxt_pP, rlc_tm_entity_t * const rlcP)
93 94 95
* \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.
*/
96
protected_rlc_tm_init(void rlc_tm_init (
97 98
                        const protocol_ctxt_t* const  ctxt_pP,
                        rlc_tm_entity_t * const rlcP);)
99

100
/*! \fn void rlc_tm_reset_state_variables (const protocol_ctxt_t* const  ctxt_pP, rlc_tm_entity_t * const rlcP)
101 102 103
* \brief    Reset protocol variables and state variables to initial values.
* \param[in]  rlcP                      RLC TM protocol instance pointer.
*/
104
protected_rlc_tm_init(void rlc_tm_reset_state_variables (
105 106
                        const protocol_ctxt_t* const  ctxt_pP,
                        rlc_tm_entity_t * const rlcP);)
107

108
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
109 110 111
* \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
* \param[in]  rlcP                      RLC TM protocol instance pointer.
*/
112
public_rlc_tm_init(   void rlc_tm_cleanup(
113
                        rlc_tm_entity_t * const rlcP);)
114

115
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
116 117 118 119 120
* \brief    Configure RLC TM protocol parameters.
* \param[in]  rlcP                      RLC TM protocol instance pointer.
* \param[in]  is_uplink_downlinkP       Is this instance is TRANSMITTER_ONLY,
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
*/
121
protected_rlc_tm_init(void rlc_tm_configure(
122 123 124
                        const protocol_ctxt_t* const  ctxt_pP,
                        rlc_tm_entity_t * const rlcP,
                        const boolean_t is_uplink_downlinkP);)
125

126
/*! \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)
127 128
* \brief    Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
* \param[in]  rlcP                      RLC TM protocol instance pointer.
129
* \param[in]  srb_flagP                 Flag to indicate signalling radio bearer (1) or data radio bearer (0).
130
* \param[in]  rb_idP                    Radio bearer identifier.
131
* \param[in]  chan_idP                  Transport channel identifier
132
*/
133
protected_rlc_tm_init(void rlc_tm_set_debug_infos(
134 135 136
                        const protocol_ctxt_t* const  ctxt_pP,
                        rlc_tm_entity_t * const       rlcP,
                        const srb_flag_t              srb_flagP,
137
                        const rb_id_t                 rb_idP,
138
                        const logical_chan_id_t chan_idP);)
139

140 141
/** @} */
#    endif