This commit is contained in:
maliakal_d 2020-09-23 13:15:53 +02:00
parent bd4299fd15
commit e786b9f037
4 changed files with 88 additions and 39 deletions

View File

@ -173,6 +173,11 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def stopport(self): def stopport(self):
"""Port number of the stop server on detector for detector-client tcp interface.
Note
----
Default is 1953. Normally unchanged.
"""
return self.getStopPort() return self.getStopPort()
@stopport.setter @stopport.setter
@ -327,6 +332,7 @@ class Detector(CppDetectorApi):
""" """
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition.\n [Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition.\n
[Gotthard2] only in continuous mode. [Gotthard2] only in continuous mode.
:setter: Not Implemented
""" """
return self.getNumberOfFramesLeft() return self.getNumberOfFramesLeft()
@ -338,6 +344,7 @@ class Detector(CppDetectorApi):
Note Note
----- -----
[Gotthard2] only in continuous mode. [Gotthard2] only in continuous mode.
:setter: Not Implemented
""" """
return self.getNumberOfFramesFromStart() return self.getNumberOfFramesFromStart()
@ -441,7 +448,7 @@ class Detector(CppDetectorApi):
----- -----
[Gotthard2] only in continuous mode. [Gotthard2] only in continuous mode.
:getter: always returns in seconds. To get in datetime.delta, use getPeriodLeft :getter: always returns in seconds. To get in datetime.delta, use getPeriodLeft
:setter: Not Implemented
Example Example
----------- -----------
>>> d.periodl >>> d.periodl
@ -486,7 +493,7 @@ class Detector(CppDetectorApi):
----- -----
[Gotthard2] only in continuous mdoe. [Gotthard2] only in continuous mdoe.
:getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTriggerLeft :getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTriggerLeft
:setter: Not Implemented
Example Example
----------- -----------
>>> d.delayl >>> d.delayl
@ -509,7 +516,7 @@ class Detector(CppDetectorApi):
self.stopReceiver() self.stopReceiver()
def stop(self): def stop(self):
"""Abort detector acquisition. Status changes to IDLE or STOPPED""" """Abort detector acquisition. Status changes to IDLE or STOPPED. Goes to stop server. """
self.stopDetector() self.stopDetector()
# Time # Time
@ -520,7 +527,7 @@ class Detector(CppDetectorApi):
@property @property
def startingfnum(self): def startingfnum(self):
"""[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquiistion might result in different frame numbers for different modules. """ """[Eiger][Jungfrau] Starting frame number for next acquisition. Stopping acquisition might result in different frame numbers for different modules. """
return element_if_equal(self.getStartingFrameNumber()) return element_if_equal(self.getStartingFrameNumber())
@startingfnum.setter @startingfnum.setter
@ -532,6 +539,14 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def txndelay_frame(self): def txndelay_frame(self):
"""
[Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
Note
----
[Jungfrau] [0-31] Each value represents 1 ms. \n
[Eiger] Additional delay to txndelay_left and txndelay_right. Each value represents 10ns. Typical value is 50000. \n
[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms.
"""
return self.getTransmissionDelayFrame() return self.getTransmissionDelayFrame()
@txndelay_frame.setter @txndelay_frame.setter
@ -541,6 +556,11 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def txndelay_left(self): def txndelay_left(self):
"""[Eiger] Transmission delay of first packet in an image being streamed out of the module's left UDP port.
Note
-----
Each value represents 10ns. Typical value is 50000.
"""
return self.getTransmissionDelayLeft() return self.getTransmissionDelayLeft()
@txndelay_left.setter @txndelay_left.setter
@ -550,6 +570,12 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def txndelay_right(self): def txndelay_right(self):
"""
[Eiger] Transmission delay of first packet in an image being streamed out of the module's right UDP port.
Note
----
Each value represents 10ns. Typical value is 50000.
"""
return self.getTransmissionDelayRight() return self.getTransmissionDelayRight()
@txndelay_right.setter @txndelay_right.setter
@ -1198,7 +1224,8 @@ class Detector(CppDetectorApi):
"""Gets detector status. Enum: runStatus """Gets detector status. Enum: runStatus
Note Note
----- -----
Options: IDLE, ERROR, WAITING, RUN_FINISHED, TRANSMITTING, RUNNING, STOPPED Options: IDLE, ERROR, WAITING, RUN_FINISHED, TRANSMITTING, RUNNING, STOPPED \n
Goes to stop server.
>>> d.status >>> d.status
runStatus.IDLE runStatus.IDLE
""" """
@ -1354,10 +1381,12 @@ class Detector(CppDetectorApi):
@property @property
def timinglist(self): def timinglist(self):
"""Gets the list of timing modes (timingMode) for this detector."""
return self.getTimingModeList() return self.getTimingModeList()
@property @property
def templist(self): def templist(self):
"""List of temperature enums (dacIndex) implemented for this detector."""
return self.getTemperatureList() return self.getTemperatureList()
@property @property
@ -1402,11 +1431,23 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def triggersl(self): def triggersl(self):
"""
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of triggers left in acquisition.\n
Note
----
[Gotthard2] only in continuous mode.
:setter: Not Implemented
"""
return self.getNumberOfTriggersLeft() return self.getNumberOfTriggersLeft()
@property @property
@element @element
def timestamp(self): def timestamp(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
Note
----
[Gotthard2] not in burst and auto mode.
"""
return self.getMeasurementTime() return self.getMeasurementTime()
@property @property
@ -2037,6 +2078,13 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def timingsource(self): def timingsource(self):
"""
[Gotthard2] Timing source. Enum: timingSourceType
Note
-----
Options: TIMING_INTERNAL, TIMING_EXTERNAL \n
Internal is crystaland external is system timing. Default is internal.
"""
return self.getTimingSource() return self.getTimingSource()
@timingsource.setter @timingsource.setter
@ -2846,7 +2894,7 @@ class Detector(CppDetectorApi):
Note Note
----- -----
:getter: always returns in seconds. To get in datetime.delta, use getExptimeLeft :getter: always returns in seconds. To get in datetime.delta, use getExptimeLeft
:setter: Not Implemented
Example Example
----------- -----------
>>> d.exptimel >>> d.exptimel

View File

@ -456,10 +456,11 @@ class Detector {
void startDetector(); void startDetector();
/** Non blocking: Abort detector acquisition. Status changes to IDLE or /** Non blocking: Abort detector acquisition. Status changes to IDLE or
* STOPPED */ * STOPPED. Goes to stop server. */
void stopDetector(); void stopDetector();
/** IDLE, ERROR, WAITING, RUN_FINISHED, TRANSMITTING, RUNNING, STOPPED */ /** IDLE, ERROR, WAITING, RUN_FINISHED, TRANSMITTING, RUNNING, STOPPED \n
* Goes to stop server */
Result<defs::runStatus> getDetectorStatus(Positions pos = {}) const; Result<defs::runStatus> getDetectorStatus(Positions pos = {}) const;
/** Options: IDLE, TRANSMITTING, RUNNING */ /** Options: IDLE, TRANSMITTING, RUNNING */
@ -474,7 +475,7 @@ class Detector {
/** [Eiger][Jungfrau] */ /** [Eiger][Jungfrau] */
Result<uint64_t> getStartingFrameNumber(Positions pos = {}) const; Result<uint64_t> getStartingFrameNumber(Positions pos = {}) const;
/** [Eiger][Jungfrau] Stopping acquiistion might result in different frame /** [Eiger][Jungfrau] Stopping acquisition might result in different frame
* numbers for different modules.*/ * numbers for different modules.*/
void setStartingFrameNumber(uint64_t value, Positions pos = {}); void setStartingFrameNumber(uint64_t value, Positions pos = {});
@ -619,26 +620,26 @@ class Detector {
Result<int> getTransmissionDelayFrame(Positions pos = {}) const; Result<int> getTransmissionDelayFrame(Positions pos = {}) const;
/** /**
* [Jungfrau]: Sets the transmission delay of the first UDP packet being * Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being
* streamed out of the module. Options: 0 - 31, each value represenets 1 ms * streamed out of the module.\n[Jungfrau] [0-31] Each value represents 1
* [Eiger]: Sets the transmission delay of entire frame streamed out for * ms\n[Eiger] Additional delay to txndelay_left and txndelay_right. Each
* both left and right UDP ports. Options: //TODO possible values * value represents 10ns. Typical value is 50000.\n[Mythen3] [0-16777215]
* [Mythen3] Options: [0-16777215] Each value represents 8 ns (125 MHz * Each value represents 8 ns (125 MHz clock), max is 134 ms.
* clock), max is 134 ms.
*/ */
void setTransmissionDelayFrame(int value, Positions pos = {}); void setTransmissionDelayFrame(int value, Positions pos = {});
/** [Eiger] */ /** [Eiger] */
Result<int> getTransmissionDelayLeft(Positions pos = {}) const; Result<int> getTransmissionDelayLeft(Positions pos = {}) const;
/** /**[Eiger] Transmission delay of first packet in an image being streamed out
* [Eiger] * of the module's left UDP port. Each value represents 10ns. Typical value
* Sets the transmission delay of first packet streamed out of the left UDP * is 50000.
* port
*/ */
void setTransmissionDelayLeft(int value, Positions pos = {}); void setTransmissionDelayLeft(int value, Positions pos = {});
/** [Eiger] */ /** [Eiger] Transmission delay of first packet in an image being streamed
* out of the module's right UDP port. Each value represents 10ns. Typical
* value is 50000. */
Result<int> getTransmissionDelayRight(Positions pos = {}) const; Result<int> getTransmissionDelayRight(Positions pos = {}) const;
/** /**
@ -1022,12 +1023,12 @@ class Detector {
Result<int> getThresholdTemperature(Positions pos = {}) const; Result<int> getThresholdTemperature(Positions pos = {}) const;
/** /**
* [Jungfrau]Set threshold temperature * [Jungfrau]Set threshold temperature in degrees.
* If temperature crosses threshold temperature * If temperature crosses threshold temperature
* and temperature control is enabled (default is disabled), power to chip * and temperature control is enabled (default is disabled), power to chip
* will be switched off and temperature event will be set. \n To power on * will be switched off and temperature event will be set. \n To power on
* chip again, temperature has to be less than threshold temperature and * chip again, temperature has to be less than threshold temperature and
* temperature event has to be cleared. val is value in degrees * temperature event has to be cleared.
*/ */
void setThresholdTemperature(int temp, Positions pos = {}); void setThresholdTemperature(int temp, Positions pos = {});
@ -1077,8 +1078,9 @@ class Detector {
/** [Jungfrau] Advanced*/ /** [Jungfrau] Advanced*/
Result<ns> getStorageCellDelay(Positions pos = {}) const; Result<ns> getStorageCellDelay(Positions pos = {}) const;
/** [Jungfrau] Advanced \n /** [Jungfrau] Advanced \n Additional time delay between 2 consecutive
* Options: (0-1638375 ns (resolution of 25ns) */ * exposures in burst mode. \n Options: (0-1638375 ns (resolution of 25ns)
*/
void setStorageCellDelay(ns value, Positions pos = {}); void setStorageCellDelay(ns value, Positions pos = {});
///@{ ///@{
@ -1185,7 +1187,7 @@ class Detector {
/** [Gotthard2] */ /** [Gotthard2] */
Result<defs::timingSourceType> getTimingSource(Positions pos = {}) const; Result<defs::timingSourceType> getTimingSource(Positions pos = {}) const;
/** [Gotthard2] Options: TIMING_INTERNAL, TIMING_EXTERNAL */ /** [Gotthard2] Options: TIMING_INTERNAL (default), TIMING_EXTERNAL */
void setTimingSource(defs::timingSourceType value, Positions pos = {}); void setTimingSource(defs::timingSourceType value, Positions pos = {});
/** [Gotthard2] */ /** [Gotthard2] */
@ -1629,8 +1631,8 @@ class Detector {
Result<int> getStopPort(Positions pos = {}) const; Result<int> getStopPort(Positions pos = {}) const;
/** Detector Stop TCP port (for client communication with Detector Stop /** Port number of the stop server on detector for detector-client tcp
* server) */ * interface. Default is 1953. Normally unchanged. */
void setStopPort(int value, Positions pos = {}); void setStopPort(int value, Positions pos = {});
Result<bool> getDetectorLock(Positions pos = {}) const; Result<bool> getDetectorLock(Positions pos = {}) const;

View File

@ -1015,7 +1015,7 @@ std::string CmdProxy::DetectorStatus(int action) {
os << cmd << ' '; os << cmd << ' ';
if (action == defs::HELP_ACTION) { if (action == defs::HELP_ACTION) {
os << "[running, error, transmitting, finished, waiting, " os << "[running, error, transmitting, finished, waiting, "
"idle]\n\tDetector status." "idle]\n\tDetector status. Goes to stop server. "
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
if (!args.empty()) { if (!args.empty()) {

View File

@ -1686,9 +1686,9 @@ class CmdProxy {
"\n\tStarts detector acquisition. Status changes to RUNNING or WAITING " "\n\tStarts detector acquisition. Status changes to RUNNING or WAITING "
"and automatically returns to idle at the end of acquisition."); "and automatically returns to idle at the end of acquisition.");
EXECUTE_SET_COMMAND_NOID( EXECUTE_SET_COMMAND_NOID(stop, stopDetector,
stop, stopDetector, "\n\tAbort detector acquisition. Status changes "
"\n\tAbort detector acquisition. Status changes to IDLE or STOPPED."); "to IDLE or STOPPED. Goes to stop server.");
GET_COMMAND(rx_framescaught, getFramesCaught, GET_COMMAND(rx_framescaught, getFramesCaught,
"\n\tNumber of frames caught by receiver."); "\n\tNumber of frames caught by receiver.");
@ -1700,7 +1700,7 @@ class CmdProxy {
startingfnum, getStartingFrameNumber, setStartingFrameNumber, startingfnum, getStartingFrameNumber, setStartingFrameNumber,
StringTo<uint64_t>, StringTo<uint64_t>,
"[n_value]\n\t[Eiger][Jungfrau] Starting frame number for " "[n_value]\n\t[Eiger][Jungfrau] Starting frame number for "
"next acquisition. Stopping acquiistion might result in " "next acquisition. Stopping acquisition might result in "
"different frame numbers for different modules."); "different frame numbers for different modules.");
EXECUTE_SET_COMMAND( EXECUTE_SET_COMMAND(
@ -1811,13 +1811,12 @@ class CmdProxy {
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
txndelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame, txndelay_frame, getTransmissionDelayFrame, setTransmissionDelayFrame,
StringTo<int>, StringTo<int>,
"[n_delay]\n\t[Eiger][Jungfrau][Mythen3] Transmission delay of each " "[n_delay]\n\t[Eiger][Jungfrau][Mythen3] Transmission delay of first "
"image being " "udp packet being streamed out of the module.\n\t[Jungfrau] [0-31] "
"streamed out of the module.\n\t[Jungfrau] [0-31] Each value " "Each value represents 1 ms\n\t[Eiger] Additional delay to "
"represents 1 ms\n\t[Eiger] Additional delay to txndelay_left and " "txndelay_left and txndelay_right. Each value represents 10ns. Typical "
"txndelay_right. Each value represents 10ns. Typical value is " "value is 50000.\n\t[Mythen3] [0-16777215] Each value represents 8 ns "
"50000.\n\t[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz " "(125 MHz clock), max is 134 ms.");
"clock), max is 134 ms.");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
txndelay_left, getTransmissionDelayLeft, setTransmissionDelayLeft, txndelay_left, getTransmissionDelayLeft, setTransmissionDelayLeft,