#include <IOStream.hh>
Device for in/output of characters or strings.
Definition at line 63 of file IOStream.hh.
IOStream::Device::Device |
( |
| ) |
|
|
inline |
Default constructor for IOStream devices. Initiate non-blocking and CRLF end of line mode.
Definition at line 69 of file IOStream.hh.
int IOStream::Device::available |
( |
| ) |
|
|
virtual |
void IOStream::Device::blocking |
( |
| ) |
|
|
inline |
void IOStream::Device::empty |
( |
| ) |
|
|
virtual |
void IOStream::Device::eol |
( |
Mode |
mode | ) |
|
|
inline |
Set end of line mode.
- Parameters
-
Definition at line 103 of file IOStream.hh.
Mode IOStream::Device::eol |
( |
| ) |
const |
|
inline |
Get end of line mode.
- Returns
- mode.
Definition at line 112 of file IOStream.hh.
int IOStream::Device::flush |
( |
| ) |
|
|
virtual |
int IOStream::Device::getchar |
( |
| ) |
|
|
virtual |
char * IOStream::Device::gets |
( |
char * |
s, |
|
|
size_t |
count |
|
) |
| |
|
virtual |
Read string terminated by new-line or until size into given string buffer. Returns pointer to string or NULL if empty line.
- Parameters
-
[in] | s | string buffer to read into. |
[in] | count | max number of bytes to read. |
- Returns
- string pointer or NULL.
Definition at line 118 of file IOStream_Device.cpp.
bool IOStream::Device::is_blocking |
( |
| ) |
const |
|
inline |
Is blocking mode?
- Returns
- bool.
Definition at line 94 of file IOStream.hh.
void IOStream::Device::non_blocking |
( |
| ) |
|
|
inline |
Set non-blocking mode.
Definition at line 77 of file IOStream.hh.
int IOStream::Device::peekchar |
( |
| ) |
|
|
virtual |
int IOStream::Device::peekchar |
( |
char |
c | ) |
|
|
virtual |
Peek for the given character in device buffer. Return number of characters or EOF(-1).
- Parameters
-
[in] | c | character to peek for. |
- Returns
- available or EOF(-1).
Reimplemented in Soft::UART, UART, and IOBuffer< SIZE >.
Definition at line 105 of file IOStream_Device.cpp.
int IOStream::Device::putchar |
( |
char |
c | ) |
|
|
virtual |
Write character to device.
- Parameters
-
- Returns
- character written or EOF(-1).
Reimplemented in FAT16::File, HD44780, ST7565, PCD8544, MAX72XX, VLCD, UART, Textbox, IOBuffer< SIZE >, RS485, WIO, and Soft::UAT.
Definition at line 36 of file IOStream_Device.cpp.
int IOStream::Device::puts |
( |
const char * |
s | ) |
|
|
virtual |
Write null terminated string to device. Terminating null is not written.
- Parameters
-
- Returns
- zero(0) or negative error code.
Definition at line 43 of file IOStream_Device.cpp.
int IOStream::Device::puts |
( |
str_P |
s | ) |
|
|
virtual |
Write null terminated string from program memory to device. Terminating null is not written.
- Parameters
-
[in] | s | string in program memory to write. |
- Returns
- zero(0) or negative error code.
Definition at line 54 of file IOStream_Device.cpp.
int IOStream::Device::read |
( |
void * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
int IOStream::Device::read |
( |
iovec_t * |
vec | ) |
|
|
virtual |
Read data to given buffers in null terminated io vector.
- Parameters
-
[in] | vec | io vector with buffers to read into. |
- Returns
- number of bytes read or EOF(-1).
Definition at line 157 of file IOStream_Device.cpp.
int IOStream::Device::room |
( |
| ) |
|
|
virtual |
int IOStream::Device::write |
( |
const void * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
int IOStream::Device::write |
( |
const iovec_t * |
vec | ) |
|
|
virtual |
Write data from buffers in null terminated io vector.
- Parameters
-
[in] | vec | io vector with buffers to write. |
- Returns
- number of bytes written or EOF(-1).
Definition at line 87 of file IOStream_Device.cpp.
int IOStream::Device::write_P |
( |
const void * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
Write data from buffer in program memory with given size to device.
- Parameters
-
[in] | buf | buffer to write. |
[in] | size | number of bytes to write. |
- Returns
- number of bytes written or EOF(-1).
Reimplemented in CFFS::File, Socket, and CC3000::Driver.
Definition at line 76 of file IOStream_Device.cpp.
bool IOStream::Device::m_blocking |
|
protected |
Mode IOStream::Device::m_eol |
|
protected |
The documentation for this class was generated from the following files: