Intelligent Environments

Homework 3

Due: March 14, 2002 (midnight)

For this assignment you will use CORBA again to automatically provide sensor information to a client. The client will attempt to predict the value using the nearest-neighbor prediction method discussed in class.

  1. The sensor information your server will be providing is stored in the file /tmp/IE_sensor_info on gamma2.uta.edu. This file is updated every second with the current timestamp and sensor value. The sensor value follows a particular pattern based on the time of day.

  2. Implement a CORBA IDL and server for this sensor. Your sensor object should support the delivery of the sensor value and time stamp via a periodic callback, which your client will initiate. Look here for an example.

  3. Implement a CORBA client for your sensor server. The client will have several functions.

    1. The client executable will take as an argument the name of a file from which it will read previously-collected sensor information. The file format will be the same as the /tmp/IE_sensor_info file, one timestamp and sensor value per line. A file with three days worth of information is available on gamma2 in the file /public/cse/holder/6362/hw3/sensor_data.

    2. Upon startup, the client will initiate the callback with the server and begin receiving sensor information. With each sensor value and time stamp received, the client will also predict what the sensor value would be for the same time stamp. The client will output the time stamp, the actual value, the predicted value, and the difference between the two.

    3. The prediction will be obtained by using a k-nearest-neighbor algorithm, as discussed in class, where k=5. So, for each prediction, the client will find the five nearest (in time) neighbors from the data read in intially, and predict the mean of the five. The prediction should be to at least 6 decimal places.

  4. Implement your CORBA IDL, server and client according to the Coding Standard. Use a Makefile to support easy compilation. Package everything up according to the Assignment Turn-In Information and email to holder@cse.uta.edu by the above deadline.