Official interfaces for ST components.

Dependents:   X_NUCLEO_IKS01A1 mDot_X_NUCLEO_IKS01A1 53L0A1 X_NUCLEO_IKS01A1 ... more

Fork of ST_INTERFACES by Davide Aliprandi

This library contains all abstract classes which together constitute the common API to which all existing and future ST components will adhere to.

Revision:
3:b1bb477e115e
Parent:
2:e2bf4d06a8fc
Child:
4:8f70f7159316
--- a/Sensors/RangeSensor.h	Tue Nov 29 17:43:48 2016 +0000
+++ b/Sensors/RangeSensor.h	Fri Mar 10 10:50:53 2017 +0100
@@ -36,25 +36,37 @@
  ******************************************************************************
  */
 
+
 /* Define to prevent from recursive inclusion --------------------------------*/
+
 #ifndef __RANGE_SENSOR_CLASS_H
 #define __RANGE_SENSOR_CLASS_H
 
+
 /* Includes ------------------------------------------------------------------*/
-#include <ComponentObject.h>
+
+#include <Component.h>
+
 
 /* Classes  ------------------------------------------------------------------*/
-/** An abstract class for range sensors
+
+/**
+ * An abstract class for range sensors
  */
-class RangeSensor : public ComponentObject
-{
- public:
+class RangeSensor : public Component {
+public:
+
     /**
      * @brief       Get current range [mm]
      * @param[out]  piData Pointer to where to store range to
      * @return      0 in case of success, an error code otherwise
      */
-    virtual int GetDistance(uint32_t *piData) = 0;
+    virtual int get_distance(uint32_t *piData) = 0;
+
+    /**
+     * @brief Destructor.
+     */
+	virtual ~RangeSensor() {};
 };
 
 #endif /* __RANGE_SENSOR_CLASS_H */