// SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package #ifndef IMAGEZMQ16BIT_H #define IMAGEZMQ16BIT_H #include "slsDetectorData.h" class imageZmq16bit : public slsDetectorData { private: // int iframe; public: /** Implements the slsReceiverData structure for the moench02 prototype read out by a module i.e. using the slsReceiver (160x160 pixels, 40 packets 1286 large etc.) \param c crosstalk parameter for the output buffer */ // moench03T1ZmqDataNew(int ns=5000): slsDetectorData(400, 400, ns*32*2+sizeof(int)), nSamples(ns), offset(sizeof(int)), xtalk(0.00021) { imageZmq16bit(int nnx=400, int nny=400): slsDetectorData(nnx, nny, 2*nnx*nny) { cout << "* " << nx << " " << ny << endl; int is=0; for (int row=0; row=0) // fnum=ff; if (filebin.is_open()) { if (filebin.read(data, 2*nx*ny) ){ // iframe++; //ff=iframe; return data; } } return NULL; }; virtual char *findNextFrame(char *data, int &ndata, int dsize){ if (dsize<2*nx*ny) ndata=dsize; else ndata=2*nx*ny; return data; } // virtual int setFrameNumber(int ff){iframe=ff}; int getPacketNumber(int x, int y) {return 0;}; }; #endif