rlc_am_windows.h 6.6 KB
Newer Older
1 2 3 4 5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/*! \file rlc_am_windows.h
* \brief This file defines the prototypes of the functions testing window, based on SN modulo and rx and tx protocol state variables.
* \author GAUTHIER Lionel
* \date 2010-2011
* \version
* \note
* \bug
* \warning
*/
/** @defgroup _rlc_am_windowing_impl_ RLC AM Windowing Reference Implementation
* @ingroup _rlc_am_internal_impl_
* @{
*/
#    ifndef __RLC_AM_WINDOWS_H__
#        define __RLC_AM_WINDOWS_H__
//-----------------------------------------------------------------------------
#            define private_rlc_am_windows(x)    x
#            define protected_rlc_am_windows(x)  x
#            define public_rlc_am_windows(x)     x

42
/*! \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)
43
* \brief      Boolean function, check if sequence number is VT(A) <= snP < VT(MS).
44 45
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
46 47 48
* \param[in]  snP               Sequence number.
* \return 1 if snP in tx window, else 0.
*/
49
protected_rlc_am_windows(signed int rlc_am_in_tx_window(
50 51 52
                           const protocol_ctxt_t* const  ctxt_pP,
                           const rlc_am_entity_t* const rlc_pP,
                           const rlc_sn_t snP);)
53

54
/*! \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)
55
* \brief      Boolean function, check if sequence number is VR(R) <= snP < VR(MR).
56 57
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
58 59 60
* \param[in]  snP               Sequence number.
* \return 1 if snP in rx window, else 0.
*/
61
protected_rlc_am_windows(signed int rlc_am_in_rx_window(
62 63 64
                           const protocol_ctxt_t* const  ctxt_pP,
                           const rlc_am_entity_t* const rlc_pP,
                           const rlc_sn_t snP);)
65

66
/*! \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)
67
* \brief      Boolean function, check if sequence number is greater than or equal VR(R).
68 69
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
70 71 72
* \param[in]  snP               Sequence number.
* \return 1 if sequence number is greater than or equal VR(R), else 0.
*/
73
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_h (
74 75 76
                           const protocol_ctxt_t* const  ctxt_pP,
                           const rlc_am_entity_t* const rlc_pP,
                           const rlc_sn_t snP);)
77

78
/*! \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)
79
* \brief      Boolean function, check if sequence number is greater than or equal VR(X).
80 81
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
82 83 84
* \param[in]  snP               Sequence number.
* \return 1 if sequence number is greater than or equal VR(X), else 0.
*/
85
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_x (
86 87 88
                           const protocol_ctxt_t* const  ctxt_pP,
                           const rlc_am_entity_t* const rlc_pP,
                           const rlc_sn_t snP);)
89

90
/*! \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)
91
* \brief      Boolean function, check if sequence number is greater than VR(MS).
92 93
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
94 95 96
* \param[in]  snP               Sequence number.
* \return 1 if sequence number is greater than VR(MS), else 0.
*/
97
protected_rlc_am_windows(signed int rlc_am_sn_gt_vr_ms(
98 99 100
                           const protocol_ctxt_t* const  ctxt_pP,
                           const rlc_am_entity_t* const rlc_pP,
                           const rlc_sn_t snP);)
101

102
/*! \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)
103
* \brief      Boolean function, in the context of the tx window, check if sn1P is greater than sn2P.
104 105
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
106 107 108 109
* \param[in]  sn1P              Sequence number.
* \param[in]  sn2P              Sequence number.
* \return 1 if sn1P is greater than sn2P, else 0.
*/
110
protected_rlc_am_windows(signed int rlc_am_tx_sn1_gt_sn2(
111 112 113 114
                           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);)
115

116
/*! \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)
117
* \brief      Boolean function, in the context of the rx window, check if sn1P is greater than sn2P.
118 119
* \param[in]  ctxt_pP           Running context.
* \param[in]  rlc_pP            RLC AM protocol instance pointer.
120 121 122 123
* \param[in]  sn1P              Sequence number.
* \param[in]  sn2P              Sequence number.
* \return 1 if sn1P is greater than sn2P, else 0.
*/
124
protected_rlc_am_windows(signed int rlc_am_rx_sn1_gt_sn2(
125 126 127 128
                           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);)
129 130
/** @} */
#    endif