By: P. Molin, L. Ohlsson
Published in: PLoPD3
Category: Concurrent Systems, Distributed Systems, Fire Alarm Systems
Summary: Architecture of an object-oriented framework for a family of fire alarm systems.
A fire alarm system must detect extraordinary events. To implement dependencies and information flow between alarm detection and actuators, user interfaces, and other outputs, represent deviations from normal states as a deviation with subclasses alarm, fault, and disturbance. Deviations are the unit of distribution in the system. Deviations are replicated to all control units. The set of deviations defines the system state.
To separate the logical behavior of a fire alarm system from the variation among input sensors and output actuators, define the interface between the logical part and the input/output part as a set of points, InputPoints, or OutputPoints. A point has binary state--active or inactive.
You're using Deviation and need a uniform way of accessing all instances regardless of their distribution on different nodes. To provide a standardized interface, collect all instances in pools--virtual containers that contain all instances of the class. A copy of each pool should be on each node in the system.
You're using Point. Most points have state-dependent behavior. Use State [Gamma+95], but replace the state member variable with a member function. The current state is not stored explicitly but computed when state-dependent behavior is invoked.
To preserve inherent concurrency and meet requirements for performance, demonstrability, and memory efficiency, while still separating scheduling strategies from task behavior, represent each periodic task as a periodic object, where an abstract class defines the pure virtual function tick. Different tasks are implemented as subclasses that define a tick operation. Define scheduling classes to iterate over a collection of periodic objects with different scheduling strategies.
Designate devices as periodic objects. Let them pump/push data to points. Control flow follows data flow, and points are passive, so no buffers are needed between points and devices.