v1.0.0-rc.36
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
void HDF5FilePusher::StartDataCollection(StartMessage &message) {
|
||||
if (writer)
|
||||
throw JFJochException(JFJochExceptionCategory::WrongDAQState, "Image pusher is already writing images");
|
||||
writer = std::make_unique<HDF5Writer>(message);
|
||||
writer = std::make_unique<FileWriter>(message);
|
||||
writer_future = std::async(std::launch::async, &HDF5FilePusher::WriterThread, this);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ bool HDF5FilePusher::EndDataCollection(const EndMessage &message) {
|
||||
|
||||
if (!writer)
|
||||
throw JFJochException(JFJochExceptionCategory::WrongDAQState, "Image pusher not ready for writing images");
|
||||
writer->Write(message);
|
||||
writer->WriteHDF5(message);
|
||||
writer->Finalize();
|
||||
writer.reset();
|
||||
|
||||
@@ -34,7 +34,7 @@ bool HDF5FilePusher::SendImage(const uint8_t *image_data, size_t image_size, int
|
||||
|
||||
auto deserialized = CBORStream2Deserialize(image_data, image_size);
|
||||
if (deserialized->data_message)
|
||||
writer->Write(*deserialized->data_message);
|
||||
writer->WriteHDF5(*deserialized->data_message);
|
||||
else
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"HDF5FilePusher::SendImage accepts only data image");
|
||||
@@ -55,7 +55,7 @@ bool HDF5FilePusher::SendCalibration(const CompressedImage &message) {
|
||||
if (!writer)
|
||||
throw JFJochException(JFJochExceptionCategory::WrongDAQState, "Image pusher not ready for sending");
|
||||
|
||||
writer->Write(message);
|
||||
writer->WriteHDF5(message);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user