Home Appliance Control System

advertisement

Home Appliance Control System

Design Specification: Phase 1

10/12/2006

Team 4:

Arjun Sambamoorthy

Anuradha Dhawan

Chandan Mahalingappa

Karthikkumar Annamalai

Praabhu Kannappan

TABLE OF CONTENTS

1.

INTRODUCTION

1.1

Purpose

1.2

Scope

1.3

Assumption

1.4

Appliances and Functions

2.

USE CASE DIAGRAM

2.1

Introduction

2.2

HACS Use Case Diagram

2.3

Explanation of Use Case Diagram

3.

SEQUENCE DIAGRAM

3.1

Introduction

3.2

Sequence Diagram for Login

3.3

Sequence Diagram for Microwave

3.4

Sequence Diagram for Electric Stove

3.5

Sequence Diagram for TV/VCR

3.6

Sequence Diagram for Add/Remove Device

3.7

Sequence Diagram for Fire Alarm

3.8

Sequence Diagram for Home Security

4.

CRC CARDS

4.1

Introduction

4.2

CRC Card for Login

4.3

CRC Card for HACS

4.4

CRC Card for Microwave

4.5

CRC Card for TV/VCR

4.6

CRC Card for Home Security

4.7

CRC Card for Fire Alarm

5.

CLASS DIAGRAM

5.1

Introduction

5.2

Class Diagram for HACS

5.3

Class Diagram Description

13

13

13

14

14

15

15

16

17

17

17

18

7

8

9

10

6

6

6

11

12

4

4

4

5

3

3

3

3

3

1.

INTRODUCTION

1.1.

Purpose

HACS 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 functions

1.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,

Setting the temperature

Turn off the stove

Turn on the stove

1.4.3.

TV / VCR

The functions for TV/VCR are,

Turn off the device

Turn on the device

Setting the Timer

1.4.4.

Home security system

The 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 alarm

The 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 DIAGRAM

2.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.

add/remove devices

microwave options

Home Owner

TV,VCR options

<<include>>

<<include>>

<<include>>

<<include>>

Hard Ware

Fire Alarm Monitoring

<<include>>

<<include>>

<<include>>

Electric stove options login

Fire Dept

Home Security system options police dept

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.

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 DIAGRAM

3.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 login

Figure 1.2 shows the sequence diagram for login

:HACS s/m

: Home Owner

1: enter usrname & passwd

:Login

2: send username & passwd

3: authenticate

4: Ack

5: access

Figure 1.2 Sequence diagram for login

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 microwave

Figure 1.3 shows the sequence diagram for microwave

HACS s/m

Micro wave

: Home Owner

1: select microwave

2: check status

3: return status

4: display status

5: display options

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

Figure 1.3 Sequence diagram for microwave

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 Stove

Figure 1.4 shows the sequence diagram for electric stove

: Home Owner

1: select electric stove

:HACS s/m :Electric stove

2: check status

3: return status

4: Display status

5: Display options

6: select options : turn on/off/temperature

7: enter value turn on/off/temperature

8: set value

9: update value

10: ack

11: display result

Figure 1.4 Sequence diagram for electric stove

Flow of events:

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/VCR

Figure 1.5 shows the sequence diagram for TV/VCR

:HACS s/m

:TV/VCR

: Home Owner

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.

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 devices

Figure 1.5 shows the sequence diagram for Add/Remove devices

:HACS s/m

: Home Owner

1: request to add/remove device

2: checks possiblity

3: add/remove device

4: Notify hardware

: Hard Ware

5: Update

6: Return status

7: updates

8: change menu options

9: display result

Figure 1.6 Sequence diagram for Add/Remove devices

Flow of events:

The user selects the Add/remove device option

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 alarm

Figure 1.6 shows the sequence diagram for fire alarm

:HACS s/m : Fire Alarm

: Hard Ware

1: Monitor

: Fire Dept

2: Return Signal

: Home Owner

3: Notify Firedept

4: Notify HACS

5: Display warning

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.

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 system

Figure 1.6 shows the sequence diagram for fire alarm

: Home Owner

1: select Home Security

:HACS s/m

2: Check Status

: Home

Security

3: Return Status

4: Display status

5: Select turn on/off

6: Set Value

11: Notify Warning

: Hard Ware

7: Update

8: Monitor

9: Return Signal

10: Notify Police

12: Display warning

: police dept

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.

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

Login

Responsibilities

Get the username and password from the user

Send Username and

Password to system

Collaboration

HACS

Figure 1.8 CRC for login

4.3.

HACS

HACS

Responsibilities

Authenticates username/password

Helps the user to select the appliance by displaying the menu

Check the status

Display the Status

Helps the user to add/remove device

Interacts with appliances

Collaboration

Appliance

Figure 1.9 CRC for HACS

4.4.

Microwave

Microwave

Responsibilities

Interacts with HACS

Set the clock, schedule, temperature and timer values

Start cooking at the scheduled time

Inform the HACS when temperature crosses threshold value

Figure 1.10 CRC for Microwave

Collaboration

HACS

4.5.

TV / VCR

TV/VCR

Responsibilities

Set the parameter for time

Return status to HACS

Interacts with HACS

Collaboration

HACS

Figure 1.11 CRC for TV/VCR

4.6.

Home security system

Home Security System

Responsibilities Collaboration

HACS Return status to HACS

Interacts with HACS

Ask the hardware to monitor for burglary

Receive signal from

Hardware

Notify police and user in case of burglary

Figure 1.12 CRC for Home Security System

4.7.

Fire alarm

Fire Alarm

Responsibilities

Interacts with HACS

Ask the hardware to monitor for fire

Receive signal from the hardware

Notify fire service and user on fire

Figure 1.13 CRC for Microwave

Collaboration

HACS

5.

CLASS DIAGRAM

5.1.

Introduction

Class diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling objectoriented 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 HACS

Figure 1.14 shows the class diagram for HACS

Figure 1.14 Class Diagram for HACS

5.3.

Class Diagram description

Login

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

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.

Appliance

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 :

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 :

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 :

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:

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:

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:

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.

Download