- Information
- AI Chat
Was this document helpful?
Observe and react
Course: Software Engineering (CSPC 111)
140 Documents
Students shared 140 documents in this course
University: STI West Negros University
Was this document helpful?
Observe and react
Monitoring systems are an important class of embedded real-time systems. A
monitoring system examines its environment through a set of sensors and usually
displays the state of the environment in some way. This could be on a built-in screen, on
special-purpose instrument displays, or on a remote display. If the system detects some
exceptional event or sensor state, the monitoring system takes some action.
This often involves raising an alarm to draw an operator’s attention to the event.
Sometimes the system may initiate some other preventative action, such as shutting
down the system to preserve it from damage.
The Observe and React pattern (Figures 21.6 and 21.7) is commonly used in monitoring
systems. The values of sensors are observed, and the system initiates actions that
depend on these sensor values. Monitoring systems may be composed of several
instantiations of the Observe and React pattern, one for each type of sensor in the
system. Depending on the system requirements, you may then optimize the design by
combining processes (e.g., you may use a single display process to display the
information from all of the different types of sensor).
As an example of the use of this pattern, consider the design of a burglar alarm system
to be installed in an office building:
A software system is to be implemented as part of a burglar alarm system for
commercial buildings. This uses several different types of sensors. These
sensors include movement detectors in individual rooms, door sensors that
detect corridor doors opening, and window sensors on ground-floor windows
that can detect when a window has been opened.
When a sensor detects the presence of an intruder, the system automatically
calls the local police and, using a voice synthesizer, reports the location of the
alarm. It switches on lights in the rooms around the active sensor and sets off an