show found markers, hex::show: include last incomplete line
This commit is contained in:
@@ -106,6 +106,9 @@ public:
|
||||
// proceed only, if markers suggest data is valid *.raw format
|
||||
if ( valid_ )
|
||||
{
|
||||
// show detected markers
|
||||
if ( showlog ) display_markers();
|
||||
|
||||
// split data corresponding to markers into segments
|
||||
split_segments();
|
||||
|
||||
@@ -221,6 +224,22 @@ public:
|
||||
if ( totalmarksize < 100 ) valid_ = false;
|
||||
}
|
||||
|
||||
// display content of found markers
|
||||
void display_markers()
|
||||
{
|
||||
for (std::pair<std::string,std::vector<unsigned char>> mrk : markers_ )
|
||||
{
|
||||
// extract data of marker
|
||||
std::vector<unsigned char> mrkdat = this->datasec_[mrk.first];
|
||||
|
||||
// show name of marker and its data
|
||||
std::cout<<mrk.first<<" : "<<mrkdat.size()
|
||||
<<"\n------------------------------------\n";
|
||||
hex::show(mrkdat,32,0,0);
|
||||
}
|
||||
std::cout<<"\n";
|
||||
}
|
||||
|
||||
// get all predefined markers
|
||||
std::map<std::string,std::vector<unsigned char>> get_markers()
|
||||
{
|
||||
|
Reference in New Issue
Block a user