#include "O1Interface.h"
#include "O1App.hpp"
#include "GlobalDefs.hpp"
+#include "PnfRegistrationThread.hpp"
+#include "ConfigLoader.hpp"
+
#include <signal.h>
#include <unistd.h>
******************************************************************/
int static check_O1_module_status(void){
- for( int i = 0; i < 5 ; i++)
+
+ const int N_RETRY = 5;
+ const int RETRY_DELAY = 1;
+
+ for( int i = 0; i < N_RETRY; i++)
{
if( O1App::instance().getStartupStatus() == true)
{
}
else
{
- sleep(1);
+ sleep(RETRY_DELAY);
}
}
int start_O1_module(void)
{
+ if( !ConfigLoader::instance().loadConfigurations() )
+ return O1::FAILURE;
+
if(O1App::instance().start() == false){
- O1_LOG("\nO1 O1Interface : Failed to start");
+ O1_LOG("\nO1 O1Interface : Failed to start");
return O1::FAILURE;
}
if(O1App::instance().setAffinity(O1::CPU_CORE))
{
- O1_LOG("\nO1 O1Interface : CPU affinity set " );
+ O1_LOG("\nO1 O1Interface : CPU affinity set for O1App thread to" );
O1App::instance().printAffinity();
}
return check_O1_module_status();
}
+/*******************************************************************
+ *
+ * @brief Send VES PNF Registration Request
+ *
+ * @details
+ *
+ * Function : sendPnfRegistration
+ *
+ * Functionality:
+ * - Create a thread and send VES PNF Registration Request
+ *
+ *
+ * @params[in] void
+ * @return void
+ ******************************************************************/
+
+void sendPnfRegistration(void)
+{
+ PnfRegistrationThread::instance().start();
+ if(PnfRegistrationThread::instance().setAffinity(O1::CPU_CORE))
+ {
+ O1_LOG("\nO1 O1Interface : CPU affinity set for PnfRegistration thread to " );
+ PnfRegistrationThread::instance().printAffinity();
+ }
+}
+
/**********************************************************************
End of file