Auto-Defrost Key Interface Specification

Identity:          Auto-Defrost Key Interface

Description:       The auto-defrost key interface allows

the user to defrost different types of

meat based on the weight of the meat

item. This interface processes data that

results from the handling of key events

in auto-defrost set mode.

Requires:          This interface requires processed

keycode data from the Key Interface

implementation and the key value data

from the Numeric Key Interface.

Provides:          This interface provides input to the

Microwave Oven Controller.

Operations:

-----------------------------------------------------------

Method Syntax:

int getTypeOfMeat();

Parameter

In / Out

Description

return

out

Integer representing the type of meat that is to be defrosted.

Method Semantics:

Execution Step

Result

The handlePressEvent function delivers the keycode to the AutoDefrostKeyImpl object.

The AutoDefrostKeyImpl object prompts the user for the type of meat item to be defrosted by communicating with the controller which then uses the LCD driver to display the prompt.

The user responds to the prompt by pressing a numeric key.

The AutoDefrostKeyImpl object receives the user response data from the NumericKeyInterface.

Controller invokes getTypeOfMeat to retrieve the type value entered by the user.

The meat type value is returned to the controller which then sends the necessary output data to the output processing system to use in producing the correct LCD signals.

Usage Constraints: Consecutive type-of-meat getter

calls must be separated by at least 500

milliseconds in order to be processed.

Method Syntax:

int getWeight();

Parameter

In / Out

Description

return

out

Integer representing the weight value for the meat item to be defrosted.

Method Semantics:

Execution Step

Result

The AutoDefrostKeyImpl object prompts the user for the weight of the meat item to be defrosted by communicating with the controller which then uses the LCD driver to display the prompt.

Controller invokes getWeight to retrieve the weight value entered by the user.

The meat weight value is returned to the controller which then sends the necessary output data to the output processing system to use in producing the correct LCD signals.

The user then presses the START button.

This completes the set auto-defrost mode which then hands flow of execution to the controller so that the cooking operation can begin.

Usage Constraints: Consecutive weight-of-meat getter

calls must be separated by at least 500

milliseconds in order to be processed.

User-defined Types:None.

Exceptions:

Exception

Description

Stagnant

If the data in the Clock object being fetched has not changed since the last fetch, this exception will be thrown.

Stale

If the fetch call does not complete within 500 milliseconds, this exception will be thrown from this interface.

Corrupt

If the data in the Clock object being fetched has never been set or has an invalid value, this exception will be thrown.

Quality Attributes: Upon receiving invocation, this

interface is expected to retrieve data

within 1 millisecond.

Usage:              The auto-defrost operation can be set

by pressing the

“Auto Defrost” button and then pressing

A numeric key in response to the first

prompt for the type of meat and a

numeric key in response to the second

prompt for the weight of the meat. The

user then presses the “START” button to

begin the defrost operation.

Incorrect usage sequences would be the following:

Pressing the “Auto-Defrost” button when the oven is already operating in a cooking mode, timer mode, or clock-setting mode.

Pressing the “START” button to begin defrosting before responding to both the type-of-meat prompt and the weight-of-meat prompt.

Nominal usage of this interface is shown in the following

state-chart and activity diagram:

Requirements Trace:

F4.4.1, F4.4.2, F4.4.3, F4.4.4, F4.4.5, F4.4.6