es.ants.felixgm.trmsim_wsn.trm.templatetrm
Class TemplateTRM_Sensor

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.network.Sensor
      extended by es.ants.felixgm.trmsim_wsn.trm.templatetrm.TemplateTRM_Sensor
All Implemented Interfaces:
java.lang.Runnable

public class TemplateTRM_Sensor
extends Sensor

This class models a Sensor implementing TemplateTRM

Since:
0.3
Version:
0.3
Author:
Félix Gómez

Field Summary
 
Fields inherited from class es.ants.felixgm.trmsim_wsn.network.Sensor
_maxDistance, activeState, collusion, dynamic, id, idCount, links, numRequests, outcome, requiredService, servicesGoodness, transmittedDistance, trmmodelWSN, xPosition, yPosition
 
Constructor Summary
TemplateTRM_Sensor()
          This constructor creates a new Sensor implementing TemplateTRM
TemplateTRM_Sensor(int id, double x, double y)
          This constructor creates a new Sensor implementing PowerTrust
 
Method Summary
 void reset()
          This method resets a Sensor to its initial state
 
Methods inherited from class es.ants.felixgm.trmsim_wsn.network.Sensor
addLink, addService, addTransmittedDistance, distance, equals, findSensors, get_goodness, get_numServices, get_outcome, get_services, get_transmittedDistance, get_TRModel_WSN, getNeighbors, getX, getY, id, isActive, isNeighbor, offersService, removeAllNeighbors, removeLink, resetId, run, serve, set_goodness, set_requiredService, set_TRModel_WSN, setActiveState, setCollusion, setDynamic, setMaxDistance, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateTRM_Sensor

public TemplateTRM_Sensor()
This constructor creates a new Sensor implementing TemplateTRM


TemplateTRM_Sensor

public TemplateTRM_Sensor(int id,
                          double x,
                          double y)
This constructor creates a new Sensor implementing PowerTrust

Parameters:
id - Identifier of the new sensor
x - X coordinate of the new sensor
y - Y coordinate of the new sensor
Method Detail

reset

public void reset()
Description copied from class: Sensor
This method resets a Sensor to its initial state

Specified by:
reset in class Sensor