mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-18 02:21:18 +01:00
Moench rewrite (#597)
* copied jungfrau server to moench and adapted * fixed image size and num packets * read n rows allows 16 * commneted out configure_asic_timer at server startup. To be removed later the ASIC_CTRL_REG and storage cell options * moench:removing the decrement (which was in jf) in read n rows to register * removed lblsamples from gui
This commit is contained in:
@@ -155,7 +155,7 @@ slsDetectorDefs::detectorType Module::getDetectorType() const {
|
||||
}
|
||||
|
||||
void Module::updateNumberOfChannels() {
|
||||
if (shm()->detType == CHIPTESTBOARD || shm()->detType == MOENCH) {
|
||||
if (shm()->detType == CHIPTESTBOARD) {
|
||||
std::array<int, 2> retvals{};
|
||||
sendToDetector(F_GET_NUM_CHANNELS, nullptr, retvals);
|
||||
shm()->nChan.x = retvals[0];
|
||||
@@ -1225,7 +1225,7 @@ std::string Module::printReceiverConfiguration() {
|
||||
os << "\n\nModule " << moduleIndex << "\nReceiver Hostname:\t"
|
||||
<< getReceiverHostname();
|
||||
|
||||
if (shm()->detType == JUNGFRAU) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH) {
|
||||
os << "\nNumber of Interfaces:\t" << getNumberofUDPInterfacesFromShm()
|
||||
<< "\nSelected Interface:\t" << getSelectedUDPInterface();
|
||||
}
|
||||
@@ -1235,14 +1235,15 @@ std::string Module::printReceiverConfiguration() {
|
||||
<< getDestinationUDPIP() << "\nDestination UDP MAC:\t"
|
||||
<< getDestinationUDPMAC();
|
||||
|
||||
if (shm()->detType == JUNGFRAU) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH) {
|
||||
os << "\nSource UDP IP2:\t" << getSourceUDPIP2()
|
||||
<< "\nSource UDP MAC2:\t" << getSourceUDPMAC2()
|
||||
<< "\nDestination UDP IP2:\t" << getDestinationUDPIP2()
|
||||
<< "\nDestination UDP MAC2:\t" << getDestinationUDPMAC2();
|
||||
}
|
||||
os << "\nDestination UDP Port:\t" << getDestinationUDPPort();
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == EIGER) {
|
||||
if (shm()->detType == JUNGFRAU || shm()->detType == MOENCH ||
|
||||
shm()->detType == EIGER) {
|
||||
os << "\nDestination UDP Port2:\t" << getDestinationUDPPort2();
|
||||
}
|
||||
os << "\n";
|
||||
@@ -1791,7 +1792,7 @@ void Module::setTop(bool value) {
|
||||
sendToDetector(F_SET_TOP, static_cast<int>(value), nullptr);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
// Jungfrau/Moench Specific
|
||||
double Module::getChipVersion() const {
|
||||
return (sendToDetector<int>(F_GET_CHIP_VERSION)) / 10.00;
|
||||
}
|
||||
@@ -2303,7 +2304,7 @@ void Module::setDigitalPulsing(const bool enable) {
|
||||
sendToDetector(F_SET_DIGITAL_PULSING, static_cast<int>(enable), nullptr);
|
||||
}
|
||||
|
||||
// CTB / Moench Specific
|
||||
// CTB Specific
|
||||
int Module::getNumberOfAnalogSamples() const {
|
||||
return sendToDetector<int>(F_GET_NUM_ANALOG_SAMPLES);
|
||||
}
|
||||
@@ -2538,8 +2539,6 @@ void Module::setPatternBitMask(uint64_t mask) {
|
||||
|
||||
void Module::startPattern() { sendToDetector(F_START_PATTERN); }
|
||||
|
||||
// Moench
|
||||
|
||||
std::map<std::string, std::string> Module::getAdditionalJsonHeader() const {
|
||||
// TODO, refactor this function with a more robust sending.
|
||||
// Now assuming whitespace separated key value
|
||||
@@ -2632,8 +2631,8 @@ void Module::programFPGA(std::vector<char> buffer,
|
||||
const bool forceDeleteNormalFile) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_PROGRAM_FPGA, "Update Firmware", "",
|
||||
forceDeleteNormalFile);
|
||||
break;
|
||||
@@ -2653,8 +2652,8 @@ void Module::updateDetectorServer(std::vector<char> buffer,
|
||||
const std::string &serverName) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_UPDATE_DETECTOR_SERVER,
|
||||
"Update Detector Server (no tftp)", serverName);
|
||||
break;
|
||||
@@ -2674,8 +2673,8 @@ void Module::updateDetectorServer(std::vector<char> buffer,
|
||||
void Module::updateKernel(std::vector<char> buffer) {
|
||||
switch (shm()->detType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
case CHIPTESTBOARD:
|
||||
sendProgram(true, buffer, F_UPDATE_KERNEL, "Update Kernel");
|
||||
break;
|
||||
case MYTHEN3:
|
||||
|
||||
Reference in New Issue
Block a user