mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
remaining for removing copydetectorserver
This commit is contained in:
parent
b42d65c5e2
commit
835aa575b0
@ -136,7 +136,7 @@ can use dir()
|
||||
'__str__', '__subclasshook__', '_adc_register', '_frozen',
|
||||
'_register', 'acquire', 'adcclk', 'adcphase', 'adcpipeline',
|
||||
'adcreg', 'asamples', 'auto_comp_disable', 'clearAcquiringFlag',
|
||||
'clearBit', 'clearROI', 'client_version', 'config', 'copyDetectorServer',
|
||||
'clearBit', 'clearROI', 'client_version', 'config',
|
||||
'counters', 'daclist', 'dacvalues', 'dbitclk', 'dbitphase' ...
|
||||
|
||||
Since the list for Detector is rather long it's an good idea to filter it.
|
||||
|
@ -5,17 +5,42 @@ Detector Server Upgrade
|
||||
|
||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||
|
||||
.. note ::
|
||||
|
||||
For Mythen3, Gotthard2 and Eiger, you need to add scripts to automatically start detector server upon power on. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
.. note ::
|
||||
|
||||
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||
|
||||
|
||||
From 6.1.1 and above (no tftp required)
|
||||
---------------------------------------
|
||||
|
||||
#. Program from console
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# the following command copies new server, creates a soft link to xxxDetectorServerxxx
|
||||
# [Jungfrau][CTB][Moench] also deletes the old server binary and edits initttab to respawn server on reboot
|
||||
# Then, the detector controller will reboot (except Eiger)
|
||||
sls_detector_put updatedetectorserver /complete-path-to-binary/xxxDetectorServerxxx
|
||||
|
||||
#. Copy the detector server specific config files or any others required to the detector:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
|
||||
|
||||
5.0.0 - 6.1.1
|
||||
--------------
|
||||
|
||||
#. Install tftp and copy detector server binary to tftp folder
|
||||
#. Program from console
|
||||
|
||||
.. note ::
|
||||
|
||||
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# copies new server from pc tftp folder, creates a soft link to xxxDetectorServerxxx
|
||||
# the following command copies new server from pc tftp folder, creates a soft link to xxxDetectorServerxxx
|
||||
# [Jungfrau][CTB][Moench] also edits initttab to respawn server on reboot
|
||||
# Then, the detector controller will reboot (except Eiger)
|
||||
sls_detector_put copydetectorserver xxxDetectorServerxxx pcxxx
|
||||
@ -27,18 +52,15 @@ Detector Server Upgrade
|
||||
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
For Mythen3, Gotthard2 and Eiger, you need to add scripts to automatically start detector server upon power on. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
.. note ::
|
||||
|
||||
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||
|
||||
|
||||
Errors
|
||||
------
|
||||
Troubleshooting with tftp
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. tftp write error: There is no space left. Please delete some old binaries and try again.
|
||||
|
||||
#. text file busy: You are trying to copy the same server.
|
||||
|
||||
|
||||
Older than 5.0.0
|
||||
-----------------
|
||||
|
||||
Please contact us.
|
@ -1785,19 +1785,6 @@ class Detector {
|
||||
* Function! */
|
||||
void rebootController(Positions pos = {});
|
||||
|
||||
/** [[deprecated ("Replaced by overloaded updateDetectorServer, which does
|
||||
* not require tftp and has one less argument")]] Advanced user Function!\n
|
||||
* [Jungfrau][Gotthard][CTB][Moench] Updates the firmware, detector server,
|
||||
* make a soft link and then reboots detector controller. \n
|
||||
* [Mythen3][Gotthard2] Will require a script to start up the shorter named
|
||||
* server link at start up \n sname is name of detector server binary found
|
||||
* on tftp folder of host pc \n hostname is name of pc to tftp from \n fname
|
||||
* is programming file name with full path to it
|
||||
*/
|
||||
void updateFirmwareAndServer(const std::string &sname,
|
||||
const std::string &hostname,
|
||||
const std::string &fname, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Advanced user Function!\n [Jungfrau][Gotthard][CTB][Moench] Updates the
|
||||
* firmware, detector server, make a soft link and then reboots detector
|
||||
|
@ -2967,23 +2967,21 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "\n\tUsing tftp: Deprecated!! [server_name"
|
||||
" (in tftp folder)] [pc_host_name] [fname.pof (incl full path)]"
|
||||
"\n\tWithout tftp: Recommended [server_name (incl fullpath)] "
|
||||
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 "
|
||||
"firmware, detector server, creates the symbolic link and then "
|
||||
"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 the shorter named server link at "
|
||||
"start up. \n\t\tsname is full path name of detector server "
|
||||
"start up. \n\t\tserver_name is full path name of detector server "
|
||||
"binary"
|
||||
"\n\t\tfname is full path of programming file"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
throw sls::RuntimeError("Cannot get");
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
if (args.size() != 3 && args.size() != 2) {
|
||||
if (args.size() != 2) {
|
||||
WrongNumberOfParameters(2);
|
||||
}
|
||||
|
||||
@ -2992,17 +2990,8 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
|
||||
args[fpos].find(".rbf") == std::string::npos) {
|
||||
throw sls::RuntimeError("Programming file must be a pof/rbf file.");
|
||||
}
|
||||
|
||||
if (args.size() == 3) {
|
||||
LOG(logWARNING)
|
||||
<< "Deprecated! Recommend to use same command without tftp (no "
|
||||
"pc name) and using full path to the server binary";
|
||||
det->updateFirmwareAndServer(args[0], args[1], args[2],
|
||||
det->updateFirmwareAndServer(args[0], args[1],
|
||||
std::vector<int>{det_id});
|
||||
} else {
|
||||
det->updateFirmwareAndServer(args[0], args[1],
|
||||
std::vector<int>{det_id});
|
||||
}
|
||||
os << "successful\n";
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
|
@ -2263,16 +2263,6 @@ void Detector::rebootController(Positions pos) {
|
||||
pimpl->Parallel(&Module::rebootController, pos);
|
||||
}
|
||||
|
||||
void Detector::updateFirmwareAndServer(const std::string &sname,
|
||||
const std::string &hostname,
|
||||
const std::string &fname,
|
||||
Positions pos) {
|
||||
LOG(logINFO) << "Updating Firmware and Detector Server (with tftp)...";
|
||||
LOG(logINFO) << "Updating Detector Server (via tftp)...";
|
||||
pimpl->Parallel(&Module::copyDetectorServer, pos, sname, hostname);
|
||||
programFPGA(fname, false, pos);
|
||||
}
|
||||
|
||||
void Detector::updateFirmwareAndServer(const std::string &sname,
|
||||
const std::string &fname,
|
||||
Positions pos) {
|
||||
|
@ -2776,25 +2776,6 @@ TEST_CASE("resetfpga", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("copydetectorserver", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::MOENCH || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
// TODO: send real server?
|
||||
// std::ostringstream oss;
|
||||
// proxy.Call("copydetectorserver",{"jungfrauDetectorServerv4.0.1.0",
|
||||
// "pc13784"}, -1, PUT, oss);
|
||||
// REQUIRE(oss.str() == "copydetectorserver successful\n");
|
||||
REQUIRE_THROWS(proxy.Call("copydetectorserver", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("copydetectorserver", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("copydetectorserver", {}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("updatekernel", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
Loading…
x
Reference in New Issue
Block a user