mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
WIP
This commit is contained in:
parent
cf2e1c1dfc
commit
e8556abbe7
@ -2386,8 +2386,39 @@ uint64_t Module::getReceiverCurrentFrameIndex() const {
|
|||||||
|
|
||||||
// private
|
// private
|
||||||
|
|
||||||
|
void Module::preSendArgsCheck(const void *args, size_t args_size, void *retval,
|
||||||
|
size_t retval_size) const {
|
||||||
|
if (args == nullptr && args_size != 0)
|
||||||
|
throw RuntimeError(
|
||||||
|
"Passed nullptr as args to Send function but size is not 0");
|
||||||
|
if (args != nullptr && args_size == 0)
|
||||||
|
throw RuntimeError(
|
||||||
|
"Passed size 0 to Send function but args is not nullptr");
|
||||||
|
if (retval == nullptr && retval_size != 0)
|
||||||
|
throw RuntimeError(
|
||||||
|
"Passed nullptr as retval to Send function but size is not 0");
|
||||||
|
if (retval != nullptr && retval_size == 0)
|
||||||
|
throw RuntimeError(
|
||||||
|
"Passed size 0 to Send function but retval is not nullptr");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Macro to check arguments passed to send to receiver and send to detector
|
||||||
|
// Should detect and fail on pointer types and on nullptr_t
|
||||||
|
#define STATIC_ASSERT_ARG(ARG, DST) \
|
||||||
|
static_assert(!std::is_pointer<ARG>::value, \
|
||||||
|
"Pointer type is incompatible with templated " DST); \
|
||||||
|
static_assert(!std::is_same<ARG, std::nullptr_t>::value, \
|
||||||
|
"nullptr_t type is incompatible with templated " DST);
|
||||||
|
|
||||||
void Module::sendToDetector(int fnum, const void *args, size_t args_size,
|
void Module::sendToDetector(int fnum, const void *args, size_t args_size,
|
||||||
void *retval, size_t retval_size) {
|
void *retval, size_t retval_size) {
|
||||||
|
static_cast<const Module &>(*this).sendToDetector(fnum, args, args_size,
|
||||||
|
retval, retval_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::sendToDetector(int fnum, const void *args, size_t args_size,
|
||||||
|
void *retval, size_t retval_size) const {
|
||||||
|
preSendArgsCheck(args, args_size, retval, retval_size);
|
||||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||||
client.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
client.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
||||||
client.close();
|
client.close();
|
||||||
@ -2452,27 +2483,23 @@ Ret Module::sendToDetector(int fnum, const Arg &args) {
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
//---------------------------------------------------------- sendToDetectorStop
|
||||||
void *retval, size_t retval_size) {
|
|
||||||
static_cast<const Module &>(*this).sendToDetectorStop(fnum, args, args_size,
|
|
||||||
retval, retval_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Module::sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
void Module::sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
||||||
void *retval, size_t retval_size) const {
|
void *retval, size_t retval_size) const {
|
||||||
|
// This is the only function that actually sends data to the detector stop
|
||||||
|
// the other versions use templates to deduce sizes and create
|
||||||
|
// the return type
|
||||||
|
preSendArgsCheck(args, args_size, retval, retval_size);
|
||||||
auto stop = DetectorSocket(shm()->hostname, shm()->stopPort);
|
auto stop = DetectorSocket(shm()->hostname, shm()->stopPort);
|
||||||
stop.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
stop.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
||||||
stop.close();
|
stop.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg, typename Ret>
|
void Module::sendToDetectorStop(int fnum, const void *args, size_t args_size,
|
||||||
void Module::sendToDetectorStop(int fnum, const Arg &args, Ret &retval) {
|
void *retval, size_t retval_size) {
|
||||||
LOG(logDEBUG1) << "Sending to Stop: ["
|
static_cast<const Module &>(*this).sendToDetectorStop(fnum, args, args_size,
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
retval, retval_size);
|
||||||
<< ", " << args << ", " << sizeof(args) << ", "
|
|
||||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
|
||||||
sendToDetectorStop(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg, typename Ret>
|
template <typename Arg, typename Ret>
|
||||||
@ -2485,13 +2512,9 @@ void Module::sendToDetectorStop(int fnum, const Arg &args, Ret &retval) const {
|
|||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg>
|
template <typename Arg, typename Ret>
|
||||||
void Module::sendToDetectorStop(int fnum, const Arg &args, std::nullptr_t) {
|
void Module::sendToDetectorStop(int fnum, const Arg &args, Ret &retval) {
|
||||||
LOG(logDEBUG1) << "Sending to Stop: ["
|
static_cast<const Module &>(*this).sendToDetectorStop(fnum, args, retval);
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", " << typeid(Arg).name() << ", " << sizeof(Arg)
|
|
||||||
<< ", nullptr, 0 ]";
|
|
||||||
sendToDetectorStop(fnum, &args, sizeof(args), nullptr, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg>
|
template <typename Arg>
|
||||||
@ -2504,14 +2527,9 @@ void Module::sendToDetectorStop(int fnum, const Arg &args,
|
|||||||
sendToDetectorStop(fnum, &args, sizeof(args), nullptr, 0);
|
sendToDetectorStop(fnum, &args, sizeof(args), nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret>
|
template <typename Arg>
|
||||||
void Module::sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval) {
|
void Module::sendToDetectorStop(int fnum, const Arg &args, std::nullptr_t) {
|
||||||
LOG(logDEBUG1) << "Sending to Stop: ["
|
static_cast<const Module &>(*this).sendToDetectorStop(fnum, args, nullptr);
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
|
||||||
<< sizeof(Ret) << "]";
|
|
||||||
sendToDetectorStop(fnum, nullptr, 0, &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret>
|
template <typename Ret>
|
||||||
@ -2524,11 +2542,9 @@ void Module::sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval) const {
|
|||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
LOG(logDEBUG1) << "Got back: " << retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToDetectorStop(int fnum) {
|
template <typename Ret>
|
||||||
LOG(logDEBUG1) << "Sending to Stop: ["
|
void Module::sendToDetectorStop(int fnum, std::nullptr_t, Ret &retval) {
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
static_cast<const Module &>(*this).sendToDetectorStop(fnum, nullptr, retval);
|
||||||
<< ", nullptr, 0, nullptr, 0]";
|
|
||||||
sendToDetectorStop(fnum, nullptr, 0, nullptr, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToDetectorStop(int fnum) const {
|
void Module::sendToDetectorStop(int fnum) const {
|
||||||
@ -2538,6 +2554,10 @@ void Module::sendToDetectorStop(int fnum) const {
|
|||||||
sendToDetectorStop(fnum, nullptr, 0, nullptr, 0);
|
sendToDetectorStop(fnum, nullptr, 0, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Module::sendToDetectorStop(int fnum) {
|
||||||
|
static_cast<const Module &>(*this).sendToDetectorStop(fnum);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Ret> Ret Module::sendToDetectorStop(int fnum) {
|
template <typename Ret> Ret Module::sendToDetectorStop(int fnum) {
|
||||||
LOG(logDEBUG1) << "Sending to Stop: ["
|
LOG(logDEBUG1) << "Sending to Stop: ["
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
@ -2572,52 +2592,46 @@ Ret Module::sendToDetectorStop(int fnum, const Arg &args) {
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToReceiver(int fnum, const void *args, size_t args_size,
|
//-------------------------------------------------------------- sendToReceiver
|
||||||
void *retval, size_t retval_size) {
|
|
||||||
static_cast<const Module &>(*this).sendToReceiver(fnum, args, args_size,
|
|
||||||
retval, retval_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Module::sendToReceiver(int fnum, const void *args, size_t args_size,
|
void Module::sendToReceiver(int fnum, const void *args, size_t args_size,
|
||||||
void *retval, size_t retval_size) const {
|
void *retval, size_t retval_size) const {
|
||||||
|
// This is the only function that actually sends data to the receiver
|
||||||
|
// the other versions use templates to deduce sizes and create
|
||||||
|
// the return type
|
||||||
if (!shm()->useReceiverFlag) {
|
if (!shm()->useReceiverFlag) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "Set rx_hostname first to use receiver parameters, ";
|
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());
|
throw RuntimeError(oss.str());
|
||||||
}
|
}
|
||||||
|
preSendArgsCheck(args, args_size, retval, retval_size);
|
||||||
auto receiver = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort);
|
auto receiver = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort);
|
||||||
receiver.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
receiver.sendCommandThenRead(fnum, args, args_size, retval, retval_size);
|
||||||
receiver.close();
|
receiver.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Module::sendToReceiver(int fnum, const void *args, size_t args_size,
|
||||||
|
void *retval, size_t retval_size) {
|
||||||
|
static_cast<const Module &>(*this).sendToReceiver(fnum, args, args_size,
|
||||||
|
retval, retval_size);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Arg, typename Ret>
|
template <typename Arg, typename Ret>
|
||||||
void Module::sendToReceiver(int fnum, const Arg &args, Ret &retval) {
|
void Module::sendToReceiver(int fnum, const Arg &args, Ret &retval) {
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
LOG(logDEBUG1) << "Sending to Receiver: ["
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
<< ", " << args << ", " << sizeof(args) << ", "
|
<< ", " << args << ", " << sizeof(args) << ", "
|
||||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
||||||
|
STATIC_ASSERT_ARG(Arg, "sendToReceiver")
|
||||||
|
STATIC_ASSERT_ARG(Ret, "sendToReceiver")
|
||||||
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
LOG(logDEBUG1) << "Got back: " << retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg, typename Ret>
|
template <typename Arg, typename Ret>
|
||||||
void Module::sendToReceiver(int fnum, const Arg &args, Ret &retval) const {
|
void Module::sendToReceiver(int fnum, const Arg &args, Ret &retval) const {
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
static_cast<const Module &>(*this).sendToReceiver(fnum, args, retval);
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", " << args << ", " << sizeof(args) << ", "
|
|
||||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
|
||||||
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename Arg>
|
|
||||||
void Module::sendToReceiver(int fnum, const Arg &args, std::nullptr_t) {
|
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", " << typeid(Arg).name() << ", " << sizeof(Arg)
|
|
||||||
<< ", nullptr, 0 ]";
|
|
||||||
sendToReceiver(fnum, &args, sizeof(args), nullptr, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Arg>
|
template <typename Arg>
|
||||||
@ -2626,17 +2640,13 @@ void Module::sendToReceiver(int fnum, const Arg &args, std::nullptr_t) const {
|
|||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
<< ", " << typeid(Arg).name() << ", " << sizeof(Arg)
|
<< ", " << typeid(Arg).name() << ", " << sizeof(Arg)
|
||||||
<< ", nullptr, 0 ]";
|
<< ", nullptr, 0 ]";
|
||||||
|
STATIC_ASSERT_ARG(Arg, "sendToReceiver")
|
||||||
sendToReceiver(fnum, &args, sizeof(args), nullptr, 0);
|
sendToReceiver(fnum, &args, sizeof(args), nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret>
|
template <typename Arg>
|
||||||
void Module::sendToReceiver(int fnum, std::nullptr_t, Ret &retval) {
|
void Module::sendToReceiver(int fnum, const Arg &args, std::nullptr_t) {
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
static_cast<const Module &>(*this).sendToReceiver(fnum, args, nullptr);
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
|
||||||
<< sizeof(Ret) << "]";
|
|
||||||
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret>
|
template <typename Ret>
|
||||||
@ -2645,19 +2655,14 @@ void Module::sendToReceiver(int fnum, std::nullptr_t, Ret &retval) const {
|
|||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
||||||
<< sizeof(Ret) << "]";
|
<< sizeof(Ret) << "]";
|
||||||
|
STATIC_ASSERT_ARG(Ret, "sendToReceiver")
|
||||||
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret> Ret Module::sendToReceiver(int fnum) {
|
template <typename Ret>
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
void Module::sendToReceiver(int fnum, std::nullptr_t, Ret &retval) {
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
static_cast<const Module &>(*this).sendToReceiver(fnum, nullptr, retval);
|
||||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
|
||||||
<< sizeof(Ret) << "]";
|
|
||||||
Ret retval{};
|
|
||||||
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
|
template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
|
||||||
@ -2665,17 +2670,15 @@ template <typename Ret> Ret Module::sendToReceiver(int fnum) const {
|
|||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
<< ", nullptr, 0, " << typeid(Ret).name() << ", "
|
||||||
<< sizeof(Ret) << "]";
|
<< sizeof(Ret) << "]";
|
||||||
|
STATIC_ASSERT_ARG(Ret, "sendToReceiver")
|
||||||
Ret retval{};
|
Ret retval{};
|
||||||
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
sendToReceiver(fnum, nullptr, 0, &retval, sizeof(retval));
|
||||||
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
LOG(logDEBUG1) << "Got back: " << ToString(retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToReceiver(int fnum) {
|
template <typename Ret> Ret Module::sendToReceiver(int fnum) {
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
return static_cast<const Module &>(*this).sendToReceiver<Ret>(fnum);
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", nullptr, 0, nullptr, 0]";
|
|
||||||
sendToReceiver(fnum, nullptr, 0, nullptr, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendToReceiver(int fnum) const {
|
void Module::sendToReceiver(int fnum) const {
|
||||||
@ -2685,16 +2688,8 @@ void Module::sendToReceiver(int fnum) const {
|
|||||||
sendToReceiver(fnum, nullptr, 0, nullptr, 0);
|
sendToReceiver(fnum, nullptr, 0, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret, typename Arg>
|
void Module::sendToReceiver(int fnum) {
|
||||||
Ret Module::sendToReceiver(int fnum, const Arg &args) {
|
static_cast<const Module &>(*this).sendToReceiver(fnum);
|
||||||
LOG(logDEBUG1) << "Sending to Receiver: ["
|
|
||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
|
||||||
<< ", " << args << ", " << sizeof(args) << ", "
|
|
||||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
|
||||||
Ret retval{};
|
|
||||||
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
|
||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Ret, typename Arg>
|
template <typename Ret, typename Arg>
|
||||||
@ -2703,12 +2698,19 @@ Ret Module::sendToReceiver(int fnum, const Arg &args) const {
|
|||||||
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
<< getFunctionNameFromEnum(static_cast<detFuncs>(fnum))
|
||||||
<< ", " << args << ", " << sizeof(args) << ", "
|
<< ", " << args << ", " << sizeof(args) << ", "
|
||||||
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
<< typeid(Ret).name() << ", " << sizeof(Ret) << "]";
|
||||||
|
STATIC_ASSERT_ARG(Arg, "sendToReceiver")
|
||||||
|
STATIC_ASSERT_ARG(Ret, "sendToReceiver")
|
||||||
Ret retval{};
|
Ret retval{};
|
||||||
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
sendToReceiver(fnum, &args, sizeof(args), &retval, sizeof(retval));
|
||||||
LOG(logDEBUG1) << "Got back: " << retval;
|
LOG(logDEBUG1) << "Got back: " << retval;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Ret, typename Arg>
|
||||||
|
Ret Module::sendToReceiver(int fnum, const Arg &args) {
|
||||||
|
return static_cast<const Module &>(*this).sendToReceiver<Ret>(fnum, args);
|
||||||
|
}
|
||||||
|
|
||||||
slsDetectorDefs::detectorType Module::getDetectorTypeFromShm(int det_id,
|
slsDetectorDefs::detectorType Module::getDetectorTypeFromShm(int det_id,
|
||||||
bool verify) {
|
bool verify) {
|
||||||
if (!shm.IsExisting()) {
|
if (!shm.IsExisting()) {
|
||||||
|
@ -518,6 +518,8 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
uint64_t getReceiverCurrentFrameIndex() const;
|
uint64_t getReceiverCurrentFrameIndex() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void preSendArgsCheck(const void * args, size_t args_size, void * retval, size_t retval_size) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send function parameters to detector (control server)
|
* Send function parameters to detector (control server)
|
||||||
* @param fnum function enum
|
* @param fnum function enum
|
||||||
@ -529,6 +531,9 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
void sendToDetector(int fnum, const void *args, size_t args_size,
|
void sendToDetector(int fnum, const void *args, size_t args_size,
|
||||||
void *retval, size_t retval_size);
|
void *retval, size_t retval_size);
|
||||||
|
|
||||||
|
void sendToDetector(int fnum, const void *args, size_t args_size,
|
||||||
|
void *retval, size_t retval_size) const;
|
||||||
|
|
||||||
template <typename Arg, typename Ret>
|
template <typename Arg, typename Ret>
|
||||||
void sendToDetector(int fnum, const Arg &args, Ret &retval);
|
void sendToDetector(int fnum, const Arg &args, Ret &retval);
|
||||||
template <typename Arg>
|
template <typename Arg>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user