team_4 home fire and security alarm monitoring system

30
Home Appliance Control System Design Specification: Phase 1 10/12/2006 Team 4: Arjun Sambamoorthy Anuradha Dhawan Chandan Mahalingappa Karthikkumar Annamalai Praabhu Kannappan

Upload: kwang-su-wei

Post on 24-Apr-2015

228 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Team_4 Home Fire and Security Alarm Monitoring System

Home Appliance Control SystemDesign Specification: Phase 1

10/12/2006

Team 4:

Arjun SambamoorthyAnuradha DhawanChandan MahalingappaKarthikkumar AnnamalaiPraabhu Kannappan

Page 2: Team_4 Home Fire and Security Alarm Monitoring System

TABLE OF CONTENTS

1. INTRODUCTION 3 1.1 Purpose 31.2 Scope 31.3 Assumption 31.4 Appliances and Functions 3

2. USE CASE DIAGRAM 4

2.1 Introduction 42.2 HACS Use Case Diagram 42.3 Explanation of Use Case Diagram 5

3. SEQUENCE DIAGRAM 6

3.1 Introduction 63.2 Sequence Diagram for Login 63.3 Sequence Diagram for Microwave 73.4 Sequence Diagram for Electric Stove 83.5 Sequence Diagram for TV/VCR 93.6 Sequence Diagram for Add/Remove Device 103.7 Sequence Diagram for Fire Alarm 113.8 Sequence Diagram for Home Security 12

4. CRC CARDS 13

4.1 Introduction 134.2 CRC Card for Login 134.3 CRC Card for HACS 144.4 CRC Card for Microwave 144.5 CRC Card for TV/VCR 154.6 CRC Card for Home Security 154.7 CRC Card for Fire Alarm 16

5. CLASS DIAGRAM 175.1 Introduction 175.2 Class Diagram for HACS 175.3 Class Diagram Description 18

Page 3: Team_4 Home Fire and Security Alarm Monitoring System

1. INTRODUCTION

1.1. PurposeHACS is a system controlled by a remote system such as mobile phone or palmtop and at the same time controls, monitors and co-ordinates home appliances microwave, TV/VCR, Bath tub controller, home security, Air conditioner etc.The document furnishes the detailed design with all the UML diagrams. It encompasses CRC cards, Use Case Diagrams, Sequence Diagrams and Class Diagrams for home appliance control system (HACS).

1.2. Scope

The project focuses on five types of home appliances—Microwave, Electric Stove, TV/VCR, Home Security System and Fire Alarm.

The user is allowed to add/remove device. The system is composed of HACS controller and individual devices. The central controller handles communication between appliances through

hardware interface and interaction with user interfaces. The system allows multiple users to login at the same time.

1.3. Assumption

The HACS model is constrained by the following assumptions.

This project will provide only a virtual simulation of the HACS system The hardware interface handles proper communication between HACS controller

and the respective devices. The implementation of this hardware is beyond scope. New devices can be added or existing devices can be removed with no hiccups. There is a dedicated controller (link) for the HACS interface.

1.4. Appliances and functions1.4.1. Microwave

The functions for microwave are, Turn on the device Turn off the device Setting the temperature Setting the timer Setting the clock Scheduling the timer

1.4.2. Electric stove The functions for electric stove are,

Page 4: Team_4 Home Fire and Security Alarm Monitoring System

Setting the temperature Turn off the stove Turn on the stove

1.4.3. TV / VCRThe functions for TV/VCR are,

Turn off the device Turn on the device Setting the Timer

1.4.4. Home security systemThe functions for Home Security are,

Notify the Police department in case of breakage Notify the User in case of breakage Monitor the hardware for signals

1.4.5. Fire alarmThe functions for Fire Alarm system are,

Notify the fire department in case of fire Notify the user in case of fire Monitor the hardware for signals

2. USE CASE DIAGRAM2.1. Introduction

Use case diagram shows a set of use cases and actors (a special kind of class) and their relationships. You apply use case diagrams to illustrate the static view of a system. Use case diagrams are especially important in organizing and modeling the behaviors of a system.

2.2. HACS use case diagram: Figure 1.1 shows an overall view of the HACS system.

Page 5: Team_4 Home Fire and Security Alarm Monitoring System

login

Home Owner

police dept

Fire Dept

microwave options<<include>>

TV,VCR options

<<include>>

Fire Alarm Monitoring

<<include>>

Electric stove options

<<include>> <<include>>

Home Security system options

<<include>>

add/remove devices

<<include>>

Hard Ware

Figure 1.1 HACS System Use case diagram

2.3. Explanation of use case diagrams Login:

The login will get the user name and the password for the HACS system. Add/remove devices:

After logging into the HACS system the user can add/remove any number of devices.

Microwave options:The microwave options enable a user to set values to microwave, like set

the temperature to heat a food stuff etc.

Page 6: Team_4 Home Fire and Security Alarm Monitoring System

TV/VCR options:The TV/VCR options enable a user to set values to the TV, like when the

television should be turned off.

Electric Stove options:The electric stove options enable a user to set values to the electric stove,

like what temperature should be maintained.

Home Security options:The home security options enable a user to either turn on or turn off the

home security device.

3. SEQUENCE DIAGRAM3.1. Introduction

A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. A sequence diagram shows a set of roles and the messages sent and received by the instances playing the roles. You use sequence diagrams to illustrate the dynamic view of a system.

3.2. Sequence diagram for loginFigure 1.2 shows the sequence diagram for login

: Home Owner

:Login :HACS s/m

1: enter usrname & passwd

5: access

2: send username & passwd

3: authenticate

4: Ack

Figure 1.2 Sequence diagram for login

Page 7: Team_4 Home Fire and Security Alarm Monitoring System

Flow of events: The user should enter the user name and the password to log into the HACS

system. The user name and the password will be sent to the HACS system. The HACS system will authenticate whether the user is a valid user or not. Once the HACS system confirms that the user is a valid user it acknowledges the

user. Now the user can access the HACS system.

3.3. Sequence diagram for microwaveFigure 1.3 shows the sequence diagram for microwave

: Home Owner

HACS s/mMicro wave

1: select microwave

2: check status

3: return status

4: display status

6: select options : turn on/off/timer/clock/schedule

7: enter value turn on/off/timer/clock/schedule

8: set value

9: update

10: ack

11: display result

5: display options

Figure 1.3 Sequence diagram for microwave

Page 8: Team_4 Home Fire and Security Alarm Monitoring System

Flow of events: The user selects the microwave device. The HACS system will check the status of the appliance The Microwave responds back to the HACS system with the status. The HACS system will now display the status of the device The HACS system will display the menu options that the user can select. The user selects the option that he wants to change. The user then enters the value for the selected option. The HACS system will set the value to the microwave. The microwave will update the values set by the user The microwave acknowledges the HACS system after updating the values. The HACS system would display the result.

3.4. Sequence diagram for Electric StoveFigure 1.4 shows the sequence diagram for electric stove

: Home Owner:HACS s/m :Electric

stove

1: select electric stove

2: check status

3: return status

4: Display status

6: select options : turn on/off/temperature

8: set value

9: update value

10: ack

11: display result

7: enter value turn on/off/temperature

5: Display options

Figure 1.4 Sequence diagram for electric stove

Flow of events:

Page 9: Team_4 Home Fire and Security Alarm Monitoring System

The user selects the electric stove device. The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status. The HACS system will now display the status of the device The HACS system will display the menu options that the user can select. The user selects the option that he wants to change. The user then enters the value for the selected option. The HACS system will set the value to the electric stove. The electric stove will update the values set by the user The electric stove acknowledges the HACS system after updating the

values. The HACS system would display the result.

3.5. Sequence diagram for TV/VCRFigure 1.5 shows the sequence diagram for TV/VCR

: Home Owner

:HACS s/m :TV/VCR

1: Select TV/VCR

2: Check status

3: Return Status

4: Display Status and menu

5: Select Turn on/off/timer

6: Set Values

7: Update

8: ACK

9: Display result

Figure 1.5 Sequence diagram for TV/VCR

Flow of events: The user selects the TV/VCR device.

Page 10: Team_4 Home Fire and Security Alarm Monitoring System

The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status. The HACS system will now display the status and menu options of the

device. The user selects the option that he wants to change. The HACS system will set the value to the electric stove. The electric stove will update the values set by the user The electric stove acknowledges the HACS system after updating the

values. The HACS system would display the result.

3.6. Sequence diagram for Add/Remove devicesFigure 1.5 shows the sequence diagram for Add/Remove devices

: Home Owner:HACS s/m

: Hard Ware

1: request to add/remove device

2: checks possiblity

7: updates

8: change menu options

3: add/remove device

9: display result

4: Notify hardware

5: Update

6: Return status

Figure 1.6 Sequence diagram for Add/Remove devices

Flow of events: The user selects the Add/remove device option

Page 11: Team_4 Home Fire and Security Alarm Monitoring System

The HACS system will check the possibility to add/remove the device. The HACS system will now add/remove the device. The HACS system will notify the Hardware about the changes made. The hardware updates the addition or removal of the device. The hardware returns the status to the HACS system. The HACS system will update the changes made. The HACS system will change the menu options The HACS system will now display the result to the user.

3.7. Sequence diagram for fire alarmFigure 1.6 shows the sequence diagram for fire alarm

: Home Owner

:HACS s/m : Fire Alarm : Hard Ware

: Fire Dept

5: Display warning

1: Monitor

2: Return Signal

3: Notify Firedept

4: Notify HACS

Figure 1.6 Sequence diagram for Add/Remove devices

Flow of events: The Fire alarm will ask the hardware to monitor for fire. The hardware returns a signal to the fire alarm in case of fire.

Page 12: Team_4 Home Fire and Security Alarm Monitoring System

The Fire alarm will notify the fire department. The fire alarm will notify the HACS system. The HACS system will display the warning message to the user.

3.8. Sequence diagram for home security systemFigure 1.6 shows the sequence diagram for fire alarm

: Home Owner:HACS s/m

: Hard Ware

: Home Security

: police dept

1: select Home Security

4: Display status

5: Select turn on/off

12: Display warning

2: Check Status

3: Return Status

6: Set Value

11: Notify Warning

7: Update

8: Monitor

9: Return Signal

10: Notify Police

Figure 1.7 Sequence diagram for Home Security system

Flow of events: The user selects the Home Security device. The HACS system will check the status of the appliance The electric stove responds back to the HACS system with the status.

Page 13: Team_4 Home Fire and Security Alarm Monitoring System

The HACS system will now display the status of the device The user then enters the value for the selected option. The HACS system will set the value to the electric stove. The home security will update the values set by the user If the set value is ‘on’ then the home security system will ask the hardware

to monitor. The hardware will return a signal to the home security in case of burglary. The home security system will notify the police. The home security system will notify the HACS system The HACS system will display the warning message to the user.

4. CRC CARDS

4.1. Introduction The Class Responsibility Collaboration Cards gives the responsibilities of each and every class that are included and their collaboration with the other classes that are available in the system.

4.2. Login

Figure 1.8 CRC for login

4.3. HACS

Login

Responsibilities Collaboration

Get the username and password from the userSend Username and Password to system

HACS

Page 14: Team_4 Home Fire and Security Alarm Monitoring System

Figure 1.9 CRC for HACS

4.4. Microwave

Figure 1.10 CRC for Microwave

4.5. TV / VCR

HACS

Responsibilities Collaboration

Authenticates username/passwordHelps the user to select the appliance by displaying the menuCheck the statusDisplay the StatusHelps the user to add/remove deviceInteracts with appliances

Appliance

Microwave

Responsibilities Collaboration

Interacts with HACSSet the clock, schedule, temperature and timer valuesStart cooking at the scheduled timeInform the HACS when temperature crosses threshold value

HACS

Page 15: Team_4 Home Fire and Security Alarm Monitoring System

Figure 1.11 CRC for TV/VCR

4.6. Home security system

Figure 1.12 CRC for Home Security System

4.7. Fire alarm

TV/VCR

Responsibilities Collaboration

Set the parameter for timeReturn status to HACSInteracts with HACS

HACS

Home Security System

Responsibilities Collaboration

Return status to HACSInteracts with HACS Ask the hardware to monitor for burglaryReceive signal from HardwareNotify police and user in case of burglary

HACS

Page 16: Team_4 Home Fire and Security Alarm Monitoring System

Figure 1.13 CRC for Microwave

5. CLASS DIAGRAM

Fire Alarm

Responsibilities Collaboration

Interacts with HACS Ask the hardware to monitor for fireReceive signal from the hardwareNotify fire service and user on fire

HACS

Page 17: Team_4 Home Fire and Security Alarm Monitoring System

5.1. IntroductionClass diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling object-oriented systems. Class diagrams address the static design view of a system. Class diagrams that include active classes address the static process view of a system. Component diagrams are variants of class diagrams.

5.2. Class Diagram for HACSFigure 1.14 shows the class diagram for HACS

Micro Wavetimerclocktemperature

setTimer()setClock()setTemperature()setSchedule()turnOn()turnOff()

Electric stovetemperature

setTemperature()turnOn()turnOff()

TV/VCRtimer

setTimer()turnOn()turnOff()

Home Security

notifyDepartment()monitor()receiveSignal()notifyUser()turnOn()turnOff()

Fire Alarm

monitor()receiveSignal()notifyDepartment()notifyUser()turnOn()turnOff()

Inotify

signaldeptName

deptPhoneNo

notifyUser()monitor()

notifyDepartment()

Loginusrnamepasswd

enterUsername()ernterPasswd()

AppliancedeviceNamestatus

turnOn()turnOff()checkStatus()displayStatus()

HACS s/mapplianceNameusernamepasswd

displayMenu()selectDevice()add/removeDevice()authenticate()createNewUser()changePasswd()

1* 1

+access

*

*

1

*

1

<<realize>>

<<realize>>

Figure 1.14 Class Diagram for HACS

Page 18: Team_4 Home Fire and Security Alarm Monitoring System

5.3. Class Diagram description

Login

Loginusrnamepasswd

enterUsername()ernterPasswd()

Figure 1.15 Class for Login

The login class has attributes username and password enter username() – Gets username from user enter passwd() – Gets password from user

HACS S/m

HACS s/mapplianceNameusernamepasswd

displayMenu()selectDevice()add/removeDevice()authenticate()createNewUser()changePasswd()

Figure 1.15 Class for HACS s/m

Has attributes Appliance Name, Username and password displayMenu() – Displays the menu to the user on the PDA/Mobile selectDevice() – The user is allowed to select a particular device he wants to

operate. add/removeDevice() – User is allowed to add a new device or remove the existing

device. authenticate() – this method authenticates username and password entered by

user. createNewUser() – A user can signup to use the HACS system changePasswd() – User is allowed to change the existing password.

Page 19: Team_4 Home Fire and Security Alarm Monitoring System

Appliance

AppliancedeviceNamestatus

turnOn()turnOff()checkStatus()displayStatus()

Figure 1.15 Class for Appliance

Has attributes device name and status turnOn() – This is an abstract method, implementation is done in the subclass. turnoff() – This is an abstract method, implementation is done in the subclass. checkStatus() – It will check the status of every appliance . displayStatus() – Displays the status checked to the user.

Electric Stove:

Electric stovetemperature

setTemperature()turnOn()turnOff()

Figure 1.15 Class for Electric Stove

Has the attribute temperature. setTemperature() – Sets the temperature for cooking turnOn() – turns on the device. turnoff() – turns off the device.

Microwave:

Page 20: Team_4 Home Fire and Security Alarm Monitoring System

Micro Wavetimerclocktemperature

setTimer()setClock()setTemperature()setSchedule()turnOn()turnOff()

Figure 1.15 Class for Microwave

Has the attributes timer, clock and temperature. setTimer() – Sets the timer. setClock() – Sets the clock for cooking. setTemperature() – Sets the temperature for heating. setSchedule() – schedules the time for cooking. turnOn() – turns on the device. TurnOff() – turns off the device.

TV/VCR:

TV/VCRtimer

setTimer()turnOn()turnOff()

Figure 1.15 Class for TV/VCR

Has the attribute timer. setTimer() – Sets the time for turning on or turning off TV/VCR. turnOn() – turns on TV/VCR. turnOff() – turns off TV/VCR.

Interface Inotify:

Page 21: Team_4 Home Fire and Security Alarm Monitoring System

Inotify

signaldeptName

deptPhoneNo

notifyUser()monitor()

notifyDepartment()

Figure 1.15 Interface Class for Inotify

Has the attributes signal, deptName and deptPhoneNo. Abstract methods specified here are,

1. notifyUser()2. monitor()3. notifyDepartment()

Home Security:

Home Security

notifyDepartment()monitor()receiveSignal()notifyUser()turnOn()turnOff()

Figure 1.15 Class for Home Security

notifyDepartment() – It notifies the police department in case of breakage. monitor() – will request the hardware to monitor. receiveSignal() – receives the signal for the hardware. notifyUser() – notifies the user in case of breakage. turnOn() – turns on the device. turnOff() – turns off the device.

Fire Alarm:

Page 22: Team_4 Home Fire and Security Alarm Monitoring System

Fire Alarm

monitor()receiveSignal()notifyDepartment()notifyUser()turnOn()turnOff()

Figure 1.15 Class for Fire Alarm

monitor() – will request the hardware to monitor. receiveSignal() – receives the signal for the hardware notifyDepartment() – It notifies the police department in case of breakage. notifyUser() – notifies the user in case of breakage. turnOn() – turns on the device. turnOff() – turns off the device.