DRCL J-Sim API

drcl.inet.mac
Class MacPhyContract.Message

java.lang.Object
  extended bydrcl.comp.Message
      extended bydrcl.inet.mac.MacPhyContract.Message
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable
Enclosing class:
MacPhyContract

public static class MacPhyContract.Message
extends Message

This class defines the data structure of the message between Mac and Phy components.


Constructor Summary
MacPhyContract.Message()
           
MacPhyContract.Message(boolean error_, double RxPr_, double CPThresh_, double CSThresh_, double RXThresh_, java.lang.Object pkt_)
          Construct a Mac-Phy Message
MacPhyContract.Message(boolean error_, double RxPr_, double CPThresh_, java.lang.Object pkt_)
          Construct a Mac-Phy Message
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this object.
 Contract getContract()
          Returns the associated contract of this message.
 double getCPThresh()
          Get the capture threshold
 double getCSThresh()
          Get the carrier sense threshold
 boolean getError()
          Get the error flag
 java.lang.Object getPkt()
          Get the data packet
 double getRxPr()
          Get the transmission power
 double getRXThresh()
          Get the receiving threshold
 void setError(boolean error_)
          Sets the error flag.
 java.lang.String toString(java.lang.String separator_)
          Prints the content of the message by separating each field with the separator string.
 
Methods inherited from class drcl.comp.Message
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MacPhyContract.Message

public MacPhyContract.Message()

MacPhyContract.Message

public MacPhyContract.Message(boolean error_,
                              double RxPr_,
                              double CPThresh_,
                              java.lang.Object pkt_)
Construct a Mac-Phy Message

Parameters:
error_ - - indicating if the frame is corrupted
RxPr_ - - received power
CPThresh_ - - capture threshold
pkt_ - - data packet

MacPhyContract.Message

public MacPhyContract.Message(boolean error_,
                              double RxPr_,
                              double CPThresh_,
                              double CSThresh_,
                              double RXThresh_,
                              java.lang.Object pkt_)
Construct a Mac-Phy Message

Parameters:
error_ - - indicating if the frame is corrupted
RxPr_ - - received power
CPThresh_ - - capture threshold
CSThresh_ - - carrier sensing threshold
RXThresh_ - - receiving threshold
pkt_ - - data packet
Method Detail

getError

public boolean getError()
Get the error flag


getRxPr

public double getRxPr()
Get the transmission power


getCPThresh

public double getCPThresh()
Get the capture threshold


getRXThresh

public double getRXThresh()
Get the receiving threshold


getCSThresh

public double getCSThresh()
Get the carrier sense threshold


getPkt

public java.lang.Object getPkt()
Get the data packet


setError

public void setError(boolean error_)
Sets the error flag.


clone

public java.lang.Object clone()
Description copied from interface: ObjectCloneable
Returns a clone of this object.

Specified by:
clone in interface ObjectCloneable
Specified by:
clone in class Message

getContract

public Contract getContract()
Description copied from class: Message
Returns the associated contract of this message.

Specified by:
getContract in class Message

toString

public java.lang.String toString(java.lang.String separator_)
Description copied from class: Message
Prints the content of the message by separating each field with the separator string.

Specified by:
toString in class Message

DRCL J-Sim API

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