mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 01:50:40 +02:00
WIP
This commit is contained in:
parent
e7e4bf13c3
commit
1bdff2b681
@ -211,42 +211,95 @@ class Detector {
|
|||||||
|
|
||||||
// Erik
|
// Erik
|
||||||
|
|
||||||
|
/** [CTB] */
|
||||||
|
void setPatternClockControl(uint64_t word, Positions pos = {});
|
||||||
|
|
||||||
|
/** [CTB] */
|
||||||
|
Result<uint64_t> getPatternClockControl(Positions pos = {}) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CTB only. Sets the wait time
|
* [CTB] Writes a pattern word
|
||||||
* @param level 0,1,2, wait level
|
* @param addr address of the word
|
||||||
* @param t wait time, -1 gets
|
* @param word word to be written, -1 reads the addr (same as
|
||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* executing the pattern)
|
||||||
|
* @param pos detector position
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
uint64_t setPatternWaitTime(int level, uint64_t t = -1, int detPos = -1);
|
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
||||||
|
|
||||||
/** CTB only.Sets the mask applied to every pattern. */
|
// TODO! Does this have side effects?
|
||||||
|
// uint64_t getPatternWord()...
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [CTB] Sets the pattern or loop limits.
|
||||||
|
* @param level -1 complete pattern, 0,1,2, loop level
|
||||||
|
* @param start start address for level 0-2
|
||||||
|
* @param stop stop address for level 0-2
|
||||||
|
* @param n number of loops for level 0-2
|
||||||
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
|
*/
|
||||||
|
void setPatternLoops(int level, int start, int stop, int n,
|
||||||
|
Positions pos = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [CTB] Gets the pattern loop limits
|
||||||
|
* @param level -1 complete pattern, 0,1,2, loop level
|
||||||
|
* @param pos detector positions
|
||||||
|
* @returns array of start address, stop address and number of loops
|
||||||
|
*/
|
||||||
|
Result<std::array<int, 3>> getPatternLoops(int level,
|
||||||
|
Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [CTB] Sets the wait address
|
||||||
|
* @param level 0,1,2, wait level
|
||||||
|
* @param addr wait address
|
||||||
|
* @param pos detector position
|
||||||
|
* @returns actual value
|
||||||
|
*/
|
||||||
|
void setPatternWaitAddr(int level, int addr, Positions pos = {});
|
||||||
|
|
||||||
|
/* [CTB] */
|
||||||
|
Result<int> getPatternWaitAddr(int level, Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [CTB] Sets the wait time
|
||||||
|
* @param level 0,1,2, wait level
|
||||||
|
* @param t wait time
|
||||||
|
* @param pos detector position
|
||||||
|
*/
|
||||||
|
void setPatternWaitTime(int level, uint64_t t, Positions pos = {});
|
||||||
|
|
||||||
|
/** [CTB] */
|
||||||
|
Result<uint64_t> getPatternWaitTime(int level, Positions pos = {}) const;
|
||||||
|
|
||||||
|
/** [CTB] Sets the mask applied to every pattern. */
|
||||||
void setPatternMask(uint64_t mask, Positions pos = {});
|
void setPatternMask(uint64_t mask, Positions pos = {});
|
||||||
|
|
||||||
/** CTB only. Gets the mask applied to every pattern. */
|
/** [CTB] Gets the mask applied to every pattern. */
|
||||||
Result<uint64_t> getPatternMask(Positions pos = {});
|
Result<uint64_t> getPatternMask(Positions pos = {});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CTB only. Sets the bitmask that the mask will be applied to for every
|
* [CTB] Sets the bitmask that the mask will be applied to for every
|
||||||
* pattern.
|
* pattern.
|
||||||
* @param mask mask to select bits
|
* @param mask mask to select bits
|
||||||
*/
|
*/
|
||||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CTB only. Gets the bits that the mask will be applied to for every
|
* [CTB] Gets the bits that the mask will be applied to for every
|
||||||
* pattern
|
* pattern
|
||||||
*/
|
*/
|
||||||
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
||||||
|
|
||||||
/** CTB only. Enable or disable the LED */
|
/** [CTB] Enable or disable the LED */
|
||||||
void setLEDEnable(bool enable, Positions pos = {});
|
void setLEDEnable(bool enable, Positions pos = {});
|
||||||
|
|
||||||
/** CTB only. Get LED enable. */
|
/** [CTB] Get LED enable. */
|
||||||
Result<bool> getLEDEnable(Positions pos = {}) const;
|
Result<bool> getLEDEnable(Positions pos = {}) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CTB only. Set Digital IO Delay
|
* [CTB] Set Digital IO Delay
|
||||||
* @param digital IO mask to select the pins
|
* @param digital IO mask to select the pins
|
||||||
* @param delay delay in ps(1 bit=25ps, max of 775 ps)
|
* @param delay delay in ps(1 bit=25ps, max of 775 ps)
|
||||||
*/
|
*/
|
||||||
|
@ -2052,7 +2052,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
uint64_t setPatternClockControl(uint64_t word = -1, int detPos = -1);
|
uint64_t setPatternClockControl(uint64_t word = -1, int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a pattern word (CTB/ Moench)
|
* Writes a pattern word (CTB/ Moench)
|
||||||
@ -2062,7 +2062,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
uint64_t setPatternWord(int addr, uint64_t word, int detPos = -1);
|
uint64_t setPatternWord(int addr, uint64_t word, int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the pattern or loop limits (CTB/ Moench)
|
* Sets the pattern or loop limits (CTB/ Moench)
|
||||||
@ -2073,7 +2073,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
*/
|
*/
|
||||||
void setPatternLoops(int level, int start = -1, int stop = -1, int n = -1,
|
void setPatternLoops(int level, int start = -1, int stop = -1, int n = -1,
|
||||||
int detPos = -1);
|
int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the pattern loop limits (CTB/ Moench)
|
* Gets the pattern loop limits (CTB/ Moench)
|
||||||
@ -2081,7 +2081,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns array of start address, stop address and number of loops
|
* @returns array of start address, stop address and number of loops
|
||||||
*/
|
*/
|
||||||
std::array<int, 3> getPatternLoops(int level, int detPos = -1);
|
std::array<int, 3> getPatternLoops(int level, int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the wait address (CTB/ Moench)
|
* Sets the wait address (CTB/ Moench)
|
||||||
@ -2090,7 +2090,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
int setPatternWaitAddr(int level, int addr = -1, int detPos = -1);
|
int setPatternWaitAddr(int level, int addr = -1, int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the wait time (CTB/ Moench)
|
* Sets the wait time (CTB/ Moench)
|
||||||
@ -2099,7 +2099,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
uint64_t setPatternWaitTime(int level, uint64_t t = -1, int detPos = -1);
|
uint64_t setPatternWaitTime(int level, uint64_t t = -1, int detPos = -1); //
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the mask applied to every pattern (CTB/ Moench)
|
* Sets the mask applied to every pattern (CTB/ Moench)
|
||||||
|
@ -172,15 +172,56 @@ Result<std::string> Detector::getDetectorTypeAsString(Positions pos) const {
|
|||||||
// Erik
|
// Erik
|
||||||
|
|
||||||
|
|
||||||
Result<uint64_t> Detector::getPatternMask(Positions pos){
|
void Detector::setPatternClockControl(uint64_t word, Positions pos){
|
||||||
|
pimpl->Parallel(&slsDetector::setPatternClockControl, pos, word);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<uint64_t> Detector::getPatternClockControl(Positions pos) const{
|
||||||
|
return pimpl->Parallel(&slsDetector::setPatternClockControl, pos, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setPatternWord(int addr, uint64_t word, Positions pos){
|
||||||
|
pimpl->Parallel(&slsDetector::setPatternWord, pos, addr, word);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Detector::setPatternLoops(int level, int start, int stop, int n, Positions pos){
|
||||||
|
pimpl->Parallel(&slsDetector::setPatternLoops, pos, level, start, stop, n);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<std::array<int, 3>> Detector::getPatternLoops(int level,
|
||||||
|
Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::setPatternLoops, pos, level, -1, -1,
|
||||||
|
-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setPatternWaitAddr(int level, int addr, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setPatternWaitAddr, pos, level, addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int> Detector::getPatternWaitAddr(int level, Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::setPatternWaitAddr, pos, level, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Detector::setPatternWaitTime(int level, uint64_t t, Positions pos) {
|
||||||
|
pimpl->Parallel(&slsDetector::setPatternWaitTime, pos, level, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<uint64_t> Detector::getPatternWaitTime(int level, Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::setPatternWaitTime, pos, level, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<uint64_t> Detector::getPatternMask(Positions pos) {
|
||||||
return pimpl->Parallel(&slsDetector::getPatternMask, pos);
|
return pimpl->Parallel(&slsDetector::getPatternMask, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setPatternBitMask(uint64_t mask, Positions pos){
|
void Detector::setPatternBitMask(uint64_t mask, Positions pos) {
|
||||||
pimpl->Parallel(&slsDetector::setPatternBitMask, pos, mask);
|
pimpl->Parallel(&slsDetector::setPatternBitMask, pos, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<uint64_t> Detector::getPatternBitMask(Positions pos) const{
|
Result<uint64_t> Detector::getPatternBitMask(Positions pos) const {
|
||||||
return pimpl->Parallel(&slsDetector::getPatternBitMask, pos);
|
return pimpl->Parallel(&slsDetector::getPatternBitMask, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +233,7 @@ Result<bool> Detector::getLEDEnable(Positions pos) const {
|
|||||||
return pimpl->Parallel(&slsDetector::setLEDEnable, pos, -1);
|
return pimpl->Parallel(&slsDetector::setLEDEnable, pos, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Detector::setDigitalIODelay(uint64_t pinMask, int delay, Positions pos){
|
void Detector::setDigitalIODelay(uint64_t pinMask, int delay, Positions pos) {
|
||||||
pimpl->Parallel(&slsDetector::setDigitalIODelay, pos, pinMask, delay);
|
pimpl->Parallel(&slsDetector::setDigitalIODelay, pos, pinMask, delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user