mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
merge fix
This commit is contained in:
commit
ef3df36e55
@ -41,6 +41,8 @@ This document describes the differences between v7.0.0 and v6.x.x
|
|||||||
- file write disabled by default
|
- file write disabled by default
|
||||||
- start non blocking acquisition at modular level
|
- start non blocking acquisition at modular level
|
||||||
- connect master commands to api (allow set master for eiger)
|
- connect master commands to api (allow set master for eiger)
|
||||||
|
- hostname cmd failed when connecting to servers in update mode (ctb, moench, jungfrau, eiger)
|
||||||
|
- missingpackets signed (negative => extra packets)
|
||||||
|
|
||||||
|
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
|
@ -1911,7 +1911,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def rx_missingpackets(self):
|
def rx_missingpackets(self):
|
||||||
"""Gets the number of missing packets for each port in receiver."""
|
"""Gets the number of missing packets for each port in receiver. Negative number denotes extra packets. """
|
||||||
return self.getNumMissingPackets()
|
return self.getNumMissingPackets()
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -490,9 +490,8 @@ void init_det(py::module &m) {
|
|||||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getFramesCaught,
|
Detector::getFramesCaught,
|
||||||
py::arg() = Positions{})
|
py::arg() = Positions{})
|
||||||
.def(
|
.def("getNumMissingPackets",
|
||||||
"getNumMissingPackets",
|
(Result<std::vector<int64_t>>(Detector::*)(sls::Positions) const) &
|
||||||
(Result<std::vector<uint64_t>>(Detector::*)(sls::Positions) const) &
|
|
||||||
Detector::getNumMissingPackets,
|
Detector::getNumMissingPackets,
|
||||||
py::arg() = Positions{})
|
py::arg() = Positions{})
|
||||||
.def("getNextFrameNumber",
|
.def("getNextFrameNumber",
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -67,7 +67,13 @@ int defaultDacValues[NDAC] = DEFAULT_DAC_VALS;
|
|||||||
int vLimit = 0;
|
int vLimit = 0;
|
||||||
enum detectorSettings thisSettings = UNINITIALIZED;
|
enum detectorSettings thisSettings = UNINITIALIZED;
|
||||||
int highvoltage = 0;
|
int highvoltage = 0;
|
||||||
|
|
||||||
|
// getNumberofchannels return 0 for y in --update mode (virtual servers)
|
||||||
|
#ifdef VIRTUAL
|
||||||
|
int nSamples = DEFAULT_NUM_SAMPLES;
|
||||||
|
#else
|
||||||
int nSamples = 1;
|
int nSamples = 1;
|
||||||
|
#endif
|
||||||
int detPos[2] = {0, 0};
|
int detPos[2] = {0, 0};
|
||||||
|
|
||||||
int isInitCheckDone() { return initCheckDone; }
|
int isInitCheckDone() { return initCheckDone; }
|
||||||
|
Binary file not shown.
@ -80,8 +80,7 @@ char scanErrMessage[MAX_STR_LENGTH] = "";
|
|||||||
/* initialization functions */
|
/* initialization functions */
|
||||||
|
|
||||||
int updateModeAllowedFunction(int file_des) {
|
int updateModeAllowedFunction(int file_des) {
|
||||||
unsigned int listsize = 19;
|
enum detFuncs allowedFuncs[] = {F_EXEC_COMMAND,
|
||||||
enum detFuncs list[] = {F_EXEC_COMMAND,
|
|
||||||
F_GET_DETECTOR_TYPE,
|
F_GET_DETECTOR_TYPE,
|
||||||
F_GET_FIRMWARE_VERSION,
|
F_GET_FIRMWARE_VERSION,
|
||||||
F_GET_SERVER_VERSION,
|
F_GET_SERVER_VERSION,
|
||||||
@ -99,9 +98,14 @@ int updateModeAllowedFunction(int file_des) {
|
|||||||
F_UPDATE_KERNEL,
|
F_UPDATE_KERNEL,
|
||||||
F_UPDATE_DETECTOR_SERVER,
|
F_UPDATE_DETECTOR_SERVER,
|
||||||
F_GET_UPDATE_MODE,
|
F_GET_UPDATE_MODE,
|
||||||
F_SET_UPDATE_MODE};
|
F_SET_UPDATE_MODE,
|
||||||
for (unsigned int i = 0; i < listsize; ++i) {
|
F_GET_NUM_CHANNELS,
|
||||||
if ((unsigned int)fnum == list[i]) {
|
F_GET_NUM_INTERFACES,
|
||||||
|
F_ACTIVATE};
|
||||||
|
size_t allowedFuncsSize = sizeof(allowedFuncs) / sizeof(enum detFuncs);
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < allowedFuncsSize; ++i) {
|
||||||
|
if ((unsigned int)fnum == allowedFuncs[i]) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,11 +594,9 @@ class Detector {
|
|||||||
|
|
||||||
Result<int64_t> getFramesCaught(Positions pos = {}) const;
|
Result<int64_t> getFramesCaught(Positions pos = {}) const;
|
||||||
|
|
||||||
/** Gets the number of missing packets for each port in receiver.
|
/** Gets the number of missing packets for each port in receiver. Negative
|
||||||
* Troubleshoot: If they are large numbers, convert it to signed to get
|
* number denotes extra packets. */
|
||||||
* number of access packets received */
|
Result<std::vector<int64_t>> getNumMissingPackets(Positions pos = {}) const;
|
||||||
Result<std::vector<uint64_t>>
|
|
||||||
getNumMissingPackets(Positions pos = {}) const;
|
|
||||||
|
|
||||||
/** [Eiger][Jungfrau][Moench][CTB] */
|
/** [Eiger][Jungfrau][Moench][CTB] */
|
||||||
Result<uint64_t> getNextFrameNumber(Positions pos = {}) const;
|
Result<uint64_t> getNextFrameNumber(Positions pos = {}) const;
|
||||||
|
@ -1537,7 +1537,8 @@ class CmdProxy {
|
|||||||
"\n\tNumber of frames caught by receiver.");
|
"\n\tNumber of frames caught by receiver.");
|
||||||
|
|
||||||
GET_COMMAND(rx_missingpackets, getNumMissingPackets,
|
GET_COMMAND(rx_missingpackets, getNumMissingPackets,
|
||||||
"\n\tNumber of missing packets for each port in receiver.");
|
"\n\tNumber of missing packets for each port in receiver. "
|
||||||
|
"Negative number denotes extra packets.");
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(
|
||||||
nextframenumber, getNextFrameNumber, setNextFrameNumber,
|
nextframenumber, getNextFrameNumber, setNextFrameNumber,
|
||||||
|
@ -776,7 +776,7 @@ void Detector::startDetector(Positions pos) {
|
|||||||
for (unsigned int i = 0; i < is_master.size(); ++i) {
|
for (unsigned int i = 0; i < is_master.size(); ++i) {
|
||||||
if (is_master[i]) {
|
if (is_master[i]) {
|
||||||
masterPosition = i;
|
masterPosition = i;
|
||||||
slaves.erase(pos.begin() + i);
|
slaves.erase(slaves.begin() + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||||
@ -808,7 +808,7 @@ Result<int64_t> Detector::getFramesCaught(Positions pos) const {
|
|||||||
return pimpl->Parallel(&Module::getFramesCaughtByReceiver, pos);
|
return pimpl->Parallel(&Module::getFramesCaughtByReceiver, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<std::vector<uint64_t>>
|
Result<std::vector<int64_t>>
|
||||||
Detector::getNumMissingPackets(Positions pos) const {
|
Detector::getNumMissingPackets(Positions pos) const {
|
||||||
return pimpl->Parallel(&Module::getNumMissingPackets, pos);
|
return pimpl->Parallel(&Module::getNumMissingPackets, pos);
|
||||||
}
|
}
|
||||||
|
@ -876,7 +876,7 @@ int64_t Module::getFramesCaughtByReceiver() const {
|
|||||||
return sendToReceiver<int64_t>(F_GET_RECEIVER_FRAMES_CAUGHT);
|
return sendToReceiver<int64_t>(F_GET_RECEIVER_FRAMES_CAUGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<uint64_t> Module::getNumMissingPackets() const {
|
std::vector<int64_t> Module::getNumMissingPackets() const {
|
||||||
// TODO!(Erik) Refactor
|
// TODO!(Erik) Refactor
|
||||||
LOG(logDEBUG1) << "Getting num missing packets";
|
LOG(logDEBUG1) << "Getting num missing packets";
|
||||||
if (shm()->useReceiverFlag) {
|
if (shm()->useReceiverFlag) {
|
||||||
@ -888,7 +888,7 @@ std::vector<uint64_t> Module::getNumMissingPackets() const {
|
|||||||
" returned error: " + client.readErrorMessage());
|
" returned error: " + client.readErrorMessage());
|
||||||
} else {
|
} else {
|
||||||
auto nports = client.Receive<int>();
|
auto nports = client.Receive<int>();
|
||||||
std::vector<uint64_t> retval(nports);
|
std::vector<int64_t> retval(nports);
|
||||||
client.Receive(retval);
|
client.Receive(retval);
|
||||||
LOG(logDEBUG1) << "Missing packets of Receiver" << moduleIndex
|
LOG(logDEBUG1) << "Missing packets of Receiver" << moduleIndex
|
||||||
<< ": " << sls::ToString(retval);
|
<< ": " << sls::ToString(retval);
|
||||||
|
@ -204,7 +204,7 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
runStatus getReceiverStatus() const;
|
runStatus getReceiverStatus() const;
|
||||||
double getReceiverProgress() const;
|
double getReceiverProgress() const;
|
||||||
int64_t getFramesCaughtByReceiver() const;
|
int64_t getFramesCaughtByReceiver() const;
|
||||||
std::vector<uint64_t> getNumMissingPackets() const;
|
std::vector<int64_t> getNumMissingPackets() const;
|
||||||
uint64_t getNextFrameNumber() const;
|
uint64_t getNextFrameNumber() const;
|
||||||
void setNextFrameNumber(uint64_t value);
|
void setNextFrameNumber(uint64_t value);
|
||||||
void sendSoftwareTrigger(const bool block);
|
void sendSoftwareTrigger(const bool block);
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#define APIRECEIVER 0x211124
|
#define APIRECEIVER 0x211124
|
||||||
#define APIGUI 0x211124
|
#define APIGUI 0x211124
|
||||||
|
|
||||||
#define APICTB 0x220203
|
#define APICTB 0x220223
|
||||||
#define APIGOTTHARD 0x220203
|
#define APIGOTTHARD 0x220223
|
||||||
#define APIGOTTHARD2 0x220203
|
#define APIGOTTHARD2 0x220223
|
||||||
#define APIJUNGFRAU 0x220203
|
#define APIJUNGFRAU 0x220223
|
||||||
#define APIMYTHEN3 0x220203
|
#define APIMYTHEN3 0x220223
|
||||||
#define APIMOENCH 0x220203
|
#define APIMOENCH 0x220223
|
||||||
#define APIEIGER 0x220207
|
#define APIEIGER 0x220223
|
||||||
|
Loading…
x
Reference in New Issue
Block a user