#ifndef _AUSF_APP_H_
#define _AUSF_APP_H_

#include "ausf_config.hpp"
#include "itti.hpp"
#include "ausf_profile.hpp"
#include "itti_msg_sbi.hpp"

using namespace config;
using namespace std;
namespace ausf_application{

    #define TASK_AUSF_APP_PERIODIC_GETINFO (0)
    #define TASK_AUSF_APP_TIMEOUT_NRF_HEARTBEAT (1)
    class ausf_app{
        public:
            ausf_app();
            ~ausf_app();
            void register_to_nrf();
              // Create a NF profile to this instance
            void generate_ausf_profile();
            // Send request to N11 to send NF registration to NRF
            void trigger_nf_registration_request();
            void generate_uuid();
            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 handle_itti_msg(itti_sbi_register_nf_instance_response &r);
            void update_nf_instance(std::shared_ptr<itti_sbi_update_nf_instance_request> msg);

        private:
            std::string ausf_instance_id;
            ausf_profile nf_instance_profile;
            timer_id_t timer_nrf_heartbeat;
    };
}
#endif
