Skip to content

This is the Alarm system implementation for Lab 2 of Media Processing course

Notifications You must be signed in to change notification settings

polyakovkrylo/alarmsystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alarm system

Description

This is the Alarm System implementation for Lab 2 of Media Processing course.

Usage

Build libraries project in src and install it by running make install in build directory. Afterwards test project can be built and run.

Main class diagram:

Following diagram represents the model of the system divided into packages. Each package reprsesents separate module.

img def

Documentation

Doxygen generated documentation is available in docs/html/index.html

Project structure

AlarmSensors

AlarmSensors group is located in alarm-sensor directory and includes sensor classes, i.e. AbstractSensor class, which defines common attributes and operations and its different implementation, for instance, SmokeSensor class. Whenever new sensor class is created it is sufficient that this class should be inherited from AbstractSensor class, and update() function should be defined.

Here is the class diagram of AlarmSensors package:

img def

AlarmComposite

AlarmComposite group is an implementation of composite pattern. It is located in alarm-composite directory. It includes base component class AlarmComponent and its successor class AlarmComponentGroup. Leaf implementation AbstractSensor is a part of AlarmSensors group.

Here is the class diagram of AlarmComposite package:

img def

AlarmObserver

AlarmObserver group is located in alarm-observer. It includes AlarmObservable class, which is a base for any actual implementation of observable objects. There are two major differences between Observer and Strategy. Firstly, Observer can handle a message coming from Observable, when Strategy can only be activated/deactivated by strategy owner. Besides, Observer passes the message to its parent, allowing to notify the Observer of the complete Component group. Observer is implemented in AlarmObserver class. In order to create new alarm observer, one must inherit it from AlarmObserver base class and optionally redefine handle function.

Here is the class diagram of AlarmObserver package:

img def

AlarmStrategies

AlarmStrategies group is located in alarm-strategy. It includes AlarmStrategy class, which is a base for any actual implementation of strategy. Context is implemented in AlarmStrategyOwner class. In order to create new alarm strategy, one must inherit it from AlarmStrategy base class.

Here is the class diagram of AlarmStrategies package:

img def

TODO

  • Implement Composite structure (classes AlarmComponent, AlarmComponentGroup)
  • Implement Strategy structure ( classes AlarmStrategy and AlarmStrategyOwner)
  • Implement AlarmSensor class
  • Implement AlarmStrategy successors
  • Implement AlarmSensor successors
    • Implement SmokeSensor
    • Implement MotionSensor
    • Implement ToxicSensor
  • Create documentation
  • Reorganize project structure
  • Implement operators
    • Implement operator++
    • Implement operator--
    • Implement operator<< for each type of sensor
  • Add activation flag to AlarmComponent and activation counter to AlarmStrategy
  • Parent attribute for AlarmComponent
  • Implement Observer structure
  • Sorting and search algorithms
  • Add model to the project
  • Move sources to separate folder

About

This is the Alarm system implementation for Lab 2 of Media Processing course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published