Nextframenumber (#215)

This commit is contained in:
Dhanya Thattil 2020-11-16 17:26:12 +01:00 committed by GitHub
parent 4c4e2ccb6b
commit a6d696a0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 561 additions and 473 deletions

View File

@ -156,10 +156,10 @@ SLS Detector Package 5.0.0 released on xx.xx.2020 (Major Release)
can cut out required subimage using callbacks, but this feature can cut out required subimage using callbacks, but this feature
is probably more useful for custom receivers. is probably more useful for custom receivers.
6. (Eiger, Jungfrau) Starting Frame number - startframenumber 6. (Eiger, Jungfrau) Next Frame number - nextframenumber
Both now have running frame numbers that is only reset at boot up Both now have running frame numbers that is only reset at boot up
and increments continuously through acquisitions. One is able to and increments continuously through acquisitions. One is able to
set the starting frame number before an acquisition. set the next frame number now.
7. (Jungfrau) Two 10G data interfaces 7. (Jungfrau) Two 10G data interfaces
Only Jungfrau PCBs with version 2.0 can run at full speed using both Only Jungfrau PCBs with version 2.0 can run at full speed using both

View File

@ -60,6 +60,7 @@ Client
sls_detector_put virtual 2 1912 sls_detector_put virtual 2 1912
Use the same in the config file. Use the same in the config file.
Detector API has a method 'isVirtualDetectorServer' to check if on-board detector server is virtual.
Sample Config file Sample Config file

View File

@ -1,9 +1,9 @@
#include "catch.hpp" #include "catch.hpp"
#include "sls/ClientSocket.h"
#include "DetectorImpl.h" #include "DetectorImpl.h"
#include "Module.h" #include "Module.h"
#include "sls/ClientSocket.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
@ -446,8 +446,8 @@ TEST_CASE("Chiptestboard Dbit offset, list, sampling, advinvert",
CHECK(m.readRegister(0x7b) == 0x1003E); CHECK(m.readRegister(0x7b) == 0x1003E);
} }
TEST_CASE("Eiger or Jungfrau startingfnum", TEST_CASE("Eiger or Jungfrau nextframenumber",
"[.eigerintegration][.jungfrauintegration][startingfnum]") { "[.eigerintegration][.jungfrauintegration][nextframenumber]") {
SingleDetectorConfig c; SingleDetectorConfig c;
// pick up multi detector from shm id 0 // pick up multi detector from shm id 0
@ -465,8 +465,8 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
// starting fnum // starting fnum
uint64_t val = 8; uint64_t val = 8;
m.setStartingFrameNumber(val); m.setNextFrameNumber(val);
CHECK(m.getStartingFrameNumber() == val); CHECK(m.getNextFrameNumber() == val);
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
@ -474,18 +474,18 @@ TEST_CASE("Eiger or Jungfrau startingfnum",
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
CHECK_THROWS_AS(m.setStartingFrameNumber(0), sls::RuntimeError); CHECK_THROWS_AS(m.setNextFrameNumber(0), sls::RuntimeError);
if (m.getDetectorTypeAsString() == "Eiger") { if (m.getDetectorTypeAsString() == "Eiger") {
val = 281474976710655; val = 281474976710655;
} else if (m.getDetectorTypeAsString() == "Jungfrau") { } else if (m.getDetectorTypeAsString() == "Jungfrau") {
val = 18446744073709551615; val = 18446744073709551615;
} }
m.setStartingFrameNumber(val); m.setNextFrameNumber(val);
CHECK(m.getStartingFrameNumber() == val); CHECK(m.getNextFrameNumber() == val);
CHECK(m.acquire() == slsDetectorDefs::OK); CHECK(m.acquire() == slsDetectorDefs::OK);
CHECK(m.getReceiverCurrentFrameIndex() == val); CHECK(m.getReceiverCurrentFrameIndex() == val);
CHECK(m.getStartingFrameNumber() == (val + 1)); CHECK(m.getNextFrameNumber() == (val + 1));
} }
TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") { TEST_CASE("Eiger readnlines", "[.eigerintegration][readnlines]") {

View File

@ -540,13 +540,13 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def startingfnum(self): def nextframenumber(self):
"""[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquisition might result in different frame numbers for different modules. """ """[Eiger][Jungfrau] Next frame number. Stopping acquisition might result in different frame numbers for different modules. """
return self.getStartingFrameNumber() return self.getNextFrameNumber()
@startingfnum.setter @nextframenumber.setter
def startingfnum(self, value): def nextframenumber(self, value):
ut.set_using_dict(self.setStartingFrameNumber, value) ut.set_using_dict(self.setNextFrameNumber, value)
@property @property
@element @element

View File

@ -374,13 +374,13 @@ void init_det(py::module &m) {
(Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) & (Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) &
Detector::getNumMissingPackets, Detector::getNumMissingPackets,
py::arg() = Positions{}) py::arg() = Positions{})
.def("getStartingFrameNumber", .def("getNextFrameNumber",
(Result<uint64_t>(Detector::*)(sls::Positions) const) & (Result<uint64_t>(Detector::*)(sls::Positions) const) &
Detector::getStartingFrameNumber, Detector::getNextFrameNumber,
py::arg() = Positions{}) py::arg() = Positions{})
.def("setStartingFrameNumber", .def("setNextFrameNumber",
(void (Detector::*)(uint64_t, sls::Positions)) & (void (Detector::*)(uint64_t, sls::Positions)) &
Detector::setStartingFrameNumber, Detector::setNextFrameNumber,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("sendSoftwareTrigger", .def("sendSoftwareTrigger",
(void (Detector::*)(sls::Positions)) & (void (Detector::*)(sls::Positions)) &

View File

@ -344,7 +344,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="spinStartingFrameNumber"> <widget class="QSpinBox" name="spinNextFrameNumber">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -361,7 +361,7 @@
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The starting frame number of next acquisition.&lt;/p&gt;&lt;p&gt;#startingfnum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The next frame number&lt;/p&gt;&lt;p&gt;#nextframenumber&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="statusTip"> <property name="statusTip">
<string/> <string/>
@ -390,12 +390,12 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lblStartingFrameNumber"> <widget class="QLabel" name="lblNextFrameNumber">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The starting frame number of next acquisition.&lt;/p&gt;&lt;p&gt;#startingfnum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The next frame number&lt;/p&gt;&lt;p&gt;#nextframenumber&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>Next Frame Number: </string> <string>Next Frame Number: </string>

View File

@ -35,7 +35,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void SetFileName(bool force = false); void SetFileName(bool force = false);
void ForceSetFileName(); void ForceSetFileName();
void SetRunIndex(int val); void SetRunIndex(int val);
void SetStartingFrameNumber(int val); void SetNextFrameNumber(int val);
void UpdateProgress(); void UpdateProgress();
void StartAcquisition(); void StartAcquisition();
void StopAcquisition(); void StopAcquisition();
@ -67,7 +67,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void GetFileWrite(); void GetFileWrite();
void GetFileName(); void GetFileName();
void GetRunIndex(); void GetRunIndex();
void GetStartingFrameNumber(); void GetNextFrameNumber();
void ResetProgress(); void ResetProgress();

View File

@ -56,13 +56,13 @@ void qTabMeasurement::SetupWidgetWindow() {
break; break;
case slsDetectorDefs::EIGER: case slsDetectorDefs::EIGER:
delayImplemented = false; delayImplemented = false;
lblStartingFrameNumber->setEnabled(true); lblNextFrameNumber->setEnabled(true);
spinStartingFrameNumber->setEnabled(true); spinNextFrameNumber->setEnabled(true);
startingFnumImplemented = true; startingFnumImplemented = true;
break; break;
case slsDetectorDefs::JUNGFRAU: case slsDetectorDefs::JUNGFRAU:
lblStartingFrameNumber->setEnabled(true); lblNextFrameNumber->setEnabled(true);
spinStartingFrameNumber->setEnabled(true); spinNextFrameNumber->setEnabled(true);
startingFnumImplemented = true; startingFnumImplemented = true;
break; break;
case slsDetectorDefs::GOTTHARD2: case slsDetectorDefs::GOTTHARD2:
@ -141,8 +141,8 @@ void qTabMeasurement::Initialization() {
SLOT(ForceSetFileName())); SLOT(ForceSetFileName()));
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int))); connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
if (startingFnumImplemented) { if (startingFnumImplemented) {
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
} }
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress())); connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition())); connect(btnStart, SIGNAL(clicked()), this, SLOT(StartAcquisition()));
@ -825,29 +825,29 @@ void qTabMeasurement::SetRunIndex(int val) {
&qTabMeasurement::GetRunIndex) &qTabMeasurement::GetRunIndex)
} }
void qTabMeasurement::GetStartingFrameNumber() { void qTabMeasurement::GetNextFrameNumber() {
LOG(logDEBUG) << "Getting Starting Frame Number"; LOG(logDEBUG) << "Getting Starting Frame Number";
disconnect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, disconnect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
try { try {
auto retval = det->getStartingFrameNumber().tsquash( auto retval = det->getNextFrameNumber().tsquash(
"Inconsistent starting frame number for all detectors."); "Inconsistent starting frame number for all detectors.");
spinStartingFrameNumber->setValue(retval); spinNextFrameNumber->setValue(retval);
} }
CATCH_DISPLAY("Could not get starting frame number.", CATCH_DISPLAY("Could not get starting frame number.",
"qTabMeasurement::GetStartingFrameNumber") "qTabMeasurement::GetNextFrameNumber")
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this, connect(spinNextFrameNumber, SIGNAL(valueChanged(int)), this,
SLOT(SetStartingFrameNumber(int))); SLOT(SetNextFrameNumber(int)));
} }
void qTabMeasurement::SetStartingFrameNumber(int val) { void qTabMeasurement::SetNextFrameNumber(int val) {
LOG(logINFO) << "Setting Starting frame number to " << val; LOG(logINFO) << "Setting Starting frame number to " << val;
try { try {
det->setStartingFrameNumber(val); det->setNextFrameNumber(val);
} }
CATCH_HANDLE("Could not set starting frame number.", CATCH_HANDLE("Could not set starting frame number.",
"qTabMeasurement::SetStartingFrameNumber", this, "qTabMeasurement::SetNextFrameNumber", this,
&qTabMeasurement::GetStartingFrameNumber) &qTabMeasurement::GetNextFrameNumber)
} }
void qTabMeasurement::ResetProgress() { void qTabMeasurement::ResetProgress() {
@ -928,7 +928,7 @@ void qTabMeasurement::AcquireFinished() {
UpdateProgress(); UpdateProgress();
GetRunIndex(); GetRunIndex();
if (startingFnumImplemented) { if (startingFnumImplemented) {
GetStartingFrameNumber(); GetNextFrameNumber();
} }
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished"; LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
// next measurement if acq is not stopped // next measurement if acq is not stopped
@ -995,7 +995,7 @@ void qTabMeasurement::Refresh() {
GetFileName(); GetFileName();
GetRunIndex(); GetRunIndex();
if (startingFnumImplemented) { if (startingFnumImplemented) {
GetStartingFrameNumber(); GetNextFrameNumber();
} }
ResetProgress(); ResetProgress();
} }

View File

@ -35,7 +35,7 @@ int Beb_activated = 1;
uint32_t Beb_detid = 0; uint32_t Beb_detid = 0;
int Beb_top = 0; int Beb_top = 0;
uint64_t Beb_deactivatedStartFrameNumber = 0; uint64_t Beb_deactivatedNextFrameNumber = 0;
int Beb_quadEnable = 0; int Beb_quadEnable = 0;
int Beb_positions[2] = {0, 0}; int Beb_positions[2] = {0, 0};
int Beb_readNLines = MAX_ROWS_PER_READOUT; int Beb_readNLines = MAX_ROWS_PER_READOUT;
@ -1441,22 +1441,22 @@ int Beb_SetDetectorPosition(int pos[]) {
return ret; return ret;
} }
int Beb_SetStartingFrameNumber(uint64_t value) { int Beb_SetNextFrameNumber(uint64_t value) {
if (!Beb_activated) { if (!Beb_activated) {
Beb_deactivatedStartFrameNumber = value; Beb_deactivatedNextFrameNumber = value;
return OK; return OK;
} }
LOG(logINFO, LOG(logINFO,
("Setting start frame number: %llu\n", (long long unsigned int)value)); ("Setting next frame number: %llu\n", (long long unsigned int)value));
u_int32_t *csp0base = 0; u_int32_t *csp0base = 0;
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR); int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_TEST_BASEADDR);
if (fd < 0) { if (fd < 0) {
LOG(logERROR, ("Set Start Frame Number FAIL\n")); LOG(logERROR, ("Set next Frame Number FAIL\n"));
return FAIL; return FAIL;
} }
// since the read is not implemented in firmware yet // since the read is not implemented in firmware yet
Beb_deactivatedStartFrameNumber = value; Beb_deactivatedNextFrameNumber = value;
// decrement for firmware // decrement for firmware
uint64_t valueInFirmware = value - 1; uint64_t valueInFirmware = value - 1;
@ -1471,17 +1471,17 @@ int Beb_SetStartingFrameNumber(uint64_t value) {
return OK; return OK;
} }
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable) { int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable) {
if (!Beb_activated) { if (!Beb_activated) {
*retval = Beb_deactivatedStartFrameNumber; *retval = Beb_deactivatedNextFrameNumber;
return OK; return OK;
} }
LOG(logDEBUG1, ("Getting start frame number\n")); LOG(logDEBUG1, ("Getting next frame number\n"));
u_int32_t *csp0base = 0; u_int32_t *csp0base = 0;
int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR); int fd = Beb_open(&csp0base, XPAR_COUNTER_BASEADDR);
if (fd < 0) { if (fd < 0) {
LOG(logERROR, ("Get Start Frame Number FAIL\n")); LOG(logERROR, ("Get next Frame Number FAIL\n"));
return FAIL; return FAIL;
} }

View File

@ -103,8 +103,8 @@ int Beb_SetQuad(int value);
int Beb_GetQuad(); int Beb_GetQuad();
int *Beb_GetDetectorPosition(); int *Beb_GetDetectorPosition();
int Beb_SetDetectorPosition(int pos[]); int Beb_SetDetectorPosition(int pos[]);
int Beb_SetStartingFrameNumber(uint64_t value); int Beb_SetNextFrameNumber(uint64_t value);
int Beb_GetStartingFrameNumber(uint64_t *retval, int tengigaEnable); int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable);
void Beb_SetReadNLines(int value); void Beb_SetReadNLines(int value);

View File

