com.objsys.asn1j.runtime
Class Asn1PerTraceHandler

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1PerTraceHandler
Direct Known Subclasses:
Asn1PerDecodeTraceHandler, Asn1PerEncodeTraceHandler, Asn1PerOutputStreamTraceHandler

public abstract class Asn1PerTraceHandler
extends java.lang.Object

This is the abstract base class for the PER encode and decode trace handler derived classes.


Field Summary
protected  Asn1PerBitFieldList mBitFieldList
           
 
Constructor Summary
protected Asn1PerTraceHandler(Asn1PerMessageBuffer messageBuffer)
          This constructor initializes internal trace handler member variables.
 
Method Summary
 void addElemName(java.lang.String name, int arrayx)
          This method adds an element name to the current fully qualified name.
abstract  void enable()
          This method is used to turn PER bit tracing on or off
 Asn1PerBitFieldList getBitFieldList()
          This method returns a reference to the bit field list
 void newBitField(java.lang.String name, int bitCount)
          This method creates a new bit field and appends it to the bit field list.
abstract  void print(java.io.PrintStream out, java.lang.String varName)
          This method prints the trace to the given output stream in a default format.
 void removeLastElemName()
          This method removes the last element name int the current fully qualified name string.
abstract  void reset()
          This method resets the trace bit field list.
 void setBitCount()
          This method sets the bit count within the current bit field to the difference between the current but offset and the starting bit offset currently stored in the field object.
 void setBitOffset()
          This method sets the bit offset within the current bit field to the current offset within the PER message buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mBitFieldList

protected Asn1PerBitFieldList mBitFieldList
Constructor Detail

Asn1PerTraceHandler

protected Asn1PerTraceHandler(Asn1PerMessageBuffer messageBuffer)
This constructor initializes internal trace handler member variables.

Parameters:
messageBuffer - PER message buffer object reference
Method Detail

addElemName

public void addElemName(java.lang.String name,
                        int arrayx)
This method adds an element name to the current fully qualified name. The fully qualified name is a string of name components separated by dots (ex. a.b.c).

Parameters:
name - Name component to append to string

enable

public abstract void enable()
This method is used to turn PER bit tracing on or off


getBitFieldList

public Asn1PerBitFieldList getBitFieldList()
This method returns a reference to the bit field list


newBitField

public void newBitField(java.lang.String name,
                        int bitCount)
This method creates a new bit field and appends it to the bit field list.

Parameters:
name - Name suffix to append to the current fully qualified name.
bitCount - Number of bits in the bit field.

print

public abstract void print(java.io.PrintStream out,
                           java.lang.String varName)
This method prints the trace to the given output stream in a default format.

Parameters:
out - Print stream to which output is to be written.
varName - Name of the object variable being printed.

removeLastElemName

public void removeLastElemName()
This method removes the last element name int the current fully qualified name string. For example, if the current string is 'a.b.c', it will be 'a.b' after calling this method.


reset

public abstract void reset()
This method resets the trace bit field list.


setBitCount

public void setBitCount()
This method sets the bit count within the current bit field to the difference between the current but offset and the starting bit offset currently stored in the field object.


setBitOffset

public void setBitOffset()
This method sets the bit offset within the current bit field to the current offset within the PER message buffer.