DRCL J-Sim API

drcl.inet.mac
Class LLMacContract

java.lang.Object
  extended bydrcl.comp.Contract
      extended bydrcl.inet.mac.LLMacContract

public class LLMacContract
extends Contract

Defines soem convenient methods which are used by the LL components and the MAC components.

Author:
Ye Ge

Field Summary
static LLMacContract INSTANCE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
LLMacContract()
          Constructor.
LLMacContract(int role_)
          Constructor.
 
Method Summary
 LLPacket createLLPacket(long dst_macaddr_, long src_macaddr_, ARPPacket body_)
          Creates a LLPacket.
 LLPacket createLLPacket(long dst_macaddr_, long src_macaddr_, InetPacket body_)
          Creates a LLPacket.
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
 
Methods inherited from class drcl.comp.Contract
getRole, match, setRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final LLMacContract INSTANCE
Constructor Detail

LLMacContract

public LLMacContract()
Constructor.


LLMacContract

public LLMacContract(int role_)
Constructor.

Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Contract

getContractContent

public java.lang.Object getContractContent()
Description copied from class: Contract
Returns the content of this contract (format?).

Specified by:
getContractContent in class Contract

createLLPacket

public LLPacket createLLPacket(long dst_macaddr_,
                               long src_macaddr_,
                               InetPacket body_)
Creates a LLPacket.

Parameters:
dst_macaddr_ - the destination mac address.
src_macaddr_ - the source mac address.
body_ - the InetPacket object which is the payload of the constructed LLPacket object.

createLLPacket

public LLPacket createLLPacket(long dst_macaddr_,
                               long src_macaddr_,
                               ARPPacket body_)
Creates a LLPacket.

Parameters:
dst_macaddr_ - the destination mac address.
src_macaddr_ - the source mac address.
body_ - the ARPPacket object which is the payload of the constructed LLPacket object.

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~