diff --git a/arrus/core/api/devices/us4r/Us4OEM.h b/arrus/core/api/devices/us4r/Us4OEM.h index 66df7a319..2120a6498 100644 --- a/arrus/core/api/devices/us4r/Us4OEM.h +++ b/arrus/core/api/devices/us4r/Us4OEM.h @@ -17,6 +17,8 @@ class Us4OEM : public Device, public TriggerGenerator { virtual double getSamplingFrequency() = 0; + virtual float getFPGATemperature() = 0; + Us4OEM(Us4OEM const&) = delete; Us4OEM(Us4OEM const&&) = delete; void operator=(Us4OEM const&) = delete; diff --git a/arrus/core/api/devices/us4r/Us4R.h b/arrus/core/api/devices/us4r/Us4R.h index 869133638..116f535c8 100644 --- a/arrus/core/api/devices/us4r/Us4R.h +++ b/arrus/core/api/devices/us4r/Us4R.h @@ -135,6 +135,16 @@ class Us4R : public DeviceWithComponents { */ virtual void setRxSettings(const RxSettings &settings) = 0; + /** + * Returns the number of us4OEM modules that are used in this us4R system. + */ + virtual uint8_t getNumberOfUs4OEMs() = 0; + + /** + * Returns us4R device sampling frequency. + */ + virtual float getSamplingFrequency() const = 0; + virtual void start() = 0; virtual void stop() = 0; diff --git a/arrus/core/devices/us4r/Us4RImpl.cpp b/arrus/core/devices/us4r/Us4RImpl.cpp index f5035ebc2..12edcb57e 100644 --- a/arrus/core/devices/us4r/Us4RImpl.cpp +++ b/arrus/core/devices/us4r/Us4RImpl.cpp @@ -270,4 +270,12 @@ void Us4RImpl::setActiveTermination(std::optional value) { setRxSettings(newRxSettings); } +uint8_t Us4RImpl::getNumberOfUs4OEMs() { + return us4oems.size(); +} + +float Us4RImpl::getSamplingFrequency() const { + return us4oems[0]->getSamplingFrequency(); +} + } \ No newline at end of file diff --git a/arrus/core/devices/us4r/Us4RImpl.h b/arrus/core/devices/us4r/Us4RImpl.h index ea815b16d..25485fcae 100644 --- a/arrus/core/devices/us4r/Us4RImpl.h +++ b/arrus/core/devices/us4r/Us4RImpl.h @@ -120,6 +120,8 @@ class Us4RImpl : public Us4R { void setLpfCutoff(uint32 value) override; void setDtgcAttenuation(std::optional value) override; void setActiveTermination(std::optional value) override; + uint8_t getNumberOfUs4OEMs() override; + float getSamplingFrequency() const override; private: UltrasoundDevice *getDefaultComponent(); diff --git a/arrus/core/devices/us4r/probeadapter/ProbeAdapterImplTest.cpp b/arrus/core/devices/us4r/probeadapter/ProbeAdapterImplTest.cpp index e7f94d599..054aa4873 100644 --- a/arrus/core/devices/us4r/probeadapter/ProbeAdapterImplTest.cpp +++ b/arrus/core/devices/us4r/probeadapter/ProbeAdapterImplTest.cpp @@ -94,6 +94,7 @@ class MockUs4OEM : public Us4OEMImplBase { (override)); MOCK_METHOD(Interval, getAcceptedVoltageRange, (), (override)); MOCK_METHOD(double, getSamplingFrequency, (), (override)); + MOCK_METHOD(float, getFPGATemperature, (), (override)); MOCK_METHOD(void, startTrigger, (), (override)); MOCK_METHOD(void, stopTrigger, (), (override)); MOCK_METHOD(void, start, (), (override)); diff --git a/arrus/core/devices/us4r/us4oem/Us4OEMImpl.cpp b/arrus/core/devices/us4r/us4oem/Us4OEMImpl.cpp index c8e364889..e12ecc4ad 100644 --- a/arrus/core/devices/us4r/us4oem/Us4OEMImpl.cpp +++ b/arrus/core/devices/us4r/us4oem/Us4OEMImpl.cpp @@ -639,6 +639,8 @@ inline void Us4OEMImpl::setActiveTerminationAfe(std::optional param, boo } } - +float Us4OEMImpl::getFPGATemperature() { + return ius4oem->GetFPGATemp(); +} } diff --git a/arrus/core/devices/us4r/us4oem/Us4OEMImpl.h b/arrus/core/devices/us4r/us4oem/Us4OEMImpl.h index 1aed34bfa..39eadfd56 100644 --- a/arrus/core/devices/us4r/us4oem/Us4OEMImpl.h +++ b/arrus/core/devices/us4r/us4oem/Us4OEMImpl.h @@ -117,6 +117,7 @@ class Us4OEMImpl : public Us4OEMImplBase { std::vector getChannelMapping() override; void setRxSettings(const RxSettings &newSettings) override; + float getFPGATemperature() override; private: using Us4OEMBitMask = std::bitset;