mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
OutString for scanParameters
This commit is contained in:
@ -474,6 +474,13 @@ typedef struct {
|
||||
stepSize(step) {
|
||||
dacSettleTime_ns = t.count();
|
||||
}
|
||||
bool operator==(const scanParameters &other) const {
|
||||
return ((enable == other.enable) && (dacInd == other.dacInd) &&
|
||||
(startOffset == other.startOffset) &&
|
||||
(stopOffset == other.stopOffset) &&
|
||||
(stepSize == other.stepSize) &&
|
||||
(dacSettleTime_ns == other.dacSettleTime_ns));
|
||||
}
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
|
@ -49,4 +49,26 @@ TEST_CASE("assign module", "[support]") {
|
||||
CHECK(m3.reg == 500);
|
||||
CHECK(m3.iodelay == 750);
|
||||
CHECK(m3.nchan == 256 * 256 * 4);
|
||||
}
|
||||
|
||||
TEST_CASE("default construct scanParameters"){
|
||||
slsDetectorDefs::scanParameters p;
|
||||
CHECK(p.dacSettleTime_ns == 0);
|
||||
CHECK(p.dacInd == slsDetectorDefs::DAC_0);
|
||||
CHECK(p.enable == 0);
|
||||
CHECK(p.startOffset == 0);
|
||||
CHECK(p.stopOffset == 0);
|
||||
CHECK(p.stepSize == 0);
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("compare two scanParameters"){
|
||||
slsDetectorDefs::scanParameters p0;
|
||||
slsDetectorDefs::scanParameters p1;
|
||||
|
||||
CHECK(p0 == p1);
|
||||
|
||||
p0.enable = 1;
|
||||
CHECK_FALSE(p0 == p1);
|
||||
|
||||
}
|
Reference in New Issue
Block a user