trikRuntime
trikControl::RangeSensorWorker Class Reference

Worker object that processes range sensor output and updates stored reading. More...

#include <rangeSensorWorker.h>

Inheritance diagram for trikControl::RangeSensorWorker:
Collaboration diagram for trikControl::RangeSensorWorker:

Public Slots

void init ()
 Initializes sensor and begins receiving events from it. More...
 
int read ()
 Returns current raw reading of a sensor. More...
 
int readRawData ()
 Returns current real raw reading of a sensor. More...
 
void stop ()
 Stops sensor until init() will be called again. More...
 

Signals

void newData (int distance, int rawDistance, const trikKernel::TimeVal &eventTime)
 Emitted when new data is received from a sensor. More...
 

Public Member Functions

 RangeSensorWorker (const QString &eventFile, DeviceState &state, const trikHal::HardwareAbstractionInterface &hardwareAbstraction)
 Constructor. More...
 
 ~RangeSensorWorker () override
 

Detailed Description

Worker object that processes range sensor output and updates stored reading.

Meant to be executed in separate thread.

Constructor & Destructor Documentation

RangeSensorWorker::RangeSensorWorker ( const QString &  eventFile,
DeviceState state,
const trikHal::HardwareAbstractionInterface hardwareAbstraction 
)

Constructor.

Parameters
eventFile- event file for this sensor.
RangeSensorWorker::~RangeSensorWorker ( )
override

Member Function Documentation

void RangeSensorWorker::init ( )
slot

Initializes sensor and begins receiving events from it.

void trikControl::RangeSensorWorker::newData ( int  distance,
int  rawDistance,
const trikKernel::TimeVal eventTime 
)
signal

Emitted when new data is received from a sensor.

int RangeSensorWorker::read ( )
slot

Returns current raw reading of a sensor.

int RangeSensorWorker::readRawData ( )
slot

Returns current real raw reading of a sensor.

void RangeSensorWorker::stop ( )
slot

Stops sensor until init() will be called again.


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