This commit is contained in:
maliakal_d 2020-08-19 18:45:39 +02:00
parent caff89a040
commit 5f23a664fa
3 changed files with 22 additions and 11 deletions

View File

@ -636,6 +636,7 @@ class Detector(CppDetectorApi):
return self._register return self._register
@property @property
def adcreg(self):
"""[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc register """[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc register
Note Note
@ -644,7 +645,6 @@ class Detector(CppDetectorApi):
:getter: Not implemented :getter: Not implemented
""" """
def adcreg(self):
return self._adc_register return self._adc_register
@property @property

View File

@ -1382,26 +1382,30 @@ class Detector {
* * * *
* ************************************************/ * ************************************************/
/** [Jungfrau][CTB][Moench] fname is a pof file /** Advanced user Function!
* [Jungfrau][CTB][Moench] fname is a pof file
* [Mythen3][Gotthard2] fname is an rbf file * [Mythen3][Gotthard2] fname is an rbf file
*/ */
void programFPGA(const std::string &fname, Positions pos = {}); void programFPGA(const std::string &fname, Positions pos = {});
/** [Jungfrau][CTB][Moench] */ /** [Jungfrau][CTB][Moench] Advanced user Function! */
void resetFPGA(Positions pos = {}); void resetFPGA(Positions pos = {});
/** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2] /** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2]
* Advanced user Function!
* Copy detector server fname from tftp folder of hostname to detector * Copy detector server fname from tftp folder of hostname to detector
* Also changes respawn server, which is effective after a reboot. * Also changes respawn server, which is effective after a reboot.
*/ */
void copyDetectorServer(const std::string &fname, void copyDetectorServer(const std::string &fname,
const std::string &hostname, Positions pos = {}); const std::string &hostname, Positions pos = {});
/** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2] */ /** [Jungfrau][Gotthard][CTB][Moench][Mythen3][Gotthard2] Advanced user
* Function! */
void rebootController(Positions pos = {}); void rebootController(Positions pos = {});
/** /**
* [Jungfrau][Gotthard][CTB][Moench] * [Jungfrau][Gotthard][CTB][Moench]
* Advanced user Function!
* Updates the firmware, detector server and then reboots detector * Updates the firmware, detector server and then reboots detector
* controller blackfin. * controller blackfin.
* sname is name of detector server binary found on tftp folder of host * sname is name of detector server binary found on tftp folder of host
@ -1413,34 +1417,41 @@ class Detector {
const std::string &hostname, const std::string &hostname,
const std::string &fname, Positions pos = {}); const std::string &fname, Positions pos = {});
/** Advanced user Function! */
Result<uint32_t> readRegister(uint32_t addr, Positions pos = {}) const; Result<uint32_t> readRegister(uint32_t addr, Positions pos = {}) const;
/** Advanced user Function! */
void writeRegister(uint32_t addr, uint32_t val, Positions pos = {}); void writeRegister(uint32_t addr, uint32_t val, Positions pos = {});
/** Advanced user Function! */
void setBit(uint32_t addr, int bitnr, Positions pos = {}); void setBit(uint32_t addr, int bitnr, Positions pos = {});
/** Advanced user Function! */
void clearBit(uint32_t addr, int bitnr, Positions pos = {}); void clearBit(uint32_t addr, int bitnr, Positions pos = {});
/** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] */ /** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Advanced user
* Function! */
void executeFirmwareTest(Positions pos = {}); void executeFirmwareTest(Positions pos = {});
/** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] */ /** [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Advanced user
* Function! */
void executeBusTest(Positions pos = {}); void executeBusTest(Positions pos = {});
/** [Gotthard][Jungfrau][CTB][Moench] Advanced user Function. not possible /** [Gotthard][Jungfrau][CTB][Moench] Advanced user Function! not possible
* to read back */ * to read back */
void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {}); void writeAdcRegister(uint32_t addr, uint32_t value, Positions pos = {});
/** Advanced user Function! */
bool getInitialChecks() const; bool getInitialChecks() const;
/** initial compaibility and other server start up checks /** initial compaibility and other server start up checks
* default enabled */ * default enabled Advanced user Function! */
void setInitialChecks(const bool value); void setInitialChecks(const bool value);
/** [CTB][Moench][Jungfrau] */ /** [CTB][Moench][Jungfrau] Advanced user Function! */
Result<uint32_t> getADCInvert(Positions pos = {}) const; Result<uint32_t> getADCInvert(Positions pos = {}) const;
/** [CTB][Moench][Jungfrau] */ /** [CTB][Moench][Jungfrau] Advanced user Function! */
void setADCInvert(uint32_t value, Positions pos = {}); void setADCInvert(uint32_t value, Positions pos = {});
/************************************************** /**************************************************

View File

@ -2516,7 +2516,7 @@ std::string CmdProxy::AdcRegister(int action) {
if (action == defs::HELP_ACTION) { if (action == defs::HELP_ACTION) {
os << "[address] [value]\n\t[Jungfrau][Ctb][Moench][Gotthard] Writes " os << "[address] [value]\n\t[Jungfrau][Ctb][Moench][Gotthard] Writes "
"to an adc " "to an adc "
"register in hex. Advanced user Function." "register in hex. Advanced user Function!"
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
throw sls::RuntimeError("Cannot get."); throw sls::RuntimeError("Cannot get.");