trikRuntime
trikControl::VectorSensorWorker Class Reference

Handles events from sensor, intended to work in separate thread. More...

#include <vectorSensorWorker.h>

Inheritance diagram for trikControl::VectorSensorWorker:
Collaboration diagram for trikControl::VectorSensorWorker:

Public Slots

QVector< int > read ()
 Returns current raw reading of a sensor. More...
 

Signals

void newData (QVector< int > reading, const trikKernel::TimeVal &eventTime)
 Emitted when new sensor reading is ready. More...
 

Public Member Functions

 VectorSensorWorker (const QString &eventFile, DeviceState &state, const trikHal::HardwareAbstractionInterface &hardwareAbstraction, QThread &thread)
 Constructor. More...
 

Detailed Description

Handles events from sensor, intended to work in separate thread.

Constructor & Destructor Documentation

VectorSensorWorker::VectorSensorWorker ( const QString &  eventFile,
DeviceState state,
const trikHal::HardwareAbstractionInterface hardwareAbstraction,
QThread &  thread 
)

Constructor.

Parameters
eventFile- device file for this sensor.
state- state of a device.
thread- background thread where all socket events will be processed.

Member Function Documentation

void trikControl::VectorSensorWorker::newData ( QVector< int >  reading,
const trikKernel::TimeVal eventTime 
)
signal

Emitted when new sensor reading is ready.

QVector< int > VectorSensorWorker::read ( )
slot

Returns current raw reading of a sensor.

Todo:
: vector copying is not atomic, so we may receive evSyn right in the middle of "return mReading".

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