6 #ifndef RATIOSIGNAL_HPP_INCLUDE
7 #define RATIOSIGNAL_HPP_INCLUDE
21 std::shared_ptr<Signal> denominator);
26 double sample(
void)
override;
27 double read(
void)
const override;
29 std::shared_ptr<Signal> m_numerator;
30 std::shared_ptr<Signal> m_denominator;
31 bool m_is_batch_ready;
A composite signal used by an IOGroup to produce a signal as the Ratio of two signals.
Definition: RatioSignal.hpp:18
void setup_batch(void) override
Prepare the signal for being updated through side effects by the owner's read_batch step....
Definition: RatioSignal.cpp:28
RatioSignal(const RatioSignal &other)=delete
RatioSignal & operator=(const RatioSignal &other)=delete
double sample(void) override
Apply any conversions necessary to interpret the latest stored value as a double.
Definition: RatioSignal.cpp:37
double read(void) const override
Read directly the value of the signal without affecting any pushed batch signals.
Definition: RatioSignal.cpp:54
virtual ~RatioSignal()=default
RatioSignal(std::shared_ptr< Signal > numerator, std::shared_ptr< Signal > denominator)
Definition: RatioSignal.cpp:18
Definition: Signal.hpp:16