rxr done WIP

This commit is contained in:
2020-04-24 15:13:37 +02:00
parent 085cbbf0d6
commit bb32b2f653
14 changed files with 314 additions and 593 deletions

View File

@ -736,8 +736,8 @@ void DetectorImpl::readFrameFromReceiver() {
nPixelsX = zHeader.npixelsx; nPixelsX = zHeader.npixelsx;
nPixelsY = zHeader.npixelsy; nPixelsY = zHeader.npixelsy;
// detector shape // detector shape
nX = zHeader.ndetx; nX = zHeader.nSocketX;
nY = zHeader.ndety; nY = zHeader.nSocketY;
nY *= numInterfaces; nY *= numInterfaces;
nDetPixelsX = nX * nPixelsX; nDetPixelsX = nX * nPixelsX;
nDetPixelsY = nY * nPixelsY; nDetPixelsY = nY * nPixelsY;

View File

@ -140,6 +140,10 @@ sls::MacAddr Receiver::configure(slsDetectorDefs::rxParameters arg) {
memcpy(&arg.zmq_ip, &ip, sizeof(ip)); memcpy(&arg.zmq_ip, &ip, sizeof(ip));
} }
if (arg.detType == EIGER) {
arg.udpInterfaces = 2;
}
LOG(logDEBUG1) LOG(logDEBUG1)
<< "detType:" << arg.detType << std::endl << "detType:" << arg.detType << std::endl
<< "detectorSize.x:" << arg.detectorSize.x << std::endl << "detectorSize.x:" << arg.detectorSize.x << std::endl

View File

