trikRuntime
trikControl::EventDevice Class Reference

Implementation of generic event device that uses HAL device file to provide events. More...

#include <eventDevice.h>

Inheritance diagram for trikControl::EventDevice:
Collaboration diagram for trikControl::EventDevice:

Public Member Functions

 EventDevice (const QString &eventFile, const trikHal::HardwareAbstractionInterface &hardwareAbstraction)
 Constructor. More...
 
 ~EventDevice () override
 
EventInterfaceonEvent (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...
 

Detailed Description

Implementation of generic event device that uses HAL device file to provide events.

Constructor & Destructor Documentation

EventDevice::EventDevice ( const QString &  eventFile,
const trikHal::HardwareAbstractionInterface hardwareAbstraction 
)

Constructor.

Parameters
eventFile- path to event file that this object needs to watch.
hardwareAbstraction- interface to underlying hardware or operating system capabilities of a robot.
EventDevice::~EventDevice ( )
override

Member Function Documentation

EventInterface * EventDevice::onEvent ( int  eventType)
overridevirtual

Returns object that allows to selectively subscribe only to event with given code.

Implements trikControl::EventDeviceInterface.

EventDevice::Status EventDevice::status ( ) const
overridevirtual

Returns current status of the device.

Implements trikControl::DeviceInterface.


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