|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.field.Field
public class Field
An abstract parent of Field implementations, which contains the common code.
| Nested Class Summary | |
|---|---|
static interface |
Field.ConnectivityVisitor
Connectivity visitor interface. |
static class |
Field.RadioData
Radio information stored by the Field entity. |
| Field Summary | |
|---|---|
protected Fading |
fading
Fading model. |
protected double |
limit
Propagation limit (in dBm). |
static org.apache.log4j.Logger |
logField
logger for field events. |
protected Mobility |
mobility
Mobility model. |
protected PathLoss |
pathloss
Pathloss model. |
protected Field.RadioData[] |
radios
Array of radios on this field. |
protected FieldInterface |
self
Self-referencing field entity. |
protected Spatial |
spatial
Spatial data structure. |
| Constructor Summary | |
|---|---|
Field(Location bounds)
Initialize new, empty field with default fading (FadingNone) and pathloss (PathLossFreeSpace) models, and default propagation limits. |
|
Field(Location bounds,
boolean wrap)
Initialize new, empty field with default fading (FadingNone) and pathloss (PathLossFreeSpace) models, and default propagation limits, possibly with wrapped edges. |
|
Field(Spatial spatial,
Fading fading,
PathLoss pathloss,
Mobility mobility,
double propagationLimit)
Initialize new, empty field with given fading and pathloss models, using default propagation limits. |
|
| Method Summary | |
|---|---|
void |
addRadio(RadioInfo info,
RadioInterface entity,
Location loc)
Add a radio onto the field. |
double |
computeAvgConnectivity(boolean sense)
Compute field connectivity. |
double |
computeDensity()
Compute field density. |
void |
delRadio(java.lang.Integer id)
Remove a radio from the field. |
FieldInterface |
getProxy()
Return the proxy entity of this field. |
Field.RadioData |
getRadioData(java.lang.Integer id)
Return radio properties. |
void |
moveRadio(java.lang.Integer id,
Location loc)
Move radio to different location on field. |
void |
moveRadioOff(java.lang.Integer id,
Location delta)
Move radio to different relative location on field. |
void |
setFading(Fading fading)
Set field fading model. |
void |
setMobility(Mobility mobility)
Set mobility model. |
void |
setPathLoss(PathLoss pathloss)
Set field pathloss model. |
void |
setPropagationLimit(double limit)
Set signal propagation threshold. |
void |
startMobility(java.lang.Integer id)
Start mobility; schedule first mobility event. |
void |
transmit(RadioInfo srcInfo,
Message msg,
long duration)
Transmit physical-layer message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger logField
protected double limit
protected PathLoss pathloss
protected Fading fading
protected Mobility mobility
protected Spatial spatial
protected FieldInterface self
protected Field.RadioData[] radios
| Constructor Detail |
|---|
public Field(Location bounds)
bounds - spatial limits of field
public Field(Location bounds,
boolean wrap)
bounds - spatial limits of fieldwrap - whether to wrap field edges
public Field(Spatial spatial,
Fading fading,
PathLoss pathloss,
Mobility mobility,
double propagationLimit)
spatial - binning modelfading - fading modelpathloss - pathloss modelmobility - mobility modelpropagationLimit - minimum signal threshold (in dBm)| Method Detail |
|---|
public void setFading(Fading fading)
fading - fading modelpublic void setPathLoss(PathLoss pathloss)
pathloss - pathloss modelpublic void setMobility(Mobility mobility)
mobility - mobility modelpublic void setPropagationLimit(double limit)
limit - minimum signal threshold (in dBm)public FieldInterface getProxy()
public void addRadio(RadioInfo info,
RadioInterface entity,
Location loc)
info - radio properties (includes radio identifier)entity - radio upcall entity referenceloc - radio locationpublic void delRadio(java.lang.Integer id)
id - radio identifierpublic Field.RadioData getRadioData(java.lang.Integer id)
id - radio identifier
public void moveRadio(java.lang.Integer id,
Location loc)
moveRadio in interface FieldInterfaceid - unique radio identifierloc - new radio coordinates
public void moveRadioOff(java.lang.Integer id,
Location delta)
moveRadioOff in interface FieldInterfaceid - unique radio identifierdelta - radio offset coordinatespublic void startMobility(java.lang.Integer id)
id - radio identifier
public void transmit(RadioInfo srcInfo,
Message msg,
long duration)
transmit in interface FieldInterfacesrcInfo - source radio informationmsg - physical layer packetduration - transmission durationpublic double computeDensity()
public double computeAvgConnectivity(boolean sense)
sense - whether to use radio sensing or reception signal strength
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||