17 #include <QtCore/QObject> 18 #include <QtCore/QString> 19 #include <QtCore/QScopedPointer> 20 #include <QReadWriteLock> 66 QScopedPointer<trikHal::EventFileInterface> mEventFile;
70 int mRawDistance = -1;
77 const QString mEventFileName;
79 QReadWriteLock mDistanceLock;
void init()
Initializes sensor and begins receiving events from it.
Definition: rangeSensorWorker.cpp:66
Worker object that processes range sensor output and updates stored reading.
Definition: rangeSensorWorker.h:31
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
Structure of a time value in a convenient format.
Definition: timeVal.h:20
int readRawData()
Returns current real raw reading of a sensor.
Definition: rangeSensorWorker.cpp:128
~RangeSensorWorker() override
Definition: rangeSensorWorker.cpp:35
Definition: trikCommunicator.h:27
void newData(int distance, int rawDistance, const trikKernel::TimeVal &eventTime)
Emitted when new data is received from a sensor.
RangeSensorWorker(const QString &eventFile, DeviceState &state, const trikHal::HardwareAbstractionInterface &hardwareAbstraction)
Constructor.
Definition: rangeSensorWorker.cpp:27
void stop()
Stops sensor until init() will be called again.
Definition: rangeSensorWorker.cpp:42
int read()
Returns current raw reading of a sensor.
Definition: rangeSensorWorker.cpp:117
Hardware abstraction, provides devices that are used to communicate with robot hardware or emulate it...
Definition: hardwareAbstractionInterface.h:29