C++ TargetRTS
Loading...
Searching...
No Matches
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
RTTracer Class Reference
Inheritance diagram for RTTracer:
RTStreamBuffer RTOBuffer

Static Public Member Functions

static void flushTrace (void)
 Flush buffered trace messages to file.
 
static bool isEnabled (void)
 Check if tracing is enabled.
 
static void setEnabled (bool)
 Enable or disable tracing to file.
 

Protected Member Functions

void traceMessage (const RTMessage *)
 
int flush (void) override
 Flushes the data written to the buffer.
 

Static Protected Member Functions

static std::string initTraceFile (void)
 
static void traceMS (const RTMessage *)
 

Protected Attributes

std::string _traceFile
 
std::ofstream _file
 
RTMutex * _mutex
 
- Protected Attributes inherited from RTStreamBuffer
int offset
 
char buffer [80]
 

Static Protected Attributes

static bool _enabled
 

Friends

class RTActor
 
class RTMessage
 

Additional Inherited Members

- Public Member Functions inherited from RTStreamBuffer
virtual int write (const char *data, int size) override
 Write a string to the buffer.
 
virtual int write (const char *data, int size)=0
 Write a string to the buffer.
 
virtual int flush (void)=0
 Flushes the data written to the buffer.
 

Member Function Documentation

◆ flush()

int RTTracer::flush ( void  )
overrideprotectedvirtual

Flushes the data written to the buffer.

For some output buffers, the written data will not appear in the output until flush() has been called. For others explicit flushing is not needed.

Returns
1 if successful, 0 otherwise

Implements RTOBuffer.

◆ flushTrace()

void RTTracer::flushTrace ( void  )
static

Flush buffered trace messages to file.

This function is called each time 'trace [on|off]' command is sent to the running application.

◆ isEnabled()

bool RTTracer::isEnabled ( void  )
static

Check if tracing is enabled.

Returns
true if yes, false if no.

◆ setEnabled()

static void RTTracer::setEnabled ( bool  )
static

Enable or disable tracing to file.

This function can be called many times during execution. When tracing status changes to disabled, information message saying that tracing is paused is written and all output is flushed to file.


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