We did this in the previous lecture (under ‘Previous Activity’)
Again, covered these definitions in the previous lecture. To clarify; sporadic has a minimum inter-arrival time, otherwise it’s aperiodic.
For Aperiodics in Ada you need a task and a protected object. The protected object holds the trigger event that will trigger the release of the task. Then, the task just:
loop
Aperiodic_Controller.Wait_For_Next_Interrupt;
--action
end loop
Where Aperiodic_Controller is a protected object with a boolean variable as the barrier for entry.
You can use Tasks, or Events, for doing this sort of thing.
Interrupts are events.
NEW (apparently). Timing events happen when a defined clock reaches a specified value. This is supported by the Ada.Real_Time.Timing_Events package. Apparently this package is also a good example of how newer packages look in Ada (the style, that is).
Comments
blog comments powered by Disqus