summaryrefslogtreecommitdiffstats
path: root/lib/edi/STIDecoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/edi/STIDecoder.cpp')
-rw-r--r--lib/edi/STIDecoder.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/edi/STIDecoder.cpp b/lib/edi/STIDecoder.cpp
index b6b9878..99f7c11 100644
--- a/lib/edi/STIDecoder.cpp
+++ b/lib/edi/STIDecoder.cpp
@@ -60,9 +60,9 @@ void STIDecoder::push_bytes(const vector<uint8_t> &buf)
m_dispatcher.push_bytes(buf);
}
-void STIDecoder::push_packet(const vector<uint8_t> &buf)
+void STIDecoder::push_packet(Packet &pack)
{
- m_dispatcher.push_packet(buf);
+ m_dispatcher.push_packet(pack);
}
void STIDecoder::setMaxDelay(int num_af_packets)
@@ -107,7 +107,7 @@ bool STIDecoder::decode_dsti(const std::vector<uint8_t>& value, const tag_name_t
uint8_t dfcth = (dstiHeader >> 8) & 0x1F;
uint8_t dfctl = dstiHeader & 0xFF;
- md.dflc = dfcth * 250 + dfctl; // modulo 5000 counter
+ md.dlfc = dfcth * 250 + dfctl; // modulo 5000 counter
const size_t expected_length = 2 +
(md.stihf ? 3 : 0) +
@@ -115,10 +115,14 @@ bool STIDecoder::decode_dsti(const std::vector<uint8_t>& value, const tag_name_t
(md.rfadf ? 9 : 0);
if (value.size() != expected_length) {
- throw std::runtime_error("EDI dsti: decoding error:"
- "value.size() != expected_length: " +
- to_string(value.size()) + " " +
- to_string(expected_length));
+ etiLog.level(warn) << "EDI dsti: decoding error: " <<
+ "value.size() != expected_length: " <<
+ value.size() << " " <<
+ expected_length << " " <<
+ (md.stihf ? "STIHF " : " ") <<
+ (md.atstf ? "ATSTF " : " ") <<
+ (md.rfadf ? "RFADF " : " ");
+ return false;
}
if (md.stihf) {