1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* header include files -- defines (.h) */
21 #ifndef __LWR_MAC_UPR_INF_H__
22 #define __LWR_MAC_UPR_INF_H__
24 #define MAX_PREAMBLE_PER_SLOT 1 /* Max number of preamble per slot */
25 #define MAX_RACH_PDU_PER_SLOT 1 /* Max number of rach pdu per slot */
26 #define MAX_CRCS_PER_SLOT 1
27 #define MAX_CB_PER_TTI_IN_BYTES 1
28 #define MAX_ULSCH_PDUS_PER_TTI 1
31 #define EVENT_RACH_IND_TO_MAC 0
32 #define EVENT_CRC_IND_TO_MAC 1
33 #define EVENT_RX_DATA_IND_TO_MAC 2
34 #define EVENT_STOP_IND_TO_MAC 3
35 #define EVENT_SLOT_IND_TO_MAC 4
37 typedef struct rachPreamInfo
43 typedef struct rachPduInfo
50 RachPreamInfo preamInfo[MAX_PREAMBLE_PER_SLOT];
53 typedef struct rachInd
56 SlotIndInfo timingInfo;
58 RachPduInfo rachPdu[MAX_RACH_PDU_PER_SLOT];
61 typedef struct crcInfo
68 uint8_t cbCrcStatus[MAX_CB_PER_TTI_IN_BYTES];
70 uint16_t timingAdvance;
77 SlotIndInfo timingInfo;
79 CrcInfo crcInfo[MAX_CRCS_PER_SLOT];
89 uint16_t timingAdvance;
97 SlotIndInfo timingInfo;
99 RxDataIndPdu pdus[MAX_ULSCH_PDUS_PER_TTI];
102 typedef uint8_t (*packSlotIndMsg)(Pst *pst, SlotIndInfo *slotInd);
103 uint8_t packLcSlotInd (Pst *pst, SlotIndInfo *slotInd);
104 uint8_t packLwlcSlotInd (Pst *pst, SlotIndInfo *slotInd);
106 uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd);
108 typedef uint8_t (*packRachIndMsg)(Pst *pst, RachInd *rachInd);
109 uint8_t packRachInd(Pst *pst, RachInd *rachInd);
110 uint8_t fapiMacRachInd(Pst *pst, RachInd *rachInd);
112 typedef uint8_t (*packCrcIndMsg)(Pst *pst, CrcInd *crcInd);
113 uint8_t packCrcInd(Pst *pst, CrcInd *crcInd);
114 uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd);
117 typedef uint8_t (*packRxDataIndMsg)(Pst *pst, RxDataInd *rxDataInd);
118 uint8_t packRxDataInd(Pst *pst, RxDataInd *rxDataInd);
119 uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd);
121 typedef uint8_t (*packStopIndMsg)(Pst *pst, uint16_t cellId);
122 uint8_t packStopInd(Pst *pst, uint16_t cellId);
123 uint8_t fapiMacStopInd(Pst *pst, uint16_t cellId);
125 /**********************************************************************
127 **********************************************************************/