Easyuino
1.2.0
|
General class that provides the common API behaviour for all the devices/sensors. More...
#include <Device.h>
Public Member Functions | |
Device () | |
Constructor called by every sub-classes. | |
~Device () | |
Destroy all the resources associated with the device. | |
virtual bool | begin ()=0 |
Used to put the device ready to receive requests. More... | |
virtual void | end ()=0 |
Used to stop the device API. More... | |
bool | isInitialized () const |
Verify is the device is initialized and ready to use. More... | |
Protected Attributes | |
bool | _isInitialized |
Used to know if the device API is initialized and ready to receive requests. | |
General class that provides the common API behaviour for all the devices/sensors.
|
pure 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.
Implemented in Easyuino::GSMService, Easyuino::DistanceMeter, Easyuino::DistanceMeterNonBlock, Easyuino::RGBLed, Easyuino::WaterFlowMeter, Easyuino::WaterDetector, Easyuino::Button, Easyuino::WaterFlowSensor, Easyuino::SevenSegments, and Easyuino::Relay.
|
pure virtual |
Used to stop the device API.
After this the the device will not process API requests.
Implemented in Easyuino::GSMService, Easyuino::DistanceMeter, Easyuino::DistanceMeterNonBlock, Easyuino::RGBLed, Easyuino::WaterFlowMeter, Easyuino::WaterDetector, Easyuino::Button, Easyuino::WaterFlowSensor, Easyuino::SevenSegments, and Easyuino::Relay.
bool Easyuino::Device::isInitialized | ( | ) | const |
Verify is the device is initialized and ready to use.