DRCL J-Sim API

drcl.inet.sensorsim
Class SensorPhy

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.sensorsim.SensorPhy
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class SensorPhy
extends Module

This class implements the sensor physical layer.

Version:
1.0, 12/19/2003
Author:
Ahmed Sobeih
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static java.lang.String CHANNEL_PORT_ID
           
static java.lang.String CONFIG_PORT_ID
           
static java.lang.String MOBILITY_PORT_ID
           
static double NOISE_MEAN
           
static double NOISE_STRENGTH
           
static double NOISE_VAR
           
static java.lang.String PROPAGATION_PORT_ID
           
static long SEED_RNG
           
static double TARGET_STRENGTH
           
static java.lang.String TO_AGENT_PORT_ID
           
 
Fields inherited from class drcl.net.Module
downPort, PortGroup_DOWN, PortGroup_UP, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Constructor Summary
SensorPhy()
           
SensorPhy(long nid_, double Radius_)
           
 
Method Summary
 void duplicate(java.lang.Object source_)
          Duplicates the content of source_, including ID, name, child components and connections among them, to this component.
 Port getChannelPort()
          Gets the port that connects to the sensor channel
 java.lang.String getName()
          Returns the (informational) name of the component.
 long getNid(long nid_)
          Gets the ID of the node
 double getNoisePower()
          Gets the noise power
 double getPt()
           
 double getRadius()
          Gets the transmission radius
 double getRxThresh()
          Gets the receiving threshold
 double getTargetPower()
          Gets the target power
 void setNid(long nid_)
          Sets the ID of the node
 void setNoiseStrength(double noiseStrength_)
          Sets the noise strength
 void setPt(double Pt_)
           
 void setRadius(double Radius_)
          Sets the transmission radius
 void setRxThresh(double RxThresh_)
          Sets the receiving threshold
 void setTargetPower(double Pt_)
          Sets the target power
 
Methods inherited from class drcl.net.Module
cancelTimeout, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getID, getParent, getPort, getPort, getRoot, getTime, iduplicate, info, isAncestorOf, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, reset, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TARGET_STRENGTH

public static final double TARGET_STRENGTH
See Also:
Constant Field Values

NOISE_STRENGTH

public static final double NOISE_STRENGTH
See Also:
Constant Field Values

NOISE_MEAN

public static final double NOISE_MEAN
See Also:
Constant Field Values

NOISE_VAR

public static final double NOISE_VAR
See Also:
Constant Field Values

SEED_RNG

public static final long SEED_RNG
See Also:
Constant Field Values

CONFIG_PORT_ID

public static final java.lang.String CONFIG_PORT_ID
See Also:
Constant Field Values

CHANNEL_PORT_ID

public static final java.lang.String CHANNEL_PORT_ID
See Also:
Constant Field Values

PROPAGATION_PORT_ID

public static final java.lang.String PROPAGATION_PORT_ID
See Also:
Constant Field Values

MOBILITY_PORT_ID

public static final java.lang.String MOBILITY_PORT_ID
See Also:
Constant Field Values

TO_AGENT_PORT_ID

public static final java.lang.String TO_AGENT_PORT_ID
See Also:
Constant Field Values
Constructor Detail

SensorPhy

public SensorPhy(long nid_,
                 double Radius_)

SensorPhy

public SensorPhy()
Method Detail

getName

public java.lang.String getName()
Description copied from class: Component
Returns the (informational) name of the component.

Overrides:
getName in class Component

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: Component
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. Subclasses need to override this method to copy its own variables.

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class Module

getChannelPort

public Port getChannelPort()
Gets the port that connects to the sensor channel


setNid

public void setNid(long nid_)
Sets the ID of the node


getNid

public long getNid(long nid_)
Gets the ID of the node


setRadius

public void setRadius(double Radius_)
Sets the transmission radius


getRadius

public double getRadius()
Gets the transmission radius


setRxThresh

public void setRxThresh(double RxThresh_)
Sets the receiving threshold


getRxThresh

public double getRxThresh()
Gets the receiving threshold


getNoisePower

public double getNoisePower()
Gets the noise power


setNoiseStrength

public void setNoiseStrength(double noiseStrength_)
Sets the noise strength


setTargetPower

public void setTargetPower(double Pt_)
Sets the target power


setPt

public void setPt(double Pt_)

getTargetPower

public double getTargetPower()
Gets the target power


getPt

public double getPt()

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~