Newer
Older
/*
* 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 {
std::vector<std::tuple<uint, std::string, uint>> convertToTupleVector(const nlohmann::json &data,
std::vector<std::tuple<uint, std::string, uint>> readStructureFromSource(
PacketStructureJson(std::string source) : BasePacketStructure(source){
updateStructure(this->source);
}
PacketStructureJson(const BasePacketStructure &other) : BasePacketStructure(other){
};
}
#endif /* INCLUDE_INAF_OAS_PACKET_STRUCTURE_JSON_H_ */