docs/reference/system-functional/sequencing.md
Spacecraft Sequences, are an ordered list of commands that are executed together. Sequences store a series of commands in a specific order and with specific timing to be dispatched later in that order and with that timing. Any software command can be executed in a sequence.
In Fprime this capability is handled by the Sequence Dispatcher and Command Sequencer components. The Sequence Dispatcher component is responsible for coordinating the execution of multiple sequences while the Command Sequence component is instanced for each sequence to be executed.
Prior to execution, sequences are simply files contained within the file system. They are managed via file system functionality and stored within the defined partitions of the file system.
Maximum Sequence Size is defined at compile time and is configurable.
Sequence validation is composed of the following checks:
If any of these validation checks fail, the sequence will not load and an error will be reported.
Fprime can be configured with multiple Sequence Dispatcher components and multiple Command Sequencer components. Each Command Sequencer component is assigned to a specific Sequence Dispatcher component creating a pool of sequence "engines" to execute.
The Sequence Dispatcher component routes the sequence file to an available Command Sequencer component for execution. If no Command Sequencer components are available, the sequence will be rejected.
Each Command Sequencer component executes one sequence at a time.
Sequences can be executed in two ways:
These modes are selected via command prior to the execution of the sequence.
If the sequence is in progress, the mode switch will be rejected.
Fprime sequences can support either a relative time or an absolute time. This is defined per command in the sequence.
Absolute times are defined in UTC and are converted to spacecraft time based on the spacecraft clock. If an absolute timed command is in the past, it will be executed immediately.
Relative times are defined in seconds and are executed relative to different conditions based on several factors:
If a command in a sequence fails, the sequence will immediately abort.