trikRuntime
|
Class that represents linux FIFO file, which is commonly used by various sensors. More...
#include <fifo.h>
Public Slots | |
QString | read () override |
Reads data from this FIFO file, returning all available data as string. More... | |
bool | hasData () const override |
Returns true if FIFO has new data in it. More... | |
Public Slots inherited from trikControl::FifoInterface | |
virtual QString | read ()=0 |
Reads data from this FIFO file, returning all available data as string. More... | |
virtual bool | hasData () const =0 |
Returns true if FIFO has new data in it. More... | |
Public Member Functions | |
Fifo (const QString &virtualPort, const trikKernel::Configurer &configurer, const trikHal::HardwareAbstractionInterface &hardwareAbstraction) | |
Constructor. More... | |
Fifo (const QString &fileName, const trikHal::HardwareAbstractionInterface &hardwareAbstraction) | |
Constructor. More... | |
~Fifo () 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::FifoInterface | |
void | newData (const QString &data) |
Emitted when new string is arrived to FIFO file. Emitted several times if more than one string arrives at once. 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... | |
Class that represents linux FIFO file, which is commonly used by various sensors.
Fifo::Fifo | ( | const QString & | virtualPort, |
const trikKernel::Configurer & | configurer, | ||
const trikHal::HardwareAbstractionInterface & | hardwareAbstraction | ||
) |
Constructor.
Creates FIFO device by a description in config file.
virtualPort | - port in system-config.xml on which this FIFO file is configured. |
configurer | - configurer object containing preparsed XML files with parameters. |
hardwareAbstraction | - interface to underlying hardware or operating system capabilities of a robot. |
Fifo::Fifo | ( | const QString & | fileName, |
const trikHal::HardwareAbstractionInterface & | hardwareAbstraction | ||
) |
Constructor.
Creates FIFO device programmatically by file name.
fileName | - name of a FIFO file. |
hardwareAbstraction | - interface to underlying hardware or operating system capabilities of a robot. |
|
override |
|
overrideslot |
Returns true if FIFO has new data in it.
|
overrideslot |
Reads data from this FIFO file, returning all available data as string.
|
overridevirtual |
Returns current status of the device.
Implements trikControl::DeviceInterface.