mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
Error handling with exceptions in slsDetector and multiSlsDetector (#14)
* less error mask * removing error mask from slsDetector * removed ErrorMask * setonline, setreceiveornline bug fix
This commit is contained in:

committed by
Dhanya Thattil

parent
9d489dc962
commit
03402d0e9e
@ -16,16 +16,36 @@
|
||||
using sls::RuntimeError;
|
||||
using sls::SharedMemoryError;
|
||||
using sls::SocketError;
|
||||
using sls::DetectorError;
|
||||
|
||||
int main() {
|
||||
|
||||
|
||||
// const std::string hostname = "beb083";
|
||||
// auto type = slsDetector::getTypeFromDetector(hostname);
|
||||
// slsDetector d(type);
|
||||
// d.setHostname(hostname);
|
||||
// d.setReceiverHostname("mpc2408");
|
||||
const std::string hostname = "beb083";
|
||||
auto type = slsDetector::getTypeFromDetector(hostname);
|
||||
slsDetector d(type);
|
||||
d.setHostname(hostname);
|
||||
d.setOnline(true);
|
||||
std::cout << "hostname: " << d.getHostname() << '\n';
|
||||
d.setThresholdTemperature(50);
|
||||
// try{
|
||||
// d.setThresholdTemperature(50);
|
||||
// }catch(const DetectorError &e){
|
||||
// std::cout << "Caught: " << e.what() << '\n';
|
||||
// }
|
||||
// std::cout << "hostname: " << d.getHostname() << '\n';
|
||||
// std::cout << "exptime: " << d.setDAC(-1, slsDetectorDefs::E_Vrf, 0) << '\n';
|
||||
|
||||
|
||||
|
||||
|
||||
// slsDetector d2(type);
|
||||
// std::cout << "Online: " << d2.getOnlineFlag() << '\n';
|
||||
// d2.setHostname("beb55555");
|
||||
// d2.setOnline(true);
|
||||
// std::cout << "Online: " << d2.getOnlineFlag() << '\n';
|
||||
// std::cout << "hostname: " << d2.getHostname() << '\n';
|
||||
|
||||
// std::cout << "port: " << d.getControlPort() << '\n';
|
||||
// d.setOnline(true);
|
||||
// d.setReceiverOnline(true);
|
||||
|
@ -16,6 +16,7 @@ auto type_enum = slsDetectorDefs::detectorType::EIGER;
|
||||
const std::string hostname = "beb083";
|
||||
const std::string type_string = "Eiger";
|
||||
const std::string my_ip = "129.129.205.242";
|
||||
|
||||
TEST_CASE("single EIGER detector no receiver basic set and get") {
|
||||
//TODO! this test should take command line arguments for config
|
||||
|
||||
@ -195,13 +196,4 @@ TEST_CASE("Excersise all possible set timer functions") {
|
||||
CHECK(d.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME) == subtime);
|
||||
}
|
||||
|
||||
// TEST_CASE("ACQ") {
|
||||
// auto type = slsDetector::getTypeFromDetector(hostname);
|
||||
// auto d = slsDetector(type);
|
||||
// d.setHostname(hostname);
|
||||
// d.setOnline(true);
|
||||
|
||||
// d.prepareAcquisition();
|
||||
// d.startAcquisition();
|
||||
// d.stopAcquisition();
|
||||
// }
|
||||
// TEST_CASE()
|
Reference in New Issue
Block a user