A bit error rate or other performance characteristic of a communication link
is
monitored using a state machine. The state machine includes at least three states
— for example, a NO ALARM state, an ALARM DETECTION state, and an ALARM state.
A sliding window is used to determine when to transition from the ALARM DETECTION
state to the NO ALARM state or the ALARM state. A sliding window is also used to
determine when to transition from an ALARM state to a NO ALARM state. A respective
sum is calculated as a function of the sliding window for use in making such determinations.