|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.system.Debug
This class encapsulates a small collection of hopefully useful debug utilities. All methods are static to keep performance up and memory usage down. We don't want these things to get in the way of the application we're trying to debug. See the DebugOutputStream class for more information on hardware connections.
DebugOutputStream
Field Summary | |
static boolean |
defaultStreams
true if default stream has been set;
false otherwise. |
Method Summary | |
static void |
debugDump(byte[] arr,
int length)
Dumps a byte array to the debug port. |
static void |
debugDump(int b)
Dumps the least significant byte of an integer to the debug port. |
static void |
debugDump(String out)
Dumps a String to the debug port. |
static void |
dump(byte[] arr,
int length)
Dumps a byte array to the debug port. |
static void |
dump(int b)
Dumps the least significant byte of an integer to the debug port. |
static void |
dump(String out)
Dumps a String to the debug port. |
static void |
hexDump(byte[] b)
Dumps hex representation of a byte array to System.out . |
static void |
hexDump(byte[] b,
int length)
Dumps hex representation of a byte array to System.out . |
static void |
hexDump(int i)
Dumps hex representation of a four byte integer to System.out . |
static void |
hexDump(PrintStream out,
byte[] b)
Dumps hex representation of a byte array to the given PrintStream . |
static void |
hexDump(PrintStream out,
int i)
Dumps hex representation of a four byte integer to the given PrintStream . |
static void |
intDump(int iVal)
Dumps hex representation of a four byte integer to System.out . |
static void |
resetDefaultStreams()
Sets System.out , System.err , and
System.in to Null Streams. |
static void |
setDefaultStreams()
Sets the old TINI default streams to Serial port 0 at 115200 . |
static void |
setDefaultStreams(String port,
int speed)
Sets the old TINI default streams to the given port. |
static void |
setNativeVerboseDebugSpew(boolean verbose)
For internal use only. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static boolean defaultStreams
true
if default stream has been set;
false
otherwise.Method Detail |
public static void hexDump(int i)
System.out
.i
- integer to dumphexDump(byte[])
,
hexDump(byte[], int)
,
hexDump(PrintStream, int)
,
hexDump(PrintStream, byte[])
public static void hexDump(PrintStream out, int i)
PrintStream
.out
- user supplied output PrintStream
i
- integer to dumphexDump(int)
,
hexDump(byte[])
,
hexDump(byte[], int)
,
hexDump(PrintStream, byte[])
public static void hexDump(byte[] b)
System.out
.b
- byte array to dumphexDump(int)
,
hexDump(byte[], int)
,
hexDump(PrintStream, int)
,
hexDump(PrintStream, byte[])
public static void hexDump(PrintStream out, byte[] b)
PrintStream
.out
- user supplied output PrintStream
b
- byte array to dumphexDump(int)
,
hexDump(byte[])
,
hexDump(byte[], int)
,
hexDump(PrintStream, int)
public static void hexDump(byte[] b, int length)
System.out
.b
- byte array to dumplength
- number of bytes to dumphexDump(int)
,
hexDump(byte[])
,
hexDump(PrintStream, int)
,
hexDump(PrintStream, byte[])
public static void debugDump(String out)
String
to the debug port.out
- String to dump.debugDump(int)
,
debugDump(byte[], int)
,
dump(String)
public static void dump(String out)
String
to the debug port.out
- String to dumpdump(int)
,
dump(byte[], int)
,
debugDump(String)
public static void debugDump(byte[] arr, int length)
arr
- byte array to dumplength
- number of bytes to dumpdebugDump(int)
,
debugDump(String)
,
dump(byte[],int)
public static void dump(byte[] arr, int length)
arr
- byte array to dumplength
- number of bytes to dumpdump(int)
,
dump(String)
,
debugDump(byte[], int)
public static void debugDump(int b)
b
- integer to dumpdebugDump(String)
,
debugDump(byte[], int)
,
dump(int)
public static void dump(int b)
b
- integer to dumpdump(String)
,
dump(byte[], int)
,
debugDump(int)
public static void intDump(int iVal)
System.out
.iVal
- integer to dumphexDump(int)
public static void setDefaultStreams()
115200
.
Binds System.out
, System.err
, and
System.in
to serial0
at
115200
.public static void setDefaultStreams(String port, int speed)
System.out
, System.err
, and
System.in
to the given port
.port
- name of the desired port (i.e. "serial0").speed
- speed of the port. (i.e. 115200)public static void resetDefaultStreams()
System.out
, System.err
, and
System.in
to Null Streams.public static void setNativeVerboseDebugSpew(boolean verbose)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |