trikRuntime
trikControl::GyroSensor Class Reference

Sensor that returns a vector. More...

#include <gyroSensor.h>

Inheritance diagram for trikControl::GyroSensor:
Collaboration diagram for trikControl::GyroSensor:

Public Slots

QVector< int > read () const override
 
QVector< int > readRawData () const override
 
void calibrate (int msec) override
 
QVector< int > getCalibrationValues () override
 
void setCalibrationValues (const QVector< int > &values) override
 
bool isCalibrated () const override
 
- Public Slots inherited from trikControl::GyroSensorInterface
virtual void calibrate (int msec)=0
 Calibrates bias value of sensor, sets new bias value, resets other values include tilt values. More...
 
virtual QVector< int > getCalibrationValues ()=0
 Returns vector with calibration values, which consists of 6 elements: 0-2 – gyroscope bias, 3-5 – average accelerometer values. More...
 
virtual void setCalibrationValues (const QVector< int > &values)=0
 Sets vector with calibration values to gyroscope sensor. More...
 
virtual bool isCalibrated () const =0
 Checks if bias is counted or not. More...
 
virtual QVector< int > readRawData () const =0
 Returns current raw reading of a sensor. More...
 
- Public Slots inherited from trikControl::VectorSensorInterface
virtual QVector< int > read () const =0
 Returns current raw reading of a sensor. More...
 

Public Member Functions

 GyroSensor (const QString &deviceName, const trikKernel::Configurer &configurer, const trikHal::HardwareAbstractionInterface &hardwareAbstraction, VectorSensorInterface *accelerometer)
 Constructor. More...
 
 ~GyroSensor () override
 
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...
 
- Signals inherited from trikControl::GyroSensorInterface
void calibrationFinished ()
 Emites when average mean of bias is counted. More...
 
- Signals inherited from trikControl::VectorSensorInterface
void newData (QVector< int > reading, const trikKernel::TimeVal &eventTime)
 Emitted when new sensor reading is ready. 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

Sensor that returns a vector.

Constructor & Destructor Documentation

GyroSensor::GyroSensor ( const QString &  deviceName,
const trikKernel::Configurer configurer,
const trikHal::HardwareAbstractionInterface hardwareAbstraction,
VectorSensorInterface accelerometer 
)

Constructor.

Parameters
port- port on which this sensor is configured.
configurer- configurer object containing preparsed XML files with sensor parameters.
GyroSensor::~GyroSensor ( )
override

Member Function Documentation

void GyroSensor::calibrate ( int  msec)
overrideslot
QVector< int > GyroSensor::getCalibrationValues ( )
overrideslot
bool GyroSensor::isCalibrated ( ) const
overrideslot
QVector< int > GyroSensor::read ( ) const
overrideslot
QVector< int > GyroSensor::readRawData ( ) const
overrideslot
void GyroSensor::setCalibrationValues ( const QVector< int > &  values)
overrideslot
GyroSensor::Status GyroSensor::status ( ) const
overridevirtual

Returns current status of the device.

Implements trikControl::DeviceInterface.


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