You are on page 1of 22

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 3 3 3 3 3 4 4 4 5 6 6 6 7 8 9 10 11 12 13 13 13 14 14 15 15 16 17 17 17 18

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

a dd /re m o ve de vices

m icrow a ve o p tio ns
< < inc lude> >

< < inc lude> >

Ho m e O w ne r

TV ,V C R o p tions
< < inc lude> > < < inc lude> >

Ha rd W a re

F ire A la rm M o nito ring


< < inc lude> > < < inc lude> >

lo gin

< < inc lude> >

E le ctric sto ve o ptio ns

F ire D ep t

Hom e S ecurity syste m op tio ns

po lice de p t

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

:Login : Home Owner 1: enter usrname & passwd

:HACS s/m

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 : Home Owner

Micro wave

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/tem perature 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 : Home Owner 1: Select TV/VCR 2: Check status 3: Return Status 4: Display Status and menu

:TV/VCR

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

:H C s A S /m :H m O n r o e we

1 re u s toa d m v d v e : qet d /re o e e ic

2 c e k p s ib : h c s o s lity

3 a d mv d v e : d /re o e e ic : H rdW re a a 4 N tifyh rd a : o a w re

5 U d te : pa

6 R tu s tu : e rn ta s

7 u d te : pa s

8 c a g m n o tio s : hne eu p n

9 d p yre u : is la s lt

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

:H A C S s /m

: F ire A la rm : H a rd W a re

1 : M o n ito r

: F ire D e p t 2 : R e tu rn S ig n a l

: H o m e O w ne r 3 : N o ti fy F ire d e p t

4 : N o ti fy H A C S 5 : D is p la y w a rn i n g

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

:HACS s/m

: Home Security

1: select Home Security 2: Check Status

3: Return Status

4: Display status

5: Select turn on/off 6: Set Value

: Hard Ware 7: Update : police dept 8: Monitor

9: Return Signal

10: Notify Police 11: Notify Warning 12: Display warning

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
Figure 1.9 CRC for HACS

Collaboration
Appliance

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

Collaboration HACS

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

HACS s/m Login


usrname passwd enterUsername() ernterPasswd() * applianceName username passwd

+access
1

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

Electric stove
temperature setTemperature() turnOn() turnOff()

Appliance deviceName status turnOn() turnOff() checkStatus() displayStatus() Fire Alarm Home Security TV/VCR
timer setTimer() turnOn() turnOff() notifyDepartment() monitor() receiveSignal() notifyUser() turnOn() turnOff() <<realize>> monitor() receiveSignal() notifyDepartment() notifyUser() turnOn() turnOff() <<realize>>

Micro Wave
timer clock temperature setTimer() setClock() setTemperature() setSchedule() turnOn() turnOff()

Inotify
signal deptName deptPhoneNo notifyUser() monitor() notifyDepartment()

Figure 1.14 Class Diagram for HACS

5.3. Class Diagram description Login Login


usrname passwd 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/m


applianceName username passwd 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.

Appliance Appliance deviceName status 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 stove
temperature 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: Micro Wave


timer clock temperature setTimer() setClock() setTemperature() setSchedule() turnOn() turnOff()
Figure 1.15 Class for Microwave

TV/VCR:

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
timer 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:

Inotify
signal deptName 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: 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.

You might also like