mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Disk: Refactor ExtExtractorDiskReadDriver
Reading disk data is currently accomplished by redirecting the raw input stream for the duration of the acquisition, during which no other operation can be carried out. This change moves disk data reading into the packetizer so the familiar request/reply with message filters can be used. To accomplish this the deprecated ISOPIC network type was dropped because the two messages share this network ID. Also fixes live data packet lengths which were off-by-one.
This commit is contained in:
@@ -104,12 +104,8 @@ bool HardwareLiveDataPacket::EncodeFromMessage(LiveDataMessage& message, std::ve
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Send as a long message without setting the NetID to RED first
|
||||
// Size in long format is the size of the entire packet
|
||||
// So +1 for AA header, +1 for short format header (only netID)
|
||||
// +2 for long format size, +1 for the Main51 extended command
|
||||
// +2 for the extended subcommand, +2 for the payload length
|
||||
uint16_t fullSize = static_cast<uint16_t>(1 + sizeof(ExtendedCommandHeader) + payloadSize);
|
||||
// +1 for AA, another +1 for firmware nuance
|
||||
uint16_t fullSize = static_cast<uint16_t>(1 + sizeof(ExtendedCommandHeader) + payloadSize) + 1;
|
||||
|
||||
ExtendedCommandHeader* header = reinterpret_cast<ExtendedCommandHeader*>(bytestream.data());
|
||||
if(!header) {
|
||||
|
||||
Reference in New Issue
Block a user