EE402 Java GUI based Client Server Sensor Aggregation

Assignment Task: Java GUI-based Client/Server Sensor Aggregation

In this assignment you must build a client/server application, where multiple GUI client devices (simulated embedded devices) send simulated environmental sensor information to a central server where it is aggregated and displayed using a GUI.

Base your assignment on three types of environmental sensors that you choose from the following list only: light level, pressure, CO2 level, humidity, particle pollution level, temperature, sound level, wind speed, and methane level.

The Simulated Sensor Device Client Application

In this application each client application should run on the desktop/laptop device. You will need to run the same sensor device application multiple times as different instances on the same machine to simulate multiple sensing devices. You can do this from within Eclipse, or you can use different command prompt/terminal windows if it makes it easier for you to manage.

Figure 1. Based on this description, Leonardo.ai generated the prototype above.

The sensing device client should have the following features:

  • You should pass the server address (e.g., localhost or 127.0.0.1 to connect to the same machine) and the sensing device name to the client application as command line arguments when you first execute it. The port number can be hard coded at a value of your choosing.
  • The application should have a pop-up dialogue window that allows you to change the name of the sensing device as the application is running.
  • The client application should have a basic Swing GUI that displays the sensor device name and allows you a mechanism of pushing buttons and/or moving sliders to generate sensor readings that will be sent to the server. The nature of this interface is deliberately vague to encourage variation in the solutions developed.
  • A single sensing device application should have three different simulated sensor type sensors. See the required sensor types above.
  • The client application should send an update every 10 seconds, regardless of whether the sensor value is changed.
  • Add configurable random noise to your sensor values to improve the simulation reality.
  • The X button on the window frame should disconnect the server and close the sensor device application gracefully.
  • Add two novel features of your own design.

    The Graphical Display Server

    In this assignment the desktop/laptop PC is the graphical display server. The Java GUI application should be run by the user and remain running until it is shut down gracefully. The GUI should display sensor information using graphical dials and charts that it receives from multiple Java client devices.

    The server application should have the following features:

  • On execution, it should open a server socket and wait for connections (on port of your choosing) from multiple sensor device clients.
  • The server should have a GUI that is built using Java Swing. It should display the data using a combination of standard Swing components and graphical components that you create yourself (e.g., based on the Canvas examples in the notes). See the next set of bullet points.
  • The server should be able to accept connections from many sensor devices simultaneously (limit this number to 3 for the purpose of testing).
  • The server should be able to perform basic statistical analysis on the data received, including averaging instantaneous readings from multiple sensors and providing time averaging of historical readings (e.g., moving average). Limit analysis to a maximum of 10 historical values.
  • Base your assignment on the three types of environmental sensors listed above that you have chosen.

你可能感兴趣的:(java,开发语言)