18649 - Behavioral Requirements II

Distributed Controller Requirements


18649 Spring 2010
Group 7 - Justin Ray/justinr2

Introduction

This document describes the complex sensor, actuator, and environmental objects in the system.

Table of Contents

1. Customer[p] (environmental object)

Replication:

N customers per system; N is unlimited.

Instantiation:

Zero customers at initialization.

Customers arrive at the soda machine one at a time.

Assumptions:

Customers that drink diet sodas weigh 150 pounds each.  Customers that drink regular soda weigh 200 pounds each.

Input Interface:

Output Interface:

Constraints:

High-Level Behaviors:

Note:  Implementation of the Customer is provided in the simulator and the details are beyond the scope of this document.  The Customer behaviors (and implementation) are inherently event-triggered, so you should not base your design on the Customer object.

2. ButtonControl[s]

Replication:

Instantiation:

Assumptions:

Input Interface:

Output Interface:

Constants

State:

Constraints:

Event-Triggered Behaviors:

Time-Triggered Behaviors:

Time-Triggered Statechart:

ButtonControl Statechart

Transition #
Guard
T2.1
mButton[s] ← True AND mEmpty[s] ← False AND mVend ← False AND mCoinCount  ← SODA_COST
T2.2 mVend ← True  AND  mEmpty[s] ← False
T2.3. mVend ← True  AND  mEmpty[s] ← True
T2.4. FlashCounter > FlashLimit
T2.5. FlashCounterLimt ←  0
T2.6. mEmpty ← True
T2.7. mEmpty ← False

Requirements-to-Statecharts Traceability


Requirements
States
R2.1
R2.2
R2.3
R2.4a
R2.4b
R2.5
S2.1 IDLE
x

x


x
S2.2 EMPTY
x
x



x
S2.3 VEND
x


x
x

S2.4 FLASH_OFF
x


x
x

S2.5 FLASH_ON
x


x
x

Transitions






T2.1



x
x
x
T2.2


x



T2.3

x




T2.4




x

T2.5




x

T2.6

x




T2.7


x







3. CoinControl

Instantiation:

Assumptions:

Input Interface:

Output Interface:

State:

Constraints:

Event-Triggered Behaviors:

Time-Triggered Behaviors:


Time-Triggered Statechart:

CoinControl Statechart

Transition #
Guard
T3.1
CoinIn ← True
T3.2 Unconditional Transition
T3.3. CoinIn ← False
T3.4. CoinCount > SODACOST
T3.5. Unconditional Transition
T3.6.
mCoinReturn← True AND CoinCount > 0
T3.7.
Unconditional Transition
T3.8.
CoinCount ←  0
T3.9.
CoinCount > 0
T3.10.
mVend ← True
T3.11.
mVend ← False
T3.12
Unconditional Transition
T3.13
Unconditional Transition



Requirements-to-Statecharts Traceability


Requirements

States
R3.1a
R3.1b
R3.2a
R3.2b
R3.3
R3.4a
R3.4b
R3.5
R3.6
S3.1 IDLE







x

S3.2 COIN_IN_1
x
x





x

S3.3 COIN_IN_2
x
x





x
x
S3.4 OVERPAY


x
x



x

S3.5 RETURN_1





x
x
x

S3.6 RETURN_2





x
x
x

S3.7 VEND




x


x

S3.8 OVERPAY_STRETCH


x
x



x

S3.9 RETURN_STRETCH





x
x
x

Transitions









T3.1
x
x







T3.2
x
x







T3.3








x
T3.4


x
x





T3.5


x
x





T3.6





x
x


T3.7





x
x


T3.8





x
x


T3.9





x
x


T3.10




x




T3.11




x




T3.12


x
x





T3.13





x
x




4. VendControl

Instantiation:

Assumptions:

Input Interface:

Output Interface:

Constants:

State:

Constraints:

Event-Triggered Behaviors:

Time-Triggered Behaviors:

Time-Triggered Statechart:

VendControl Statechart

Transition #
Guard
T4.1
mButton[s] ← TRUE  AND  mCointCount← SODACOST  AND
mVendPosition[s] ← True  AND
mVendMotor ← STOP
T4.2 VendCounter >= VendCounterLimit;


Requirements-to-Statecharts Traceability


Requirements
States
R4.3a
R4.3b
S4.1 IDLE
x
x
S4.2 VEND
x
x
Transitions


T4.1
x
x
T4.2
x
x




5. VendPositionControl

Instantiation:

Assumptions:

Input Interface:

Output Interface:

State:

Constraints:

Event-Triggered Behaviors:

Time-Triggered Behaviors:


Time-Triggered Statechart:

VendPositionControl Statechart

Transition #
Guard
T5.1
mButton[s] ← TRUE  AND  mCointCount ← SODACOST  AND
mVendPosition[s] ← False  AND
mVend ← FALSE
T5.2 (mVendButton[s] ← TRUE  AND  mVendPosition[s] ← TRUE)
  OR
(mVendPositon[1] ← TRUE AND VendMotor ← LEFT)
  OR
(mVendPosition[8] ← TRUE AND VendMotor ← RIGHT)

Requirements-to-Statecharts Traceability


Requirements
States
R5.3
R5.4
R5.5
R5.6
S5.1 IDLE

x
x
x
S5.2 MOVE
x


x
Transitions




T5.1
x



T5.2

x
x