[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-447] PCCH Scheduling at SCH
[o-du/l2.git] / src / 5gnrmac / lwr_mac_fsm.h
1  /*******************************************************************************
2  ################################################################################
3  #   Copyright (c) [2017-2019] [Radisys]                                        #
4  #                                                                              #
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                                    #
8  #                                                                              #
9  #       http://www.apache.org/licenses/LICENSE-2.0                             #
10  #                                                                              #
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  *******************************************************************************/
18
19 #ifndef _LWR_MAC_FSM_H_
20 #define _LWR_MAC_FSM_H_
21
22 #define FAPI_UINT_8   1
23 #define FAPI_UINT_16  2
24 #define FAPI_UINT_32  4
25 #define INVALID_VALUE -1
26
27 #define CORESET_TYPE0 0
28 #define CORESET_TYPE1 1
29 #define CORESET_TYPE2 2
30 #define CORESET_TYPE3 3
31
32 #ifdef INTEL_WLS_MEM
33 #define WLS_MEM_FREE_PRD       10        /* Free memory after 10 slot ind */
34 #endif
35
36 #define FILL_FAPI_LIST_ELEM(_currElem, _nextElem, _msgType, _numMsgInBlock, _alignOffset)\
37 {\
38    _currElem->msg_type             = (uint8_t) _msgType;\
39    _currElem->num_message_in_block = _numMsgInBlock;\
40    _currElem->align_offset         = (uint16_t) _alignOffset;\
41    _currElem->msg_len              = _numMsgInBlock * _alignOffset;\
42    _currElem->p_next               = _nextElem;\
43    _currElem->p_tx_data_elm_list   = NULL;\
44    _currElem->time_stamp           = 0;\
45 }
46
47 typedef enum{
48    SI_RNTI_TYPE,
49    RA_RNTI_TYPE,
50    TC_RNTI_TYPE,
51    C_RNTI_TYPE,
52    P_RNTI_TYPE
53 }RntiType;
54
55 uint8_t lwr_mac_procInvalidEvt(void *msg);
56 uint8_t lwr_mac_procParamReqEvt(void *msg);
57 uint8_t lwr_mac_procParamRspEvt(void *msg);
58 uint8_t lwr_mac_procConfigReqEvt(void *msg);
59 uint8_t lwr_mac_procConfigRspEvt(void *msg);
60 uint8_t lwr_mac_procStartReqEvt(void *msg);
61 void sendToLowerMac(uint16_t, uint32_t, void *);
62 void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg);
63 uint16_t fillDlTtiReq(SlotTimingInfo currTimingInfo);
64 typedef uint8_t (*lwrMacFsmHdlr)(void *);
65 void lwrMacLayerInit(Region region, Pool pool);
66
67 #endif
68
69 /**********************************************************************
70          End of file
71 **********************************************************************/
72