|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.radio.RadioNoise
public abstract class RadioNoise
RadioNoise is an abstract class which implements some functionality
that is common to the independent and additive radio noise simulation models.
| Field Summary | |
|---|---|
protected FieldInterface |
fieldEntity
field entity downcall reference. |
protected MacInterface |
macEntity
mac entity upcall reference. |
protected byte |
mode
radio mode: IDLE, SENSING, RECEIVING, SENDING, SLEEP. |
protected RadioInfo |
radioInfo
radio properties. |
protected RadioInterface |
self
self-referencing radio entity reference. |
protected Message |
signalBuffer
message being received. |
protected long |
signalFinish
end of transmission time. |
protected double |
signalPower_mW
transmission signal strength. |
protected int |
signals
number of signals being received. |
| Constructor Summary | |
|---|---|
protected |
RadioNoise(int id,
RadioInfo.RadioInfoShared sharedInfo)
Create a new radio. |
| Method Summary | |
|---|---|
void |
endTransmit()
End message transmission. |
RadioInterface |
getProxy()
Return self-referencing radio entity reference. |
RadioInfo |
getRadioInfo()
Return radio properties. |
protected void |
lockSignal(Message msg,
double power_mW,
long duration)
Lock onto current packet signal. |
void |
setFieldEntity(FieldInterface fieldEntity)
Set upcall field entity reference. |
void |
setMacEntity(MacInterface macEntity)
Set downcall mac entity reference. |
void |
setMode(byte mode)
Set radio mode. |
void |
setSleepMode(boolean sleep)
Turn radio off (sleep) or on. |
void |
transmit(Message msg,
long delay,
long duration)
Start transmitting message. |
protected void |
unlockSignal()
Unlock from current packet signal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jist.swans.radio.RadioInterface |
|---|
endReceive, receive |
| Field Detail |
|---|
protected RadioInfo radioInfo
protected byte mode
protected Message signalBuffer
protected long signalFinish
protected double signalPower_mW
protected int signals
protected FieldInterface fieldEntity
protected RadioInterface self
protected MacInterface macEntity
| Constructor Detail |
|---|
protected RadioNoise(int id,
RadioInfo.RadioInfoShared sharedInfo)
id - radio identifiersharedInfo - shared radio properties| Method Detail |
|---|
public RadioInterface getProxy()
public void setFieldEntity(FieldInterface fieldEntity)
fieldEntity - upcall field entity referencepublic void setMacEntity(MacInterface macEntity)
macEntity - downcall mac entity referencepublic RadioInfo getRadioInfo()
public void setMode(byte mode)
mode - radio modepublic void setSleepMode(boolean sleep)
setSleepMode in interface RadioInterfacesleep - whether to turn off radio
protected void lockSignal(Message msg,
double power_mW,
long duration)
msg - packet currently on the airpower_mW - signal power (units: mW)duration - time to EOT (units: simtime)protected void unlockSignal()
public void transmit(Message msg,
long delay,
long duration)
transmit in interface RadioInterfacemsg - message object to transmitdelay - time to the wireduration - time on the wirepublic void endTransmit()
endTransmit in interface RadioInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||