Generalized serializer
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user