diff --git a/lib/imc_channel.hpp b/lib/imc_channel.hpp index 7379178..debb6b7 100644 --- a/lib/imc_channel.hpp +++ b/lib/imc_channel.hpp @@ -119,7 +119,7 @@ namespace imc // collect meta-data of channels according to env, // just everything valueable in here std::string uuid_; - std::string name_; + std::string name_, comment_; std::string yname_, yunit_; imc::datatype dattyp_; std::string xname_, xunit_; @@ -127,14 +127,21 @@ namespace imc std::vector xdata_; // group reference the channel belongs to + int group_index_; std::string group_uuid_, group_name_; + // + // constructor takes channel's block environment channel(channel_env chnenv, std::map* blocks): chnenv_(chnenv), blocks_(blocks) { + // extract info from corresponding blocks in environment + uuid_ = chnenv_.CNuuid_; std::vector prms = blocks->at(chnenv_.CNuuid_).get_parameters(); name_ = blocks->at(chnenv_.CNuuid_).get_parameter(prms[6]); + comment_ = blocks->at(chnenv_.CNuuid_).get_parameter(prms[8]); + group_index_ = std::stoi(blocks->at(chnenv_.CNuuid_).get_parameter(prms[2])); } // get info string @@ -143,11 +150,12 @@ namespace imc std::stringstream ss; ss<<"uuid:"<(ydata_) <<"\",\"xdata\":\""<(xdata_) <<"\",\"aff. blocks\":\""<