experiment.entity
Class Link

java.lang.Object
  extended by experiment.entity.Entity
      extended by experiment.entity.Link

public class Link
extends Entity

Created by IntelliJ IDEA. User: andy Date: Mar 10, 2010 Represent's an experiment link and stores all the link's data.


Field Summary
static boolean defaultIsEncrypted
          Static default variables
static boolean defaultIsVirtual
           
static Rssi defaultRssi
           
 
Fields inherited from class experiment.entity.Entity
capabilityMap, enabled, entity3d, isNode, lock, state
 
Constructor Summary
Link(ExperimentState state, Node source, Node target, java.lang.String encrypted, java.lang.String virtual, Rssi rssi)
          Full Constructor.
 
Method Summary
static void addDefaultCapability(Capability dC)
          Is called during experiment configurarion to set the default link capabilities
 Rssi getRssi()
           
 Node getSource()
           
 Node getTarget()
           
 boolean isEncrypted()
           
 boolean isVirtual()
           
 void setEncrypted(boolean encrypted)
          Set encryption mode.
 void setRssi(Rssi rssi)
          Set the Link's rssi.
 
Methods inherited from class experiment.entity.Entity
getCapability, getCapabilitySet, getEntity3d, getState, isEnabled, isNode, setCapability, setCapability, setEntity3d, setMonitored, setState, setStatus, updated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultIsEncrypted

public static boolean defaultIsEncrypted
Static default variables


defaultIsVirtual

public static boolean defaultIsVirtual

defaultRssi

public static Rssi defaultRssi
Constructor Detail

Link

public Link(ExperimentState state,
            Node source,
            Node target,
            java.lang.String encrypted,
            java.lang.String virtual,
            Rssi rssi)
Full Constructor. Put null to all not available and not required attributes.

Parameters:
state - the object that contains all the data for a given experiment state
source - the source Node
target - the target Node
encrypted - is a Boolean value in a String indicating if the link is encrypted or not.
virtual - is a Boolean value in a String indicating if the link is virtual or not.
rssi - specifies the RSSI value on the link
Method Detail

addDefaultCapability

public static void addDefaultCapability(Capability dC)
Is called during experiment configurarion to set the default link capabilities

Parameters:
dC - the capability to be set

getRssi

public Rssi getRssi()
Returns:
the Rssi of the Link

getSource

public Node getSource()
Returns:
the source Node of the link

getTarget

public Node getTarget()
Returns:
the target Node of the link

isEncrypted

public boolean isEncrypted()
Returns:
true if the Link is encrypted

isVirtual

public boolean isVirtual()
Returns:
true if this is a virtual Link.

setEncrypted

public void setEncrypted(boolean encrypted)
Set encryption mode.

Parameters:
encrypted - true if the link is enscrypted

setRssi

public void setRssi(Rssi rssi)
Set the Link's rssi.

Parameters:
rssi - the new rssi object