Generalized serializer

This commit is contained in:
2023-12-11 06:49:24 +01:00
parent 75913b83eb
commit f1935526a7
52 changed files with 579 additions and 557 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ StreamWriter::StreamWriter(ZMQContext &context, Logger &in_logger, const std::st
void StreamWriter::StartDataCollection() {
image_puller.WaitForImage();
while (image_puller.GetFrameType() != JFJochFrameDeserializer::Type::START) {
while (image_puller.GetFrameType() != CBORStream2Deserializer::Type::START) {
logger.Error("Expected START image");
image_puller.WaitForImage();
}
@@ -28,7 +28,7 @@ void StreamWriter::StartDataCollection() {
void StreamWriter::CollectImages(std::vector<HDF5DataFileStatistics> &v) {
HDF5Writer writer(start_message);
image_puller.WaitForImage();
while (image_puller.GetFrameType() == JFJochFrameDeserializer::Type::IMAGE) {
while (image_puller.GetFrameType() == CBORStream2Deserializer::Type::IMAGE) {
auto image_array = image_puller.GetDataMessage();
writer.Write(image_array);
image_puller.WaitForImage();
@@ -37,7 +37,7 @@ void StreamWriter::CollectImages(std::vector<HDF5DataFileStatistics> &v) {
}
void StreamWriter::EndDataCollection() {
while (image_puller.GetFrameType() != JFJochFrameDeserializer::Type::END) {
while (image_puller.GetFrameType() != CBORStream2Deserializer::Type::END) {
logger.Error("Expected END image");
image_puller.WaitForImage();
}