2 HACS – System Architecture Diagram

advertisement
Home Appliance Control System
Use Case - Sequence - Class Diagrams
Version 0.4
CS 6359 Project
Fall 2006
Author
Sudhir V Dachepalli
Professor
Dr.Lawrence Chung
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
Revision History
Name
Date
Reason For Changes
Version
Sudhir Dachepalli
Sep 20 2006
Initial Draft
0.1
Sudhir Dachepalli
Sep 25 2006
Section 3,4,5,6 , Appendix C
0.2
Sudhir Dachepalli
Sep 27 2006
Class Diagram, Use case Diagram 0.3
Sudhir Dachepalli
Oct 09 2006
Modifications suggested by TA,
Use Case Diagrams, Class
Diagrams, Sequence Diagrams,
Assumptions
0.4
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 2 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
Table of Contents
1
Introduction ......................................................................................................................................... 4
1.1
Project Scope .............................................................................................................................. 4
1.2
Definitions, Acronyms and Abbreviations- ................................................................................ 5
1.2.1
Definitions........................................................................................................................... 5
1.2.2
Acronyms and Abbreviations ............................................................................................. 5
1.3
References ................................................................................................................................... 5
2
HACS – System Architecture Diagram .............................................................................................. 6
3
CRC Cards .......................................................................................................................................... 7
3.1
Nouns .......................................................................................................................................... 7
3.2
Verbs ........................................................................................................................................... 7
3.3
GarageDoor ................................................................................................................................. 7
3.4
ACThermostat ............................................................................................................................. 8
3.5
AVPlayer..................................................................................................................................... 8
3.6
Microwave .................................................................................................................................. 9
3.7
HACS .......................................................................................................................................... 9
3.8
Administrator ............................................................................................................................ 10
3.9
HomeUser ................................................................................................................................. 10
4
Use Cases .......................................................................................................................................... 11
4.1
Use Case Scenarios ................................................................................................................... 11
4.2
Use Case Diagrams ................................................................................................................... 12
4.2.1
System Login and HACS Operations ............................................................................... 12
4.2.2
Microwave Operations ...................................................................................................... 13
4.2.3
Garage Door Operations ................................................................................................... 14
4.2.4
AV Player Operations ....................................................................................................... 15
4.2.5
AC Thermostat Operations ............................................................................................... 16
5
Class Diagram ................................................................................................................................... 17
6
Sequence Diagrams ........................................................................................................................... 19
6.1
Auto record TV Program .......................................................................................................... 19
6.2
Set AC Thermostat .................................................................................................................... 20
6.3
Microwave – Cook Food .......................................................................................................... 21
6.4
Close Garage Door .................................................................................................................... 22
6.5
Get Overall status of the system ............................................................................................... 23
Appendix A – Assumptions ...................................................................................................................... 24
Appendix B - Student Information ........................................................................................................... 26
Appendix C – Important Dates ................................................................................................................. 26
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 3 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
1 Introduction
A home appliance control system (HACS) is a system which is controlled by a remote system such as a
mobile phone or a palm-top, and at the same time controls, monitors and coordinates home appliances
such as air conditioner, microwave oven, garage doors, TV set, VCR, audio controller, indoor/outdoor
lights, water sprinkler, home security system, bath tub controller, etc.
The intention of this project is to use Object Oriented Analysis Design (OOAD) techniques to design
HACS system.
The project is split into two phases:
1. First Phase of the project should produce use case diagrams, class diagrams, and sequence
diagrams for a home appliance control system (HACS). For the analysis phase CRC cards
mechanism should be used as an aid.
2. Second Phase of the project description as of September 20th 2006 is not yet posted on the course
website. (Refer [1] for updates)
1.1
Project Scope
Analysis should consider at least three different kinds of home appliances.
For the scope of this Analysis and Design, following Home Appliances are considered:

AC Thermostat

Microwave Oven

Garage Door

Audio Video Recorder / Player
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 4 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
1.2
Definitions, Acronyms and Abbreviations1.2.1 Definitions
Expression
Meaning
Audio Video
Recorder / Player
A Tivo kind of device to record Television Programs and
Play them when desired.
Microwave Oven
A microwave oven, or microwave, is a kitchen appliance
employing microwave radiation primarily to cook or heat
food.
Thermostat
a regulator for automatically regulating temperature by starting
or stopping the supply of heat
1.2.2 Acronyms and Abbreviations
1.3
Acronym or
Abbreviation
Expansion
AC
Air Conditioning
CS
Computer Science
HACS
Home Appliance Control System
OOAD
Object Oriented Analysis and Design
PDA
Personal Digital Assistant
References
[1] Course Website http://www.utd.edu/~chung/OOAD/syllabus.htm
[2] Project Information http://www.utdallas.edu/~chung/OOAD/Project1.doc
[3] CRC Card Template
http://www.soc.napier.ac.uk/module/op/resources/moduleid/CO72006
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 5 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
2 HACS – System Architecture Diagram
Laptop
Cell Phone
PDA
Network Cloud
PDA
AC
Thermostat
Microwave
HACS
Audio Video
Recorder / Player
Garage Door
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 6 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
3 CRC Cards
3.1 Nouns
Following nouns from the Project Information[2] are considered as a starting point to identify classes.
 Remote system
