
Redundancy Controller
Page
42
Document Number: 90-005-0030_E
State Diagram Notation
In the state diagram each state that a device can assume is represented graphically as a circle. The
single-digit number in the circle identifies the state. All permissible transitions between states are
represented graphically by arrows between them. Each transition is qualified by a condition that
must be true in order for the transition to occur. The device will remain in its current state if the
conditions which qualify transitions leading to other states are false or conditions that qualify
pseudo-transitions are true. A pseudo-transition is a transition that occurs within the same state
and is represented graphically by arrows leaving from and arriving at the same state.
The following mnemonics describe transitions in the state diagram.
STX
Start-of-text ASCII control character, used as a header in the
SAbus command messages. It identifies the beginning of a new
message.
ETX
End-of-text ASCII control character used as a termination
character in SAbus messages to identify the end of data.
Checksum
The longitudinal redundancy check (LRC) byte is the last byte
in the SAbus message data block. The value of the LRC byte is
the exclusive OR of all message bytes including the STX and
the ETX bytes and is used to detect errors during transmission
of data.
The following table defines the transitions between states.
State
Name
Description
1
Device Idle
State
In State 1, a device is ready to receive a new message, and therefore, must complete any
previous message reception.
A device always powers on in State 1.
A device will exit State 1 and enter State 2 (device addressed state) only if STX byte is
received.
2
Device
Addressed
state
In State 2, a device is waiting to receive the address byte, the second byte of the SAbus
command message. A device will exit State 2 and enter:
State 3 (device data state) if received address byte equals a device's address.
State 1 (device idle state) if received address byte does not equal a device's
address.
State 2 (remain in current state) if STX byte is received which may be the beginning
of a new message data block.
3
Device Data
State
In State 3, a device is engaged in receiving the command and associated data bytes sent
by a master/controller. A device will exit State 3 and enter:
State 4 (device data error state) if ETX byte is received signifying the end of data in
the message.
State 1 (device idle state) if invalid command, or data character, or incorrect
number of data bytes are received.
4
Device Data
Error State
In State 4, a device is waiting to receive a checksum byte which tests the transmitted
message for errors. A device will exit state 4 and enter:
State 5 (command execute state) if a checksum byte is true (received LRC value of
checksum byte equals LRC value computed by a device during message reception)
State 1 (device idle state) if a checksum byte is false (received LRC value of
checksum byte does not equal LRC value computed by a device during message
reception).
5
Command
Execute
In State 5, a device, having completed a reception of SAbus message, executes a
device's function specified by a command byte. A device will send and appropriate