#include <dedebug.h>
Collaboration diagram for DEDebug:
Public Member Functions | |
DEDebug (ostream &_os=cout, int _DbgLevel=0, DETime _StartTime=0.0, int _StartRun=0, DETime _PrintInterval=DETime()) | |
Constructs a DEDebug with specified parameters. | |
void | Initialize () |
Initializes the debugger. | |
void | SchedulerExecEvent (DEScheduler *Sched) |
Function called by the sceduler to print its queues information. | |
void | CurrentTime (DETime &Time, int _Run) |
Set the current debug time and run to Time and Run respectively. | |
bool | isDebugging () |
Returns true if the current time is between Start and Stop. | |
DEDebug & | operator<< (const char *x) |
Operator used to print user debugging messages of type string. | |
void | ErrorMessage (const char *x) |
Prints an user error message in every debug level. | |
Public Attributes | |
ostream & | os |
stream where to print debugging informations | |
Related Functions | |
(Note that these are not member functions.) | |
template<class T> | |
DEDebug & | operator<< (DEDebug &dbg, const T &x) |
Template operator used to print user debugging messages of any type other than string. |
An instance of this class can optionally be passed to the instance of DESystem to print debugging information during the simulation.
It can be used to print information on the events which are being executed, as well as user information.
This can be done by means of the operator << as in the following example:
if (Dbg) *Dbg << "MyVar=" << MyVar;
where Dbg is a pointer to the DEDebug class, and MyVar is a variable to be printed.
"Debugger" parameters:
Param Type | Param Name | Default value | span or allowed values | meaning |
BitmaskParameter | DebugLevel | TimeStamps | TimeStamps Events EventQueue Messages | Represents which informations are to be printed during execution:
|
DETimeParameter | DebugStartTime | 0 | [0,SimulationTime) | Time when to start printing in debug levels 'Events', 'EventQueue' and 'Messages' |
IntParameter | DebugStartRun | 0 | [0,SimulationTime) | Run number when to start printing in debug levels 'Events', 'EventQueue' and 'Messages' |
DETimeParameter | DebugPrintInterval | 10 | (0,SimulationTime) | Time interval between printing of timestamps in debugging level 'TimeStamps' |
BitmaskParameter | DebugPrintMask | AbsT+Step+RStep+ Offset+Paren | AbsT SStep BStep Step RBStep RStep Offset Paren | Represents the printing format of timestamps:
|
|
Constructs a DEDebug with specified parameters.
|