This commit is contained in:
Erik Frojdh 2020-07-27 08:53:10 +02:00
parent 097acf8086
commit b1a4723028
2 changed files with 165 additions and 165 deletions

View File

@ -58,7 +58,7 @@ void Module::freeSharedMemory() {
} }
} }
bool Module::isFixedPatternSharedMemoryCompatible() { bool Module::isFixedPatternSharedMemoryCompatible() const {
return (shm()->shmversion >= SLS_SHMAPIVERSION); return (shm()->shmversion >= SLS_SHMAPIVERSION);
} }
@ -84,15 +84,15 @@ void Module::setHostname(const std::string &hostname,
} }
} }
int64_t Module::getFirmwareVersion() { int64_t Module::getFirmwareVersion() const {
return sendToDetector<int64_t>(F_GET_FIRMWARE_VERSION); return sendToDetector<int64_t>(F_GET_FIRMWARE_VERSION);
} }
int64_t Module::getDetectorServerVersion() { int64_t Module::getDetectorServerVersion() const {
return sendToDetector<int64_t>(F_GET_SERVER_VERSION); return sendToDetector<int64_t>(F_GET_SERVER_VERSION);
} }
int64_t Module::getSerialNumber() { int64_t Module::getSerialNumber() const {
return sendToDetector<int64_t>(F_GET_SERIAL_NUMBER); return sendToDetector<int64_t>(F_GET_SERIAL_NUMBER);
} }
@ -145,7 +145,7 @@ void Module::updateNumberOfDetector(slsDetectorDefs::xy det) {
sendToDetector(F_SET_POSITION, args, nullptr); sendToDetector(F_SET_POSITION, args, nullptr);
} }
slsDetectorDefs::detectorSettings Module::getSettings() { slsDetectorDefs::detectorSettings Module::getSettings() const {
auto r = sendToDetector<int>(F_SET_SETTINGS, GET_FLAG); auto r = sendToDetector<int>(F_SET_SETTINGS, GET_FLAG);
return static_cast<detectorSettings>(r); return static_cast<detectorSettings>(r);
} }
@ -179,7 +179,7 @@ void Module::loadSettingsFile(const std::string &fname) {
setModule(myMod); setModule(myMod);
} }
int Module::getAllTrimbits() { int Module::getAllTrimbits() const {
return sendToDetector<int>(F_SET_ALL_TRIMBITS, GET_FLAG); return sendToDetector<int>(F_SET_ALL_TRIMBITS, GET_FLAG);
} }
@ -187,7 +187,7 @@ void Module::setAllTrimbits(int val) {
sendToDetector<int>(F_SET_ALL_TRIMBITS, val); sendToDetector<int>(F_SET_ALL_TRIMBITS, val);
} }
int64_t Module::getNumberOfFrames() { int64_t Module::getNumberOfFrames() const{
return sendToDetector<int64_t>(F_GET_NUM_FRAMES); return sendToDetector<int64_t>(F_GET_NUM_FRAMES);
} }
@ -198,7 +198,7 @@ void Module::setNumberOfFrames(int64_t value) {
} }
} }
int64_t Module::getNumberOfTriggers() { int64_t Module::getNumberOfTriggers() const{
return sendToDetector<int64_t>(F_GET_NUM_TRIGGERS); return sendToDetector<int64_t>(F_GET_NUM_TRIGGERS);
} }
@ -209,7 +209,7 @@ void Module::setNumberOfTriggers(int64_t value) {
} }
} }
int64_t Module::getExptime(int gateIndex) { int64_t Module::getExptime(int gateIndex) const{
return sendToDetector<int64_t>(F_GET_EXPTIME, gateIndex); return sendToDetector<int64_t>(F_GET_EXPTIME, gateIndex);
} }
@ -228,7 +228,7 @@ void Module::setExptime(int gateIndex, int64_t value) {
} }
} }
int64_t Module::getPeriod() { return sendToDetector<int64_t>(F_GET_PERIOD); } int64_t Module::getPeriod() const { return sendToDetector<int64_t>(F_GET_PERIOD); }
void Module::setPeriod(int64_t value) { void Module::setPeriod(int64_t value) {
sendToDetector(F_SET_PERIOD, value, nullptr); sendToDetector(F_SET_PERIOD, value, nullptr);
@ -237,7 +237,7 @@ void Module::setPeriod(int64_t value) {
} }
} }
int64_t Module::getDelayAfterTrigger() { int64_t Module::getDelayAfterTrigger() const {
return sendToDetector<int64_t>(F_GET_DELAY_AFTER_TRIGGER); return sendToDetector<int64_t>(F_GET_DELAY_AFTER_TRIGGER);
} }
@ -261,7 +261,7 @@ int64_t Module::getPeriodLeft() const {
return sendToDetectorStop<int64_t>(F_GET_PERIOD_LEFT); return sendToDetectorStop<int64_t>(F_GET_PERIOD_LEFT);
} }
int Module::getDynamicRange() { int Module::getDynamicRange() const {
return sendToDetector<int>(F_SET_DYNAMIC_RANGE, GET_FLAG); return sendToDetector<int>(F_SET_DYNAMIC_RANGE, GET_FLAG);
} }
@ -293,7 +293,7 @@ void Module::setDynamicRange(int n) {
} }
} }
slsDetectorDefs::timingMode Module::getTimingMode() { slsDetectorDefs::timingMode Module::getTimingMode() const {
return sendToDetector<timingMode>(F_SET_TIMING_MODE, GET_FLAG); return sendToDetector<timingMode>(F_SET_TIMING_MODE, GET_FLAG);
} }
@ -304,7 +304,7 @@ void Module::setTimingMode(timingMode value) {
} }
} }
int Module::getClockDivider(int clkIndex) { int Module::getClockDivider(int clkIndex) const {
return sendToDetector<int>(F_GET_CLOCK_DIVIDER, clkIndex); return sendToDetector<int>(F_GET_CLOCK_DIVIDER, clkIndex);
} }
@ -313,7 +313,7 @@ void Module::setClockDivider(int clkIndex, int value) {
sendToDetector(F_SET_CLOCK_DIVIDER, args, nullptr); sendToDetector(F_SET_CLOCK_DIVIDER, args, nullptr);
} }
int Module::getClockPhase(int clkIndex, bool inDegrees) { int Module::getClockPhase(int clkIndex, bool inDegrees) const {
int args[]{clkIndex, static_cast<int>(inDegrees)}; int args[]{clkIndex, static_cast<int>(inDegrees)};
return sendToDetector<int>(F_GET_CLOCK_PHASE, args); return sendToDetector<int>(F_GET_CLOCK_PHASE, args);
} }
@ -323,11 +323,11 @@ void Module::setClockPhase(int clkIndex, int value, bool inDegrees) {
sendToDetector(F_SET_CLOCK_PHASE, args, nullptr); sendToDetector(F_SET_CLOCK_PHASE, args, nullptr);
} }
int Module::getMaxClockPhaseShift(int clkIndex) { int Module::getMaxClockPhaseShift(int clkIndex) const{
return sendToDetector<int>(F_GET_MAX_CLOCK_PHASE_SHIFT, clkIndex); return sendToDetector<int>(F_GET_MAX_CLOCK_PHASE_SHIFT, clkIndex);
} }
int Module::getClockFrequency(int clkIndex) { int Module::getClockFrequency(int clkIndex) const {
return sendToDetector<int>(F_GET_CLOCK_FREQUENCY, clkIndex); return sendToDetector<int>(F_GET_CLOCK_FREQUENCY, clkIndex);
} }
@ -336,7 +336,7 @@ void Module::setClockFrequency(int clkIndex, int value) {
sendToDetector(F_SET_CLOCK_FREQUENCY, args, nullptr); sendToDetector(F_SET_CLOCK_FREQUENCY, args, nullptr);
} }
int Module::getDAC(dacIndex index, bool mV) { int Module::getDAC(dacIndex index, bool mV) const {
int args[]{static_cast<int>(index), static_cast<int>(mV), GET_FLAG}; int args[]{static_cast<int>(index), static_cast<int>(mV), GET_FLAG};
return sendToDetector<int>(F_SET_DAC, args); return sendToDetector<int>(F_SET_DAC, args);
} }
@ -346,7 +346,7 @@ void Module::setDAC(int val, dacIndex index, bool mV) {
sendToDetector<int>(F_SET_DAC, args); sendToDetector<int>(F_SET_DAC, args);
} }
bool Module::getPowerChip() { bool Module::getPowerChip() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return sendToDetector<int>(F_POWER_CHIP, arg); return sendToDetector<int>(F_POWER_CHIP, arg);
} }
@ -355,7 +355,7 @@ void Module::setPowerChip(bool on) {
sendToDetector<int>(F_POWER_CHIP, static_cast<int>(on)); sendToDetector<int>(F_POWER_CHIP, static_cast<int>(on));
} }
int Module::getImageTestMode() { int Module::getImageTestMode() const {
return sendToDetector<int>(F_GET_IMAGE_TEST_MODE); return sendToDetector<int>(F_GET_IMAGE_TEST_MODE);
} }
@ -363,11 +363,11 @@ void Module::setImageTestMode(const int value) {
sendToDetector(F_SET_IMAGE_TEST_MODE, value, nullptr); sendToDetector(F_SET_IMAGE_TEST_MODE, value, nullptr);
} }
int Module::getADC(dacIndex index) { int Module::getADC(dacIndex index) const {
return sendToDetectorStop<int>(F_GET_ADC, static_cast<int>(index)); return sendToDetectorStop<int>(F_GET_ADC, static_cast<int>(index));
} }
int Module::getOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex) { int Module::getOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex) const {
int args[]{static_cast<int>(index), chipIndex}; int args[]{static_cast<int>(index), chipIndex};
return sendToDetector<int>(F_GET_ON_CHIP_DAC, args); return sendToDetector<int>(F_GET_ON_CHIP_DAC, args);
} }
@ -379,7 +379,7 @@ void Module::setOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex,
} }
slsDetectorDefs::externalSignalFlag slsDetectorDefs::externalSignalFlag
Module::getExternalSignalFlags(int signalIndex) { Module::getExternalSignalFlags(int signalIndex) const {
return sendToDetector<slsDetectorDefs::externalSignalFlag>( return sendToDetector<slsDetectorDefs::externalSignalFlag>(
F_GET_EXTERNAL_SIGNAL_FLAG, signalIndex); F_GET_EXTERNAL_SIGNAL_FLAG, signalIndex);
} }
@ -473,7 +473,7 @@ 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() { uint64_t Module::getStartingFrameNumber() const {
return sendToDetector<uint64_t>(F_GET_STARTING_FRAME_NUMBER); return sendToDetector<uint64_t>(F_GET_STARTING_FRAME_NUMBER);
} }
@ -483,7 +483,7 @@ void Module::setStartingFrameNumber(uint64_t value) {
void Module::sendSoftwareTrigger() { sendToDetectorStop(F_SOFTWARE_TRIGGER); } void Module::sendSoftwareTrigger() { sendToDetectorStop(F_SOFTWARE_TRIGGER); }
defs::scanParameters Module::getScan() { defs::scanParameters Module::getScan() const {
return sendToDetector<defs::scanParameters>(F_GET_SCAN); return sendToDetector<defs::scanParameters>(F_GET_SCAN);
} }
@ -493,7 +493,7 @@ void Module::setScan(const defs::scanParameters t) {
setNumberOfFrames(retval); setNumberOfFrames(retval);
} }
std::string Module::getScanErrorMessage() { std::string Module::getScanErrorMessage() const {
char retval[MAX_STR_LENGTH]{}; char retval[MAX_STR_LENGTH]{};
sendToDetector(F_GET_SCAN_ERROR_MESSAGE, nullptr, retval); sendToDetector(F_GET_SCAN_ERROR_MESSAGE, nullptr, retval);
return retval; return retval;
@ -501,11 +501,11 @@ std::string Module::getScanErrorMessage() {
// Network Configuration (Detector<->Receiver) // Network Configuration (Detector<->Receiver)
int Module::getNumberofUDPInterfacesFromShm() { int Module::getNumberofUDPInterfacesFromShm() const{
return shm()->numUDPInterfaces; return shm()->numUDPInterfaces;
} }
int Module::getNumberofUDPInterfaces() { int Module::getNumberofUDPInterfaces() const{
shm()->numUDPInterfaces = sendToDetector<int>(F_GET_NUM_INTERFACES); shm()->numUDPInterfaces = sendToDetector<int>(F_GET_NUM_INTERFACES);
return shm()->numUDPInterfaces; return shm()->numUDPInterfaces;
} }
@ -518,7 +518,7 @@ void Module::setNumberofUDPInterfaces(int n) {
} }
} }
int Module::getSelectedUDPInterface() { int Module::getSelectedUDPInterface() const {
return sendToDetector<int>(F_GET_INTERFACE_SEL); return sendToDetector<int>(F_GET_INTERFACE_SEL);
} }
@ -526,7 +526,7 @@ void Module::selectUDPInterface(int n) {
sendToDetector(F_SET_INTERFACE_SEL, n, nullptr); sendToDetector(F_SET_INTERFACE_SEL, n, nullptr);
} }
sls::IpAddr Module::getSourceUDPIP() { sls::IpAddr Module::getSourceUDPIP() const {
return sendToDetector<sls::IpAddr>(F_GET_SOURCE_UDP_IP); return sendToDetector<sls::IpAddr>(F_GET_SOURCE_UDP_IP);
} }
@ -537,7 +537,7 @@ void Module::setSourceUDPIP(const IpAddr ip) {
sendToDetector(F_SET_SOURCE_UDP_IP, ip, nullptr); sendToDetector(F_SET_SOURCE_UDP_IP, ip, nullptr);
} }
sls::IpAddr Module::getSourceUDPIP2() { sls::IpAddr Module::getSourceUDPIP2() const{
return sendToDetector<sls::IpAddr>(F_GET_SOURCE_UDP_IP2); return sendToDetector<sls::IpAddr>(F_GET_SOURCE_UDP_IP2);
} }
@ -548,7 +548,7 @@ void Module::setSourceUDPIP2(const IpAddr ip) {
sendToDetector(F_SET_SOURCE_UDP_IP2, ip, nullptr); sendToDetector(F_SET_SOURCE_UDP_IP2, ip, nullptr);
} }
sls::MacAddr Module::getSourceUDPMAC() { sls::MacAddr Module::getSourceUDPMAC() const {
return sendToDetector<sls::MacAddr>(F_GET_SOURCE_UDP_MAC); return sendToDetector<sls::MacAddr>(F_GET_SOURCE_UDP_MAC);
} }
@ -559,7 +559,7 @@ void Module::setSourceUDPMAC(const sls::MacAddr mac) {
sendToDetector(F_SET_SOURCE_UDP_MAC, mac, nullptr); sendToDetector(F_SET_SOURCE_UDP_MAC, mac, nullptr);
} }
sls::MacAddr Module::getSourceUDPMAC2() { sls::MacAddr Module::getSourceUDPMAC2() const {
return sendToDetector<sls::MacAddr>(F_GET_SOURCE_UDP_MAC2); return sendToDetector<sls::MacAddr>(F_GET_SOURCE_UDP_MAC2);
} }
@ -570,7 +570,7 @@ void Module::setSourceUDPMAC2(const sls::MacAddr mac) {
sendToDetector(F_SET_SOURCE_UDP_MAC2, mac, nullptr); sendToDetector(F_SET_SOURCE_UDP_MAC2, mac, nullptr);
} }
sls::IpAddr Module::getDestinationUDPIP() { sls::IpAddr Module::getDestinationUDPIP() const {
return sendToDetector<sls::IpAddr>(F_GET_DEST_UDP_IP); return sendToDetector<sls::IpAddr>(F_GET_DEST_UDP_IP);
} }
@ -588,7 +588,7 @@ void Module::setDestinationUDPIP(const IpAddr ip) {
} }
} }
sls::IpAddr Module::getDestinationUDPIP2() { sls::IpAddr Module::getDestinationUDPIP2() const {
return sendToDetector<sls::IpAddr>(F_GET_DEST_UDP_IP2); return sendToDetector<sls::IpAddr>(F_GET_DEST_UDP_IP2);
} }
@ -608,7 +608,7 @@ void Module::setDestinationUDPIP2(const IpAddr ip) {
} }
} }
sls::MacAddr Module::getDestinationUDPMAC() { sls::MacAddr Module::getDestinationUDPMAC() const {
return sendToDetector<sls::MacAddr>(F_GET_DEST_UDP_MAC); return sendToDetector<sls::MacAddr>(F_GET_DEST_UDP_MAC);
} }
@ -619,7 +619,7 @@ void Module::setDestinationUDPMAC(const MacAddr mac) {
sendToDetector(F_SET_DEST_UDP_MAC, mac, nullptr); sendToDetector(F_SET_DEST_UDP_MAC, mac, nullptr);
} }
sls::MacAddr Module::getDestinationUDPMAC2() { sls::MacAddr Module::getDestinationUDPMAC2() const {
return sendToDetector<sls::MacAddr>(F_GET_DEST_UDP_MAC2); return sendToDetector<sls::MacAddr>(F_GET_DEST_UDP_MAC2);
} }
@ -630,7 +630,7 @@ void Module::setDestinationUDPMAC2(const MacAddr mac) {
sendToDetector(F_SET_DEST_UDP_MAC2, mac, nullptr); sendToDetector(F_SET_DEST_UDP_MAC2, mac, nullptr);
} }
int Module::getDestinationUDPPort() { int Module::getDestinationUDPPort() const {
return sendToDetector<int>(F_GET_DEST_UDP_PORT); return sendToDetector<int>(F_GET_DEST_UDP_PORT);
} }
@ -641,7 +641,7 @@ void Module::setDestinationUDPPort(const int port) {
} }
} }
int Module::getDestinationUDPPort2() { int Module::getDestinationUDPPort2() const{
return sendToDetector<int>(F_GET_DEST_UDP_PORT2); return sendToDetector<int>(F_GET_DEST_UDP_PORT2);
} }
@ -680,7 +680,7 @@ std::string Module::printReceiverConfiguration() {
return os.str(); return os.str();
} }
bool Module::getTenGiga() { bool Module::getTenGiga() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return static_cast<bool>(sendToDetector<int>(F_ENABLE_TEN_GIGA, arg)); return static_cast<bool>(sendToDetector<int>(F_ENABLE_TEN_GIGA, arg));
} }
@ -695,7 +695,7 @@ void Module::setTenGiga(bool value) {
} }
} }
bool Module::getTenGigaFlowControl() { bool Module::getTenGigaFlowControl() const {
return sendToDetector<int>(F_GET_TEN_GIGA_FLOW_CONTROL); return sendToDetector<int>(F_GET_TEN_GIGA_FLOW_CONTROL);
} }
@ -704,7 +704,7 @@ void Module::setTenGigaFlowControl(bool enable) {
sendToDetector(F_SET_TEN_GIGA_FLOW_CONTROL, arg, nullptr); sendToDetector(F_SET_TEN_GIGA_FLOW_CONTROL, arg, nullptr);
} }
int Module::getTransmissionDelayFrame() { int Module::getTransmissionDelayFrame() const {
return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_FRAME); return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_FRAME);
} }
@ -712,7 +712,7 @@ void Module::setTransmissionDelayFrame(int value) {
sendToDetector(F_SET_TRANSMISSION_DELAY_FRAME, value, nullptr); sendToDetector(F_SET_TRANSMISSION_DELAY_FRAME, value, nullptr);
} }
int Module::getTransmissionDelayLeft() { int Module::getTransmissionDelayLeft() const {
return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_LEFT); return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_LEFT);
} }
@ -720,7 +720,7 @@ void Module::setTransmissionDelayLeft(int value) {
sendToDetector(F_SET_TRANSMISSION_DELAY_LEFT, value, nullptr); sendToDetector(F_SET_TRANSMISSION_DELAY_LEFT, value, nullptr);
} }
int Module::getTransmissionDelayRight() { int Module::getTransmissionDelayRight() const {
return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_RIGHT); return sendToDetector<int>(F_GET_TRANSMISSION_DELAY_RIGHT);
} }
@ -818,7 +818,7 @@ int Module::setReceiverPort(int port_number) {
return shm()->rxTCPPort; return shm()->rxTCPPort;
} }
int Module::getReceiverFifoDepth() { int Module::getReceiverFifoDepth() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return sendToReceiver<int>(F_SET_RECEIVER_FIFO_DEPTH, arg); return sendToReceiver<int>(F_SET_RECEIVER_FIFO_DEPTH, arg);
} }
@ -827,7 +827,7 @@ void Module::setReceiverFifoDepth(int n_frames) {
sendToReceiver<int>(F_SET_RECEIVER_FIFO_DEPTH, n_frames); sendToReceiver<int>(F_SET_RECEIVER_FIFO_DEPTH, n_frames);
} }
bool Module::getReceiverSilentMode() { bool Module::getReceiverSilentMode() const {
return sendToReceiver<int>(F_GET_RECEIVER_SILENT_MODE); return sendToReceiver<int>(F_GET_RECEIVER_SILENT_MODE);
} }
@ -836,7 +836,7 @@ void Module::setReceiverSilentMode(bool enable) {
nullptr); nullptr);
} }
slsDetectorDefs::frameDiscardPolicy Module::getReceiverFramesDiscardPolicy() { slsDetectorDefs::frameDiscardPolicy Module::getReceiverFramesDiscardPolicy() const {
return static_cast<frameDiscardPolicy>( return static_cast<frameDiscardPolicy>(
sendToReceiver<int>(F_GET_RECEIVER_DISCARD_POLICY)); sendToReceiver<int>(F_GET_RECEIVER_DISCARD_POLICY));
} }
@ -845,7 +845,7 @@ void Module::setReceiverFramesDiscardPolicy(frameDiscardPolicy f) {
sendToReceiver(F_SET_RECEIVER_DISCARD_POLICY, static_cast<int>(f), nullptr); sendToReceiver(F_SET_RECEIVER_DISCARD_POLICY, static_cast<int>(f), nullptr);
} }
bool Module::getPartialFramesPadding() { bool Module::getPartialFramesPadding() const {
return sendToReceiver<int>(F_GET_RECEIVER_PADDING); return sendToReceiver<int>(F_GET_RECEIVER_PADDING);
} }
@ -866,7 +866,7 @@ void Module::setReceiverUDPSocketBufferSize(int64_t udpsockbufsize) {
sendToReceiver<int64_t>(F_RECEIVER_UDP_SOCK_BUF_SIZE, udpsockbufsize); sendToReceiver<int64_t>(F_RECEIVER_UDP_SOCK_BUF_SIZE, udpsockbufsize);
} }
bool Module::getReceiverLock() { bool Module::getReceiverLock() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return static_cast<bool>(sendToReceiver<int>(F_LOCK_RECEIVER, arg)); return static_cast<bool>(sendToReceiver<int>(F_LOCK_RECEIVER, arg));
} }
@ -886,7 +886,7 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Module::getReceiverThreadIds() const {
// File // File
slsDetectorDefs::fileFormat Module::getFileFormat() { slsDetectorDefs::fileFormat Module::getFileFormat() const{
return static_cast<fileFormat>( return static_cast<fileFormat>(
sendToReceiver<int>(F_GET_RECEIVER_FILE_FORMAT)); sendToReceiver<int>(F_GET_RECEIVER_FILE_FORMAT));
} }
@ -895,7 +895,7 @@ void Module::setFileFormat(fileFormat f) {
sendToReceiver(F_SET_RECEIVER_FILE_FORMAT, static_cast<int>(f), nullptr); sendToReceiver(F_SET_RECEIVER_FILE_FORMAT, static_cast<int>(f), nullptr);
} }
std::string Module::getFilePath() { std::string Module::getFilePath() const {
char ret[MAX_STR_LENGTH]{}; char ret[MAX_STR_LENGTH]{};
sendToReceiver(F_GET_RECEIVER_FILE_PATH, nullptr, ret); sendToReceiver(F_GET_RECEIVER_FILE_PATH, nullptr, ret);
return ret; return ret;
@ -910,7 +910,7 @@ void Module::setFilePath(const std::string &path) {
sendToReceiver(F_SET_RECEIVER_FILE_PATH, args, nullptr); sendToReceiver(F_SET_RECEIVER_FILE_PATH, args, nullptr);
} }
std::string Module::getFileName() { std::string Module::getFileName() const {
char retvals[MAX_STR_LENGTH]{}; char retvals[MAX_STR_LENGTH]{};
sendToReceiver(F_GET_RECEIVER_FILE_NAME, nullptr, retvals); sendToReceiver(F_GET_RECEIVER_FILE_NAME, nullptr, retvals);
return std::string(retvals); return std::string(retvals);
@ -925,7 +925,7 @@ void Module::setFileName(const std::string &fname) {
sendToReceiver(F_SET_RECEIVER_FILE_NAME, args, nullptr); sendToReceiver(F_SET_RECEIVER_FILE_NAME, args, nullptr);
} }
int64_t Module::getFileIndex() { int64_t Module::getFileIndex() const {
return sendToReceiver<int64_t>(F_GET_RECEIVER_FILE_INDEX); return sendToReceiver<int64_t>(F_GET_RECEIVER_FILE_INDEX);
} }
@ -935,7 +935,7 @@ void Module::setFileIndex(int64_t file_index) {
void Module::incrementFileIndex() { sendToReceiver(F_INCREMENT_FILE_INDEX); } void Module::incrementFileIndex() { sendToReceiver(F_INCREMENT_FILE_INDEX); }
bool Module::getFileWrite() { bool Module::getFileWrite() const {
return sendToReceiver<int>(F_GET_RECEIVER_FILE_WRITE); return sendToReceiver<int>(F_GET_RECEIVER_FILE_WRITE);
} }
@ -943,7 +943,7 @@ void Module::setFileWrite(bool value) {
sendToReceiver(F_SET_RECEIVER_FILE_WRITE, static_cast<int>(value), nullptr); sendToReceiver(F_SET_RECEIVER_FILE_WRITE, static_cast<int>(value), nullptr);
} }
bool Module::getMasterFileWrite() { bool Module::getMasterFileWrite() const {
return sendToReceiver<int>(F_GET_RECEIVER_MASTER_FILE_WRITE); return sendToReceiver<int>(F_GET_RECEIVER_MASTER_FILE_WRITE);
} }
@ -952,7 +952,7 @@ void Module::setMasterFileWrite(bool value) {
nullptr); nullptr);
} }
bool Module::getFileOverWrite() { bool Module::getFileOverWrite() const {
return sendToReceiver<int>(F_GET_RECEIVER_OVERWRITE); return sendToReceiver<int>(F_GET_RECEIVER_OVERWRITE);
} }
@ -960,7 +960,7 @@ void Module::setFileOverWrite(bool value) {
sendToReceiver(F_SET_RECEIVER_OVERWRITE, static_cast<int>(value), nullptr); sendToReceiver(F_SET_RECEIVER_OVERWRITE, static_cast<int>(value), nullptr);
} }
int Module::getFramesPerFile() { int Module::getFramesPerFile() const {
return sendToReceiver<int>(F_GET_RECEIVER_FRAMES_PER_FILE); return sendToReceiver<int>(F_GET_RECEIVER_FRAMES_PER_FILE);
} }
@ -970,7 +970,7 @@ void Module::setFramesPerFile(int n_frames) {
// ZMQ Streaming Parameters (Receiver<->Client) // ZMQ Streaming Parameters (Receiver<->Client)
bool Module::getReceiverStreaming() { bool Module::getReceiverStreaming() const {
return sendToReceiver<int>(F_GET_RECEIVER_STREAMING); return sendToReceiver<int>(F_GET_RECEIVER_STREAMING);
} }
@ -978,7 +978,7 @@ void Module::setReceiverStreaming(bool enable) {
sendToReceiver(F_SET_RECEIVER_STREAMING, static_cast<int>(enable), nullptr); sendToReceiver(F_SET_RECEIVER_STREAMING, static_cast<int>(enable), nullptr);
} }
int Module::getReceiverStreamingFrequency() { int Module::getReceiverStreamingFrequency() const {
return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_FREQUENCY); return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_FREQUENCY);
} }
@ -990,7 +990,7 @@ void Module::setReceiverStreamingFrequency(int freq) {
sendToReceiver(F_SET_RECEIVER_STREAMING_FREQUENCY, freq, nullptr); sendToReceiver(F_SET_RECEIVER_STREAMING_FREQUENCY, freq, nullptr);
} }
int Module::getReceiverStreamingTimer() { int Module::getReceiverStreamingTimer() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return sendToReceiver<int>(F_RECEIVER_STREAMING_TIMER, arg); return sendToReceiver<int>(F_RECEIVER_STREAMING_TIMER, arg);
} }
@ -999,7 +999,7 @@ void Module::setReceiverStreamingTimer(int time_in_ms) {
sendToReceiver<int>(F_RECEIVER_STREAMING_TIMER, time_in_ms); sendToReceiver<int>(F_RECEIVER_STREAMING_TIMER, time_in_ms);
} }
int Module::getReceiverStreamingStartingFrame() { int Module::getReceiverStreamingStartingFrame() const {
return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_START_FNUM); return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_START_FNUM);
} }
@ -1011,7 +1011,7 @@ void Module::setReceiverStreamingStartingFrame(int fnum) {
sendToReceiver(F_SET_RECEIVER_STREAMING_START_FNUM, fnum, nullptr); sendToReceiver(F_SET_RECEIVER_STREAMING_START_FNUM, fnum, nullptr);
} }
int Module::getReceiverStreamingPort() { int Module::getReceiverStreamingPort() const {
return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_PORT); return sendToReceiver<int>(F_GET_RECEIVER_STREAMING_PORT);
} }
@ -1019,7 +1019,7 @@ void Module::setReceiverStreamingPort(int port) {
sendToReceiver(F_SET_RECEIVER_STREAMING_PORT, port, nullptr); sendToReceiver(F_SET_RECEIVER_STREAMING_PORT, port, nullptr);
} }
sls::IpAddr Module::getReceiverStreamingIP() { sls::IpAddr Module::getReceiverStreamingIP() const {
return sendToReceiver<sls::IpAddr>(F_GET_RECEIVER_STREAMING_SRC_IP); return sendToReceiver<sls::IpAddr>(F_GET_RECEIVER_STREAMING_SRC_IP);
} }
@ -1034,11 +1034,11 @@ void Module::setReceiverStreamingIP(const sls::IpAddr ip) {
sendToReceiver(F_SET_RECEIVER_STREAMING_SRC_IP, ip, nullptr); sendToReceiver(F_SET_RECEIVER_STREAMING_SRC_IP, ip, nullptr);
} }
int Module::getClientStreamingPort() { return shm()->zmqport; } int Module::getClientStreamingPort() const { return shm()->zmqport; }
void Module::setClientStreamingPort(int port) { shm()->zmqport = port; } void Module::setClientStreamingPort(int port) { shm()->zmqport = port; }
sls::IpAddr Module::getClientStreamingIP() { return shm()->zmqip; } sls::IpAddr Module::getClientStreamingIP() const { return shm()->zmqip; }
void Module::setClientStreamingIP(const sls::IpAddr ip) { void Module::setClientStreamingIP(const sls::IpAddr ip) {
if (ip == 0) { if (ip == 0) {
@ -1049,7 +1049,7 @@ void Module::setClientStreamingIP(const sls::IpAddr ip) {
// Eiger Specific // Eiger Specific
int64_t Module::getSubExptime() { int64_t Module::getSubExptime() const {
return sendToDetector<int64_t>(F_GET_SUB_EXPTIME); return sendToDetector<int64_t>(F_GET_SUB_EXPTIME);
} }
@ -1067,7 +1067,7 @@ void Module::setSubExptime(int64_t value) {
} }
} }
int64_t Module::getSubDeadTime() { int64_t Module::getSubDeadTime() const {
return sendToDetector<int64_t>(F_GET_SUB_DEADTIME); return sendToDetector<int64_t>(F_GET_SUB_DEADTIME);
} }
@ -1078,7 +1078,7 @@ void Module::setSubDeadTime(int64_t value) {
} }
} }
int Module::getThresholdEnergy() { int Module::getThresholdEnergy() const {
// moench - get threshold energy from json header // moench - get threshold energy from json header
if (shm()->myDetectorType == MOENCH) { if (shm()->myDetectorType == MOENCH) {
getAdditionalJsonHeader(); getAdditionalJsonHeader();
@ -1110,14 +1110,14 @@ void Module::setThresholdEnergy(int e_eV, detectorSettings isettings,
} }
} }
std::string Module::getSettingsDir() { return std::string(shm()->settingsDir); } std::string Module::getSettingsDir() const { return std::string(shm()->settingsDir); }
std::string Module::setSettingsDir(const std::string &dir) { std::string Module::setSettingsDir(const std::string &dir) {
sls::strcpy_safe(shm()->settingsDir, dir.c_str()); sls::strcpy_safe(shm()->settingsDir, dir.c_str());
return shm()->settingsDir; return shm()->settingsDir;
} }
bool Module::getParallelMode() { bool Module::getParallelMode() const {
auto r = sendToDetector<int>(F_GET_PARALLEL_MODE); auto r = sendToDetector<int>(F_GET_PARALLEL_MODE);
return static_cast<bool>(r); return static_cast<bool>(r);
} }
@ -1126,7 +1126,7 @@ void Module::setParallelMode(const bool enable) {
sendToDetector(F_SET_PARALLEL_MODE, static_cast<int>(enable), nullptr); sendToDetector(F_SET_PARALLEL_MODE, static_cast<int>(enable), nullptr);
} }
bool Module::getOverFlowMode() { bool Module::getOverFlowMode() const {
auto r = sendToDetector<int>(F_GET_OVERFLOW_MODE); auto r = sendToDetector<int>(F_GET_OVERFLOW_MODE);
return static_cast<bool>(r); return static_cast<bool>(r);
} }
@ -1136,7 +1136,7 @@ void Module::setOverFlowMode(const bool enable) {
sendToDetector(F_SET_OVERFLOW_MODE, arg, nullptr); sendToDetector(F_SET_OVERFLOW_MODE, arg, nullptr);
} }
bool Module::getFlippedDataX() { bool Module::getFlippedDataX() const {
return sendToReceiver<int>(F_SET_FLIPPED_DATA_RECEIVER, GET_FLAG); return sendToReceiver<int>(F_SET_FLIPPED_DATA_RECEIVER, GET_FLAG);
} }
@ -1144,7 +1144,7 @@ void Module::setFlippedDataX(bool value) {
sendToReceiver<int>(F_SET_FLIPPED_DATA_RECEIVER, static_cast<int>(value)); sendToReceiver<int>(F_SET_FLIPPED_DATA_RECEIVER, static_cast<int>(value));
} }
std::vector<int> Module::getTrimEn() { std::vector<int> Module::getTrimEn() const {
if (shm()->myDetectorType != EIGER) { if (shm()->myDetectorType != EIGER) {
throw RuntimeError("getTrimEn not implemented for this detector."); throw RuntimeError("getTrimEn not implemented for this detector.");
} }
@ -1167,7 +1167,7 @@ int Module::setTrimEn(const std::vector<int> &energies) {
return shm()->trimEnergies.size(); return shm()->trimEnergies.size();
} }
int64_t Module::getRateCorrection() { int64_t Module::getRateCorrection() const {
return sendToDetector<int64_t>(F_GET_RATE_CORRECT); return sendToDetector<int64_t>(F_GET_RATE_CORRECT);
} }
@ -1180,7 +1180,7 @@ void Module::setRateCorrection(int64_t t) {
sendToDetector(F_SET_RATE_CORRECT, t, nullptr); sendToDetector(F_SET_RATE_CORRECT, t, nullptr);
} }
int Module::getReadNLines() { return sendToDetector<int>(F_GET_READ_N_LINES); } int Module::getReadNLines() const { return sendToDetector<int>(F_GET_READ_N_LINES); }
void Module::setReadNLines(const int value) { void Module::setReadNLines(const int value) {
sendToDetector(F_SET_READ_N_LINES, value, nullptr); sendToDetector(F_SET_READ_N_LINES, value, nullptr);
@ -1189,7 +1189,7 @@ void Module::setReadNLines(const int value) {
} }
} }
bool Module::getInterruptSubframe() { bool Module::getInterruptSubframe() const {
auto r = sendToDetector<int>(F_GET_INTERRUPT_SUBFRAME); auto r = sendToDetector<int>(F_GET_INTERRUPT_SUBFRAME);
return static_cast<bool>(r); return static_cast<bool>(r);
} }
@ -1207,7 +1207,7 @@ int64_t Module::getMeasuredSubFramePeriod() const {
return sendToDetectorStop<int64_t>(F_GET_MEASURED_SUBPERIOD); return sendToDetectorStop<int64_t>(F_GET_MEASURED_SUBPERIOD);
} }
bool Module::getActivate() { bool Module::getActivate() const {
int arg = GET_FLAG; int arg = GET_FLAG;
auto retval = sendToDetector<int>(F_ACTIVATE, arg); auto retval = sendToDetector<int>(F_ACTIVATE, arg);
auto retval2 = sendToDetectorStop<int>(F_ACTIVATE, arg); auto retval2 = sendToDetectorStop<int>(F_ACTIVATE, arg);
@ -1229,7 +1229,7 @@ void Module::setActivate(const bool enable) {
} }
} }
bool Module::getDeactivatedRxrPaddingMode() { bool Module::getDeactivatedRxrPaddingMode() const {
return sendToReceiver<int>(F_GET_RECEIVER_DEACTIVATED_PADDING); return sendToReceiver<int>(F_GET_RECEIVER_DEACTIVATED_PADDING);
} }
@ -1238,7 +1238,7 @@ void Module::setDeactivatedRxrPaddingMode(bool padding) {
static_cast<int>(padding), nullptr); static_cast<int>(padding), nullptr);
} }
bool Module::getCounterBit() { bool Module::getCounterBit() const {
int arg = GET_FLAG; int arg = GET_FLAG;
return (!static_cast<bool>(sendToDetector<int>(F_SET_COUNTER_BIT, arg))); return (!static_cast<bool>(sendToDetector<int>(F_SET_COUNTER_BIT, arg)));
} }
@ -1261,7 +1261,7 @@ void Module::pulseChip(int n_pulses) {
sendToDetector(F_PULSE_CHIP, n_pulses, nullptr); sendToDetector(F_PULSE_CHIP, n_pulses, nullptr);
} }
bool Module::getQuad() { return sendToDetector<int>(F_GET_QUAD) != 0; } bool Module::getQuad() const { return sendToDetector<int>(F_GET_QUAD) != 0; }
void Module::setQuad(const bool enable) { void Module::setQuad(const bool enable) {
int value = enable ? 1 : 0; int value = enable ? 1 : 0;
@ -2142,7 +2142,7 @@ void Module::startPattern() { sendToDetector(F_START_PATTERN); }
// Moench // Moench
std::map<std::string, std::string> Module::getAdditionalJsonHeader() { std::map<std::string, std::string> Module::getAdditionalJsonHeader() const {
if (!shm()->useReceiverFlag) { if (!shm()->useReceiverFlag) {
throw RuntimeError("Set rx_hostname first to use receiver parameters " throw RuntimeError("Set rx_hostname first to use receiver parameters "
"(zmq json header)"); "(zmq json header)");
@ -2217,7 +2217,7 @@ void Module::setAdditionalJsonHeader(
} }
} }
std::string Module::getAdditionalJsonParameter(const std::string &key) { std::string Module::getAdditionalJsonParameter(const std::string &key) const {
char arg[SHORT_STR_LENGTH]{}; char arg[SHORT_STR_LENGTH]{};
sls::strcpy_safe(arg, key.c_str()); sls::strcpy_safe(arg, key.c_str());
char retval[SHORT_STR_LENGTH]{}; char retval[SHORT_STR_LENGTH]{};

View File

@ -78,7 +78,7 @@ class Module : public virtual slsDetectorDefs {
Safe to call only if detector shm also deleted or its numberOfDetectors is Safe to call only if detector shm also deleted or its numberOfDetectors is
updated */ updated */
void freeSharedMemory(); void freeSharedMemory();
bool isFixedPatternSharedMemoryCompatible(); bool isFixedPatternSharedMemoryCompatible() const;
std::string getHostname() const; std::string getHostname() const;
/** initialChecks is enable or disable initial compatibility checks and /** initialChecks is enable or disable initial compatibility checks and
@ -86,9 +86,9 @@ class Module : public virtual slsDetectorDefs {
users! */ users! */
void setHostname(const std::string &hostname, const bool initialChecks); void setHostname(const std::string &hostname, const bool initialChecks);
int64_t getFirmwareVersion(); int64_t getFirmwareVersion() const;
int64_t getDetectorServerVersion(); int64_t getDetectorServerVersion() const;
int64_t getSerialNumber(); int64_t getSerialNumber() const;
int64_t getReceiverSoftwareVersion() const; int64_t getReceiverSoftwareVersion() const;
static detectorType getTypeFromDetector(const std::string &hostname, static detectorType getTypeFromDetector(const std::string &hostname,
int cport = DEFAULT_PORTNO); int cport = DEFAULT_PORTNO);
@ -98,10 +98,10 @@ class Module : public virtual slsDetectorDefs {
void updateNumberOfChannels(); void updateNumberOfChannels();
slsDetectorDefs::xy getNumberOfChannels() const; slsDetectorDefs::xy getNumberOfChannels() const;
void updateNumberOfDetector(slsDetectorDefs::xy det); void updateNumberOfDetector(slsDetectorDefs::xy det);
detectorSettings getSettings(); detectorSettings getSettings() const;
void setSettings(detectorSettings isettings); void setSettings(detectorSettings isettings);
void loadSettingsFile(const std::string &fname); void loadSettingsFile(const std::string &fname);
int getAllTrimbits(); int getAllTrimbits() const;
void setAllTrimbits(int val); void setAllTrimbits(int val);
/************************************************** /**************************************************
@ -109,45 +109,45 @@ class Module : public virtual slsDetectorDefs {
* Acquisition Parameters * * Acquisition Parameters *
* * * *
* ************************************************/ * ************************************************/
int64_t getNumberOfFrames(); int64_t getNumberOfFrames() const;
void setNumberOfFrames(int64_t value); void setNumberOfFrames(int64_t value);
int64_t getNumberOfTriggers(); int64_t getNumberOfTriggers() const;
void setNumberOfTriggers(int64_t value); void setNumberOfTriggers(int64_t value);
/** [Mythen3] gatIndex: 0-2, [Others]: -1 always */ /** [Mythen3] gatIndex: 0-2, [Others]: -1 always */
int64_t getExptime(int gateIndex); int64_t getExptime(int gateIndex) const;
/** [Mythen3] gatIndex: -1 for all, 0-2, [Others]: -1 always */ /** [Mythen3] gatIndex: -1 for all, 0-2, [Others]: -1 always */
void setExptime(int gateIndex, int64_t value); void setExptime(int gateIndex, int64_t value);
int64_t getPeriod(); int64_t getPeriod() const;
void setPeriod(int64_t value); void setPeriod(int64_t value);
int64_t getDelayAfterTrigger(); int64_t getDelayAfterTrigger() const;
void setDelayAfterTrigger(int64_t value); void setDelayAfterTrigger(int64_t value);
int64_t getNumberOfFramesLeft() const; int64_t getNumberOfFramesLeft() const;
int64_t getNumberOfTriggersLeft() const; int64_t getNumberOfTriggersLeft() const;
int64_t getDelayAfterTriggerLeft() const; int64_t getDelayAfterTriggerLeft() const;
int64_t getPeriodLeft() const; int64_t getPeriodLeft() const;
int getDynamicRange(); int getDynamicRange() const;
void setDynamicRange(int n); void setDynamicRange(int n);
timingMode getTimingMode(); timingMode getTimingMode() const;
void setTimingMode(timingMode value); void setTimingMode(timingMode value);
int getClockDivider(int clkIndex); int getClockDivider(int clkIndex) const;
void setClockDivider(int clkIndex, int value); void setClockDivider(int clkIndex, int value);
int getClockPhase(int clkIndex, bool inDegrees); int getClockPhase(int clkIndex, bool inDegrees) const;
void setClockPhase(int clkIndex, int value, bool inDegrees); void setClockPhase(int clkIndex, int value, bool inDegrees);
int getMaxClockPhaseShift(int clkIndex); int getMaxClockPhaseShift(int clkIndex) const;
int getClockFrequency(int clkIndex); int getClockFrequency(int clkIndex) const;
void setClockFrequency(int clkIndex, int value); void setClockFrequency(int clkIndex, int value);
int getDAC(dacIndex index, bool mV); int getDAC(dacIndex index, bool mV) const;
void setDAC(int val, dacIndex index, bool mV); void setDAC(int val, dacIndex index, bool mV);
bool getPowerChip(); bool getPowerChip() const;
void setPowerChip(bool on); void setPowerChip(bool on);
int getImageTestMode(); int getImageTestMode() const;
void setImageTestMode(const int value); void setImageTestMode(const int value);
/* temperature in millidegrees */ /* temperature in millidegrees */
int getADC(dacIndex index); int getADC(dacIndex index) const;
int getOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex); int getOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex) const;
void setOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex, void setOnChipDAC(slsDetectorDefs::dacIndex index, int chipIndex,
int value); int value);
externalSignalFlag getExternalSignalFlags(int signalIndex); externalSignalFlag getExternalSignalFlags(int signalIndex) const;
void setExternalSignalFlags(int signalIndex, externalSignalFlag type); void setExternalSignalFlags(int signalIndex, externalSignalFlag type);
/************************************************** /**************************************************
@ -165,53 +165,53 @@ class Module : public virtual slsDetectorDefs {
int getReceiverProgress() const; int 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(); uint64_t getStartingFrameNumber() const;
void setStartingFrameNumber(uint64_t value); void setStartingFrameNumber(uint64_t value);
void sendSoftwareTrigger(); void sendSoftwareTrigger();
defs::scanParameters getScan(); defs::scanParameters getScan() const;
void setScan(const defs::scanParameters t); void setScan(const defs::scanParameters t);
std::string getScanErrorMessage(); std::string getScanErrorMessage() const;
/************************************************** /**************************************************
* * * *
* Network Configuration (Detector<->Receiver) * * Network Configuration (Detector<->Receiver) *
* * * *
* ************************************************/ * ************************************************/
int getNumberofUDPInterfacesFromShm(); int getNumberofUDPInterfacesFromShm() const;
int getNumberofUDPInterfaces(); int getNumberofUDPInterfaces() const;
void setNumberofUDPInterfaces(int n); void setNumberofUDPInterfaces(int n);
int getSelectedUDPInterface(); int getSelectedUDPInterface() const;
void selectUDPInterface(int n); void selectUDPInterface(int n);
sls::IpAddr getSourceUDPIP(); sls::IpAddr getSourceUDPIP() const;
void setSourceUDPIP(const sls::IpAddr ip); void setSourceUDPIP(const sls::IpAddr ip);
sls::IpAddr getSourceUDPIP2(); sls::IpAddr getSourceUDPIP2() const;
void setSourceUDPIP2(const sls::IpAddr ip); void setSourceUDPIP2(const sls::IpAddr ip);
sls::MacAddr getSourceUDPMAC(); sls::MacAddr getSourceUDPMAC() const;
void setSourceUDPMAC(const sls::MacAddr mac); void setSourceUDPMAC(const sls::MacAddr mac);
sls::MacAddr getSourceUDPMAC2(); sls::MacAddr getSourceUDPMAC2() const;
void setSourceUDPMAC2(const sls::MacAddr mac); void setSourceUDPMAC2(const sls::MacAddr mac);
sls::IpAddr getDestinationUDPIP(); sls::IpAddr getDestinationUDPIP() const;
void setDestinationUDPIP(const sls::IpAddr ip); void setDestinationUDPIP(const sls::IpAddr ip);
sls::IpAddr getDestinationUDPIP2(); sls::IpAddr getDestinationUDPIP2() const;
void setDestinationUDPIP2(const sls::IpAddr ip); void setDestinationUDPIP2(const sls::IpAddr ip);
sls::MacAddr getDestinationUDPMAC(); sls::MacAddr getDestinationUDPMAC() const;
void setDestinationUDPMAC(const sls::MacAddr mac); void setDestinationUDPMAC(const sls::MacAddr mac);
sls::MacAddr getDestinationUDPMAC2(); sls::MacAddr getDestinationUDPMAC2() const;
void setDestinationUDPMAC2(const sls::MacAddr mac); void setDestinationUDPMAC2(const sls::MacAddr mac);
int getDestinationUDPPort(); int getDestinationUDPPort() const;
void setDestinationUDPPort(int udpport); void setDestinationUDPPort(int udpport);
int getDestinationUDPPort2(); int getDestinationUDPPort2() const;
void setDestinationUDPPort2(int udpport); void setDestinationUDPPort2(int udpport);
std::string printReceiverConfiguration(); std::string printReceiverConfiguration();
bool getTenGiga(); bool getTenGiga() const;
void setTenGiga(bool value); void setTenGiga(bool value);
bool getTenGigaFlowControl(); bool getTenGigaFlowControl() const;
void setTenGigaFlowControl(bool enable); void setTenGigaFlowControl(bool enable);
int getTransmissionDelayFrame(); int getTransmissionDelayFrame() const;
void setTransmissionDelayFrame(int value); void setTransmissionDelayFrame(int value);
int getTransmissionDelayLeft(); int getTransmissionDelayLeft() const;
void setTransmissionDelayLeft(int value); void setTransmissionDelayLeft(int value);
int getTransmissionDelayRight(); int getTransmissionDelayRight() const;
void setTransmissionDelayRight(int value); void setTransmissionDelayRight(int value);
/************************************************** /**************************************************
@ -224,18 +224,18 @@ class Module : public virtual slsDetectorDefs {
void setReceiverHostname(const std::string &receiver); void setReceiverHostname(const std::string &receiver);
int getReceiverPort() const; int getReceiverPort() const;
int setReceiverPort(int port_number); int setReceiverPort(int port_number);
int getReceiverFifoDepth(); int getReceiverFifoDepth() const;
void setReceiverFifoDepth(int n_frames); void setReceiverFifoDepth(int n_frames);
bool getReceiverSilentMode(); bool getReceiverSilentMode() const;
void setReceiverSilentMode(bool enable); void setReceiverSilentMode(bool enable);
frameDiscardPolicy getReceiverFramesDiscardPolicy(); frameDiscardPolicy getReceiverFramesDiscardPolicy() const;
void setReceiverFramesDiscardPolicy(frameDiscardPolicy f); void setReceiverFramesDiscardPolicy(frameDiscardPolicy f);
bool getPartialFramesPadding(); bool getPartialFramesPadding() const;
void setPartialFramesPadding(bool padding); void setPartialFramesPadding(bool padding);
int64_t getReceiverUDPSocketBufferSize() const; int64_t getReceiverUDPSocketBufferSize() const;
int64_t getReceiverRealUDPSocketBufferSize() const; int64_t getReceiverRealUDPSocketBufferSize() const;
void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize); void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize);
bool getReceiverLock(); bool getReceiverLock() const;
void setReceiverLock(bool lock); void setReceiverLock(bool lock);
sls::IpAddr getReceiverLastClientIP() const; sls::IpAddr getReceiverLastClientIP() const;
std::array<pid_t, NUM_RX_THREAD_IDS> getReceiverThreadIds() const; std::array<pid_t, NUM_RX_THREAD_IDS> getReceiverThreadIds() const;
@ -245,22 +245,22 @@ class Module : public virtual slsDetectorDefs {
* File * * File *
* * * *
* ************************************************/ * ************************************************/
fileFormat getFileFormat(); fileFormat getFileFormat() const;
void setFileFormat(fileFormat f); void setFileFormat(fileFormat f);
std::string getFilePath(); std::string getFilePath() const;
void setFilePath(const std::string &path); void setFilePath(const std::string &path);
std::string getFileName(); std::string getFileName() const;
void setFileName(const std::string &fname); void setFileName(const std::string &fname);
int64_t getFileIndex(); int64_t getFileIndex() const;
void setFileIndex(int64_t file_index); void setFileIndex(int64_t file_index);
void incrementFileIndex(); void incrementFileIndex();
bool getFileWrite(); bool getFileWrite() const;
void setFileWrite(bool value); void setFileWrite(bool value);
bool getMasterFileWrite(); bool getMasterFileWrite() const;
void setMasterFileWrite(bool value); void setMasterFileWrite(bool value);
bool getFileOverWrite(); bool getFileOverWrite() const;
void setFileOverWrite(bool value); void setFileOverWrite(bool value);
int getFramesPerFile(); int getFramesPerFile() const;
/** 0 will set frames per file to unlimited */ /** 0 will set frames per file to unlimited */
void setFramesPerFile(int n_frames); void setFramesPerFile(int n_frames);
@ -269,22 +269,22 @@ class Module : public virtual slsDetectorDefs {
* ZMQ Streaming Parameters (Receiver<->Client)* * ZMQ Streaming Parameters (Receiver<->Client)*
* * * *
* ************************************************/ * ************************************************/
bool getReceiverStreaming(); bool getReceiverStreaming() const;
void setReceiverStreaming(bool enable); void setReceiverStreaming(bool enable);
int getReceiverStreamingFrequency(); int getReceiverStreamingFrequency() const;
/** Option: nth frame streamed out, if 0, streamed out at a timer of 200 */ /** Option: nth frame streamed out, if 0, streamed out at a timer of 200 */
void setReceiverStreamingFrequency(int freq); void setReceiverStreamingFrequency(int freq);
int getReceiverStreamingTimer(); int getReceiverStreamingTimer() const;
void setReceiverStreamingTimer(int time_in_ms = 200); void setReceiverStreamingTimer(int time_in_ms = 200);
int getReceiverStreamingStartingFrame(); int getReceiverStreamingStartingFrame() const;
void setReceiverStreamingStartingFrame(int fnum); void setReceiverStreamingStartingFrame(int fnum);
int getReceiverStreamingPort(); int getReceiverStreamingPort() const;
void setReceiverStreamingPort(int port); void setReceiverStreamingPort(int port);
sls::IpAddr getReceiverStreamingIP(); sls::IpAddr getReceiverStreamingIP() const;
void setReceiverStreamingIP(const sls::IpAddr ip); void setReceiverStreamingIP(const sls::IpAddr ip);
int getClientStreamingPort(); int getClientStreamingPort() const;
void setClientStreamingPort(int port); void setClientStreamingPort(int port);
sls::IpAddr getClientStreamingIP(); sls::IpAddr getClientStreamingIP() const;
void setClientStreamingIP(const sls::IpAddr ip); void setClientStreamingIP(const sls::IpAddr ip);
/************************************************** /**************************************************
@ -292,42 +292,42 @@ class Module : public virtual slsDetectorDefs {
* Eiger Specific * * Eiger Specific *
* * * *
* ************************************************/ * ************************************************/
int64_t getSubExptime(); int64_t getSubExptime() const;
void setSubExptime(int64_t value); void setSubExptime(int64_t value);
int64_t getSubDeadTime(); int64_t getSubDeadTime() const;
void setSubDeadTime(int64_t value); void setSubDeadTime(int64_t value);
int getThresholdEnergy(); int getThresholdEnergy() const;
void setThresholdEnergy(int e_eV, detectorSettings isettings, void setThresholdEnergy(int e_eV, detectorSettings isettings,
bool trimbits); bool trimbits);
std::string getSettingsDir(); std::string getSettingsDir() const;
std::string setSettingsDir(const std::string &dir); std::string setSettingsDir(const std::string &dir);
bool getParallelMode(); bool getParallelMode() const;
void setParallelMode(const bool enable); void setParallelMode(const bool enable);
bool getOverFlowMode(); bool getOverFlowMode() const;
void setOverFlowMode(const bool enable); void setOverFlowMode(const bool enable);
bool getFlippedDataX(); bool getFlippedDataX() const;
void setFlippedDataX(bool value); void setFlippedDataX(bool value);
std::vector<int> getTrimEn(); std::vector<int> getTrimEn() const;
int setTrimEn(const std::vector<int> &energies = {}); int setTrimEn(const std::vector<int> &energies = {});
int64_t getRateCorrection(); int64_t getRateCorrection() const;
void setDefaultRateCorrection(); void setDefaultRateCorrection();
void setRateCorrection(int64_t t = 0); void setRateCorrection(int64_t t = 0);
int getReadNLines(); int getReadNLines() const;
void setReadNLines(const int value); void setReadNLines(const int value);
bool getInterruptSubframe(); bool getInterruptSubframe() const;
void setInterruptSubframe(const bool enable); void setInterruptSubframe(const bool enable);
int64_t getMeasuredPeriod() const; int64_t getMeasuredPeriod() const;
int64_t getMeasuredSubFramePeriod() const; int64_t getMeasuredSubFramePeriod() const;
bool getActivate(); bool getActivate() const;
void setActivate(const bool enable); void setActivate(const bool enable);
bool getDeactivatedRxrPaddingMode(); bool getDeactivatedRxrPaddingMode() const;
void setDeactivatedRxrPaddingMode(bool padding); void setDeactivatedRxrPaddingMode(bool padding);
bool getCounterBit(); bool getCounterBit() const;
void setCounterBit(bool cb); void setCounterBit(bool cb);
void pulsePixel(int n = 0, int x = 0, int y = 0); void pulsePixel(int n = 0, int x = 0, int y = 0);
void pulsePixelNMove(int n = 0, int x = 0, int y = 0); void pulsePixelNMove(int n = 0, int x = 0, int y = 0);
void pulseChip(int n_pulses = 0); void pulseChip(int n_pulses = 0);
bool getQuad(); bool getQuad() const;
void setQuad(const bool enable); void setQuad(const bool enable);
/************************************************** /**************************************************
@ -472,10 +472,10 @@ class Module : public virtual slsDetectorDefs {
* Moench * * Moench *
* * * *
* ************************************************/ * ************************************************/
std::map<std::string, std::string> getAdditionalJsonHeader(); std::map<std::string, std::string> getAdditionalJsonHeader() const;
void setAdditionalJsonHeader( void setAdditionalJsonHeader(
const std::map<std::string, std::string> &jsonHeader); const std::map<std::string, std::string> &jsonHeader);
std::string getAdditionalJsonParameter(const std::string &key); std::string getAdditionalJsonParameter(const std::string &key) const;
void setAdditionalJsonParameter(const std::string &key, void setAdditionalJsonParameter(const std::string &key,
const std::string &value); const std::string &value);