diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 12dfd9c8a..326daf0c4 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -391,7 +391,7 @@ void Module::setExternalSignalFlags(int signalIndex, externalSignalFlag type) { void Module::startReceiver() { shm()->stoppedFlag = false; - sendToReceiver(F_START_RECEIVER, nullptr, nullptr); + sendToReceiver(F_START_RECEIVER); } void Module::stopReceiver() { @@ -932,7 +932,7 @@ void Module::setFileIndex(int64_t file_index) { } void Module::incrementFileIndex() { - sendToReceiver(F_INCREMENT_FILE_INDEX, nullptr, nullptr); + sendToReceiver(F_INCREMENT_FILE_INDEX); } bool Module::getFileWrite() { @@ -2273,7 +2273,7 @@ void Module::copyDetectorServer(const std::string &fname, } void Module::rebootController() { - sendToDetector(F_REBOOT_CONTROLLER, nullptr, nullptr); + sendToDetector(F_REBOOT_CONTROLLER); LOG(logINFO) << "Controller rebooted successfully!"; } @@ -2673,6 +2673,20 @@ template Ret Module::sendToReceiver(int fnum) const { return retval; } +void Module::sendToReceiver(int fnum) { + LOG(logDEBUG1) << "Sending to Receiver: [" + << getFunctionNameFromEnum(static_cast(fnum)) + << ", nullptr, 0, nullptr, 0]"; + sendToReceiver(fnum, nullptr, 0, nullptr, 0); +} + +void Module::sendToReceiver(int fnum) const { + LOG(logDEBUG1) << "Sending to Receiver: [" + << getFunctionNameFromEnum(static_cast(fnum)) + << ", nullptr, 0, nullptr, 0]"; + sendToReceiver(fnum, nullptr, 0, nullptr, 0); +} + template Ret Module::sendToReceiver(int fnum, const Arg &args) { LOG(logDEBUG1) << "Sending to Receiver: [" @@ -2803,7 +2817,7 @@ void Module::checkReceiverVersionCompatibility() { } void Module::restreamStopFromReceiver() { - sendToReceiver(F_RESTREAM_STOP_FROM_RECEIVER, nullptr, nullptr); + sendToReceiver(F_RESTREAM_STOP_FROM_RECEIVER); } int Module::sendModule(sls_detector_module *myMod, sls::ClientSocket &client) { diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index bd8046d45..e39ffc2e5 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -607,6 +607,10 @@ class Module : public virtual slsDetectorDefs { template Ret sendToReceiver(int fnum) const; + void sendToReceiver(int fnum); + + void sendToReceiver(int fnum) const; + template Ret sendToReceiver(int fnum, const Arg &args);