F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Os::Console Class Reference

#include <Os/Console.hpp>

Inheritance diagram for Os::Console:
Os::ConsoleInterface Fw::Logger

Public Member Functions

 Console ()
 Default constructor. More...
 
 ~Console ()
 Default destructor. More...
 
 Console (const Console &other)
 copy constructor that copies the internal representation More...
 
Consoleoperator= (const Console &other)
 assignment operator that copies the internal representation More...
 
void writeMessage (const CHAR *message, const FwSizeType size) override
 write message to console More...
 
void writeMessage (const Fw::StringBase &message) override
 write message to console More...
 
ConsoleHandlegetHandle () override
 returns the raw console handle More...
 
- Public Member Functions inherited from Os::ConsoleInterface
 ConsoleInterface ()=default
 Default constructor. More...
 
virtual ~ConsoleInterface ()=default
 Default destructor. More...
 
- Public Member Functions inherited from Fw::Logger
virtual ~Logger ()=default
 Virtual destructor. More...
 

Static Public Member Functions

static void write (const Fw::StringBase &message)
 write message to console More...
 
static void write (const CHAR *message, const FwSizeType size)
 write message to the global console More...
 
static void init ()
 initialize singleton More...
 
static ConsolegetSingleton ()
 get a reference to singleton More...
 
- Static Public Member Functions inherited from Os::ConsoleInterface
static ConsoleInterfacegetDelegate (ConsoleHandleStorage &aligned_placement_new_memory, const ConsoleInterface *to_copy=nullptr)
 provide a pointer to a console delegate object More...
 
- Static Public Member Functions inherited from Fw::Logger
static void log (const char *format,...)
 log a formated string with supplied arguments More...
 
static void log (const Fw::StringBase &message)
 log a string message directly More...
 
static void registerLogger (Logger *logger)
 register a logger implementation More...
 

Additional Inherited Members

Detailed Description

Definition at line 68 of file Console.hpp.

Constructor & Destructor Documentation

◆ Console() [1/2]

Os::Console::Console ( )

Default constructor.

Definition at line 9 of file Console.cpp.

◆ ~Console()

Os::Console::~Console ( )

Default destructor.

Definition at line 11 of file Console.cpp.

◆ Console() [2/2]

Os::Console::Console ( const Console other)

copy constructor that copies the internal representation

Definition at line 16 of file Console.cpp.

Member Function Documentation

◆ getHandle()

ConsoleHandle * Os::Console::getHandle ( )
overridevirtual

returns the raw console handle

Gets the raw console handle from the implementation. Note: users must include the implementation specific header to make any real use of this handle. Otherwise it will be as an opaque type.

Returns
raw console handle

Implements Os::ConsoleInterface.

Definition at line 40 of file Console.cpp.

◆ getSingleton()

Console & Os::Console::getSingleton ( )
static

get a reference to singleton

Returns
reference to singleton

Definition at line 58 of file Console.cpp.

◆ init()

void Os::Console::init ( )
static

initialize singleton

Definition at line 53 of file Console.cpp.

◆ operator=()

Console & Os::Console::operator= ( const Console other)

assignment operator that copies the internal representation

Definition at line 22 of file Console.cpp.

◆ write() [1/2]

void Os::Console::write ( const CHAR message,
const FwSizeType  size 
)
static

write message to the global console

Write a message to the console with a bounded size. This will delegate to the global singleton implementation.

Parameters
messageraw message to write
sizesize of the message to write to the console

Definition at line 45 of file Console.cpp.

◆ write() [2/2]

void Os::Console::write ( const Fw::StringBase message)
static

write message to console

Write a message to the console as stored as a StringBase

Parameters
messageraw message to write (StringBase)

Definition at line 49 of file Console.cpp.

◆ writeMessage() [1/2]

void Os::Console::writeMessage ( const CHAR message,
const FwSizeType  size 
)
overridevirtual

write message to console

Write a message to the console with a bounded size. This will delegate to the implementation defined write method.

Parameters
messageraw message to write
sizesize of the message to write to the console

Implements Os::ConsoleInterface.

Definition at line 30 of file Console.cpp.

◆ writeMessage() [2/2]

void Os::Console::writeMessage ( const Fw::StringBase message)
overridevirtual

write message to console

Write a message to the console as stored as a StringBase

Parameters
messageraw message to write (StringBase)

Implements Fw::Logger.

Definition at line 36 of file Console.cpp.


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