Skip to content
Snippets Groups Projects
PacketStructureJson.h 766 B
Newer Older
Valerio Pastore's avatar
Valerio Pastore committed
/*
 * PacketLib.h
 *
 *  Created on: Nov 24, 2022
 *      Author: valerio
 */

#ifndef INCLUDE_INAF_OAS_PACKET_STRUCTURE_JSON_H_
#define INCLUDE_INAF_OAS_PACKET_STRUCTURE_JSON_H_

#include <Base_Packet.h>
#include <fstream>
#include <nlohmann/json.hpp>

namespace inaf::oasbo::Packets {

class PacketStructureJson : public inaf::oasbo::PacketLib::BasePacketStructure {

private:
	std::vector<std::tuple<int, std::string, int>> structure;
	std::vector<std::tuple<int, std::string, int>> convertToTupleVector(const nlohmann::ordered_json &data,
			size_t &count);

public:
	PacketStructureJson(std::string filePath);
	std::vector<std::tuple<int, std::string, int>> getPacketStructure(){ return structure; }
};
}

#endif /* INCLUDE_INAF_OAS_PACKET_STRUCTURE_JSON_H_ */