Updates to the DTSC analyser - not fully complete, but still nice.
This commit is contained in:
parent
68baed4af8
commit
d459a99317
1 changed files with 3 additions and 8 deletions
|
@ -19,9 +19,7 @@ namespace Analysers {
|
||||||
///\return The return code of the analyser.
|
///\return The return code of the analyser.
|
||||||
int analyseDTSC(Util::Config conf){
|
int analyseDTSC(Util::Config conf){
|
||||||
DTSC::File F(conf.getString("filename"));
|
DTSC::File F(conf.getString("filename"));
|
||||||
std::stringstream meta;
|
F.getMeta().toPrettyString(std::cout,0, 0x03);
|
||||||
F.getMeta().toPrettyString(meta,0, 0x03);
|
|
||||||
std::cout << meta.str() << std::endl;
|
|
||||||
|
|
||||||
int bPos = 0;
|
int bPos = 0;
|
||||||
F.seek_bpos(0);
|
F.seek_bpos(0);
|
||||||
|
@ -29,16 +27,13 @@ namespace Analysers {
|
||||||
JSON::Value tmp;
|
JSON::Value tmp;
|
||||||
std::string tmpStr;
|
std::string tmpStr;
|
||||||
while (F.getPacket()){
|
while (F.getPacket()){
|
||||||
tmpStr = std::string(F.getPacket().getData(), F.getPacket().getDataLen());
|
|
||||||
switch (F.getPacket().getVersion()){
|
switch (F.getPacket().getVersion()){
|
||||||
case DTSC::DTSC_V1: {
|
case DTSC::DTSC_V1: {
|
||||||
unsigned int i = 8;
|
std::cout << "DTSCv1 packet: " << F.getPacket().getScan().toPrettyString() << std::endl;
|
||||||
JSON::fromDTMI((const unsigned char*)tmpStr.data(), tmpStr.size(), i, tmp);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DTSC::DTSC_V2: {
|
case DTSC::DTSC_V2: {
|
||||||
unsigned int i = 8;
|
std::cout << "DTSCv2 packet: " << F.getPacket().getScan().toPrettyString() << std::endl;
|
||||||
JSON::fromDTMI2((const unsigned char*)tmpStr.data(), tmpStr.size(), i, tmp);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue