3937ec8fe52a50c498cd24b642f88f0e0623c75f
[scp/ocu/5gnr.git] / Include / upcCommon.h
1 /******************************************************************************
2 ###############################################################################
3 #   Copyright (c) [2017-2020] [ICT/CAS]                                        #
4 #   Licensed under the ORAN Software License v1.0 (License)             #
5 ###############################################################################
6 ******************************************************************************/
7
8
9 #ifndef __UPCCOMMON_H__
10 #define __UPCCOMMON_H__
11
12 #include "plat_syslog.h"
13 #include "cuCommon.h"
14 #include "upcContext.h"
15
16 #define CONCEPT(x)              1
17
18 extern UpInstance_t     s_UpcGlobalData;
19
20 #define UPC_MODULE_ID           s_UpcGlobalData.moduleId
21
22 #define upclog(level, content, arg...)  VOS_SysLog(UPC_MODULE_ID, level, __FILE__, __LINE__, "", content, ##arg);
23
24 #define UPC_MIN(x, y)  ((x) <= (y)? (x) : (y))
25
26 #define UPC_PRESENCE(bitmask,bit)     ((bit) == ((bit) & (bitmask)))
27
28 #define UPC_CHECK_NULL(prama) \
29 {\
30    if (NULL == prama)\
31    {\
32            upclog(LOG_ERR, "UPC NULL pointer\n");\
33            VOS_ASSERT(0);       \
34        return VOS_ERROR;\
35    }\
36 }
37
38 INT32 upcSendE1apMsg(void *pMsg, UINT64 msgLen);
39
40 extern INT32 vosAdpSendAsynMsg2ModuleEx(          CHAR src_moduleName[MODULE_NAME_LEN],
41                                            CHAR dst_moduleName[MODULE_NAME_LEN],                                      
42                                            VOID *msgData,
43                                            LONG msgDataLen);
44 INT32 upcConstructAndSendOamUpActRsp(int actNum, int failNum, CellIdList_t      failCellList);
45 void upcResortDrbId(UpSessCb_t *pSessCb, UINT8 drbId);
46 INT32 upcCheckSessId(UpUeCb_t *pUeCb, UINT8     sessId);
47 UINT32 upcCheckDrbId(UpUeCb_t *pUeCb, UINT8     drbId);
48 void upcFreeTempInfo(upcTempInfo_t *pTempInfo);
49 void upcCauseConvertToInterfaceType(E1apCause_e srcCause, E1apCause_t *dstCause);
50 extern UINT32 cuAppGetCucommonParaNum();
51 INT32 upcSendUpOamMsg(void *pMsg, UINT64        msgLen);
52 INT32 upcGetBearerModFailureFlag(UINT16 bitMask, UINT8 setupFailFlag, UINT8 ModFailFlag);
53
54 #ifdef NR_CUUP
55 INT32 upcNotifyOmaUpConnectState(INT32 state);
56 #endif
57
58 #endif