// Copyright (2019-2023) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_DETECTORWRAPPER_H #define JUNGFRAUJOCH_DETECTORWRAPPER_H #include #include #include "../common/Logger.h" #define BASE_DETECTOR_MAC 0xAABBCCDDEE10 // little-endian! #define HIGH_VOLTAGE 120 #define THRESHOLD_TEMPERATURE_DEGC 60 class DetectorWrapper { Logger logger{"DetectorWrapper"}; sls::Detector det; void InternalStop(); public: enum class DetectorState {IDLE, ERROR, BUSY}; [[nodiscard]] DetectorState GetState() const; void Configure(const JFJochProtoBuf::DetectorConfig &config); void Start(const JFJochProtoBuf::DetectorInput &request); void Stop(); void Trigger(); void Deactivate(); int64_t GetFirmwareVersion(); std::string GetDetectorServerVersion(); }; #endif //JUNGFRAUJOCH_DETECTORWRAPPER_H