Ece 18 649 soda machine example status update
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

ECE 18-649 Soda Machine Example Status Update PowerPoint PPT Presentation


  • 111 Views
  • Uploaded on
  • Presentation posted in: General

ECE 18-649 Soda Machine Example Status Update. February 19, 2010 Group 7 Justin Ray READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE. Overview. ButtonControl Design Process Use case: pressing the button Scenarios, Sequence Diagrams, Requirements Statecharts: to nest or not to nest

Download Presentation

ECE 18-649 Soda Machine Example Status Update

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Ece 18 649 soda machine example status update

ECE 18-649Soda Machine ExampleStatus Update

February 19, 2010

Group 7

Justin Ray

READ THE SLIDE NOTES FOR COMMENTARY ON THIS EXAMPLE


Overview

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

Justin Ray


Buttoncontrol use case and scenario

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.

Justin Ray


Sequence diagram 2a

Sequence Diagram 2A

Button

Customer

ButtonLight

VendControl

CoinControl

ButtonControl

CoinCount==2

mVend == False

1a. Button s pressed

1b. Button[s](true)

1c. mButton[s](true)

16pt

1d. mCoinCount(2)

Flashing light behavior indicates that a soda vend is in progress.

2a. ButtonLight[s](false)

2b. ButtonLight[s](true)

2a and 2b repeat

until 5a.

Note: Subset of the SD 2A relevant to the controller behavior.

Justin Ray


Requirements

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.

Justin Ray


Statechart

Statechart

  • Nested statechart avoids duplicating T2.2 and T2.3

  • Early work on Proj 5  nested statechart is hard to implement

S2.1 IDLE

DO: ButtonLightOn

mButton[s]  False

FlashCounter  0

S2.3 VEND

T2.1

S2.4 FLASH_OFF

DO: ButtonLightOff

mButton[s]  TRUE

Increment FlashCounter

T2.2

T2.6

T2.7

S2.2 EMPTY

DO: ButtonLightOff

mButton[s]  False

FlashCounter  0

T2.3

T2.4

T2.5

S2.4 FLASH_ON

DO: ButtonLightOn

mButton[s]  TRUE

Decrement FlashCounter

T2.1 mButton[s] ← True AND

mEmpty[s] ← False AND

mVend ← False AND

mCoinCount ← SODA_COST

….

Justin Ray


Project statistics

Project Statistics

Justin Ray


Lessons learned open issues

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

Justin Ray


Any questions

Any Questions?

Team 7

Justin ray – [email protected]


Backup slides

Backup Slides


Statechart1

Statechart

S2.1 IDLE

DO: ButtonLightOn

mButton[s]  False

FlashCounter  0

S2.3 VEND

T2.1

S2.4 FLASH_OFF

DO: ButtonLightOff

mButton[s]  TRUE

Increment FlashCounter

T2.2

T2.6

T2.7

S2.2 EMPTY

DO: ButtonLightOff

mButton[s]  False

FlashCounter  0

T2.3

T2.4

T2.5

S2.4 FLASH_ON

DO: ButtonLightOn

mButton[s]  TRUE

Decrement FlashCounter

Justin Ray


  • Login