|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.NetworkInterface
interfaces.InterferenceLimitedInterface
public class InterferenceLimitedInterface
A simple Network Interface that provides a variable bit-rate service, where the bit-rate depends on the number of other transmitting stations within range The current transmit speed is updated only if there are ongoing transmissions. The configured transmit speed is the maximum obtainable speed.
Field Summary | |
---|---|
protected int |
currentTransmitSpeed
|
protected int |
numberOfTransmissions
|
Fields inherited from class core.NetworkInterface |
---|
connections, host, interfacetype, optimizer, RANGE_ID, SCAN_INTERVAL_ID, SCAN_INTERVAL_S, SPEED_ID, TRANSMIT_RANGE_S, TRANSMIT_SPEED_S, transmitRange, transmitSpeed |
Constructor Summary | |
---|---|
InterferenceLimitedInterface(InterferenceLimitedInterface ni)
Copy constructor |
|
InterferenceLimitedInterface(Settings s)
|
Method Summary | |
---|---|
void |
connect(NetworkInterface anotherInterface)
Tries to connect this host to another host. |
void |
createConnection(NetworkInterface anotherInterface)
Creates a connection to another host. |
int |
getTransmitSpeed()
Returns the transmit speed of this network layer |
boolean |
isTransferring()
Returns true if this interface is actually transmitting data |
NetworkInterface |
replicate()
Replication function |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
update()
Updates the state of current connections (i.e., tears down connections that are out of range). |
Methods inherited from class core.NetworkInterface |
---|
connect, destroyConnection, disconnect, ensurePositiveValue, getAddress, getConnections, getHost, getInterfaceType, getLocation, getTransmitRange, isConnected, isScanning, isWithinRange, moduleValueChanged, reset, setClisteners, setHost |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int currentTransmitSpeed
protected int numberOfTransmissions
Constructor Detail |
---|
public InterferenceLimitedInterface(Settings s)
public InterferenceLimitedInterface(InterferenceLimitedInterface ni)
ni
- the copied network interface objectMethod Detail |
---|
public NetworkInterface replicate()
NetworkInterface
replicate
in class NetworkInterface
public int getTransmitSpeed()
getTransmitSpeed
in class NetworkInterface
public void connect(NetworkInterface anotherInterface)
connect
in class NetworkInterface
anotherInterface
- The host to connect topublic void update()
update
in class NetworkInterface
public void createConnection(NetworkInterface anotherInterface)
createConnection
in class NetworkInterface
anotherInterface
- The interface to create the connection topublic boolean isTransferring()
public java.lang.String toString()
toString
in class NetworkInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |