18649 - Behavioral Requirements I

System Objects and Message Dictionary


18649 Spring, 2010
Group 7 - Justin Ray/justinr2

Table of Contents

Soda Machine High-Level Requirements

R1. Pushing a button shall vend a soda of the type corresponding to that button.
R2. The machine shall permanently retain exactly SODACOST coins for each can of soda vended.
R3. Coin return shall return all deposited coins since the last vend cycle.
R4. The machine shall return all deposited money in excess of SODACOST coins before a vend cycle.
R5. The machine shall flash the button light for a selected item while vending is in progress to indicate acceptance of a selection to the buyer.
R6. In a quiescent state, the machine shall illuminate the light for any in-stock item

Soda Machine Description

The soda machine can hold up to 8 different types of soda in separate chutes.  The chutes are arranged side-by-side and each is 100mm wide.

The vend unit is mounted on a track which moves it between the chutes.  The vend unit must be centered on the track, thus the track is only 700mm long and is positioned so that the left-most end is aligned with the center of the first chute.

The coin counter accepts only quarters and automatically returns any coin not recognized as a quarter.

Soda refill and money collection is done manually.

Notation

Replication Notation

"[...]" indicates an array of objects or values.   There are 8 valid positions, so there are 8 separate and distinct Empty[p] sensors, one at each soda chute.

"(...)" indicates a list of values associated with a sensor/actuator.  Single-valued inputs/outputs can have the "(" and ")" omitted as a notational convenience.

The suffixes "_up", "_down", "_front", and "_back" may be used in lieu of a direction subscript, to make things more readable. e.g.:
        Empty_1 means Empty[1]
        and so on...

Multi-attributed items may have a particular state referred to by concatenating elements, although this system has no multiattribute objects.

Single attributes of a multi-attribute item are referred to using "." notation.  For example DesiredFloor.f refers to attribute "f" of "DesiredFloor".

If a letter instead of a value is used in a subscript, it is assumed that it can take any valid value.  If the same letter is used in multiple clauses within a single requirement element, it is assumed that the letter takes the same value in all instances.  For example, in the phrase:
 "Empty[s] ... ButtonControl[s]  ...  VendPosition[t]"
The Position p  for Empty and ButtonControl can be any valid position, but would have to be the same position.  However, the position for VendPosition might or might not be the same since it is a different symbolic letter.

In the context where the 's' value denotes a type of soda, the value NONE may be used to indicate that no soda is present or no type selected.

Replication in Sequence Diagrams

Replication is a problem in UML Sequence Diagrams. Rather than introducing an attempt at formal notation (which gets very confusing quickly), we will resort to using comments when multiple instances of something are supposed to be coordinated (e.g., "wait for all doors to close" will be a text comment in Sequence Diagrams, but shall be represented rigorously in behavioral requirements).

Replication in Behavioral Requirements

Because the controllers are written in a generic way, it's important to pay attention to the way the replication notation is used in the behavioral requirements.  Here are some general guidelines:

Misc Notation

SODACOST is an integer value that represents the number of coins needed to purchase a soda.  In this case, the value of SODACOST is 2.

Initialization

Because ultimately we will do this all in simulation, we're going to make your life easy by telling you the initial state of the system (the "initialization" state) such as putting the VendMotor at position 1 at startup and no coins being held in the system.

System Elements

This section describes the elements of the system that are already provided

The VendCarriage

The notation "VendCarriage" (or VC) refers to the part of the soda machine that moves left and right to align the Vend actuator with a particular soda chute.  The movement of the VC itself is hidden within the environment model, so it can only be observed through sensors and controlled through actuators.

Physical State Sensors

These objects are instantiated in the system but do not have a network interface.  These objects must be read through the physical interface of a controller.

Smart Sensors

These sensor values are available for use by the control system.  The below-listed values will correspond to network messages in the implementation phase.
Note:  If an object that sends a network message is not instantiated (such as a chute s that is removed for maintenance), then no network message with that CAN id is ever sent.

Environmental-Only System State:

These values keep track of current system state.  They are not accessible to the control system, but have been used in the specifications for building the simulation system.

System Actuators

The below-listed values will correspond to network messages in the implementation phase.  All actuators are assumed to "remember" their last commanded value and stay there unless commanded otherwise or forced otherwise by system/environment constraints.

Environmental-Only Actuators

No environment-only actuators in this system.

Control System Objects

In addition to the objects described above, there are several complex control system objects.  These objects are summarized below.  The detailed specification of these objects can be found in the Behavioral Requirements II document.  Environmental objects have already been designed and are provided by the system.  The other control objects will be the primary focus of your design effort.

Network Message Dictionary

This section defines the network messages that may be sent.  The design MUST follow the message dictionary.  Following the message dictionary means:

Environmental Object Messages

These messages are sent by environmental objects and smart sensors provided in the system

Source Node Name
Message Name Replication
Number of fields
Description
Empty
mEmpty s
1
See Object Description
Coin_Return mCoinReturn none
1
See Object Description
VendPosition
mVendPosition
s
1
See Object Description

Controller Messages

These messages are sent by the controllers that you will design.  In the later projects, you will be allowed to modify the message dictionary for the controllers in a limited way, but for the time being, you must implement the message dictionary given below:

Source Node Name
Message Name Replication
Number of Fields
Description
ButtonControl mButton
s 1
State of the soda selection button
VendControl
mVend none
1
True when vending a soda
CoinControl
mCoinCount
none
1
Integer number of coins received
VendPositionControl
mVendMotor
none
1
State of the vend motor