atropos.lp
Class AvnmpDebug

java.lang.Object
  |
  +--java.util.Date
        |
        +--atropos.lp.AvnmpTime
              |
              +--atropos.lp.AvnmpDebug
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, ConfigInterface, java.io.Serializable
Direct Known Subclasses:
Gvt

public abstract class AvnmpDebug
extends AvnmpTime
implements ConfigInterface

This class handles AVNMP Debugging messages.

This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
 int dlevel
          Bitmap of code portions to debug.
static int DRIVER_D
          Enable checking of Driver Process values.
static int GVT_D
          Global Virtual Time debugging.
protected  HtmlDebug html
          This is the class for building the HTML debug files.
static int LP_D
          Enable Logical Process debugging.
static int LPSTATE_D
          Enable checking of Driver Process values.
static int MEASURE_D
          Used for measuring experimental values.
 java.lang.String NodeName
          Active Node Name.
static int PACKET_D
          Enable checking of the AVNMP packet.
static int PAYLOAD_D
          Enable checking of Physical Process PayLoad values.
static int PP_D
          Turn on physical process debugging.
static int PREDM_D
          Enable checking of Prediction Accuracy Measure.
static int RECQ_D
          Show Receive Queue debugging.
static int ROLLBACK_D
          Enable checking of out-of-tolerance values.
static int SNDQ_D
          Show Send Queue debugging.
static int STATEQ_D
          Enable State Queue debugging.
static int SYSTEM_D
          Enable System level debugging.
static int TIME_D
          Enable Time Management debugging.
static int TOLERANCE_D
          Enable checking of out-of-tolerance values.
 
Fields inherited from interface atropos.lp.ConfigInterface
Dvm, initTolerance, logdir, lvm, ootLimit, pdir, rmlog, rmplots, rmsnmp, runMinutes, snmpdir, VirtualMessageRatio
 
Constructor Summary
AvnmpDebug()
          This constructor sets the level of debugging.
 
Method Summary
 java.lang.String debugType(int level)
          Return a readable version of the type of debug message.
abstract  long getlvt()
          This method is to be over-ridden by the the logical process.
abstract  long getRealTime()
          This method is to be over-ridden by the the logical process.
 void log(int level, AvnmpPacket ap, int conn, AvnmpLP mylp, AvnmpTime t)
          Conditinally display the debug message.
 void log(int level, AvnmpQueue aq, int conn, AvnmpLP mylp, AvnmpTime t)
          Conditinally display the debug message.
 void log(int level, java.lang.String mes)
          Conditinally display the debug message.
 void log(int level, java.lang.String mes, int conn)
          Conditinally display the debug message.
 void measure(java.lang.Object value, java.lang.String fname)
          Record a measured value.
abstract  java.lang.String myname()
          This method is to be over-ridden by the the logical process.
 void resetLog(java.lang.String nn, AvnmpLP mylp)
          Reset the log file.
 void setLevel(int level)
          Set the bitmap for debugging.
 void writeLog(int level, java.lang.String mes)
          Conditinally display the debug message.
 
Methods inherited from class atropos.lp.AvnmpTime
add, adjustRelative, diff, now, resetRelative, set, startTime, time, toString
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NodeName

public java.lang.String NodeName
Active Node Name.

GVT_D

public static final int GVT_D
Global Virtual Time debugging.

RECQ_D

public static final int RECQ_D
Show Receive Queue debugging.

SNDQ_D

public static final int SNDQ_D
Show Send Queue debugging.

PP_D

public static final int PP_D
Turn on physical process debugging.

STATEQ_D

public static final int STATEQ_D
Enable State Queue debugging.

TIME_D

public static final int TIME_D
Enable Time Management debugging.

LP_D

public static final int LP_D
Enable Logical Process debugging.

SYSTEM_D

public static final int SYSTEM_D
Enable System level debugging.

MEASURE_D

public static final int MEASURE_D
Used for measuring experimental values.

TOLERANCE_D

public static final int TOLERANCE_D
Enable checking of out-of-tolerance values.

ROLLBACK_D

public static final int ROLLBACK_D
Enable checking of out-of-tolerance values.

DRIVER_D

public static final int DRIVER_D
Enable checking of Driver Process values.

LPSTATE_D

public static final int LPSTATE_D
Enable checking of Driver Process values.

PAYLOAD_D

public static final int PAYLOAD_D
Enable checking of Physical Process PayLoad values.

PREDM_D

public static final int PREDM_D
Enable checking of Prediction Accuracy Measure.

PACKET_D

public static final int PACKET_D
Enable checking of the AVNMP packet.

dlevel

public int dlevel
Bitmap of code portions to debug. This is set via the user's environment variable -- AvnmpDebug.

html

protected HtmlDebug html
This is the class for building the HTML debug files.
Constructor Detail

AvnmpDebug

public AvnmpDebug()
This constructor sets the level of debugging. The debug level is set by the user's environment variable -- AvnmpDebug. The bit-mapped values are shown above.
Method Detail

setLevel

public void setLevel(int level)
Set the bitmap for debugging.
Parameters:
level - Bitwise or'ing of above debug bits.

resetLog

public void resetLog(java.lang.String nn,
                     AvnmpLP mylp)
Reset the log file.
Parameters:
nn - The Magician node name.
mylp - The current logical process.

log

public void log(int level,
                java.lang.String mes,
                int conn)
Conditinally display the debug message.
Parameters:
level - The portion of the code in which this debug message is located.
mes - The debug message.
conn - Indicates a message is being sent or received across a logical partition.

log

public void log(int level,
                AvnmpQueue aq,
                int conn,
                AvnmpLP mylp,
                AvnmpTime t)
Conditinally display the debug message.
Parameters:
level - The portion of the code in which this debug message is located.
ap - The packet
conn - Indicates a message is being sent or received across a logical partition.
mylp - The current LP
t - The current LP real time

log

public void log(int level,
                AvnmpPacket ap,
                int conn,
                AvnmpLP mylp,
                AvnmpTime t)
Conditinally display the debug message.
Parameters:
level - The portion of the code in which this debug message is located.
ap - The packet
conn - Indicates a message is being sent or received across a logical partition.
mylp - The current LP
t - The current LP real time

log

public void log(int level,
                java.lang.String mes)
Conditinally display the debug message.
Parameters:
level - The portion of the code in which this debug message is located.
mes - The debug message.

writeLog

public void writeLog(int level,
                     java.lang.String mes)
Conditinally display the debug message.
Parameters:
level - The portion of the code in which this debug message is located.
mes - The debug message.

getlvt

public abstract long getlvt()
This method is to be over-ridden by the the logical process. It should return the current local virtual time.

myname

public abstract java.lang.String myname()
This method is to be over-ridden by the the logical process. It should return the name of the logical process.

getRealTime

public abstract long getRealTime()
This method is to be over-ridden by the the logical process. It should return the real time since the logical process was created.

debugType

public java.lang.String debugType(int level)
Return a readable version of the type of debug message.
Parameters:
level - The debug level.
Returns:
A readable version of the debug level.

measure

public void measure(java.lang.Object value,
                    java.lang.String fname)
Record a measured value. Automatically includes logical process name, LVT, and LP real time. Note that MEASURE_D must be set in order to record with this method.
Parameters:
Object - The measured value to be recorded.
fname - Part of the filename. The complete filename is logdir+fname+"_"+NodeName+".dat".
See Also:
MEASURE_D


Copyright © 2002 GE Corporate Research and Development. All Rights Reserved.