gov.nist.antd.merlin.protocol.discovery
Class NeighbourHeader

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--gov.nist.antd.merlin.protocol.discovery.NeighbourHeader

public class NeighbourHeader
extends ProtocolMessage

This class represents the header for the SimpleOpticalNeighbourDiscovery.

 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.

Author:
borchert
, rouil

Field Summary
private  int destNodeID
          Destination node ID
private  int destPortID
          Destination port ID
static int IDRESP
          static value for IDRESP
static int IDSIG
          static value for IDSIG
private  int srcNodeID
          Source node ID
private  int srcPortID
          Source port ID
private  int type
          Type of the ControlProtocol header
 
Fields inherited from class SSF.OS.ProtocolMessage
 
Constructor Summary
NeighbourHeader(int type, int srcNodeID, int srcPortID, int destNodeID, int destPortID)
          Default constructor
 
Method Summary
 int bytecount()
          Returns the total number of bytes in this packet (16 bytes).
 int getDestNodeID()
          get the destination node ID.
 int getDestPortID()
          get the destination port ID.
 int getSrcNodeID()
          get the source node ID.
 int getSrcPortID()
          get the source port ID.
 int getType()
          get the message type.
 void setDestNodeID(int destNodeID)
          set the destination node ID.
 void setDestPortID(int destPortID)
          set the destination port ID.
 void setSrcNodeID(int srcNodeID)
          set the source node ID.
 void setSrcPortID(int srcPortID)
          set the source port ID.
 void setType(int type)
          set the message type.
 java.lang.String toString()
          Return a String that represent the message.
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, header_bytecount, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IDSIG

public static final int IDSIG
static value for IDSIG

See Also:
Constant Field Values

IDRESP

public static final int IDRESP
static value for IDRESP

See Also:
Constant Field Values

type

private int type
Type of the ControlProtocol header


srcNodeID

private int srcNodeID
Source node ID


srcPortID

private int srcPortID
Source port ID


destNodeID

private int destNodeID
Destination node ID


destPortID

private int destPortID
Destination port ID

Constructor Detail

NeighbourHeader

public NeighbourHeader(int type,
                       int srcNodeID,
                       int srcPortID,
                       int destNodeID,
                       int destPortID)
Default constructor

Parameters:
type - The type of the message
srcNodeID - The ID of the source node of the IDSIG
srcPortID - The fiber port ID of the source node
destNodeID - The ID of the destination node
destPortID - The fiber port ID of the destination node
Method Detail

toString

public java.lang.String toString()
Return a String that represent the message.

Overrides:
toString in class java.lang.Object
Returns:
A String that represent the message.

bytecount

public int bytecount()
Returns the total number of bytes in this packet (16 bytes).

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

getType

public int getType()
get the message type.

Returns:
The message type.

setType

public void setType(int type)
set the message type.

Parameters:
type - The message type.

getSrcNodeID

public int getSrcNodeID()
get the source node ID.

Returns:
The source node ID.

setSrcNodeID

public void setSrcNodeID(int srcNodeID)
set the source node ID.

Parameters:
srcNodeID - The source node ID.

getSrcPortID

public int getSrcPortID()
get the source port ID.

Returns:
The source port ID.

setSrcPortID

public void setSrcPortID(int srcPortID)
set the source port ID.

Parameters:
srcPortID - The source port ID.

getDestNodeID

public int getDestNodeID()
get the destination node ID.

Returns:
The destination node ID.

setDestNodeID

public void setDestNodeID(int destNodeID)
set the destination node ID.

Parameters:
destNodeID - The destination node ID.

getDestPortID

public int getDestPortID()
get the destination port ID.

Returns:
The destination port ID.

setDestPortID

public void setDestPortID(int destPortID)
set the destination port ID.

Parameters:
destPortID - The destination port ID.