OS  2.10.1
Public Member Functions | List of all members
OSOutputChannel Class Reference

a class that holds information about one output channel (file, device, stream, peripheral, etc.) More...

#include <OSOutput.h>

Public Member Functions

 OSOutputChannel (std::string name)
 Constructor. More...
 
 ~OSOutputChannel ()
 Destructor. More...
 
std::string Name ()
 Get the name of the output channel. More...
 
bool setPrintLevel (ENUM_OUTPUT_AREA area, ENUM_OUTPUT_LEVEL level)
 Set the print level for a particular area. More...
 
bool setAllPrintLevels (ENUM_OUTPUT_LEVEL level)
 Set the print level for all areas. More...
 
bool setAllPrintLevels (ENUM_OUTPUT_LEVEL *level, int dim)
 Set different print levels for all areas. More...
 
bool isAccepted (ENUM_OUTPUT_AREA area, ENUM_OUTPUT_LEVEL level)
 Test if the device accepts a particular combination of print level and area (i.e., if the output should be printed) More...
 
void OSPrintf (ENUM_OUTPUT_AREA area, ENUM_OUTPUT_LEVEL level, std::string str)
 Send one string to the output device provided that the output device "accepts" the output (i.e., the print level applicable to the area that originated the output exceeds the level of the print statement. More...
 
void flushBuffer ()
 Flush output buffer. More...
 
Open: open the channel
Returns
true if successfully opened; false otherwise
bool Open ()
 

Detailed Description

a class that holds information about one output channel (file, device, stream, peripheral, etc.)

Definition at line 41 of file OSOutput.h.

Constructor & Destructor Documentation

§ OSOutputChannel()

OSOutputChannel::OSOutputChannel ( std::string  name)

Constructor.

Parameters
nameholds the name of the file or device that applies to this output device in all code areas

§ ~OSOutputChannel()

OSOutputChannel::~OSOutputChannel ( )

Destructor.

Member Function Documentation

§ Name()

std::string OSOutputChannel::Name ( )

Get the name of the output channel.

§ setPrintLevel()

bool OSOutputChannel::setPrintLevel ( ENUM_OUTPUT_AREA  area,
ENUM_OUTPUT_LEVEL  level 
)

Set the print level for a particular area.

Parameters
areaholds the area of the code to which this option is to be applied
levelholds a valid print level
Returns
whether the set() was successful

§ setAllPrintLevels() [1/2]

bool OSOutputChannel::setAllPrintLevels ( ENUM_OUTPUT_LEVEL  level)

Set the print level for all areas.

Parameters
levelholds a valid print level
Returns
whether the set() was successful

§ setAllPrintLevels() [2/2]

bool OSOutputChannel::setAllPrintLevels ( ENUM_OUTPUT_LEVEL level,
int  dim 
)

Set different print levels for all areas.

Parameters
levelholds an array of valid print levels
dimholds the number of entries in the array level
Returns
whether the set() was successful

§ isAccepted()

bool OSOutputChannel::isAccepted ( ENUM_OUTPUT_AREA  area,
ENUM_OUTPUT_LEVEL  level 
)

Test if the device accepts a particular combination of print level and area (i.e., if the output should be printed)

§ OSPrintf()

void OSOutputChannel::OSPrintf ( ENUM_OUTPUT_AREA  area,
ENUM_OUTPUT_LEVEL  level,
std::string  str 
)

Send one string to the output device provided that the output device "accepts" the output (i.e., the print level applicable to the area that originated the output exceeds the level of the print statement.

Parameters
areathe area in which the output string originated
levelthe print level associated with the string
strthe string that is to be printed

§ flushBuffer()

void OSOutputChannel::flushBuffer ( )

Flush output buffer.

§ Open()

bool OSOutputChannel::Open ( )

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