X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2FConfigInterface.cpp;h=161d6caab98ed28259ea9f4616e7bf3fc467754d;hb=6fe137e5c6f9470f4f48448f5651573c42bd8aed;hp=0a283ae51393d0f006a7c85ab2a8f5713a6c501b;hpb=2dc9d6735bc5ff973a761b7d6b3f71f97e95d60e;p=o-du%2Fl2.git diff --git a/src/o1/ConfigInterface.cpp b/src/o1/ConfigInterface.cpp index 0a283ae51..161d6caab 100644 --- a/src/o1/ConfigInterface.cpp +++ b/src/o1/ConfigInterface.cpp @@ -25,6 +25,7 @@ #include "UnixSocketClient.hpp" #include "SessionHandler.hpp" #include "InitConfig.hpp" +#include "NrCellList.hpp" StartupConfig g_cfg; @@ -87,35 +88,6 @@ uint8_t getStartupConfig(StartupConfig *cfg) ******************************************************************/ uint8_t getStartupConfigForStub(StartupConfig *cfg) { -#if 0 - UnixSocketClient uxClient(O1::ALARM_SOCK_PATH); - O1_LOG("\nO1 CONFIG : getStartupConfig ------ \n"); - MsgHeader msg; - msg.msgType = CONFIGURATION; - msg.action = GET_STARTUP_CONFIG; - if (uxClient.openSocket() == O1::FAILURE) - { - return O1::FAILURE; - } - if (uxClient.sendData(&msg,sizeof(msg)) < 0 ) - { - uxClient.closeSocket(); - return O1::FAILURE; - } - if (uxClient.receiveData(cfg, sizeof(StartupConfig)) < 0) - { - uxClient.closeSocket(); - return O1::FAILURE; - } - O1_LOG("\nO1 CONFIG : ip du %s\n",cfg->DU_IPV4_Addr ); - O1_LOG("\nO1 CONFIG : ip cu %s\n",cfg->CU_IPV4_Addr ); - O1_LOG("\nO1 CONFIG : ip ric %s\n",cfg->RIC_IPV4_Addr ); - O1_LOG("\nO1 CONFIG : port cu %hu\n",cfg->CU_Port); - O1_LOG("\nO1 CONFIG : port du %hu\n",cfg->DU_Port); - O1_LOG("\nO1 CONFIG : port ric %hu\n",cfg->RIC_Port); - - uxClient.closeSocket(); -#endif SessionHandler sessHdlr; if ( sessHdlr.init() ) { @@ -145,6 +117,30 @@ uint8_t getStartupConfigForStub(StartupConfig *cfg) return O1::FAILURE; } +/******************************************************************* + * + * @brief update cell and operational state + * + * @details + * + * Function : setCellOpState + * + * Functionality: + * - send update of cell and operational state to it's handler + * + * + * @params[in] cellId, opState, cellState + * @return cell operational in string form + ******************************************************************/ + + +bool setCellOpState(uint16_t cellId, OpState opState, CellState cellState) +{ + O1_LOG("\nO1 ConfigInterface: Setting cellId = %d, opState=%d, \ +cellState=%d", cellId, opState, cellState); + return NrCellList::instance().setCellOpState(cellId, opState, \ + cellState); +} /********************************************************************** End of file