mirror of https://github.com/FOME-Tech/fome-fw.git
doc
This commit is contained in:
parent
e61e4c4b09
commit
07b61ee0b4
|
@ -65,14 +65,10 @@ struct scheduling_s {
|
||||||
virtual_timer_t timer;
|
virtual_timer_t timer;
|
||||||
#endif /* EFI_SIGNAL_EXECUTOR_SLEEP */
|
#endif /* EFI_SIGNAL_EXECUTOR_SLEEP */
|
||||||
|
|
||||||
/**
|
// timestamp represented as 64-bit value of ticks since MCU start
|
||||||
* timestamp represented as 64-bit value of ticks since MCU start
|
|
||||||
*/
|
|
||||||
efitick_t momentX;
|
efitick_t momentX;
|
||||||
|
|
||||||
/**
|
// Scheduler implementation uses a sorted linked list of these scheduling records.
|
||||||
* Scheduler implementation uses a sorted linked list of these scheduling records.
|
|
||||||
*/
|
|
||||||
scheduling_s *nextScheduling_s = nullptr;
|
scheduling_s *nextScheduling_s = nullptr;
|
||||||
|
|
||||||
action_s action;
|
action_s action;
|
||||||
|
@ -81,9 +77,23 @@ struct scheduling_s {
|
||||||
|
|
||||||
struct ExecutorInterface {
|
struct ExecutorInterface {
|
||||||
/**
|
/**
|
||||||
* see also scheduleByAngle
|
* @brief Schedule an action to be executed in the future.
|
||||||
|
*
|
||||||
|
* scheduleByAngle is useful if you want to schedule something in terms of crank angle instead of time.
|
||||||
|
*
|
||||||
|
* @param msg Name of this event to use for logging in case of an error.
|
||||||
|
* @param scheduling Storage to use for the scheduled event. If null, one will be used from the pool.
|
||||||
|
* @param targetTime When to execute the specified action. If this time is in the past or
|
||||||
|
* very near future, it may execute immediately.
|
||||||
|
* @param action An action to execute at the specified time.
|
||||||
|
*/
|
||||||
|
virtual void scheduleByTimestampNt(const char *msg, scheduling_s *scheduling, efitick_t targetTime, action_s action) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Cancel the specified scheduling_s so that, if currently scheduled, it does not execute.
|
||||||
|
*
|
||||||
|
* @param scheduling The scheduling_s to cancel.
|
||||||
*/
|
*/
|
||||||
virtual void scheduleByTimestampNt(const char *msg, scheduling_s *scheduling, efitick_t timeNt, action_s action) = 0;
|
|
||||||
virtual void cancel(scheduling_s* scheduling) = 0;
|
virtual void cancel(scheduling_s* scheduling) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue