The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HostedSerial Class Reference

#include <Serial.h>

+ Inheritance diagram for HostedSerial:
+ Collaboration diagram for HostedSerial:

Public Member Functions

virtual void setBase (uintptr_t nBaseAddr)
 
virtual bool hasData ()
 
virtual char read ()
 
virtual char readNonBlock ()
 
virtual void write (char c)
 
virtual void write_str (const char *c)
 
virtual void write_str (const char *c, size_t len)
 
virtual void write_str (const Cord &cord)
 
- Public Member Functions inherited from Serial
template<unsigned int N>
void write_str (const StaticCord< N > &cord)
 
template<unsigned int N>
void write_str (const char(&c)[N])
 
template<unsigned int N>
void write_str (const StaticString< N >(&c))
 

Private Member Functions

bool isConnected ()
 

Private Attributes

int m_File
 
uintptr_t m_nFileNumber
 

Detailed Description

Serial device abstraction.

Definition at line 32 of file kernel/machine/hosted/Serial.h.

Constructor & Destructor Documentation

◆ HostedSerial()

HostedSerial::HostedSerial ( )

Definition at line 28 of file hosted/Serial.cc.

◆ ~HostedSerial()

HostedSerial::~HostedSerial ( )
virtual

Definition at line 30 of file hosted/Serial.cc.

Member Function Documentation

◆ hasData()

bool HostedSerial::hasData ( )
virtual

Implements Serial.

Definition at line 55 of file hosted/Serial.cc.

◆ isConnected()

bool HostedSerial::isConnected ( )
private

Definition at line 95 of file hosted/Serial.cc.

◆ read()

char HostedSerial::read ( )
virtual

Implements Serial.

Definition at line 50 of file hosted/Serial.cc.

◆ readNonBlock()

char HostedSerial::readNonBlock ( )
virtual

Implements Serial.

Definition at line 59 of file hosted/Serial.cc.

◆ setBase()

void HostedSerial::setBase ( uintptr_t  nBaseAddr)
virtual
Todo:
make this generic for Mmaped and port IO.

Implements Serial.

Definition at line 37 of file hosted/Serial.cc.

Referenced by HostedMachine::initialise().

+ Here is the caller graph for this function:

◆ write()

void HostedSerial::write ( char  c)
virtual

Implements Serial.

Definition at line 63 of file hosted/Serial.cc.

◆ write_str() [1/3]

void HostedSerial::write_str ( const char *  c)
virtual

Reimplemented from Serial.

Definition at line 71 of file hosted/Serial.cc.

◆ write_str() [2/3]

void HostedSerial::write_str ( const char *  c,
size_t  len 
)
virtual

Reimplemented from Serial.

Definition at line 78 of file hosted/Serial.cc.

◆ write_str() [3/3]

void HostedSerial::write_str ( const Cord &  cord)
virtual

Reimplemented from Serial.

Definition at line 85 of file hosted/Serial.cc.

Member Data Documentation

◆ m_File

int HostedSerial::m_File
private

Definition at line 49 of file kernel/machine/hosted/Serial.h.

◆ m_nFileNumber

uintptr_t HostedSerial::m_nFileNumber
private

Definition at line 50 of file kernel/machine/hosted/Serial.h.


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