o Pda
o Laptop
o Cellphone
 HACS
 AC Thermostat
 Microwave
 GarageDoor
 AudioVideo Recorder / Player
 Priority
3.2 Verbs
Following verbs from the Project Information[2] are considered as a starting point to identify
responsibilities.







Controls
Monitors
Coordinates
Automatically Adaptable
Manually Adaptable
Communication between devices
Coordination of various processes running on devices
Following are the CRC cards that I have prepared during Analysis Phase and converted them to the table
format using template [3]
3.3 GarageDoor
Class
GarageDoor
Responsibility




Collaborators
Open door
Close door
Check status ( open / close ) of garage
door.
Write time of event open door or close
door to database.
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 7 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
3.4 ACThermostat
Class
ACThermostat
Responsibility










Collaborators
Check temperature
Set temperature
Set heat or cold mode
Set auto off time and temperature
Set auto on time and temperature
Switch off AC
Switch on AC
Check status of thermostat
Alert Fire department if temperature is
more than critical
Alert User if temperature is more than
critical
3.5 AVPlayer
Class
AVPlayer
Responsibility









Collaborators
Record TV Program
Play Music CD
Play Radio
Play TV
Switch off player
Switch on player
Sleep timer to auto off
Set time for wake up alarm
Check status of the player
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 8 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
3.6 Microwave
Class
Microwave
Responsibility








Collaborators
Auto Cook with microwave preset
Fast Cook with microwave preset
Slow Cook with microwave preset
Keep the food warm
Set max temperature
Change cooking mode between auto , fast
and slow cooking modes
Switch off microwave
Check status of microwave
3.7 HACS
Class
HACS
Responsibility







Monitor devices
Control devices
Verify user login info
Set user status to athome, vacation or
notathome
Set date
Check date
Check overall system status
Collaborators
GarageDoor
ACThermostat
AVPlayer
Microwave
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 9 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
3.8 Administrator
Class
Administrator
Responsibility






Log into HACS
Add User
Delete User
Modify User
Check overall system status
Set user status
Collaborators
HACS
3.9 HomeUser
Class
HomeUser
Responsibility










Log into HACS
Cook food in fast mode
Set home temperature
Open garage door
Record tv program
Add User
Delete User
Modify User
Check overall system status
Set user status
Collaborators
HACS
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 10 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
4 Use Cases
4.1 Use Case Scenarios


Remote login to HACS
HACS
o Set user status to NotAtHome
o Set user status to AtHome
o Set user status to Vacation
 Vacation start date and time
 Vaction End date and time
o Check HACS Date and Time
o Set HACS Date and Time
o View last 10 login date, time and userid and how long they have logged in
o View last 10 failed login, and failure reasons, userid, password,ipaddress
o Check overall status of system ( RED, ORANGE, GREEN )

Air conditioner
o Check temperature
o Set temperature
o Switch Off Airconditioner
o Switch On Airconditioner
o Check status ( RED, ORANGE, GREEN )

Microwave
o AutoCook
o FastCook
o Slow Cook
o Keep Warm
o Set max temperature
o Change cooking mode
o Switch off microwave
o Check status ( RED, ORANGE, GREEN )

Garage Door
o Open Garage Door
o Close Garage Door
o Check status ( RED, ORANGE, GREEN )

