PhoneApp for CAT

[Overview] [Requirements] [Download Instructions] [Installation] [Compiling] [Running] [How to Use]  [CAT Homepage]

 

Overview

 

 

PhoneApp, for CAT, is a simple application for testing CAT.  This application uses both physical and soft sensors, utilizes the special interest groups (SIGs), and depends on the history database for storing and predicting sensor data.  This simple application has a soft sensor/service that relies on light and sound sensors in order to determine the agents availability.  The agents availability is then shared with other agents via the CAT SIGs.  The availability sensor data is also stored in a history database, so that agents can predict whether an agent will be available sometime in the future.

 

 

 

CAT requires java JRE 1.4.0 to run, and J2SE SDK 1.4.0 to compile.  You can obtain these here.

 

To test CAT applications, we strongly recommend iSIM, which is a simulation environment for running wearable context aware application.  You can learn about and download iSIM here.

 

(Optional) iSIM and CAT also include files for compiling and running with Apache's Ant.  You can download Ant here

 

Download Instructions

 

 

For complete running of CAT applications you will want to download both CAT and the simulation environment iSIM: 

  • iSIM consists of the simulation environment.  Source code and documentation are included.  Version 3 is recommended for the PhoneApp application.  Download here.

  • CAT consists of the middleware architecture and several sample applications.  Source code and documentation are included.  Download here.  

 

 

For Windows  

              Once you have downloaded the required zip files, unzip them with a zip utility such as WinZip or PKZip.

              Proceed the by unzipping the files into a folder of your choice.

 

For Unix:

             Once you have downloaded the required zip files, open a terminal and type the following line:

                       unzip CAT.zip [-d dir]

             You can optionally use the -d argument to send the unzipped files to a directory of your choice.

 

 

For Windows:  

             Open a command prompt in the CAT directory and type compile, or double-click on compile.bat

 

For Unix:

             Open a terminal window, go to your CAT folder and type compile.sh. (may not be included)

 

Using Ant:

             From the CAT directory, open a command window and type: 

         ant compile 

             or for a clean compile:

         ant recompile

 

For Windows:  

             Open a command prompt in the CAT directory and type run, or double-click on run.bat

 

For Unix:

             Open a terminal window, go to your CAT folder and type run.sh.

 

For more information on how to run the PhoneApp application please see the following section.

 

     

For testing the PhoneApp you should first have iSIM running as in Figure 1.  In iSIM you will want to create a user agent for every instance of CAT that you will run.  iSIM will thus simulate context for the instances of CAT, and will facilitate all forms of communication between instances of CAT.  When creating the user agents in iSIM, you only need to make sure that the user port corresponds to the port in the instance of CAT.

Figure 1. The iSIM agents corresponding to CAT instances.

When you first start PhoneApp, it will join a global SIG with all agents that it can.  Then, PhoneApp will display the availability of all agents based on the availability soft sensor that all agents share as in Figure 2.   


Figure 2. The PhoneApp screen shows the agents are available and those that are not.

An agents availability is determine by various physical sensors, such as light and sound levels.  An agent's availability as in Figure 3 can then be changed by changing the sensor data in iSIM that is sent to CAT as seen in Figure 4.

                          
Figure 3. PhoneApp screen.                            Figure 4.  iSIM can be used to change the sensor data.     

 

Alice can then make a phone call to any available agent as seen in Figure 5.  Cathy receives a phone call from Alice in Figure 6

                                                     
Figure 5. Alice makes a phone call to Cathy.                         Figure 6. Cathy gets an incoming phone call.

 

When Cathy's PhoneApp receives an incoming phone call from Alice, it will access a history database and will try to predict Alice's future availability.  If Alice is predicted to be available in 30 minutes, then PhoneApp will notify Cathy that she can call back later if she want to as in Figure 7.  If Alice is predicted to be unavailable in 30 minutes, then PhoneApp will advise Cathy to that she should take the phone call now as in Figure 8.

                                                           
Figure 7. PhoneApp decides that Cathy can call back later.         Figure 8. Cathy should take the phone call now.