From ee7f70d36fafd0eeee930956db5f0ccf9312e151 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Mon, 8 Feb 2021 18:09:02 +0100 Subject: [PATCH] add imc_meta.hpp --- lib/imc_meta.hpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/imc_raw.hpp | 15 +++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 lib/imc_meta.hpp diff --git a/lib/imc_meta.hpp b/lib/imc_meta.hpp new file mode 100644 index 0000000..cd2dc31 --- /dev/null +++ b/lib/imc_meta.hpp @@ -0,0 +1,48 @@ +//---------------------------------------------------------------------------// + +#ifndef IMCMETA +#define IMCMETA + +//---------------------------------------------------------------------------// + +namespace imc +{ + struct info + { + // timestamp of measurement + std::string timestamp_; + bool valid_; + + // device and software + std::string origin_; + }; + + struct abscissa + { + // name of entity + std::string name_; + + // its unit + std::string unit_; + }; + + struct channel + { + // name of channel + std::string name_; + + // unit of channel's measurement entity + std::string unit_; + + // datatype of channel + imc::datatype daty_; + + // entity measurement depends on, i.e. channel's abscissa (mostly time) + abscissa channel_xaxis_; + }; + +} + +#endif + +//---------------------------------------------------------------------------// diff --git a/lib/imc_raw.hpp b/lib/imc_raw.hpp index 9ca0c9d..458a0bf 100644 --- a/lib/imc_raw.hpp +++ b/lib/imc_raw.hpp @@ -10,6 +10,7 @@ #include "imc_key.hpp" #include "imc_block.hpp" #include "imc_datatype.hpp" +#include "imc_meta.hpp" //---------------------------------------------------------------------------// @@ -26,6 +27,11 @@ namespace imc // list of imc-blocks std::vector rawblocks_; + // collect meta-information, channel definition, etc. + imc::info imcinfo_; + imc::channel imcchannel_; + imc::abscissa xaxis_; + public: // constructor @@ -127,6 +133,15 @@ namespace imc return rawblocks_; } + // collect meta data + void parse_meta() + { + + + } + + // parse channel's raw data + }; }