Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
What is HACS?
A home appliance control system
which uses a remote system such
as a mobile phone or PDA to
monitor, control, and coordinate
home appliances such as your
security system, oven, TV, etc.
Assumptions and
Dependencies
Infallibility
No Power Failures
No Network Failures
Each Appliance has Sufficient Power
and a Dedicated CPU
Wireless Network is the same as LAN
HACS has an Internet Connection
Perfect Cellular Reception
Sufficient Hardware
Requirements
HACS should
Requirements List
(1) Appliance Control Appliances, devices such as an oven,
microwave, air conditioner, or sprinkler, can be controlled by a
home owner in a remote location. That is the user may set the
different attributes (e.g. oven temp, AC fan speed, sprinkler
settings etc.) for each appliance from a wireless device
(2) Adaptability/Detection The system will be able to
detect changes within the home and maintain the user
settings.
(3) Manually Adaptable The user can set system set the
status of different appliances manually and user commands
have precedence over automatic commands.
(4) Communication HACS should be able to communicate
with all appliances.
(5) Safety HACS should maintain the safety of the users
home and person at all times. Devices should be maintained in
non-hazardous states.
User
User
Interface
HACS
Bad!
setTimer
setStatus
HACS
setStatus
GetTemp
Oven
getStatus
getStatus
toggle
toggle
SetTemp
User
ToggleOn/Off
Appliance
User
Appliance
Alert
setTemp
Alert
AC
Alert
setTemp
ToggleOnOff
Emergency
Service
Register Wireless
<<extends>>
Add Appliance
<<extends>>
Register Appliance
<<uses>>
Remove Appliance
User
Login
<<uses>>
Get Status
<<extends>>
<<extends>>
PoliceDept
Set Status
Manage Status
Appliance
FireDept
Emergency Alert
HACS must be
Nobody other than the owner
secure!
should be able to modify an
appliances
status
What if your
neighbor down the street decided
to play a joke and turn on your oven!
Sequence Diagrams:
Log In
User : User
:UserInterface
:HACS
:UserRecord
issuesCommand
connect(id)
verify(id)
returnVerification
User
Appliance
Sequence Diagrams:
Get Status
User: User
:UserInterface
:HACS
:Appliance
selectApp
getStatus(app,uid)
Login
getStatus()
returnStatus
returnStatus
displayStatus
Sequence Diagrams:
Get Status
But what if access is denied?
: User
:UserInterface
:HACS
selectApp
getStatus(app,uid)
Login
loginDenied
displayDenied
:Appliance
User
Appliance
Set
Status
Sequence Diagrams:
Set Status
: User
:UserInterface
:HACS
:Appliance
selectApp
setStatus(app,uid,attribute, value)
Login
setStatus(attribute,value)
returnStatus
returnStatus
displayStatus
User
<<extends>>
<<extends>>
Remove
Applian
extendedceby
Appliance
Register Appliance is
Add/Remove appliance use cases to handle
registration interactions within the HACS
system.
Sequence Diagram:
Add Appliance
:Interface
User : User
:HACS
xyz:Appliance
setup appliance
Sequence Diagram:
Remove Appliance
:UserInterface
:appliance
:Hacs
User : User
User
regist
er
wirele
ss
Wireless
Sequence Diagram:
Register Wireless
:HACS
xyz:Appliance
User : User
add user
add device
send confirmation
Intruder_Detector
Alert_controller
Emergency_Dept
Fire_Detector
Police_Department
Reuse!
Use Case:
Evolved Emergency Alert
PoliceDept
Emergency Alert
Appliance
FireDept
:Device_interfac
e
abc:Alert_contr
oller
emergency:
Emergency_dept
:Police
create_sockets()
Here it is
assumed devices
communicate on
sockets
start_threads()
start_sensing()
:Fire
HACS
notify()
classes
interact with
sockets
Emergency_Dept
tel_pol[5] : int = default
tel_fire[5] : int = default
Thread_main : thread = null
alert_controler : socket = null
port_alert : socket = null
ip_alert : int = default
name2
Demultiplex_req()
Connect_db()
notify_dept()
Object
HACS
Appliance
HACS
Alert Controller
Appliance
HACS
Alert Controller
On
Off
Set Intensity
Report Exceptions
Appliance
HACS
Alert Controller
Object
HACS
Appliance
Appliance
subclasses
Emergency
Department
HACS
hid
userRecords
apps
EMservices
connections
UserInterface
currentWindow
uid
hid
Connect(uid)
displayWindow(window)
getStatus(hid, appliance)
setStatus(hid, appliance, attribute, value)
getAppliances(hid)
UserRecord
user_id
getStatus()
setStatus()
addAppliance()
delAppliance()
notify()
Login()
setId(user_id)
getId()
<<actor>>
appliance
appId
attributes
hid
get(attribute)
set(attribute, value)
alert(hid)
FireAlarm
detect()
GarageDoor
open()
close()
Windows
setSecurity(on_off)
detectMotion()
lights
on()
off()
setIntensity(value)
The END!
Questions?
Comments?
Praise for our greatness?