X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2FO1App.cpp;h=d63498f38c35e2c4fbf30f78db5b97dbbae74b6b;hb=ce3e8c4b7bbfbcdf99c15f4d7932b5cdded77c44;hp=b4cfbde2cbe3db13f056e5342f242390821dc063;hpb=2dc9d6735bc5ff973a761b7d6b3f71f97e95d60e;p=o-du%2Fl2.git diff --git a/src/o1/O1App.cpp b/src/o1/O1App.cpp index b4cfbde2c..d63498f38 100644 --- a/src/o1/O1App.cpp +++ b/src/o1/O1App.cpp @@ -24,9 +24,13 @@ #include "O1App.hpp" #include "GlobalDefs.hpp" #include "SessionHandler.hpp" -#include "ConfigInterface.h" +#include "CmInterface.h" #include +#include "VesUtils.hpp" +#include "VesEventHandler.hpp" + + /******************************************************************* * * @brief Constructor @@ -87,8 +91,13 @@ O1App::~O1App() bool O1App::run() { - + const int SLEEP_INTERVAL = 2; + const int DEFAUL_CELL_ID = 1; SessionHandler sessHdlr; + + /*setting default cell state disabled*/ + setCellOpState(DEFAUL_CELL_ID, DISABLED, INACTIVE); + /* Start Netconf session and subscribe to yang modules */ try { @@ -110,19 +119,19 @@ bool O1App::run() if(mUxSocketServer.setAffinity(O1::CPU_CORE)) { - O1_LOG("\nO1 O1App : CPU affinity set " ); + O1_LOG("\nO1 O1App : CPU affinity set for UnixSocketServer thread to " ); mUxSocketServer.printAffinity(); } - sleep(2); + sleep(SLEEP_INTERVAL); if( mUxSocketServer.isRunning() ) { mStartupStatus = true; - O1_LOG("\nO1 O1App : Unix Socket server started\n"); + O1_LOG("\nO1 O1App : Unix Socket server started"); } else { - O1_LOG("\nO1 O1App : Unix Socket server failed to start\n"); + O1_LOG("\nO1 O1App : Unix Socket server failed to start"); return false; } /* Wait for the Unix Socket Server thread to end*/ @@ -130,7 +139,7 @@ bool O1App::run() } else { - O1_LOG("\nO1 O1App : Unix Socket server failed to start\n"); + O1_LOG("\nO1 O1App : Unix Socket server failed to start"); return false; } return true;