DRCL J-Sim API

drcl.inet.mac
Class PositionReportContract

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

public class PositionReportContract
extends Contract

The PositionReportContract contract. This contract defines the message format between MobileModel and NodePositionTracker as well as between MobileModel and WirelessPhy.

Author:
Ye Ge
See Also:
MobilityModel, NodePositionTracker, WirelessPhy

Nested Class Summary
static class PositionReportContract.Message
          The position report message.
 
Field Summary
static PositionReportContract INSTANCE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
PositionReportContract()
           
PositionReportContract(int role_)
           
 
Method Summary
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
static void report(double X_, double Y_, double Z_, Port out_)
          Constructs a position report message and sends it through out_ port.
 
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 PositionReportContract INSTANCE
Constructor Detail

PositionReportContract

public PositionReportContract()

PositionReportContract

public PositionReportContract(int role_)
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

report

public static void report(double X_,
                          double Y_,
                          double Z_,
                          Port out_)
Constructs a position report message and sends it through out_ port.

Parameters:
X_ - the x coordinate of the reporting node current position.
Y_ - the x coordinate of the reporting node current position.
Z_ - the x coordinate of the reporting node current position.

DRCL J-Sim API

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