80 likes | 210 Views
RecordMessage. PlayMessage. DeleteMessage. SetClock Time. User. SetAlarm Time. WatchTime. Dictaphone. «subsystem» Alarm Clock. «subsystem» User Interface. «subsystem» Battery. «subsystem» Memory. «subsystem» Audio. «Audio» Message. «Audio» BlockAudio {abstract}.
E N D
RecordMessage PlayMessage DeleteMessage SetClock Time User SetAlarm Time WatchTime Dictaphone
«subsystem» Alarm Clock «subsystem» User Interface «subsystem» Battery «subsystem» Memory «subsystem» Audio
«Audio» Message «Audio» BlockAudio {abstract} «Audio» AudioController 0..* + GetAudioBlock () + AppendAudioBlock () + GetHeader () + SetHeader () + PlayMessage () + RecordMessage () + DeleteMessage () + PlayAlarm () + Stop () + GetSample () {abstract} + AddSample () {abstract} «Audio» AudioInput «Audio» AudioOutput + PlayCompressedAudioBlock () + PlayAlarmAudio () + SelectOutputFilter () + RecordCompressedAudioBlock () + SelectInputFilter () «Audio» Microphone «Audio» Altavoz Recording or playing a sound sample is a task that requires 1/6000th of second. + RecordSample () + PlaySample () 0..* «Audio» CompressedAudioBlock «Audio» Timer
«Audio» Message + GetAudioBlock () + AppendAudioBlock () + GetHeader () + SetHeader () «Memory» MessageMemory + NewMessage () + GetMessage () + DeleteMessage () «Audio» AudioController 1 10 * 0..* is a sequence of «Audio» AudioBlock
Use case PlayMessage {60 seconds} :Alarm Clock :User Interface :Audio Controller :Message Memory x:Message :AudioOutput :Speaker :User PressPlayMessage (x) PlayMessage (x) GetMessage () * [i = 1..n] GetAudioBlock () * [j := 1..2000] PlaySample () * [i = 1..n] PlayCompressedAudioBlock () PressDeleteMessage (x) DeleteMessage (x) Stop () DeleteMessage () Alarm () * [k := 1..2000] PlaySample () PlayAlarm () PlayAlarmAudio () PressStop () Stop ()
{60 seconds} Use case PlayMessage 1: PressPlayMessage (x) 2: PressDeleteMessage (x) 4: PressStop () 1.1.1: GetMessage () 2.1.2: DeleteMessage () :Message Memory :User :User Interface 3: Alarm () 1.1.2 * [i = 1..n]: GetAudioBlock () 1.1: PlayMessage (x) 2.1: DeleteMessage (x) 3.1: PlayAlarm () 4.1: Stop () :Alarm Clock x:Message 1.1.3 * [i = 1..n]: PlayCompressedAudioBlock () 3.1.1: PlayAlarmAudio «self» :Audio Controller 2.1.1: Stop () :OutputAudio 1.1.3.1 * [j := 1..2000]: PlaySample () 3.1.1.1 * [k :=1..2000]: PlaySample () :Speaker
AudioController Playing Message Idle Recording Message Alarm
LookingForMessage (x) do / GetMessage () DeletingMessage entry / Stop () do / DeleteMessage () PlayingMessage [message = found] / GetAudioBlock (i) [delete = true] / DeleteMessage (x) Getting AudioBlock [delete = false and alarm = false and stop =false] / PlayCompressedAudioBlock (i) [message = not-found] / Stop PlayingCompressed AudioBlock [message = complete] / Stop [message = incomplete] / GetAudioBlock (i) Playing Sample [j < 2001] / PlaySample (j) PressPlayMessage (x) / PlayMessage (x) Idle [alarm = true] / PlayAlarm PlayingAlarm [stop = true] / Stop [stop = true or time-seconds = 60] / Stop