Wyatt  1.0.1
Public Member Functions | List of all members
EncoderSensor Class Reference

#include <EncoderSensor.h>

Inheritance diagram for EncoderSensor:
Inheritance graph
[legend]
Collaboration diagram for EncoderSensor:
Collaboration graph
[legend]

Public Member Functions

 EncoderSensor ()
 
 ~EncoderSensor ()
 
void updateSensor (IMessage *message)
 
double getRPM ()
 
- Public Member Functions inherited from ISensor
virtual ~ISensor ()
 

Detailed Description

Model class used to encapsulate the current speed of the motor as determined by the encoder TODO: change data from RPM to velocity in cm/s to decouple program from hardware

Definition at line 17 of file EncoderSensor.h.

Constructor & Destructor Documentation

EncoderSensor::EncoderSensor ( )

Constructor.

Definition at line 7 of file EncoderSensor.cpp.

EncoderSensor::~EncoderSensor ( )

Destructor.

Definition at line 11 of file EncoderSensor.cpp.

Member Function Documentation

double EncoderSensor::getRPM ( )

Returns the RPM of a wheel.

Returns

Definition at line 27 of file EncoderSensor.cpp.

void EncoderSensor::updateSensor ( IMessage message)
virtual

Updates this object with the newest measurements from an encoder. Measurements may need to be scaled by a gear ratio.

Parameters
messageIMessage (EncoderMessage) encapsulating the newest measurements.
Exceptions
MismatchedMessageExceptionif the type of the message is not EncoderMessage

Implements ISensor.

Definition at line 15 of file EncoderSensor.cpp.


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