#pragma once

#include <fstream>
#include <string>
#include <iostream>
#include <chrono>
#include <random>
#include <sstream>
#include <iomanip>
#include "ament_index_cpp/get_package_share_directory.hpp"
#include "nlohmann/json.hpp"

using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;

struct Config
{
    std::string vid;
    std::string mqtt_ip;
    int mqtt_port;
    std::string info_topic;
    std::string fault_topic;
};

bool load_config(Config &config);
std::string generate_mqtt_client_id();