# Modules
:::warning
Is the alarm that is triggered the same alarm for each system?
Function takes param and selects which alarm is raised?
Same for signals to ACMS? - pass param to function and signal type is sent accordingly
:::
:::warning
What controls the vents? ACMS or each individual unit?
:::
:::warning
What happens when astronaught is in the pod needing to be purged?
Manual overide?
:::
### Example from Tony

## Biohazard Management System
- Biohazard sensors collect data logs
- analysed - appropriate return code
- Understands code from sensor analysis - reacts accordingly
- send lockdown signal to ACMS
- lockdown gates
- triggers alarm
- checking if astronauts are in pod
- air vent purge - code when finished
- check levels again
- ALL CLEAR signal if okay
- gates back to normal
Biohazard sensors detect biohazard levels above set limit -> Signal sent to ACMS and alarm is sounded -> ACMS receives lockdown signal -> All gates in affected pod are locked
Affected pod/airlock is purged using external air vents -> biohazard levels return to normal -> "ALL CLEAR" signal sent to ACMS -> gates resume normal operation
## Radiation monitoring system
- sensors read and monitor radiation levels
- if radiation levels exceed the normal value limit, the alarm is raised and signal sent to ACMS
- 20 second delay signal sent to ACMS before inititating lockdown
- When radiation levels are returned to normal, alarms are deactivated and "ALL CLEAR" signal is sent to the ACMS.
- Function 1: sensor reads radiation levels from external source and stores value in local variable. If local variable value > normal value, call alarm function???
## Fire Detection and Suppression System
- Sensors detect presence of fire
- If a fire is detected, signal sent to ACMS for lockdown after 20s delay
- Sends signal to use fire suppressant
- After the fire signal goes, purges suppressant
- Refills pod with oxygen
- Receives signal from AQMS when air is of good enough standard
- Sends all clear signal to ACMS
1 - sensor:
- If fire
- Send true signal to FDSS
- When fire is no longer present
- Send false signal to FDSS
2 - FDSS:
- If true signal received from sensor
- Send signal to ACMS asking for 20s delay before lockdown
- Wait 20s
- Add suppressant
- If false signal received after a true signal from sensor
- Purge suppressant
- Add oxygen
- When clean air signal received from AQMS
- Send all clear to ACMS
## Airlock Control Management System (ACMS)
## Air Quality Management System (AQMS)
- Sensors record concentrations of gases in the atmosphere
- Compares this to safe levels
- If outside safe limits, sends signal to ACMS after delay
- signal should contain which gas(es) fall outside of safe limits, as well as which pod(s) is affected
- Once ACMS receives signal, gates to the pod should lock
- Once gas levels return to normal, signal should be sent to ACMS to unlock the gates.
- Signal should contain which pod to unlock
<br/>
+ MonitorAirQuality
+ DoesExceedLimits
+ Yes:
+ Delay 20
+ SignalACMSLockdown(PodID, Gas)
+ While TRUE
+ SafeLevels
+ Yes:
+ SignalACMSUnlock(PodID)
+ BREAK
+
{"metaMigratedAt":"2023-06-16T15:01:43.808Z","metaMigratedFrom":"Content","title":"Modules","breaks":true,"contributors":"[{\"id\":\"c5a01de6-eda0-427f-8d72-ba5c03206325\",\"add\":893,\"del\":29},{\"id\":\"5e07b8cb-b23d-472f-a27b-4161228062bd\",\"add\":530,\"del\":2},{\"id\":\"cae86fdb-f9e2-43dd-aed4-eff3babace7e\",\"add\":859,\"del\":12},{\"id\":\"ffce7319-088e-4539-9112-f217cb5704ea\",\"add\":1193,\"del\":63}]"}