Console output device.
More...
#include <console_device.h>
|
| std::unique_ptr< Impl > | impl_ |
Console output device.
Simulates a terminal/console device. Writes are sent to stdout. Reads return the last written value (echo mode).
Definition at line 19 of file console_device.h.
◆ ConsoleDevice() [1/3]
| contur::ConsoleDevice::ConsoleDevice |
( |
| ) |
|
◆ ~ConsoleDevice()
| contur::ConsoleDevice::~ConsoleDevice |
( |
| ) |
|
|
override |
◆ ConsoleDevice() [2/3]
| contur::ConsoleDevice::ConsoleDevice |
( |
const ConsoleDevice & | | ) |
|
|
delete |
◆ ConsoleDevice() [3/3]
| contur::ConsoleDevice::ConsoleDevice |
( |
ConsoleDevice && | | ) |
|
|
noexcept |
◆ id()
| DeviceId contur::ConsoleDevice::id |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ isReady()
| bool contur::ConsoleDevice::isReady |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Returns true if the device is ready for I/O operations.
Implements contur::IDevice.
◆ name()
| std::string_view contur::ConsoleDevice::name |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ read()
Reads a value from the device.
- Returns
- The read value, or an error if the device is not ready or read is unsupported.
Implements contur::IDevice.
◆ write()
Writes a value to the device.
- Parameters
-
- Returns
- Success or an error if the device is not ready or write is unsupported.
Implements contur::IDevice.
◆ CONSOLE_DEVICE_ID
| DeviceId contur::ConsoleDevice::CONSOLE_DEVICE_ID = 1 |
|
staticconstexpr |
◆ impl_
| std::unique_ptr<Impl> contur::ConsoleDevice::impl_ |
|
private |
The documentation for this class was generated from the following file: