µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::posix::io Class Reference

Base I/O class. More...

#include <cmsis-plus/posix-io/io.h>

+ Inheritance diagram for os::posix::io:

Public Types

Types & Constants
enum  type : type_t {
  unknown = 0 ,
  not_set = 1 << 0 ,
  char_device = 1 << 1 ,
  block_device = 1 << 2 ,
  tty = 1 << 3 ,
  file = 1 << 4 ,
  socket = 1 << 5
}
 
using type_t = unsigned int
 

Public Member Functions

Public Member Functions
virtual int close (void)
 
virtual ssize_t read (void *buf, std::size_t nbyte)
 
virtual ssize_t write (const void *buf, std::size_t nbyte)
 
virtual ssize_t writev (const struct iovec *iov, int iovcnt)
 
int fcntl (int cmd,...)
 
virtual int vfcntl (int cmd, std::va_list args)
 
int isatty (void)
 
virtual int fstat (struct stat *buf)
 
virtual off_t lseek (off_t offset, int whence)
 
type_t get_type (void) const
 
file_descriptor_t file_descriptor (void) const
 
bool is_opened (void)
 
io_implimpl (void) const
 

Protected Member Functions

Private Member Functions
void file_descriptor (file_descriptor_t fildes)
 
void clear_file_descriptor (void)
 
ioalloc_file_descriptor (void)
 

Constructors & Destructor

 io (io_impl &impl, type t)
 
virtual ~io ()
 

Detailed Description

Base I/O class.

Definition at line 97 of file io.h.

Member Typedef Documentation

◆ type_t

using os::posix::io::type_t = unsigned int

Definition at line 132 of file io.h.

Member Enumeration Documentation

◆ type

Enumerator
unknown 
not_set 
char_device 
block_device 
tty 
file 
socket 

Definition at line 133 of file io.h.

Constructor & Destructor Documentation

◆ io()

os::posix::io::io ( io_impl impl,
type  t 
)
protected

Definition at line 153 of file io.cpp.

◆ ~io()

os::posix::io::~io ( )
virtual

Definition at line 164 of file io.cpp.

Member Function Documentation

◆ alloc_file_descriptor()

io * os::posix::io::alloc_file_descriptor ( void  )
protected

Definition at line 201 of file io.cpp.

◆ clear_file_descriptor()

void os::posix::io::clear_file_descriptor ( void  )
inlineprotected

Definition at line 435 of file io.h.

◆ close()

int os::posix::io::close ( void  )
virtual

◆ fcntl()

int os::posix::io::fcntl ( int  cmd,
  ... 
)

Definition at line 375 of file io.cpp.

◆ file_descriptor() [1/2]

void os::posix::io::file_descriptor ( file_descriptor_t  fildes)
inlineprotected

Definition at line 429 of file io.h.

◆ file_descriptor() [2/2]

file_descriptor_t os::posix::io::file_descriptor ( void  ) const
inline

Definition at line 441 of file io.h.

◆ fstat()

int os::posix::io::fstat ( struct stat buf)
virtual

Reimplemented in os::posix::file_lockable< T, L >.

Definition at line 422 of file io.cpp.

◆ get_type()

io::type_t os::posix::io::get_type ( void  ) const
inline

Definition at line 423 of file io.h.

◆ impl()

io_impl & os::posix::io::impl ( void  ) const
inline

Definition at line 453 of file io.h.

◆ is_opened()

bool os::posix::io::is_opened ( void  )
inline

Definition at line 447 of file io.h.

◆ isatty()

int os::posix::io::isatty ( void  )

Definition at line 412 of file io.cpp.

◆ lseek()

off_t os::posix::io::lseek ( off_t  offset,
int  whence 
)
virtual

Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.

Definition at line 453 of file io.cpp.

◆ read()

ssize_t os::posix::io::read ( void *  buf,
std::size_t  nbyte 
)
virtual

Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.

Definition at line 229 of file io.cpp.

◆ vfcntl()

int os::posix::io::vfcntl ( int  cmd,
std::va_list  args 
)
virtual

Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.

Definition at line 387 of file io.cpp.

◆ write()

ssize_t os::posix::io::write ( const void *  buf,
std::size_t  nbyte 
)
virtual

Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.

Definition at line 280 of file io.cpp.

◆ writev()

ssize_t os::posix::io::writev ( const struct iovec iov,
int  iovcnt 
)
virtual

Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.

Definition at line 333 of file io.cpp.


The documentation for this class was generated from the following files: