ECRobot C++ API for LEGO MINDSTORMS NXT  1.0.10
ecrobot::Sensor Class Reference

A/D sensor abstract class. More...

#include <Sensor.h>

Inheritance diagram for ecrobot::Sensor:
ecrobot::GyroSensor ecrobot::LightSensor ecrobot::RcxLightSensor ecrobot::SoundSensor ecrobot::TouchSensor

List of all members.

Public Member Functions

S16 get (void) const
 Get raw A/D value.

Protected Member Functions

ePortS getPort (void) const
 Get the sensor connected port.
 Sensor (ePortS port, ePower power=POWER_OFF)
 Constructor.
virtual ~Sensor (void)
 Destructor (power off the sensor).

Detailed Description

A/D sensor abstract class.


Constructor & Destructor Documentation

ecrobot::Sensor::Sensor ( ePortS  port,
ePower  power = POWER_OFF 
) [inline, explicit, protected]

Constructor.

Parameters:
portSensor connected port
powerPower mode
Returns:
-
virtual ecrobot::Sensor::~Sensor ( void  ) [inline, protected, virtual]

Destructor (power off the sensor).

Parameters:
-
Returns:
-

Member Function Documentation

S16 ecrobot::Sensor::get ( void  ) const [inline]

Get raw A/D value.

Parameters:
-
Returns:
raw A/D value (0 to 1023)
ePortS ecrobot::Sensor::getPort ( void  ) const [inline, protected]

Get the sensor connected port.

Parameters:
-
Returns:
Sensor connected port

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines