Creating a project about VL6180XA1 for TT_Mxx

Embed: (wiki syntax)

« Back to documentation index

RangeSensor Class Reference

RangeSensor Class Reference

An abstract class for range sensors. More...

#include <RangeSensor.h>

Inherits ComponentObject.

Public Member Functions

virtual int GetDistance (uint32_t *piData)=0
 Get current range [mm].
virtual int Init ()=0
 Initializing the component.
virtual int ReadID ()=0
 Getting the ID of the component.

Detailed Description

An abstract class for range sensors.

Definition at line 49 of file RangeSensor.h.


Member Function Documentation

virtual int GetDistance ( uint32_t *  piData ) [pure virtual]

Get current range [mm].

Parameters:
[out]piDataPointer to where to store range to
Returns:
0 in case of success, an error code otherwise
virtual int Init (  ) [pure virtual, inherited]

Initializing the component.

Parameters:
[in]initpointer to device specific initalization structure.
Return values:
0in case of success, an error code otherwise.
virtual int ReadID (  ) [pure virtual, inherited]

Getting the ID of the component.

Parameters:
[out]idpointer to an allocated variable to store the ID into.
Return values:
0in case of success, an error code otherwise.