trikRuntime
|
Worker object that processes range sensor output and updates stored reading. More...
#include <rangeSensorWorker.h>
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 | |
Worker object that processes range sensor output and updates stored reading.
Meant to be executed in separate thread.
RangeSensorWorker::RangeSensorWorker | ( | const QString & | eventFile, |
DeviceState & | state, | ||
const trikHal::HardwareAbstractionInterface & | hardwareAbstraction | ||
) |
Constructor.
eventFile | - event file for this sensor. |
|
override |
|
slot |
Initializes sensor and begins receiving events from it.
|
signal |
Emitted when new data is received from a sensor.
|
slot |
Returns current raw reading of a sensor.
|
slot |
Returns current real raw reading of a sensor.
|
slot |
Stops sensor until init() will be called again.