mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
Dev/rx callbacks (#966)
* changed rxr callback signatures to all include structs * removed datamodify call back as size can be changed in the original data call back now * bringing some parameters (set functions) to dataProcessor class for its callback (namely udpport, quad, fliprows, totalframes, jsonheader), resulting in also removing totalframes from 2 other function signatures * updated MultiReceiverApp to reflect the new callback signatures
This commit is contained in:
@ -25,7 +25,9 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#else
|
||||
// C includes
|
||||
#include <stdint.h>
|
||||
@ -113,6 +115,20 @@ class slsDetectorDefs {
|
||||
STOPPED
|
||||
};
|
||||
|
||||
/**
|
||||
dimension indexes
|
||||
*/
|
||||
enum dimension { X, Y };
|
||||
|
||||
#ifdef __cplusplus
|
||||
struct xy {
|
||||
int x{0};
|
||||
int y{0};
|
||||
xy() = default;
|
||||
xy(int x, int y) : x(x), y(y){};
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/**
|
||||
@short structure for a Detector Packet or Image Header
|
||||
Details at https://slsdetectorgroup.github.io/devdoc/udpheader.html
|
||||
@ -160,6 +176,36 @@ class slsDetectorDefs {
|
||||
sls_detector_header detHeader; /**< is the detector header */
|
||||
sls_bitset packetsMask; /**< is the packets caught bit mask */
|
||||
};
|
||||
|
||||
struct startCallbackHeader {
|
||||
std::vector<uint32_t> udpPort;
|
||||
uint32_t dynamicRange;
|
||||
xy detectorShape;
|
||||
size_t imageSize;
|
||||
std::string filePath;
|
||||
std::string fileName;
|
||||
uint64_t fileIndex;
|
||||
bool quad;
|
||||
std::map<std::string, std::string> addJsonHeader;
|
||||
};
|
||||
|
||||
struct endCallbackHeader {
|
||||
std::vector<uint32_t> udpPort;
|
||||
std::vector<uint64_t> completeFrames;
|
||||
std::vector<uint64_t> lastFrameIndex;
|
||||
};
|
||||
|
||||
struct dataCallbackHeader {
|
||||
uint32_t udpPort;
|
||||
xy shape;
|
||||
uint64_t acqIndex;
|
||||
uint64_t frameIndex;
|
||||
double progress;
|
||||
bool completeImage;
|
||||
bool flipRows;
|
||||
std::map<std::string, std::string> addJsonHeader;
|
||||
};
|
||||
|
||||
#endif
|
||||
enum frameDiscardPolicy {
|
||||
NO_DISCARD,
|
||||
@ -224,20 +270,6 @@ typedef struct {
|
||||
READOUT_ZMQ_ACTION
|
||||
};
|
||||
|
||||
/**
|
||||
dimension indexes
|
||||
*/
|
||||
enum dimension { X, Y };
|
||||
|
||||
#ifdef __cplusplus
|
||||
struct xy {
|
||||
int x{0};
|
||||
int y{0};
|
||||
xy() = default;
|
||||
xy(int x, int y) : x(x), y(y){};
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/**
|
||||
use of the external signals
|
||||
*/
|
||||
|
Reference in New Issue
Block a user