Below is a brief description of each component of WAMPS:
• Reading Sensor: generates a random value whose range is set based on the value of a
“seriousness” variable.
• Reading Transmitter: gets the generated value from the reading sensor and transmits it
through the communicator.
• Power Controller: Each node will have a method called “turn on” that will start the node
and we just call it. As for power-saving modes, this will depend on what the simulator will
provide to us.
• Communicator: this is implemented by the simulator. Inter-Process communication is
usually done using sockets; so, we expect the simulator to provide us with sockets as well
as methods such as “send” and “receive”.
• Launcher: informs the data collector to start collection based on the delivery mode set by
the user.
• Data Collector: gets a list of nodes from which it has to collect readings, then sends
messages to inform them and finally receives the required values.
• Aggregator: implements the RCQ algorithm for data aggregation that we will discuss in the
next section.
• Data Extractor: Use SQL queries to extract data from database
• Data Displayer: This extracts data as required by the user and displays them in a table as
well as evaluates the AQI for the selected area.
• Trend Analyser: Gets previous readings and determines relationship between them to be
able to extrapolate future readings.
• Nodes Deployment Viewer: Displays deployment of nodes in the WSN field and their AQI
colours.
• Connection Initiator: The java DriverManager allows for a method to open a database,
providing it the name of the database, user name and password as parameters. So, this
component just has to make a call to this method and store the return reference to the
connection.
• Connection Destructor: Connection object, in java.sql package, usually provides for a
close method that closes the latter safely and frees associated memory as well as save the
state of the latter. Therefore, this component just has to call this method.