gov.nist.antd.optical
Class OpticalFrameHeader

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--gov.nist.antd.optical.OpticalFrameHeader

public class OpticalFrameHeader
extends ProtocolMessage

This Header contains the framing information for the ONIC to send the message to the correct lambda.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Version:
1.3

 VERSION CONTROL
 -----------------------------------------------------------------------------
 Name     - YYYY/MM/DD - VERSION - ACTION
 borchert - 2001/09/05 - 1.0     - Source created.
 rouil    - 2002/07/08 - 1.1     - Added attributes for delay computation
                                    SN : Sequence Number 
                                    EteTimeStamp : for End-to-End delay
 borchert - 2002/09/18 - 1.2     - Change HEADERSIZE to 0. The OFH is just
                                   a theoretical header, not physical.
 chul kim - 2002/12/01 - 1.3     - Renamed the attribute EteTimeStamp to be
                                   creationTime. 
 borchert - 2002/12/02           - Add method setTimeStamp(ProtocolGraph)
 

Author:
borchert
, chul kim , rouil

Field Summary
 double creationTime
          Attribute has to be filled at the creation time.
 int fiberID
          Fiber ID.
static byte HEADERSIZE
          The size of this header == 0 Byte.
 int lambdaID
          Lambda ID or Add/Drop Lambda ID if fiber id == -1.
 long SN
          The Sequence Number.
 
Fields inherited from class SSF.OS.ProtocolMessage
 
Constructor Summary
OpticalFrameHeader(int fiberID, int lambdaID)
          Default constructor
 
Method Summary
 int bytecount()
          Return the total size (in bytes) of this header plus the payload, if any.
 int getFiberID()
          Returns the fiber id.
 int getLambdaID()
          Returns the lambda id.
 int header_bytecount()
          Return the size (in bytes) of this header only, don't include the payload, if any.
protected  void setFiberID(int newID)
          Set the new fiber id
protected  void setLambdaID(int newID)
          Set the new lambda id
 void setTimeStamp(ProtocolGraph pg)
          Set the creation time timestamp.
 java.lang.String toString()
          Returns the representation of this header.
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADERSIZE

public static final byte HEADERSIZE
The size of this header == 0 Byte.

See Also:
Constant Field Values

SN

public long SN
The Sequence Number.


creationTime

public double creationTime
Attribute has to be filled at the creation time.


fiberID

public int fiberID
Fiber ID. If Fiber ID == -1 the Lamda id reffers to an add drop lambda.


lambdaID

public int lambdaID
Lambda ID or Add/Drop Lambda ID if fiber id == -1.

Constructor Detail

OpticalFrameHeader

public OpticalFrameHeader(int fiberID,
                          int lambdaID)
Default constructor

Parameters:
fiberID - The id of the fiber that has to be used.
lambdaID - The id of the lambda that has to be used.
Method Detail

getFiberID

public int getFiberID()
Returns the fiber id.

Returns:
Returns the fiber id.

getLambdaID

public int getLambdaID()
Returns the lambda id.

Returns:
Returns the lambda id.

setFiberID

protected void setFiberID(int newID)
Set the new fiber id

Parameters:
newID - the new Id.

setLambdaID

protected void setLambdaID(int newID)
Set the new lambda id

Parameters:
newID - the new Id.

bytecount

public int bytecount()
Return the total size (in bytes) of this header plus the payload, if any.

Overrides:
bytecount in class ProtocolMessage
Returns:
The size of the message.

header_bytecount

public int header_bytecount()
Return the size (in bytes) of this header only, don't include the payload, if any.

Overrides:
header_bytecount in class ProtocolMessage
Returns:
The header size.

setTimeStamp

public void setTimeStamp(ProtocolGraph pg)
Set the creation time timestamp.

Parameters:
pg - The graph the now() time has to be taken from.
Since:
1.3

toString

public java.lang.String toString()
Returns the representation of this header.

Overrides:
toString in class java.lang.Object
Returns:
The representation of this header..