mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
start pattern without binaries
This commit is contained in:
@ -1210,6 +1210,9 @@ class Detector {
|
||||
*/
|
||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
/** [Mythen3] */
|
||||
void startPattern(Positions pos = {});
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* Moench *
|
||||
|
@ -860,6 +860,7 @@ class CmdProxy {
|
||||
{"patwaittime2", &CmdProxy::PatternWaitTime},
|
||||
{"patmask", &CmdProxy::patmask},
|
||||
{"patsetbit", &CmdProxy::patsetbit},
|
||||
{"patternstart", &CmdProxy::patternstart},
|
||||
|
||||
/* Moench */
|
||||
{"rx_jsonaddheader", &CmdProxy::AdditionalJsonHeader},
|
||||
@ -2031,6 +2032,9 @@ class CmdProxy {
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit values "
|
||||
"applied to the selected patmask for every pattern.");
|
||||
|
||||
EXECUTE_SET_COMMAND(patternstart, startPattern,
|
||||
"\n\t[Mythen3] Starts Pattern");
|
||||
|
||||
/* Moench */
|
||||
|
||||
INTEGER_COMMAND(framemode, getFrameMode, setFrameMode,
|
||||
|
@ -1574,6 +1574,10 @@ void Detector::setPatternBitMask(uint64_t mask, Positions pos) {
|
||||
pimpl->Parallel(&Module::setPatternBitMask, pos, mask);
|
||||
}
|
||||
|
||||
void Detector::startPattern(Positions pos) {
|
||||
pimpl->Parallel(&Module::startPattern, pos);
|
||||
}
|
||||
|
||||
// Moench
|
||||
|
||||
Result<std::map<std::string, std::string>>
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "ToString.h"
|
||||
#include "file_utils.h"
|
||||
#include "network_utils.h"
|
||||
#include "sls_detector_funcs.h"
|
||||
#include "sls_detector_exceptions.h"
|
||||
#include "sls_detector_funcs.h"
|
||||
#include "string_utils.h"
|
||||
#include "versionAPI.h"
|
||||
|
||||
@ -139,16 +139,14 @@ void Module::sendToDetector(int fnum, std::nullptr_t, Ret &retval) {
|
||||
|
||||
void Module::sendToDetector(int fnum) {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< "]";
|
||||
sendToDetector(fnum, nullptr, 0, nullptr, 0);
|
||||
}
|
||||
|
||||
template <typename Ret> Ret Module::sendToDetector(int fnum) {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
||||
<< sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -160,8 +158,7 @@ template <typename Ret> Ret Module::sendToDetector(int fnum) {
|
||||
template <typename Ret, typename Arg>
|
||||
Ret Module::sendToDetector(int fnum, const Arg &args) {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", " << args << ", " << sizeof(args) << ", "
|
||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -216,8 +213,7 @@ void Module::sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval) const {
|
||||
|
||||
void Module::sendToDetectorStop(int fnum) {
|
||||
LOG(logDEBUG1) << "Sending to detector stop: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< "]";
|
||||
sendToDetectorStop(fnum, nullptr, 0, nullptr, 0);
|
||||
}
|
||||
@ -237,8 +233,7 @@ void Module::sendToReceiver(int fnum, const void *args, size_t args_size,
|
||||
if (!shm()->useReceiverFlag) {
|
||||
std::ostringstream oss;
|
||||
oss << "Set rx_hostname first to use receiver parameters, ";
|
||||
oss << getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum));
|
||||
oss << getFunctionNameFromEnum(static_cast<detFuncs>(fnum));
|
||||
throw RuntimeError(oss.str());
|
||||
}
|
||||
auto receiver = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort);
|
||||
@ -278,8 +273,7 @@ void Module::sendToReceiver(int fnum, std::nullptr_t, Ret &retval) const {
|
||||
|
||||
template <typename Ret> Ret Module::sendToReceiver(int fnum) {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
||||
<< sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -290,8 +284,7 @@ template <typename Ret> Ret Module::sendToReceiver(int fnum) {
|
||||
|
||||
template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
||||
<< sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -303,8 +296,7 @@ template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
|
||||
template <typename Ret, typename Arg>
|
||||
Ret Module::sendToReceiver(int fnum, const Arg &args) {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", " << args << ", " << sizeof(args) << ", "
|
||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -316,8 +308,7 @@ Ret Module::sendToReceiver(int fnum, const Arg &args) {
|
||||
template <typename Ret, typename Arg>
|
||||
Ret Module::sendToReceiver(int fnum, const Arg &args) const {
|
||||
LOG(logDEBUG1) << "Sending: ["
|
||||
<< getFunctionNameFromEnum(
|
||||
static_cast<detFuncs>(fnum))
|
||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||
<< ", " << args << ", " << sizeof(args) << ", "
|
||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
||||
Ret retval{};
|
||||
@ -2877,6 +2868,8 @@ uint64_t Module::getPatternBitMask() {
|
||||
return sendToDetector<uint64_t>(F_GET_PATTERN_BIT_MASK);
|
||||
}
|
||||
|
||||
void Module::startPattern() { sendToDetector(F_START_PATTERN); }
|
||||
|
||||
int Module::setLEDEnable(int enable) {
|
||||
return sendToDetector<int>(F_LED, enable);
|
||||
}
|
||||
|
@ -1500,6 +1500,9 @@ class Module : public virtual slsDetectorDefs {
|
||||
*/
|
||||
uint64_t getPatternBitMask();
|
||||
|
||||
/** [Mythen3] */
|
||||
void startPattern();
|
||||
|
||||
/**
|
||||
* Set LED Enable (Moench, CTB only)
|
||||
* @param enable 1 to switch on, 0 to switch off, -1 gets
|
||||
|
Reference in New Issue
Block a user