Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ECE 18-649 Soda Machine Example Status Update February 19, 2010 Group 7 Justin Ray READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE.

Similar presentations


Presentation on theme: "1 ECE 18-649 Soda Machine Example Status Update February 19, 2010 Group 7 Justin Ray READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE."— Presentation transcript:

1 1 ECE 18-649 Soda Machine Example Status Update February 19, 2010 Group 7 Justin Ray READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE

2 Group #7Justin Ray2 Overview  ButtonControl Design Process Use case: pressing the button Scenarios, Sequence Diagrams, Requirements Statecharts: to nest or not to nest  Design revisions Missing inputs Incorrect flashing behavior  Project Statistics  Lessons Learned

3 Group #7Justin Ray3 ButtonControl: Use Case and Scenario  U2. Customer pushes a soda button Primary use case for soda vending  U4. Observe soda availability Deals with the behavior of the button light  Scenario 2A: push button after paying Precondition: 2 coins inserted Scenario  The Customer pushes soda button ‘s’.  The light on the soda button ‘s’ begins flashing.  … (vend cycle)  The light on the soda button s stops flashing. Postcondition: A soda has been vended.

4 Group #7Justin Ray4 Sequence Diagram 2A Customer Button CoinControl CoinCount==2 VendControl 2a. ButtonLight[s](false) ButtonLight ButtonControl 2b. ButtonLight[s](true) 2a and 2b repeat until 5a. 1a. Button s pressed 1d. mCoinCount(2) 1c. mButton[s](true) 1b. Button[s](true) 16pt Note: Subset of the SD 2A relevant to the controller behavior. Flashing light behavior indicates that a soda vend is in progress. mVend == False

5 Group #7Justin Ray5 Requirements  6 Requirements total  R2.4 indicates a vend cycle is in progress If  Button[s] True AND  mEmpty[s] False AND  mCoinCount equals SODA_COST AND  mVend False, then  R2.4a. ButtonState shall be set to True.  R2.4b. ButtonLight[s] shall be commanded to blink with a period of 1s.

6 Group #7Justin Ray6 Statechart  Nested statechart avoids duplicating T2.2 and T2.3  Early work on Proj 5  nested statechart is hard to implement S2.3 VEND S2.1 IDLE DO: ButtonLight  On mButton[s]  False FlashCounter  0 S2.2 EMPTY DO: ButtonLight  Off mButton[s]  False FlashCounter  0 S2.4 FLASH_OFF DO: ButtonLight  Off mButton[s]  TRUE Increment FlashCounter S2.4 FLASH_ON DO: ButtonLight  On mButton[s]  TRUE Decrement FlashCounter T2.1 T2.2 T2.3 T2.6 T2.7 T2.4T2.5 T2.1 mButton[s] ← True AND mEmpty[s] ← False AND mVend ← False AND mCoinCount ← SODA_COST ….

7 Group #7Justin Ray7 Project Statistics Date of Presentation02/18Pres2Pres3 # of Sequence Diagrams7--- # of SD arcs73--- # of Requirements20--- # of statecharts4--- # of SC states16--- # of SC arcs22--- # of non-comment LOCN/A--- # of unit testsN/A--- # of integration testsN/A--- # of acceptance testsN/A--- # unresolved defects0--- # of issue log entries7---

8 Group #7Justin Ray8 Lessons Learned & Open Issues  Problems that you have already solved CoinControl missing a VEND state  Identified in reviews  mVend input unused ButtonControl defects  Identified in reviews  incorrect flashing behavior  Team strategies Sort out tools early Only let one person edit a document at a time  Open issues Refactor the ButtonControl statechart?  Decide between  more complex statechart that matches the code better  less complex statechart with duplicated transitions in code

9 9 Any Questions? Team 7 Justin ray – justinr2@ece.cmu.edu …

10 10 Backup Slides

11 Group #7Justin Ray11 Statechart T2.1mButton[s] ← True AND mEmpty[s] ← False AND mVend ← False AND mCoinCount ← SODA_COST T2.2mVend ← True AND mEmpty[s] ← False T2.3mVend ← True AND mEmpty[s] ← True S2.3 VEND S2.1 IDLE DO: ButtonLight  On mButton[s]  False FlashCounter  0 S2.2 EMPTY DO: ButtonLight  Off mButton[s]  False FlashCounter  0 S2.4 FLASH_OFF DO: ButtonLight  Off mButton[s]  TRUE Increment FlashCounter S2.4 FLASH_ON DO: ButtonLight  On mButton[s]  TRUE Decrement FlashCounter T2.1 T2.2 T2.3 T2.6 T2.7 T2.4T2.5 T2.4FlashCounter > FlashLimit T2.5FlashCounterLimt ← 0 T2.6mEmpty ← True T2.7mEmpty ← False


Download ppt "1 ECE 18-649 Soda Machine Example Status Update February 19, 2010 Group 7 Justin Ray READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE."

Similar presentations


Ads by Google