Base device class.
More...
#include <cmsis-plus/posix-io/device.h>
|
int | open (const char *path=nullptr, int oflag=0,...) |
|
int | vopen (const char *path, int oflag, std::va_list args) |
|
virtual int | close (void) override |
|
int | ioctl (int request,...) |
|
virtual int | vioctl (int request, std::va_list args) |
|
virtual void | sync (void) |
|
virtual bool | match_name (const char *name) const |
|
const char * | name (void) const |
|
device_impl & | impl (void) const |
|
static const char * | device_prefix (void) |
|
Base device class.
Definition at line 77 of file device.h.
◆ type_t
Definition at line 132 of file io.h.
◆ type
Enumerator |
---|
unknown | |
not_set | |
char_device | |
block_device | |
tty | |
file | |
socket | |
Definition at line 133 of file io.h.
◆ device()
os::posix::device::device |
( |
device_impl & |
impl, |
|
|
type |
t, |
|
|
const char * |
name |
|
) |
| |
◆ ~device()
os::posix::device::~device |
( |
| ) |
|
|
overridevirtual |
◆ alloc_file_descriptor()
io * os::posix::io::alloc_file_descriptor |
( |
void |
| ) |
|
|
protectedinherited |
◆ clear_file_descriptor()
void os::posix::io::clear_file_descriptor |
( |
void |
| ) |
|
|
inlineprotectedinherited |
Definition at line 435 of file io.h.
◆ close()
int os::posix::device::close |
( |
void |
| ) |
|
|
overridevirtual |
◆ device_prefix()
const char * os::posix::device::device_prefix |
( |
void |
| ) |
|
|
inlinestatic |
◆ fcntl()
int os::posix::io::fcntl |
( |
int |
cmd, |
|
|
|
... |
|
) |
| |
|
inherited |
◆ file_descriptor() [1/2]
Definition at line 429 of file io.h.
◆ file_descriptor() [2/2]
Definition at line 441 of file io.h.
◆ fstat()
int os::posix::io::fstat |
( |
struct stat * |
buf | ) |
|
|
virtualinherited |
◆ get_type()
Definition at line 423 of file io.h.
◆ impl()
◆ ioctl()
int os::posix::device::ioctl |
( |
int |
request, |
|
|
|
... |
|
) |
| |
◆ is_opened()
bool os::posix::io::is_opened |
( |
void |
| ) |
|
|
inlineinherited |
Definition at line 447 of file io.h.
◆ isatty()
int os::posix::io::isatty |
( |
void |
| ) |
|
|
inherited |
◆ lseek()
off_t os::posix::io::lseek |
( |
off_t |
offset, |
|
|
int |
whence |
|
) |
| |
|
virtualinherited |
◆ match_name()
bool os::posix::device::match_name |
( |
const char * |
name | ) |
const |
|
virtual |
◆ name()
const char * os::posix::device::name |
( |
void |
| ) |
const |
|
inline |
◆ open()
int os::posix::device::open |
( |
const char * |
path = nullptr , |
|
|
int |
oflag = 0 , |
|
|
|
... |
|
) |
| |
- Parameters
-
path | May be nullptr. |
oflag | Output flags |
- Returns
- non-negative file descriptor, -1 on failure
Definition at line 75 of file device.cpp.
◆ read()
ssize_t os::posix::io::read |
( |
void * |
buf, |
|
|
std::size_t |
nbyte |
|
) |
| |
|
virtualinherited |
◆ sync()
void os::posix::device::sync |
( |
void |
| ) |
|
|
virtual |
◆ vfcntl()
int os::posix::io::vfcntl |
( |
int |
cmd, |
|
|
std::va_list |
args |
|
) |
| |
|
virtualinherited |
◆ vioctl()
int os::posix::device::vioctl |
( |
int |
request, |
|
|
std::va_list |
args |
|
) |
| |
|
virtual |
◆ vopen()
int os::posix::device::vopen |
( |
const char * |
path, |
|
|
int |
oflag, |
|
|
std::va_list |
args |
|
) |
| |
- Parameters
-
path | May be nullptr. |
oflag | Output flags |
args | Arguments |
- Returns
- non-negative file descriptor, -1 on failure
Definition at line 87 of file device.cpp.
◆ write()
ssize_t os::posix::io::write |
( |
const void * |
buf, |
|
|
std::size_t |
nbyte |
|
) |
| |
|
virtualinherited |
◆ writev()
ssize_t os::posix::io::writev |
( |
const struct iovec * |
iov, |
|
|
int |
iovcnt |
|
) |
| |
|
virtualinherited |
The documentation for this class was generated from the following files: