#include <Tracer.h>
Inheritance diagram for Tracer:
A tracer is a component that can send trace signals to an external test set-up. A trace signal is made up of one or more trace items. A trace item is an elementary item of trace information that is sent to the test set-up in one single operation.
Two types of trace signals are recognized: a Synch Trace, and a Packet Trace. A synch trace consists of one single trace item. A packet trace consists of a sequence of trace items.
The tracer can be enabled or disabled. Calls to the services to send trace signals in a tracer that is disabled have no effect.
This class is abstract because the implementation of the services that send the trace signals must be specified in the derived classes that implement concrete tracers.
Definition at line 38 of file Tracer.h.
Public Member Functions | |
Tracer (void) | |
Instantiate a tracer object. | |
void | sendSynchTrace (TD_TraceItem traceId) const |
Send a Synch trace signal if the tracer is enabled. | |
void | sendPacketTrace (unsigned int n, TD_TraceItem traceData[]) const |
Send a packet trace signal if the tracer is enabled. | |
virtual void | setEnabled (bool isEnabled) |
Set the enable status of the tracer. | |
bool | isEnabled (void) const |
Check the enable status of the tracer. | |
Protected Member Functions | |
virtual void | sendRawTrace (TD_TraceItem rawItem) const =0 |
Encapsulate the mechanism to send one single tracer item over the trace channel to the external test set-up. |
|
Instantiate a tracer object. The enabled status of the tracer must be initialized to "enabled". Definition at line 15 of file Tracer.cpp. |
|
Check the enable status of the tracer.
Definition at line 13 of file Tracer_inl.h. |
|
Send a packet trace signal if the tracer is enabled. If the tracer is disabled, the method call has no effect. A pseudo-code implementation for this method is as follows: if ( isEnabled() ) { for (int i=0; i smaller than number of items in packet; i++) { TD_TraceItem b = . . . // form i-th item of the packet trace sendRawTrace(b); } }The sendRawTrace() method is abstract and encapsulates the implementation of the raw trace signal sending. Thus, this class enforces the management of the enabled status and transform the sequence of trace data into elementary trace item to be sent to the test set-up in sequence but delegates implementation of the sending mechanism to derived classes implementing concrete tracers.
Definition at line 24 of file Tracer.cpp. |
|
Encapsulate the mechanism to send one single tracer item over the trace channel to the external test set-up.
This method is called by methods
Implemented in DC_DummyTracer, and DC_TestTracer. |
|
Send a Synch trace signal if the tracer is enabled. If the tracer is disabled, the method call has no effect. A pseudo-code implementation for this method is as follows: if ( isEnabled() ) { sendRawTrace(traceId); }The sendRawTrace() method is abstract and encapsulates the implementation of the raw trace signal sending. Thus, this class enforces the management of the enabled status but delegates implementation of the sending mechanism to derived classes implementing concrete tracers.
Definition at line 19 of file Tracer.cpp. |
|
Set the enable status of the tracer. When the tracer is disabled, a call to its trace sending methods has no effect.
Definition at line 31 of file Tracer.cpp. |