This commit is contained in:
Erik Frojdh 2020-08-05 09:13:53 +02:00
parent de39310a9c
commit ab05da4d0e
3 changed files with 50 additions and 286 deletions

View File

@ -878,12 +878,7 @@ int ClientInterface::set_master_file_write(Interface &socket) {
std::to_string(enable)); std::to_string(enable));
} }
verifyIdle(socket); verifyIdle(socket);
LOG(logDEBUG1) << "Setting Master File write enable:" << enable;
impl()->setMasterFileWriteEnable(enable); impl()->setMasterFileWriteEnable(enable);
int retval = impl()->getMasterFileWriteEnable();
validate(enable, retval, "set master file write enable", DEC);
LOG(logDEBUG1) << "master file write enable:" << retval;
return socket.Send(OK); return socket.Send(OK);
} }
@ -900,12 +895,7 @@ int ClientInterface::set_overwrite(Interface &socket) {
std::to_string(index)); std::to_string(index));
} }
verifyIdle(socket); verifyIdle(socket);
LOG(logDEBUG1) << "Setting File overwrite enable:" << index;
impl()->setOverwriteEnable(index); impl()->setOverwriteEnable(index);
int retval = impl()->getOverwriteEnable();
validate(index, retval, "set file overwrite enable", DEC);
LOG(logDEBUG1) << "file overwrite enable:" << retval;
return socket.Send(OK); return socket.Send(OK);
} }
@ -984,10 +974,6 @@ int ClientInterface::set_streaming(Interface &socket) {
throw RuntimeError("Could not set data stream enable to " + throw RuntimeError("Could not set data stream enable to " +
std::to_string(index)); std::to_string(index));
} }
auto retval = static_cast<int>(impl()->getDataStreamEnable());
validate(index, retval, "set data stream enable", DEC);
LOG(logDEBUG1) << "data streaming enable:" << retval;
return socket.Send(OK); return socket.Send(OK);
} }
@ -1331,7 +1317,7 @@ int ClientInterface::set_dbit_list(Interface &socket) {
for (auto &it : args) { for (auto &it : args) {
LOG(logDEBUG1) << it << " "; LOG(logDEBUG1) << it << " ";
} }
LOG(logDEBUG1) << "\n"; LOG(logDEBUG1) << '\n';
verifyIdle(socket); verifyIdle(socket);
impl()->setDbitList(args); impl()->setDbitList(args);
return socket.Send(OK); return socket.Send(OK);
@ -1356,10 +1342,6 @@ int ClientInterface::set_dbit_offset(Interface &socket) {
verifyIdle(socket); verifyIdle(socket);
LOG(logDEBUG1) << "Setting Dbit offset: " << arg; LOG(logDEBUG1) << "Setting Dbit offset: " << arg;
impl()->setDbitOffset(arg); impl()->setDbitOffset(arg);
int retval = impl()->getDbitOffset();
validate(arg, retval, "set dbit offset", DEC);
LOG(logDEBUG1) << "Dbit offset retval: " << retval;
return socket.Send(OK); return socket.Send(OK);
} }

View File

@ -23,23 +23,15 @@
/** cosntructor & destructor */ /** cosntructor & destructor */
Implementation::Implementation(const detectorType d) { Implementation::Implementation(const detectorType d) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
InitializeMembers(); InitializeMembers();
setDetectorType(d); setDetectorType(d);
} }
Implementation::~Implementation() { Implementation::~Implementation() { DeleteMembers(); }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
DeleteMembers();
}
void Implementation::DeleteMembers() { void Implementation::DeleteMembers() {
LOG(logDEBUG3) << __SHORT_AT__ << " called"; delete generalData;
if (generalData) { generalData = nullptr;
delete generalData;
generalData = nullptr;
}
additionalJsonHeader.clear(); additionalJsonHeader.clear();
listener.clear(); listener.clear();
dataProcessor.clear(); dataProcessor.clear();
@ -52,8 +44,6 @@ void Implementation::DeleteMembers() {
} }
void Implementation::InitializeMembers() { void Implementation::InitializeMembers() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
// config parameters // config parameters
numThreads = 1; numThreads = 1;
myDetectorType = GENERIC; myDetectorType = GENERIC;
@ -151,8 +141,6 @@ void Implementation::InitializeMembers() {
} }
void Implementation::SetLocalNetworkParameters() { void Implementation::SetLocalNetworkParameters() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
// to increase Max length of input packet queue // to increase Max length of input packet queue
int max_back_log; int max_back_log;
const char *proc_file_name = "/proc/sys/net/core/netdev_max_backlog"; const char *proc_file_name = "/proc/sys/net/core/netdev_max_backlog";
@ -179,15 +167,11 @@ void Implementation::SetLocalNetworkParameters() {
} }
void Implementation::SetThreadPriorities() { void Implementation::SetThreadPriorities() {
LOG(logDEBUG3) << __SHORT_AT__ << " called"; for (const auto &it : listener)
for (const auto &it : listener) {
it->SetThreadPriority(LISTENER_PRIORITY); it->SetThreadPriority(LISTENER_PRIORITY);
}
} }
void Implementation::SetupFifoStructure() { void Implementation::SetupFifoStructure() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
fifo.clear(); fifo.clear();
for (int i = 0; i < numThreads; ++i) { for (int i = 0; i < numThreads; ++i) {
uint32_t datasize = generalData->imageSize; uint32_t datasize = generalData->imageSize;
@ -222,7 +206,6 @@ void Implementation::SetupFifoStructure() {
(double)(1024 * 1024) (double)(1024 * 1024)
<< " MB"; << " MB";
} }
LOG(logINFO) << numThreads << " Fifo structure(s) reconstructed"; LOG(logINFO) << numThreads << " Fifo structure(s) reconstructed";
} }
@ -233,7 +216,6 @@ void Implementation::SetupFifoStructure() {
* ************************************************/ * ************************************************/
void Implementation::setDetectorType(const detectorType d) { void Implementation::setDetectorType(const detectorType d) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
myDetectorType = d; myDetectorType = d;
switch (myDetectorType) { switch (myDetectorType) {
case GOTTHARD: case GOTTHARD:
@ -311,7 +293,6 @@ void Implementation::setDetectorType(const detectorType d) {
} }
// set up writer and callbacks // set up writer and callbacks
for (const auto &it : listener) for (const auto &it : listener)
it->SetGeneralData(generalData); it->SetGeneralData(generalData);
for (const auto &it : dataProcessor) for (const auto &it : dataProcessor)
@ -321,13 +302,9 @@ void Implementation::setDetectorType(const detectorType d) {
LOG(logDEBUG) << " Detector type set to " << sls::ToString(d); LOG(logDEBUG) << " Detector type set to " << sls::ToString(d);
} }
int *Implementation::getDetectorSize() const { int *Implementation::getDetectorSize() const { return (int *)numDet; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return (int *)numDet;
}
void Implementation::setDetectorSize(const int *size) { void Implementation::setDetectorSize(const int *size) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
std::string log_message = "Detector Size (ports): ("; std::string log_message = "Detector Size (ports): (";
for (int i = 0; i < MAX_DIMENSIONS; ++i) { for (int i = 0; i < MAX_DIMENSIONS; ++i) {
// x dir (colums) each udp port // x dir (colums) each udp port
@ -356,13 +333,9 @@ void Implementation::setDetectorSize(const int *size) {
LOG(logINFO) << log_message; LOG(logINFO) << log_message;
} }
int Implementation::getModulePositionId() const { int Implementation::getModulePositionId() const { return modulePos; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return modulePos;
}
void Implementation::setModulePositionId(const int id) { void Implementation::setModulePositionId(const int id) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
modulePos = id; modulePos = id;
LOG(logINFO) << "Module Position Id:" << modulePos; LOG(logINFO) << "Module Position Id:" << modulePos;
@ -387,10 +360,7 @@ void Implementation::setModulePositionId(const int id) {
} }
} }
std::string Implementation::getDetectorHostname() const { std::string Implementation::getDetectorHostname() const { return detHostname; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return detHostname;
}
void Implementation::setDetectorHostname(const std::string &c) { void Implementation::setDetectorHostname(const std::string &c) {
if (!c.empty()) if (!c.empty())
@ -398,19 +368,14 @@ void Implementation::setDetectorHostname(const std::string &c) {
LOG(logINFO) << "Detector Hostname: " << detHostname; LOG(logINFO) << "Detector Hostname: " << detHostname;
} }
bool Implementation::getSilentMode() const { bool Implementation::getSilentMode() const { return silentMode; }
return silentMode;
}
void Implementation::setSilentMode(const bool i) { void Implementation::setSilentMode(const bool i) {
silentMode = i; silentMode = i;
LOG(logINFO) << "Silent Mode: " << i; LOG(logINFO) << "Silent Mode: " << i;
} }
uint32_t Implementation::getFifoDepth() const { uint32_t Implementation::getFifoDepth() const { return fifoDepth; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return fifoDepth;
}
void Implementation::setFifoDepth(const uint32_t i) { void Implementation::setFifoDepth(const uint32_t i) {
if (fifoDepth != i) { if (fifoDepth != i) {
@ -422,7 +387,6 @@ void Implementation::setFifoDepth(const uint32_t i) {
slsDetectorDefs::frameDiscardPolicy slsDetectorDefs::frameDiscardPolicy
Implementation::getFrameDiscardPolicy() const { Implementation::getFrameDiscardPolicy() const {
return frameDiscardMode; return frameDiscardMode;
} }
@ -431,9 +395,7 @@ void Implementation::setFrameDiscardPolicy(const frameDiscardPolicy i) {
LOG(logINFO) << "Frame Discard Policy: " << sls::ToString(frameDiscardMode); LOG(logINFO) << "Frame Discard Policy: " << sls::ToString(frameDiscardMode);
} }
bool Implementation::getFramePaddingEnable() const { bool Implementation::getFramePaddingEnable() const { return framePadding; }
return framePadding;
}
void Implementation::setFramePaddingEnable(const bool i) { void Implementation::setFramePaddingEnable(const bool i) {
framePadding = i; framePadding = i;
@ -446,8 +408,6 @@ void Implementation::setThreadIds(const pid_t parentTid, const pid_t tcpTid) {
} }
std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const { std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
std::array<pid_t, NUM_RX_THREAD_IDS> retval{}; std::array<pid_t, NUM_RX_THREAD_IDS> retval{};
int id = 0; int id = 0;
retval[id++] = parentThreadId; retval[id++] = parentThreadId;
@ -477,7 +437,6 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const {
* * * *
* ************************************************/ * ************************************************/
slsDetectorDefs::fileFormat Implementation::getFileFormat() const { slsDetectorDefs::fileFormat Implementation::getFileFormat() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return fileFormatType; return fileFormatType;
} }
@ -499,14 +458,9 @@ void Implementation::setFileFormat(const fileFormat f) {
LOG(logINFO) << "File Format: " << sls::ToString(fileFormatType); LOG(logINFO) << "File Format: " << sls::ToString(fileFormatType);
} }
std::string Implementation::getFilePath() const { std::string Implementation::getFilePath() const { return filePath; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return filePath;
}
void Implementation::setFilePath(const std::string &c) { void Implementation::setFilePath(const std::string &c) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
if (!c.empty()) { if (!c.empty()) {
mkdir_p(c); // throws if it can't create mkdir_p(c); // throws if it can't create
filePath = c; filePath = c;
@ -514,33 +468,21 @@ void Implementation::setFilePath(const std::string &c) {
LOG(logINFO) << "File path: " << filePath; LOG(logINFO) << "File path: " << filePath;
} }
std::string Implementation::getFileName() const { std::string Implementation::getFileName() const { return fileName; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return fileName;
}
void Implementation::setFileName(const std::string &c) { void Implementation::setFileName(const std::string &c) {
LOG(logDEBUG3) << __SHORT_AT__ << " called"; fileName = c;
if (!c.empty())
fileName = c;
LOG(logINFO) << "File name: " << fileName; LOG(logINFO) << "File name: " << fileName;
} }
uint64_t Implementation::getFileIndex() const { uint64_t Implementation::getFileIndex() const { return fileIndex; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return fileIndex;
}
void Implementation::setFileIndex(const uint64_t i) { void Implementation::setFileIndex(const uint64_t i) {
fileIndex = i; fileIndex = i;
LOG(logINFO) << "File Index: " << fileIndex; LOG(logINFO) << "File Index: " << fileIndex;
} }
bool Implementation::getFileWriteEnable() const { bool Implementation::getFileWriteEnable() const { return fileWriteEnable; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return fileWriteEnable;
}
void Implementation::setFileWriteEnable(const bool b) { void Implementation::setFileWriteEnable(const bool b) {
if (fileWriteEnable != b) { if (fileWriteEnable != b) {
@ -553,27 +495,21 @@ void Implementation::setFileWriteEnable(const bool b) {
&udpPortNum[i], generalData); &udpPortNum[i], generalData);
} }
} }
LOG(logINFO) << "File Write Enable: " LOG(logINFO) << "File Write Enable: "
<< (fileWriteEnable ? "enabled" : "disabled"); << (fileWriteEnable ? "enabled" : "disabled");
} }
bool Implementation::getMasterFileWriteEnable() const { bool Implementation::getMasterFileWriteEnable() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return masterFileWriteEnable; return masterFileWriteEnable;
} }
void Implementation::setMasterFileWriteEnable(const bool b) { void Implementation::setMasterFileWriteEnable(const bool b) {
masterFileWriteEnable = b; masterFileWriteEnable = b;
LOG(logINFO) << "Master File Write Enable: " LOG(logINFO) << "Master File Write Enable: "
<< (masterFileWriteEnable ? "enabled" : "disabled"); << (masterFileWriteEnable ? "enabled" : "disabled");
} }
bool Implementation::getOverwriteEnable() const { bool Implementation::getOverwriteEnable() const { return overwriteEnable; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return overwriteEnable;
}
void Implementation::setOverwriteEnable(const bool b) { void Implementation::setOverwriteEnable(const bool b) {
overwriteEnable = b; overwriteEnable = b;
@ -581,9 +517,7 @@ void Implementation::setOverwriteEnable(const bool b) {
<< (overwriteEnable ? "enabled" : "disabled"); << (overwriteEnable ? "enabled" : "disabled");
} }
uint32_t Implementation::getFramesPerFile() const { uint32_t Implementation::getFramesPerFile() const { return framesPerFile; }
return framesPerFile;
}
void Implementation::setFramesPerFile(const uint32_t i) { void Implementation::setFramesPerFile(const uint32_t i) {
framesPerFile = i; framesPerFile = i;
@ -595,10 +529,7 @@ void Implementation::setFramesPerFile(const uint32_t i) {
* Acquisition * * Acquisition *
* * * *
* ************************************************/ * ************************************************/
slsDetectorDefs::runStatus Implementation::getStatus() const { slsDetectorDefs::runStatus Implementation::getStatus() const { return status; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return status;
}
uint64_t Implementation::getFramesCaught() const { uint64_t Implementation::getFramesCaught() const {
uint64_t min = -1; uint64_t min = -1;
@ -606,8 +537,7 @@ uint64_t Implementation::getFramesCaught() const {
for (const auto &it : dataProcessor) { for (const auto &it : dataProcessor) {
flagsum += it->GetStartedFlag(); flagsum += it->GetStartedFlag();
uint64_t curr = it->GetNumFramesCaught(); min = std::min(min, it->GetNumFramesCaught());
min = curr < min ? curr : min;
} }
// no data processed // no data processed
if (flagsum != dataProcessor.size()) if (flagsum != dataProcessor.size())
@ -622,13 +552,11 @@ uint64_t Implementation::getAcquisitionIndex() const {
for (const auto &it : dataProcessor) { for (const auto &it : dataProcessor) {
flagsum += it->GetStartedFlag(); flagsum += it->GetStartedFlag();
uint64_t curr = it->GetCurrentFrameIndex(); min = std::min(min, it->GetCurrentFrameIndex());
min = curr < min ? curr : min;
} }
// no data processed // no data processed
if (flagsum != dataProcessor.size()) if (flagsum != dataProcessor.size())
return 0; return 0;
return min; return min;
} }
@ -639,8 +567,8 @@ int Implementation::getProgress() const {
for (const auto &it : dataProcessor) { for (const auto &it : dataProcessor) {
flagsum += it->GetStartedFlag(); flagsum += it->GetStartedFlag();
uint64_t curr = it->GetProcessedIndex(); currentFrameIndex =
currentFrameIndex = curr < currentFrameIndex ? curr : currentFrameIndex; std::min(currentFrameIndex, it->GetProcessedIndex());
} }
// no data processed // no data processed
if (flagsum != dataProcessor.size()) { if (flagsum != dataProcessor.size()) {
@ -667,7 +595,6 @@ std::vector<uint64_t> Implementation::getNumMissingPackets() const {
} }
void Implementation::startReceiver() { void Implementation::startReceiver() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
LOG(logINFO) << "Starting Receiver"; LOG(logINFO) << "Starting Receiver";
stoppedFlag = false; stoppedFlag = false;
ResetParametersforNewAcquisition(); ResetParametersforNewAcquisition();
@ -707,7 +634,6 @@ void Implementation::startReceiver() {
void Implementation::setStoppedFlag(bool stopped) { stoppedFlag = stopped; } void Implementation::setStoppedFlag(bool stopped) { stoppedFlag = stopped; }
void Implementation::stopReceiver() { void Implementation::stopReceiver() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
LOG(logINFO) << "Stopping Receiver"; LOG(logINFO) << "Stopping Receiver";
// set status to transmitting // set status to transmitting
@ -782,13 +708,11 @@ void Implementation::stopReceiver() {
// change status // change status
status = IDLE; status = IDLE;
LOG(logINFO) << "Receiver Stopped"; LOG(logINFO) << "Receiver Stopped";
LOG(logINFO) << "Status: " << sls::ToString(status); LOG(logINFO) << "Status: " << sls::ToString(status);
} }
void Implementation::startReadout() { void Implementation::startReadout() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
if (status == RUNNING) { if (status == RUNNING) {
// wait for incoming delayed packets // wait for incoming delayed packets
int totalPacketsReceived = 0; int totalPacketsReceived = 0;
@ -826,13 +750,11 @@ void Implementation::startReadout() {
} }
void Implementation::shutDownUDPSockets() { void Implementation::shutDownUDPSockets() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
for (const auto &it : listener) for (const auto &it : listener)
it->ShutDownUDPSocket(); it->ShutDownUDPSocket();
} }
void Implementation::closeFiles() { void Implementation::closeFiles() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
uint64_t maxIndexCaught = 0; uint64_t maxIndexCaught = 0;
bool anycaught = false; bool anycaught = false;
for (const auto &it : dataProcessor) { for (const auto &it : dataProcessor) {
@ -847,16 +769,12 @@ void Implementation::closeFiles() {
} }
void Implementation::restreamStop() { void Implementation::restreamStop() {
LOG(logDEBUG3) << __SHORT_AT__ << " called"; for (const auto &it : dataStreamer)
for (const auto &it : dataStreamer) {
it->RestreamStop(); it->RestreamStop();
}
LOG(logINFO) << "Restreaming Dummy Header via ZMQ successful"; LOG(logINFO) << "Restreaming Dummy Header via ZMQ successful";
} }
void Implementation::ResetParametersforNewAcquisition() { void Implementation::ResetParametersforNewAcquisition() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
for (const auto &it : listener) for (const auto &it : listener)
it->ResetParametersforNewAcquisition(); it->ResetParametersforNewAcquisition();
for (const auto &it : dataProcessor) for (const auto &it : dataProcessor)
@ -872,8 +790,6 @@ void Implementation::ResetParametersforNewAcquisition() {
} }
void Implementation::CreateUDPSockets() { void Implementation::CreateUDPSockets() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
try { try {
for (unsigned int i = 0; i < listener.size(); ++i) { for (unsigned int i = 0; i < listener.size(); ++i) {
listener[i]->CreateUDPSockets(); listener[i]->CreateUDPSockets();
@ -882,12 +798,10 @@ void Implementation::CreateUDPSockets() {
shutDownUDPSockets(); shutDownUDPSockets();
throw sls::RuntimeError("Could not create UDP Socket(s)."); throw sls::RuntimeError("Could not create UDP Socket(s).");
} }
LOG(logDEBUG) << "UDP socket(s) created successfully."; LOG(logDEBUG) << "UDP socket(s) created successfully.";
} }
void Implementation::SetupWriter() { void Implementation::SetupWriter() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
std::unique_ptr<MasterAttributes> masterAttributes; std::unique_ptr<MasterAttributes> masterAttributes;
switch (myDetectorType) { switch (myDetectorType) {
case GOTTHARD: case GOTTHARD:
@ -964,7 +878,7 @@ void Implementation::SetupWriter() {
} }
void Implementation::StartRunning() { void Implementation::StartRunning() {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
// set running mask and post semaphore to start the inner loop in execution // set running mask and post semaphore to start the inner loop in execution
// thread // thread
for (const auto &it : listener) { for (const auto &it : listener) {
@ -987,12 +901,10 @@ void Implementation::StartRunning() {
* * * *
* ************************************************/ * ************************************************/
int Implementation::getNumberofUDPInterfaces() const { int Implementation::getNumberofUDPInterfaces() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numUDPInterfaces; return numUDPInterfaces;
} }
void Implementation::setNumberofUDPInterfaces(const int n) { void Implementation::setNumberofUDPInterfaces(const int n) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
if (numUDPInterfaces != n) { if (numUDPInterfaces != n) {
@ -1102,63 +1014,41 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
LOG(logINFO) << "Number of Interfaces: " << numUDPInterfaces; LOG(logINFO) << "Number of Interfaces: " << numUDPInterfaces;
} }
std::string Implementation::getEthernetInterface() const { std::string Implementation::getEthernetInterface() const { return eth[0]; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return eth[0];
}
void Implementation::setEthernetInterface(const std::string &c) { void Implementation::setEthernetInterface(const std::string &c) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
eth[0] = c; eth[0] = c;
LOG(logINFO) << "Ethernet Interface: " << eth[0]; LOG(logINFO) << "Ethernet Interface: " << eth[0];
} }
std::string Implementation::getEthernetInterface2() const { std::string Implementation::getEthernetInterface2() const { return eth[1]; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return eth[1];
}
void Implementation::setEthernetInterface2(const std::string &c) { void Implementation::setEthernetInterface2(const std::string &c) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
eth[1] = c; eth[1] = c;
LOG(logINFO) << "Ethernet Interface 2: " << eth[1]; LOG(logINFO) << "Ethernet Interface 2: " << eth[1];
} }
uint32_t Implementation::getUDPPortNumber() const { uint32_t Implementation::getUDPPortNumber() const { return udpPortNum[0]; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return udpPortNum[0];
}
void Implementation::setUDPPortNumber(const uint32_t i) { void Implementation::setUDPPortNumber(const uint32_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
udpPortNum[0] = i; udpPortNum[0] = i;
LOG(logINFO) << "UDP Port Number[0]: " << udpPortNum[0]; LOG(logINFO) << "UDP Port Number[0]: " << udpPortNum[0];
} }
uint32_t Implementation::getUDPPortNumber2() const { uint32_t Implementation::getUDPPortNumber2() const { return udpPortNum[1]; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return udpPortNum[1];
}
void Implementation::setUDPPortNumber2(const uint32_t i) { void Implementation::setUDPPortNumber2(const uint32_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
udpPortNum[1] = i; udpPortNum[1] = i;
LOG(logINFO) << "UDP Port Number[1]: " << udpPortNum[1]; LOG(logINFO) << "UDP Port Number[1]: " << udpPortNum[1];
} }
int64_t Implementation::getUDPSocketBufferSize() const { int64_t Implementation::getUDPSocketBufferSize() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return udpSocketBufferSize; return udpSocketBufferSize;
} }
void Implementation::setUDPSocketBufferSize(const int64_t s) { void Implementation::setUDPSocketBufferSize(const int64_t s) {
int64_t size = (s == 0) ? udpSocketBufferSize : s; int64_t size = (s == 0) ? udpSocketBufferSize : s;
size_t listSize = listener.size(); size_t listSize = listener.size();
if (myDetectorType == JUNGFRAU && (int)listSize != numUDPInterfaces) { if (myDetectorType == JUNGFRAU && (int)listSize != numUDPInterfaces) {
throw sls::RuntimeError( throw sls::RuntimeError(
"Number of Interfaces " + std::to_string(numUDPInterfaces) + "Number of Interfaces " + std::to_string(numUDPInterfaces) +
@ -1171,7 +1061,6 @@ void Implementation::setUDPSocketBufferSize(const int64_t s) {
} }
int64_t Implementation::getActualUDPSocketBufferSize() const { int64_t Implementation::getActualUDPSocketBufferSize() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return actualUDPSocketBufferSize; return actualUDPSocketBufferSize;
} }
@ -1180,13 +1069,9 @@ int64_t Implementation::getActualUDPSocketBufferSize() const {
* ZMQ Streaming Parameters (ZMQ) * * ZMQ Streaming Parameters (ZMQ) *
* * * *
* ************************************************/ * ************************************************/
bool Implementation::getDataStreamEnable() const { bool Implementation::getDataStreamEnable() const { return dataStreamEnable; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return dataStreamEnable;
}
void Implementation::setDataStreamEnable(const bool enable) { void Implementation::setDataStreamEnable(const bool enable) {
if (dataStreamEnable != enable) { if (dataStreamEnable != enable) {
dataStreamEnable = enable; dataStreamEnable = enable;
@ -1225,7 +1110,6 @@ void Implementation::setDataStreamEnable(const bool enable) {
} }
uint32_t Implementation::getStreamingFrequency() const { uint32_t Implementation::getStreamingFrequency() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return streamingFrequency; return streamingFrequency;
} }
@ -1235,19 +1119,15 @@ void Implementation::setStreamingFrequency(const uint32_t freq) {
} }
uint32_t Implementation::getStreamingTimer() const { uint32_t Implementation::getStreamingTimer() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return streamingTimerInMs; return streamingTimerInMs;
} }
void Implementation::setStreamingTimer(const uint32_t time_in_ms) { void Implementation::setStreamingTimer(const uint32_t time_in_ms) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
streamingTimerInMs = time_in_ms; streamingTimerInMs = time_in_ms;
LOG(logINFO) << "Streamer Timer: " << streamingTimerInMs; LOG(logINFO) << "Streamer Timer: " << streamingTimerInMs;
} }
uint32_t Implementation::getStreamingStartingFrameNumber() const { uint32_t Implementation::getStreamingStartingFrameNumber() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return streamingStartFnum; return streamingStartFnum;
} }
@ -1256,9 +1136,7 @@ void Implementation::setStreamingStartingFrameNumber(const uint32_t fnum) {
LOG(logINFO) << "Streaming Start Frame num: " << streamingStartFnum; LOG(logINFO) << "Streaming Start Frame num: " << streamingStartFnum;
} }
uint32_t Implementation::getStreamingPort() const { uint32_t Implementation::getStreamingPort() const { return streamingPort; }
return streamingPort;
}
void Implementation::setStreamingPort(const uint32_t i) { void Implementation::setStreamingPort(const uint32_t i) {
streamingPort = i; streamingPort = i;
@ -1281,7 +1159,7 @@ Implementation::getAdditionalJsonHeader() const {
void Implementation::setAdditionalJsonHeader( void Implementation::setAdditionalJsonHeader(
const std::map<std::string, std::string> &c) { const std::map<std::string, std::string> &c) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
additionalJsonHeader = c; additionalJsonHeader = c;
for (const auto &it : dataStreamer) { for (const auto &it : dataStreamer) {
it->SetAdditionalJsonHeader(c); it->SetAdditionalJsonHeader(c);
@ -1302,7 +1180,6 @@ Implementation::getAdditionalJsonParameter(const std::string &key) const {
void Implementation::setAdditionalJsonParameter(const std::string &key, void Implementation::setAdditionalJsonParameter(const std::string &key,
const std::string &value) { const std::string &value) {
auto pos = additionalJsonHeader.find(key); auto pos = additionalJsonHeader.find(key);
// if value is empty, delete // if value is empty, delete
if (value.empty()) { if (value.empty()) {
// doesnt exist // doesnt exist
@ -1359,49 +1236,37 @@ void Implementation::updateTotalNumberOfFrames() {
LOG(logINFO) << "Total Number of Frames: " << numberOfTotalFrames; LOG(logINFO) << "Total Number of Frames: " << numberOfTotalFrames;
} }
uint64_t Implementation::getNumberOfFrames() const { uint64_t Implementation::getNumberOfFrames() const { return numberOfFrames; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfFrames;
}
void Implementation::setNumberOfFrames(const uint64_t i) { void Implementation::setNumberOfFrames(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
numberOfFrames = i; numberOfFrames = i;
LOG(logINFO) << "Number of Frames: " << numberOfFrames; LOG(logINFO) << "Number of Frames: " << numberOfFrames;
updateTotalNumberOfFrames(); updateTotalNumberOfFrames();
} }
uint64_t Implementation::getNumberOfTriggers() const { uint64_t Implementation::getNumberOfTriggers() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfTriggers; return numberOfTriggers;
} }
void Implementation::setNumberOfTriggers(const uint64_t i) { void Implementation::setNumberOfTriggers(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
numberOfTriggers = i; numberOfTriggers = i;
LOG(logINFO) << "Number of Triggers: " << numberOfTriggers; LOG(logINFO) << "Number of Triggers: " << numberOfTriggers;
updateTotalNumberOfFrames(); updateTotalNumberOfFrames();
} }
uint64_t Implementation::getNumberOfBursts() const { uint64_t Implementation::getNumberOfBursts() const { return numberOfBursts; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfBursts;
}
void Implementation::setNumberOfBursts(const uint64_t i) { void Implementation::setNumberOfBursts(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
numberOfBursts = i; numberOfBursts = i;
LOG(logINFO) << "Number of Bursts: " << numberOfBursts; LOG(logINFO) << "Number of Bursts: " << numberOfBursts;
updateTotalNumberOfFrames(); updateTotalNumberOfFrames();
} }
int Implementation::getNumberOfAdditionalStorageCells() const { int Implementation::getNumberOfAdditionalStorageCells() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfAdditionalStorageCells; return numberOfAdditionalStorageCells;
} }
void Implementation::setNumberOfAdditionalStorageCells(const int i) { void Implementation::setNumberOfAdditionalStorageCells(const int i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
numberOfAdditionalStorageCells = i; numberOfAdditionalStorageCells = i;
LOG(logINFO) << "Number of Additional Storage Cells: " LOG(logINFO) << "Number of Additional Storage Cells: "
<< numberOfAdditionalStorageCells; << numberOfAdditionalStorageCells;
@ -1409,13 +1274,11 @@ void Implementation::setNumberOfAdditionalStorageCells(const int i) {
} }
void Implementation::setNumberOfGates(const int i) { void Implementation::setNumberOfGates(const int i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
numberOfGates = i; numberOfGates = i;
LOG(logINFO) << "Number of Gates: " << numberOfGates; LOG(logINFO) << "Number of Gates: " << numberOfGates;
} }
slsDetectorDefs::timingMode Implementation::getTimingMode() const { slsDetectorDefs::timingMode Implementation::getTimingMode() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return timingMode; return timingMode;
} }
@ -1426,7 +1289,6 @@ void Implementation::setTimingMode(const slsDetectorDefs::timingMode i) {
} }
slsDetectorDefs::burstMode Implementation::getBurstMode() const { slsDetectorDefs::burstMode Implementation::getBurstMode() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return burstMode; return burstMode;
} }
@ -1437,22 +1299,16 @@ void Implementation::setBurstMode(const slsDetectorDefs::burstMode i) {
} }
uint64_t Implementation::getAcquisitionPeriod() const { uint64_t Implementation::getAcquisitionPeriod() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return acquisitionPeriod; return acquisitionPeriod;
} }
void Implementation::setAcquisitionPeriod(const uint64_t i) { void Implementation::setAcquisitionPeriod(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
acquisitionPeriod = i; acquisitionPeriod = i;
LOG(logINFO) << "Acquisition Period: " << (double)acquisitionPeriod / (1E9) LOG(logINFO) << "Acquisition Period: " << (double)acquisitionPeriod / (1E9)
<< "s"; << "s";
} }
uint64_t Implementation::getAcquisitionTime() const { uint64_t Implementation::getAcquisitionTime() const { return acquisitionTime; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return acquisitionTime;
}
void Implementation::updateAcquisitionTime() { void Implementation::updateAcquisitionTime() {
if (acquisitionTime1 == acquisitionTime2 && if (acquisitionTime1 == acquisitionTime2 &&
@ -1464,16 +1320,12 @@ void Implementation::updateAcquisitionTime() {
} }
void Implementation::setAcquisitionTime(const uint64_t i) { void Implementation::setAcquisitionTime(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
acquisitionTime = i; acquisitionTime = i;
LOG(logINFO) << "Acquisition Time: " << (double)acquisitionTime / (1E9) LOG(logINFO) << "Acquisition Time: " << (double)acquisitionTime / (1E9)
<< "s"; << "s";
} }
void Implementation::setAcquisitionTime1(const uint64_t i) { void Implementation::setAcquisitionTime1(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
acquisitionTime1 = i; acquisitionTime1 = i;
LOG(logINFO) << "Acquisition Time1: " << (double)acquisitionTime1 / (1E9) LOG(logINFO) << "Acquisition Time1: " << (double)acquisitionTime1 / (1E9)
<< "s"; << "s";
@ -1481,8 +1333,6 @@ void Implementation::setAcquisitionTime1(const uint64_t i) {
} }
void Implementation::setAcquisitionTime2(const uint64_t i) { void Implementation::setAcquisitionTime2(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
acquisitionTime2 = i; acquisitionTime2 = i;
LOG(logINFO) << "Acquisition Time2: " << (double)acquisitionTime2 / (1E9) LOG(logINFO) << "Acquisition Time2: " << (double)acquisitionTime2 / (1E9)
<< "s"; << "s";
@ -1490,8 +1340,6 @@ void Implementation::setAcquisitionTime2(const uint64_t i) {
} }
void Implementation::setAcquisitionTime3(const uint64_t i) { void Implementation::setAcquisitionTime3(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
acquisitionTime3 = i; acquisitionTime3 = i;
LOG(logINFO) << "Acquisition Time3: " << (double)acquisitionTime3 / (1E9) LOG(logINFO) << "Acquisition Time3: " << (double)acquisitionTime3 / (1E9)
<< "s"; << "s";
@ -1499,52 +1347,35 @@ void Implementation::setAcquisitionTime3(const uint64_t i) {
} }
void Implementation::setGateDelay1(const uint64_t i) { void Implementation::setGateDelay1(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
gateDelay1 = i; gateDelay1 = i;
LOG(logINFO) << "Gate Delay1: " << (double)gateDelay1 / (1E9) << "s"; LOG(logINFO) << "Gate Delay1: " << (double)gateDelay1 / (1E9) << "s";
} }
void Implementation::setGateDelay2(const uint64_t i) { void Implementation::setGateDelay2(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
gateDelay2 = i; gateDelay2 = i;
LOG(logINFO) << "Gate Delay2: " << (double)gateDelay2 / (1E9) << "s"; LOG(logINFO) << "Gate Delay2: " << (double)gateDelay2 / (1E9) << "s";
} }
void Implementation::setGateDelay3(const uint64_t i) { void Implementation::setGateDelay3(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
gateDelay3 = i; gateDelay3 = i;
LOG(logINFO) << "Gate Delay3: " << (double)gateDelay3 / (1E9) << "s"; LOG(logINFO) << "Gate Delay3: " << (double)gateDelay3 / (1E9) << "s";
} }
uint64_t Implementation::getSubExpTime() const { uint64_t Implementation::getSubExpTime() const { return subExpTime; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return subExpTime;
}
void Implementation::setSubExpTime(const uint64_t i) { void Implementation::setSubExpTime(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
subExpTime = i; subExpTime = i;
LOG(logINFO) << "Sub Exposure Time: " << (double)subExpTime / (1E9) << "s"; LOG(logINFO) << "Sub Exposure Time: " << (double)subExpTime / (1E9) << "s";
} }
uint64_t Implementation::getSubPeriod() const { uint64_t Implementation::getSubPeriod() const { return subPeriod; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return subPeriod;
}
void Implementation::setSubPeriod(const uint64_t i) { void Implementation::setSubPeriod(const uint64_t i) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
subPeriod = i; subPeriod = i;
LOG(logINFO) << "Sub Period: " << (double)subPeriod / (1E9) << "s"; LOG(logINFO) << "Sub Period: " << (double)subPeriod / (1E9) << "s";
} }
uint32_t Implementation::getNumberofAnalogSamples() const { uint32_t Implementation::getNumberofAnalogSamples() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfAnalogSamples; return numberOfAnalogSamples;
} }
@ -1566,7 +1397,6 @@ void Implementation::setNumberofAnalogSamples(const uint32_t i) {
} }
uint32_t Implementation::getNumberofDigitalSamples() const { uint32_t Implementation::getNumberofDigitalSamples() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return numberOfDigitalSamples; return numberOfDigitalSamples;
} }
@ -1587,10 +1417,7 @@ void Implementation::setNumberofDigitalSamples(const uint32_t i) {
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
uint32_t Implementation::getCounterMask() const { uint32_t Implementation::getCounterMask() const { return counterMask; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return counterMask;
}
void Implementation::setCounterMask(const uint32_t i) { void Implementation::setCounterMask(const uint32_t i) {
if (counterMask != i) { if (counterMask != i) {
@ -1613,13 +1440,9 @@ void Implementation::setCounterMask(const uint32_t i) {
LOG(logINFO) << "Number of counters: " << ncounters; LOG(logINFO) << "Number of counters: " << ncounters;
} }
uint32_t Implementation::getDynamicRange() const { uint32_t Implementation::getDynamicRange() const { return dynamicRange; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return dynamicRange;
}
void Implementation::setDynamicRange(const uint32_t i) { void Implementation::setDynamicRange(const uint32_t i) {
if (dynamicRange != i) { if (dynamicRange != i) {
dynamicRange = i; dynamicRange = i;
@ -1642,10 +1465,7 @@ void Implementation::setDynamicRange(const uint32_t i) {
LOG(logINFO) << "Dynamic Range: " << dynamicRange; LOG(logINFO) << "Dynamic Range: " << dynamicRange;
} }
slsDetectorDefs::ROI Implementation::getROI() const { slsDetectorDefs::ROI Implementation::getROI() const { return roi; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return roi;
}
void Implementation::setROI(slsDetectorDefs::ROI arg) { void Implementation::setROI(slsDetectorDefs::ROI arg) {
if (roi.xmin != arg.xmin || roi.xmax != arg.xmax) { if (roi.xmin != arg.xmin || roi.xmax != arg.xmax) {
@ -1661,14 +1481,10 @@ void Implementation::setROI(slsDetectorDefs::ROI arg) {
} }
LOG(logINFO) << "ROI: [" << roi.xmin << ", " << roi.xmax << "]"; LOG(logINFO) << "ROI: [" << roi.xmin << ", " << roi.xmax << "]";
;
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
bool Implementation::getTenGigaEnable() const { bool Implementation::getTenGigaEnable() const { return tengigaEnable; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return tengigaEnable;
}
void Implementation::setTenGigaEnable(const bool b) { void Implementation::setTenGigaEnable(const bool b) {
if (tengigaEnable != b) { if (tengigaEnable != b) {
@ -1692,20 +1508,15 @@ void Implementation::setTenGigaEnable(const bool b) {
default: default:
break; break;
} }
SetupFifoStructure(); SetupFifoStructure();
} }
LOG(logINFO) << "Ten Giga: " << (tengigaEnable ? "enabled" : "disabled"); LOG(logINFO) << "Ten Giga: " << (tengigaEnable ? "enabled" : "disabled");
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
int Implementation::getFlippedDataX() const { int Implementation::getFlippedDataX() const { return flippedDataX; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return flippedDataX;
}
void Implementation::setFlippedDataX(int enable) { void Implementation::setFlippedDataX(int enable) {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
flippedDataX = (enable == 0) ? 0 : 1; flippedDataX = (enable == 0) ? 0 : 1;
if (!quadEnable) { if (!quadEnable) {
@ -1718,14 +1529,10 @@ void Implementation::setFlippedDataX(int enable) {
dataStreamer[1]->SetFlippedDataX(1); dataStreamer[1]->SetFlippedDataX(1);
} }
} }
LOG(logINFO) << "Flipped Data X: " << flippedDataX; LOG(logINFO) << "Flipped Data X: " << flippedDataX;
} }
bool Implementation::getQuad() const { bool Implementation::getQuad() const { return quadEnable; }
LOG(logDEBUG) << __AT__ << " starting";
return quadEnable;
}
void Implementation::setQuad(const bool b) { void Implementation::setQuad(const bool b) {
if (quadEnable != b) { if (quadEnable != b) {
@ -1750,9 +1557,7 @@ void Implementation::setQuad(const bool b) {
LOG(logINFO) << "Quad Enable: " << quadEnable; LOG(logINFO) << "Quad Enable: " << quadEnable;
} }
bool Implementation::getActivate() const { bool Implementation::getActivate() const { return activated; }
return activated;
}
bool Implementation::setActivate(bool enable) { bool Implementation::setActivate(bool enable) {
activated = enable; activated = enable;
@ -1761,7 +1566,6 @@ bool Implementation::setActivate(bool enable) {
} }
bool Implementation::getDeactivatedPadding() const { bool Implementation::getDeactivatedPadding() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return deactivatedPaddingEnable; return deactivatedPaddingEnable;
} }
@ -1771,10 +1575,7 @@ void Implementation::setDeactivatedPadding(bool enable) {
<< (deactivatedPaddingEnable ? "enabled" : "disabled"); << (deactivatedPaddingEnable ? "enabled" : "disabled");
} }
int Implementation::getReadNLines() const { int Implementation::getReadNLines() const { return numLinesReadout; }
LOG(logDEBUG) << __AT__ << " starting";
return numLinesReadout;
}
void Implementation::setReadNLines(const int value) { void Implementation::setReadNLines(const int value) {
numLinesReadout = value; numLinesReadout = value;
@ -1787,7 +1588,6 @@ void Implementation::setRateCorrections(const std::vector<int64_t> &t) {
} }
slsDetectorDefs::readoutMode Implementation::getReadoutMode() const { slsDetectorDefs::readoutMode Implementation::getReadoutMode() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return readoutType; return readoutType;
} }
@ -1804,20 +1604,17 @@ void Implementation::setReadoutMode(const readoutMode f) {
it->SetPixelDimension(); it->SetPixelDimension();
SetupFifoStructure(); SetupFifoStructure();
} }
LOG(logINFO) << "Readout Mode: " << sls::ToString(f); LOG(logINFO) << "Readout Mode: " << sls::ToString(f);
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
uint32_t Implementation::getADCEnableMask() const { uint32_t Implementation::getADCEnableMask() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return adcEnableMaskOneGiga; return adcEnableMaskOneGiga;
} }
void Implementation::setADCEnableMask(uint32_t mask) { void Implementation::setADCEnableMask(uint32_t mask) {
if (adcEnableMaskOneGiga != mask) { if (adcEnableMaskOneGiga != mask) {
adcEnableMaskOneGiga = mask; adcEnableMaskOneGiga = mask;
ctbAnalogDataBytes = generalData->setImageSize( ctbAnalogDataBytes = generalData->setImageSize(
tengigaEnable ? adcEnableMaskTenGiga : adcEnableMaskOneGiga, tengigaEnable ? adcEnableMaskTenGiga : adcEnableMaskOneGiga,
numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable, numberOfAnalogSamples, numberOfDigitalSamples, tengigaEnable,
@ -1827,14 +1624,12 @@ void Implementation::setADCEnableMask(uint32_t mask) {
it->SetPixelDimension(); it->SetPixelDimension();
SetupFifoStructure(); SetupFifoStructure();
} }
LOG(logINFO) << "ADC Enable Mask for 1Gb mode: 0x" << std::hex LOG(logINFO) << "ADC Enable Mask for 1Gb mode: 0x" << std::hex
<< adcEnableMaskOneGiga << std::dec; << adcEnableMaskOneGiga << std::dec;
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
uint32_t Implementation::getTenGigaADCEnableMask() const { uint32_t Implementation::getTenGigaADCEnableMask() const {
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return adcEnableMaskTenGiga; return adcEnableMaskTenGiga;
} }
@ -1851,31 +1646,18 @@ void Implementation::setTenGigaADCEnableMask(uint32_t mask) {
it->SetPixelDimension(); it->SetPixelDimension();
SetupFifoStructure(); SetupFifoStructure();
} }
LOG(logINFO) << "ADC Enable Mask for 10Gb mode: 0x" << std::hex LOG(logINFO) << "ADC Enable Mask for 10Gb mode: 0x" << std::hex
<< adcEnableMaskTenGiga << std::dec; << adcEnableMaskTenGiga << std::dec;
LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame); LOG(logINFO) << "Packets per Frame: " << (generalData->packetsPerFrame);
} }
std::vector<int> Implementation::getDbitList() const { std::vector<int> Implementation::getDbitList() const { return ctbDbitList; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return ctbDbitList;
}
void Implementation::setDbitList(const std::vector<int> v) { void Implementation::setDbitList(const std::vector<int> &v) { ctbDbitList = v; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
ctbDbitList = v;
}
int Implementation::getDbitOffset() const { int Implementation::getDbitOffset() const { return ctbDbitOffset; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
return ctbDbitOffset;
}
void Implementation::setDbitOffset(const int s) { void Implementation::setDbitOffset(const int s) { ctbDbitOffset = s; }
LOG(logDEBUG3) << __SHORT_AT__ << " called";
ctbDbitOffset = s;
}
/************************************************** /**************************************************
* * * *

View File

@ -225,7 +225,7 @@ class Implementation : private virtual slsDetectorDefs {
void setTenGigaADCEnableMask(const uint32_t mask); void setTenGigaADCEnableMask(const uint32_t mask);
std::vector<int> getDbitList() const; std::vector<int> getDbitList() const;
/* [Ctb] */ /* [Ctb] */
void setDbitList(const std::vector<int> v); void setDbitList(const std::vector<int>& v);
int getDbitOffset() const; int getDbitOffset() const;
/* [Ctb] */ /* [Ctb] */
void setDbitOffset(const int s); void setDbitOffset(const int s);