mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-07-12 19:01:50 +02: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:
@ -516,7 +516,8 @@ std::string CmdProxy::GapPixels(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0, 1]\n\t[Eiger][Jungfrau] Include Gap pixels in client data "
|
||||
os << "[0, 1]\n\t[Eiger][Jungfrau][Moench] Include Gap pixels in "
|
||||
"client data "
|
||||
"call back in Detecor api. Will not be in detector streaming, "
|
||||
"receiver file or streaming. Default is 0. "
|
||||
<< '\n';
|
||||
@ -591,8 +592,8 @@ std::string CmdProxy::Exptime(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "exptime") {
|
||||
os << "[duration] [(optional unit) "
|
||||
"ns|us|ms|s]\n\t[Eiger][Jungfrau][Gotthard][Gotthard2]["
|
||||
"Moench][Ctb] Exposure time"
|
||||
"ns|us|ms|s]\n\t[Eiger][Jungfrau][Moench][Gotthard]["
|
||||
"Gotthard2][Ctb] Exposure time"
|
||||
"\n\t[Mythen3] Exposure time of all gate signals in auto and "
|
||||
"trigger mode (internal gating). To specify gate index, use "
|
||||
"exptime1, exptime2, exptime3."
|
||||
@ -676,9 +677,10 @@ std::string CmdProxy::ReadoutSpeed(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "\n\t[0 or full_speed|1 or half_speed|2 or "
|
||||
"quarter_speed]\n\t\t[Eiger][Jungfrau] Readout "
|
||||
"quarter_speed]\n\t\t[Eiger][Jungfrau][Moench] Readout "
|
||||
"speed of chip.\n\t\t[Eiger] Default speed is full_speed."
|
||||
"\n\t\t[Jungfrau] Default speed is half_speed. full_speed "
|
||||
"\n\t\t[Jungfrau][Moench] Default speed is half_speed. "
|
||||
"full_speed "
|
||||
"option only available from v2.0 boards and is recommended to "
|
||||
"set "
|
||||
"number of interfaces to 2. Also overwrites "
|
||||
@ -687,7 +689,7 @@ std::string CmdProxy::ReadoutSpeed(int action) {
|
||||
<< '\n';
|
||||
} else {
|
||||
defs::detectorType type = det->getDetectorType().squash();
|
||||
if (type == defs::CHIPTESTBOARD || type == defs::MOENCH) {
|
||||
if (type == defs::CHIPTESTBOARD) {
|
||||
throw RuntimeError(
|
||||
"ReadoutSpeed not implemented. Did you mean runclk?");
|
||||
}
|
||||
@ -716,10 +718,11 @@ std::string CmdProxy::Adcphase(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] "
|
||||
"[(optional)deg]\n\t[Jungfrau][Ctb][Moench][Gotthard] "
|
||||
"Phase shift of ADC clock. \n\t[Jungfrau] Absolute phase shift. "
|
||||
"[(optional)deg]\n\t[Jungfrau][Moench][Ctb][Gotthard] "
|
||||
"Phase shift of ADC clock. \n\t[Jungfrau][Moench] Absolute phase "
|
||||
"shift. "
|
||||
"If deg used, then shift in degrees. Changing Speed also resets "
|
||||
"adcphase to recommended defaults.\n\t[Ctb][Moench] Absolute "
|
||||
"adcphase to recommended defaults.\n\t[Ctb] Absolute "
|
||||
"phase shift. If deg used, then shift in degrees. Changing "
|
||||
"adcclk also resets adcphase and sets it to previous "
|
||||
"values.\n\t[Gotthard] Relative phase shift. Cannot get"
|
||||
@ -772,7 +775,8 @@ std::string CmdProxy::Dbitphase(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of "
|
||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau][Moench] Phase "
|
||||
"shift of "
|
||||
"clock to latch digital bits. Absolute phase shift. If deg used, "
|
||||
"then shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
||||
"dbitphase and sets to previous values."
|
||||
@ -1009,7 +1013,8 @@ std::string CmdProxy::CurrentSource(int action) {
|
||||
os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. "
|
||||
"Default "
|
||||
"is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for "
|
||||
"chipv1.1)normal|low]\n\t\t[Jungfrau] Disable or enable current "
|
||||
"chipv1.1)normal|low]\n\t\t[Jungfrau][Moench] Disable or enable "
|
||||
"current "
|
||||
"source with some parameters. The select source is 0-63 for "
|
||||
"chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs "
|
||||
"only one argument '0'."
|
||||
@ -1258,7 +1263,7 @@ std::string CmdProxy::ResetDacs(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[(optional) hard] "
|
||||
"\n\t[Eiger][Jungfrau][Gotthard][Moench][Gotthard2]["
|
||||
"\n\t[Eiger][Jungfrau][Moench][Gotthard][Gotthard2]["
|
||||
"Mythen3]Reset dac values to the defaults. A 'hard' optional "
|
||||
"reset will reset the dacs to the hardcoded defaults in on-board "
|
||||
"detector server."
|
||||
@ -1289,7 +1294,8 @@ std::string CmdProxy::DefaultDac(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[dac name][value][(optional)setting]\n\tSets the default for "
|
||||
"that dac to this value.\n\t[Jungfrau][Mythen3] When settings is "
|
||||
"that dac to this value.\n\t[Jungfrau][Moench][Mythen3] When "
|
||||
"settings is "
|
||||
"provided, it sets the default value only for that setting"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1432,10 +1438,12 @@ std::string CmdProxy::Trigger(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "trigger") {
|
||||
os << "\n\t[Eiger][Mythen3][Jungfrau] Sends software trigger "
|
||||
os << "\n\t[Eiger][Mythen3][Jungfrau][Moench] Sends software "
|
||||
"trigger "
|
||||
"signal to detector";
|
||||
} else if (cmd == "blockingtrigger") {
|
||||
os << "\n\t[Eiger][Jungfrau] Sends software trigger signal to "
|
||||
os << "\n\t[Eiger][Jungfrau][Moench] Sends software trigger signal "
|
||||
"to "
|
||||
"detector and blocks till the frames are sent out for that "
|
||||
"trigger.";
|
||||
} else {
|
||||
@ -1524,7 +1532,8 @@ std::string CmdProxy::UDPDestinationList(int action) {
|
||||
"[(optional)mac2=xx:xx:xx:xx:xx:xx]\n\t[port=value] "
|
||||
"[(optional)port2=value\n\tThe order of ip, mac and port does "
|
||||
"not matter. entry_value can be >0 only for "
|
||||
"[Eiger][Jungfrau][Mythen3][Gotthard2] where round robin is "
|
||||
"[Eiger][Jungfrau][Moench][Mythen3][Gotthard2] where round robin "
|
||||
"is "
|
||||
"implemented. If 'auto' used, then ip is set to ip of "
|
||||
"rx_hostname."
|
||||
<< '\n';
|
||||
@ -1603,9 +1612,10 @@ std::string CmdProxy::UDPSourceIP2(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Gotthard2] Ip address of the "
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address "
|
||||
"of the "
|
||||
"detector (source) udp interface 2. Must be same subnet as "
|
||||
"destination udp ip2.\n\t [Jungfrau] top half or inner "
|
||||
"destination udp ip2.\n\t [Jungfrau][Moench] top half or inner "
|
||||
"interface\n\t [Gotthard2] veto debugging. If 'auto' used, then "
|
||||
"ip is set to ip of rx_hostname."
|
||||
<< '\n';
|
||||
@ -1675,9 +1685,10 @@ std::string CmdProxy::UDPDestinationIP2(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Gotthard2] Ip address of the "
|
||||
os << "[x.x.x.x] or auto\n\t[Jungfrau][Moench][Gotthard2] Ip address "
|
||||
"of the "
|
||||
"receiver (destination) udp interface 2. If 'auto' used, then ip "
|
||||
"is set to ip of rx_hostname.\n\t[Jungfrau] bottom half "
|
||||
"is set to ip of rx_hostname.\n\t[Jungfrau][Moench] bottom half "
|
||||
"\n\t[Gotthard2] veto debugging. "
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1711,12 +1722,13 @@ std::string CmdProxy::TransmissionDelay(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_delay]\n\t[Eiger][Jungfrau][Mythen3] Set transmission delay "
|
||||
os << "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set "
|
||||
"transmission delay "
|
||||
"for all modules in the detector using the step size "
|
||||
"provided.Sets up \n\t\t[Eiger] txdelay_left to (2 * mod_index * "
|
||||
"n_delay), \n\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * "
|
||||
"n_delay) and \n\t\t[Eiger] txdelay_frame to (2 *num_modules * "
|
||||
"n_delay) \n\t\t[Jungfrau][Mythen3] txdelay_frame to "
|
||||
"n_delay) \n\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to "
|
||||
"(num_modules * n_delay) \nfor every module."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2058,7 +2070,8 @@ std::string CmdProxy::TemperatureEvent(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0]\n\t[Jungfrau] 1, if a temperature event occured. To clear "
|
||||
os << "[0]\n\t[Jungfrau][Moench] 1, if a temperature event occured. To "
|
||||
"clear "
|
||||
"this event, set it to 0.\n\tIf temperature crosses threshold "
|
||||
"temperature and temperature control is enabled, power to chip "
|
||||
"will be switched off and temperature event occurs. To power on "
|
||||
@ -2552,14 +2565,14 @@ std::string CmdProxy::GainCaps(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* CTB / Moench Specific */
|
||||
/* CTB Specific */
|
||||
|
||||
std::string CmdProxy::Samples(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_samples]\n\t[CTB] Number of samples (both analog and "
|
||||
"digitial) expected.\n\t[Moench] Number of samples (analog only)"
|
||||
"digitial) expected.\n"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
@ -2601,7 +2614,7 @@ std::string CmdProxy::AdcVpp(int action) {
|
||||
os << cmd << ' ';
|
||||
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[dac or mV value][(optional unit) mV] \n\t[Ctb][Moench] Vpp of "
|
||||
os << "[dac or mV value][(optional unit) mV] \n\t[Ctb] Vpp of "
|
||||
"ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> "
|
||||
"2V. \n\tAdvanced User function!\n"
|
||||
<< '\n';
|
||||
@ -2743,7 +2756,7 @@ std::string CmdProxy::Pattern(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname]\n\t[Mythen3][Moench][Ctb] Loads ASCII pattern file "
|
||||
os << "[fname]\n\t[Mythen3][Ctb] Loads ASCII pattern file "
|
||||
"directly to server (instead of executing line by line)"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2764,8 +2777,8 @@ std::string CmdProxy::PatternWord(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 "
|
||||
"bit pattern at address of pattern memory.\n\t[Ctb][Moench] read "
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 "
|
||||
"bit pattern at address of pattern memory.\n\t[Ctb] read "
|
||||
"is same as executing pattern"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -2824,11 +2837,11 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patlimits") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits "
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits "
|
||||
"of complete pattern."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop") {
|
||||
os << "[0-6] [start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] "
|
||||
os << "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3] "
|
||||
"Limits of the loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
} else {
|
||||
@ -2867,7 +2880,7 @@ std::string CmdProxy::PatternLoopCycles(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patnloop") {
|
||||
os << "[0-6] [n_cycles] \n\t[Ctb][Moench][Mythen3] Number of "
|
||||
os << "[0-6] [n_cycles] \n\t[Ctb][Mythen3] Number of "
|
||||
"cycles of "
|
||||
"the loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
@ -2901,7 +2914,7 @@ std::string CmdProxy::PatternWaitAddress(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwait") {
|
||||
os << "[0-6] [addr] \n\t[Ctb][Moench][Mythen3] Wait address for "
|
||||
os << "[0-6] [addr] \n\t[Ctb][Mythen3] Wait address for "
|
||||
"loop level provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only.";
|
||||
} else {
|
||||
@ -2935,7 +2948,7 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwaittime") {
|
||||
os << "[0-6] [n_clk] \n\t[Ctb][Moench][Mythen3] Wait time in clock "
|
||||
os << "[0-6] [n_clk] \n\t[Ctb][Mythen3] Wait time in clock "
|
||||
"cycles for the loop provided."
|
||||
<< "\n\t[Mythen3] Level options: 0-3 only." << '\n';
|
||||
} else {
|
||||
@ -2959,8 +2972,6 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* Moench */
|
||||
|
||||
std::string CmdProxy::AdditionalJsonHeader(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
@ -3043,8 +3054,9 @@ std::string CmdProxy::ProgramFpga(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname.pof | fname.rbf (full "
|
||||
"path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau][Ctb]["
|
||||
"Moench] Programs FPGA from pof file (full path). Then, detector "
|
||||
"path)][(opitonal)--force-delete-normal-file]\n\t[Jungfrau]["
|
||||
"Moench][Ctb] "
|
||||
"Programs FPGA from pof file (full path). Then, detector "
|
||||
"controller is rebooted. \n\t\tUse --force-delete-normal-file "
|
||||
"argument, if normal file found in device tree, it must be "
|
||||
"deleted, a new device drive created and programming "
|
||||
@ -3078,11 +3090,11 @@ std::string CmdProxy::UpdateDetectorServer(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[server_name with full "
|
||||
"path]\n\t[Jungfrau][Eiger][Ctb][Moench][Mythen3][Gotthard2] "
|
||||
"path]\n\t[Jungfrau][Moench][Eiger][Ctb][Mythen3][Gotthard2] "
|
||||
"Copies detector server via TCP (without tftp). Makes a symbolic "
|
||||
"link with a shorter name (without vx.x.x). Then, detector "
|
||||
"controller reboots (except "
|
||||
"Eiger).\n\t[Jungfrau][Ctb][Moench]Also changes respawn server "
|
||||
"Eiger).\n\t[Jungfrau][Moench][Ctb]Also changes respawn server "
|
||||
"to the link, which is effective after a reboot."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -3104,7 +3116,7 @@ std::string CmdProxy::UpdateKernel(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[kernel_name with full "
|
||||
"path]\n\t[Jungfrau][Ctb][Moench][Mythen3][Gotthard2] Advanced "
|
||||
"path]\n\t[Jungfrau][Moench][Ctb][Mythen3][Gotthard2] Advanced "
|
||||
"Command!! You could damage the detector. Please use with "
|
||||
"caution.\n\tUpdates the kernel image. Then, detector controller "
|
||||
"reboots with new kernel."
|
||||
@ -3129,7 +3141,7 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "\n\tWithout tftp: [server_name (incl fullpath)] [fname.pof "
|
||||
"(incl full path)] This does not use "
|
||||
"tftp.\n\t\t[Jungfrau][Gotthard][CTB][Moench] Updates the "
|
||||
"tftp.\n\t\t[Jungfrau][Moench][Gotthard][CTB] Updates the "
|
||||
"firmware, detector server, deletes old server, creates the "
|
||||
"symbolic link and then reboots detector controller. "
|
||||
"\n\t\t[Mythen3][Gotthard2] will require a script to start up "
|
||||
@ -3191,7 +3203,7 @@ std::string CmdProxy::AdcRegister(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[address] [value]\n\t[Jungfrau][Ctb][Moench][Gotthard] Writes "
|
||||
os << "[address] [value]\n\t[Jungfrau][Moench][Ctb][Gotthard] Writes "
|
||||
"to an adc register in hex. Advanced user Function!"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
|
Reference in New Issue
Block a user