mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 22:37:14 +02:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
f761046bfc | |||
1a859b83db | |||
70bfc875a6 | |||
c0755308a4 | |||
ab5509e10c | |||
004cb26646 | |||
a4f47a5945 | |||
312f3f473d | |||
5871086cd6 | |||
6a0fe823b3 | |||
5912aae53e | |||
8833ccf5cc |
@ -2,7 +2,7 @@
|
|||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(slsDetectorPackage)
|
project(slsDetectorPackage)
|
||||||
set(PROJECT_VERSION 7.0.1)
|
set(PROJECT_VERSION 7.0.2)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||||
|
|
||||||
|
72
RELEASE.txt
72
RELEASE.txt
@ -1,7 +1,7 @@
|
|||||||
SLS Detector Package Major Release 7.0.1 released on 24.03.2023
|
SLS Detector Package Major Release 7.0.2 released on 12.07.2023
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
This document describes the differences between v7.0.1 and v7.0.0
|
This document describes the differences between v7.0.2 and v7.0.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -15,40 +15,66 @@ This document describes the differences between v7.0.1 and v7.0.0
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1 Resolved Issues
|
1 Resolved Issues
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
|
||||||
Receiver
|
Firmware
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
* [Jungfrau] Stopping acquisition in sync mode
|
||||||
* HDF5 Compilation
|
Previously, stopping acquisition in sync mode would result in the slave
|
||||||
Compilation issues from 7.0.0 fixed.
|
status remaining in Running status for next acquisition and framesl (frames
|
||||||
|
left) would be stuck from the previous acquisition. This is fixed in firmware.
|
||||||
|
|
||||||
|
|
||||||
* Arping error
|
|
||||||
Cmdline: rx_arping
|
|
||||||
API: setRxArping/ getRxArping
|
|
||||||
Even if arping was successful, it gave an error. Fixed.
|
|
||||||
|
|
||||||
|
Detector Server
|
||||||
|
---------------
|
||||||
|
|
||||||
|
* [Jungfrau] Changing master to slave in sync mode
|
||||||
|
When in sync mode, changing from master to slave would change the status
|
||||||
|
to Running in firmware. A workaround in the detector server fixes this.
|
||||||
|
|
||||||
|
* [Jungfrau] Row and column for multi module Jungfrau
|
||||||
|
This mainly affected only the GUI, unless one was using the row and column
|
||||||
|
sent out by the detector. Row and column values were mixed up, but fixed now.
|
||||||
|
|
||||||
|
* [Jungfrau] Timing in sync mode
|
||||||
|
When sync is enabled, setting or getting timing would give an error. This
|
||||||
|
is fixed now.
|
||||||
|
|
||||||
|
|
||||||
Client
|
Client
|
||||||
------
|
------
|
||||||
|
|
||||||
|
* [Jungfrau] Multi module sync mode
|
||||||
|
For start, stop and trigger acquisition, the procedure to start the slaves
|
||||||
|
(or the master for stop acquisition) first had to be obeyed. This is fixed
|
||||||
|
now.
|
||||||
|
|
||||||
|
|
||||||
|
ZMQ
|
||||||
|
---
|
||||||
|
|
||||||
|
* [Jungfrau][Gotthard2] Client ZMQ port when using 2 interfaces
|
||||||
|
When switching between 1 and 2 interfaces, the client or gui zmq port
|
||||||
|
was not set properly and resulted in dummy streaming forever. This is
|
||||||
|
fixed now.
|
||||||
|
|
||||||
|
* Rx_roi
|
||||||
|
This parameter is now also streamed in the zmq header to be able to use in
|
||||||
|
external GUIs.
|
||||||
|
|
||||||
|
|
||||||
|
GUI
|
||||||
|
---
|
||||||
|
|
||||||
|
* [Jungfrau] Show Fix_G0 in expert mode
|
||||||
|
Fix_G0 was only shown when expert mode was enabled from Settings Tab. Now,
|
||||||
|
fixed to show when expert mode enabled from any tab.
|
||||||
|
|
||||||
* Detector Server Version from previous Releases
|
|
||||||
Hostname command would hang with 7.0.0 client if the detector server
|
|
||||||
was from a previous release (eg. 6.1.2). In this case, the user cannot
|
|
||||||
get the detector server version.
|
|
||||||
|
|
||||||
Fixed that the hostname command will throw an exception about
|
|
||||||
incompatible server with its version in the message. Now, the user can
|
|
||||||
get the version number without having to telnet or ssh to the detector.
|
|
||||||
With this info, one can then update to matching client for that server
|
|
||||||
and start the detector updation process.
|
|
||||||
|
|
||||||
|
|
||||||
2 On-board Detector Server Compatibility
|
2 On-board Detector Server Compatibility
|
||||||
@ -56,7 +82,7 @@ This document describes the differences between v7.0.1 and v7.0.0
|
|||||||
|
|
||||||
|
|
||||||
Eiger 7.0.0
|
Eiger 7.0.0
|
||||||
Jungfrau 7.0.0
|
Jungfrau 7.0.2
|
||||||
Mythen3 7.0.0
|
Mythen3 7.0.0
|
||||||
Gotthard2 7.0.0
|
Gotthard2 7.0.0
|
||||||
Gotthard 7.0.0
|
Gotthard 7.0.0
|
||||||
@ -84,8 +110,8 @@ This document describes the differences between v7.0.1 and v7.0.0
|
|||||||
|
|
||||||
Eiger 20.02.2023 (v31)
|
Eiger 20.02.2023 (v31)
|
||||||
|
|
||||||
Jungfrau 04.11.2022 (v1.4, HW v1.0)
|
Jungfrau 16.05.2023 (v1.4.1, HW v1.0)
|
||||||
03.11.2022 (v2.4, HW v2.0)
|
15.05.2023 (v2.4.1, HW v2.0)
|
||||||
|
|
||||||
Mythen3 24.01.2023 (v1.4)
|
Mythen3 24.01.2023 (v1.4)
|
||||||
|
|
||||||
|
@ -140,14 +140,21 @@ ZMQ: Json Header Format
|
|||||||
"quad": unsigned int,
|
"quad": unsigned int,
|
||||||
"addJsonHeader": {
|
"addJsonHeader": {
|
||||||
string : string
|
string : string
|
||||||
}
|
},
|
||||||
|
"rx_roi": [
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
+--------------+----------------------------------------------+
|
+--------------+----------------------------------------------+
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
+--------------+----------------------------------------------+
|
+--------------+----------------------------------------------+
|
||||||
| jsonversion | Version of the json header. |
|
| jsonversion | Version of the json header. |
|
||||||
| | Value at 4 for v6.x.x and v7.x.x |
|
| | Value at 4 for v6.x.x - v7.0.1 |
|
||||||
|
| | Value at 5 for v7.0.2 |
|
||||||
+--------------+----------------------------------------------+
|
+--------------+----------------------------------------------+
|
||||||
| bitmode | Bits per pixel [4|8|16|32] |
|
| bitmode | Bits per pixel [4|8|16|32] |
|
||||||
+--------------+----------------------------------------------+
|
+--------------+----------------------------------------------+
|
||||||
@ -222,7 +229,10 @@ ZMQ: Json Header Format
|
|||||||
| addJsonHeader| Optional custom parameters that is required |
|
| addJsonHeader| Optional custom parameters that is required |
|
||||||
| | for processing code. |
|
| | for processing code. |
|
||||||
+--------------+----------------------------------------------+
|
+--------------+----------------------------------------------+
|
||||||
|
| rx_roi | ROI in the receiver per port (xmin, xmax, |
|
||||||
|
| | ymin, ymax). For external guis to know |
|
||||||
|
| | what is saved |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
|
||||||
SLS Receiver Header Format
|
SLS Receiver Header Format
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0
|
|
1
serverBin/jungfrauDetectorServerv7.0.2
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.2
|
@ -132,7 +132,7 @@ void qTabSettings::SetupWidgetWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabSettings::SetExportMode(bool exportMode) {
|
void qTabSettings::SetExportMode(bool exportMode) {
|
||||||
if (comboGainMode->isVisible()) {
|
if (comboGainMode->isEnabled()) {
|
||||||
ShowFixG0(exportMode);
|
ShowFixG0(exportMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.2
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.2
Executable file
Binary file not shown.
@ -1388,14 +1388,18 @@ int setMaster(enum MASTERINDEX m) {
|
|||||||
char *master_names[] = {MASTER_NAMES};
|
char *master_names[] = {MASTER_NAMES};
|
||||||
LOG(logINFOBLUE, ("Setting up as %s in (%s server)\n", master_names[m],
|
LOG(logINFOBLUE, ("Setting up as %s in (%s server)\n", master_names[m],
|
||||||
(isControlServer ? "control" : "stop")));
|
(isControlServer ? "control" : "stop")));
|
||||||
|
|
||||||
|
int prevSync = getSynchronization();
|
||||||
|
setSynchronization(0);
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
|
int retMaster = OK;
|
||||||
switch (m) {
|
switch (m) {
|
||||||
case OW_MASTER:
|
case OW_MASTER:
|
||||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_MASTER_MSK);
|
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_MASTER_MSK);
|
||||||
isMaster(&retval);
|
isMaster(&retval);
|
||||||
if (retval != 1) {
|
if (retval != 1) {
|
||||||
LOG(logERROR, ("Could not set master\n"));
|
LOG(logERROR, ("Could not set master\n"));
|
||||||
return FAIL;
|
retMaster = FAIL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OW_SLAVE:
|
case OW_SLAVE:
|
||||||
@ -1403,15 +1407,16 @@ int setMaster(enum MASTERINDEX m) {
|
|||||||
isMaster(&retval);
|
isMaster(&retval);
|
||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
LOG(logERROR, ("Could not set slave\n"));
|
LOG(logERROR, ("Could not set slave\n"));
|
||||||
return FAIL;
|
retMaster = FAIL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG(logERROR, ("Cannot reset to hardware settings from client. Restart "
|
LOG(logERROR, ("Cannot reset to hardware settings from client. Restart "
|
||||||
"detector server.\n"));
|
"detector server.\n"));
|
||||||
return FAIL;
|
retMaster = FAIL;
|
||||||
}
|
}
|
||||||
return OK;
|
setSynchronization(prevSync);
|
||||||
|
return retMaster;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isMaster(int *retval) {
|
int isMaster(int *retval) {
|
||||||
@ -1449,7 +1454,7 @@ void setTiming(enum timingMode arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum timingMode getTiming() {
|
enum timingMode getTiming() {
|
||||||
if (bus_r(EXT_SIGNAL_REG) == EXT_SIGNAL_MSK)
|
if ((bus_r(EXT_SIGNAL_REG) & EXT_SIGNAL_MSK) >> EXT_SIGNAL_OFST)
|
||||||
return TRIGGER_EXPOSURE;
|
return TRIGGER_EXPOSURE;
|
||||||
return AUTO_TIMING;
|
return AUTO_TIMING;
|
||||||
}
|
}
|
||||||
@ -1736,40 +1741,40 @@ int setDetectorPosition(int pos[]) {
|
|||||||
detPos[2] = outerPos[X];
|
detPos[2] = outerPos[X];
|
||||||
detPos[3] = outerPos[Y];
|
detPos[3] = outerPos[Y];
|
||||||
|
|
||||||
// row
|
// row [Y]
|
||||||
// outer
|
// outer
|
||||||
uint32_t addr = COORD_ROW_REG;
|
uint32_t addr = COORD_ROW_REG;
|
||||||
bus_w(addr,
|
bus_w(addr,
|
||||||
(bus_r(addr) & ~COORD_ROW_OUTER_MSK) |
|
(bus_r(addr) & ~COORD_ROW_OUTER_MSK) |
|
||||||
((outerPos[X] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
((outerPos[Y] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
||||||
if (((bus_r(addr) & COORD_ROW_OUTER_MSK) >> COORD_ROW_OUTER_OFST) !=
|
if (((bus_r(addr) & COORD_ROW_OUTER_MSK) >> COORD_ROW_OUTER_OFST) !=
|
||||||
outerPos[X])
|
|
||||||
ret = FAIL;
|
|
||||||
// inner
|
|
||||||
bus_w(addr,
|
|
||||||
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
|
||||||
((innerPos[X] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
|
||||||
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
|
||||||
innerPos[X])
|
|
||||||
ret = FAIL;
|
|
||||||
|
|
||||||
// col
|
|
||||||
// outer
|
|
||||||
addr = COORD_COL_REG;
|
|
||||||
bus_w(addr,
|
|
||||||
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
|
||||||
((outerPos[Y] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
|
||||||
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
|
||||||
outerPos[Y])
|
outerPos[Y])
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
// inner
|
// inner
|
||||||
bus_w(addr,
|
bus_w(addr,
|
||||||
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
||||||
((innerPos[Y] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
((innerPos[Y] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
||||||
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
||||||
innerPos[Y])
|
innerPos[Y])
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
|
|
||||||
|
// col [X]
|
||||||
|
// outer
|
||||||
|
addr = COORD_COL_REG;
|
||||||
|
bus_w(addr,
|
||||||
|
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
||||||
|
((outerPos[X] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
||||||
|
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
||||||
|
outerPos[X])
|
||||||
|
ret = FAIL;
|
||||||
|
// inner
|
||||||
|
bus_w(addr,
|
||||||
|
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
||||||
|
((innerPos[X] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
||||||
|
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
||||||
|
innerPos[X])
|
||||||
|
ret = FAIL;
|
||||||
|
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
if (getNumberofUDPInterfaces() == 1) {
|
if (getNumberofUDPInterfaces() == 1) {
|
||||||
LOG(logINFOBLUE, ("Position set to [%d, %d] #(col, row)\n",
|
LOG(logINFOBLUE, ("Position set to [%d, %d] #(col, row)\n",
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#define MIN_REQRD_VRSN_T_RD_API 0x171220
|
#define MIN_REQRD_VRSN_T_RD_API 0x171220
|
||||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x221104 // 1.0 pcb (version = 010)
|
#define REQRD_FRMWRE_VRSN_BOARD2 0x230516 // 1.0 pcb (version = 010)
|
||||||
#define REQRD_FRMWRE_VRSN 0x221103 // 2.0 pcb (version = 011)
|
#define REQRD_FRMWRE_VRSN 0x230515 // 2.0 pcb (version = 011)
|
||||||
|
|
||||||
#define NUM_HARDWARE_VERSIONS (2)
|
#define NUM_HARDWARE_VERSIONS (2)
|
||||||
#define HARDWARE_VERSION_NUMBERS \
|
#define HARDWARE_VERSION_NUMBERS \
|
||||||
|
@ -855,7 +855,7 @@ void Detector::stopDetector(Positions pos) {
|
|||||||
throw RuntimeError(
|
throw RuntimeError(
|
||||||
"Could not stop detector. Returned error status.");
|
"Could not stop detector. Returned error status.");
|
||||||
}
|
}
|
||||||
pimpl->Parallel(&Module::stopAcquisition, pos);
|
pimpl->stopDetector(pos);
|
||||||
status = getDetectorStatus().squash(defs::runStatus::RUNNING);
|
status = getDetectorStatus().squash(defs::runStatus::RUNNING);
|
||||||
++retries;
|
++retries;
|
||||||
|
|
||||||
@ -914,7 +914,7 @@ void Detector::setNextFrameNumber(uint64_t value, Positions pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::sendSoftwareTrigger(const bool block, Positions pos) {
|
void Detector::sendSoftwareTrigger(const bool block, Positions pos) {
|
||||||
pimpl->Parallel(&Module::sendSoftwareTrigger, pos, block);
|
pimpl->sendSoftwareTrigger(block, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<defs::scanParameters> Detector::getScan(Positions pos) const {
|
Result<defs::scanParameters> Detector::getScan(Positions pos) const {
|
||||||
@ -951,18 +951,23 @@ void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setNumberofUDPInterfaces_(int n, Positions pos) {
|
void Detector::setNumberofUDPInterfaces_(int n, Positions pos) {
|
||||||
|
if (!size()) {
|
||||||
|
throw RuntimeError("No modules added.");
|
||||||
|
}
|
||||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||||
|
int clientStartingPort = getClientZmqPort({0}).squash(0);
|
||||||
bool useReceiver = getUseReceiverFlag().squash(false);
|
bool useReceiver = getUseReceiverFlag().squash(false);
|
||||||
bool previouslyReceiverStreaming = false;
|
bool previouslyReceiverStreaming = false;
|
||||||
int startingPort = 0;
|
int rxStartingPort = 0;
|
||||||
if (useReceiver) {
|
if (useReceiver) {
|
||||||
previouslyReceiverStreaming = getRxZmqDataStream(pos).squash(true);
|
previouslyReceiverStreaming = getRxZmqDataStream(pos).squash(true);
|
||||||
startingPort = getRxZmqPort({0}).squash(0);
|
rxStartingPort = getRxZmqPort({0}).squash(0);
|
||||||
}
|
}
|
||||||
pimpl->Parallel(&Module::setNumberofUDPInterfaces, pos, n);
|
pimpl->Parallel(&Module::setNumberofUDPInterfaces, pos, n);
|
||||||
// ensure receiver zmq socket ports are multiplied by 2 (2 interfaces)
|
// ensure receiver zmq socket ports are multiplied by 2 (2 interfaces)
|
||||||
if (getUseReceiverFlag().squash(false) && size()) {
|
setClientZmqPort(clientStartingPort, -1);
|
||||||
setRxZmqPort(startingPort, -1);
|
if (getUseReceiverFlag().squash(false)) {
|
||||||
|
setRxZmqPort(rxStartingPort, -1);
|
||||||
}
|
}
|
||||||
// redo the zmq sockets if enabled
|
// redo the zmq sockets if enabled
|
||||||
if (previouslyClientStreaming) {
|
if (previouslyClientStreaming) {
|
||||||
|
@ -769,7 +769,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
int nDetActualPixelsY = nDetPixelsY;
|
int nDetActualPixelsY = nDetPixelsY;
|
||||||
|
|
||||||
if (gapPixels) {
|
if (gapPixels) {
|
||||||
int n = InsertGapPixels(multiframe.get(), multigappixels,
|
int n = insertGapPixels(multiframe.get(), multigappixels,
|
||||||
quadEnable, dynamicRange,
|
quadEnable, dynamicRange,
|
||||||
nDetActualPixelsX, nDetActualPixelsY);
|
nDetActualPixelsX, nDetActualPixelsY);
|
||||||
callbackImage = multigappixels;
|
callbackImage = multigappixels;
|
||||||
@ -808,7 +808,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
delete[] multigappixels;
|
delete[] multigappixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DetectorImpl::InsertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||||
int dr, int &nPixelsx, int &nPixelsy) {
|
int dr, int &nPixelsx, int &nPixelsy) {
|
||||||
|
|
||||||
LOG(logDEBUG) << "Insert Gap pixels:"
|
LOG(logDEBUG) << "Insert Gap pixels:"
|
||||||
@ -1256,13 +1256,34 @@ int DetectorImpl::acquire() {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
|
bool DetectorImpl::handleSynchronization(Positions pos) {
|
||||||
// handle Mythen3 synchronization
|
bool handleSync = false;
|
||||||
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
|
// multi module m3 or multi module sync enabled jungfrau
|
||||||
std::vector<int> master;
|
if (size() > 1) {
|
||||||
std::vector<int> slaves;
|
switch (shm()->detType) {
|
||||||
if (positions.empty() ||
|
case defs::MYTHEN3:
|
||||||
(positions.size() == 1 && positions[0] == -1)) {
|
case defs::GOTTHARD2:
|
||||||
|
case defs::GOTTHARD:
|
||||||
|
handleSync = true;
|
||||||
|
break;
|
||||||
|
case defs::JUNGFRAU:
|
||||||
|
if (Parallel(&Module::getSynchronizationFromStopServer, pos)
|
||||||
|
.tsquash("Inconsistent synchronization among modules")) {
|
||||||
|
handleSync = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return handleSync;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::getMasterSlaveList(std::vector<int> positions,
|
||||||
|
std::vector<int> &masters,
|
||||||
|
std::vector<int> &slaves) {
|
||||||
|
// expand positions list
|
||||||
|
if (positions.empty() || (positions.size() == 1 && positions[0] == -1)) {
|
||||||
positions.resize(modules.size());
|
positions.resize(modules.size());
|
||||||
std::iota(begin(positions), end(positions), 0);
|
std::iota(begin(positions), end(positions), 0);
|
||||||
}
|
}
|
||||||
@ -1271,27 +1292,67 @@ void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
|
|||||||
auto is_master = Parallel(&Module::isMaster, positions);
|
auto is_master = Parallel(&Module::isMaster, positions);
|
||||||
for (size_t i : positions) {
|
for (size_t i : positions) {
|
||||||
if (is_master[i])
|
if (is_master[i])
|
||||||
master.push_back(i);
|
masters.push_back(i);
|
||||||
else
|
else
|
||||||
slaves.push_back(i);
|
slaves.push_back(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||||
|
|
||||||
|
// slaves first
|
||||||
|
if (handleSynchronization(pos)) {
|
||||||
|
std::vector<int> masters;
|
||||||
|
std::vector<int> slaves;
|
||||||
|
getMasterSlaveList(pos, masters, slaves);
|
||||||
if (!slaves.empty()) {
|
if (!slaves.empty()) {
|
||||||
Parallel(&Module::startAcquisition, slaves);
|
Parallel(&Module::startAcquisition, slaves);
|
||||||
}
|
}
|
||||||
if (!master.empty()) {
|
if (!masters.empty()) {
|
||||||
if (blocking) {
|
Parallel((blocking ? &Module::startAndReadAll
|
||||||
Parallel(&Module::startAndReadAll, master);
|
: &Module::startAcquisition),
|
||||||
} else {
|
masters);
|
||||||
Parallel(&Module::startAcquisition, master);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
// all in parallel
|
||||||
if (blocking) {
|
else {
|
||||||
Parallel(&Module::startAndReadAll, positions);
|
Parallel(
|
||||||
} else {
|
(blocking ? &Module::startAndReadAll : &Module::startAcquisition),
|
||||||
Parallel(&Module::startAcquisition, positions);
|
pos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::sendSoftwareTrigger(const bool block, Positions pos) {
|
||||||
|
// slaves first
|
||||||
|
if (handleSynchronization(pos)) {
|
||||||
|
std::vector<int> masters;
|
||||||
|
std::vector<int> slaves;
|
||||||
|
getMasterSlaveList(pos, masters, slaves);
|
||||||
|
if (!slaves.empty())
|
||||||
|
Parallel(&Module::sendSoftwareTrigger, slaves, false);
|
||||||
|
if (!masters.empty())
|
||||||
|
Parallel(&Module::sendSoftwareTrigger, masters, block);
|
||||||
|
}
|
||||||
|
// all in parallel
|
||||||
|
else {
|
||||||
|
Parallel(&Module::sendSoftwareTrigger, pos, block);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::stopDetector(Positions pos) {
|
||||||
|
// masters first
|
||||||
|
if (handleSynchronization(pos)) {
|
||||||
|
std::vector<int> masters;
|
||||||
|
std::vector<int> slaves;
|
||||||
|
getMasterSlaveList(pos, masters, slaves);
|
||||||
|
if (!masters.empty())
|
||||||
|
Parallel(&Module::stopAcquisition, masters);
|
||||||
|
if (!slaves.empty())
|
||||||
|
Parallel(&Module::stopAcquisition, slaves);
|
||||||
|
}
|
||||||
|
// all in parallel
|
||||||
|
else {
|
||||||
|
Parallel(&Module::stopAcquisition, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1324,7 +1385,7 @@ void DetectorImpl::processData(bool receiver) {
|
|||||||
if (fgetc(stdin) == 'q') {
|
if (fgetc(stdin) == 'q') {
|
||||||
LOG(logINFO)
|
LOG(logINFO)
|
||||||
<< "Caught the command to stop acquisition";
|
<< "Caught the command to stop acquisition";
|
||||||
Parallel(&Module::stopAcquisition, {});
|
stopDetector({});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// get and print progress
|
// get and print progress
|
||||||
@ -1397,7 +1458,8 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
|||||||
default:
|
default:
|
||||||
throw RuntimeError(
|
throw RuntimeError(
|
||||||
"Unknown detector type. Did the 'hostname' command execute "
|
"Unknown detector type. Did the 'hostname' command execute "
|
||||||
"successfully? Or use update mode in the detector server side.");
|
"successfully? Or use update mode in the detector server "
|
||||||
|
"side.");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(logINFO) << "This can take awhile. Please be patient.";
|
LOG(logINFO) << "This can take awhile. Please be patient.";
|
||||||
@ -1425,9 +1487,8 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
|||||||
int dst = mkstemp(destfname); // create temporary file and open it in r/w
|
int dst = mkstemp(destfname); // create temporary file and open it in r/w
|
||||||
if (dst == -1) {
|
if (dst == -1) {
|
||||||
fclose(src);
|
fclose(src);
|
||||||
throw RuntimeError(
|
throw RuntimeError(std::string("Could not create destination file "
|
||||||
std::string(
|
"in /tmp for programming: ") +
|
||||||
"Could not create destination file in /tmp for programming: ") +
|
|
||||||
destfname);
|
destfname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1480,8 +1541,8 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
|||||||
}
|
}
|
||||||
// validate pof: read less than footer offset
|
// validate pof: read less than footer offset
|
||||||
if (isPof && dstFilePos < pofFooterOfst) {
|
if (isPof && dstFilePos < pofFooterOfst) {
|
||||||
throw RuntimeError(
|
throw RuntimeError("Could not convert programming file. EOF "
|
||||||
"Could not convert programming file. EOF before end of flash");
|
"before end of flash");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fclose(src) != 0) {
|
if (fclose(src) != 0) {
|
||||||
|
@ -278,7 +278,13 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
int acquire();
|
int acquire();
|
||||||
|
|
||||||
/** also takes care of master and slave for multi module mythen */
|
/** also takes care of master and slave for multi module mythen */
|
||||||
void startAcquisition(bool blocking, std::vector<int> positions);
|
void startAcquisition(const bool blocking, Positions pos);
|
||||||
|
|
||||||
|
/** also takes care of master and slave for multi module mythen */
|
||||||
|
void sendSoftwareTrigger(const bool block, Positions pos);
|
||||||
|
|
||||||
|
/** also takes care of master and slave for multi module mythen */
|
||||||
|
void stopDetector(Positions pos);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combines data from all readouts and gives it to the gui
|
* Combines data from all readouts and gives it to the gui
|
||||||
@ -368,9 +374,14 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
* @param nPixelsy number of pixels in Y axis (updated)
|
* @param nPixelsy number of pixels in Y axis (updated)
|
||||||
* @returns total data bytes for updated image
|
* @returns total data bytes for updated image
|
||||||
*/
|
*/
|
||||||
int InsertGapPixels(char *image, char *&gpImage, bool quadEnable, int dr,
|
int insertGapPixels(char *image, char *&gpImage, bool quadEnable, int dr,
|
||||||
int &nPixelsx, int &nPixelsy);
|
int &nPixelsx, int &nPixelsy);
|
||||||
|
|
||||||
|
bool handleSynchronization(Positions pos);
|
||||||
|
void getMasterSlaveList(std::vector<int> positions,
|
||||||
|
std::vector<int> &masters,
|
||||||
|
std::vector<int> &slaves);
|
||||||
|
|
||||||
void printProgress(double progress);
|
void printProgress(double progress);
|
||||||
|
|
||||||
void startProcessingThread(bool receiver);
|
void startProcessingThread(bool receiver);
|
||||||
|
@ -538,8 +538,15 @@ bool Module::getSynchronization() const {
|
|||||||
return sendToDetector<int>(F_GET_SYNCHRONIZATION);
|
return sendToDetector<int>(F_GET_SYNCHRONIZATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Module::getSynchronizationFromStopServer() const {
|
||||||
|
return sendToDetectorStop<int>(F_GET_SYNCHRONIZATION);
|
||||||
|
}
|
||||||
|
|
||||||
void Module::setSynchronization(const bool value) {
|
void Module::setSynchronization(const bool value) {
|
||||||
sendToDetector(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
|
sendToDetector(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
|
||||||
|
// to deal with virtual servers as well
|
||||||
|
// (get sync from stop server during blocking acquisition)
|
||||||
|
sendToDetectorStop(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> Module::getBadChannels() const {
|
std::vector<int> Module::getBadChannels() const {
|
||||||
|
@ -129,6 +129,7 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
bool isMaster() const;
|
bool isMaster() const;
|
||||||
void setMaster(const bool master);
|
void setMaster(const bool master);
|
||||||
bool getSynchronization() const;
|
bool getSynchronization() const;
|
||||||
|
bool getSynchronizationFromStopServer() const;
|
||||||
void setSynchronization(const bool value);
|
void setSynchronization(const bool value);
|
||||||
std::vector<int> getBadChannels() const;
|
std::vector<int> getBadChannels() const;
|
||||||
void setBadChannels(std::vector<int> list);
|
void setBadChannels(std::vector<int> list);
|
||||||
|
@ -523,6 +523,28 @@ TEST_CASE("sync", "[.cmd]") {
|
|||||||
proxy.Call("sync", {"1"}, -1, PUT, oss);
|
proxy.Call("sync", {"1"}, -1, PUT, oss);
|
||||||
REQUIRE(oss.str() == "sync 1\n");
|
REQUIRE(oss.str() == "sync 1\n");
|
||||||
}
|
}
|
||||||
|
// setting to master or slave when synced
|
||||||
|
{
|
||||||
|
// get previous master
|
||||||
|
int prevMaster = 0;
|
||||||
|
auto previous = det.getMaster();
|
||||||
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
if (previous[i] == 1) {
|
||||||
|
prevMaster = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proxy.Call("master", {"1"}, 0, PUT);
|
||||||
|
proxy.Call("master", {"0"}, 0, PUT);
|
||||||
|
std::ostringstream oss;
|
||||||
|
proxy.Call("status", {}, -1, GET, oss);
|
||||||
|
REQUIRE(oss.str() != "status running\n");
|
||||||
|
// set all to slaves, and then master
|
||||||
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
|
det.setMaster(0, {i});
|
||||||
|
}
|
||||||
|
det.setMaster(1, prevMaster);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
proxy.Call("sync", {}, -1, GET, oss);
|
proxy.Call("sync", {}, -1, GET, oss);
|
||||||
|
@ -56,6 +56,8 @@ void DataStreamer::SetAdditionalJsonHeader(
|
|||||||
isAdditionalJsonUpdated = true;
|
isAdditionalJsonUpdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DataStreamer::SetReceiverROI(ROI roi) { receiverRoi = roi; }
|
||||||
|
|
||||||
void DataStreamer::ResetParametersforNewAcquisition(const std::string &fname) {
|
void DataStreamer::ResetParametersforNewAcquisition(const std::string &fname) {
|
||||||
StopRunning();
|
StopRunning();
|
||||||
startedFlag = false;
|
startedFlag = false;
|
||||||
@ -249,6 +251,7 @@ int DataStreamer::SendDataHeader(sls_detector_header header, uint32_t size,
|
|||||||
isAdditionalJsonUpdated = false;
|
isAdditionalJsonUpdated = false;
|
||||||
}
|
}
|
||||||
zHeader.addJsonHeader = localAdditionalJsonHeader;
|
zHeader.addJsonHeader = localAdditionalJsonHeader;
|
||||||
|
zHeader.rx_roi = receiverRoi.getIntArray();
|
||||||
|
|
||||||
return zmqSocket->SendHeader(index, zHeader);
|
return zmqSocket->SendHeader(index, zHeader);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
void SetNumberofTotalFrames(uint64_t value);
|
void SetNumberofTotalFrames(uint64_t value);
|
||||||
void
|
void
|
||||||
SetAdditionalJsonHeader(const std::map<std::string, std::string> &json);
|
SetAdditionalJsonHeader(const std::map<std::string, std::string> &json);
|
||||||
|
void SetReceiverROI(ROI roi);
|
||||||
|
|
||||||
void ResetParametersforNewAcquisition(const std::string &fname);
|
void ResetParametersforNewAcquisition(const std::string &fname);
|
||||||
/**
|
/**
|
||||||
@ -92,6 +93,7 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
uint64_t fileIndex{0};
|
uint64_t fileIndex{0};
|
||||||
bool flipRows{false};
|
bool flipRows{false};
|
||||||
std::map<std::string, std::string> additionalJsonHeader;
|
std::map<std::string, std::string> additionalJsonHeader;
|
||||||
|
ROI receiverRoi{};
|
||||||
|
|
||||||
/** Used by streamer thread to update local copy (reduce number of locks
|
/** Used by streamer thread to update local copy (reduce number of locks
|
||||||
* during streaming) */
|
* during streaming) */
|
||||||
|
@ -216,6 +216,8 @@ void Implementation::SetupDataStreamer(int i) {
|
|||||||
dataStreamer[i]->SetNumberofPorts(numPorts);
|
dataStreamer[i]->SetNumberofPorts(numPorts);
|
||||||
dataStreamer[i]->SetQuadEnable(quadEnable);
|
dataStreamer[i]->SetQuadEnable(quadEnable);
|
||||||
dataStreamer[i]->SetNumberofTotalFrames(numberOfTotalFrames);
|
dataStreamer[i]->SetNumberofTotalFrames(numberOfTotalFrames);
|
||||||
|
dataStreamer[i]->SetReceiverROI(
|
||||||
|
portRois[i].completeRoi() ? GetMaxROIPerPort() : portRois[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
slsDetectorDefs::xy Implementation::getDetectorSize() const {
|
slsDetectorDefs::xy Implementation::getDetectorSize() const {
|
||||||
@ -231,6 +233,11 @@ const slsDetectorDefs::xy Implementation::GetPortGeometry() const {
|
|||||||
return portGeometry;
|
return portGeometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const slsDetectorDefs::ROI Implementation::GetMaxROIPerPort() const {
|
||||||
|
return slsDetectorDefs::ROI{0, (int)generalData->nPixelsX - 1, 0,
|
||||||
|
(int)generalData->nPixelsY - 1};
|
||||||
|
}
|
||||||
|
|
||||||
void Implementation::setDetectorSize(const slsDetectorDefs::xy size) {
|
void Implementation::setDetectorSize(const slsDetectorDefs::xy size) {
|
||||||
xy portGeometry = GetPortGeometry();
|
xy portGeometry = GetPortGeometry();
|
||||||
|
|
||||||
@ -458,6 +465,10 @@ void Implementation::setReceiverROI(const slsDetectorDefs::ROI arg) {
|
|||||||
listener[i]->SetNoRoi(portRois[i].noRoi());
|
listener[i]->SetNoRoi(portRois[i].noRoi());
|
||||||
for (size_t i = 0; i != dataProcessor.size(); ++i)
|
for (size_t i = 0; i != dataProcessor.size(); ++i)
|
||||||
dataProcessor[i]->SetReceiverROI(portRois[i]);
|
dataProcessor[i]->SetReceiverROI(portRois[i]);
|
||||||
|
for (size_t i = 0; i != dataStreamer.size(); ++i) {
|
||||||
|
dataStreamer[i]->SetReceiverROI(
|
||||||
|
portRois[i].completeRoi() ? GetMaxROIPerPort() : portRois[i]);
|
||||||
|
}
|
||||||
LOG(logINFO) << "receiver roi: " << ToString(receiverRoi);
|
LOG(logINFO) << "receiver roi: " << ToString(receiverRoi);
|
||||||
if (generalData->numUDPInterfaces == 2 &&
|
if (generalData->numUDPInterfaces == 2 &&
|
||||||
generalData->detType != slsDetectorDefs::GOTTHARD2) {
|
generalData->detType != slsDetectorDefs::GOTTHARD2) {
|
||||||
|
@ -282,6 +282,7 @@ class Implementation : private virtual slsDetectorDefs {
|
|||||||
void SetupFifoStructure();
|
void SetupFifoStructure();
|
||||||
|
|
||||||
const xy GetPortGeometry() const;
|
const xy GetPortGeometry() const;
|
||||||
|
const ROI GetMaxROIPerPort() const;
|
||||||
void ResetParametersforNewAcquisition();
|
void ResetParametersforNewAcquisition();
|
||||||
void CreateUDPSockets();
|
void CreateUDPSockets();
|
||||||
void SetupWriter();
|
void SetupWriter();
|
||||||
|
@ -19,8 +19,8 @@ namespace sls {
|
|||||||
// files
|
// files
|
||||||
|
|
||||||
// versions
|
// versions
|
||||||
#define HDF5_WRITER_VERSION (6.5) // 1 decimal places
|
#define HDF5_WRITER_VERSION (6.6) // 1 decimal places
|
||||||
#define BINARY_WRITER_VERSION (7.1) // 1 decimal places
|
#define BINARY_WRITER_VERSION (7.2) // 1 decimal places
|
||||||
|
|
||||||
#define MAX_FRAMES_PER_FILE 20000
|
#define MAX_FRAMES_PER_FILE 20000
|
||||||
#define SHORT_MAX_FRAMES_PER_FILE 100000
|
#define SHORT_MAX_FRAMES_PER_FILE 100000
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "sls/container_utils.h"
|
#include "sls/container_utils.h"
|
||||||
#include "sls/sls_detector_exceptions.h"
|
#include "sls/sls_detector_exceptions.h"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@ -83,6 +84,8 @@ struct zmqHeader {
|
|||||||
bool completeImage{false};
|
bool completeImage{false};
|
||||||
/** additional json header */
|
/** additional json header */
|
||||||
std::map<std::string, std::string> addJsonHeader;
|
std::map<std::string, std::string> addJsonHeader;
|
||||||
|
/** (xmin, xmax, ymin, ymax) roi only in files written */
|
||||||
|
std::array<int, 4> rx_roi{};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ZmqSocket {
|
class ZmqSocket {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#define MAX_UDP_DESTINATION 32
|
#define MAX_UDP_DESTINATION 32
|
||||||
|
|
||||||
#define SLS_DETECTOR_HEADER_VERSION 0x2
|
#define SLS_DETECTOR_HEADER_VERSION 0x2
|
||||||
#define SLS_DETECTOR_JSON_HEADER_VERSION 0x4
|
#define SLS_DETECTOR_JSON_HEADER_VERSION 0x5
|
||||||
|
|
||||||
// ctb/ moench 1g udp (read from fifo)
|
// ctb/ moench 1g udp (read from fifo)
|
||||||
#define UDP_PACKET_DATA_BYTES (1344)
|
#define UDP_PACKET_DATA_BYTES (1344)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
/** API versions */
|
/** API versions */
|
||||||
#define RELEASE "7.0.1"
|
#define RELEASE "7.0.2"
|
||||||
#define APICTB "7.0.0 0x230222"
|
#define APICTB "7.0.0 0x230222"
|
||||||
#define APIGOTTHARD "7.0.0 0x230222"
|
#define APIGOTTHARD "7.0.0 0x230222"
|
||||||
#define APIGOTTHARD2 "7.0.0 0x230222"
|
#define APIGOTTHARD2 "7.0.0 0x230222"
|
||||||
#define APIJUNGFRAU "7.0.0 0x230222"
|
|
||||||
#define APIMYTHEN3 "7.0.0 0x230222"
|
#define APIMYTHEN3 "7.0.0 0x230222"
|
||||||
#define APIMOENCH "7.0.0 0x230222"
|
#define APIMOENCH "7.0.0 0x230222"
|
||||||
#define APIEIGER "7.0.0 0x230222"
|
#define APIEIGER "7.0.0 0x230222"
|
||||||
#define APIRECEIVER "7.0.0 0x230222"
|
#define APIJUNGFRAU "7.0.2 0x230710"
|
||||||
#define APILIB "7.0.1 0x230323"
|
#define APILIB "7.0.2 0x230712"
|
||||||
|
#define APIRECEIVER "7.0.2 0x230712"
|
||||||
|
@ -254,6 +254,8 @@ int ZmqSocket::SendHeader(int index, zmqHeader header) {
|
|||||||
}
|
}
|
||||||
oss << " } ";
|
oss << " } ";
|
||||||
}
|
}
|
||||||
|
oss << ", \"rx_roi\":[" << header.rx_roi[0] << ", " << header.rx_roi[1]
|
||||||
|
<< ", " << header.rx_roi[2] << ", " << header.rx_roi[3] << "]";
|
||||||
oss << "}\n";
|
oss << "}\n";
|
||||||
std::string message = oss.str();
|
std::string message = oss.str();
|
||||||
int length = message.length();
|
int length = message.length();
|
||||||
@ -375,6 +377,11 @@ int ZmqSocket::ParseHeader(const int index, int length, char *buff,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Value &a = document["rx_roi"].GetArray();
|
||||||
|
for (SizeType i = 0; i != a.Size(); ++i) {
|
||||||
|
zHeader.rx_roi[i] = a[i].GetInt();
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user