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

#include <Os/Console.hpp>

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

Public Member Functions

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

Static Public Member Functions

static void write (const Fw::StringBase &message)
 write message to console
 
static void write (const CHAR *message, const FwSizeType size)
 write message to the global console
 
static void init ()
 initialize singleton
 
static ConsolegetSingleton ()
 get a reference to singleton
 
- 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
 
- Static Public Member Functions inherited from Fw::Logger
static void log (const char *format,...)
 log a formated string with supplied arguments
 
static void log (const Fw::StringBase &message)
 log a string message directly
 
static void registerLogger (Logger *logger)
 register a logger implementation
 

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: