Wednesday, May 30, 2007

Status Report for 05/16/2007 -- 05/30/2007

Progress

Detail design for IUMSC 12 sensors Atom Feed

1. Register IUMSC 12 sensors

Before reading all the sensor values from the real proxy box in the IUMSC lab, send requests to register all the sensors with CIMA service endpoint (http://129.79.85.21:7710). Sensor names and meanings are shown below.

  • LabCWOutTemp Lab Chill water OUT
  • LabCWInTemp Lab Chill water IN
  • CampCWInTemp Campus Chill water IN
  • LN2Levl Liquid Nitrogen level indicator
  • Bay1Temp Bay1 Temperature
  • Bay1Humid Bay1 Humidity
  • DETemp Diffractometer Enclosure Temperature
  • DEHumid Diffractometer Enclosure Humidity
  • CrystalTemp Crystal Temperature
  • FrameBuffer_D_Usage Disk Usage Disk D
  • FrameBuffer_E_Usage Disk Usage Disk E
  • FrameBuffer_F_Usage Disk Usage Disk F

Note: The sensor value used before was from test-proxy box (CIMA service endpoint (http://129.79.85.20:7710)) with only two probes (Bay1Temp & LabCWOutTemp) connected to it.

2. Write data to the feed

Part1: Read the parcel into DOM

Get a Parser and parse the parcel

Part2: Update/Append feed

If no feed exists, create the "feed" part of the feed including the following elements: Author, Id, Title and Link and Updated;

Otherwise add an Entry to the feed

If no entry in the feed, create basic elements for the entry including the following elements : Author, Title, Id and Updated

Otherwise get the existing entry handle(there should be only one entry) in the feed

Get the current content in the Content

Set the receiving data to the Content

3. Read feed

Open http://www.netvibes.com/, add the URL of IUMSC Atom Feed(http://hagar.cs.indiana.edu:8181//IUMSCAtomFeed.xml) to netvibes

4. IUMSC Atom Feed in netvibes

The screen shot below shows the Atom Feed in netvibes.


Discussion & Questions

1. The data from 12 sensors come in at different times, that is to say, sometimes nothing comes during 10 to 15 seconds while sometimes data from some sensors come almost at the same time. This might cause that some data might be left out

-- I need to provide file locking function by using the FileLock class before updating, then unlock. Or make the routine that writes the feed "synchronized" or put the feed updating statements in a synchronized block(not as desirable as a synchronized routine).

2. In netvibes, after refreshing the current webpage, new data don’t come, only the old data were shown.

-- I kept clicking the fresh button in the feed area, but it did not work

Future work

1. Get sensor values based on the user’s requirement;

2. Show only values not in normal range;

3. Adjust feed format;

4. The issues described in Discussion section

No comments: