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:
@@ -0,0 +1,21 @@
|
||||
#ifndef __DISKDATAMESSAGE_H_
|
||||
#define __DISKDATAMESSAGE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/communication/message/message.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class DiskDataMessage : public RawMessage {
|
||||
public:
|
||||
DiskDataMessage(std::vector<uint8_t>&& d) : RawMessage(Network::NetID::DiskData) {
|
||||
data = std::move(d);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
Aux = 7,
|
||||
J1850VPW = 8,
|
||||
ISO9141 = 9,
|
||||
ISOPIC = 10,
|
||||
DiskData = 10,
|
||||
Main51 = 11,
|
||||
RED = 12,
|
||||
SCI = 13,
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
case 9:
|
||||
return NetID::ISO9141;
|
||||
case 10:
|
||||
return NetID::ISOPIC;
|
||||
return NetID::DiskData;
|
||||
case 11:
|
||||
return NetID::Main51;
|
||||
case 12:
|
||||
@@ -536,6 +536,7 @@ public:
|
||||
case NetID::NeoMemorySDRead:
|
||||
case NetID::NeoMemoryWriteDone:
|
||||
case NetID::RED_GET_RTC:
|
||||
case NetID::DiskData:
|
||||
return Type::Internal;
|
||||
case NetID::Invalid:
|
||||
case NetID::Any:
|
||||
@@ -617,8 +618,8 @@ public:
|
||||
return "J1850 VPW";
|
||||
case NetID::ISO9141:
|
||||
return "ISO 9141";
|
||||
case NetID::ISOPIC:
|
||||
return "ISOPIC";
|
||||
case NetID::DiskData:
|
||||
return "Disk Data";
|
||||
case NetID::Main51:
|
||||
return "Main51";
|
||||
case NetID::RED:
|
||||
@@ -1265,7 +1266,7 @@ private:
|
||||
#define ICSNEO_NETID_AUX 7
|
||||
#define ICSNEO_NETID_J1850VPW 8
|
||||
#define ICSNEO_NETID_ISO9141 9
|
||||
#define ICSNEO_NETID_ISOPIC 10
|
||||
#define ICSNEO_NETID_DISK_DATA 10
|
||||
#define ICSNEO_NETID_MAIN51 11
|
||||
#define ICSNEO_NETID_RED 12
|
||||
#define ICSNEO_NETID_SCI 13
|
||||
|
||||
@@ -30,6 +30,7 @@ private:
|
||||
SearchForHeader,
|
||||
ParseHeader,
|
||||
ParseLongStylePacketHeader,
|
||||
ParseDiskDataHeader,
|
||||
GetData
|
||||
};
|
||||
ReadState state = ReadState::SearchForHeader;
|
||||
|
||||
Reference in New Issue
Block a user