add multichannel support for multiple channels referring to same CS block, issue #15
This commit is contained in:
parent
730b3dad83
commit
ef0bb7550d
@ -236,13 +236,27 @@ namespace imc
|
|||||||
// provide UUID for channel
|
// provide UUID for channel
|
||||||
chnenv.uuid_ = chnenv.CNuuid_;
|
chnenv.uuid_ = chnenv.CNuuid_;
|
||||||
|
|
||||||
|
// for multichannel data there may be multiple channels referring to
|
||||||
|
// the same (final) CS block (in contrast to what the IMC software
|
||||||
|
// documentation seems to suggest) resulting in all channels missing
|
||||||
|
// a CS block except for the very last
|
||||||
|
if ( chnenv.CSuuid_.empty() ) {
|
||||||
|
for ( imc::block blkCS: rawblocks_ ) {
|
||||||
|
if ( blkCS.get_key().name_ == "CS"
|
||||||
|
&& blkCS.get_begin() > (unsigned long int)stol(chnenv.uuid_) ) {
|
||||||
|
chnenv.CSuuid_ = blkCS.get_uuid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// create channel object and add it to the map of channels
|
// create channel object and add it to the map of channels
|
||||||
channels_.insert( std::pair<std::string,imc::channel>
|
channels_.insert( std::pair<std::string,imc::channel>
|
||||||
(chnenv.CNuuid_,imc::channel(chnenv,&mapblocks_,&buffer_))
|
(chnenv.CNuuid_,imc::channel(chnenv,&mapblocks_,&buffer_))
|
||||||
);
|
);
|
||||||
|
|
||||||
// reset channel uuid
|
// reset channel uuid
|
||||||
chnenv.CNuuid_.clear();
|
chnenv.reset();
|
||||||
|
//chnenv.CNuuid_.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +268,6 @@ namespace imc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// provide buffer size
|
// provide buffer size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user