Commit c89e3f15 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Port to slsDetectorPackage v5.0.0:

* Port to new Detector & Receiver API
* Enable gap pixels through Receiver patch
* Implement put/getCmd through sls_detector_put/get
* Extend SystemCmdPipe::wait to recover output,
  add execute for commands without input
parent 77fd6f33
......@@ -82,6 +82,7 @@ find_package(Numa REQUIRED)
# slsDetectorPackage
set(SLS_DETECTOR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorPackage)
set(SLS_DETECTOR_SUPPORT ${SLS_DETECTOR_DIR}/slsSupportLib)
set(SLS_DETECTOR_SW ${SLS_DETECTOR_DIR}/slsDetectorSoftware)
set(SLS_DETECTOR_RECV ${SLS_DETECTOR_DIR}/slsReceiverSoftware)
......@@ -116,16 +117,13 @@ set_target_properties(slsdetector PROPERTIES
VERSION "${PROJECT_VERSION}"
SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
MESSAGE(STATUS "SLS_DETECTOR_SW=${SLS_DETECTOR_SW}")
# Add dependencies
target_include_directories(slsdetector
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SUPPORT}/include>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/include>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/commonFiles>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/slsDetector>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/multiSlsDetector>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/slsDetectorServer>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/slsDetectorAnalysis>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_SW}/slsReceiverInterface>"
PUBLIC "$<BUILD_INTERFACE:${SLS_DETECTOR_RECV}/include>"
PUBLIC "$<BUILD_INTERFACE:${NUMA_INCLUDE_DIR}>"
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" # For export header
......
......@@ -92,8 +92,15 @@ class SystemCmdPipe
{ return m_cmd.args(); }
void start();
void wait();
int wait();
int wait(StringList& out, StringList& err);
int execute()
{ start(); return wait(); }
int execute(StringList& out, StringList& err)
{ start(); return wait(out, err); }
void setPipe(PipeIdx idx, PipeType type);
Pipe& getPipe(PipeIdx idx);
......
......@@ -28,7 +28,7 @@
#include "SlsDetectorCPUAffinity.h"
#include "SlsDetectorBebTools.h"
#include "slsDetectorUsers.h"
#include "sls/Detector.h"
#include "lima/HwBufferMgr.h"
#include "lima/HwMaxImageSizeCallback.h"
......@@ -54,7 +54,6 @@ public:
typedef Defs::DACIndex DACIndex;
typedef Defs::ADCIndex ADCIndex;
typedef Defs::DetStatus DetStatus;
typedef Defs::NetworkParameter NetworkParameter;
Camera(std::string config_fname, int det_id = 0);
Camera(const Camera& o) = delete;
......@@ -71,9 +70,6 @@ public:
int getNbDetModules()
{ return m_input_data->host_name_list.size(); }
int getNbDetSubModules()
{ return m_det->getNMods(); }
int getNbRecvs()
{ return m_recv_list.size(); }
......@@ -125,23 +121,20 @@ public:
void setSkipFrameFreq(FrameType skip_frame_freq);
void getSkipFrameFreq(FrameType& skip_frame_freq);
// setDAC: sub_mod_idx: 0-N=sub_module, -1=all
void setDAC(int sub_mod_idx, DACIndex dac_idx, int val,
// setDAC: mod_idx: 0-N=module, -1=all
void setDAC(int mod_idx, DACIndex dac_idx, int val,
bool milli_volt = false);
void getDAC(int sub_mod_idx, DACIndex dac_idx, int& val,
void getDAC(int mod_idx, DACIndex dac_idx, int& val,
bool milli_volt = false);
void getDACList(DACIndex dac_idx, IntList& val_list,
bool milli_volt = false);
void getADC(int sub_mod_idx, ADCIndex adc_idx, int& val);
void getADC(int mod_idx, ADCIndex adc_idx, int& val);
void getADCList(ADCIndex adc_idx, IntList& val_list);
void setSettings(Settings settings);
void getSettings(Settings& settings);
void setNetworkParameter(NetworkParameter net_param, std::string& val);
void getNetworkParameter(NetworkParameter net_param, std::string& val);
void setTolerateLostPackets(bool tol_lost_packets);
void getTolerateLostPackets(bool& tol_lost_packets);
......@@ -249,8 +242,11 @@ private:
void updateCPUAffinity(bool recv_restarted);
void setRecvCPUAffinity(const RecvCPUAffinityList& recv_affinity_list);
static int64_t NSec(double x)
{ return int64_t(x * 1e9); }
static sls::ns NSec(double x)
{
std::chrono::duration<double> sec(x);
return std::chrono::duration_cast<sls::ns>(sec);
}
AcqState getEffectiveState();
......@@ -272,6 +268,8 @@ private:
void getSortedBadFrameList(IntList& bad_frame_list)
{ getSortedBadFrameList(IntList(), IntList(), bad_frame_list); }
std::string execCmd(const std::string& s, bool put, int idx = -1);
template <class T>
void putNbCmd(const std::string& cmd, T val, int idx = -1)
{
......@@ -299,7 +297,7 @@ private:
Model *m_model;
Cond m_cond;
AutoPtr<AppInputData> m_input_data;
AutoPtr<slsDetectorUsers> m_det;
AutoPtr<sls::Detector> m_det;
BebList m_beb_list;
FrameMap m_frame_map;
RecvList m_recv_list;
......
......@@ -23,7 +23,7 @@
#ifndef __SLS_DETECTOR_DEFS_H
#define __SLS_DETECTOR_DEFS_H
#include "sls_detector_defs.h"
#include "sls/sls_detector_defs.h"
#include "lima/Debug.h"
#include "lima/RegExUtils.h"
......@@ -43,11 +43,10 @@ namespace Defs
enum TrigMode {
Auto = slsDetectorDefs::AUTO_TIMING,
TriggerExposure = slsDetectorDefs::TRIGGER_EXPOSURE,
TriggerReadout = slsDetectorDefs::TRIGGER_READOUT,
Gating = slsDetectorDefs::GATE_FIX_NUMBER,
TriggeredGating = slsDetectorDefs::GATE_WITH_START_TRIGGER,
Gated = slsDetectorDefs::GATED,
BurstTrigger = slsDetectorDefs::BURST_TRIGGER,
SoftTriggerExposure,
TriggeredGated = slsDetectorDefs::TRIGGER_GATED,
SoftTriggerExposure,
};
enum Settings {
......@@ -58,7 +57,6 @@ enum Settings {
LowGain = slsDetectorDefs::LOWGAIN,
MediumGain = slsDetectorDefs::MEDIUMGAIN,
VeryHighGain = slsDetectorDefs::VERYHIGHGAIN,
LowNoise = slsDetectorDefs::LOWNOISE,
DynamicHG0 = slsDetectorDefs::DYNAMICHG0,
FixGain1 = slsDetectorDefs::FIXGAIN1,
FixGain2 = slsDetectorDefs::FIXGAIN2,
......@@ -69,69 +67,16 @@ enum Settings {
Unitialized = slsDetectorDefs::UNINITIALIZED,
};
#define MultiSlsDetectorErr (-100)
#define SlsDetectorBadIndexErr (-9999)
enum DACIndex {
Threshold = slsDetectorDefs::THRESHOLD,
CalibPulse = slsDetectorDefs::CALIBRATION_PULSE,
TrimBitSize = slsDetectorDefs::TRIMBIT_SIZE,
PreAmp = slsDetectorDefs::PREAMP,
Shaper1 = slsDetectorDefs::SHAPER1,
Shaper2 = slsDetectorDefs::SHAPER2,
Humidity = slsDetectorDefs::HUMIDITY,
DetectorBias = slsDetectorDefs::DETECTOR_BIAS,
PowerVa = slsDetectorDefs::VA_POT,
PowerVdd = slsDetectorDefs::VDD_POT,
PowerVsh = slsDetectorDefs::VSH_POT,
PowerVio = slsDetectorDefs::VIO_POT,
PowerHV = slsDetectorDefs::HV_POT,
GotthardVrefDS = slsDetectorDefs::G_VREF_DS,
GotthardVcascnPB = slsDetectorDefs::G_VCASCN_PB,
GotthardVcascpPB = slsDetectorDefs::G_VCASCP_PB,
GotthardVoutCM = slsDetectorDefs::G_VOUT_CM,
GotthardVcascOut = slsDetectorDefs::G_VCASC_OUT,
GotthardVinCM = slsDetectorDefs::G_VIN_CM,
GotthardVrefComp = slsDetectorDefs::G_VREF_COMP,
GotthardIBTestC = slsDetectorDefs::G_IB_TESTC,
VoltDAC0 = slsDetectorDefs::V_DAC0,
VoltDAC1 = slsDetectorDefs::V_DAC1,
VoltDAC2 = slsDetectorDefs::V_DAC2,
VoltDAC3 = slsDetectorDefs::V_DAC3,
VoltDAC4 = slsDetectorDefs::V_DAC4,
VoltDAC5 = slsDetectorDefs::V_DAC5,
VoltDAC6 = slsDetectorDefs::V_DAC6,
VoltDAC7 = slsDetectorDefs::V_DAC7,
EigerSvP = slsDetectorDefs::E_SvP,
EigerSvN = slsDetectorDefs::E_SvN,
EigerVtr = slsDetectorDefs::E_Vtr,
EigerVrf = slsDetectorDefs::E_Vrf,
EigerVrs = slsDetectorDefs::E_Vrs,
EigerVtgstv = slsDetectorDefs::E_Vtgstv,
EigerVcmpLL = slsDetectorDefs::E_Vcmp_ll,
EigerVcmpLR = slsDetectorDefs::E_Vcmp_lr,
EigerVcal = slsDetectorDefs::E_cal,
EigerVcmpRL = slsDetectorDefs::E_Vcmp_rl,
EigerVcmpRR = slsDetectorDefs::E_Vcmp_rr,
EigerRxbRB = slsDetectorDefs::E_rxb_rb,
EigerRxbLB = slsDetectorDefs::E_rxb_lb,
EigerVcp = slsDetectorDefs::E_Vcp,
EigerVcn = slsDetectorDefs::E_Vcn,
EigerVis = slsDetectorDefs::E_Vis,
IODelay = slsDetectorDefs::IO_DELAY,
ADCVpp = slsDetectorDefs::ADC_VPP,
HVNew = slsDetectorDefs::HV_NEW,
PowerA = slsDetectorDefs::V_POWER_A,
PowerB = slsDetectorDefs::V_POWER_B,
PowerC = slsDetectorDefs::V_POWER_C,
PowerD = slsDetectorDefs::V_POWER_D,
PowerIO = slsDetectorDefs::V_POWER_IO,
PowerChip = slsDetectorDefs::V_POWER_CHIP,
EigerVcmpLL = slsDetectorDefs::VCMP_LL,
EigerVcmpLR = slsDetectorDefs::VCMP_LR,
EigerVcmpRL = slsDetectorDefs::VCMP_RL,
EigerVcmpRR = slsDetectorDefs::VCMP_RR,
Threshold = slsDetectorDefs::VTHRESHOLD,
};
typedef std::map<DACIndex, std::string> DACCmdMapType;
extern DACCmdMapType DACCmdMap;
enum ADCIndex {
TempADC = slsDetectorDefs::TEMPERATURE_ADC,
TempFPGA = slsDetectorDefs::TEMPERATURE_FPGA,
......@@ -144,14 +89,10 @@ enum ADCIndex {
TempFPGAFR = slsDetectorDefs::TEMPERATURE_FPGA3,
};
typedef std::map<ADCIndex, std::string> ADCCmdMapType;
extern ADCCmdMapType ADCCmdMap;
enum ClockDiv {
FullSpeed,
HalfSpeed,
QuarterSpeed,
SuperSlowSpeed,
FullSpeed = slsDetectorDefs::FULL_SPEED,
HalfSpeed = slsDetectorDefs::HALF_SPEED,
QuarterSpeed = slsDetectorDefs::QUARTER_SPEED,
};
enum DetStatus {
......@@ -164,32 +105,24 @@ enum DetStatus {
Stopped = slsDetectorDefs::STOPPED,
};
enum NetworkParameter {
DetectorMAC = slsDetectorDefs::DETECTOR_MAC,
DetectorIP = slsDetectorDefs::DETECTOR_IP,
RecvHostName = slsDetectorDefs::RECEIVER_HOSTNAME,
RecvUDPIP = slsDetectorDefs::RECEIVER_UDP_IP,
RecvUDPPort = slsDetectorDefs::RECEIVER_UDP_PORT,
RecvUDPMAC = slsDetectorDefs::RECEIVER_UDP_MAC,
RecvUDPPort2 = slsDetectorDefs::RECEIVER_UDP_PORT2,
DetTxDelayLeft = slsDetectorDefs::DETECTOR_TXN_DELAY_LEFT,
DetTxDelayRight = slsDetectorDefs::DETECTOR_TXN_DELAY_RIGHT,
DetTxDelayFrame = slsDetectorDefs::DETECTOR_TXN_DELAY_FRAME,
FlowCtrl10G = slsDetectorDefs::FLOW_CONTROL_10G,
FlowCtrlWrPtr = slsDetectorDefs::FLOW_CONTROL_WR_PTR,
FlowCtrlRdPtr = slsDetectorDefs::FLOW_CONTROL_RD_PTR,
};
std::ostream& operator <<(std::ostream& os, TrigMode trig_mode);
std::ostream& operator <<(std::ostream& os, Settings settings);
std::ostream& operator <<(std::ostream& os, DACIndex dac_idx);
std::ostream& operator <<(std::ostream& os, ADCIndex adc_idx);
std::ostream& operator <<(std::ostream& os, ClockDiv clock_div);
std::ostream& operator <<(std::ostream& os, DetStatus status);
std::ostream& operator <<(std::ostream& os, NetworkParameter net_param);
} // namespace Defs
typedef std::vector<int> Positions;
inline Positions Idx2Pos(int idx)
{
if (idx != -1)
return {idx};
else
return {};
}
template <class T>
class PrettyList
......@@ -203,7 +136,7 @@ class PrettyList
std::ostream& print(std::ostream& os) const
{
os << "[";
int prev;
int prev = -1;
bool in_seq = false;
bool first = true;
for (const_iterator it = begin; it != end; ++it) {
......@@ -533,6 +466,12 @@ typedef RegEx::FullMatchType FullMatch;
typedef RegEx::MatchListType MatchList;
typedef MatchList::const_iterator MatchListIt;
#define EXC_CHECK(x) \
try { \
x; \
} catch (std::exception& e) { \
THROW_HW_ERROR(Error) << e.what(); \
}
} // namespace SlsDetector
......
......@@ -52,7 +52,7 @@ class Eiger : public Model
typedef Defs::ClockDiv ClockDiv;
enum ParallelMode {
NonParallel, Parallel, Safe,
NonParallel, Parallel,
};
class Correction : public LinkTask
......@@ -251,8 +251,8 @@ class Eiger : public Model
void setSubExpTime(double sub_exp_time);
void getSubExpTime(double& sub_exp_time);
void setAllTrimBits(int sub_mod_idx, int val);
void getAllTrimBits(int sub_mod_idx, int& val);
void setAllTrimBits(int mod_idx, int val);
void getAllTrimBits(int mod_idx, int& val);
void getAllTrimBitsList(IntList& val_list);
void setHighVoltage(int hvolt);
......
......@@ -28,7 +28,7 @@
#include "lima/SizeUtils.h"
#include "slsDetectorUsers.h"
#include "sls/Detector.h"
namespace lima
{
......@@ -61,9 +61,6 @@ class Model
int getNbDetModules()
{ return m_nb_det_modules; }
int getNbDetSubModules()
{ return m_nb_det_submodules; }
virtual std::string getName() = 0;
virtual void getPixelSize(double& x_size, double& y_size) = 0;
......@@ -110,10 +107,9 @@ class Model
Camera *m_cam;
Type m_type;
int m_nb_det_modules;
int m_nb_det_submodules;
protected:
AutoPtr<slsDetectorUsers> m_det;
AutoPtr<sls::Detector> m_det;
};
......
......@@ -25,7 +25,8 @@
#include "SlsDetectorFrameMap.h"
#include "SlsDetectorModel.h"
#include "slsReceiverUsers.h"
#include "sls/Receiver.h"
namespace lima
{
......@@ -40,15 +41,18 @@ class Receiver
DEB_CLASS_NAMESPC(DebModCamera, "Receiver", "SlsDetector");
public:
typedef slsReceiverDefs::sls_detector_header sls_detector_header;
typedef slsReceiverDefs::sls_receiver_header sls_receiver_header;
typedef slsReceiverDefs::receiver_image_data ImageData;
typedef slsDetectorDefs::sls_detector_header sls_detector_header;
typedef slsDetectorDefs::sls_receiver_header sls_receiver_header;
typedef slsDetectorDefs::receiver_image_data ImageData;
Receiver(Camera *cam, int idx, int rx_port);
~Receiver();
void start();
void setGapPixelsEnable(bool enable)
{ m_gap_pixels_enable = enable; }
void prepareAcq();
void setCPUAffinity(const RecvCPUAffinity& recv_affinity);
......@@ -82,7 +86,8 @@ private:
int m_idx;
int m_rx_port;
Args m_args;
AutoPtr<slsReceiverUsers> m_recv;
bool m_gap_pixels_enable;
AutoPtr<sls::Receiver> m_recv;
Stats m_stats;
};
......
......@@ -37,7 +37,6 @@ public:
SlsDetector::Model *getModel();
std::vector<std::string> getHostnameList();
int getNbDetModules();
int getNbDetSubModules();
// void setBufferCtrlObj(NumaSoftBufferCtrlObj *buffer_ctrl_obj);
......@@ -78,16 +77,16 @@ public:
void setSkipFrameFreq(unsigned long skip_frame_freq);
void getSkipFrameFreq(unsigned long& skip_frame_freq /Out/);
// setDAC: sub_mod_idx: 0-N=module, -1=all
void setDAC(int sub_mod_idx, SlsDetector::Defs::DACIndex dac_idx,
// setDAC: mod_idx: 0-N=module, -1=all
void setDAC(int mod_idx, SlsDetector::Defs::DACIndex dac_idx,
int val, bool milli_volt = false);
void getDAC(int sub_mod_idx, SlsDetector::Defs::DACIndex dac_idx,
void getDAC(int mod_idx, SlsDetector::Defs::DACIndex dac_idx,
int& val /Out/, bool milli_volt = false);
void getDACList(SlsDetector::Defs::DACIndex dac_idx,
std::vector<int>& val_list /Out/,
bool milli_volt = false);
void getADC(int sub_mod_idx, SlsDetector::Defs::ADCIndex adc_idx,
void getADC(int mod_idx, SlsDetector::Defs::ADCIndex adc_idx,
int& val /Out/);
void getADCList(SlsDetector::Defs::ADCIndex adc_idx,
std::vector<int>& val_list /Out/);
......@@ -95,11 +94,6 @@ public:
void setSettings(SlsDetector::Defs::Settings settings);
void getSettings(SlsDetector::Defs::Settings& settings /Out/);
void setNetworkParameter(SlsDetector::Defs::NetworkParameter net_param,
std::string& val /In,Out/);
void getNetworkParameter(SlsDetector::Defs::NetworkParameter net_param,
std::string& val /Out/);
void setTolerateLostPackets(bool tol_lost_packets);
void getTolerateLostPackets(bool& tol_lost_packets /Out/);
......
......@@ -164,12 +164,11 @@ namespace Defs
%End
enum TrigMode {
Auto = AUTO_TIMING,
TriggerExposure = TRIGGER_EXPOSURE,
TriggerReadout = TRIGGER_READOUT,
Gating = GATE_FIX_NUMBER,
TriggeredGating = GATE_WITH_START_TRIGGER,
Auto = AUTO_TIMING,
TriggerExposure = TRIGGER_EXPOSURE,
Gated = GATED,
BurstTrigger = BURST_TRIGGER,
TriggeredGated = TRIGGER_GATED,
SoftTriggerExposure,
};
......@@ -181,7 +180,6 @@ enum Settings {
LowGain = LOWGAIN,
MediumGain = MEDIUMGAIN,
VeryHighGain = VERYHIGHGAIN,
LowNoise = LOWNOISE,
DynamicHG0 = DYNAMICHG0,
FixGain1 = FIXGAIN1,
FixGain2 = FIXGAIN2,
......@@ -193,60 +191,11 @@ enum Settings {
};
enum DACIndex {
Threshold = THRESHOLD,
CalibPulse = CALIBRATION_PULSE,
TrimBitSize = TRIMBIT_SIZE,
PreAmp = PREAMP,
Shaper1 = SHAPER1,
Shaper2 = SHAPER2,
Humidity = HUMIDITY,
DetectorBias = DETECTOR_BIAS,
PowerVa = VA_POT,
PowerVdd = VDD_POT,
PowerVsh = VSH_POT,
PowerVio = VIO_POT,
PowerHV = HV_POT,
GotthardVrefDS = G_VREF_DS,
GotthardVcascnPB = G_VCASCN_PB,
GotthardVcascpPB = G_VCASCP_PB,
GotthardVoutCM = G_VOUT_CM,
GotthardVcascOut = G_VCASC_OUT,
GotthardVinCM = G_VIN_CM,
GotthardVrefComp = G_VREF_COMP,
GotthardIBTestC = G_IB_TESTC,
VoltDAC0 = V_DAC0,
VoltDAC1 = V_DAC1,
VoltDAC2 = V_DAC2,
VoltDAC3 = V_DAC3,
VoltDAC4 = V_DAC4,
VoltDAC5 = V_DAC5,
VoltDAC6 = V_DAC6,
VoltDAC7 = V_DAC7,
EigerSvP = E_SvP,
EigerSvN = E_SvN,
EigerVtr = E_Vtr,
EigerVrf = E_Vrf,
EigerVrs = E_Vrs,
EigerVtgstv = E_Vtgstv,
EigerVcmpLL = E_Vcmp_ll,
EigerVcmpLR = E_Vcmp_lr,
EigerVcal = E_cal,
EigerVcmpRL = E_Vcmp_rl,
EigerVcmpRR = E_Vcmp_rr,
EigerRxbRB = E_rxb_rb,
EigerRxbLB = E_rxb_lb,
EigerVcp = E_Vcp,
EigerVcn = E_Vcn,
EigerVis = E_Vis,
IODelay = IO_DELAY,
ADCVpp = ADC_VPP,
HVNew = HV_NEW,
PowerA = V_POWER_A,
PowerB = V_POWER_B,
PowerC = V_POWER_C,
PowerD = V_POWER_D,
PowerIO = V_POWER_IO,
PowerChip = V_POWER_CHIP,
EigerVcmpLL = VCMP_LL,
EigerVcmpLR = VCMP_LR,
EigerVcmpRL = VCMP_RL,
EigerVcmpRR = VCMP_RR,
Threshold = VTHRESHOLD,
};
enum ADCIndex {
......@@ -265,7 +214,6 @@ enum ClockDiv {
FullSpeed,
HalfSpeed,
QuarterSpeed,
SuperSlowSpeed,
};
enum DetStatus {
......@@ -278,22 +226,6 @@ enum DetStatus {
Stopped = STOPPED,
};
enum NetworkParameter {
DetectorMAC = DETECTOR_MAC,
DetectorIP = DETECTOR_IP,
RecvHostName = RECEIVER_HOSTNAME,
RecvUDPIP = RECEIVER_UDP_IP,
RecvUDPPort = RECEIVER_UDP_PORT,
RecvUDPMAC = RECEIVER_UDP_MAC,
RecvUDPPort2 = RECEIVER_UDP_PORT2,
DetTxDelayLeft = DETECTOR_TXN_DELAY_LEFT,
DetTxDelayRight = DETECTOR_TXN_DELAY_RIGHT,
DetTxDelayFrame = DETECTOR_TXN_DELAY_FRAME,
FlowCtrl10G = FLOW_CONTROL_10G,
FlowCtrlWrPtr = FLOW_CONTROL_WR_PTR,
FlowCtrlRdPtr = FLOW_CONTROL_RD_PTR,
};
}; // namespace Defs
......
......@@ -37,7 +37,7 @@ class Eiger : public SlsDetector::Model
public:
enum ParallelMode {
NonParallel, Parallel, Safe,
NonParallel, Parallel,
};
class Correction : public LinkTask
......@@ -80,8 +80,8 @@ class Eiger : public SlsDetector::Model
void setSubExpTime(double sub_exp_time);
void getSubExpTime(double& sub_exp_time /Out/);
void setAllTrimBits(int sub_mod_idx, int val);
void getAllTrimBits(int sub_mod_idx, int& val /Out/);
void setAllTrimBits(int mod_idx, int val);
void getAllTrimBits(int mod_idx, int& val /Out/);
void getAllTrimBitsList(std::vector<int>& val_list /Out/);
void setHighVoltage(int hvolt);
......
Subproject commit 7fb9448dfb7aa29e33aa5dd2d3d98298b208afef
Subproject commit 9913d46481ad2e289ab1a9e460ed0bf092a5c57a
......@@ -209,6 +209,10 @@ void SystemCmdPipe::start()
m_child_pid = fork();
if (m_child_pid == 0) {
// if reading the output, disable debug
if (m_pipe_list[StdOut].ptr)
DebParams::setTypeFlags(0);
m_pipe_list[StdIn].close(Pipe::WriteFd);
m_pipe_list[StdOut].close(Pipe::ReadFd);
m_pipe_list[StdErr].close(Pipe::ReadFd);
......@@ -223,15 +227,59 @@ void SystemCmdPipe::start()
}
}
void SystemCmdPipe::wait()
int SystemCmdPipe::wait()
{
DEB_MEMBER_FUNCT();
if (m_child_pid < 0)
THROW_HW_ERROR(Error) << "cmd not running";
int child_ret;
waitpid(m_child_pid, &child_ret, 0);
DEB_TRACE() << DEB_VAR1(child_ret);
m_child_pid = -1;
DEB_RETURN() << DEB_VAR1(child_ret);
return child_ret;
}
int SystemCmdPipe::wait(StringList& out, StringList& err)
{
DEB_MEMBER_FUNCT();