VSA: Discard timestamp top bit
parent
58b22da09b
commit
f22d666f94
|
|
@ -9,7 +9,7 @@ VSA02::VSA02(uint8_t* const recordBytes)
|
|||
constantIndex = *reinterpret_cast<uint16_t*>(recordBytes + 2);
|
||||
flags = *reinterpret_cast<Flags*>(recordBytes + 4);
|
||||
pieceCount = recordBytes[5];
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6);
|
||||
samples.insert(samples.end(), recordBytes + 14, recordBytes + 30);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ VSA03::VSA03(uint8_t* const recordBytes)
|
|||
setType(VSA::Type::AA03);
|
||||
eventType = static_cast<EventType>(*reinterpret_cast<uint16_t*>(recordBytes + 2));
|
||||
eventData = *reinterpret_cast<uint16_t*>(recordBytes + 4);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 14);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ VSA04::VSA04(uint8_t* const recordBytes)
|
|||
setType(VSA::Type::AA04);
|
||||
flags = *reinterpret_cast<Flags*>(recordBytes + 2);
|
||||
partitionIndex = *reinterpret_cast<uint16_t*>(recordBytes + 4);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 14);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ VSA05::VSA05(uint8_t* const recordBytes)
|
|||
setType(VSA::Type::AA05);
|
||||
errorType = static_cast<ErrorType>(*reinterpret_cast<uint16_t*>(recordBytes + 2));
|
||||
errorNetwork = *reinterpret_cast<uint16_t*>(recordBytes + 4);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 6);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 14);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ VSA06::VSA06(uint8_t* const recordBytes)
|
|||
savedSectors.insert(savedSectors.end(), reinterpret_cast<uint32_t*>(recordBytes + 2), reinterpret_cast<uint32_t*>(recordBytes + 18));
|
||||
error = *reinterpret_cast<uint16_t*>(recordBytes + 18);
|
||||
savedSectorsHigh = *reinterpret_cast<uint16_t*>(recordBytes + 20);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ VSA07::VSA07(uint8_t* const recordBytes)
|
|||
lastSector = *reinterpret_cast<uint32_t*>(recordBytes + 2);
|
||||
currentSector = *reinterpret_cast<uint32_t*>(recordBytes + 6);
|
||||
reserved.insert(reserved.end(), recordBytes + 10, recordBytes + 22);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ VSA08::VSA08(uint8_t* const recordBytes)
|
|||
setType(VSA::Type::AA08);
|
||||
troubleSramCount.insert(troubleSramCount.end(), recordBytes + 2, recordBytes + 6);
|
||||
troubleSectors.insert(troubleSectors.end(), reinterpret_cast<uint32_t*>(recordBytes + 6), reinterpret_cast<uint32_t*>(recordBytes + 22));
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ VSA09::VSA09(uint8_t* const recordBytes)
|
|||
reserved0.insert(reserved0.end(), recordBytes + 12, recordBytes + 18);
|
||||
hardwareID = static_cast<HardwareID>(recordBytes[18]);
|
||||
reserved1.insert(reserved1.end(), recordBytes + 19, recordBytes + 22);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 22);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ VSA0B::VSA0B(uint8_t* const recordBytes)
|
|||
{
|
||||
setType(VSA::Type::AA0B);
|
||||
captureBitfield = reinterpret_cast<uint16_t*>(recordBytes)[1];
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 20) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 20);
|
||||
reserved = recordBytes[28];
|
||||
checksum = reinterpret_cast<uint16_t*>(recordBytes)[15];
|
||||
doChecksum(recordBytes);
|
||||
|
|
@ -30,8 +30,8 @@ void VSA0B::doChecksum(uint8_t* recordBytes)
|
|||
bool VSA0B::filter(const std::shared_ptr<VSAMessageReadFilter> filter)
|
||||
{
|
||||
if((filter->captureBitfield != captureBitfield && filter->captureBitfield != UINT16_MAX) ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > timestamp ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < timestamp) {
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > getTimestamp() ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < getTimestamp()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ VSA0C::VSA0C(uint8_t* const recordBytes)
|
|||
audioPreamble = recordBytes[4];
|
||||
audioHeader = recordBytes[5];
|
||||
pcmData.insert(pcmData.end(), recordBytes + 6, recordBytes + 20);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 20) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 20);
|
||||
vNetBitfield = *reinterpret_cast<VSA0C::VNet*>(recordBytes + 28);
|
||||
checksum = *reinterpret_cast<uint16_t*>(recordBytes + 30);
|
||||
doChecksum(recordBytes);
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ void VSA0DFirst::reorderPayload(std::vector<uint8_t>& secondPayload)
|
|||
bool VSA0DFirst::filter(const std::shared_ptr<VSAMessageReadFilter> filter)
|
||||
{
|
||||
if((filter->captureBitfield != captureBitfield && filter->captureBitfield != UINT16_MAX) ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > timestamp ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < timestamp) {
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > getTimestamp() ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < getTimestamp()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ void VSA0EFirst::reservePacketData(std::shared_ptr<Packet>& packet) const
|
|||
bool VSA0EFirst::filter(const std::shared_ptr<VSAMessageReadFilter> filter)
|
||||
{
|
||||
if((filter->captureBitfield != captureBitfield && filter->captureBitfield != UINT16_MAX) ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > timestamp ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < timestamp) {
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > getTimestamp() ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < getTimestamp()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ void VSA0FFirst::reservePacketData(std::shared_ptr<Packet>& packet) const
|
|||
bool VSA0FFirst::filter(const std::shared_ptr<VSAMessageReadFilter> filter)
|
||||
{
|
||||
if(filter->captureBitfield != captureBitfield ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > timestamp ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < timestamp) {
|
||||
getICSTimestampFromTimepoint(filter->readRange.first) > getTimestamp() ||
|
||||
getICSTimestampFromTimepoint(filter->readRange.second) < getTimestamp()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ VSA6A::VSA6A(uint8_t* const recordBytes)
|
|||
sequenceNum = *reinterpret_cast<uint32_t*>(recordBytes + 34);
|
||||
totalSectors = *reinterpret_cast<uint32_t*>(recordBytes + 38);
|
||||
reserved = *reinterpret_cast<uint32_t*>(recordBytes + 42);
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 46) & UINT63_MAX;
|
||||
timestamp = *reinterpret_cast<uint64_t*>(recordBytes + 46);
|
||||
timestampSum = *reinterpret_cast<uint16_t*>(recordBytes + 54);
|
||||
data.insert(data.end(), recordBytes + 56, recordBytes + 508);
|
||||
checksum = *reinterpret_cast<uint32_t*>(recordBytes + 508);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return Timestamp of this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
*
|
||||
* @return Timestamp of this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
*
|
||||
* @return The timestamp of this record
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
/**
|
||||
* Reorder bytes in the payload between this record and the second record in the sequence. The bytes are reordered to allow
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
*
|
||||
* @return The timestamp of this record
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
/**
|
||||
* Reorder bytes in the payload between this record and the second record in the sequence. The bytes are reordered to allow
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
*
|
||||
* @return The timestamp of this record
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public:
|
|||
*
|
||||
* @return The timestamp for this record in 25 nanosecond ticks since January 1, 2007
|
||||
*/
|
||||
uint64_t getTimestamp() override { return timestamp; }
|
||||
uint64_t getTimestamp() override { return timestamp & UINT63_MAX; }
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue