uk.org.arlott.simon.hw.f24.lbsta
Class BridgePacket

java.lang.Object
  extended by uk.org.arlott.simon.hw.f24.lbsta.PacketData
      extended by uk.org.arlott.simon.hw.f24.lbsta.BridgePacket
Direct Known Subclasses:
ConfigurationMessage, TopologyChangeMessage

public abstract class BridgePacket
extends PacketData

Base Spanning Tree Algorithm packet, with protocol identifier, version and message type.


Field Summary
private  int messageType
          Message Type (1 octet)
private  int protocolIdentifier
          Protocol Identifier (2 octets) The constant 0.
private  int version
          Version (1 octet) The constant 0.
 
Constructor Summary
BridgePacket(int messageType)
          Creates a new BridgePacket of the specified type.
 
Method Summary
 int getMessageType()
          Gets the Message Type.
 int getProtcolIdentifier()
          Gets the Protocol Identifier.
 int getVersion()
          Gets the Version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protocolIdentifier

private int protocolIdentifier
Protocol Identifier (2 octets) The constant 0.


version

private int version
Version (1 octet) The constant 0.


messageType

private int messageType
Message Type (1 octet)

Constructor Detail

BridgePacket

public BridgePacket(int messageType)
Creates a new BridgePacket of the specified type.

Parameters:
messageType - Type of bridge packet to create.
Method Detail

getProtcolIdentifier

public int getProtcolIdentifier()
Gets the Protocol Identifier.

Returns:
A value in the range 0-65535.

getVersion

public int getVersion()
Gets the Version.

Returns:
A value in the range 0-255.

getMessageType

public int getMessageType()
Gets the Message Type.

Returns:
A value in the range 0-255.