mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
ctb server: sync clk get added
This commit is contained in:
parent
6c33f7de7b
commit
4b69c01357
Binary file not shown.
@ -799,6 +799,8 @@ int getSpeed(enum speedVariable ind, int mode) {
|
|||||||
return getFrequency(ADC_CLK);
|
return getFrequency(ADC_CLK);
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
return getFrequency(DBIT_CLK);
|
return getFrequency(DBIT_CLK);
|
||||||
|
case SYNC_CLOCK:
|
||||||
|
return getFrequency(SYNC_CLK);
|
||||||
case CLOCK_DIVIDER:
|
case CLOCK_DIVIDER:
|
||||||
return getFrequency(RUN_CLK);
|
return getFrequency(RUN_CLK);
|
||||||
case ADC_PIPELINE:
|
case ADC_PIPELINE:
|
||||||
|
@ -146,6 +146,7 @@ const char* getSpeedName(enum speedVariable ind) {
|
|||||||
case DBIT_PIPELINE: return "dbit_pipeline";
|
case DBIT_PIPELINE: return "dbit_pipeline";
|
||||||
case MAX_ADC_PHASE_SHIFT: return "max_adc_phase_shift";
|
case MAX_ADC_PHASE_SHIFT: return "max_adc_phase_shift";
|
||||||
case MAX_DBIT_PHASE_SHIFT: return "max_dbit_phase_shift";
|
case MAX_DBIT_PHASE_SHIFT: return "max_dbit_phase_shift";
|
||||||
|
case SYNC_CLOCK: return "sync_clock";
|
||||||
default: return "unknown_speed";
|
default: return "unknown_speed";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1976,6 +1977,7 @@ int set_speed(int file_des) {
|
|||||||
case MAX_DBIT_PHASE_SHIFT:
|
case MAX_DBIT_PHASE_SHIFT:
|
||||||
case ADC_CLOCK:
|
case ADC_CLOCK:
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
|
case SYNC_CLOCK:
|
||||||
case CLOCK_DIVIDER:
|
case CLOCK_DIVIDER:
|
||||||
case ADC_PIPELINE:
|
case ADC_PIPELINE:
|
||||||
case DBIT_PIPELINE:
|
case DBIT_PIPELINE:
|
||||||
@ -1986,6 +1988,7 @@ int set_speed(int file_des) {
|
|||||||
case MAX_DBIT_PHASE_SHIFT:
|
case MAX_DBIT_PHASE_SHIFT:
|
||||||
case ADC_CLOCK:
|
case ADC_CLOCK:
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
|
case SYNC_CLOCK:
|
||||||
case CLOCK_DIVIDER:
|
case CLOCK_DIVIDER:
|
||||||
case ADC_PIPELINE:
|
case ADC_PIPELINE:
|
||||||
case DBIT_PIPELINE:
|
case DBIT_PIPELINE:
|
||||||
|
@ -752,19 +752,26 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
|
|||||||
++i;
|
++i;
|
||||||
|
|
||||||
/*! \page config
|
/*! \page config
|
||||||
- <b>adcclk [i]</b> sets/gets the ADC clock frequency in MHz. CTB & Moench only. It also resets adcphase. \c Returns \c (int)
|
- <b>adcclk [i]</b> sets/gets the ADC clock frequency in MHz. CTB & Moench only. \c Returns \c (int)
|
||||||
*/
|
*/
|
||||||
descrToFuncMap[i].m_pFuncName = "adcclk";
|
descrToFuncMap[i].m_pFuncName = "adcclk";
|
||||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdSpeed;
|
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdSpeed;
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
/*! \page config
|
/*! \page config
|
||||||
- <b>dbitclk [i]</b> Sets/gets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. It also resets dbit phase. \c Returns \c (int)
|
- <b>dbitclk [i]</b> Sets/gets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. \c Returns \c (int)
|
||||||
*/
|
*/
|
||||||
descrToFuncMap[i].m_pFuncName = "dbitclk";
|
descrToFuncMap[i].m_pFuncName = "dbitclk";
|
||||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdSpeed;
|
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdSpeed;
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
|
/*! \page config
|
||||||
|
- <b>syncclk </b> Gets the clock frequency of the sync clock in MHz. CTB & Moench only. Get only. \c Returns \c (int)
|
||||||
|
*/
|
||||||
|
descrToFuncMap[i].m_pFuncName = "syncclk";
|
||||||
|
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdSpeed;
|
||||||
|
++i;
|
||||||
|
|
||||||
/*! \page config
|
/*! \page config
|
||||||
- <b>adcphase [i] [deg]</b> Sets/gets phase of the ADC clock to i. i is the shift or in degrees if deg is used. deg is optional & only for CTB, Moench and Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger. \c Returns \c (int)
|
- <b>adcphase [i] [deg]</b> Sets/gets phase of the ADC clock to i. i is the shift or in degrees if deg is used. deg is optional & only for CTB, Moench and Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger. \c Returns \c (int)
|
||||||
*/
|
*/
|
||||||
@ -4680,6 +4687,12 @@ std::string slsDetectorCommand::cmdSpeed(int narg, const char * const args[], in
|
|||||||
else if (cmd == "dbitclk") {
|
else if (cmd == "dbitclk") {
|
||||||
index = DBIT_CLOCK;
|
index = DBIT_CLOCK;
|
||||||
}
|
}
|
||||||
|
else if (cmd == "syncclk") {
|
||||||
|
index = SYNC_CLOCK;
|
||||||
|
if (action == PUT_ACTION) {
|
||||||
|
return std::string("cannot put");
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (cmd == "adcphase") {
|
else if (cmd == "adcphase") {
|
||||||
index = ADC_PHASE;
|
index = ADC_PHASE;
|
||||||
if ((action == PUT_ACTION && narg > 2 && std::string(args[2]) == "deg") ||
|
if ((action == PUT_ACTION && narg > 2 && std::string(args[2]) == "deg") ||
|
||||||
@ -4735,8 +4748,8 @@ std::string slsDetectorCommand::helpSpeed(int action) {
|
|||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
if (action == PUT_ACTION || action == HELP_ACTION) {
|
if (action == PUT_ACTION || action == HELP_ACTION) {
|
||||||
os << "clkdivider c \t sets readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. Jungfrau, full speed is not implemented and overwrites adcphase to recommended default. Not for Gotthard." << std::endl;
|
os << "clkdivider c \t sets readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. Jungfrau, full speed is not implemented and overwrites adcphase to recommended default. Not for Gotthard." << std::endl;
|
||||||
os << "adcclk c \tSets ADC clock frequency in MHz. CTB & Moench only. It also resets adcphase." << std::endl;
|
os << "adcclk c \tSets ADC clock frequency in MHz. CTB & Moench only. " << std::endl;
|
||||||
os << "dbitclk c \tSets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. It also resets dbit phase." << std::endl;
|
os << "dbitclk c \tSets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. " << std::endl;
|
||||||
os << "adcphase c [deg]\t Sets phase of the ADC clock to i. i is the shift or in degrees if deg is used. deg is optional & only for CTB, Moench & Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger." << std::endl;
|
os << "adcphase c [deg]\t Sets phase of the ADC clock to i. i is the shift or in degrees if deg is used. deg is optional & only for CTB, Moench & Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger." << std::endl;
|
||||||
os << "dbitphase c [deg]\t Sets the phase of the clock for latching of the digital bits to i. i is the shift or in degrees if deg is used. deg is optional. dbitphase is also reset if dbitclk is changed. These are absolute values with limits. for CTB & Moench only." << std::endl;
|
os << "dbitphase c [deg]\t Sets the phase of the clock for latching of the digital bits to i. i is the shift or in degrees if deg is used. deg is optional. dbitphase is also reset if dbitclk is changed. These are absolute values with limits. for CTB & Moench only." << std::endl;
|
||||||
os << "adcpipeline c \t Sets the pipeline of the ADC. For CTB & Moench only." << std::endl;
|
os << "adcpipeline c \t Sets the pipeline of the ADC. For CTB & Moench only." << std::endl;
|
||||||
@ -4745,8 +4758,9 @@ std::string slsDetectorCommand::helpSpeed(int action) {
|
|||||||
}
|
}
|
||||||
if (action == GET_ACTION || action == HELP_ACTION) {
|
if (action == GET_ACTION || action == HELP_ACTION) {
|
||||||
os << "clkdivider \t Gets readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. Jungfrau, full speed is not implemented and overwrites adcphase to recommended default. Not for Gotthard." << std::endl;
|
os << "clkdivider \t Gets readout clock divider. EIGER, JUNGFRAU [0(fast speed), 1(half speed), 2(quarter speed)]. Jungfrau, full speed is not implemented and overwrites adcphase to recommended default. Not for Gotthard." << std::endl;
|
||||||
os << "adcclk \tGets ADC clock frequency in MHz. CTB & Moench only. It also resets adcphase." << std::endl;
|
os << "adcclk \tGets ADC clock frequency in MHz. CTB & Moench only. " << std::endl;
|
||||||
os << "dbitclk \tGets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. It also resets dbit phase." << std::endl;
|
os << "dbitclk \tGets the clock frequency of the latching of the digital bits in MHz. CTB & Moench only. " << std::endl;
|
||||||
|
os << "syncclk \t Gets the clock frequency of the sync clock in MHz. CTB & Moench only." << std::endl;
|
||||||
os << "adcphase [deg]\t Gets phase of the ADC clock. unit is number of shifts or in degrees if deg is used. deg is optional & only for CTB, Moench & Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger." << std::endl;
|
os << "adcphase [deg]\t Gets phase of the ADC clock. unit is number of shifts or in degrees if deg is used. deg is optional & only for CTB, Moench & Jungfrau. For CTB & Moench, adcphase is reset if adcclk is changed. For Jungfrau, adcphase changed to defaults if clkdivider changed. Jungfrau, CTB & Moench, these are absolute values with limits. Gotthard, relative phase shift. Not for Eiger." << std::endl;
|
||||||
os << "dbitphase [deg]\t Gets the phase of the clock for latching of the digital bits. unit is number of shifts or in degrees if deg is used. deg is optional. dbitphase is also reset if dbitclk is changed. These are absolute values with limits. for CTB & Moench only." << std::endl;
|
os << "dbitphase [deg]\t Gets the phase of the clock for latching of the digital bits. unit is number of shifts or in degrees if deg is used. deg is optional. dbitphase is also reset if dbitclk is changed. These are absolute values with limits. for CTB & Moench only." << std::endl;
|
||||||
os << "adcpipeline \t Gets the pipeline of the ADC. For CTB & Moench only." << std::endl;
|
os << "adcpipeline \t Gets the pipeline of the ADC. For CTB & Moench only." << std::endl;
|
||||||
|
@ -497,6 +497,7 @@ format
|
|||||||
DBIT_PIPELINE, /**< adc pipeline */
|
DBIT_PIPELINE, /**< adc pipeline */
|
||||||
MAX_ADC_PHASE_SHIFT, /** max adc phase shift */
|
MAX_ADC_PHASE_SHIFT, /** max adc phase shift */
|
||||||
MAX_DBIT_PHASE_SHIFT, /** max adc phase shift */
|
MAX_DBIT_PHASE_SHIFT, /** max adc phase shift */
|
||||||
|
SYNC_CLOCK,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user