Sim
Class HardwareFrame
java.lang.Object
Sim.HardwareFrame
public class HardwareFrame
- extends java.lang.Object
HardwareFrame represents a physical layer data transfer from one neighbor to the next.
Field Summary |
static int |
BROADCAST
Broadcast address. |
Constructor Summary |
HardwareFrame(int source,
int dest,
ProtocolFrame protocolData,
Packet userData)
Constructs a new HardwareFrame that will be broadcast from the node with "sourceId" and is meant
for neighbor with "destId". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BROADCAST
public static final int BROADCAST
- Broadcast address.
- See Also:
- Constant Field Values
HardwareFrame
public HardwareFrame(int source,
int dest,
ProtocolFrame protocolData,
Packet userData)
- Constructs a new HardwareFrame that will be broadcast from the node with "sourceId" and is meant
for neighbor with "destId". The HardwareFrame contains the given data Packet.
- Parameters:
source
- sending nodedest
- destination neighbor, or BROADCAST
if broadcastprotocolData
- non-null routing protocol section of frameuserData
- nullable user packet data, if any attached
isBroadcast
public boolean isBroadcast()
getSize
public int getSize()
getSizeInBits
public int getSizeInBits()
- Returns
getSize()
* 8.
getSource
public int getSource()
getDest
public int getDest()
getProtocolData
public ProtocolFrame getProtocolData()
getUserData
public Packet getUserData()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object