Software detailed design
This document describes the detailed design of software. It aims at providing a developer view of how the software is built and structured.
Data design
There are a number of sampled inputs to the system:
- Water level (0 – 5000 mm)
- Current battery voltage (0 – 4.2 V)
- Current PV voltage (0 – ?? V)
- Internal temperature (-20 – 100 °C)
These are all sampled using the same ADC peripheral of the board.
Heartbeat
Draft
This section is still a draft. It should contain the following information:
- Metric types (Gauge, Counter, Timed counter)
- Collected metrics (water level, WiFi error count, ...)
- Heartbeat metadata (firmware version, serial number, ...)
Flash layout
Draft
This section is still a draft. It should contain a table of flash addresses and what is stored at each location. It should also include typical write periods.
Procedural design
Draft
This section is still a draft. It should contain details on procedures used by the device:
- Taking a sample
- Uploading heartbeat metrics
Algorithms
Draft
This section is still a draft. It should describe algorithms used in the project, such as measurement filtering.
Interface design
Draft
This section is still a draft.
- Remote API
Component design
Draft
This section is still a draft. Should contain information about various building blocks.
- Embassy
- adc_sensor
- cross
- filter
- heartbeat
Error handling
Draft
This section is still a draft. Should contain information about how errors are handled.
Scheduling
The application uses a The application runs the following tasks.
Task name | Period | Execution time |
---|---|---|
High freq. sampling | 1 minute | 5 seconds |
Low freq. sampling | 1 hour | 10 seconds |
Heartbeat reporting | 1 hour | 30 seconds |
Note
The data in the table are only estimates so far.