Files
Jungfraujoch/frame_serialize/ImageMessage.h

51 lines
1.2 KiB
C++

// Copyright (2019-2022) Paul Scherrer Institute
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef JUNGFRAUJOCH_IMAGEMESSAGE_H
#define JUNGFRAUJOCH_IMAGEMESSAGE_H
#include <string>
#include <cstdint>
#include <map>
#include <vector>
#include "../compression/CompressionAlgorithmEnum.h"
#include "../common/SpotToSave.h"
struct CBORImage {
const uint8_t *data;
size_t size; // Including compression
size_t xpixel;
size_t ypixel;
size_t pixel_depth_bytes;
bool pixel_is_signed;
CompressionAlgorithm algorithm;
std::string channel;
};
struct DataMessage {
int64_t number = INT64_MIN;
CBORImage image;
std::vector<SpotToSave> spots;
std::vector<float> rad_int_profile;
uint64_t indexing_result; // 0 - not tried, 1 - tried and failed, 2 - tried and success
std::vector<float> indexing_lattice;
uint64_t bunch_id;
uint32_t jf_info;
float receiver_available_send_buffers;
int64_t receiver_aq_dev_delay;
uint64_t timestamp;
uint32_t timestamp_base;
uint32_t storage_cell;
uint32_t exptime;
uint32_t exptime_base;
std::string series_unique_id;
uint64_t series_id;
};
#endif //JUNGFRAUJOCH_IMAGEMESSAGE_H