Program Listing for File TopicsConfig.h
↰ Return to documentation for file (src/desert_classes/TopicsConfig.h)
/****************************************************************************
* Copyright (C) 2024 Davide Costa *
* *
* This file is part of RMW desert. *
* *
* RMW desert is free software: you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation, either version 3 of the License, or any *
* later version. *
* *
* RMW desert is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with RMW desert. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#ifndef TOPICS_CONFIG_H_
#define TOPICS_CONFIG_H_
#include <map>
#include <string>
#include <cstdint>
#include <fstream>
#include "json.hpp"
using namespace nlohmann::json_abi_v3_11_3;
class TopicsConfig
{
public:
static void load_configuration();
static uint8_t get_topic_identifier(std::string name);
static std::string get_identifier_topic(uint8_t identifier);
private:
static std::map<std::string, uint8_t> _topics_list;
static std::map<uint8_t, std::string> _identifiers_list;
};
#endif // MACROS_HPP_