Diag Class Reference
Public Member Functions | |
virtual bool | IsEnabled (int traceLevel) |
virtual bool | IsEnabled () |
virtual void | Println (System.String s, int traceLevel) |
virtual void | Println (System.String s) |
virtual bool | SetEnabled (bool data) |
virtual int | SetTraceLevel2 (int level) |
Static Public Member Functions | |
static void | HexDump (System.IO.Stream istrm, System.IO.StreamWriter ostrm) |
static void | HexDump (byte[] bytes, int traceLevel) |
static void | HexDump (byte[] bytes) |
static Diag | Instance () |
static void | Prtln (byte[] b, int offset, int nbytes) |
static void | Prtln (byte[] b, int offset, int nbytes, int tl) |
static void | Prtln (System.String s, int traceLevel) |
static void | Prtln (System.String s) |
static int | SetTraceLevel (int level) |
Properties | |
virtual System.IO.StreamWriter | PrintStream [set] |
Detailed Description
This class is used for printing diagnostic messages for debugging the run-time components. It allows messages to be easily switched on and off.
Member Function Documentation
static void HexDump | ( | System.IO.Stream | istrm, | |
System.IO.StreamWriter | ostrm | |||
) | [static] |
This method prints a formatted hex dump for the contents of the given input stream to the given output stream.
- Parameters:
-
istrm Input Stream containg data to be dumped ostrm Output Stream to which formatted data is to be written
static void HexDump | ( | byte[] | bytes, | |
int | traceLevel | |||
) | [static] |
This method prints a formatted hex dump for the contents of the given byte array to the standard output stream, if the given trace level is enabled.
- Parameters:
-
bytes Byte array containg data to be dumped traceLevel Trace level
static void HexDump | ( | byte[] | bytes | ) | [static] |
This method prints a formatted hex dump for the contents of the given byte array to the standard output stream.
- Parameters:
-
bytes Byte array containg data to be dumped
static Diag Instance | ( | ) | [static] |
virtual bool IsEnabled | ( | int | traceLevel | ) | [virtual] |
This method checks that given trace level message will be printed.
- Parameters:
-
traceLevel Trace Level
- Returns:
true
if enabled, elsefalse
virtual bool IsEnabled | ( | ) | [virtual] |
This method will enable the diagnostic message printing.
- Returns:
true
if enabled, elsefalse
virtual void Println | ( | System.String | s, | |
int | traceLevel | |||
) | [virtual] |
This method prints a the diagnsotic message, if given trace level is enabled
- Parameters:
-
s diagnsotic message traceLevel Trace Level
virtual void Println | ( | System.String | s | ) | [virtual] |
This method prints a the diagnsotic message
- Parameters:
-
s diagnsotic message
static void Prtln | ( | byte[] | b, | |
int | offset, | |||
int | nbytes | |||
) | [static] |
This method prints a the hex dump of the given byte array to current Diag class instance
- Parameters:
-
b byte array containing data offset start offset in the byte array nbytes no of bytes to be printed
static void Prtln | ( | byte[] | b, | |
int | offset, | |||
int | nbytes, | |||
int | tl | |||
) | [static] |
This method prints a the hex dump of the given byte array to current Diag class instance, if given trace level is enabled
- Parameters:
-
b byte array containing data offset start offset in the byte array nbytes no of bytes to be printed tl trace level
static void Prtln | ( | System.String | s, | |
int | traceLevel | |||
) | [static] |
This method prints a the diagnsotic message to current Diag class instance, if given trace level is enabled
- Parameters:
-
s diagnsotic message traceLevel Trace Level
static void Prtln | ( | System.String | s | ) | [static] |
This method prints a the diagnsotic message to current Diag class instance.
- Parameters:
-
s diagnsotic message
virtual bool SetEnabled | ( | bool | data | ) | [virtual] |
This method enables or disables the diagnostic message priting.
- Parameters:
-
data true
for enabling printing; otherwisefalse
- Returns:
- The stat before setting this stat
static int SetTraceLevel | ( | int | level | ) | [static] |
This method sets the trace level for the current instance of the Diag Class
- Parameters:
-
level Trace Level
- Returns:
- Set trace level
virtual int SetTraceLevel2 | ( | int | level | ) | [virtual] |
This method sets the trace level for this class
- Parameters:
-
level Trace Level
- Returns:
- Set trace level
Property Documentation
virtual System.IO.StreamWriter PrintStream [set] |
Sets the System.IO.StreamWriter object to which the diagnostic messages should be written.
Value:
Output stream for diagnostic messages