|
| struct | TraceInfo |
| | Structure with additional info passed to traceMessage call. More...
|
| |
|
| enum | TraceEventKind {
Initialize
, Send
, Invoke
, InvokeWithoutReply
,
Reply
, Pause
, Flush
} |
| | Types of trace events supported.
|
| |
|
typedef std::chrono::system_clock::time_point | TraceTime |
| | Type for storing trace timestamps.
|
| |
|
| 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.
|
| |
| static bool | configure (const char *configFile=nullptr) |
| | Configure RTTracer and tracing preferences.
|
| |
| static bool | isConfigured (void) |
| | Check if tracing has been configured.
|
| |
| static void | note (const char *text) |
| | Write a note to the trace.
|
| |
|
| enum | {
TIME1 = 0x10
, TIME2 = 0x20
, TIME3 = 0x40
, TIME_ABSOLUTE = 0x80
,
PRECISION_MASK = 0x0F
, PRECISION_NANO = 0x09
, PRECISION_MICRO = 0x06
, PRECISION_MILLI = 0x03
} |
| |
|
|
void | printTimestamp (const TraceTime ×tamp) |
| |
|
void | traceMessage (const RTMessage *, TraceEventKind traceEventKind, const TraceInfo *) |
| |
|
void | traceNote (const char *text) |
| |
|
void | traceNote_nolock (const char *text) |
| |
| int | flush (void) override |
| | Flushes the data written to the buffer.
|
| |
|
|
std::string | _traceFile |
| |
|
std::ofstream | _file |
| |
|
int | offset |
| |
|
char | buffer [80] |
| |
|
|
static bool | _enabled |
| |
|
static RTJsonResult | jsonConfig |
| |
|
static bool | _configured |
| |
|
static std::string | _applicationName |
| |
|
static std::string | _traceFileName |
| |
|
static bool | _overwriteFile |
| |
|
static TraceTime | _start |
| |
|
static int | _timestamps |
| |
|
|
class | RTActor |
| |
|
class | RTMessage |
| |
|
class | RTProtocol |
| |
|
| 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.
|
| |
◆ configure()
| static bool RTTracer::configure |
( |
const char * |
configFile = nullptr | ) |
|
|
static |
Configure RTTracer and tracing preferences.
Parse JSON configuration file and override defaults.
- Parameters
-
| configFile | JSON configuration file to parse. If not provided, get it from the -traceConfig command line argument instead. |
◆ 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.
◆ isConfigured()
| bool RTTracer::isConfigured |
( |
void |
| ) |
|
|
static |
Check if tracing has been configured.
- Returns
- true if yes, false if no.
◆ isEnabled()
| bool RTTracer::isEnabled |
( |
void |
| ) |
|
|
static |
Check if tracing is enabled.
- Returns
- true if yes, false if no.
◆ note()
| void RTTracer::note |
( |
const char * |
text | ) |
|
|
static |
Write a note to the trace.
- Parameters
-
| text | Note text to write to the trace. |
◆ 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, a note saying that tracing is paused is written to the trace and all output is flushed to file. Note that enabling or disabling tracing takes effect immediately. That is, if this function is called while processing a message (e.g. from a transition code snippet) that message will not be traced if tracing is turned off (setEnabled(false)) while it will be traced if tracing is turned on (setEnabled(true)).
The documentation for this class was generated from the following files: