trikRuntime
trikControl::Keys Class Reference

Implementation of handler for keys on a brick for a real robot. More...

#include <keys.h>

Inheritance diagram for trikControl::Keys:
Collaboration diagram for trikControl::Keys:

Public Slots

void reset () override
 
bool wasPressed (int code) override
 
bool isPressed (int code) override
 
int buttonCode (bool wait=true) override
 
- Public Slots inherited from trikControl::KeysInterface
virtual void reset ()=0
 Clear data about previous key pressures. More...
 
virtual bool wasPressed (int code)=0
 Returns true if button with given code was pressed, and clears "pressed" state for that button. More...
 
virtual bool isPressed (int code)=0
 Returns true if button with given code is pressed at the moment. More...
 
virtual int buttonCode (bool wait=true)=0
 Returns a code of a pressed button. More...
 

Public Member Functions

 Keys (const trikKernel::Configurer &configurer, const trikHal::HardwareAbstractionInterface &hardwareAbstraction)
 Constructor. More...
 
 ~Keys () override
 
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...
 
- Signals inherited from trikControl::KeysInterface
void buttonPressed (int code, int value)
 Triggered when button state changed (pressed or released). 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 handler for keys on a brick for a real robot.

Constructor & Destructor Documentation

Keys::Keys ( const trikKernel::Configurer configurer,
const trikHal::HardwareAbstractionInterface hardwareAbstraction 
)

Constructor.

Parameters
configurer- configurer object containing preparsed XML files with sensor parameters.
Keys::~Keys ( )
override

Member Function Documentation

int Keys::buttonCode ( bool  wait = true)
overrideslot
bool Keys::isPressed ( int  code)
overrideslot
void Keys::reset ( )
overrideslot
Keys::Status Keys::status ( ) const
overridevirtual

Returns current status of the device.

Implements trikControl::DeviceInterface.

bool Keys::wasPressed ( int  code)
overrideslot

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