@ -95,7 +95,7 @@ void ClientInterface::startTCPServer() {
} }
if (receiver) { if (receiver) {
receiver->shutDownUDPSockets(); receiver->shutDownUDPSocket();
} }
LOG(logINFOBLUE) << "Exiting [ TCP server Tid: " << syscall(SYS_gettid) << "]"; LOG(logINFOBLUE) << "Exiting [ TCP server Tid: " << syscall(SYS_gettid) << "]";
} }
@ -186,10 +186,8 @@ int ClientInterface::functionTable(){
flist[F_SET_RECEIVER_QUAD] = &ClientInterface::set_quad_type; flist[F_SET_RECEIVER_QUAD] = &ClientInterface::set_quad_type;
flist[F_SET_RECEIVER_READ_N_LINES] = &ClientInterface::set_read_n_lines; flist[F_SET_RECEIVER_READ_N_LINES] = &ClientInterface::set_read_n_lines;
flist[F_SET_RECEIVER_UDP_IP] = &ClientInterface::set_udp_ip; flist[F_SET_RECEIVER_UDP_IP] = &ClientInterface::set_udp_ip;
flist[F_SET_RECEIVER_UDP_IP2] = &ClientInterface::set_udp_ip2;
flist[F_SET_RECEIVER_UDP_PORT] = &ClientInterface::set_udp_port; flist[F_SET_RECEIVER_UDP_PORT] = &ClientInterface::set_udp_port;
flist[F_SET_RECEIVER_UDP_PORT2] = &ClientInterface::set_udp_port2; flist[F_SET_RECEIVER_NUM_INTERFACES] = &ClientInterface::set_num_interfaces;
flist[F_SET_RECEIVER_NUM_INTERFACES] = &ClientInterface::set_num_interfaces;
flist[F_RECEIVER_SET_ADC_MASK_10G] = &ClientInterface::set_adc_mask_10g; flist[F_RECEIVER_SET_ADC_MASK_10G] = &ClientInterface::set_adc_mask_10g;
flist[F_RECEIVER_SET_NUM_COUNTERS] = &ClientInterface::set_num_counters; flist[F_RECEIVER_SET_NUM_COUNTERS] = &ClientInterface::set_num_counters;
flist[F_INCREMENT_FILE_INDEX] = &ClientInterface::increment_file_index; flist[F_INCREMENT_FILE_INDEX] = &ClientInterface::increment_file_index;
@ -392,22 +390,24 @@ int ClientInterface::setup_receiver(Interface &socket) {
impl()->setDetectorHostname(arg.hostname); impl()->setDetectorHostname(arg.hostname);
// udp setup // udp setup
sls::MacAddr retvals[2]; // primary interface.. only udpip, else udpip2 impl()->setInterfaceId(arg.interfaceId);
if (arg.udp_dstmac == 0 && arg.udp_dstip != 0) { sls::MacAddr retval;
retvals[0] = setUdpIp(sls::IpAddr(arg.udp_dstip)); if (arg.interfaceId == 0) {
} if (arg.udp_dstmac == 0 && arg.udp_dstip != 0) {
if (arg.udp_dstmac2 == 0 && arg.udp_dstip2 != 0) { retval = setUdpIp(sls::IpAddr(arg.udp_dstip));
retvals[1] = setUdpIp2(sls::IpAddr(arg.udp_dstip2));
}
impl()->setUDPPortNumber(arg.udp_dstport);
impl()->setUDPPortNumber2(arg.udp_dstport2);
if (myDetectorType == JUNGFRAU) {
try {
impl()->setNumberofUDPInterfaces(arg.udpInterfaces);
} catch(const RuntimeError &e) {
throw RuntimeError("Failed to set number of interfaces to " +
std::to_string(arg.udpInterfaces));
} }
impl()->setUDPPortNumber(arg.udp_dstport);
} else {
if (arg.udp_dstmac2 == 0 && arg.udp_dstip2 != 0) {
retval = setUdpIp(sls::IpAddr(arg.udp_dstip2));
}
impl()->setUDPPortNumber(arg.udp_dstport2);
}
try {
impl()->setNumberofUDPInterfaces(arg.udpInterfaces);
} catch(const RuntimeError &e) {
throw RuntimeError("Failed to set number of interfaces to " +
std::to_string(arg.udpInterfaces));
} }
impl()->setUDPSocketBufferSize(0); impl()->setUDPSocketBufferSize(0);
@ -509,7 +509,7 @@ int ClientInterface::setup_receiver(Interface &socket) {
} }
impl()->setStreamingSourceIP(ip); impl()->setStreamingSourceIP(ip);
} }
return socket.sendResult(retvals); return socket.sendResult(retval);
} }
void ClientInterface::setDetectorType(detectorType arg) { void ClientInterface::setDetectorType(detectorType arg) {
@ -532,6 +532,7 @@ void ClientInterface::setDetectorType(detectorType arg) {
receiver = sls::make_unique<Implementation>(arg); receiver = sls::make_unique<Implementation>(arg);
myDetectorType = arg; myDetectorType = arg;
} catch (...) { } catch (...) {
receiver.reset();
throw RuntimeError("Could not set detector type"); throw RuntimeError("Could not set detector type");
} }
@ -904,15 +905,9 @@ int ClientInterface::get_frame_index(Interface &socket) {
} }
int ClientInterface::get_missing_packets(Interface &socket) { int ClientInterface::get_missing_packets(Interface &socket) {
std::vector<uint64_t> m = impl()->getNumMissingPackets(); uint64_t retval = impl()->getNumMissingPackets();
LOG(logDEBUG1) << "missing packets:" << sls::ToString(m); LOG(logDEBUG1) << "missing packets:" << retval;
int retvalsize = m.size(); return socket.sendResult(retval);
uint64_t retval[retvalsize];
std::copy(std::begin(m), std::end(m), retval);
socket.Send(OK);
socket.Send(&retvalsize, sizeof(retvalsize));
socket.Send(retval, sizeof(retval));
return OK;
} }
int ClientInterface::get_frames_caught(Interface &socket) { int ClientInterface::get_frames_caught(Interface &socket) {
@ -1564,9 +1559,7 @@ sls::MacAddr ClientInterface::setUdpIp(sls::IpAddr arg) {
LOG(logERROR) << "Failed to get udp ethernet interface from IP " << arg << ". Got " << eth; LOG(logERROR) << "Failed to get udp ethernet interface from IP " << arg << ". Got " << eth;
} }
impl()->setEthernetInterface(eth); impl()->setEthernetInterface(eth);
if (myDetectorType == EIGER) {
impl()->setEthernetInterface2(eth);
}
// get mac address // get mac address
auto retval = sls::InterfaceNameToMac(eth); auto retval = sls::InterfaceNameToMac(eth);
if (retval == 0) { if (retval == 0) {
@ -1584,38 +1577,6 @@ int ClientInterface::set_udp_ip(Interface &socket) {
return socket.sendResult(retval); return socket.sendResult(retval);
} }
sls::MacAddr ClientInterface::setUdpIp2(sls::IpAddr arg) {
// getting eth
std::string eth = sls::IpToInterfaceName(arg.str());
if (eth == "none") {
throw RuntimeError("Failed to get udp ethernet interface2 from IP " + arg.str());
}
if (eth.find('.') != std::string::npos) {
eth = "";
LOG(logERROR) << "Failed to get udp ethernet interface2 from IP " << arg << ". Got " << eth;
}
impl()->setEthernetInterface2(eth);
// get mac address
auto retval = sls::InterfaceNameToMac(eth);
if (retval == 0) {
throw RuntimeError("Failed to get udp mac adddress2 to listen to (eth:" + eth + ", ip:" + arg.str() + ")\n");
}
return retval;
}
int ClientInterface::set_udp_ip2(Interface &socket) {
auto arg = socket.Receive<sls::IpAddr>();
verifyIdle(socket);
if (myDetectorType != JUNGFRAU) {
throw RuntimeError("UDP Destination IP2 not implemented for this detector");
}
LOG(logINFO) << "Received UDP IP2: " << arg;
auto retval = setUdpIp2(arg);
LOG(logINFO) << "Receiver MAC Address2: " << retval;
return socket.sendResult(retval);
}
int ClientInterface::set_udp_port(Interface &socket) { int ClientInterface::set_udp_port(Interface &socket) {
auto arg = socket.Receive<int>(); auto arg = socket.Receive<int>();
verifyIdle(socket); verifyIdle(socket);
@ -1625,18 +1586,6 @@ int ClientInterface::set_udp_port(Interface &socket) {
return OK; return OK;
} }
int ClientInterface::set_udp_port2(Interface &socket) {
auto arg = socket.Receive<int>();
verifyIdle(socket);
if (myDetectorType != JUNGFRAU && myDetectorType != EIGER) {
throw RuntimeError("UDP Destination Port2 not implemented for this detector");
}
LOG(logDEBUG1) << "Setting UDP Port:" << arg;
impl()->setUDPPortNumber2(arg);
socket.Send(OK);
return OK;
}
int ClientInterface::set_num_interfaces(Interface &socket) { int ClientInterface::set_num_interfaces(Interface &socket) {
auto arg = socket.Receive<int>(); auto arg = socket.Receive<int>();
arg = (arg > 1 ? 2 : 1); arg = (arg > 1 ? 2 : 1);

View File

@ -146,10 +146,7 @@ class ClientInterface : private virtual slsDetectorDefs {
int set_read_n_lines(sls::ServerInterface &socket); int set_read_n_lines(sls::ServerInterface &socket);
sls::MacAddr setUdpIp(sls::IpAddr arg); sls::MacAddr setUdpIp(sls::IpAddr arg);
int set_udp_ip(sls::ServerInterface &socket); int set_udp_ip(sls::ServerInterface &socket);
sls::MacAddr setUdpIp2(sls::IpAddr arg);
int set_udp_ip2(sls::ServerInterface &socket);
int set_udp_port(sls::ServerInterface &socket); int set_udp_port(sls::ServerInterface &socket);
int set_udp_port2(sls::ServerInterface &socket);
int set_num_interfaces(sls::ServerInterface &socket); int set_num_interfaces(sls::ServerInterface &socket);
int set_adc_mask_10g(sls::ServerInterface &socket); int set_adc_mask_10g(sls::ServerInterface &socket);
int set_num_counters(sls::ServerInterface &socket); int set_num_counters(sls::ServerInterface &socket);

View File

@ -17,7 +17,7 @@ const std::string DataStreamer::TypeName = "DataStreamer";
DataStreamer::DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r, DataStreamer::DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r,
uint64_t* fi, int fd, int* nd, bool* qe, uint64_t* tot) : uint64_t* fi, int fd, int* nr, bool* qe, uint64_t* tot) :
ThreadObject(ind, TypeName), ThreadObject(ind, TypeName),
fifo(f), fifo(f),
dynamicRange(dr), dynamicRange(dr),
@ -27,8 +27,8 @@ DataStreamer::DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r,
quadEnable(qe), quadEnable(qe),
totalNumFrames(tot) totalNumFrames(tot)
{ {
numDet[0] = nd[0]; numRx[0] = nr[0];
numDet[1] = nd[1]; numRx[1] = nr[1];
LOG(logDEBUG) << "DataStreamer " << ind << " created"; LOG(logDEBUG) << "DataStreamer " << ind << " created";
} }
@ -74,9 +74,9 @@ void DataStreamer::SetGeneralData(GeneralData* g) {
generalData->Print(); generalData->Print();
} }
void DataStreamer::SetNumberofDetectors(int* nd) { void DataStreamer::SetReceiverShape(int* nr) {
numDet[0] = nd[0]; numRx[0] = nr[0];
numDet[1] = nd[1]; numRx[1] = nr[1];
} }
void DataStreamer::SetFlippedDataX(int fd) { void DataStreamer::SetFlippedDataX(int fd) {
@ -211,8 +211,8 @@ int DataStreamer::SendHeader(sls_receiver_header* rheader, uint32_t size, uint32
zHeader.dynamicRange = *dynamicRange; zHeader.dynamicRange = *dynamicRange;
zHeader.fileIndex = *fileIndex; zHeader.fileIndex = *fileIndex;
zHeader.ndetx = numDet[0]; zHeader.nSocketX = numRx[0];
zHeader.ndety = numDet[1]; zHeader.nSocketY = numRx[1];
zHeader.npixelsx = nx; zHeader.npixelsx = nx;
zHeader.npixelsy = ny; zHeader.npixelsy = ny;
zHeader.imageSize = size; zHeader.imageSize = size;

View File

@ -29,12 +29,12 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
* @param r roi * @param r roi
* @param fi pointer to file index * @param fi pointer to file index
* @param fd flipped data enable for x dimension * @param fd flipped data enable for x dimension
* @param nd pointer to number of detectors in each dimension * @param nd pointer to number of receivers in each dimension
* @param qe pointer to quad Enable * @param qe pointer to quad Enable
* @param tot pointer to total number of frames * @param tot pointer to total number of frames
*/ */
DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r, DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r,
uint64_t* fi, int fd, int* nd, bool* qe, uint64_t* tot); uint64_t* fi, int fd, int* nr, bool* qe, uint64_t* tot);
/** /**
* Destructor * Destructor
@ -60,10 +60,10 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
void SetGeneralData(GeneralData* g); void SetGeneralData(GeneralData* g);
/** /**
* Set number of detectors * Set receiver shape
* @param number of detectors in both dimensions * @param number of receivers in both dimensions
*/ */
void SetNumberofDetectors(int* nd); void SetReceiverShape(int* nr);
/** /**
* Set Flipped data enable across x dimension * Set Flipped data enable across x dimension
@ -178,8 +178,8 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
/** Complete buffer used for roi, eg. shortGotthard */ /** Complete buffer used for roi, eg. shortGotthard */
char* completeBuffer{nullptr}; char* completeBuffer{nullptr};
/** Number of Detectors in X and Y dimension */ /** Number of Recievers in X and Y dimension */
int numDet[2]; int numRx[2];
/** Quad Enable */ /** Quad Enable */
bool* quadEnable; bool* quadEnable;

View File

@ -64,9 +64,6 @@ public:
/** Default Fifo depth */ /** Default Fifo depth */
uint32_t defaultFifoDepth; uint32_t defaultFifoDepth;
/** Threads per receiver */
uint32_t threadsPerReceiver;
/** Size of a header packet */ /** Size of a header packet */
uint32_t headerPacketSize; uint32_t headerPacketSize;
@ -105,7 +102,6 @@ public:
maxFramesPerFile(0), maxFramesPerFile(0),
fifoBufferHeaderSize(0), fifoBufferHeaderSize(0),
defaultFifoDepth(0), defaultFifoDepth(0),
threadsPerReceiver(1),
headerPacketSize(0), headerPacketSize(0),
nPixelsXComplete(0), nPixelsXComplete(0),
nPixelsYComplete(0), nPixelsYComplete(0),
@ -233,7 +229,6 @@ public:
LOG(level) << "Max Frames Per File: " << maxFramesPerFile; LOG(level) << "Max Frames Per File: " << maxFramesPerFile;
LOG(level) << "Fifo Buffer Header Size: " << fifoBufferHeaderSize; LOG(level) << "Fifo Buffer Header Size: " << fifoBufferHeaderSize;
LOG(level) << "Default Fifo Depth: " << defaultFifoDepth; LOG(level) << "Default Fifo Depth: " << defaultFifoDepth;
LOG(level) << "Threads Per Receiver: " << threadsPerReceiver;
LOG(level) << "Header Packet Size: " << headerPacketSize; LOG(level) << "Header Packet Size: " << headerPacketSize;
LOG(level) << "Complete Pixels X: " << nPixelsXComplete; LOG(level) << "Complete Pixels X: " << nPixelsXComplete;
LOG(level) << "Complete Pixels Y: " << nPixelsYComplete; LOG(level) << "Complete Pixels Y: " << nPixelsYComplete;
@ -415,7 +410,6 @@ class EigerData : public GeneralData {
maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE; maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE;
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header); fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header);
defaultFifoDepth = 1000; defaultFifoDepth = 1000;
threadsPerReceiver = 2;
headerPacketSize = 40; headerPacketSize = 40;
standardheader = true; standardheader = true;
}; };
@ -479,7 +473,6 @@ class JungfrauData : public GeneralData {
nPixelsY = 256; nPixelsY = 256;
packetsPerFrame = 64; packetsPerFrame = 64;
imageSize = dataSize * packetsPerFrame; imageSize = dataSize * packetsPerFrame;
threadsPerReceiver = 2;
defaultUdpSocketBufferSize = (500 * 1024 * 1024); defaultUdpSocketBufferSize = (500 * 1024 * 1024);
} }
@ -488,7 +481,6 @@ class JungfrauData : public GeneralData {
nPixelsY = 512; nPixelsY = 512;
packetsPerFrame = 128; packetsPerFrame = 128;
imageSize = dataSize * packetsPerFrame; imageSize = dataSize * packetsPerFrame;
threadsPerReceiver = 1;
defaultUdpSocketBufferSize = (1000 * 1024 * 1024); defaultUdpSocketBufferSize = (1000 * 1024 * 1024);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -76,12 +76,12 @@ class Implementation : private virtual slsDetectorDefs {
uint64_t getFramesCaught() const; uint64_t getFramesCaught() const;
uint64_t getAcquisitionIndex() const; uint64_t getAcquisitionIndex() const;
int getProgress() const; int getProgress() const;
std::vector<uint64_t> getNumMissingPackets() const; uint64_t getNumMissingPackets() const;
void startReceiver(); void startReceiver();
void setStoppedFlag(bool stopped); void setStoppedFlag(bool stopped);
void stopReceiver(); void stopReceiver();
void startReadout(); void startReadout();
void shutDownUDPSockets(); void shutDownUDPSocket();
void closeFiles(); void closeFiles();
void restreamStop(); void restreamStop();
@ -91,19 +91,15 @@ class Implementation : private virtual slsDetectorDefs {
* Network Configuration (UDP) * * Network Configuration (UDP) *
* * * *
* ************************************************/ * ************************************************/
int getInterfaceId() const;
void setInterfaceId(const int value);
int getNumberofUDPInterfaces() const; int getNumberofUDPInterfaces() const;
/* [Jungfrau] */ /* [Jungfrau] */
void setNumberofUDPInterfaces(const int n); void setNumberofUDPInterfaces(const int n);
std::string getEthernetInterface() const; std::string getEthernetInterface() const;
void setEthernetInterface(const std::string &c); void setEthernetInterface(const std::string &c);
std::string getEthernetInterface2() const;
/* [Jungfrau] */
void setEthernetInterface2(const std::string &c);
uint32_t getUDPPortNumber() const; uint32_t getUDPPortNumber() const;
void setUDPPortNumber(const uint32_t i); void setUDPPortNumber(const uint32_t i);
uint32_t getUDPPortNumber2() const;
/* [Eiger][Jungfrau] */
void setUDPPortNumber2(const uint32_t i);
int64_t getUDPSocketBufferSize() const; int64_t getUDPSocketBufferSize() const;
void setUDPSocketBufferSize(const int64_t s); void setUDPSocketBufferSize(const int64_t s);
int64_t getActualUDPSocketBufferSize() const; int64_t getActualUDPSocketBufferSize() const;
@ -226,7 +222,7 @@ class Implementation : private virtual slsDetectorDefs {
void SetupFifoStructure(); void SetupFifoStructure();
void ResetParametersforNewAcquisition(); void ResetParametersforNewAcquisition();
void CreateUDPSockets(); void CreateUDPSocket();
void SetupWriter(); void SetupWriter();
void StartRunning(); void StartRunning();
@ -238,9 +234,9 @@ class Implementation : private virtual slsDetectorDefs {
* ************************************************/ * ************************************************/
// config parameters // config parameters
int numThreads;
detectorType myDetectorType; detectorType myDetectorType;
int numDet[MAX_DIMENSIONS]; int numDet[MAX_DIMENSIONS];
int numRx[MAX_DIMENSIONS];
int detID; int detID;
std::string detHostname; std::string detHostname;
bool silentMode; bool silentMode;
@ -263,9 +259,10 @@ class Implementation : private virtual slsDetectorDefs {
bool stoppedFlag; bool stoppedFlag;
// network configuration (UDP) // network configuration (UDP)
int interfaceId;
int numUDPInterfaces; int numUDPInterfaces;
std::vector <std::string> eth; std::string eth;
std::vector <uint32_t> udpPortNum; uint32_t udpPortNum;
int64_t udpSocketBufferSize; int64_t udpSocketBufferSize;
int64_t actualUDPSocketBufferSize; int64_t actualUDPSocketBufferSize;
@ -318,8 +315,8 @@ class Implementation : private virtual slsDetectorDefs {
// class objects // class objects
GeneralData *generalData; GeneralData *generalData;
std::vector<std::unique_ptr<Listener>> listener; std::unique_ptr<Listener> listener;
std::vector<std::unique_ptr<DataProcessor>> dataProcessor; std::unique_ptr<DataProcessor> dataProcessor;
std::vector<std::unique_ptr<DataStreamer>> dataStreamer; std::unique_ptr<DataStreamer> dataStreamer;
std::vector<std::unique_ptr<Fifo>> fifo; std::unique_ptr<Fifo> fifo;
}; };

View File

@ -112,7 +112,7 @@ void Listener::SetGeneralData(GeneralData* g) {
} }
void Listener::CreateUDPSockets() { void Listener::CreateUDPSocket() {
if (!(*activated)) { if (!(*activated)) {
return; return;
} }

View File

@ -83,9 +83,9 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
void SetGeneralData(GeneralData* g); void SetGeneralData(GeneralData* g);
/** /**
* Creates UDP Sockets * Creates UDP Socket
*/ */
void CreateUDPSockets(); void CreateUDPSocket();
/** /**
* Shuts down and deletes UDP Sockets * Shuts down and deletes UDP Sockets

View File

@ -26,10 +26,10 @@ struct zmqHeader {
uint32_t jsonversion{0}; uint32_t jsonversion{0};
uint32_t dynamicRange{0}; uint32_t dynamicRange{0};
uint64_t fileIndex{0}; uint64_t fileIndex{0};
/** number of detectors in x axis */ /** number of sockets in x axis */
uint32_t ndetx{0}; uint32_t nSocketX{0};
/** number of detectors in y axis */ /** number of sockets in y axis */
uint32_t ndety{0}; uint32_t nSocketY{0};
/** number of pixels/channels in x axis for this zmq socket */ /** number of pixels/channels in x axis for this zmq socket */
uint32_t npixelsx{0}; uint32_t npixelsx{0};
/** number of pixels/channels in y axis for this zmq socket */ /** number of pixels/channels in y axis for this zmq socket */

View File

@ -285,9 +285,7 @@ enum detFuncs{
F_SET_RECEIVER_QUAD, F_SET_RECEIVER_QUAD,
F_SET_RECEIVER_READ_N_LINES, F_SET_RECEIVER_READ_N_LINES,
F_SET_RECEIVER_UDP_IP, F_SET_RECEIVER_UDP_IP,
F_SET_RECEIVER_UDP_IP2,
F_SET_RECEIVER_UDP_PORT, F_SET_RECEIVER_UDP_PORT,
F_SET_RECEIVER_UDP_PORT2,
F_SET_RECEIVER_NUM_INTERFACES, F_SET_RECEIVER_NUM_INTERFACES,
F_RECEIVER_SET_ADC_MASK_10G, F_RECEIVER_SET_ADC_MASK_10G,
F_RECEIVER_SET_NUM_COUNTERS, F_RECEIVER_SET_NUM_COUNTERS,
@ -579,9 +577,7 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_SET_RECEIVER_QUAD: return "F_SET_RECEIVER_QUAD"; case F_SET_RECEIVER_QUAD: return "F_SET_RECEIVER_QUAD";
case F_SET_RECEIVER_READ_N_LINES: return "F_SET_RECEIVER_READ_N_LINES"; case F_SET_RECEIVER_READ_N_LINES: return "F_SET_RECEIVER_READ_N_LINES";
case F_SET_RECEIVER_UDP_IP: return "F_SET_RECEIVER_UDP_IP"; case F_SET_RECEIVER_UDP_IP: return "F_SET_RECEIVER_UDP_IP";
case F_SET_RECEIVER_UDP_IP2: return "F_SET_RECEIVER_UDP_IP2";
case F_SET_RECEIVER_UDP_PORT: return "F_SET_RECEIVER_UDP_PORT"; case F_SET_RECEIVER_UDP_PORT: return "F_SET_RECEIVER_UDP_PORT";
case F_SET_RECEIVER_UDP_PORT2: return "F_SET_RECEIVER_UDP_PORT2";
case F_SET_RECEIVER_NUM_INTERFACES: return "F_SET_RECEIVER_NUM_INTERFACES"; case F_SET_RECEIVER_NUM_INTERFACES: return "F_SET_RECEIVER_NUM_INTERFACES";
case F_RECEIVER_SET_ADC_MASK_10G: return "F_RECEIVER_SET_ADC_MASK_10G"; case F_RECEIVER_SET_ADC_MASK_10G: return "F_RECEIVER_SET_ADC_MASK_10G";
case F_RECEIVER_SET_NUM_COUNTERS: return "F_RECEIVER_SET_NUM_COUNTERS"; case F_RECEIVER_SET_NUM_COUNTERS: return "F_RECEIVER_SET_NUM_COUNTERS";

View File

@ -187,8 +187,8 @@ int ZmqSocket::SendHeader(
header.jsonversion, header.jsonversion,
header.dynamicRange, header.dynamicRange,
header.fileIndex, header.fileIndex,
header.ndetx, header.nSocketX,
header.ndety, header.nSocketY,
header.npixelsx, header.npixelsx,
header.npixelsy, header.npixelsy,
header.imageSize, header.imageSize,
@ -319,8 +319,8 @@ int ZmqSocket::ParseHeader(const int index, int length, char *buff,
zHeader.data = ((document["data"].GetUint()) == 0) ? false : true; zHeader.data = ((document["data"].GetUint()) == 0) ? false : true;
zHeader.dynamicRange = document["bitmode"].GetUint(); zHeader.dynamicRange = document["bitmode"].GetUint();
zHeader.fileIndex = document["fileIndex"].GetUint64(); zHeader.fileIndex = document["fileIndex"].GetUint64();
zHeader.ndetx = document["detshape"][0].GetUint(); zHeader.nSocketX = document["detshape"][0].GetUint();
zHeader.ndety = document["detshape"][1].GetUint(); zHeader.nSocketY = document["detshape"][1].GetUint();
zHeader.npixelsx = document["shape"][0].GetUint(); zHeader.npixelsx = document["shape"][0].GetUint();
zHeader.npixelsy = document["shape"][1].GetUint(); zHeader.npixelsy = document["shape"][1].GetUint();
zHeader.imageSize = document["size"].GetUint(); zHeader.imageSize = document["size"].GetUint();