How besteaydogan/smart-home-console-app-c-plus-plus works
MSH is a console-based smart-home manager. The main workflow starts at the menu, where users inspect and manage devices or change home modes and states. Cameras and hazard detectors notify separate security protocols; hazard handling also cycles lights and records a fire-station call. Device operations, notifications, and mode changes are supported by shared managers and logging. The README documents capabilities beyond the sampled excerpts; those links are shown only where documented, and integrations are simulations rather than evidenced external services.
Main entry points: MSHSystem.h System coordinator · Managers.h Hazard protocol · Common.h Notifications · Devices.h Device types
Components 20
User interaction
- Console menu
zga/MSHSystem.h - Input handler
zga/Common.h
System coordination
- System coordinator
zga/MSHSystem.h - Device manager
zga/Managers.h - System states
zga/ModesStates.h - State memento
zga/ModesStates.h
Devices and modes
- Device factory
zga/Devices.h - Device types
zga/Devices.h - Camera detection
zga/Devices.h - Hazard sensors
zga/Devices.h - Home modes
zga/ModesStates.h
Safety protocols
- Motion protocol
zga/Managers.h - Hazard protocol
zga/Managers.h
Shared services
- Notifications
zga/Common.h - Event logger
zga/Common.h - System log
zga/msh_log.txt
Other components
- Home user
- Police response
- Fire station response
- SMS recipient
Connections 25
- Home user → Console menu: chooses actions
README.md - Console menu → Input handler: reads input
zga/MSHSystem.h - Console menu → System coordinator: changes mode/state
zga/MSHSystem.h - Console menu → Device manager: manages devices
zga/MSHSystem.h - Console menu → Device factory: creates devices
zga/MSHSystem.h - System coordinator → Device manager: applies modes
zga/MSHSystem.h - System coordinator → Motion protocol: initializes observer
zga/MSHSystem.h - System coordinator → Hazard protocol: initializes observer
zga/MSHSystem.h - System coordinator → System states: sets and restores
zga/MSHSystem.h - System coordinator → State memento: saves prior state
zga/MSHSystem.h - Device factory → Device types: creates instances
zga/Devices.h - Device manager → Device types: stores devices
zga/Managers.h - Device manager → Event logger: logs changes
zga/Managers.h - Home modes → Device types: powers devices
zga/ModesStates.h - Camera detection → Motion protocol: notifies motion
README.md - Hazard sensors → Hazard protocol: notifies hazards
README.md - Motion protocol → Event logger: logs alerts
zga/Managers.h - Motion protocol → Police response: simulates call
README.md - Hazard protocol → Device manager: cycles lights
zga/Managers.h - Hazard protocol → Notifications: records call
zga/Managers.h - Hazard protocol → Fire station response: simulates call
README.md - Device types → Notifications: reports failures
zga/Devices.h - Notifications → SMS recipient: simulates SMS
zga/Common.h - Notifications → Event logger: records events
zga/Common.h - Event logger → System log: writes entries
zga/Common.h