@ -85,7 +85,7 @@ int eiger_virtual_transmission_delay_right = 0;
int eiger_virtual_transmission_delay_frame = 0; int eiger_virtual_transmission_delay_frame = 0;
int eiger_virtual_transmission_flowcontrol_10g = 0; int eiger_virtual_transmission_flowcontrol_10g = 0;
int eiger_virtual_activate = 1; int eiger_virtual_activate = 1;
uint64_t eiger_virtual_startingframenumber = 1; uint64_t eiger_virtual_nextframenumber = 1;
int eiger_virtual_detPos[2] = {0, 0}; int eiger_virtual_detPos[2] = {0, 0};
int eiger_virtual_test_mode = 0; int eiger_virtual_test_mode = 0;
int eiger_virtual_quad_mode = 0; int eiger_virtual_quad_mode = 0;
@ -702,7 +702,7 @@ void setupDetector() {
setClockDivider(RUN_CLK, DEFAULT_CLK_SPEED); // clk_devider,half speed setClockDivider(RUN_CLK, DEFAULT_CLK_SPEED); // clk_devider,half speed
setIODelay(DEFAULT_IO_DELAY); setIODelay(DEFAULT_IO_DELAY);
setTiming(DEFAULT_TIMING_MODE); setTiming(DEFAULT_TIMING_MODE);
setStartingFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
setReadNLines(MAX_ROWS_PER_READOUT); setReadNLines(MAX_ROWS_PER_READOUT);
// SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15); // SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
eiger_tau_ns = DEFAULT_RATE_CORRECTION; eiger_tau_ns = DEFAULT_RATE_CORRECTION;
@ -851,21 +851,21 @@ int getOverFlowMode() { return eiger_overflow32; }
/* parameters - timer */ /* parameters - timer */
int setStartingFrameNumber(uint64_t value) { int setNextFrameNumber(uint64_t value) {
#ifdef VIRTUAL #ifdef VIRTUAL
eiger_virtual_startingframenumber = value; eiger_virtual_nextframenumber = value;
return OK; return OK;
#else #else
return Beb_SetStartingFrameNumber(value); return Beb_SetNextFrameNumber(value);
#endif #endif
} }
int getStartingFrameNumber(uint64_t *retval) { int getNextFrameNumber(uint64_t *retval) {
#ifdef VIRTUAL #ifdef VIRTUAL
*retval = eiger_virtual_startingframenumber; *retval = eiger_virtual_nextframenumber;
return OK; return OK;
#else #else
return Beb_GetStartingFrameNumber(retval, send_to_ten_gig); return Beb_GetNextFrameNumber(retval, send_to_ten_gig);
#endif #endif
} }
@ -2256,7 +2256,7 @@ void *start_timer(void *arg) {
// Send data // Send data
{ {
uint64_t frameNr = 0; uint64_t frameNr = 0;
getStartingFrameNumber(&frameNr); getNextFrameNumber(&frameNr);
// loop over number of frames // loop over number of frames
for (int iframes = 0; iframes != numFrames; ++iframes) { for (int iframes = 0; iframes != numFrames; ++iframes) {
@ -2264,7 +2264,7 @@ void *start_timer(void *arg) {
// check if manual stop // check if manual stop
if (sharedMemory_getStop() == 1) { if (sharedMemory_getStop() == 1) {
setStartingFrameNumber(frameNr + iframes + 1); setNextFrameNumber(frameNr + iframes + 1);
break; break;
} }
@ -2357,7 +2357,7 @@ void *start_timer(void *arg) {
} }
} }
} }
setStartingFrameNumber(frameNr + numFrames); setNextFrameNumber(frameNr + numFrames);
} }
closeUDPSocket(0); closeUDPSocket(0);
@ -2395,8 +2395,8 @@ int stopStateMachine() {
// ensure all have same starting frame numbers // ensure all have same starting frame numbers
uint64_t retval = 0; uint64_t retval = 0;
if (Beb_GetStartingFrameNumber(&retval, send_to_ten_gig) == -2) { if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {
Beb_SetStartingFrameNumber(retval + 1); Beb_SetNextFrameNumber(retval + 1);
} }
return OK; return OK;
#endif #endif

View File

@ -446,7 +446,7 @@ void setupDetector() {
/*setClockDivider(RUN_CLK, HALF_SPEED); depends if all the previous stuff /*setClockDivider(RUN_CLK, HALF_SPEED); depends if all the previous stuff
* works*/ * works*/
setTiming(DEFAULT_TIMING_MODE); setTiming(DEFAULT_TIMING_MODE);
setStartingFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
// temp threshold and reset event // temp threshold and reset event
setThresholdTemperature(DEFAULT_TMP_THRSHLD); setThresholdTemperature(DEFAULT_TMP_THRSHLD);
@ -533,9 +533,9 @@ int selectStoragecellStart(int pos) {
DAQ_STRG_CELL_SLCT_OFST); DAQ_STRG_CELL_SLCT_OFST);
} }
int setStartingFrameNumber(uint64_t value) { int setNextFrameNumber(uint64_t value) {
LOG(logINFO, ("Setting starting frame number: %llu\n", LOG(logINFO,
(long long unsigned int)value)); ("Setting next frame number: %llu\n", (long long unsigned int)value));
#ifdef VIRTUAL #ifdef VIRTUAL
setU64BitReg(value, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); setU64BitReg(value, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG);
#else #else
@ -547,7 +547,7 @@ int setStartingFrameNumber(uint64_t value) {
return OK; return OK;
} }
int getStartingFrameNumber(uint64_t *retval) { int getNextFrameNumber(uint64_t *retval) {
#ifdef VIRTUAL #ifdef VIRTUAL
*retval = getU64BitReg(FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); *retval = getU64BitReg(FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG);
#else #else
@ -1727,14 +1727,14 @@ void *start_timer(void *arg) {
// Send data // Send data
{ {
uint64_t frameNr = 0; uint64_t frameNr = 0;
getStartingFrameNumber(&frameNr); getNextFrameNumber(&frameNr);
for (int iframes = 0; iframes != numFrames; ++iframes) { for (int iframes = 0; iframes != numFrames; ++iframes) {
usleep(transmissionDelayUs); usleep(transmissionDelayUs);
// check if manual stop // check if manual stop
if (sharedMemory_getStop() == 1) { if (sharedMemory_getStop() == 1) {
setStartingFrameNumber(frameNr + iframes + 1); setNextFrameNumber(frameNr + iframes + 1);
break; break;
} }
@ -1800,7 +1800,7 @@ void *start_timer(void *arg) {
} }
} }
} }
setStartingFrameNumber(frameNr + numFrames); setNextFrameNumber(frameNr + numFrames);
} }
closeUDPSocket(0); closeUDPSocket(0);

View File

@ -200,8 +200,8 @@ int getReadoutMode();
int selectStoragecellStart(int pos); int selectStoragecellStart(int pos);
#endif #endif
#if defined(JUNGFRAUD) || defined(EIGERD) #if defined(JUNGFRAUD) || defined(EIGERD)
int setStartingFrameNumber(uint64_t value); int setNextFrameNumber(uint64_t value);
int getStartingFrameNumber(uint64_t *value); int getNextFrameNumber(uint64_t *value);
#endif #endif
void setNumFrames(int64_t val); void setNumFrames(int64_t val);
int64_t getNumFrames(); int64_t getNumFrames();

View File

@ -140,8 +140,8 @@ int set_adc_invert(int);
int get_adc_invert(int); int get_adc_invert(int);
int set_external_sampling_source(int); int set_external_sampling_source(int);
int set_external_sampling(int); int set_external_sampling(int);
int set_starting_frame_number(int); int set_next_frame_number(int);
int get_starting_frame_number(int); int get_next_frame_number(int);
int set_quad(int); int set_quad(int);
int get_quad(int); int get_quad(int);
int set_interrupt_subframe(int); int set_interrupt_subframe(int);
@ -242,3 +242,4 @@ int validate_udp_configuration(int);
int get_bursts_left(int); int get_bursts_left(int);
int start_readout(int); int start_readout(int);
int set_default_dacs(int); int set_default_dacs(int);
int is_virtual(int);

View File

@ -262,8 +262,8 @@ void function_table() {
flist[F_GET_ADC_INVERT] = &get_adc_invert; flist[F_GET_ADC_INVERT] = &get_adc_invert;
flist[F_EXTERNAL_SAMPLING_SOURCE] = &set_external_sampling_source; flist[F_EXTERNAL_SAMPLING_SOURCE] = &set_external_sampling_source;
flist[F_EXTERNAL_SAMPLING] = &set_external_sampling; flist[F_EXTERNAL_SAMPLING] = &set_external_sampling;
flist[F_SET_STARTING_FRAME_NUMBER] = &set_starting_frame_number; flist[F_SET_NEXT_FRAME_NUMBER] = &set_next_frame_number;
flist[F_GET_STARTING_FRAME_NUMBER] = &get_starting_frame_number; flist[F_GET_NEXT_FRAME_NUMBER] = &get_next_frame_number;
flist[F_SET_QUAD] = &set_quad; flist[F_SET_QUAD] = &set_quad;
flist[F_GET_QUAD] = &get_quad; flist[F_GET_QUAD] = &get_quad;
flist[F_SET_INTERRUPT_SUBFRAME] = &set_interrupt_subframe; flist[F_SET_INTERRUPT_SUBFRAME] = &set_interrupt_subframe;
@ -360,6 +360,7 @@ void function_table() {
flist[F_GET_BURSTS_LEFT] = &get_bursts_left; flist[F_GET_BURSTS_LEFT] = &get_bursts_left;
flist[F_START_READOUT] = &start_readout; flist[F_START_READOUT] = &start_readout;
flist[F_SET_DEFAULT_DACS] = &set_default_dacs; flist[F_SET_DEFAULT_DACS] = &set_default_dacs;
flist[F_IS_VIRTUAL] = &is_virtual;
// check // check
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) { if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
@ -1755,7 +1756,8 @@ int acquire(int blocking, int file_des) {
strcpy(mess, "Could not start acquisition thread!\n"); strcpy(mess, "Could not start acquisition thread!\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
if (blocking) { // only does not wait for non blocking and scan
if (blocking || !scan) {
pthread_join(pthread_tid, NULL); pthread_join(pthread_tid, NULL);
} }
} }
@ -4497,14 +4499,14 @@ int set_external_sampling(int file_des) {
return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
} }
int set_starting_frame_number(int file_des) { int set_next_frame_number(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
uint64_t arg = 0; uint64_t arg = 0;
if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0) if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0)
return printSocketReadError(); return printSocketReadError();
LOG(logINFO, ("Setting starting frame number to %llu\n", arg)); LOG(logINFO, ("Setting next frame number to %llu\n", arg));
#if (!defined(EIGERD)) && (!defined(JUNGFRAUD)) #if (!defined(EIGERD)) && (!defined(JUNGFRAUD))
functionNotImplemented(); functionNotImplemented();
@ -4513,8 +4515,7 @@ int set_starting_frame_number(int file_des) {
if (Server_VerifyLock() == OK) { if (Server_VerifyLock() == OK) {
if (arg == 0) { if (arg == 0) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess, "Could not set next frame number. Cannot be 0.\n");
"Could not set starting frame number. Cannot be 0.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} }
#ifdef EIGERD #ifdef EIGERD
@ -4522,12 +4523,12 @@ int set_starting_frame_number(int file_des) {
ret = FAIL; ret = FAIL;
#ifdef VIRTUAL #ifdef VIRTUAL
sprintf(mess, sprintf(mess,
"Could not set starting frame number. Must be less then " "Could not set next frame number. Must be less then "
"%ld (0x%lx)\n", "%ld (0x%lx)\n",
UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE); UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE);
#else #else
sprintf(mess, sprintf(mess,
"Could not set starting frame number. Must be less then " "Could not set next frame number. Must be less then "
"%lld (0x%llx)\n", "%lld (0x%llx)\n",
UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE); UDP_HEADER_MAX_FRAME_VALUE, UDP_HEADER_MAX_FRAME_VALUE);
#endif #endif
@ -4535,21 +4536,21 @@ int set_starting_frame_number(int file_des) {
} }
#endif #endif
else { else {
ret = setStartingFrameNumber(arg); ret = setNextFrameNumber(arg);
if (ret == FAIL) { if (ret == FAIL) {
sprintf(mess, "Could not set starting frame number. Failed to " sprintf(mess, "Could not set next frame number. Failed to "
"map address.\n"); "map address.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} }
if (ret == OK) { if (ret == OK) {
uint64_t retval = 0; uint64_t retval = 0;
ret = getStartingFrameNumber(&retval); ret = getNextFrameNumber(&retval);
if (ret == FAIL) { if (ret == FAIL) {
sprintf(mess, "Could not get starting frame number. Failed " sprintf(mess, "Could not get next frame number. Failed "
"to map address.\n"); "to map address.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else if (ret == -2) { } else if (ret == -2) {
sprintf(mess, "Inconsistent starting frame number from " sprintf(mess, "Inconsistent next frame number from "
"left and right FPGA. Please set it.\n"); "left and right FPGA. Please set it.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
@ -4557,12 +4558,12 @@ int set_starting_frame_number(int file_des) {
ret = FAIL; ret = FAIL;
#ifdef VIRTUAL #ifdef VIRTUAL
sprintf(mess, sprintf(mess,
"Could not set starting frame number. Set " "Could not set next frame number. Set "
"0x%lx, but read 0x%lx\n", "0x%lx, but read 0x%lx\n",
arg, retval); arg, retval);
#else #else
sprintf(mess, sprintf(mess,
"Could not set starting frame number. Set " "Could not set next frame number. Set "
"0x%llx, but read 0x%llx\n", "0x%llx, but read 0x%llx\n",
arg, retval); arg, retval);
#endif #endif
@ -4576,28 +4577,28 @@ int set_starting_frame_number(int file_des) {
return Server_SendResult(file_des, INT64, NULL, 0); return Server_SendResult(file_des, INT64, NULL, 0);
} }
int get_starting_frame_number(int file_des) { int get_next_frame_number(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
uint64_t retval = -1; uint64_t retval = -1;
LOG(logDEBUG1, ("Getting Starting frame number \n")); LOG(logDEBUG1, ("Getting next frame number \n"));
#if (!defined(EIGERD)) && (!defined(JUNGFRAUD)) #if (!defined(EIGERD)) && (!defined(JUNGFRAUD))
functionNotImplemented(); functionNotImplemented();
#else #else
// get // get
ret = getStartingFrameNumber(&retval); ret = getNextFrameNumber(&retval);
if (ret == FAIL) { if (ret == FAIL) {
sprintf(mess, "Could not get starting frame number. Failed to map " sprintf(mess, "Could not get next frame number. Failed to map "
"address.\n"); "address.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else if (ret == -2) { } else if (ret == -2) {
sprintf(mess, "Inconsistent starting frame number from left and right " sprintf(mess, "Inconsistent next frame number from left and right "
"FPGA. Please set it.\n"); "FPGA. Please set it.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
LOG(logDEBUG1, ("Start frame number retval: %u\n", retval)); LOG(logDEBUG1, ("next frame number retval: %u\n", retval));
} }
#endif #endif
return Server_SendResult(file_des, INT64, &retval, sizeof(retval)); return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
@ -6364,13 +6365,19 @@ int set_veto_photon(int file_des) {
const int chipIndex = args[0]; const int chipIndex = args[0];
const int numChannels = args[1]; const int numChannels = args[1];
int gainIndices[numChannels]; int *gainIndices = malloc(sizeof(int) * numChannels);
if (receiveData(file_des, gainIndices, sizeof(gainIndices), INT32) < 0) if (receiveData(file_des, gainIndices, sizeof(int) * numChannels, INT32) <
0) {
free(gainIndices);
return printSocketReadError(); return printSocketReadError();
}
int values[numChannels]; int *values = malloc(sizeof(int) * numChannels);
if (receiveData(file_des, values, sizeof(values), INT32) < 0) if (receiveData(file_des, values, sizeof(int) * numChannels, INT32) < 0) {
free(gainIndices);
free(values);
return printSocketReadError(); return printSocketReadError();
}
LOG(logINFO, ("Setting Veto Photon: [chipIndex:%d, nch:%d]\n", chipIndex, LOG(logINFO, ("Setting Veto Photon: [chipIndex:%d, nch:%d]\n", chipIndex,
numChannels)); numChannels));
@ -6425,6 +6432,12 @@ int set_veto_photon(int file_des) {
} }
} }
#endif #endif
if (gainIndices != NULL) {
free(gainIndices);
}
if (values != NULL) {
free(values);
}
return Server_SendResult(file_des, INT32, NULL, 0); return Server_SendResult(file_des, INT32, NULL, 0);
} }
@ -6432,10 +6445,8 @@ int get_veto_photon(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int arg = -1; int arg = -1;
int retvals[NCHAN]; int *retvals = NULL;
memset(retvals, 0, sizeof(retvals)); int *gainRetvals = NULL;
int gainRetvals[NCHAN];
memset(gainRetvals, 0, sizeof(gainRetvals));
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0) if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
return printSocketReadError(); return printSocketReadError();
@ -6444,24 +6455,38 @@ int get_veto_photon(int file_des) {
#ifndef GOTTHARD2D #ifndef GOTTHARD2D
functionNotImplemented(); functionNotImplemented();
#else #else
// get only retvals = malloc(sizeof(int) * NCHAN);
int chipIndex = arg; gainRetvals = malloc(sizeof(int) * NCHAN);
if (chipIndex < -1 || chipIndex >= NCHIP) { memset(retvals, 0, sizeof(int) * NCHAN);
memset(gainRetvals, 0, sizeof(int) * NCHAN);
if (retvals == NULL || gainRetvals == NULL) {
ret = FAIL; ret = FAIL;
sprintf(mess, "Could not get veto photon. Invalid chip index %d\n", strcpy(
chipIndex); mess,
"Could not get veto photon. Could not allocate memory in server\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
ret = getVetoPhoton(chipIndex, retvals, gainRetvals); // get only
if (ret == FAIL) { int chipIndex = arg;
strcpy(mess, if (chipIndex < -1 || chipIndex >= NCHIP) {
"Could not get veto photon for chipIndex -1. Not the " ret = FAIL;
"same for all chips. Select specific chip index instead.\n"); sprintf(mess, "Could not get veto photon. Invalid chip index %d\n",
chipIndex);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
for (int i = 0; i < NCHAN; ++i) { ret = getVetoPhoton(chipIndex, retvals, gainRetvals);
LOG(logDEBUG1, if (ret == FAIL) {
("%d:[%d, %d]\n", i, retvals[i], gainRetvals[i])); strcpy(mess,
"Could not get veto photon for chipIndex -1. Not the "
"same for all chips. Select specific chip index "
"instead.\n");
LOG(logERROR, (mess));
} else {
for (int i = 0; i < NCHAN; ++i) {
LOG(logDEBUG1,
("%d:[%d, %d]\n", i, retvals[i], gainRetvals[i]));
}
} }
} }
} }
@ -6473,6 +6498,12 @@ int get_veto_photon(int file_des) {
sendData(file_des, gainRetvals, sizeof(gainRetvals), INT32); sendData(file_des, gainRetvals, sizeof(gainRetvals), INT32);
sendData(file_des, retvals, sizeof(retvals), INT32); sendData(file_des, retvals, sizeof(retvals), INT32);
} }
if (retvals != NULL) {
free(retvals);
}
if (gainRetvals != NULL) {
free(gainRetvals);
}
return ret; return ret;
} }
@ -8163,3 +8194,14 @@ int set_default_dacs(int file_des) {
#endif #endif
return Server_SendResult(file_des, INT32, NULL, 0); return Server_SendResult(file_des, INT32, NULL, 0);
} }
int is_virtual(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
int retval = 0;
#ifdef VIRTUAL
retval = 1;
#endif
LOG(logDEBUG1, ("is virtual retval: %d\n", retval));
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
}

View File

@ -142,6 +142,8 @@ class Detector {
* streaming, receiver file or streaming. Default is disabled. * streaming, receiver file or streaming. Default is disabled.
*/ */
void setGapPixelsinCallback(const bool enable); void setGapPixelsinCallback(const bool enable);
Result<bool> isVirtualDetectorServer(Positions pos = {}) const;
///@{ ///@{
/** @name Callbacks */ /** @name Callbacks */
@ -482,11 +484,11 @@ class Detector {
getNumMissingPackets(Positions pos = {}) const; getNumMissingPackets(Positions pos = {}) const;
/** [Eiger][Jungfrau] */ /** [Eiger][Jungfrau] */
Result<uint64_t> getStartingFrameNumber(Positions pos = {}) const; Result<uint64_t> getNextFrameNumber(Positions pos = {}) const;
/** [Eiger][Jungfrau] Stopping acquisition might result in different frame /** [Eiger][Jungfrau] Stopping acquisition might result in different frame
* numbers for different modules.*/ * numbers for different modules.*/
void setStartingFrameNumber(uint64_t value, Positions pos = {}); void setNextFrameNumber(uint64_t value, Positions pos = {});
/** [Eiger][Mythen3] Sends an internal software trigger to the detector */ /** [Eiger][Mythen3] Sends an internal software trigger to the detector */
void sendSoftwareTrigger(Positions pos = {}); void sendSoftwareTrigger(Positions pos = {});

View File

@ -687,7 +687,7 @@ class CmdProxy {
{"busy", "clearbusy"}, {"busy", "clearbusy"},
{"receiver", "rx_status"}, {"receiver", "rx_status"},
{"framescaught", "rx_framescaught"}, {"framescaught", "rx_framescaught"},
{"startingfnum", "startframenumber"}, {"startingfnum", "nextframenumber"},
/* Network Configuration (Detector<->Receiver) */ /* Network Configuration (Detector<->Receiver) */
{"detectorip", "udp_srcip"}, {"detectorip", "udp_srcip"},
@ -847,7 +847,7 @@ class CmdProxy {
{"status", &CmdProxy::DetectorStatus}, {"status", &CmdProxy::DetectorStatus},
{"rx_framescaught", &CmdProxy::rx_framescaught}, {"rx_framescaught", &CmdProxy::rx_framescaught},
{"rx_missingpackets", &CmdProxy::rx_missingpackets}, {"rx_missingpackets", &CmdProxy::rx_missingpackets},
{"startframenumber", &CmdProxy::startframenumber}, {"nextframenumber", &CmdProxy::nextframenumber},
{"trigger", &CmdProxy::trigger}, {"trigger", &CmdProxy::trigger},
{"scan", &CmdProxy::Scan}, {"scan", &CmdProxy::Scan},
{"scanerrmsg", &CmdProxy::scanerrmsg}, {"scanerrmsg", &CmdProxy::scanerrmsg},
@ -1460,12 +1460,11 @@ class CmdProxy {
GET_COMMAND(rx_missingpackets, getNumMissingPackets, GET_COMMAND(rx_missingpackets, getNumMissingPackets,
"\n\tNumber of missing packets for each port in receiver."); "\n\tNumber of missing packets for each port in receiver.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(nextframenumber, getNextFrameNumber,
startframenumber, getStartingFrameNumber, setStartingFrameNumber, setNextFrameNumber, StringTo<uint64_t>,
StringTo<uint64_t>, "[n_value]\n\t[Eiger][Jungfrau] Next frame number. "
"[n_value]\n\t[Eiger][Jungfrau] Starting frame number for " "Stopping acquisition might result in "
"next acquisition. Stopping acquisition might result in " "different frame numbers for different modules.");
"different frame numbers for different modules.");
EXECUTE_SET_COMMAND( EXECUTE_SET_COMMAND(
trigger, sendSoftwareTrigger, trigger, sendSoftwareTrigger,

View File

@ -206,6 +206,10 @@ void Detector::setGapPixelsinCallback(bool enable) {
pimpl->setGapPixelsinCallback(enable); pimpl->setGapPixelsinCallback(enable);
} }
Result<bool> Detector::isVirtualDetectorServer(Positions pos) const {
return pimpl->Parallel(&Module::isVirtualDetectorServer, pos);
}
// Callback // Callback
void Detector::registerAcquisitionFinishedCallback(void (*func)(double, int, void Detector::registerAcquisitionFinishedCallback(void (*func)(double, int,
@ -621,12 +625,12 @@ Detector::getNumMissingPackets(Positions pos) const {
return pimpl->Parallel(&Module::getNumMissingPackets, pos); return pimpl->Parallel(&Module::getNumMissingPackets, pos);
} }
Result<uint64_t> Detector::getStartingFrameNumber(Positions pos) const { Result<uint64_t> Detector::getNextFrameNumber(Positions pos) const {
return pimpl->Parallel(&Module::getStartingFrameNumber, pos); return pimpl->Parallel(&Module::getNextFrameNumber, pos);
} }
void Detector::setStartingFrameNumber(uint64_t value, Positions pos) { void Detector::setNextFrameNumber(uint64_t value, Positions pos) {
pimpl->Parallel(&Module::setStartingFrameNumber, pos, value); pimpl->Parallel(&Module::setNextFrameNumber, pos, value);
} }
void Detector::sendSoftwareTrigger(Positions pos) { void Detector::sendSoftwareTrigger(Positions pos) {

View File

@ -178,6 +178,10 @@ void Module::setAllTrimbits(int val) {
sendToDetector<int>(F_SET_ALL_TRIMBITS, val); sendToDetector<int>(F_SET_ALL_TRIMBITS, val);
} }
bool Module::isVirtualDetectorServer() const {
return sendToDetector<int>(F_IS_VIRTUAL);
}
int64_t Module::getNumberOfFrames() const { int64_t Module::getNumberOfFrames() const {
return sendToDetector<int64_t>(F_GET_NUM_FRAMES); return sendToDetector<int64_t>(F_GET_NUM_FRAMES);
} }
@ -484,12 +488,12 @@ std::vector<uint64_t> Module::getNumMissingPackets() const {
throw RuntimeError("No receiver to get missing packets."); throw RuntimeError("No receiver to get missing packets.");
} }
uint64_t Module::getStartingFrameNumber() const { uint64_t Module::getNextFrameNumber() const {
return sendToDetector<uint64_t>(F_GET_STARTING_FRAME_NUMBER); return sendToDetector<uint64_t>(F_GET_NEXT_FRAME_NUMBER);
} }
void Module::setStartingFrameNumber(uint64_t value) { void Module::setNextFrameNumber(uint64_t value) {
sendToDetector(F_SET_STARTING_FRAME_NUMBER, value, nullptr); sendToDetector(F_SET_NEXT_FRAME_NUMBER, value, nullptr);
} }
void Module::sendSoftwareTrigger() { sendToDetectorStop(F_SOFTWARE_TRIGGER); } void Module::sendSoftwareTrigger() { sendToDetectorStop(F_SOFTWARE_TRIGGER); }

View File

@ -103,6 +103,7 @@ class Module : public virtual slsDetectorDefs {
void loadSettingsFile(const std::string &fname); void loadSettingsFile(const std::string &fname);
int getAllTrimbits() const; int getAllTrimbits() const;
void setAllTrimbits(int val); void setAllTrimbits(int val);
bool isVirtualDetectorServer() const;
/************************************************** /**************************************************
* * * *
@ -171,8 +172,8 @@ class Module : public virtual slsDetectorDefs {
double getReceiverProgress() const; double getReceiverProgress() const;
int64_t getFramesCaughtByReceiver() const; int64_t getFramesCaughtByReceiver() const;
std::vector<uint64_t> getNumMissingPackets() const; std::vector<uint64_t> getNumMissingPackets() const;
uint64_t getStartingFrameNumber() const; uint64_t getNextFrameNumber() const;
void setStartingFrameNumber(uint64_t value); void setNextFrameNumber(uint64_t value);
void sendSoftwareTrigger(); void sendSoftwareTrigger();
defs::scanParameters getScan() const; defs::scanParameters getScan() const;
void setScan(const defs::scanParameters t); void setScan(const defs::scanParameters t);

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("dac", "[.cmd][.dacs][.new]") { TEST_CASE("dac", "[.cmd][.dacs]") {
// dac 0 to dac 17 // dac 0 to dac 17
Detector det; Detector det;
@ -100,7 +100,7 @@ TEST_CASE("dac", "[.cmd][.dacs][.new]") {
} }
} }
TEST_CASE("adcvpp", "[.cmd][.new]") { TEST_CASE("adcvpp", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -132,7 +132,7 @@ TEST_CASE("adcvpp", "[.cmd][.new]") {
/* CTB/ Moench Specific */ /* CTB/ Moench Specific */
TEST_CASE("samples", "[.cmd][.new]") { TEST_CASE("samples", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -179,7 +179,7 @@ TEST_CASE("samples", "[.cmd][.new]") {
} }
} }
TEST_CASE("asamples", "[.cmd][.new]") { TEST_CASE("asamples", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -209,7 +209,7 @@ TEST_CASE("asamples", "[.cmd][.new]") {
} }
} }
TEST_CASE("adcclk", "[.cmd][.new]") { TEST_CASE("adcclk", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -240,7 +240,7 @@ TEST_CASE("adcclk", "[.cmd][.new]") {
} }
} }
TEST_CASE("runclk", "[.cmd][.new]") { TEST_CASE("runclk", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -271,7 +271,7 @@ TEST_CASE("runclk", "[.cmd][.new]") {
} }
} }
TEST_CASE("syncclk", "[.cmd][.new]") { TEST_CASE("syncclk", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -283,7 +283,7 @@ TEST_CASE("syncclk", "[.cmd][.new]") {
} }
} }
TEST_CASE("adcpipeline", "[.cmd][.new]") { TEST_CASE("adcpipeline", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -318,7 +318,7 @@ TEST_CASE("adcpipeline", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_limit", "[.cmd][.new]") { TEST_CASE("v_limit", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -356,7 +356,7 @@ TEST_CASE("v_limit", "[.cmd][.new]") {
} }
} }
TEST_CASE("adcenable", "[.cmd][.new]") { TEST_CASE("adcenable", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -386,7 +386,7 @@ TEST_CASE("adcenable", "[.cmd][.new]") {
} }
} }
TEST_CASE("adcenable10g", "[.cmd][.new]") { TEST_CASE("adcenable10g", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -418,7 +418,7 @@ TEST_CASE("adcenable10g", "[.cmd][.new]") {
/* CTB Specific */ /* CTB Specific */
TEST_CASE("dsamples", "[.cmd][.new]") { TEST_CASE("dsamples", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -448,7 +448,7 @@ TEST_CASE("dsamples", "[.cmd][.new]") {
} }
} }
TEST_CASE("romode", "[.cmd][.new]") { TEST_CASE("romode", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -488,7 +488,7 @@ TEST_CASE("romode", "[.cmd][.new]") {
} }
} }
TEST_CASE("dbitclk", "[.cmd][.new]") { TEST_CASE("dbitclk", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -519,7 +519,7 @@ TEST_CASE("dbitclk", "[.cmd][.new]") {
} }
} }
TEST_CASE("dbitpipeline", "[.cmd][.new]") { TEST_CASE("dbitpipeline", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -554,7 +554,7 @@ TEST_CASE("dbitpipeline", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_a", "[.cmd][.new]") { TEST_CASE("v_a", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -575,7 +575,7 @@ TEST_CASE("v_a", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_b", "[.cmd][.new]") { TEST_CASE("v_b", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -596,7 +596,7 @@ TEST_CASE("v_b", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_c", "[.cmd][.new]") { TEST_CASE("v_c", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -617,7 +617,7 @@ TEST_CASE("v_c", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_d", "[.cmd][.new]") { TEST_CASE("v_d", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -638,7 +638,7 @@ TEST_CASE("v_d", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_io", "[.cmd][.new]") { TEST_CASE("v_io", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -650,7 +650,7 @@ TEST_CASE("v_io", "[.cmd][.new]") {
} }
} }
TEST_CASE("v_chip", "[.cmd][.new]") { TEST_CASE("v_chip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -662,7 +662,7 @@ TEST_CASE("v_chip", "[.cmd][.new]") {
} }
} }
TEST_CASE("vm_a", "[.cmd][.new]") { TEST_CASE("vm_a", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -673,7 +673,7 @@ TEST_CASE("vm_a", "[.cmd][.new]") {
} }
} }
TEST_CASE("vm_b", "[.cmd][.new]") { TEST_CASE("vm_b", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -684,7 +684,7 @@ TEST_CASE("vm_b", "[.cmd][.new]") {
} }
} }
TEST_CASE("vm_c", "[.cmd][.new]") { TEST_CASE("vm_c", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -695,7 +695,7 @@ TEST_CASE("vm_c", "[.cmd][.new]") {
} }
} }
TEST_CASE("vm_d", "[.cmd][.new]") { TEST_CASE("vm_d", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -706,7 +706,7 @@ TEST_CASE("vm_d", "[.cmd][.new]") {
} }
} }
TEST_CASE("vm_io", "[.cmd][.new]") { TEST_CASE("vm_io", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -717,7 +717,7 @@ TEST_CASE("vm_io", "[.cmd][.new]") {
} }
} }
TEST_CASE("im_a", "[.cmd][.new]") { TEST_CASE("im_a", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -728,7 +728,7 @@ TEST_CASE("im_a", "[.cmd][.new]") {
} }
} }
TEST_CASE("im_b", "[.cmd][.new]") { TEST_CASE("im_b", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -739,7 +739,7 @@ TEST_CASE("im_b", "[.cmd][.new]") {
} }
} }
TEST_CASE("im_c", "[.cmd][.new]") { TEST_CASE("im_c", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -750,7 +750,7 @@ TEST_CASE("im_c", "[.cmd][.new]") {
} }
} }
TEST_CASE("im_d", "[.cmd][.new]") { TEST_CASE("im_d", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -761,7 +761,7 @@ TEST_CASE("im_d", "[.cmd][.new]") {
} }
} }
TEST_CASE("im_io", "[.cmd][.new]") { TEST_CASE("im_io", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -772,7 +772,7 @@ TEST_CASE("im_io", "[.cmd][.new]") {
} }
} }
TEST_CASE("adc", "[.cmd][.new]") { TEST_CASE("adc", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -786,7 +786,7 @@ TEST_CASE("adc", "[.cmd][.new]") {
} }
} }
TEST_CASE("extsampling", "[.cmd][.new]") { TEST_CASE("extsampling", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -816,7 +816,7 @@ TEST_CASE("extsampling", "[.cmd][.new]") {
} }
} }
TEST_CASE("extsamplingsrc", "[.cmd][.new]") { TEST_CASE("extsamplingsrc", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -847,7 +847,7 @@ TEST_CASE("extsamplingsrc", "[.cmd][.new]") {
} }
} }
TEST_CASE("diodelay", "[.cmd][.new]") { TEST_CASE("diodelay", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -870,7 +870,7 @@ TEST_CASE("diodelay", "[.cmd][.new]") {
} }
} }
TEST_CASE("led", "[.cmd][.new]") { TEST_CASE("led", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <array> #include <array>
#include <sstream> #include <sstream>
#include <thread> #include <thread>
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/** temperature */ /** temperature */
TEST_CASE("temp_fpgaext", "[.cmd][.new]") { TEST_CASE("temp_fpgaext", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -32,7 +32,7 @@ TEST_CASE("temp_fpgaext", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_10ge", "[.cmd][.new]") { TEST_CASE("temp_10ge", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -47,7 +47,7 @@ TEST_CASE("temp_10ge", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_dcdc", "[.cmd][.new]") { TEST_CASE("temp_dcdc", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -62,7 +62,7 @@ TEST_CASE("temp_dcdc", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_sodl", "[.cmd][.new]") { TEST_CASE("temp_sodl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -77,7 +77,7 @@ TEST_CASE("temp_sodl", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_sodr", "[.cmd][.new]") { TEST_CASE("temp_sodr", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -92,7 +92,7 @@ TEST_CASE("temp_sodr", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_fpgafl", "[.cmd][.new]") { TEST_CASE("temp_fpgafl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -107,7 +107,7 @@ TEST_CASE("temp_fpgafl", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_fpgafr", "[.cmd][.new]") { TEST_CASE("temp_fpgafr", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -124,7 +124,7 @@ TEST_CASE("temp_fpgafr", "[.cmd][.new]") {
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs]") {
// vsvp, vtr, vrf, vrs, vsvn, vtgstv, vcmp_ll, vcmp_lr, vcal, vcmp_rl, // vsvp, vtr, vrf, vrs, vsvn, vtgstv, vcmp_ll, vcmp_lr, vcal, vcmp_rl,
// rxb_rb, rxb_lb, vcmp_rr, vcp, vcn, vis, vthreshold // rxb_rb, rxb_lb, vcmp_rr, vcp, vcn, vis, vthreshold
Detector det; Detector det;
@ -233,7 +233,7 @@ TEST_CASE("Setting and reading back EIGER dacs", "[.cmd][.dacs][.new]") {
/* Network Configuration (Detector<->Receiver) */ /* Network Configuration (Detector<->Receiver) */
TEST_CASE("txndelay_left", "[.cmd][.new]") { TEST_CASE("txndelay_left", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -254,7 +254,7 @@ TEST_CASE("txndelay_left", "[.cmd][.new]") {
} }
} }
TEST_CASE("txndelay_right", "[.cmd][.new]") { TEST_CASE("txndelay_right", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -277,7 +277,7 @@ TEST_CASE("txndelay_right", "[.cmd][.new]") {
/* Eiger Specific */ /* Eiger Specific */
TEST_CASE("subexptime", "[.cmd][.new]") { TEST_CASE("subexptime", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -298,7 +298,7 @@ TEST_CASE("subexptime", "[.cmd][.new]") {
} }
} }
TEST_CASE("subdeadtime", "[.cmd][.new]") { TEST_CASE("subdeadtime", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -319,7 +319,7 @@ TEST_CASE("subdeadtime", "[.cmd][.new]") {
} }
} }
TEST_CASE("threshold", "[.cmd][.new]") { TEST_CASE("threshold", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -348,7 +348,7 @@ TEST_CASE("threshold", "[.cmd][.new]") {
} }
} }
TEST_CASE("thresholdnotb", "[.cmd][.new]") { TEST_CASE("thresholdnotb", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -377,7 +377,7 @@ TEST_CASE("thresholdnotb", "[.cmd][.new]") {
} }
} }
TEST_CASE("settingspath", "[.cmd][.new]") { TEST_CASE("settingspath", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getSettingsPath(); auto prev_val = det.getSettingsPath();
@ -393,7 +393,7 @@ TEST_CASE("settingspath", "[.cmd][.new]") {
} }
} }
TEST_CASE("overflow", "[.cmd][.new]") { TEST_CASE("overflow", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -414,7 +414,7 @@ TEST_CASE("overflow", "[.cmd][.new]") {
} }
} }
TEST_CASE("flippeddatax", "[.cmd][.new]") { TEST_CASE("flippeddatax", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -435,7 +435,7 @@ TEST_CASE("flippeddatax", "[.cmd][.new]") {
} }
} }
TEST_CASE("trimen", "[.cmd][.this][.new]") { TEST_CASE("trimen", "[.cmd][.this]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -456,7 +456,7 @@ TEST_CASE("trimen", "[.cmd][.this][.new]") {
} }
} }
TEST_CASE("ratecorr", "[.cmd][.new]") { TEST_CASE("ratecorr", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -490,7 +490,7 @@ TEST_CASE("ratecorr", "[.cmd][.new]") {
} }
} }
TEST_CASE("readnlines", "[.cmd][.new]") { TEST_CASE("readnlines", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -520,7 +520,7 @@ TEST_CASE("readnlines", "[.cmd][.new]") {
} }
} }
TEST_CASE("interruptsubframe", "[.cmd][.new]") { TEST_CASE("interruptsubframe", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -544,7 +544,7 @@ TEST_CASE("interruptsubframe", "[.cmd][.new]") {
} }
} }
TEST_CASE("measuredperiod", "[.cmd][.new]") { TEST_CASE("measuredperiod", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -576,7 +576,7 @@ TEST_CASE("measuredperiod", "[.cmd][.new]") {
} }
} }
TEST_CASE("measuredsubperiod", "[.cmd][.new]") { TEST_CASE("measuredsubperiod", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -611,7 +611,7 @@ TEST_CASE("measuredsubperiod", "[.cmd][.new]") {
} }
} }
TEST_CASE("activate", "[.cmd][.new]") { TEST_CASE("activate", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -652,7 +652,7 @@ TEST_CASE("activate", "[.cmd][.new]") {
} }
} }
TEST_CASE("partialreset", "[.cmd][.new]") { TEST_CASE("partialreset", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -674,7 +674,7 @@ TEST_CASE("partialreset", "[.cmd][.new]") {
} }
} }
TEST_CASE("pulse", "[.cmd][.new]") { TEST_CASE("pulse", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -689,7 +689,7 @@ TEST_CASE("pulse", "[.cmd][.new]") {
} }
} }
TEST_CASE("pulsenmove", "[.cmd][.new]") { TEST_CASE("pulsenmove", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -704,7 +704,7 @@ TEST_CASE("pulsenmove", "[.cmd][.new]") {
} }
} }
TEST_CASE("pulsechip", "[.cmd][.new]") { TEST_CASE("pulsechip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs]") {
// vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp, // vref_ds, vcascn_pb, vcascp_pb, vout_cm, vcasc_out, vin_cm, vref_comp,
// ib_test_c // ib_test_c
@ -97,7 +97,7 @@ TEST_CASE("Setting and reading back GOTTHARD dacs", "[.cmd][.dacs][.new]") {
/* Gotthard Specific */ /* Gotthard Specific */
TEST_CASE("roi", "[.cmd][.new]") { TEST_CASE("roi", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -123,7 +123,7 @@ TEST_CASE("roi", "[.cmd][.new]") {
} }
} }
TEST_CASE("clearroi", "[.cmd][.new]") { TEST_CASE("clearroi", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -143,7 +143,7 @@ TEST_CASE("clearroi", "[.cmd][.new]") {
} }
} }
TEST_CASE("exptimel", "[.cmd][.new]") { TEST_CASE("exptimel", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") {
// vref_h_adc, vb_comp_fe, vb_comp_adc, vcom_cds, // vref_h_adc, vb_comp_fe, vb_comp_adc, vcom_cds,
// vref_restore, vb_opa_1st, vref_comp_fe, vcom_adc1, // vref_restore, vb_opa_1st, vref_comp_fe, vcom_adc1,
// vref_prech, vref_l_adc, vref_cds, vb_cs, // vref_prech, vref_l_adc, vref_cds, vb_cs,
@ -110,7 +110,7 @@ TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs][.new]") {
/* on chip dacs */ /* on chip dacs */
TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -123,7 +123,7 @@ TEST_CASE("vchip_comp_fe", "[.cmd][.onchipdacs][.new]") {
} }
} }
TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -136,7 +136,7 @@ TEST_CASE("vchip_opa_1st", "[.cmd][.onchipdacs][.new]") {
} }
} }
TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -149,7 +149,7 @@ TEST_CASE("vchip_opa_fd", "[.cmd][.onchipdacs][.new]") {
} }
} }
TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -162,7 +162,7 @@ TEST_CASE("vchip_comp_adc", "[.cmd][.onchipdacs][.new]") {
} }
} }
TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -175,7 +175,7 @@ TEST_CASE("vchip_ref_comp_fe", "[.cmd][.onchipdacs][.new]") {
} }
} }
TEST_CASE("vchip_cs", "[.cmd][.onchipdacs][.new]") { TEST_CASE("vchip_cs", "[.cmd][.onchipdacs]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -188,7 +188,7 @@ TEST_CASE("vchip_cs", "[.cmd][.onchipdacs][.new]") {
/* Gotthard2 Specific */ /* Gotthard2 Specific */
TEST_CASE("bursts", "[.cmd][.new]") { TEST_CASE("bursts", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -262,7 +262,7 @@ TEST_CASE("bursts", "[.cmd][.new]") {
} }
} }
TEST_CASE("burstperiod", "[.cmd][.new]") { TEST_CASE("burstperiod", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -284,7 +284,7 @@ TEST_CASE("burstperiod", "[.cmd][.new]") {
} }
} }
TEST_CASE("burstsl", "[.cmd][.new]") { TEST_CASE("burstsl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -295,7 +295,7 @@ TEST_CASE("burstsl", "[.cmd][.new]") {
} }
} }
TEST_CASE("inj_ch", "[.cmd][.new]") { TEST_CASE("inj_ch", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -320,7 +320,7 @@ TEST_CASE("inj_ch", "[.cmd][.new]") {
} }
} }
TEST_CASE("vetophoton", "[.cmd][.new]") { TEST_CASE("vetophoton", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -342,7 +342,7 @@ TEST_CASE("vetophoton", "[.cmd][.new]") {
} }
} }
TEST_CASE("vetoref", "[.cmd][.new]") { TEST_CASE("vetoref", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -357,7 +357,7 @@ TEST_CASE("vetoref", "[.cmd][.new]") {
} }
} }
TEST_CASE("vetofile", "[.cmd][.new]") { TEST_CASE("vetofile", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -371,7 +371,7 @@ TEST_CASE("vetofile", "[.cmd][.new]") {
} }
} }
TEST_CASE("burstmode", "[.cmd][.new]") { TEST_CASE("burstmode", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -402,7 +402,7 @@ TEST_CASE("burstmode", "[.cmd][.new]") {
} }
} }
TEST_CASE("cdsgain", "[.cmd][.new]") { TEST_CASE("cdsgain", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -432,7 +432,7 @@ TEST_CASE("cdsgain", "[.cmd][.new]") {
} }
} }
TEST_CASE("filter", "[.cmd][.new]") { TEST_CASE("filter", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -462,7 +462,7 @@ TEST_CASE("filter", "[.cmd][.new]") {
} }
} }
TEST_CASE("currentsource", "[.cmd][.new]") { TEST_CASE("currentsource", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -492,7 +492,7 @@ TEST_CASE("currentsource", "[.cmd][.new]") {
} }
} }
TEST_CASE("timingsource", "[.cmd][.new]") { TEST_CASE("timingsource", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -522,7 +522,7 @@ TEST_CASE("timingsource", "[.cmd][.new]") {
} }
} }
TEST_CASE("veto", "[.cmd][.new]") { TEST_CASE("veto", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -552,7 +552,7 @@ TEST_CASE("veto", "[.cmd][.new]") {
} }
} }
TEST_CASE("confadc", "[.cmd][.new]") { TEST_CASE("confadc", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -599,7 +599,7 @@ TEST_CASE("confadc", "[.cmd][.new]") {
} }
} }
TEST_CASE("badchannels", "[.cmd][.new]") { TEST_CASE("badchannels", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,12 +1,12 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -15,7 +15,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs]") {
// vb_comp, vdd_prot, vin_com, vref_prech, vb_pixbuf, vb_ds, vref_ds, // vb_comp, vdd_prot, vin_com, vref_prech, vb_pixbuf, vb_ds, vref_ds,
// vref_comp // vref_comp
Detector det; Detector det;
@ -96,7 +96,7 @@ TEST_CASE("Setting and reading back Jungfrau dacs", "[.cmd][.dacs][.new]") {
/* Network Configuration (Detector<->Receiver) */ /* Network Configuration (Detector<->Receiver) */
TEST_CASE("selinterface", "[.cmd][.new]") { TEST_CASE("selinterface", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -127,7 +127,7 @@ TEST_CASE("selinterface", "[.cmd][.new]") {
/* Jungfrau Specific */ /* Jungfrau Specific */
TEST_CASE("temp_threshold", "[.cmd][.new]") { TEST_CASE("temp_threshold", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -157,7 +157,7 @@ TEST_CASE("temp_threshold", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_control", "[.cmd][.new]") { TEST_CASE("temp_control", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -187,7 +187,7 @@ TEST_CASE("temp_control", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_event", "[.cmd][.new]") { TEST_CASE("temp_event", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -208,7 +208,7 @@ TEST_CASE("temp_event", "[.cmd][.new]") {
} }
} }
TEST_CASE("auto_comp_disable", "[.cmd][.new]") { TEST_CASE("auto_comp_disable", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -238,7 +238,7 @@ TEST_CASE("auto_comp_disable", "[.cmd][.new]") {
} }
} }
TEST_CASE("storagecells", "[.cmd][.new]") { TEST_CASE("storagecells", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -273,7 +273,7 @@ TEST_CASE("storagecells", "[.cmd][.new]") {
} }
} }
TEST_CASE("storagecell_start", "[.cmd][.new]") { TEST_CASE("storagecell_start", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -309,7 +309,7 @@ TEST_CASE("storagecell_start", "[.cmd][.new]") {
} }
} }
TEST_CASE("storagecell_delay", "[.cmd][.new]") { TEST_CASE("storagecell_delay", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back MOENCH dacs", "[.cmd][.dacs]") {
// vbp_colbuf, vipre, vin_cm", vb_sda, vcasc_sfp, vout_cm, vipre_cds, // vbp_colbuf, vipre, vin_cm", vb_sda, vcasc_sfp, vout_cm, vipre_cds,
// ibias_sfp // ibias_sfp

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* dacs */ /* dacs */
TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") { TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
// vcassh, vth2, vshaper, vshaperneg, vipre_out, vth3, vth1, // vcassh, vth2, vshaper, vshaperneg, vipre_out, vth3, vth1,
// vicin, vcas, vpreamp, vpl, vipre, viinsh, vph, vtrim, vdcsh, // vicin, vcas, vpreamp, vpl, vipre, viinsh, vph, vtrim, vdcsh,
@ -117,7 +117,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs][.new]") {
/* acquisition */ /* acquisition */
TEST_CASE("readout", "[.cmd][.new]") { TEST_CASE("readout", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// PUT only command // PUT only command
@ -134,7 +134,7 @@ TEST_CASE("readout", "[.cmd][.new]") {
/* Mythen3 Specific */ /* Mythen3 Specific */
TEST_CASE("counters", "[.cmd][.new]") { TEST_CASE("counters", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -166,7 +166,7 @@ TEST_CASE("counters", "[.cmd][.new]") {
} }
} }
TEST_CASE("gates", "[.cmd][.new]") { TEST_CASE("gates", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -196,7 +196,7 @@ TEST_CASE("gates", "[.cmd][.new]") {
} }
} }
TEST_CASE("exptime1", "[.cmd][.new]") { TEST_CASE("exptime1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -225,7 +225,7 @@ TEST_CASE("exptime1", "[.cmd][.new]") {
} }
} }
TEST_CASE("exptime2", "[.cmd][.new]") { TEST_CASE("exptime2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -254,7 +254,7 @@ TEST_CASE("exptime2", "[.cmd][.new]") {
} }
} }
TEST_CASE("exptime3", "[.cmd][.new]") { TEST_CASE("exptime3", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -283,7 +283,7 @@ TEST_CASE("exptime3", "[.cmd][.new]") {
} }
} }
TEST_CASE("gatedelay", "[.cmd][.new]") { TEST_CASE("gatedelay", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -319,7 +319,7 @@ TEST_CASE("gatedelay", "[.cmd][.new]") {
} }
} }
TEST_CASE("gatedelay1", "[.cmd][.new]") { TEST_CASE("gatedelay1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -348,7 +348,7 @@ TEST_CASE("gatedelay1", "[.cmd][.new]") {
} }
} }
TEST_CASE("gatedelay2", "[.cmd][.new]") { TEST_CASE("gatedelay2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -377,7 +377,7 @@ TEST_CASE("gatedelay2", "[.cmd][.new]") {
} }
} }
TEST_CASE("gatedelay3", "[.cmd][.new]") { TEST_CASE("gatedelay3", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();

View File

@ -1,14 +1,14 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/versionAPI.h"
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "tests/globals.h" #include "tests/globals.h"
#include "sls/versionAPI.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -17,7 +17,7 @@ using test::PUT;
/* Pattern */ /* Pattern */
TEST_CASE("pattern", "[.cmd][.new]") { TEST_CASE("pattern", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -30,7 +30,7 @@ TEST_CASE("pattern", "[.cmd][.new]") {
} }
} }
TEST_CASE("savepattern", "[.cmd][.new]") { TEST_CASE("savepattern", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -46,7 +46,7 @@ TEST_CASE("savepattern", "[.cmd][.new]") {
} }
} }
TEST_CASE("patioctrl", "[.cmd][.new]") { TEST_CASE("patioctrl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -76,7 +76,7 @@ TEST_CASE("patioctrl", "[.cmd][.new]") {
} }
} }
TEST_CASE("patword", "[.cmd][.new]") { TEST_CASE("patword", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -112,7 +112,7 @@ TEST_CASE("patword", "[.cmd][.new]") {
} }
} }
TEST_CASE("patlimits", "[.cmd][.new]") { TEST_CASE("patlimits", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -139,7 +139,7 @@ TEST_CASE("patlimits", "[.cmd][.new]") {
} }
} }
TEST_CASE("patloop0", "[.cmd][.new]") { TEST_CASE("patloop0", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -165,7 +165,7 @@ TEST_CASE("patloop0", "[.cmd][.new]") {
} }
} }
TEST_CASE("patloop1", "[.cmd][.new]") { TEST_CASE("patloop1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -191,7 +191,7 @@ TEST_CASE("patloop1", "[.cmd][.new]") {
} }
} }
TEST_CASE("patloop2", "[.cmd][.new]") { TEST_CASE("patloop2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -217,7 +217,7 @@ TEST_CASE("patloop2", "[.cmd][.new]") {
} }
} }
TEST_CASE("patnloop0", "[.cmd][.new]") { TEST_CASE("patnloop0", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -243,7 +243,7 @@ TEST_CASE("patnloop0", "[.cmd][.new]") {
} }
} }
TEST_CASE("patnloop1", "[.cmd][.new]") { TEST_CASE("patnloop1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -269,7 +269,7 @@ TEST_CASE("patnloop1", "[.cmd][.new]") {
} }
} }
TEST_CASE("patnloop2", "[.cmd][.new]") { TEST_CASE("patnloop2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -295,7 +295,7 @@ TEST_CASE("patnloop2", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwait0", "[.cmd][.new]") { TEST_CASE("patwait0", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -321,7 +321,7 @@ TEST_CASE("patwait0", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwait1", "[.cmd][.new]") { TEST_CASE("patwait1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -347,7 +347,7 @@ TEST_CASE("patwait1", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwait2", "[.cmd][.new]") { TEST_CASE("patwait2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -373,7 +373,7 @@ TEST_CASE("patwait2", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwaittime0", "[.cmd][.new]") { TEST_CASE("patwaittime0", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -399,7 +399,7 @@ TEST_CASE("patwaittime0", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwaittime1", "[.cmd][.new]") { TEST_CASE("patwaittime1", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -425,7 +425,7 @@ TEST_CASE("patwaittime1", "[.cmd][.new]") {
} }
} }
TEST_CASE("patwaittime2", "[.cmd][.new]") { TEST_CASE("patwaittime2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -451,7 +451,7 @@ TEST_CASE("patwaittime2", "[.cmd][.new]") {
} }
} }
TEST_CASE("patmask", "[.cmd][.new]") { TEST_CASE("patmask", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -477,7 +477,7 @@ TEST_CASE("patmask", "[.cmd][.new]") {
} }
} }
TEST_CASE("patsetbit", "[.cmd][.new]") { TEST_CASE("patsetbit", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -503,7 +503,7 @@ TEST_CASE("patsetbit", "[.cmd][.new]") {
} }
} }
TEST_CASE("patternstart", "[.cmd][.new]") { TEST_CASE("patternstart", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("patternstart", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("patternstart", {}, -1, GET));

View File

@ -1,11 +1,11 @@
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <sstream> #include <sstream>
#include "tests/globals.h"
#include "sls/versionAPI.h" #include "sls/versionAPI.h"
#include "tests/globals.h"
using sls::CmdProxy; using sls::CmdProxy;
using sls::Detector; using sls::Detector;
@ -19,7 +19,7 @@ python/scripts/list_tested_cmd.py to check if all commands are covered
/* configuration */ /* configuration */
TEST_CASE("rx_version", "[.cmd][.rx][.new]") { TEST_CASE("rx_version", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
std::ostringstream oss; std::ostringstream oss;
@ -33,7 +33,7 @@ TEST_CASE("rx_version", "[.cmd][.rx][.new]") {
/* acquisition */ /* acquisition */
TEST_CASE("rx_start", "[.cmd][.rx][.new]") { TEST_CASE("rx_start", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
det.setFileWrite(false); // avoid writing or error on file creation det.setFileWrite(false); // avoid writing or error on file creation
@ -51,7 +51,7 @@ TEST_CASE("rx_start", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_stop", "[.cmd][.rx][.new]") { TEST_CASE("rx_stop", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// PUT only command // PUT only command
@ -68,7 +68,7 @@ TEST_CASE("rx_stop", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_status", "[.cmd][.rx][.new]") { TEST_CASE("rx_status", "[.cmd][.rx]") {
Detector det; Detector det;
det.setFileWrite(false); // avoid writing or error on file creation det.setFileWrite(false); // avoid writing or error on file creation
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -86,7 +86,7 @@ TEST_CASE("rx_status", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") { TEST_CASE("rx_framescaught", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -111,7 +111,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") {
// } // }
} }
TEST_CASE("rx_missingpackets", "[.cmd][.rx][.new]") { TEST_CASE("rx_missingpackets", "[.cmd][.rx]") {
Detector det; Detector det;
det.setFileWrite(false); // avoid writing or error on file creation det.setFileWrite(false); // avoid writing or error on file creation
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -138,7 +138,7 @@ TEST_CASE("rx_missingpackets", "[.cmd][.rx][.new]") {
/* Network Configuration (Detector<->Receiver) */ /* Network Configuration (Detector<->Receiver) */
TEST_CASE("rx_printconfig", "[.cmd][.rx][.new]") { TEST_CASE("rx_printconfig", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("rx_printconfig", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("rx_printconfig", {}, -1, GET));
@ -146,7 +146,7 @@ TEST_CASE("rx_printconfig", "[.cmd][.rx][.new]") {
/* Receiver Config */ /* Receiver Config */
TEST_CASE("rx_hostname", "[.cmd][.rx][.new]") { TEST_CASE("rx_hostname", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxHostname(); auto prev_val = det.getRxHostname();
@ -178,7 +178,7 @@ TEST_CASE("rx_hostname", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_tcpport", "[.cmd][.rx][.new]") { TEST_CASE("rx_tcpport", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxPort(); auto prev_val = det.getRxPort();
@ -203,7 +203,7 @@ TEST_CASE("rx_tcpport", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_fifodepth", "[.cmd][.rx][.new]") { TEST_CASE("rx_fifodepth", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxFifoDepth(); auto prev_val = det.getRxFifoDepth();
@ -227,7 +227,7 @@ TEST_CASE("rx_fifodepth", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_silent", "[.cmd][.rx][.new]") { TEST_CASE("rx_silent", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxSilentMode(); auto prev_val = det.getRxSilentMode();
@ -251,7 +251,7 @@ TEST_CASE("rx_silent", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_discardpolicy", "[.cmd][.rx][.new]") { TEST_CASE("rx_discardpolicy", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxFrameDiscardPolicy(); auto prev_val = det.getRxFrameDiscardPolicy();
@ -280,7 +280,7 @@ TEST_CASE("rx_discardpolicy", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_padding", "[.cmd][.rx][.new]") { TEST_CASE("rx_padding", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getPartialFramesPadding(); auto prev_val = det.getPartialFramesPadding();
@ -304,7 +304,7 @@ TEST_CASE("rx_padding", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_udpsocksize", "[.cmd][.rx][.new]") { TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash( int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
@ -323,7 +323,7 @@ TEST_CASE("rx_udpsocksize", "[.cmd][.rx][.new]") {
det.setRxUDPSocketBufferSize(prev_val); det.setRxUDPSocketBufferSize(prev_val);
} }
TEST_CASE("rx_realudpsocksize", "[.cmd][.rx][.new]") { TEST_CASE("rx_realudpsocksize", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
uint64_t val = 0; uint64_t val = 0;
@ -342,7 +342,7 @@ TEST_CASE("rx_realudpsocksize", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_lock", "[.cmd][.rx][.new]") { TEST_CASE("rx_lock", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxLock(); auto prev_val = det.getRxLock();
@ -366,7 +366,7 @@ TEST_CASE("rx_lock", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_lastclient", "[.cmd][.rx][.new]") { TEST_CASE("rx_lastclient", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
std::ostringstream oss; std::ostringstream oss;
@ -376,7 +376,7 @@ TEST_CASE("rx_lastclient", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_threads", "[.cmd][.rx][.new]") { TEST_CASE("rx_threads", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
std::ostringstream oss; std::ostringstream oss;
@ -385,7 +385,7 @@ TEST_CASE("rx_threads", "[.cmd][.rx][.new]") {
/* File */ /* File */
TEST_CASE("fformat", "[.cmd][.new]") { TEST_CASE("fformat", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFileFormat(); auto prev_val = det.getFileFormat();
@ -404,7 +404,7 @@ TEST_CASE("fformat", "[.cmd][.new]") {
} }
} }
TEST_CASE("fpath", "[.cmd][.new]") { TEST_CASE("fpath", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFilePath(); auto prev_val = det.getFilePath();
@ -423,7 +423,7 @@ TEST_CASE("fpath", "[.cmd][.new]") {
} }
} }
TEST_CASE("fname", "[.cmd][.new]") { TEST_CASE("fname", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFileNamePrefix(); auto prev_val = det.getFileNamePrefix();
@ -447,7 +447,7 @@ TEST_CASE("fname", "[.cmd][.new]") {
} }
} }
TEST_CASE("findex", "[.cmd][.new]") { TEST_CASE("findex", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getAcquisitionIndex(); auto prev_val = det.getAcquisitionIndex();
@ -471,7 +471,7 @@ TEST_CASE("findex", "[.cmd][.new]") {
} }
} }
TEST_CASE("fwrite", "[.cmd][.new]") { TEST_CASE("fwrite", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFileWrite(); auto prev_val = det.getFileWrite();
@ -517,7 +517,7 @@ TEST_CASE("fmaster", "[.cmd]") {
det.setMasterFileWrite(prev_val); det.setMasterFileWrite(prev_val);
} }
TEST_CASE("foverwrite", "[.cmd][.new]") { TEST_CASE("foverwrite", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFileOverWrite(); auto prev_val = det.getFileOverWrite();
@ -541,7 +541,7 @@ TEST_CASE("foverwrite", "[.cmd][.new]") {
} }
} }
TEST_CASE("rx_framesperfile", "[.cmd][.rx][.new]") { TEST_CASE("rx_framesperfile", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getFramesPerFile(); auto prev_val = det.getFramesPerFile();
@ -572,7 +572,7 @@ TEST_CASE("rx_framesperfile", "[.cmd][.rx][.new]") {
/* ZMQ Streaming Parameters (Receiver<->Client) */ /* ZMQ Streaming Parameters (Receiver<->Client) */
TEST_CASE("rx_zmqstream", "[.cmd][.rx][.new]") { TEST_CASE("rx_zmqstream", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxZmqDataStream(); auto prev_val = det.getRxZmqDataStream();
@ -598,7 +598,7 @@ TEST_CASE("rx_zmqstream", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_zmqfreq", "[.cmd][.rx][.new]") { TEST_CASE("rx_zmqfreq", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxZmqFrequency(); auto prev_val = det.getRxZmqFrequency();
@ -622,7 +622,7 @@ TEST_CASE("rx_zmqfreq", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx][.new]") { TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxZmqStartingFrame(); auto prev_val = det.getRxZmqStartingFrame();
@ -646,7 +646,7 @@ TEST_CASE("rx_zmqstartfnum", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_zmqport", "[.cmd][.rx][.new]") { TEST_CASE("rx_zmqport", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val_zmqport = det.getRxZmqPort(); auto prev_val_zmqport = det.getRxZmqPort();
@ -686,7 +686,7 @@ TEST_CASE("rx_zmqport", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_zmqip", "[.cmd][.rx][.new]") { TEST_CASE("rx_zmqip", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getRxZmqIP(); auto prev_val = det.getRxZmqIP();
@ -706,7 +706,7 @@ TEST_CASE("rx_zmqip", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_zmqhwm", "[.cmd][.new]") { TEST_CASE("rx_zmqhwm", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = auto prev_val =
@ -736,7 +736,7 @@ TEST_CASE("rx_zmqhwm", "[.cmd][.new]") {
/* CTB Specific */ /* CTB Specific */
TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") { TEST_CASE("rx_dbitlist", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -765,7 +765,7 @@ TEST_CASE("rx_dbitlist", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_dbitoffset", "[.cmd][.rx][.new]") { TEST_CASE("rx_dbitoffset", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -801,7 +801,7 @@ TEST_CASE("rx_dbitoffset", "[.cmd][.rx][.new]") {
/* Moench */ /* Moench */
TEST_CASE("rx_jsonaddheader", "[.cmd][.rx][.new]") { TEST_CASE("rx_jsonaddheader", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getAdditionalJsonHeader(); auto prev_val = det.getAdditionalJsonHeader();
@ -827,7 +827,7 @@ TEST_CASE("rx_jsonaddheader", "[.cmd][.rx][.new]") {
} }
} }
TEST_CASE("rx_jsonpara", "[.cmd][.rx][.new]") { TEST_CASE("rx_jsonpara", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getAdditionalJsonHeader(); auto prev_val = det.getAdditionalJsonHeader();
@ -859,7 +859,7 @@ TEST_CASE("rx_jsonpara", "[.cmd][.rx][.new]") {
/* Insignificant */ /* Insignificant */
TEST_CASE("rx_frameindex", "[.cmd][.rx][.new]") { TEST_CASE("rx_frameindex", "[.cmd][.rx]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
proxy.Call("rx_frameindex", {}, -1, GET); proxy.Call("rx_frameindex", {}, -1, GET);

View File

@ -23,7 +23,7 @@ TEST_CASE("Unknown command", "[.cmd]") {
/* configuration */ /* configuration */
TEST_CASE("config", "[.cmd][.new]") { TEST_CASE("config", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// put only // put only
@ -32,7 +32,7 @@ TEST_CASE("config", "[.cmd][.new]") {
// free: not testing // free: not testing
TEST_CASE("parameters", "[.cmd][.new]") { TEST_CASE("parameters", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// put only // put only
@ -58,7 +58,7 @@ TEST_CASE("parameters", "[.cmd][.new]") {
*/ */
} }
TEST_CASE("hostname", "[.cmd][.new]") { TEST_CASE("hostname", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("hostname", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("hostname", {}, -1, GET));
@ -66,49 +66,49 @@ TEST_CASE("hostname", "[.cmd][.new]") {
// virtual: not testing // virtual: not testing
TEST_CASE("versions", "[.cmd][.new]") { TEST_CASE("versions", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("versions", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("versions", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("versions", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("versions", {"0"}, -1, PUT));
} }
TEST_CASE("packageversion", "[.cmd][.new]") { TEST_CASE("packageversion", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("packageversion", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("packageversion", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("packageversion", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("packageversion", {"0"}, -1, PUT));
} }
TEST_CASE("clientversion", "[.cmd][.new]") { TEST_CASE("clientversion", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("clientversion", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("clientversion", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("clientversion", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("clientversion", {"0"}, -1, PUT));
} }
TEST_CASE("firmwareversion", "[.cmd][.new]") { TEST_CASE("firmwareversion", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("firmwareversion", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("firmwareversion", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("firmwareversion", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("firmwareversion", {"0"}, -1, PUT));
} }
TEST_CASE("detectorserverversion", "[.cmd][.new]") { TEST_CASE("detectorserverversion", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("detectorserverversion", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("detectorserverversion", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("detectorserverversion", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("detectorserverversion", {"0"}, -1, PUT));
} }
TEST_CASE("serialnumber", "[.cmd][.new]") { TEST_CASE("serialnumber", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("serialnumber", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("serialnumber", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("serialnumber", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("serialnumber", {"0"}, -1, PUT));
} }
TEST_CASE("type", "[.cmd][.new]") { TEST_CASE("type", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto dt = det.getDetectorType().squash(); auto dt = det.getDetectorType().squash();
@ -120,13 +120,13 @@ TEST_CASE("type", "[.cmd][.new]") {
// REQUIRE(dt == test::type); // REQUIRE(dt == test::type);
} }
TEST_CASE("detsize", "[.cmd][.new]") { TEST_CASE("detsize", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("detsize", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("detsize", {}, -1, GET));
} }
TEST_CASE("settingslist", "[.cmd][.new]") { TEST_CASE("settingslist", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -138,7 +138,7 @@ TEST_CASE("settingslist", "[.cmd][.new]") {
} }
} }
TEST_CASE("settings", "[.cmd][.new]") { TEST_CASE("settings", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -206,13 +206,13 @@ TEST_CASE("settings", "[.cmd][.new]") {
} }
} }
TEST_CASE("trimbits", "[.cmd][.new]") { TEST_CASE("trimbits", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("trimbits", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("trimbits", {}, -1, GET));
} }
TEST_CASE("trimval", "[.cmd][.new]") { TEST_CASE("trimval", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -250,7 +250,7 @@ TEST_CASE("trimval", "[.cmd][.new]") {
// acquire: not testing // acquire: not testing
TEST_CASE("frames", "[.cmd][.new]") { TEST_CASE("frames", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = auto prev_val =
@ -274,7 +274,7 @@ TEST_CASE("frames", "[.cmd][.new]") {
det.setNumberOfFrames(prev_val); det.setNumberOfFrames(prev_val);
} }
TEST_CASE("triggers", "[.cmd][.new]") { TEST_CASE("triggers", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = auto prev_val =
@ -344,7 +344,7 @@ TEST_CASE("exptime", "[.cmd][.time]") {
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
} }
TEST_CASE("period", "[.cmd][.new]") { TEST_CASE("period", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getPeriod(); auto prev_val = det.getPeriod();
@ -368,7 +368,7 @@ TEST_CASE("period", "[.cmd][.new]") {
} }
} }
TEST_CASE("delay", "[.cmd][.new]") { TEST_CASE("delay", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -401,7 +401,7 @@ TEST_CASE("delay", "[.cmd][.new]") {
} }
} }
TEST_CASE("framesl", "[.cmd][.new]") { TEST_CASE("framesl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -412,7 +412,7 @@ TEST_CASE("framesl", "[.cmd][.new]") {
} }
} }
TEST_CASE("triggersl", "[.cmd][.new]") { TEST_CASE("triggersl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -423,7 +423,7 @@ TEST_CASE("triggersl", "[.cmd][.new]") {
} }
} }
TEST_CASE("delayl", "[.cmd][.new]") { TEST_CASE("delayl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -441,7 +441,7 @@ TEST_CASE("delayl", "[.cmd][.new]") {
} }
} }
TEST_CASE("periodl", "[.cmd][.new]") { TEST_CASE("periodl", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -459,7 +459,7 @@ TEST_CASE("periodl", "[.cmd][.new]") {
} }
} }
TEST_CASE("dr", "[.cmd][.new]") { TEST_CASE("dr", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -501,14 +501,14 @@ TEST_CASE("dr", "[.cmd][.new]") {
} }
} }
TEST_CASE("drlist", "[.cmd][.new]") { TEST_CASE("drlist", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("drlist", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("drlist", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("drlist", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("drlist", {}, -1, PUT));
} }
TEST_CASE("timing", "[.cmd][.new]") { TEST_CASE("timing", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getTimingMode(); auto prev_val = det.getTimingMode();
@ -570,14 +570,14 @@ TEST_CASE("timing", "[.cmd][.new]") {
} }
} }
TEST_CASE("timinglist", "[.cmd][.new]") { TEST_CASE("timinglist", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("timinglist", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("timinglist", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("timinglist", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("timinglist", {}, -1, PUT));
} }
TEST_CASE("speed", "[.cmd][.new]") { TEST_CASE("speed", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -628,7 +628,7 @@ TEST_CASE("speed", "[.cmd][.new]") {
} }
} }
TEST_CASE("adcphase", "[.cmd][.new]") { TEST_CASE("adcphase", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -667,7 +667,7 @@ TEST_CASE("adcphase", "[.cmd][.new]") {
} }
} }
TEST_CASE("maxadcphaseshift", "[.cmd][.new]") { TEST_CASE("maxadcphaseshift", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -681,7 +681,7 @@ TEST_CASE("maxadcphaseshift", "[.cmd][.new]") {
} }
} }
TEST_CASE("dbitphase", "[.cmd][.new]") { TEST_CASE("dbitphase", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -710,7 +710,7 @@ TEST_CASE("dbitphase", "[.cmd][.new]") {
} }
} }
TEST_CASE("maxdbitphaseshift", "[.cmd][.new]") { TEST_CASE("maxdbitphaseshift", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -723,7 +723,7 @@ TEST_CASE("maxdbitphaseshift", "[.cmd][.new]") {
} }
} }
TEST_CASE("clkfreq", "[.cmd][.new]") { TEST_CASE("clkfreq", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -737,7 +737,7 @@ TEST_CASE("clkfreq", "[.cmd][.new]") {
} }
} }
TEST_CASE("clkphase", "[.cmd][.new]") { TEST_CASE("clkphase", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -775,7 +775,7 @@ TEST_CASE("clkphase", "[.cmd][.new]") {
} }
} }
TEST_CASE("clkdiv", "[.cmd][.new]") { TEST_CASE("clkdiv", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -801,7 +801,7 @@ TEST_CASE("clkdiv", "[.cmd][.new]") {
} }
} }
TEST_CASE("maxclkphaseshift", "[.cmd][.new]") { TEST_CASE("maxclkphaseshift", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -815,7 +815,7 @@ TEST_CASE("maxclkphaseshift", "[.cmd][.new]") {
} }
} }
TEST_CASE("highvoltage", "[.cmd][.new]") { TEST_CASE("highvoltage", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -913,7 +913,7 @@ TEST_CASE("highvoltage", "[.cmd][.new]") {
} }
} }
TEST_CASE("powerchip", "[.cmd][.new]") { TEST_CASE("powerchip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -944,7 +944,7 @@ TEST_CASE("powerchip", "[.cmd][.new]") {
} }
} }
TEST_CASE("imagetest", "[.cmd][.new]") { TEST_CASE("imagetest", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -974,7 +974,7 @@ TEST_CASE("imagetest", "[.cmd][.new]") {
} }
} }
TEST_CASE("extsig", "[.cmd][.new]") { TEST_CASE("extsig", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1053,7 +1053,7 @@ TEST_CASE("extsig", "[.cmd][.new]") {
} }
} }
TEST_CASE("parallel", "[.cmd][.new]") { TEST_CASE("parallel", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1085,21 +1085,21 @@ TEST_CASE("parallel", "[.cmd][.new]") {
/** temperature */ /** temperature */
TEST_CASE("templist", "[.cmd][.new]") { TEST_CASE("templist", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("templist", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("templist", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("templist", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("templist", {}, -1, PUT));
} }
TEST_CASE("tempvalues", "[.cmd][.new]") { TEST_CASE("tempvalues", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("tempvalues", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("tempvalues", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("tempvalues", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("tempvalues", {}, -1, PUT));
} }
TEST_CASE("temp_adc", "[.cmd][.new]") { TEST_CASE("temp_adc", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1114,7 +1114,7 @@ TEST_CASE("temp_adc", "[.cmd][.new]") {
} }
} }
TEST_CASE("temp_fpga", "[.cmd][.new]") { TEST_CASE("temp_fpga", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1132,21 +1132,21 @@ TEST_CASE("temp_fpga", "[.cmd][.new]") {
/* dacs */ /* dacs */
TEST_CASE("daclist", "[.cmd][.new]") { TEST_CASE("daclist", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("daclist", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("daclist", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("daclist", {}, -1, PUT));
} }
TEST_CASE("dacvalues", "[.cmd][.new]") { TEST_CASE("dacvalues", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("dacvalues", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("dacvalues", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("dacvalues", {}, -1, PUT)); REQUIRE_THROWS(proxy.Call("dacvalues", {}, -1, PUT));
} }
TEST_CASE("defaultdacs", "[.cmd][.new]") { TEST_CASE("defaultdacs", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1161,7 +1161,7 @@ TEST_CASE("defaultdacs", "[.cmd][.new]") {
/* acquisition */ /* acquisition */
TEST_CASE("trigger", "[.cmd][.new]") { TEST_CASE("trigger", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET));
@ -1181,10 +1181,10 @@ TEST_CASE("trigger", "[.cmd][.new]") {
det.getPeriod().tsquash("inconsistent period in test"); det.getPeriod().tsquash("inconsistent period in test");
det.setTimingMode(defs::TRIGGER_EXPOSURE); det.setTimingMode(defs::TRIGGER_EXPOSURE);
det.setNumberOfFrames(1); det.setNumberOfFrames(1);
det.setExptime(std::chrono::milliseconds(1)); det.setExptime(std::chrono::microseconds(200));
det.setPeriod(std::chrono::milliseconds(1)); det.setPeriod(std::chrono::milliseconds(1));
auto startframenumber = det.getStartingFrameNumber().tsquash( auto nextframenumber =
"inconsistent frame nr in test"); det.getNextFrameNumber().tsquash("inconsistent frame nr in test");
det.startDetector(); det.startDetector();
{ {
std::ostringstream oss; std::ostringstream oss;
@ -1192,16 +1192,18 @@ TEST_CASE("trigger", "[.cmd][.new]") {
REQUIRE(oss.str() == "trigger successful\n"); REQUIRE(oss.str() == "trigger successful\n");
} }
std::this_thread::sleep_for(std::chrono::seconds(2)); std::this_thread::sleep_for(std::chrono::seconds(2));
auto currentfnum = det.getStartingFrameNumber().tsquash( auto currentfnum =
"inconsistent frame nr in test"); det.getNextFrameNumber().tsquash("inconsistent frame nr in test");
REQUIRE(startframenumber + 1 == currentfnum); REQUIRE(nextframenumber + 1 == currentfnum);
det.stopDetector(); det.stopDetector();
det.setTimingMode(prev_timing); det.setTimingMode(prev_timing);
det.setNumberOfFrames(prev_frames); det.setNumberOfFrames(prev_frames);
det.setExptime(prev_exptime);
det.setPeriod(prev_period);
} }
} }
TEST_CASE("clearbusy", "[.cmd][.new]") { TEST_CASE("clearbusy", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("clearbusy", {}, -1, PUT)); REQUIRE_NOTHROW(proxy.Call("clearbusy", {}, -1, PUT));
@ -1209,7 +1211,7 @@ TEST_CASE("clearbusy", "[.cmd][.new]") {
REQUIRE_THROWS(proxy.Call("clearbusy", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("clearbusy", {}, -1, GET));
} }
TEST_CASE("start", "[.cmd][.new]") { TEST_CASE("start", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// PUT only command // PUT only command
@ -1226,13 +1228,17 @@ TEST_CASE("start", "[.cmd][.new]") {
} }
prev_val = t[0]; prev_val = t[0];
} }
det.setExptime(-1, std::chrono::seconds(2)); auto prev_frames =
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
det.setExptime(-1, std::chrono::microseconds(200));
det.setPeriod(std::chrono::milliseconds(1));
det.setNumberOfFrames(10000);
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("start", {}, -1, PUT, oss); proxy.Call("start", {}, -1, PUT, oss);
REQUIRE(oss.str() == "start successful\n"); REQUIRE(oss.str() == "start successful\n");
} }
std::this_thread::sleep_for(std::chrono::milliseconds(200));
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
@ -1240,15 +1246,19 @@ TEST_CASE("start", "[.cmd][.new]") {
} }
det.stopDetector(); det.stopDetector();
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
det.setPeriod(prev_period);
det.setNumberOfFrames(prev_frames);
} }
TEST_CASE("stop", "[.cmd][.new]") { TEST_CASE("stop", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
// PUT only command // PUT only command
REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("stop", {}, -1, GET));
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
std::chrono::nanoseconds prev_val; std::chrono::nanoseconds prev_val;
bool virtualDet =
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
if (det_type != defs::MYTHEN3) { if (det_type != defs::MYTHEN3) {
prev_val = det.getExptime().tsquash("inconsistent exptime to test"); prev_val = det.getExptime().tsquash("inconsistent exptime to test");
} else { } else {
@ -1259,9 +1269,13 @@ TEST_CASE("stop", "[.cmd][.new]") {
} }
prev_val = t[0]; prev_val = t[0];
} }
det.setExptime(-1, std::chrono::seconds(2)); auto prev_frames =
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
det.setExptime(-1, std::chrono::microseconds(200));
det.setPeriod(std::chrono::milliseconds(1));
det.setNumberOfFrames(10000);
det.startDetector(); det.startDetector();
std::this_thread::sleep_for(std::chrono::milliseconds(200));
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
@ -1272,23 +1286,27 @@ TEST_CASE("stop", "[.cmd][.new]") {
proxy.Call("stop", {}, -1, PUT, oss); proxy.Call("stop", {}, -1, PUT, oss);
REQUIRE(oss.str() == "stop successful\n"); REQUIRE(oss.str() == "stop successful\n");
} }
if (det_type == defs::JUNGFRAU) { {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
REQUIRE(oss.str() == "status stopped\n"); if (!virtualDet && det_type == defs::JUNGFRAU) {
} else { REQUIRE(oss.str() == "status stopped\n");
std::ostringstream oss; } else {
proxy.Call("status", {}, -1, GET, oss); REQUIRE(oss.str() == "status idle\n");
REQUIRE(oss.str() == "status idle\n"); }
} }
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
det.setPeriod(prev_period);
det.setNumberOfFrames(prev_frames);
} }
TEST_CASE("status", "[.cmd][.new]") { TEST_CASE("status", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
std::chrono::nanoseconds prev_val; std::chrono::nanoseconds prev_val;
bool virtualDet =
det.isVirtualDetectorServer().tsquash("inconsistent virtual servers");
if (det_type != defs::MYTHEN3) { if (det_type != defs::MYTHEN3) {
prev_val = det.getExptime().tsquash("inconsistent exptime to test"); prev_val = det.getExptime().tsquash("inconsistent exptime to test");
} else { } else {
@ -1299,9 +1317,13 @@ TEST_CASE("status", "[.cmd][.new]") {
} }
prev_val = t[0]; prev_val = t[0];
} }
det.setExptime(-1, std::chrono::seconds(2)); auto prev_frames =
det.getNumberOfFrames().tsquash("inconsistent #frames in test");
auto prev_period = det.getPeriod().tsquash("inconsistent period in test");
det.setExptime(-1, std::chrono::microseconds(200));
det.setPeriod(std::chrono::milliseconds(1));
det.setNumberOfFrames(10000);
det.startDetector(); det.startDetector();
std::this_thread::sleep_for(std::chrono::milliseconds(200));
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
@ -1311,42 +1333,48 @@ TEST_CASE("status", "[.cmd][.new]") {
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("status", {}, -1, GET, oss); proxy.Call("status", {}, -1, GET, oss);
REQUIRE(oss.str() == "status idle\n"); if (!virtualDet && det_type == defs::JUNGFRAU) {
REQUIRE(oss.str() == "status stopped\n");
} else {
REQUIRE(oss.str() == "status idle\n");
}
} }
det.setExptime(-1, prev_val); det.setExptime(-1, prev_val);
det.setPeriod(prev_period);
det.setNumberOfFrames(prev_frames);
} }
TEST_CASE("startframenumber", "[.cmd][.new]") { TEST_CASE("nextframenumber", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) { if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
auto prev_sfnum = det.getStartingFrameNumber(); auto prev_sfnum = det.getNextFrameNumber();
REQUIRE_THROWS(proxy.Call("startframenumber", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("nextframenumber", {"0"}, -1, PUT));
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("startframenumber", {"3"}, -1, PUT, oss); proxy.Call("nextframenumber", {"3"}, -1, PUT, oss);
REQUIRE(oss.str() == "startframenumber 3\n"); REQUIRE(oss.str() == "nextframenumber 3\n");
} }
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("startframenumber", {}, -1, GET, oss); proxy.Call("nextframenumber", {}, -1, GET, oss);
REQUIRE(oss.str() == "startframenumber 3\n"); REQUIRE(oss.str() == "nextframenumber 3\n");
} }
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("startframenumber", {"1"}, -1, PUT, oss); proxy.Call("nextframenumber", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "startframenumber 1\n"); REQUIRE(oss.str() == "nextframenumber 1\n");
} }
for (int i = 0; i != det.size(); ++i) { for (int i = 0; i != det.size(); ++i) {
det.setStartingFrameNumber(prev_sfnum[i], {i}); det.setNextFrameNumber(prev_sfnum[i], {i});
} }
} else { } else {
REQUIRE_THROWS(proxy.Call("startframenumber", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("nextframenumber", {}, -1, GET));
} }
} }
TEST_CASE("scan", "[.cmd][.new]") { TEST_CASE("scan", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
defs::dacIndex ind = defs::DAC_0; defs::dacIndex ind = defs::DAC_0;
@ -1466,18 +1494,19 @@ TEST_CASE("scan", "[.cmd][.new]") {
// Reset all dacs to previous value // Reset all dacs to previous value
// for (int i = 0; i != det.size(); ++i) { // for (int i = 0; i != det.size(); ++i) {
// det.setDAC(ind, previous[i], false, {i}); // det.setDAC(ind, previous[i], false, {i});
// det.setDAC(notImplementedInd, notImplementedPrevious[i], false, {i}); // det.setDAC(notImplementedInd, notImplementedPrevious[i], false,
// {i});
// } // }
} }
TEST_CASE("scanerrmsg", "[.cmd][.new]") { TEST_CASE("scanerrmsg", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("scanerrmsg", {}, -1, GET)); REQUIRE_NOTHROW(proxy.Call("scanerrmsg", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("scanerrmsg", {""}, -1, PUT)); REQUIRE_THROWS(proxy.Call("scanerrmsg", {""}, -1, PUT));
} }
TEST_CASE("gappixels", "[.cmd][.new]") { TEST_CASE("gappixels", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1517,7 +1546,7 @@ TEST_CASE("gappixels", "[.cmd][.new]") {
/* Network Configuration (Detector<->Receiver) */ /* Network Configuration (Detector<->Receiver) */
TEST_CASE("numinterfaces", "[.cmd][.new]") { TEST_CASE("numinterfaces", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1550,7 +1579,7 @@ TEST_CASE("numinterfaces", "[.cmd][.new]") {
REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("numinterfaces", {"0"}, -1, PUT));
} }
TEST_CASE("udp_srcip", "[.cmd][.new]") { TEST_CASE("udp_srcip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getSourceUDPIP(); auto prev_val = det.getSourceUDPIP();
@ -1565,13 +1594,13 @@ TEST_CASE("udp_srcip", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_dstip", "[.cmd][.new]") { TEST_CASE("udp_dstip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("udp_dstip", {"0.0.0.0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("udp_dstip", {"0.0.0.0"}, -1, PUT));
} }
TEST_CASE("udp_srcmac", "[.cmd][.new]") { TEST_CASE("udp_srcmac", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getSourceUDPMAC(); auto prev_val = det.getSourceUDPMAC();
@ -1586,13 +1615,13 @@ TEST_CASE("udp_srcmac", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_dstmac", "[.cmd][.new]") { TEST_CASE("udp_dstmac", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("udp_dstmac", {"00:00:00:00:00:00"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("udp_dstmac", {"00:00:00:00:00:00"}, -1, PUT));
} }
TEST_CASE("udp_dstport", "[.cmd][.new]") { TEST_CASE("udp_dstport", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getDestinationUDPPort(); auto prev_val = det.getDestinationUDPPort();
@ -1606,7 +1635,7 @@ TEST_CASE("udp_dstport", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_srcip2", "[.cmd][.new]") { TEST_CASE("udp_srcip2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1619,12 +1648,15 @@ TEST_CASE("udp_srcip2", "[.cmd][.new]") {
REQUIRE(oss.str() == "udp_srcip2 129.129.205.12\n"); REQUIRE(oss.str() == "udp_srcip2 129.129.205.12\n");
} }
for (int i = 0; i != det.size(); ++i) { for (int i = 0; i != det.size(); ++i) {
det.setSourceUDPIP2(prev_val[i], {i}); if (prev_val[i] != sls::IpAddr{"0.0.0.0"})
det.setSourceUDPIP2(prev_val[i], {i});
} }
} else {
REQUIRE_THROWS(proxy.Call("udp_srcip2", {}, -1, GET));
} }
} }
TEST_CASE("udp_dstip2", "[.cmd][.new]") { TEST_CASE("udp_dstip2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1635,7 +1667,7 @@ TEST_CASE("udp_dstip2", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_srcmac2", "[.cmd][.new]") { TEST_CASE("udp_srcmac2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1656,7 +1688,7 @@ TEST_CASE("udp_srcmac2", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_dstmac2", "[.cmd][.new]") { TEST_CASE("udp_dstmac2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1668,7 +1700,7 @@ TEST_CASE("udp_dstmac2", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_dstport2", "[.cmd][.new]") { TEST_CASE("udp_dstport2", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1688,21 +1720,21 @@ TEST_CASE("udp_dstport2", "[.cmd][.new]") {
} }
} }
TEST_CASE("udp_reconfigure", "[.cmd][.new]") { TEST_CASE("udp_reconfigure", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("udp_reconfigure", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("udp_reconfigure", {}, -1, GET));
REQUIRE_NOTHROW(proxy.Call("udp_reconfigure", {}, -1, PUT)); REQUIRE_NOTHROW(proxy.Call("udp_reconfigure", {}, -1, PUT));
} }
TEST_CASE("udp_validate", "[.cmd][.new]") { TEST_CASE("udp_validate", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_THROWS(proxy.Call("udp_validate", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("udp_validate", {}, -1, GET));
REQUIRE_NOTHROW(proxy.Call("udp_validate", {}, -1, PUT)); REQUIRE_NOTHROW(proxy.Call("udp_validate", {}, -1, PUT));
} }
TEST_CASE("tengiga", "[.cmd][.new]") { TEST_CASE("tengiga", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -1726,7 +1758,7 @@ TEST_CASE("tengiga", "[.cmd][.new]") {
} }
} }
TEST_CASE("flowcontrol10g", "[.cmd][.new]") { TEST_CASE("flowcontrol10g", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1756,7 +1788,7 @@ TEST_CASE("flowcontrol10g", "[.cmd][.new]") {
} }
} }
TEST_CASE("txndelay_frame", "[.cmd][.new]") { TEST_CASE("txndelay_frame", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1785,7 +1817,7 @@ TEST_CASE("txndelay_frame", "[.cmd][.new]") {
/* ZMQ Streaming Parameters (Receiver<->Client) */ /* ZMQ Streaming Parameters (Receiver<->Client) */
TEST_CASE("zmqport", "[.cmd][.new]") { TEST_CASE("zmqport", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -1833,7 +1865,7 @@ TEST_CASE("zmqport", "[.cmd][.new]") {
} }
} }
TEST_CASE("zmqip", "[.cmd][.new]") { TEST_CASE("zmqip", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
std::ostringstream oss1, oss2; std::ostringstream oss1, oss2;
@ -1849,7 +1881,7 @@ TEST_CASE("zmqip", "[.cmd][.new]") {
} }
} }
TEST_CASE("zmqhwm", "[.cmd][.new]") { TEST_CASE("zmqhwm", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getClientZmqHwm(); auto prev_val = det.getClientZmqHwm();
@ -1878,7 +1910,7 @@ TEST_CASE("zmqhwm", "[.cmd][.new]") {
/* Advanced */ /* Advanced */
TEST_CASE("programfpga", "[.cmd][.new]") { TEST_CASE("programfpga", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1894,7 +1926,7 @@ TEST_CASE("programfpga", "[.cmd][.new]") {
} }
} }
TEST_CASE("resetfpga", "[.cmd][.new]") { TEST_CASE("resetfpga", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1910,7 +1942,7 @@ TEST_CASE("resetfpga", "[.cmd][.new]") {
} }
} }
TEST_CASE("copydetectorserver", "[.cmd][.new]") { TEST_CASE("copydetectorserver", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1929,7 +1961,7 @@ TEST_CASE("copydetectorserver", "[.cmd][.new]") {
} }
} }
TEST_CASE("rebootcontroller", "[.cmd][.new]") { TEST_CASE("rebootcontroller", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1945,7 +1977,7 @@ TEST_CASE("rebootcontroller", "[.cmd][.new]") {
} }
} }
TEST_CASE("update", "[.cmd][.new]") { TEST_CASE("update", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -1963,7 +1995,7 @@ TEST_CASE("update", "[.cmd][.new]") {
} }
} }
TEST_CASE("reg", "[.cmd][.new]") { TEST_CASE("reg", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2006,7 +2038,7 @@ TEST_CASE("adcreg", "[.cmd]") {
} }
} }
TEST_CASE("setbit", "[.cmd][.new]") { TEST_CASE("setbit", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2028,7 +2060,7 @@ TEST_CASE("setbit", "[.cmd][.new]") {
} }
} }
TEST_CASE("clearbit", "[.cmd][.new]") { TEST_CASE("clearbit", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2050,7 +2082,7 @@ TEST_CASE("clearbit", "[.cmd][.new]") {
} }
} }
TEST_CASE("getbit", "[.cmd][.new]") { TEST_CASE("getbit", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2074,7 +2106,7 @@ TEST_CASE("getbit", "[.cmd][.new]") {
} }
} }
TEST_CASE("firmwaretest", "[.cmd][.new]") { TEST_CASE("firmwaretest", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2091,7 +2123,7 @@ TEST_CASE("firmwaretest", "[.cmd][.new]") {
} }
} }
TEST_CASE("bustest", "[.cmd][.new]") { TEST_CASE("bustest", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2108,7 +2140,7 @@ TEST_CASE("bustest", "[.cmd][.new]") {
} }
} }
TEST_CASE("initialchecks", "[.cmd][.new]") { TEST_CASE("initialchecks", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto check = det.getInitialChecks(); auto check = det.getInitialChecks();
@ -2130,7 +2162,7 @@ TEST_CASE("initialchecks", "[.cmd][.new]") {
det.setInitialChecks(check); det.setInitialChecks(check);
} }
TEST_CASE("adcinvert", "[.cmd][.new]") { TEST_CASE("adcinvert", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2158,7 +2190,7 @@ TEST_CASE("adcinvert", "[.cmd][.new]") {
/* Insignificant */ /* Insignificant */
TEST_CASE("port", "[.cmd][.new]") { TEST_CASE("port", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getControlPort({0}).squash(); auto prev_val = det.getControlPort({0}).squash();
@ -2175,7 +2207,7 @@ TEST_CASE("port", "[.cmd][.new]") {
det.setControlPort(prev_val, {0}); det.setControlPort(prev_val, {0});
} }
TEST_CASE("stopport", "[.cmd][.new]") { TEST_CASE("stopport", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getStopPort({0}).squash(); auto prev_val = det.getStopPort({0}).squash();
@ -2192,7 +2224,7 @@ TEST_CASE("stopport", "[.cmd][.new]") {
det.setStopPort(prev_val, {0}); det.setStopPort(prev_val, {0});
} }
TEST_CASE("lock", "[.cmd][.new]") { TEST_CASE("lock", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto prev_val = det.getDetectorLock(); auto prev_val = det.getDetectorLock();
@ -2216,13 +2248,13 @@ TEST_CASE("lock", "[.cmd][.new]") {
} }
} }
TEST_CASE("execcommand", "[.cmd][.new]") { TEST_CASE("execcommand", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("execcommand", {"ls"}, -1, PUT)); REQUIRE_NOTHROW(proxy.Call("execcommand", {"ls"}, -1, PUT));
} }
TEST_CASE("framecounter", "[.cmd][.new]") { TEST_CASE("framecounter", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
@ -2240,7 +2272,7 @@ TEST_CASE("framecounter", "[.cmd][.new]") {
} }
} }
TEST_CASE("runtime", "[.cmd][.new]") { TEST_CASE("runtime", "[.cmd]") {
// TODO! can we test this? // TODO! can we test this?
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -2258,7 +2290,7 @@ TEST_CASE("runtime", "[.cmd][.new]") {
} }
} }
TEST_CASE("frametime", "[.cmd][.new]") { TEST_CASE("frametime", "[.cmd]") {
// TODO! can we test this? // TODO! can we test this?
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
@ -2276,7 +2308,7 @@ TEST_CASE("frametime", "[.cmd][.new]") {
} }
} }
TEST_CASE("user", "[.cmd][.new]") { TEST_CASE("user", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
proxy.Call("user", {}, -1, GET); proxy.Call("user", {}, -1, GET);

View File

@ -118,8 +118,8 @@ enum detFuncs {
F_GET_ADC_INVERT, F_GET_ADC_INVERT,
F_EXTERNAL_SAMPLING_SOURCE, F_EXTERNAL_SAMPLING_SOURCE,
F_EXTERNAL_SAMPLING, F_EXTERNAL_SAMPLING,
F_SET_STARTING_FRAME_NUMBER, F_SET_NEXT_FRAME_NUMBER,
F_GET_STARTING_FRAME_NUMBER, F_GET_NEXT_FRAME_NUMBER,
F_SET_QUAD, F_SET_QUAD,
F_GET_QUAD, F_GET_QUAD,
F_SET_INTERRUPT_SUBFRAME, F_SET_INTERRUPT_SUBFRAME,
@ -216,6 +216,7 @@ enum detFuncs {
F_GET_BURSTS_LEFT, F_GET_BURSTS_LEFT,
F_START_READOUT, F_START_READOUT,
F_SET_DEFAULT_DACS, F_SET_DEFAULT_DACS,
F_IS_VIRTUAL,
NUM_DET_FUNCTIONS, NUM_DET_FUNCTIONS,
RECEIVER_ENUM_START = 256, /**< detector function should not exceed this RECEIVER_ENUM_START = 256, /**< detector function should not exceed this
@ -439,8 +440,8 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_ADC_INVERT: return "F_GET_ADC_INVERT"; case F_GET_ADC_INVERT: return "F_GET_ADC_INVERT";
case F_EXTERNAL_SAMPLING_SOURCE: return "F_EXTERNAL_SAMPLING_SOURCE"; case F_EXTERNAL_SAMPLING_SOURCE: return "F_EXTERNAL_SAMPLING_SOURCE";
case F_EXTERNAL_SAMPLING: return "F_EXTERNAL_SAMPLING"; case F_EXTERNAL_SAMPLING: return "F_EXTERNAL_SAMPLING";
case F_SET_STARTING_FRAME_NUMBER: return "F_SET_STARTING_FRAME_NUMBER"; case F_SET_NEXT_FRAME_NUMBER: return "F_SET_NEXT_FRAME_NUMBER";
case F_GET_STARTING_FRAME_NUMBER: return "F_GET_STARTING_FRAME_NUMBER"; case F_GET_NEXT_FRAME_NUMBER: return "F_GET_NEXT_FRAME_NUMBER";
case F_SET_QUAD: return "F_SET_QUAD"; case F_SET_QUAD: return "F_SET_QUAD";
case F_GET_QUAD: return "F_GET_QUAD"; case F_GET_QUAD: return "F_GET_QUAD";
case F_SET_INTERRUPT_SUBFRAME: return "F_SET_INTERRUPT_SUBFRAME"; case F_SET_INTERRUPT_SUBFRAME: return "F_SET_INTERRUPT_SUBFRAME";
@ -537,6 +538,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_BURSTS_LEFT: return "F_GET_BURSTS_LEFT"; case F_GET_BURSTS_LEFT: return "F_GET_BURSTS_LEFT";
case F_START_READOUT: return "F_START_READOUT"; case F_START_READOUT: return "F_START_READOUT";
case F_SET_DEFAULT_DACS: return "F_SET_DEFAULT_DACS"; case F_SET_DEFAULT_DACS: return "F_SET_DEFAULT_DACS";
case F_IS_VIRTUAL: return "F_IS_VIRTUAL";
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS"; case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START"; case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";

View File

@ -3,10 +3,10 @@
#define APILIB 0x201102 #define APILIB 0x201102
#define APIRECEIVER 0x201102 #define APIRECEIVER 0x201102
#define APIGUI 0x201102 #define APIGUI 0x201102
#define APICTB 0x201110 #define APICTB 0x201116
#define APIGOTTHARD 0x201110 #define APIGOTTHARD 0x201116
#define APIGOTTHARD2 0x201110 #define APIGOTTHARD2 0x201116
#define APIJUNGFRAU 0x201110 #define APIJUNGFRAU 0x201116
#define APIMYTHEN3 0x201110 #define APIMYTHEN3 0x201116
#define APIMOENCH 0x201110 #define APIMOENCH 0x201116
#define APIEIGER 0x201110 #define APIEIGER 0x201116