prepare imc_channel + imc_raw for cython interface

This commit is contained in:
2021-02-12 09:52:52 +01:00
parent 40a922893d
commit 3d9305a1be
2 changed files with 22 additions and 8 deletions

View File

@@ -267,13 +267,20 @@ namespace imc
}
// get list of channels with metadata
std::vector<std::string> get_channels()
std::vector<std::string> get_channels(bool json = false, bool include_data = false)
{
std::vector<std::string> chns;
for ( std::map<std::string,imc::channel>::iterator it = channels_.begin();
it != channels_.end(); ++it)
{
chns.push_back(it->second.get_info());
if ( !json )
{
chns.push_back(it->second.get_info());
}
else
{
chns.push_back(it->second.get_json(include_data));
}
}
return chns;
}