trikRuntime
|
TRIK device interface, base interface for everything that can be plugged to a brick or already on board. More...
#include <deviceInterface.h>
Public Types | |
enum | Status { Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting, Status::ready, Status::stopping } |
Device status. More... | |
Public Member Functions | |
DeviceInterface ()=default | |
virtual | ~DeviceInterface ()=default |
virtual Status | status () const =0 |
Returns current status of the device. More... | |
Static Public Member Functions | |
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... | |
TRIK device interface, base interface for everything that can be plugged to a brick or already on board.
|
strong |
Device status.
|
default |
|
virtualdefault |
|
inlinestatic |
Helper method to return status of a device relying on other device to work.
If first device is ready, status of a second device is returned, otherwise it is status of a first device.
|
pure virtual |
Returns current status of the device.
Implemented in trikControl::Fifo, trikControl::GyroSensor, trikControl::AbstractVirtualSensorWorker, trikControl::RangeSensor, trikControl::LineSensor, trikControl::CameraDevice, trikControl::ColorSensor, trikControl::I2cCommunicator, trikControl::ServoMotor, trikControl::Keys, trikControl::ObjectSensor, trikControl::SoundSensor, trikControl::MspI2cCommunicator, trikControl::MspUsbCommunicator, trikControl::VectorSensor, trikControl::Led, trikControl::PwmCapture, trikControl::EventDevice, trikControl::PowerMotor, trikControl::Gamepad, trikControl::AnalogSensor, trikControl::Encoder, trikControl::Battery, trikControl::I2cDevice, and trikControl::CameraDeviceInterface.