add imc_meta.hpp
This commit is contained in:
parent
09737a93fb
commit
ee7f70d36f
48
lib/imc_meta.hpp
Normal file
48
lib/imc_meta.hpp
Normal 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
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------//
|
@ -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
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user