Share

Input Belt State Machine Design

We have already defined the sequence diagrams for the Helix Router. This article will focus on designing the C++ classes to implement the design defined by the sequence diagrams. We will step through the development process of one of the most complicated classes in the system, the InputConveyorBelt.

The design process is divided into three distinct steps:

State Machine

Here is the state machine design derived from the Helix Router Sequence Diagrams we developed earlier:

state transition diagram for Input Belt

Refining the State Machine

Based on the above design we have defined a state hierarchy. The states have been classified into Inservice and OutOfService base states.

state hierarchy for input belt

Implementation

The source code for the Input Conveyor Belt is based almost completely the sequence diagrams. The Input Conveyor Belt has been modeled as a hierarchical state machine.

Input Conveyor Belt Header File

Input Conveyor Belt Source File