Rover API Documentation
rover_infraredsensor.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 FH Dortmund and others
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Description:
9  * RoverInfraredSensor API - Interfaces for Rover infrared sensor application development
10  * Header file
11  *
12  * Contributors:
13  * M.Ozcelikors <mozcelikors@gmail.com>, created RoverInfraredSensor class 04.12.2017
14  * Gael Blondelle, Eclipse Foundation, initial C-API and parameters
15  */
16 
17 #ifndef ROVERAPI_ROVER_INFRAREDSENSOR_HPP_
18 #define ROVERAPI_ROVER_INFRAREDSENSOR_HPP_
19 
21 
22 namespace rover
23 {
28  {
29  private:
34 
39 
40  public:
41 
46  explicit RoverInfraredSensor (const RoverSensorID_t sensor_id);
47 
52 
57  void initialize (void);
58 
63  float read (void);
64  };
65 }
66 
67 
68 
69 #endif /* ROVERAPI_ROVER_INFRAREDSENSOR_HPP_ */
~RoverInfraredSensor()
Destructor for the RoverInfraresSensor class.
Definition: rover_infraredsensor.cpp:40
RoverSensor class is an abstract class to define interface between common sensors used in the rover...
Definition: rover_sensor.hpp:48
RoverSensorID_t
RoverSensorID_t defines the sensor location ID of the proximity sensors on the rover.
Definition: rover_sensor.hpp:38
RoverInfraredSensor(const RoverSensorID_t sensor_id)
Constructor for the RoverInfraredSensor class.
Definition: rover_infraredsensor.cpp:23
void initialize(void)
Function to setup Analog to Digital converter used in infrared sensors. Should be called once per pro...
Definition: rover_infraredsensor.cpp:42
rover Namespace contains classes to manage Rover sensors, gpio, buzzer, buttons, driving, utilities, and cloud.
Definition: rover_api.hpp:293
float read(void)
Member function to read from infrared proximity sensor given its sensor id.
Definition: rover_infraredsensor.cpp:55
int ROVERINFRAREDSENSOR_SETUP_
Flag to hold if RoverInfraredSensor is set up.
Definition: rover_infraredsensor.hpp:38
RoverInfraredSensor is a class that is inherited from RoverSensor abstract class. RoverInfraredSensor...
Definition: rover_infraredsensor.hpp:27
RoverSensorID_t sensorID
Sensor Identification.
Definition: rover_infraredsensor.hpp:33