Audio Video Recorder / Player
o Switch off the unit
o Switch on the unit
o Play Music CD
o Play TV
o Play Radio
o Record TV Program
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 11 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
o
o
o
o
Check status ( RED, ORANGE, GREEN )
Sleep timer to turn off automatically
Set Wakeup Alarm
Stop Player
4.2 Use Case Diagrams
4.2.1 System Login and HACS Operations
Following diagram shows a subset of use cases that are performed by Home User or System
administrator after they are successfully logged into the HACS. “ShowMenu” is only shown after a
successful login operation.
te
n
ds
>>
Home Appliance Control System
ShowMenu
<<
ex
Login to HACS
Modify User
hacsAdministrator
<<uses>>
Add User
<<uses>>
Delete User
<<uses>>
hacsUser
Check System Status
es
<<us
>>
Validate User login
homeUser
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 12 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
4.2.2 Microwave Operations
Following diagram shows a subset of use cases that are performed by Home User after they are
successfully logged into the HACS and select the Microwave operations menu.
hacsUser
homeUser
Select Microwave
Options
e
<<
n
xte
ds
>>
Validate User login
Cook Food in Fast
Mode
HACS
te
n
<<
ex
Cook Food in Auto
Mode
ds
>>
Cook Food in Slow
Mode
Keep food warm
e
<<
nd
xte
>
s>
e
<<
n
xte
>>
ds
set max temperature
change cooking mode
Keep food warm
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 13 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
4.2.3 Garage Door Operations
Following diagram shows a subset of use cases that are performed by Home User after they are
successfully logged into the HACS and select the Garage Door operations menu.
hacsUser
Select Garage Door
Options
e
<<
n
xte
ds
>>
Validate User login
homeUser
Open Garage Door
Close Garage Door
HACS
Check Status
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 14 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
4.2.4 AV Player Operations
Following diagram shows a subset of use cases that are performed by Home User after they are
successfully logged into the HACS and select the AV Player Options menu.
hacsUser
Select AV Player
Options
e
<<
nd
xte
>
s>
Validate User login
Play Music CD
homeUser
Play Radio
Play TV
Record TV Program
Switch Off the
player
HACS
Switch On the
player
Set sleep timer to
auto off
Set time for wake
up alarm
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 15 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
4.2.5 AC Thermostat Operations
Following diagram shows a subset of use cases that are performed by Home User after they are
successfully logged into the HACS and select the AC Thermostat Options menu.
Select AC
Thermostat Options
hacsUser
e
<<
n
xte
ds
>>
Validate User login
Check Temperature
homeUser
Set Temperature
Set heat mode
Set cold mode
Set Auto off time
HACS
Set Auto On Time
Home User
Switch Off
Fire Department
System Administrator
Switch On
Check Status
e
<<
n
xte
ds
>>
Unusual Temperature
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 16 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
5 Class Diagram
The following class diagram shows most of the classes and how they are interrelated.
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 17 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
Hacs
«enumeration»
UserType
UserInfo
-userName : string
-appliances : Appliance
-userInfo : UserInfo
-userStatus : UserStatus
-sessionId : ulong
1..1 -sessionExpiryTime : string
-systemTime : string
-userName : string
1..1
-userId : string
-password : string
-dob : SysTime
-secretQuestion : string
1..n -secretAnswer : string
-lastSuccesfulLogin : SysTime
+login(in userId : string, in password : string) : bool logsinto -lastFailedLogin : SysTime
-userStatus : UserStatus
+logout() : bool
-vacationStart : SysTime
+getUserInfo() : UserInfo
-vacationEnd : SysTime
+modifyUserInfo(in userInfo : UserInfo)
-userType : UserType
+createUser(in userInfo : UserInfo)
-passwordExpiryDate : SysTime
+deleteUser(in userInfo : UserInfo)
has
1..1
+homeUser = 1
+hacsSupport = 2
«enumeration»
UserStatus
1..1
manages
SysTime
-time : string
-date : string
+getTime() : string
+setTime()
+getDate() : string
+setDate()
User can set
the HACS time.
various preset
cooking modes of
microwave.
4..4
«enumeration»
cookingMode
+autoCook = 1
+slowCook = 2
+fastCook = 3
+keepWarm = 4
Appliance
-name : string
-description : string
+atHome = 1
+notAtHome = 2
+vacation = 3
+powerOn(in appliance : Appliance)
+powerOff(in appliance : Appliance)
+getStatus(in appliance : Appliance)
+writeLog(in log_description : string)
«precondition»
{vacationStart and
vacationEnd are
valid only when
userStatus=vacation}
Microwave
-cookingMode : cookingMode
-maxTemp : int
+setCookingMode(in mode : cookingMode) : cookingMode
+changeCookingMode(in mode : cookingMode) : cookingMode
+start() : bool
+stop() : bool
+setCookingTime(in mode : cookingMode) : bool
GarageDoor
AcThermosta
-minThresholdTemp : int
-maxThresholdTemp : int
-state : doorState
-stateTime : SysTime
-openThreshold : SysTime
+checkTemperature() : int
+setMode(in mode : acMode) : bool
+setTemperature(in temperature : int) : bool
+open() : doorState
+close() : doorState
AvPlayer
«enumeration»
acMode
«enumeration»
doorState
+heater = 1
+cooler = 2
+open = 1
+close = 2
User has to set the
mode of AC,when
changing the
temperature.
The current status
of the garage door.
-playerState : avplayerState
-autoOffTime : SysTime
-wakeUpAlarm : SysTime
-recordStart : SysTime
-recordStop : SysTime
+playMusicCd(in trackNo : int) : bool
+playRadio(in stationNo : float) : bool
+playTV(in channelNo : int) : bool
+recordProgram(in channelNo : int, in start : SysTime, in stop : SysTime) : bool
+setAutoOffTime()
+setWakeUpAlarm()
«enumeration»
avplayerState
+playing = 1
+recording = 2
+on = 3
+off = 4
The current status
of the AV Player.
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 18 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
6 Sequence Diagrams
6.1 Auto record TV Program
Following is the sequence diagram of HACS system automatically recording a TV program for the user
according to the settings performed by the user.
Top Package::hacs
hacsThread
hacs
aVController
database
1 Record TV Show
2 Go back to Sleep
3 Power on AV System
4 Write power on Log to Database
5 AV System Powred On
6 Record TV Program
7 Write record Log to Database
8 Recording activity completed
9 Power off AV System
10 Write power off Log to Database
11 AV System Powred Off
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 19 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
6.2 Set AC Thermostat
Following is the sequence diagram to set the AC Thermostat to “Cooler” mode and “Temperature” to
60.
Top Package::homeuser
homeuser:userInfo
:hacs
thermostatForm
:AcThermostat
1 login to HACS
2 Show Main Menu
3 Select AcThermostat
4 Select setTemperature
5 set mode=cooler
6 set temperature=60
7 Return status
8 Return status
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 20 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
6.3 Microwave – Cook Food
Following is the sequence diagram to set the Microwave to cook food in a specific mode ( auto, fast,
slow, keep warm) and for specific time.
Top Package::homeuser
homeuser:userInfo
:hacs
microwaveForm
:Microwave
1 login to HACS
2 Show Main Menu
3 Select Microwave
4 Cook Food
5 set cooking mode
6 set cooking time
7 Return status
8 Return status
9 Return status
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 21 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
6.4 Close Garage Door
Following is the sequence diagram to close the Garage Door.
Top Package::homeuser
homeuser:userInfo
:hacs
garagedoorForm
:GarageDoor
1 login to HACS
2 Show Main Menu
3 Select GarageDoor
4 Select Close Door
5 call close()
6 Return status
7 Return status
8 Return status
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 22 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
6.5 Get Overall status of the system
Following is the sequence diagram to get the overall status of the sytem. Color coded mechanism of
green, yellow and red status is returned for each device and finally the status is consolidated and
returned to the user in the final color coded status( Green, Yellow, Red ).
Top Package::homeuser
homeuser:userInfo
:hacs
:AvPlayer
:GarageDoor
:Microwave
:AcThermostat
1 login to HACS
2 Show Main Menu
3 get overall system status
4 get status
5 Return status
6 get status
7 Return status
8 get status
9 Return status
10 get status
11 Return status
12 Consolidate and Return staus
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 23 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
Appendix A – Assumptions

