trikRuntime
trikControl::Encoder Class Reference

Implementation of encoder for real robot. More...

#include <encoder.h>

Inheritance diagram for trikControl::Encoder:
Collaboration diagram for trikControl::Encoder:

Public Slots

int read () override
 
int readRawData () override
 
void reset () override
 
- Public Slots inherited from trikControl::EncoderInterface
virtual int read ()=0
 Returns current encoder reading (in degrees). More...
 
virtual int readRawData ()=0
 Returns current raw reading of encoder. More...
 
virtual void reset ()=0
 Resets encoder by setting current reading to 0. More...
 

Public Member Functions

 Encoder (const QString &port, const trikKernel::Configurer &configurer, trikControl::MspCommunicatorInterface &communicator)
 Constructor. More...
 
Status status () const override
 Returns current status of the device. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Implementation of encoder for real robot.

Constructor & Destructor Documentation

Encoder::Encoder ( const QString &  port,
const trikKernel::Configurer configurer,
trikControl::MspCommunicatorInterface communicator 
)

Constructor.

Parameters
port- port on which this encoder is configured.
configurer- configurer object containing preparsed XML files with encoder parameters.
communicator- I2C communicator to use to query encoder.

Member Function Documentation

int Encoder::read ( )
overrideslot
int Encoder::readRawData ( )
overrideslot
void Encoder::reset ( )
overrideslot
Encoder::Status Encoder::status ( ) const
overridevirtual

Returns current status of the device.

Implements trikControl::DeviceInterface.


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