Expand description
Aquarium control is an open-source application that is part of a control system for salt-water aquariums. It contains the following functionality:
- Data acquisition of sensors (water temperature, pH, conductivity, ambient air temperature, ambient humidity)
- Fresh water refill
- Heating control
- Ventilation control
- Automatic feeding
- Balling mineral dosing
ModulesΒ§
- beacon π
- This container module features all functionality related to RGB LED.
- database π
- This is the container module for the database communication. Communicating with the SQL database includes preparing SQL queries, executing the queries and processing of query results.
- dispatch π
- Communication with the user via client application or webserver using POSIX message queues.
- food π
- This container module features all the functionality to execute the automatic feeding.
- launch π
- This container module features all supporting functionality for the main module.
- mineral π
- This container module features all the functionality to execute the Balling mineral dosing.
- permission π
- The container module contains the schedule checker.
- recorder π
- This container module contains all functionality to periodically store signals either in one table of the SQL database or in specific text files stored in the RAM disk
- relays π
- This container module features all functionality to actuate the relays which control the actuators.
- sensors π
- This container module features all functionality to read and postprocess sensor data.
- simulator π
- This container module features all functionality to communicate with the test server via TCP.
- thermal π
- This container module features all functionality to either cool the water using ventilation heat the water using a heater.
- utilities π
- This container module features all functionality that could not be assigned to any other container module.
- watchmen π
- This container module features all functionality to monitor the control system.
- water π
- This container module features all functionality to replace the evaporated water with fresh water.
MacrosΒ§
- check_
quit_ increment_ counter_ ping_ database - A macro to handle common end-of-loop tasks for Balling and Feed.
- manage_
cycle_ time_ thermal - A macro to manage the timing of a fixed-duration loop applicable to both thermal control modules.
- perform_
schedule_ check - A macro to perform a request-response check with the schedule_check module.
- update_
thermal_ set_ values - A macro to update set values from a data source and handle logging on failure.
StructsΒ§
- Arc
- A thread-safe reference-counting pointer. βArcβ stands for βAtomically Reference Countedβ.
- Atomic
Bool - A boolean type which can be safely shared between threads.
- Mutex
- A mutual exclusion primitive useful for protecting shared data
FunctionsΒ§
- check_
argument_ πfor_ valid_ config_ file_ name - Checks if the provided string is a valid path to a
.tomlconfiguration file. - check_
is_ πcommand - Checks if a command-line argument is a recognized command and executes it.
- display_
usage π - Displays the valid command line parameter combinations
- is_
running_ πas_ root - Checks if the current process is running with root (UID 0) privileges.
- main π
- The main function is a simple error handler. The main entry point for the application is within the run() function.
- run π
- The main entry point of the Aquarium Control application.