Expand description
Contains the data definition for the time profile of the feed Defines the data structures that represent a complete, multistep feeding process.
This module provides the Feedpattern and FeedPhase structs, which together describe
a single, executable feeding profile. These structures are typically populated with data
retrieved from the database and are used by the Feed controller to orchestrate the
feeding sequence.
§Key Components
-
Feedpattern: Represents a complete feeding profile. It consists of a profile name and a vector of one or moreFeedPhases. It acts as a container for the entire sequence of actions. -
FeedPhase: Represents a single step within aFeedpattern. Each phase is composed of two parts:- A pause period, during which certain pumps can be temporarily disabled.
- A feed period, where the feeder motor is activated for a specific duration.
The state (on or off) of the skimmer and various pumps can be configured independently for both the pause and feed parts of a phase.
§Design and Architecture
The design allows for complex and flexible feeding schedules. A simple feeding might
consist of a single FeedPhase (e.g., “pause pumps, run feeder, resume pumps”). A more
complex pattern could involve multiple phases to dispense multiple quantities of food or
to allow food to circulate before resuming full filtration.
§Example of a Multi-Phase Pattern
A Feedpattern could be configured to:
- Phase 1: Pause the main pumps and skimmer, then run the feeder for 2 seconds to dispense food.
- Phase 2: Keep pumps off for a 10-second pause to let fish eat, with no feeder activity.
- Phase 3: Run the feeder for 5 seconds to dispense more food.
- Phase 4: Wait another 15 seconds before all devices resume normal operation.
This entire sequence would be contained within a single Feedpattern struct as a Vec<FeedPhase>.
Structs§
- Feed
Phase - Holds the configuration data of one feed phase.
- Feedpattern
- Holds the configuration data of one feed pattern.