
Sensor |
ptolemy.domains.wireless.demo.EvaderAndPursuer.Sensor |
This is a wireless sensor node that senses evaders in the sensor
field. The sensors in the field communicate with each other to
construct a spanning tree from the root node (where the evader is close
to) to nodes that are one hop from the root node and so on. When a
sensor detects the evader, it sets itself as the root
and broadcast a message to its neighbor nodes. The message includes
the time when the evader is detected, the location and the depth,
zero for the root node, of the sensor. If a sensor receives
a message from another sensor, it checks whether the root node
has been changed from last time (by check the detected time),
or whether there is a shorter path to the root node. If so, it
records the detected time, updates the information of its parent
node (location and depth in the tree) and broadcast a message,
include the detected time, its location and depth in the tree, to
it neighbot nodes. By doing this in a sensor network, a spaning
tree is constructed distributedly and sensors are indexed according
to how far it is from the root node. With the evader moving, it may
be detected by another sensor, and the tree changes dynamically.
Author(s): Yang Zhao
Version:$ $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Red (pjb2e)
input
Port that receives update message for the spanning tree.
signal
Port that receives a signal from the envader or pursuer.
output
Port that transmits the update message for the spanning tree.
This has type {location={double}, time=double, depth =int},
a record token.
messageChannelName
Name of the channel for messaging between sensors.
This is a string that defaults to "messageChannel".
signalChannelName
Name of the channel for sensors to detect envader or pursuer.
This is a string that defaults to "signalChannel".
outputChannelName
Name of the output channel. This is a string that defaults to
"OutputChannel".
range
The transmission range of the sensor. The icon for this sensor
node includes a circle with this as its radius. This is a
double and default to 50.0.