Easyuino  1.2.0
Easyuino::Device Class Referenceabstract

General class that provides the common API behaviour for all the devices/sensors. More...

#include <Device.h>

Inheritance diagram for Easyuino::Device:
Easyuino::Button Easyuino::DistanceMeter Easyuino::GSMService Easyuino::InfraRedReceiver Easyuino::Relay Easyuino::RGBLed Easyuino::SevenSegments Easyuino::WaterDetector Easyuino::WaterFlowSensor

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.
 

Detailed Description

General class that provides the common API behaviour for all the devices/sensors.

Member Function Documentation

◆ begin()

virtual bool Easyuino::Device::begin ( )
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.

Returns
True: If the device was initialized. False: Otherwise.

Implemented in Easyuino::GSMService, Easyuino::DistanceMeter, Easyuino::DistanceMeterNonBlock, Easyuino::RGBLed, Easyuino::WaterFlowMeter, Easyuino::WaterDetector, Easyuino::Button, Easyuino::WaterFlowSensor, Easyuino::SevenSegments, and Easyuino::Relay.

◆ end()

virtual void Easyuino::Device::end ( )
pure virtual

◆ isInitialized()

bool Easyuino::Device::isInitialized ( ) const

Verify is the device is initialized and ready to use.

Returns
True: If device is initialized. False: Otherwise.

The documentation for this class was generated from the following file: