90 likes | 253 Views
Temperature Application based on Directed Diffusion. Ke Liu September 2003. Temperature Application. Code structure Attributes: the definition for the application Sensor: running on every end node Sink: running on the observer Environment Simulation Parent Class: Application/DiffApp.
E N D
Temperature Application based on Directed Diffusion Ke Liu September 2003
Temperature Application • Code structure • Attributes: the definition for the application • Sensor: running on every end node • Sink: running on the observer • Environment Simulation • Parent Class: Application/DiffApp
Basic Attributes • Keys: used by the data exchanged in network • Temperature Key: for the temperature data • Location Keys: to track the position of reporting nodes • X Key • Y Key • Keys for CAN: to aggregate the received data • Covariance Key • Average temperature Key • Number of nodes Key
Basic Attributes (cont’) • NRSimpleAttributeFactory: maybe containing many NRAttributes each, defining the attr data type (for all of following, I use FLOAT64_TYPE) • Temperature AttrFactory • Location AttrFactory • CAN AttrFactory • Each message can consist of several defined Attribute Factory. • Each factory can consist of many attributes data
Code Structure • Rectangles: Classes • Triangles: Methods
Sensor Behavior • Real Line: Control Flow • Dashed Line: Data Flow/Actions Order
Environment Simulation • Temperature Matrixes: • Environment Temperature Matrix • Fire Temperature Matrix • Methods: • Set the temperature for specified location • Set the fire for specified location • Spread the fire • Set the fire’s dangerous level (spreading speed) • Return the temperatures of a specified location • Updating timer