Commit a51390c8 authored by Niuhaiwen's avatar Niuhaiwen

register to nrf and heart-beat successful

parent 7a0439d6
...@@ -55,7 +55,7 @@ void ausf_app_task(void*){ ...@@ -55,7 +55,7 @@ void ausf_app_task(void*){
break; break;
case SBI_UPDATE_NF_INSTANCE_REQUEST: case SBI_UPDATE_NF_INSTANCE_REQUEST:
Logger::ausf_app().debug("send update request"); Logger::ausf_app().debug("send update request");
ausf_app_inst->update_nf_instance(std::static_pointer_cast<itti_n11_update_nf_instance_request>(shared_msg)); ausf_app_inst->update_nf_instance(std::static_pointer_cast<itti_sbi_update_nf_instance_request>(shared_msg));
break; break;
case TIME_OUT: case TIME_OUT:
if (itti_msg_timeout *to = dynamic_cast<itti_msg_timeout *>(msg)) if (itti_msg_timeout *to = dynamic_cast<itti_msg_timeout *>(msg))
...@@ -114,7 +114,7 @@ void ausf_app::generate_ausf_profile(){ ...@@ -114,7 +114,7 @@ void ausf_app::generate_ausf_profile(){
nf_instance_profile.set_nf_instance_name("bupt-ausf"); nf_instance_profile.set_nf_instance_name("bupt-ausf");
nf_instance_profile.set_nf_type("AUSF"); nf_instance_profile.set_nf_type("AUSF");
nf_instance_profile.set_nf_status("REGISTERED"); nf_instance_profile.set_nf_status("REGISTERED");
nf_instance_profile.set_nf_heartBeat_timer(50); nf_instance_profile.set_nf_heartBeat_timer(10);
nf_instance_profile.set_nf_priority(1); nf_instance_profile.set_nf_priority(1);
nf_instance_profile.set_nf_capacity(100); nf_instance_profile.set_nf_capacity(100);
nf_instance_profile.add_nf_ipv4_addresses(ausf_cfg.sbi.addr4); nf_instance_profile.add_nf_ipv4_addresses(ausf_cfg.sbi.addr4);
...@@ -283,7 +283,7 @@ void ausf_app::handle_itti_msg(itti_sbi_register_nf_instance_response& r) { ...@@ -283,7 +283,7 @@ void ausf_app::handle_itti_msg(itti_sbi_register_nf_instance_response& r) {
0);*/ // TODO arg2_user 0);*/ // TODO arg2_user
} }
void ausf_app::update_nf_instance( void ausf_app::update_nf_instance(
std::shared_ptr<itti_n11_update_nf_instance_request> msg) { std::shared_ptr<itti_sbi_update_nf_instance_request> msg) {
Logger::ausf_app().debug( Logger::ausf_app().debug(
"Send NF Update to NRF (HTTP version %d)", msg->http_version); "Send NF Update to NRF (HTTP version %d)", msg->http_version);
...@@ -367,4 +367,4 @@ void ausf_app::update_nf_instance( ...@@ -367,4 +367,4 @@ void ausf_app::update_nf_instance(
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
} }
curl_global_cleanup(); curl_global_cleanup();
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ namespace ausf_application{ ...@@ -25,7 +25,7 @@ namespace ausf_application{
void timer_nrf_heartbeat_timeout(timer_id_t timer_id, uint64_t arg2_user); void timer_nrf_heartbeat_timeout(timer_id_t timer_id, uint64_t arg2_user);
void register_nf_instance(std::shared_ptr<itti_sbi_register_nf_instance_request> msg); void register_nf_instance(std::shared_ptr<itti_sbi_register_nf_instance_request> msg);
void handle_itti_msg(itti_sbi_register_nf_instance_response &r); void handle_itti_msg(itti_sbi_register_nf_instance_response &r);
void update_nf_instance(std::static_pointer_cast<itti_n11_update_nf_instance_request> msg); void update_nf_instance(std::shared_ptr<itti_sbi_update_nf_instance_request> msg);
private: private:
std::string ausf_instance_id; std::string ausf_instance_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment