From 798fc22d7a1467605723c9c191611367a6ce2576 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Tue, 27 Apr 2021 12:42:24 +0200 Subject: [PATCH] imc_conversion.hpp: more comprehensive error message, imc_datatype: imc_Ulongint,imc_Slongint typedef for x86_64 vs. arm --- lib/imc_conversion.hpp | 8 +++++++- lib/imc_datatype.hpp | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/imc_conversion.hpp b/lib/imc_conversion.hpp index d10d32c..1a936b9 100644 --- a/lib/imc_conversion.hpp +++ b/lib/imc_conversion.hpp @@ -17,7 +17,11 @@ namespace imc // check number of elements of type "datatype" in buffer if ( subbuffer.size() != channel.size()*sizeof(datatype) ) { - throw std::runtime_error("size mismatch between subbuffer and datatype"); + throw std::runtime_error( std::string("size mismatch between subbuffer (") + + std::to_string(subbuffer.size()) + + std::string(") and datatype (") + + std::to_string(channel.size()) + std::string("*") + + std::to_string(sizeof(datatype)) + std::string(")") ); } // extract every single number of type "datatype" from buffer @@ -36,6 +40,8 @@ namespace imc // save number in channel channel[i] = df; } + + // for ( auto el: channel ) std::cout<... > "imc Devices Transitional Recording" // typedf "Timestamp Ascii"