JIRA ID:[ODUHIGH-301]:implement Mu 1 for SSB
[o-du/l2.git] / src / phy_stub / phy_stub.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 #include <unistd.h>
19
20 #ifdef NR_TDD
21 #define MAX_SLOT_VALUE   19
22 #else
23 #define MAX_SLOT_VALUE   9
24 #endif
25 #define MAX_SFN_VALUE    1023
26 #define NR_PCI            1
27 #define SLOT_DELAY       3
28
29 uint16_t sfnValue = 0;
30 uint16_t slotValue = 0;
31 bool     rachIndSent = false;
32 bool     msg3Sent = false;
33 bool     msg5ShortBsrSent = false;
34 bool     msg5Sent = false;
35 bool     dlDedMsg = false;
36 bool     msgSecurityModeComp =  false;
37 bool     msgRrcReconfiguration  =  false;
38 bool     msgRegistrationComp    = false;
39 typedef enum
40 {
41    MSG_TYPE_MSG3,
42    MSG_TYPE_SHORT_BSR,
43    MSG_TYPE_MSG5,
44    MSG_TYPE_SECURITY_MODE_COMPLETE,
45    MSG_TYPE_REGISTRATION_COMPLETE,
46    MSG_TYPE_RRC_RECONFIG_COMPLETE
47 }MsgType;
48
49 void phyToMac ARGS((uint16_t msgType, uint32_t msgLen,void *msg));
50 #ifdef INTEL_FAPI
51 void fillTlvs ARGS((fapi_uint16_tlv_t *tlv, uint16_t tag, uint16_t
52 length, uint16_t value, uint32_t *msgLen));
53 void fillMsgHeader ARGS((fapi_msg_t *hdr, uint16_t msgType, uint16_t msgLen));
54 #endif
55 void procPhyMessages(uint16_t msgType, uint32_t msgSize, void *msg);
56 void l1StartConsoleHandler();
57
58 /**********************************************************************
59          End of file
60 **********************************************************************/