ADCS.flight_software.tasks.task module¶
- class ADCS.flight_software.tasks.task.Task(name, callback, rate_hz, wcet, priority, enabled=True)[source]¶
Bases:
objectPeriodic task definition for a time-triggered single-core scheduler.
This class models a cooperative, non-preemptive, periodic task intended to be executed by a time-triggered scheduler such as
TTC_Single_Core.Each task is characterized by:
A fixed execution period \(T\)
A fixed worst-case execution time (WCET) \(C\)
A static priority
A callback function representing the task body
The execution period is derived from the configured rate:
\[T = \frac{1}{f}\]where \(f\) is the task rate in Hertz.
Scheduling and execution assumptions:
Tasks are non-preemptive
If a task executes, it consumes exactly its WCET
If insufficient CPU budget exists, the task is skipped
WCET overruns are not modeled at this level
Task releases are consumed only upon execution
This abstraction is designed for:
Deterministic schedulability analysis
TTC (Time-Triggered Cooperative) flight software
Offline simulation and testing
- Parameters:
name (str)
callback (Callable)
rate_hz (float)
wcet (float)
priority (int)
enabled (bool)