Easyuino
1.2.0
|
WaterFlowSensor is an API offers the ability to know if it is flowing something through the sensor or not using fluid flow meters. More...
#include <WaterFlowSensor.h>
Public Member Functions | |
WaterFlowSensor (IN uint8_t sensorPin) | |
Constructor. More... | |
~WaterFlowSensor () | |
Destructor. | |
bool | begin () |
Used to put the device ready to receive requests. More... | |
void | end () |
Used to stop the device API. More... | |
bool | isFlowing () const |
Checks if there there are flow in the sensor. More... | |
![]() | |
Device () | |
Constructor called by every sub-classes. | |
~Device () | |
Destroy all the resources associated with the device. | |
bool | isInitialized () const |
Verify is the device is initialized and ready to use. More... | |
Protected Member Functions | |
virtual void | pulseHandler (IN unsigned long callTimestamp) |
Called by the interruption ISR for each pulse. More... | |
Protected Attributes | |
uint8_t | _sensorPin |
Arduino pin connected to the sensor pulse pin. | |
volatile unsigned long | _lastPulseTimestamp |
Timestamp with the last time a pulse was detected. | |
![]() | |
bool | _isInitialized |
Used to know if the device API is initialized and ready to receive requests. | |
WaterFlowSensor is an API offers the ability to know if it is flowing something through the sensor or not using fluid flow meters.
Easyuino::WaterFlowSensor::WaterFlowSensor | ( | IN uint8_t | sensorPin | ) |
Constructor.
sensorPin | Arduino pin connected to the sensor pulse pin |
|
virtual |
Used to put the device ready to receive requests.
Normally this have some default behaviour some devices have other overload method with same name that receives other arguments to device customization.
Implements Easyuino::Device.
|
virtual |
Used to stop the device API.
After this the the device will not process API requests.
Implements Easyuino::Device.
bool Easyuino::WaterFlowSensor::isFlowing | ( | ) | const |
Checks if there there are flow in the sensor.
|
protectedvirtual |
Called by the interruption ISR for each pulse.
Reimplemented in Easyuino::WaterFlowMeter.