SOFTWARE ENGINEERING Practice #1 (SA) Door Lock 201114188 김종연 201114191 정재욱 201114192 정재철 201114195 홍호탁 www.themegallery.com 2013-10-3 1 / 43
Contents 1 SRS - SRS 0.9 -> 1.0 버전업 2 SRA - DFD - Process Specification - Data Dictionary - State Transition Diagram - Overall DFD 2013-10-3 2 / 43
SRS 2.4 Constraints 본 SW 는여러입력을동시에처리할수없다. 동시에여러개의입력이들어왔을때는특정우선순위에따라동작하도록한다. 2.4 Constraints 본 SW 는여러입력을동시에처리할수없다. 동시에여러개의입력이들어왔을때는특정우선순위에따라동작하도록한다. 잠금장치에 열림 신호와 닫힘 신호가동시에들어오면 닫힘 신호를우선시한다. 2013-10-3 3 / 43
SRS 3.2.1 잠금장치잠금 3.2.1.1 수동잠금잠금장치가 개방 상태일때문에위치한잠금버튼을누르면잠금장치를 잠김 상태로만든다. 3.2.1 잠금장치잠금 3.2.1.1 수동잠금잠금장치가 개방 상태이고문이닫혀있을때문에위치한잠금버튼을누르면잠금장치를 잠김 상태로만든다. 2013-10-3 4 / 43
SRS 3.2.4 백라이트시스템이시작되면비밀번호가설정될때까지백라이트를켠다. 비밀번호설정후 10 초간백라이트켠상태를유지한다. 3.2.4 백라이트시스템이시작되면비밀번호가설정될때까지백라이트를켠다. 비밀번호설정후덮개개폐와상관없이 10 초간백라이트켠상태를유지한다. 2013-10-3 5 / 43
SRS 3.2.3 비밀번호 3.2.3.1 설정비밀번호는순서가있는 0000~9999 중하나로설정될수있다. 시스템이시작할때 4 자리숫자를입력받아서비밀번호로설정한다. 도어락은비밀번호가설정되기전까지다른동작 ( 잠금또는열림등 ) 을수행하지않는다. 3.2.3 비밀번호 3.2.3.1 설정비밀번호는순서가있는 0000~9999 중하나로설정될수있다. 시스템이시작할때 4 자리숫자를입력받아서비밀번호로설정한다. 도어락은비밀번호가설정되기전까지다른동작 ( 잠금또는열림등 ) 을수행하지않는다. 비밀번호가설정되면잠금장치를 잠금 상태로만든다. 2013-10-3 6 / 43
Analysis Name Type Description 숫자버튼입력비밀번호입력을위한 Button 0 ~ 9 잠금장치입력문을수동으로잠글수있는잠금버튼 덮개 입력 도어락의비밀번호를누를수있는숫자버 튼을가릴수있는덮개 닫힘센서입력문의닫힘상태를감지하는센서 열쇠센서입력열쇠를감지하는센서 잠금장치 출력 잠금장치를잠금 / 열림상태로만들기위한장치 백라이트 출력 어두운곳에서숫자키를볼수있도록빛을내는장치 경보기 출력 특정상황에서사용자에게소리로경보를주기위한장치 2013-10-3 7 / 43
System Context Diagram 2013-10-3 8 / 43
System Context Diagram - Event List /Output Event Lock Button input 문을수동으로열고닫을수있다. Number input 숫자를입력받는다. Description Cover Sensor input 숫자를누를수있게덮개를열고닫는다. Door Sensor input 문의상태를확인한다. Key Sensor input 열쇠입력을확인한다. Lock signal Backlight signal Alert signal Open/Close On/Off Alert1, Alert2, Alert3 2013-10-3 9 / 43
DFD LEVEL 0 Backlight signal Tick 2013-10-3 10 / 43
DFD LEVEL 0 - Data Dictionary /Output Event Description Format/Type Lock Button input 문을수동으로열고닫을수있다. True/False, interrupt Number input 숫자를입력받는다. Integer, interrupt Cover Sensor input Door Sensor input 숫자를누를수있게덮개를열고닫는다. 문의상태를확인한다. Open/Close, Periodic True/False, Periodic Key Sensor input 열쇠입력을확인한다. True/False, Periodic Lock signal Open/Close Open/Close Backlight signal On/Off On/Off Alert signal Alert1, Alert2, Alert3 On/Off 2013-10-3 11 / 43
DFD LEVEL 1 Number Cover Sensor input Backlight signa Key State Cover State Door State Lock State Tick 2013-10-3 12 / 43
DFD LEVEL 1 Process Specification Lock Button input Number input Cover Sensor input Door Sensor input Key Sensor input Number Key State Cover State Door State Lock State Reference No. 1 Name Door Lock Manager Lock Button input, Number input, Cover Sensor input, Door Sensor input, Key Sensor input Output Process Description Number, Key State, Cover State, Door State, Lock State Number 을전달받아 Number Date Store 에저장하고, 이외입력값들은 Door Lock Control 에 State 를전달한다. 2013-10-3 13 / 43
DFD LEVEL 1 Process Specification Lock signal Number Key State Cover State Door State Lock State Backlight signal Alert signal Reference No. 2 Name Door Lock Control Number, Key State, Cover State, Door State, Lock State Output Lock Signal, Alert Signal, Backlight Signal Process Description Number 와 State 정보를기반으로각각의 Signal 정보를전달한다. 2013-10-3 14 / 43
Number Cover Sensor input Key State Cover State Door State Lock State 2013-10-3 15 / 43
DFD LEVEL 2 Cover signal input Cover State Number input Number State Number Key Sensor input Key State Door Sensor input Door State Lock Sensor input Lock State 2013-10-3 16 / 43
DFD LEVEL 2 - Data Dictionary /Output Event Description Format/Type Cover State Cover signal의 digital data Binary Number State Number의 digital data Binary / Periodic Key State Key Sensor의 digital data Binary Door State Door Sensor의 digital data Binary Lock State Lock Sensor의 digital data Binary Number 숫자가저장된다. Integer 2013-10-3 17 / 43
DFD LEVEL 2 Process Specification Cover signal input Cover State Reference No. 1.1 Name Output Process Description Cover interface Cover signal input Cover State Cover signal input 을받아덮개가닫혔으면 false, 열렸으면 true 로신호를내보낸다. 2013-10-3 18 / 43
DFD LEVEL 2 Process Specification Number input Number State Reference No. 1.2 Name Output Number Button interface Number input Number State Process Description 아날로그신호인 Number input 을입력받아, 디지털신호로바꾸어전송한다. 2013-10-3 19 / 43
DFD LEVEL 2 Process Specification Key Sensor input Key State Reference No. 1.3 Name Output Process Description Key Sensor Interface Key Sensor input Key State Key Sensor input 을입력받아열쇠정보를내보낸다. 2013-10-3 20 / 43
DFD LEVEL 2 Process Specification Door Sensor input Door State Reference No. 1.4 Name Output Process Description Door Sensor interface Door Sensor input Door State Door Sensor input 을입력받아문이닫혀있으면 true, 열려있으면 false 신호를내보낸다. 2013-10-3 21 / 43
DFD LEVEL 2 Process Specification Lock Button input Lock State Reference No. 1.5 Name Output Process Description Lock Button interface Lock Button input Lock State LockButton input 을입력받아잠금버튼이눌리면 true, 그렇지않으면 false 신호를내보낸다. 2013-10-3 22 / 43
DFD LEVEL 2 Process Specification Number State Number Reference No. 1.6 Name Output Process Description Accept Number Number State Number( Integer) Number State 를통해입력받은 Data 를 0~9 를구분하여 Number 에저장한다. 2013-10-3 23 / 43
Number Backlight signal Key State Cover State Door State Lock State Tick 2013-10-3 24 / 43
DFD LEVEL 2 Backlight Command Backlight Number Tick Lock Door State Alert Tick 2013-10-3 25 / 43
DFD LEVEL 2 Process Specification Cover State Backlight Command Number Reference No. 2.1 Name Output Process Description Backlight Control Cover State, Number Backlight Command Cover State 와 Number 를입력받아명령어인 Backlight Command 를 Backlight interface 에보낸다. 2013-10-3 26 / 43
DFD LEVEL 2 Process Specification Number Key State Door State Lock State Reference No. 2.2 Name Output Process Description Lock & Alert Control Number, Key State, Door State, Lock State, Tick Lock Command, Alert Command Number, Key State, Door State, Lock State 을입력받아명령어인 Lock Command 은 Lock Interface, Alert Command 은 Alert Interface 로보낸다. 2013-10-3 27 / 43
DFD LEVEL 2 Process Specification Backlight Command Backlight Reference No. 2.3 Name Output Process Description Backlight interface Backlight command Backlight Backlight Command 를입력받아그에맞는신호를전달한다. 2013-10-3 28 / 43
DFD LEVEL 2 Process Specification Lock Command Lock Reference No. 2.4 Name Output Process Description Lock interface Lock Command Lock Lock Command 를입력받아그에맞는신호를전달한다. 2013-10-3 29 / 43
DFD LEVEL 2 Process Specification Alert Command Alert Reference No. 2.5 Name Output Process Description Alert interface Alert command Alert Alert Command 를입력받아그에맞는신호를전달한다. 2013-10-3 30 / 43
DFD LEVEL 3 Disable Backlight Command Number Enable Tick 2013-10-3 31 / 43
DFD LEVEL 3 State Transition Diagram for backlight controller 2.1.1 IN : 숫자입력유무상태 C : 덮개 (true : 열림 false : 닫힘 ) Len(N) : 입력된숫자개수 N : 덮개가열리고입력된숫자 (4 자리배열 ) [C] /Enable backlight on [Len(N) == 4] 0~9Tick[IN] 10Tick /Disable backlight on [ C IN] /Enable backlight on [ (!C 10Tick[! IN])] /Disable backlight on 2013-10-3 32 / 43
DFD LEVEL 3 Number Lock Command Trigger Lock Command Alert Command 2013-10-3 33 / 43
DFD LEVEL 3 State Transition Diagram for backlight controller 2.2.1 /Trigger Unlock door Tick [ N!= P && Len(N)==4 ] / Trigger Ring Alert2 (10Tick [!IN]) && 0<Len(N) <4] / Trigger Ring Alert3 [Len(N)==4] && 3Tick[D] / Trigger Lock door (Tick [N==P]) [K] [O] / Trigger Ring alert1 Trigger Unlock door ([D && O]) 3Tick[D] / Trigger Lock door N : 덮개가열리고입력된숫자 (4 자리배열 ) K : 열쇠 (t = 키가입력됨, f = 안됨 ) D : 문상태 (t = 닫힘, f= 열림 ) O : 잠금버튼 P : 비밀번호 (4 자리배열 ) Len(N) : 입력된숫자개수 IN : 숫자입력유무상태 2013-10-3 34 / 43
DFD LEVEL 3 Process Specification Number Trigger Reference No. 2.2.1 Name Output Process Description Lock&Alert Control Number, Key, DoorState, LockSignal, Tick Trigger 들어오는정보와내부에저장된정보들을이용하여상황에맞게잠금장치와경보장치에이벤트를발생하는 Trigger 를보낸다. 저장된정보 : ( 최초입력 ) 비밀번호, 키정보 2013-10-3 35 / 43
DFD LEVEL 3 Process Specification Trigger Lock Command Reference No. 2.2.2 Name Output Process Description Lock door Trigger Lock Command 트리거가들어오면 Lock 을향해잠금장치를잠그는 Lock Command 를보낸다. 2013-10-3 36 / 43
DFD LEVEL 3 Process Specification Trigger Lock Command Reference No. 2.2.3 Name Output Process Description Unlock door Trigger Lock Command 트리거가들어오면 Lock 을향해잠금장치를여는 Lock Command 를보낸다. 2013-10-3 37 / 43
DFD LEVEL 3 Process Specification Trigger Alert Command Reference No. 2.2.4 Name Output Process Description Ring alert1 Trigger Alert Command 트리거가들어오면 Alert 을향해경보 1 을울리는 Alert Command 를보낸다. 2013-10-3 38 / 43
DFD LEVEL 3 Process Specification Trigger Alert Command Reference No. 2.2.5 Name Output Process Description Ring alert2 Trigger Alert Command 트리거가들어오면 Alert 을향해경보 2 을울리는 Alert Command 를보낸다. 2013-10-3 39 / 43
DFD LEVEL 3 Process Specification Trigger Alert Command Reference No. 2.2.6 Name Output Process Description Ring alert3 Trigger Alert Command 트리거가들어오면 Alert 을향해경보 3 을울리는 Alert Command 를보낸다. 2013-10-3 40 / 43
Overral Cover signal input Tick Backlight Command Number input Number State Number Lock Command Key Sensor input Tick Lock Command Door Sensor input Alert Command Lock Sensor input Alert Command Alert Command 2013-10-3 41 / 43
느낀점 프로그래밍하기전에간단한설계는해봤지만 SA와 SD를작성해보는건처음이라많은시간이걸렸다. 특히초반에는 DFD와 Flow chart가혼동돼서 DFD를이해하고작성하는데애를먹었다. 작성을하면서이런사소한것들에까지모두명세가요구될필요가있나싶은생각도들었지만모두에게새로운작업이라흥미로웠고, 실제이걸토대로프로그래밍을한다면제대로만들어지고동작할지궁금하기도했다. 2013-10-3 42 / 43
www.themegallery.com 2013-10-3 43 / 43
www.themegallery.com 2013-10-3 44 / 43