1 /******************************************************************************
3 * Copyright (c) 2020 ICT/CAS.
5 * Licensed under the O-RAN Software License, Version 1.0 (the "Software 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 * https://www.o-ran.org/software
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.
17 *******************************************************************************/
21 #ifndef __UPCCOMMON_H__
22 #define __UPCCOMMON_H__
24 #include "plat_syslog.h"
26 #include "upcContext.h"
30 extern UpInstance_t s_UpcGlobalData;
32 #define UPC_MODULE_ID s_UpcGlobalData.moduleId
34 #define upclog(level, content, arg...) VOS_SysLog(UPC_MODULE_ID, level, __FILE__, __LINE__, "", content, ##arg);
36 #define UPC_MIN(x, y) ((x) <= (y)? (x) : (y))
38 #define UPC_PRESENCE(bitmask,bit) ((bit) == ((bit) & (bitmask)))
40 #define UPC_CHECK_NULL(prama) \
44 upclog(LOG_ERR, "UPC NULL pointer\n");\
50 INT32 upcSendE1apMsg(void *pMsg, UINT64 msgLen);
52 extern INT32 vosAdpSendAsynMsg2ModuleEx( CHAR src_moduleName[MODULE_NAME_LEN],
53 CHAR dst_moduleName[MODULE_NAME_LEN],
56 INT32 upcConstructAndSendOamUpActRsp(int actNum, int failNum, CellIdList_t failCellList);
57 void upcResortDrbId(UpSessCb_t *pSessCb, UINT8 drbId);
58 INT32 upcCheckSessId(UpUeCb_t *pUeCb, UINT8 sessId);
59 UINT32 upcCheckDrbId(UpUeCb_t *pUeCb, UINT8 drbId);
60 void upcFreeTempInfo(upcTempInfo_t *pTempInfo);
61 void upcCauseConvertToInterfaceType(E1apCause_e srcCause, E1apCause_t *dstCause);
62 extern UINT32 cuAppGetCucommonParaNum();
63 INT32 upcSendUpOamMsg(void *pMsg, UINT64 msgLen);
64 INT32 upcGetBearerModFailureFlag(UINT16 bitMask, UINT8 setupFailFlag, UINT8 ModFailFlag);
67 INT32 upcNotifyOmaUpConnectState(INT32 state);