mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
WIP
This commit is contained in:
parent
dea402a7e7
commit
6a89e3e1a5
@ -35,7 +35,7 @@ void init_experimental(py::module &m) {
|
||||
py::arg() = Positions{})
|
||||
.def("clearBit", &Detector::clearBit, py::arg(), py::arg(),
|
||||
py::arg() = Positions{})
|
||||
.def("getRegister", &Detector::getRegister, py::arg(),
|
||||
.def("readRegister", &Detector::readRegister, py::arg(),
|
||||
py::arg() = Positions{})
|
||||
|
||||
.def("getStartingFrameNumber", &Detector::getStartingFrameNumber,
|
||||
|
@ -81,12 +81,9 @@ class Detector {
|
||||
*/
|
||||
void setBit(uint32_t addr, int bitnr, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Reads 32 bit register from detector
|
||||
* @param addr address of the register
|
||||
* @returns value read from register
|
||||
*/
|
||||
Result<uint32_t> getRegister(uint32_t addr, Positions pos = {});
|
||||
|
||||
Result<uint32_t> readRegister(uint32_t addr, Positions pos = {}) const;
|
||||
void writeRegister(uint32_t addr, uint32_t val, Positions pos = {});
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
@ -1324,9 +1321,11 @@ class Detector {
|
||||
void setDetectorIP2(const std::string &detectorIP, Positions pos = {});
|
||||
|
||||
Result<IpAddr> getDetectorIP(Positions pos = {}) const;
|
||||
|
||||
void setDetectorIP(const std::string &detectorIP, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getDetectorMAC(Positions pos = {}) const;
|
||||
|
||||
void setDetectorMAC(const std::string &detectorMAC, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
@ -1334,6 +1333,12 @@ class Detector {
|
||||
|
||||
/** [Jungfrau] */
|
||||
void setDetectorMAC2(const std::string &detectorMAC, Positions pos = {});
|
||||
|
||||
/** [Eiger] */
|
||||
Result<bool> getInterruptSubframe(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] when set the last subframe is interrupted at end of acq*/
|
||||
void setInterruptSubframe(const bool enable, Positions pos = {});
|
||||
};
|
||||
|
||||
} // namespace sls
|
@ -942,7 +942,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns value read after writing
|
||||
*/
|
||||
uint32_t writeRegister(uint32_t addr, uint32_t val, int detPos = -1);
|
||||
uint32_t writeRegister(uint32_t addr, uint32_t val, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Read from a register. For Advanced users
|
||||
|
@ -47,7 +47,11 @@ void Detector::clearBit(uint32_t addr, int bitnr, Positions pos) {
|
||||
void Detector::setBit(uint32_t addr, int bitnr, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setBit, pos, addr, bitnr);
|
||||
}
|
||||
Result<uint32_t> Detector::getRegister(uint32_t addr, Positions pos) {
|
||||
void Detector::writeRegister(uint32_t addr, uint32_t val, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::writeRegister, pos, addr, val);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::readRegister(uint32_t addr, Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::readRegister, pos, addr);
|
||||
}
|
||||
|
||||
@ -1153,34 +1157,42 @@ void Detector::setReceiverHostname(const std::string &receiver, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverHostname, pos, receiver);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getDetectorIP2(Positions pos) const{
|
||||
Result<IpAddr> Detector::getDetectorIP2(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getDetectorIP2, pos);
|
||||
}
|
||||
|
||||
void Detector::setDetectorIP2(const std::string &detectorIP, Positions pos){
|
||||
void Detector::setDetectorIP2(const std::string &detectorIP, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDetectorIP2, pos, detectorIP);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getDetectorIP(Positions pos) const{
|
||||
Result<IpAddr> Detector::getDetectorIP(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getDetectorIP, pos);
|
||||
}
|
||||
|
||||
void Detector::setDetectorIP(const std::string &detectorIP, Positions pos){
|
||||
void Detector::setDetectorIP(const std::string &detectorIP, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDetectorIP, pos, detectorIP);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getDetectorMAC(Positions pos) const{
|
||||
Result<MacAddr> Detector::getDetectorMAC(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getDetectorMAC, pos);
|
||||
}
|
||||
void Detector::setDetectorMAC(const std::string &detectorMAC, Positions pos){
|
||||
void Detector::setDetectorMAC(const std::string &detectorMAC, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDetectorMAC, pos, detectorMAC);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getDetectorMAC2(Positions pos) const{
|
||||
Result<MacAddr> Detector::getDetectorMAC2(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getDetectorMAC2, pos);
|
||||
}
|
||||
void Detector::setDetectorMAC2(const std::string &detectorMAC, Positions pos){
|
||||
void Detector::setDetectorMAC2(const std::string &detectorMAC, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDetectorMAC2, pos, detectorMAC);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getInterruptSubframe(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getInterruptSubframe, pos);
|
||||
}
|
||||
|
||||
void Detector::setInterruptSubframe(const bool enable, Positions pos){
|
||||
pimpl->Parallel(&slsDetector::setInterruptSubframe, pos, enable);
|
||||
}
|
||||
|
||||
} // namespace sls
|
Loading…
x
Reference in New Issue
Block a user