trikRuntime
trikControl::EventDeviceWorker Class Reference

Worker for generic event device that uses HAL device file to listen to events. Meant to be run in separate thread. More...

#include <eventDeviceWorker.h>

Inheritance diagram for trikControl::EventDeviceWorker:
Collaboration diagram for trikControl::EventDeviceWorker:

Signals

void newEvent (int onEvent, int code, int value, int eventTime)
 Emitted when there is new event in an event file. More...
 

Public Member Functions

 EventDeviceWorker (const QString &deviceFilePath, DeviceState &state, const trikHal::HardwareAbstractionInterface &hardwareAbstraction)
 Constructor. More...
 

Detailed Description

Worker for generic event device that uses HAL device file to listen to events. Meant to be run in separate thread.

Constructor & Destructor Documentation

EventDeviceWorker::EventDeviceWorker ( const QString &  deviceFilePath,
DeviceState state,
const trikHal::HardwareAbstractionInterface hardwareAbstraction 
)

Constructor.

Parameters
deviceFilePath- path to device file that will provide events.
state- device state, worker sets it to "failed" if it can not open file.
hardwareAbstraction- interface to TRIK hardware.

Member Function Documentation

void trikControl::EventDeviceWorker::newEvent ( int  onEvent,
int  code,
int  value,
int  eventTime 
)
signal

Emitted when there is new event in an event file.

Parameters
event- type of the event.
code- code of the event inside a type.
value- value sent with the event.
eventTime- time stamp of the event, in msecs form start of the epoch.

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