Skip to document

Observe and react

Observe and react
Course

Software Engineering (CSPC 111)

140 Documents
Students shared 140 documents in this course
Academic year: 2022/2023
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Don Mariano Marcos Memorial State University

Comments

Please sign in or register to post comments.

Preview text

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 and 21) 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., 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

audible alarm. The sensor system is normally powered by mains power but is equipped with a battery backup. Power loss is detected using a separate power circuit monitor that monitors the mains voltage. If a voltage drop is detected, the system assumes that intruders have interrupted the power supply, so an alarm is raised.

A process architecture for the alarm system is shown in Figure 21. The arrows represent signals sent from one process to another. This system is a “soft” real-time system that does not have stringent timing requirements. The sensors only need to detect the presence of people rather than high-speed events, so they only need to be polled 2 or 3 times per second. I cover the timing requirements for this system in Section 21.

I have already introduced the stimuli and responses in this alarm system in Figure 21. These responses are used as a starting point for the system design. The Observe and React pattern is used in this design. There are observer processes associated with each type of sensor and reactor processes for each type of reaction. A single analysis process checks the data from all of the sensors. The display processes in the pattern are combined into a single display process.

Was this document helpful?

Observe and react

Course: Software Engineering (CSPC 111)

140 Documents
Students shared 140 documents in this course
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