Communication between Appliances and HACS is via a common communication protocol. (
example Bluetooth, 802.11 wireless protocol )

Communication between Appliances is not allowed / turned off. And if two devices need to
communicate it should go through the HACS system.

Multiple users can access the HACS remotely.

For ease of design All the Members of family will have same level off access to the system.

For ease of design we will assume that HACS Support team will have same level of access to the
HACS system as the family members.

All the users of system will have unique userid to differentiate between login’s and access.

All users have to enter the User Profile before using the HACS system for the first time.
o Name
o Userid
o Password
o Date of Birth
o Security questions (city of birth, first pet’s name, best friends name)

One or More of the following Security mechanisms will be used
o Password
o Voice recognition
o Security questions specific to login ID to authenticate user.
o Reset password every month
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 24 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________

Microwave has the following presets which are auto programmed by manufacturer
o Auto Cooking Mode
o Fast Cooking Mode
o Slow Cooking Mode
o Keep Warm Mode
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 25 of 26
CS 6359
HACS Phase 1
Sep 20, 2006
________________________________________________________________________
Appendix B - Student Information
Name
Sudhir V Dachepalli
Primary Email
sudheerdv@yahoo.com
UTD Email
svd021000@utdallas.edu
Cell Phone
512-779-5848
Comments
I am the Distance Education student from Austin for this
course.
Appendix C – Important Dates
Submission Date
Description of deliverable
Sep 28 2006
Interim Project 1 Presentation
Oct 12 2006
Final Project 1 Submission
Nov 9 2006
Interim Project 2 Presentation
Nov 22 2006 – Nov 28
2006
Final Project 2 Submission and Demo
________________________________________________________________________
Sudhir V Dachepalli
Distance Ed Student
Page 26 of 26
Download