6#include "roo_logging.h"
10#if defined(ESP32) || defined(ESP8266) || defined(__linux__)
36 return volume_flow_rate_ * 1000000.0f;
40 bool isUnknown()
const {
return std::isnan(volume_flow_rate_); }
43 return volume_flow_rate_ < other.volume_flow_rate_;
47 return volume_flow_rate_ == other.volume_flow_rate_;
51 return other.volume_flow_rate_ < volume_flow_rate_;
55 return !(other.volume_flow_rate_ < volume_flow_rate_);
59 return !(volume_flow_rate_ < other.volume_flow_rate_);
63 return !(volume_flow_rate_ == other.volume_flow_rate_);
77 volume_flow_rate_ *= multi;
82 volume_flow_rate_ /= div;
86#if defined(ESP32) || defined(ESP8266) || defined(__linux__)
88 std::string asString()
const;
92 String asArduinoString()
const;
101 : volume_flow_rate_(volume_flow_rate) {}
104 float volume_flow_rate_;
108 float volume_flow_rate);
116 float volume_flow_rate) {
129 float volume_flow_rate) {
176roo_logging::Stream&
operator<<(roo_logging::Stream& os,
const VolumeFlowRate& val);
Representation of elapsed, internally stored as floating-point seconds.
float inSeconds() const
Returns the time in seconds.
Representation of volume flow rate, internally stored as floating-point cubic meters per second.
bool isUnknown() const
Returns whether the object represents an unknown volume flow rate.
bool operator==(const VolumeFlowRate &other) const
bool operator>=(const VolumeFlowRate &other) const
VolumeFlowRate & operator+=(const VolumeFlowRate &other)
float inLitersPerSecond() const
Returns the volume flow rate in liters per second.
friend VolumeFlowRate UnknownVolumeFlowRate()
Returns a volume flow rate object representing an unknown volume flow rate.
VolumeFlowRate & operator*=(float multi)
float inMillilitersPerSecond() const
Returns the volume flow rate in milliliters per second.
bool operator<(const VolumeFlowRate &other) const
float inCubicMetersPerSecond() const
Returns the volume flow rate in cubic meters per second.
VolumeFlowRate & operator/=(float div)
VolumeFlowRate & operator-=(const VolumeFlowRate &other)
bool operator!=(const VolumeFlowRate &other) const
bool operator<=(const VolumeFlowRate &other) const
friend VolumeFlowRate VolumeFlowRateInCubicMetersPerSecond(float)
Returns a volume flow rate object equivalent to the specified volume flow rate expressed in cubic met...
bool operator>(const VolumeFlowRate &other) const
VolumeFlowRate()
Creates a volume flow rate object representing an 'unknown' volume flow rate.
Representation of volume, internally stored as floating-point cubic meters.
float inCubicMeters() const
Returns the volume in cubic meters.
For convenience conversion from roo_time::Duration.
roo_logging::Stream & operator<<(roo_logging::Stream &os, const Area &val)
Volume VolumeInCubicMeters(float volume)
Returns a volume object equivalent to the specified volume expressed in cubic meters.
VolumeFlowRate VolumeFlowRateInCubicMetersPerSecond(float volume_flow_rate)
Returns a volume flow rate object equivalent to the specified volume flow rate expressed in cubic met...
Area operator+(Area a, Area b)
Area operator-(Area a, Area b)
VolumeFlowRate VolumeFlowRateInLitersPerSecond(float volume_flow_rate)
Returns a volume flow rate object equivalent to the specified volume flow rate expressed in liters pe...
VolumeFlowRate VolumeFlowRateInMillilitersPerSecond(float volume_flow_rate)
Returns a volume flow rate object equivalent to the specified volume flow rate expressed in millilite...
VolumeFlowRate UnknownVolumeFlowRate()
Returns a volume flow rate object representing an unknown volume flow rate.
Area operator/(Area a, float b)
Area operator*(Area a, float b)