add imc_meta.hpp

This commit is contained in:
Mario Fink 2021-02-08 18:09:02 +01:00
parent 09737a93fb
commit ee7f70d36f
2 changed files with 63 additions and 0 deletions

48
lib/imc_meta.hpp Normal file
View File

@ -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
//---------------------------------------------------------------------------//

View File

@ -10,6 +10,7 @@
#include "imc_key.hpp" #include "imc_key.hpp"
#include "imc_block.hpp" #include "imc_block.hpp"
#include "imc_datatype.hpp" #include "imc_datatype.hpp"
#include "imc_meta.hpp"
//---------------------------------------------------------------------------// //---------------------------------------------------------------------------//
@ -26,6 +27,11 @@ namespace imc
// list of imc-blocks // list of imc-blocks
std::vector<block> rawblocks_; std::vector<block> rawblocks_;
// collect meta-information, channel definition, etc.
imc::info imcinfo_;
imc::channel imcchannel_;
imc::abscissa xaxis_;
public: public:
// constructor // constructor
@ -127,6 +133,15 @@ namespace imc
return rawblocks_; return rawblocks_;
} }
// collect meta data
void parse_meta()
{
}
// parse channel's raw data
}; };
} }