Rover API Documentation
rover::RoverDHT22 Class Reference

RoverDHT22 is a class that is inherited from RoverSensor abstract class. RoverDHT22 class contains member functions and variables to set up and read from DHT22 temperature and humidity sensor that is embedded on the rover. More...

#include <rover_dht22.hpp>

Inheritance diagram for rover::RoverDHT22:
rover::RoverSensor

Public Member Functions

 RoverDHT22 ()
 Constructor for the RoverDHT22 class. More...
 
 ~RoverDHT22 ()
 Destructor for the RoverDHT22 class. More...
 
void initialize (void)
 Function to setup DHT22 sensor. More...
 
float read (void)
 Reads the temperature value from DHT22 (float). More...
 
float readTemperature (void)
 Reads the temperature value from DHT22 (float). More...
 
float readHumidity (void)
 Reads the humidity value from DHT22 (float). More...
 
void setDHT22Pin (const int pin)
 Sets the DHT22 pin in wiringPi format. More...
 
int getDHT22Pin (void)
 Returns the DHT22 pin in wiringPi format. More...
 
- Public Member Functions inherited from rover::RoverSensor
virtual ~RoverSensor ()
 Destructor for the RoverSensor class. More...
 

Private Attributes

int DHT22Pin
 Pin in wiringPi format for DHT22 signal. More...
 
int DHT22_SETUP_
 Flag to hold if DHT22 is set up. More...
 

Detailed Description

RoverDHT22 is a class that is inherited from RoverSensor abstract class. RoverDHT22 class contains member functions and variables to set up and read from DHT22 temperature and humidity sensor that is embedded on the rover.

Constructor & Destructor Documentation

rover::RoverDHT22::RoverDHT22 ( )
explicit

Constructor for the RoverDHT22 class.

rover::RoverDHT22::~RoverDHT22 ( )

Destructor for the RoverDHT22 class.

Member Function Documentation

int rover::RoverDHT22::getDHT22Pin ( void  )

Returns the DHT22 pin in wiringPi format.

Returns
Pin to return as DHT22's signal in wiringPi format
void rover::RoverDHT22::initialize ( void  )
virtual

Function to setup DHT22 sensor.

Returns
void

Implements rover::RoverSensor.

float rover::RoverDHT22::read ( void  )
virtual

Reads the temperature value from DHT22 (float).

Returns
temperature_val Temperature in Celcius (float).

Implements rover::RoverSensor.

float rover::RoverDHT22::readHumidity ( void  )

Reads the humidity value from DHT22 (float).

Returns
humidity Humidity in Percentage (float).
float rover::RoverDHT22::readTemperature ( void  )

Reads the temperature value from DHT22 (float).

Returns
temperature_val Temperature in Celcius (float).
void rover::RoverDHT22::setDHT22Pin ( const int  pin)

Sets the DHT22 pin in wiringPi format.

Parameters
pinPin to set as DHT22's signal in wiringPi format
Returns
void

Member Data Documentation

int rover::RoverDHT22::DHT22_SETUP_
private

Flag to hold if DHT22 is set up.

int rover::RoverDHT22::DHT22Pin
private

Pin in wiringPi format for DHT22 signal.


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