TCP: Fixes - allow for live monitoring of ACK progress
This commit is contained in:
@@ -12,7 +12,6 @@ void HDF5FilePusher::StartDataCollection(StartMessage &message) {
|
||||
writer_future = std::async(std::launch::async, &HDF5FilePusher::WriterThread, this);
|
||||
images_written = 0;
|
||||
images_err = 0;
|
||||
last_processed_image = 0;
|
||||
}
|
||||
|
||||
bool HDF5FilePusher::EndDataCollection(const EndMessage &message) {
|
||||
@@ -40,8 +39,6 @@ bool HDF5FilePusher::SendImage(const uint8_t *image_data, size_t image_size, int
|
||||
try {
|
||||
writer->Write(*deserialized->data_message);
|
||||
images_written++;
|
||||
if (image_number > last_processed_image)
|
||||
last_processed_image = image_number;
|
||||
} catch (const JFJochException &e) {
|
||||
images_err++;
|
||||
}
|
||||
@@ -85,12 +82,10 @@ std::optional<ImagePusherAckProgress> HDF5FilePusher::GetAckProgress() const {
|
||||
uint64_t ack_ok = images_written;
|
||||
uint64_t ack_bad = images_err;
|
||||
uint64_t ack_total = ack_ok + ack_bad;
|
||||
uint64_t last = last_processed_image;
|
||||
|
||||
return ImagePusherAckProgress{
|
||||
.data_acked_ok = ack_ok,
|
||||
.data_acked_bad = ack_bad,
|
||||
.data_acked_total = ack_total,
|
||||
.last_processed_images = last
|
||||
.data_acked_total = ack_total
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user