|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.ants.felixgm.trmsim_wsn.network.Network
es.ants.felixgm.trmsim_wsn.trm.lftm.LFTM_Network
public class LFTM_Network
This class models a network composed by sensors implementing LFTM
| Field Summary |
|---|
| Fields inherited from class es.ants.felixgm.trmsim_wsn.network.Network |
|---|
clients, maxDistance, sensors, servers, services |
| Constructor Summary | |
|---|---|
LFTM_Network(int numSensors,
double probClients,
double rangeFactor,
java.util.Collection<java.lang.Double> probServices,
java.util.Collection<java.lang.Double> probGoodness,
java.util.Collection<Service> services)
This constructor creates a new random LFTM Network using the given parameters |
|
LFTM_Network(java.lang.String xmlFilePath)
This method loads a network from a XML file and creates the specific corresponding LFTM Network |
|
| Method Summary | |
|---|---|
Sensor |
newSensor()
This method creates a new sensor. |
Sensor |
newSensor(int id,
double x,
double y)
This method creates a new sensor. |
void |
reset()
This method resets this network to its initial state |
| Methods inherited from class es.ants.felixgm.trmsim_wsn.network.Network |
|---|
get_clients, get_maxDistance, get_numClients, get_numSensors, get_numServers, get_sensors, get_sensorsTransmittedDistance, get_servers, get_services, getSensor, oscillate, reachesQualifiedService, set_collusion, set_dynamic, setNewNeighbors, toString, writeToXMLFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LFTM_Network(int numSensors,
double probClients,
double rangeFactor,
java.util.Collection<java.lang.Double> probServices,
java.util.Collection<java.lang.Double> probGoodness,
java.util.Collection<Service> services)
numSensors - Number of sensors composing the networkprobClients - Probability of a sensor to act as a client requesting servicesrangeFactor - Maximum wireless range of every sensor. It determines the neighborhood of every sensorprobServices - A collection of probabilities of offering a certain service, one per serviceprobGoodness - A collection of goodnesses about offering a certain service, one per serviceservices - All the services offered by the generated Network
public LFTM_Network(java.lang.String xmlFilePath)
throws java.lang.Exception
xmlFilePath - Path of the XML to load the network from
java.lang.Exception - If the XML file given does not have the appropriate structure, or if
a sensor links to an undefined sensor, or if a sensor links to itself| Method Detail |
|---|
public void reset()
Network
reset in class Networkpublic Sensor newSensor()
Network
newSensor in class Network
public Sensor newSensor(int id,
double x,
double y)
Network
newSensor in class Networkid - Sensor's identifierx - X coordinate of the new sensory - Y coordinate of the new sensor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||