Code Review
/
ric-app
/
hw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update HW Policy Type ID
[ric-app/hw.git]
/
src
/
hw_xapp_main.cc
diff --git
a/src/hw_xapp_main.cc
b/src/hw_xapp_main.cc
index
655f452
..
01601fb
100644
(file)
--- a/
src/hw_xapp_main.cc
+++ b/
src/hw_xapp_main.cc
@@
-60,25
+60,22
@@
int main(int argc, char *argv[]){
//Create Subscription Handler if Xapp deals with Subscription.
//Create Subscription Handler if Xapp deals with Subscription.
- bool sub_required = true;
std::unique_ptr<SubscriptionHandler> sub_handler = std::make_unique<SubscriptionHandler>();
//create HelloWorld Xapp Instance.
std::unique_ptr<Xapp> hw_xapp;
std::unique_ptr<SubscriptionHandler> sub_handler = std::make_unique<SubscriptionHandler>();
//create HelloWorld Xapp Instance.
std::unique_ptr<Xapp> hw_xapp;
- if(sub_required)
- hw_xapp = std::make_unique<Xapp>(std::ref(config),std::ref(*rmr), std::ref(*sub_handler));
- else
- hw_xapp = std::make_unique<Xapp>(std::ref(config),std::ref(*rmr));
+ hw_xapp = std::make_unique<Xapp>(std::ref(config),std::ref(*rmr));
mdclog_write(MDCLOG_INFO, "Created Hello World Xapp Instance");
sleep(1);
//Startup E2 subscription and A1 policy
mdclog_write(MDCLOG_INFO, "Created Hello World Xapp Instance");
sleep(1);
//Startup E2 subscription and A1 policy
- hw_xapp->startup();
+ hw_xapp->startup(
std::ref(*sub_handler)
);
//start listener threads and register message handlers.
int num_threads = std::stoi(config[XappSettings::SettingName::THREADS]);
//start listener threads and register message handlers.
int num_threads = std::stoi(config[XappSettings::SettingName::THREADS]);
+ bool sub_required = true;
for(int j=0; j < num_threads; j++) {
std::unique_ptr<XappMsgHandler> mp_handler;
if(sub_required)
for(int j=0; j < num_threads; j++) {
std::unique_ptr<XappMsgHandler> mp_handler;
if(sub_required)