Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


smart home compass

No description

alexf4 k

on 29 April 2010

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of smart home compass

Objective Design Approach Implementation Compass Project Create a backbone for location services in the smart home via the OSGI service system. Class Outline Use of Service-Oriented Architecture This is how the Smart Home is designed
We are passing messages to eachother
Want to allow other services to use this backbone Two classes
Activator Class
Runner Class
Use of Agile Method
Used Mac to do programing
Implemted on production machine
No use of VM Code
package compas;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;

import edu.iastate.sh.services.rfid.RFIDService;

public class Activator implements BundleActivator{
public static BundleContext bc = null;

runner myRfid = null;

public void start(BundleContext bc) throws Exception{
System.out.println("RFID Bundle stating...");
Activator.bc = bc;
myRfid = new runner();

public void stop(BundleContext bc) throws Exception{
System.out.println("Bundle stopping...");
Activator.bc = null;
this.myRfid = null;
} package compas;

import javax.media.j3d.Sensor;

import sh.sensors.*;
import com.phidgets.*;
import com.phidgets.event.*;

public class runner {

node head;

public class node{
node next;
String location;
boolean active;

next = null;
active = false;

* @param args
public static void main(String[] args) throws Exception {
new runner();

// TODO Auto-generated method stub

public runner(){

node kitchen = new node();

node bedroom = new node();

kitchen.location = "kitchen";
bedroom.location = "bedroom";

kitchen.next = bedroom;

head = kitchen;

Sensor s = new Sensor("rfid");

if(s.getCurrentSensorRead() == "five")
kitchen.active = true;
else if(s.getCurrentSensorRead() == "six")
bedroom.active = true;

System.out.println("Success ");

public String findCurrentLocation()
node temp = head;
while(temp.next!= null)
return temp.location;
temp = temp.next;


public void setDeactivateAll(node temp)

node starter = head;

while(starter.next!= null)
if(starter.location != temp.location)
starter.active = false;
starter = starter.next;



Inner node class
Each node represents a room
Full transcript