trikRuntime
|
Implementation of generic event device that uses HAL device file to provide events. More...
#include <eventDevice.h>
Public Member Functions | |
EventDevice (const QString &eventFile, const trikHal::HardwareAbstractionInterface &hardwareAbstraction) | |
Constructor. More... | |
~EventDevice () override | |
EventInterface * | onEvent (int eventType) override |
Returns object that allows to selectively subscribe only to event with given code. More... | |
Status | status () const override |
Returns current status of the device. More... | |
Public Member Functions inherited from trikControl::DeviceInterface | |
DeviceInterface ()=default | |
virtual | ~DeviceInterface ()=default |
Additional Inherited Members | |
Public Types inherited from trikControl::DeviceInterface | |
enum | Status { Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting, Status::ready, Status::stopping } |
Device status. More... | |
Public Slots inherited from trikControl::EventDeviceInterface | |
Signals inherited from trikControl::EventDeviceInterface | |
void | on (int event, int code, int value, int eventTime) |
Emitted when there is new event in an event file. More... | |
Static Public Member Functions inherited from trikControl::DeviceInterface | |
static Status | combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent) |
Helper method to return status of a device relying on other device to work. More... | |
Implementation of generic event device that uses HAL device file to provide events.
EventDevice::EventDevice | ( | const QString & | eventFile, |
const trikHal::HardwareAbstractionInterface & | hardwareAbstraction | ||
) |
Constructor.
eventFile | - path to event file that this object needs to watch. |
hardwareAbstraction | - interface to underlying hardware or operating system capabilities of a robot. |
|
override |
|
overridevirtual |
Returns object that allows to selectively subscribe only to event with given code.
Implements trikControl::EventDeviceInterface.
|
overridevirtual |
Returns current status of the device.
Implements trikControl::DeviceInterface.