sidnet.stack.std.mac.ieee802_15_4
Class Phy802_15_4Impl

java.lang.Object
  extended by sidnet.stack.std.mac.ieee802_15_4.Phy802_15_4Impl
All Implemented Interfaces:
JistAPI.Proxiable, JistAPI.Timeless, RadioInterface, Phy802_15_4

public class Phy802_15_4Impl
extends java.lang.Object
implements Phy802_15_4


Field Summary
protected  MacAddress localAddr
          Not in NS-2: mac address of this interface.
static int phyCCAHType
           
static int phyEDHType
           
static int phyRecvOverHType
           
static int phySendOverHType
           
static int phyTRXHType
           
static PHY_PIB PPIB
           
protected  RadioInfo radioInfo
          radio properties
 
Constructor Summary
Phy802_15_4Impl(int id, RadioInfo.RadioInfoShared sharedInfo, EnergyManagement energyManagementUnit, Node myNode, long toSleepTimerPeriod)
           
Phy802_15_4Impl(PHY_PIB pp, int id, RadioInfo.RadioInfoShared sharedInfo, EnergyManagement energyManagementUnit, Node myNode, long toSleepTimerPeriod)
           
 
Method Summary
 void cancelSendOverTimer()
           
 void CCAHandler()
           
 boolean channelSupported(byte channel)
           
 void construct_PPDU(byte psduLength, MacMessage_802_15_4 psdu)
           
 void drop(MacMessage_802_15_4 p, java.lang.String reason)
           
 void EDHandler()
           
 void endReceive(java.lang.Double powerObj_mW)
          End message reception.
 void endTransmit()
          End message transmission.
 Phy802_15_4 getProxy()
          Return proxy entity of this phy layer.
 RadioInfo getRadioInfo()
           
 double getRate_BitsPerSecond(char dataOrSymbol)
           
 boolean isSendOverTimerBusy()
           
 void markSleeps()
           
 void markWakes()
           
 byte measureLinkQ(MacMessage_802_15_4 p)
           
 void PD_DATA_indication(byte psduLength, MacMessage_802_15_4 psdu, byte ppduLinkQuality)
           
 void PD_DATA_request(byte psduLength, MacMessage_802_15_4 psdu)
           
 void peek(Message msg)
           
 void PLME_CCA_request()
           
 void PLME_ED_request()
           
 void PLME_GET_request(PPIBAenum PIBAttribute)
           
 void PLME_SET_request(PPIBAenum PIBAttribute, PHY_PIB PIBAttributeValue)
           
 void PLME_SET_TRX_STATE_request(PHYenum state)
           
 void receive(Message msg, java.lang.Double powerObj_mW, java.lang.Long durationObj)
          Start receiving message.
 void recvOverHandler(MacMessage_802_15_4 p)
           
 void requestNewSleepTimer(TimerInterface802_15_4 timerEntity)
           
 void reset()
           
 MacMessage_802_15_4 rxPacket()
           
 void send(Message msg)
           
 void sendOverHandler()
           
 void setFieldEntity(FieldInterface field)
          Hook up with the field entity.
 void setMacEntity(Mac802_15_4 mac)
          Hook up with the mac entity.
 void setSleepMode(boolean sleep)
          Put radio you in sleep/awake mode.
 void transmit(Message msg)
           
 void transmit(Message msg, long delay, long duration)
          Start transmitting message.
 void TRXHandler()
           
 double trxTime(MacMessage_802_15_4 p, boolean phyPkt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

phyCCAHType

public static final int phyCCAHType
See Also:
Constant Field Values

phyEDHType

public static final int phyEDHType
See Also:
Constant Field Values

phyTRXHType

public static final int phyTRXHType
See Also:
Constant Field Values

phyRecvOverHType

public static final int phyRecvOverHType
See Also:
Constant Field Values

phySendOverHType

public static final int phySendOverHType
See Also:
Constant Field Values

localAddr

protected MacAddress localAddr
Not in NS-2: mac address of this interface.


radioInfo

protected RadioInfo radioInfo
radio properties


PPIB

public static PHY_PIB PPIB
Constructor Detail

Phy802_15_4Impl

public Phy802_15_4Impl(int id,
                       RadioInfo.RadioInfoShared sharedInfo,
                       EnergyManagement energyManagementUnit,
                       Node myNode,
                       long toSleepTimerPeriod)

Phy802_15_4Impl

public Phy802_15_4Impl(PHY_PIB pp,
                       int id,
                       RadioInfo.RadioInfoShared sharedInfo,
                       EnergyManagement energyManagementUnit,
                       Node myNode,
                       long toSleepTimerPeriod)
Method Detail

setMacEntity

public void setMacEntity(Mac802_15_4 mac)
Hook up with the mac entity.

Parameters:
mac - mac entity

getProxy

public Phy802_15_4 getProxy()
Return proxy entity of this phy layer.

Returns:
self-referencing proxy entity.

setFieldEntity

public void setFieldEntity(FieldInterface field)
Hook up with the field entity.

Parameters:
field - field entity

isSendOverTimerBusy

public boolean isSendOverTimerBusy()
                            throws JistAPI.Continuation
Specified by:
isSendOverTimerBusy in interface Phy802_15_4
Throws:
JistAPI.Continuation

cancelSendOverTimer

public void cancelSendOverTimer()
Specified by:
cancelSendOverTimer in interface Phy802_15_4

reset

public void reset()
Specified by:
reset in interface Phy802_15_4

markWakes

public void markWakes()
Specified by:
markWakes in interface Phy802_15_4

markSleeps

public void markSleeps()
Specified by:
markSleeps in interface Phy802_15_4

setSleepMode

public void setSleepMode(boolean sleep)
Description copied from interface: RadioInterface
Put radio you in sleep/awake mode.

Specified by:
setSleepMode in interface RadioInterface
Parameters:
sleep - sleep/awake switch

getRadioInfo

public RadioInfo getRadioInfo()

channelSupported

public boolean channelSupported(byte channel)
                         throws JistAPI.Continuation
Specified by:
channelSupported in interface Phy802_15_4
Throws:
JistAPI.Continuation

getRate_BitsPerSecond

public double getRate_BitsPerSecond(char dataOrSymbol)
                             throws JistAPI.Continuation
Specified by:
getRate_BitsPerSecond in interface Phy802_15_4
Throws:
JistAPI.Continuation

trxTime

public double trxTime(MacMessage_802_15_4 p,
                      boolean phyPkt)
               throws JistAPI.Continuation
Specified by:
trxTime in interface Phy802_15_4
Throws:
JistAPI.Continuation

construct_PPDU

public void construct_PPDU(byte psduLength,
                           MacMessage_802_15_4 psdu)

PD_DATA_request

public void PD_DATA_request(byte psduLength,
                            MacMessage_802_15_4 psdu)

PD_DATA_indication

public void PD_DATA_indication(byte psduLength,
                               MacMessage_802_15_4 psdu,
                               byte ppduLinkQuality)

PLME_CCA_request

public void PLME_CCA_request()
Specified by:
PLME_CCA_request in interface Phy802_15_4

PLME_ED_request

public void PLME_ED_request()
Specified by:
PLME_ED_request in interface Phy802_15_4

PLME_GET_request

public void PLME_GET_request(PPIBAenum PIBAttribute)
Specified by:
PLME_GET_request in interface Phy802_15_4

PLME_SET_TRX_STATE_request

public void PLME_SET_TRX_STATE_request(PHYenum state)
Specified by:
PLME_SET_TRX_STATE_request in interface Phy802_15_4

PLME_SET_request

public void PLME_SET_request(PPIBAenum PIBAttribute,
                             PHY_PIB PIBAttributeValue)
Specified by:
PLME_SET_request in interface Phy802_15_4

measureLinkQ

public byte measureLinkQ(MacMessage_802_15_4 p)

peek

public void peek(Message msg)

transmit

public void transmit(Message msg,
                     long delay,
                     long duration)
Description copied from interface: RadioInterface
Start transmitting message. Puts radio into transmission mode and contacts other radios that receive the signal. Called from mac entity.

Specified by:
transmit in interface RadioInterface
Parameters:
msg - message object to transmit
delay - time to the wire
duration - time on the wire

transmit

public void transmit(Message msg)
Specified by:
transmit in interface Phy802_15_4

endTransmit

public void endTransmit()
Description copied from interface: RadioInterface
End message transmission. Putting the radio back into idle (or possibly receiving) mode. Called from mac entity.

Specified by:
endTransmit in interface RadioInterface

receive

public void receive(Message msg,
                    java.lang.Double powerObj_mW,
                    java.lang.Long durationObj)
Description copied from interface: RadioInterface
Start receiving message. Puts radio into receive or sensing mode depending on the message power and the state of the radio. A radio that is currently transmitting will ignore incoming messages. Called from field entity.

Specified by:
receive in interface RadioInterface
Parameters:
msg - incoming message
powerObj_mW - signal strength of incoming message (units: mW)
durationObj - time until end of transmission (units: simtime)

endReceive

public void endReceive(java.lang.Double powerObj_mW)
Description copied from interface: RadioInterface
End message reception. Puts the radio back into sensing or idle mode, and sends the received message to upper layers for processing, if no error has occurred during the reception. Called from field entity.

Specified by:
endReceive in interface RadioInterface
Parameters:
powerObj_mW - signal strength of incoming message (units: mW)

send

public void send(Message msg)

requestNewSleepTimer

public void requestNewSleepTimer(TimerInterface802_15_4 timerEntity)

rxPacket

public MacMessage_802_15_4 rxPacket()

CCAHandler

public void CCAHandler()
Specified by:
CCAHandler in interface Phy802_15_4

EDHandler

public void EDHandler()
Specified by:
EDHandler in interface Phy802_15_4

TRXHandler

public void TRXHandler()
Specified by:
TRXHandler in interface Phy802_15_4

recvOverHandler

public void recvOverHandler(MacMessage_802_15_4 p)
Specified by:
recvOverHandler in interface Phy802_15_4

drop

public void drop(MacMessage_802_15_4 p,
                 java.lang.String reason)

sendOverHandler

public void sendOverHandler()
Specified by:
sendOverHandler in interface Phy802_15_4