![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Public Member Functions | |
| void | OnExpired (stk::time::TimerHost *host) override |
| Callback invoked by the handler task when this timer expires. | |
| bool | IsActive () const |
| Check whether the timer is currently active. | |
| Ticks | GetDeadline () const |
| Get the absolute time in ticks at which the timer will expire. | |
| Ticks | GetTimestamp () const |
| Get the tick count at which the timer last expired. | |
| uint32_t | GetPeriod () const |
| Get the reload period of the timer. | |
| uint32_t | GetRemainingTicks () const |
| Get remaining ticks until the timer next expires. | |
Private Types | |
| typedef DListEntry< Timer, TClosedLoop > | DLEntryType |
| Convenience alias for this entry type. Used to avoid repeating the full template spelling. | |
| typedef DListHead< Timer, TClosedLoop > | DLHeadType |
| Convenience alias for the corresponding list head type. | |
Private Member Functions | |
| STK_NONCOPYABLE_CLASS (Timer) | |
| DLHeadType * | GetHead () |
| Get the list head this entry currently belongs to. | |
| DLEntryType * | GetNext () |
| Get the next entry in the list. | |
| DLEntryType * | GetPrev () |
| Get the previous entry in the list. | |
| bool | IsLinked () const |
| Check whether this entry is currently a member of any list. | |
| operator Timer * () | |
| Implicit conversion to a mutable pointer to the host object (T). | |
| operator const Timer * () const | |
| Implicit conversion to a const pointer to the host object (T). | |
| void | Link (DLHeadType *head, DLEntryType *next, DLEntryType *prev) |
| Wire this entry into a list between prev and next. | |
| void | Unlink () |
| Remove this entry from its current list. | |
Private Attributes | |
| Ticks | m_deadline |
| absolute expiration time (ticks) | |
| Ticks | m_timestamp |
| absolute time at which timer expired (ticks), updated by TimerHost | |
| uint32_t | m_period |
| reload period in ticks (0 = one-shot) | |
| volatile bool | m_active |
| true if active | |
| volatile bool | m_pending |
| true if pending to be handled | |
| volatile bool | m_rearming |
| true while a CMD_RESTART / CMD_START_OR_RESET is already in the command queue | |
| DLHeadType * | m_head |
Owning list head, or NULL when the entry is not linked. | |
| DLEntryType * | m_next |
Next entry in the list, or NULL (open list boundary) / first entry (closed loop). | |
| DLEntryType * | m_prev |
Previous entry in the list, or NULL (open list boundary) / last entry (closed loop). | |
Definition at line 833 of file freertos_stk.cpp.
|
inherited |
Convenience alias for this entry type. Used to avoid repeating the full template spelling.
Definition at line 70 of file stk_linked_list.h.
|
inherited |
Convenience alias for the corresponding list head type.
Definition at line 75 of file stk_linked_list.h.
|
inlineinherited |
Get the absolute time in ticks at which the timer will expire.
Definition at line 174 of file stk_time_timer.h.
References m_deadline.
Referenced by stk_timer_get_deadline(), and xTimerGetExpiryTime().
|
inlineinherited |
Get the list head this entry currently belongs to.
NULL if the entry is not linked. Definition at line 80 of file stk_linked_list.h.
|
inlineinherited |
Get the next entry in the list.
NULL if this is the last entry (open list) or the first entry (closed loop, where next wraps to first). TClosedLoop == true) this pointer is never NULL when the entry is linked. Definition at line 93 of file stk_linked_list.h.
|
inlineinherited |
Get the reload period of the timer.
Definition at line 185 of file stk_time_timer.h.
References m_period.
Referenced by stk_timer_get_period().
|
inlineinherited |
Get the previous entry in the list.
NULL if this is the first entry (open list) or the last entry (closed loop, where prev wraps to last). TClosedLoop == true) this pointer is never NULL when the entry is linked. Definition at line 109 of file stk_linked_list.h.
|
inlineinherited |
Get remaining ticks until the timer next expires.
Definition at line 472 of file stk_time_timer.h.
References stk::GetTicks(), m_active, and m_deadline.
Referenced by stk_timer_get_remaining_ticks().
|
inlineinherited |
Get the tick count at which the timer last expired.
Definition at line 180 of file stk_time_timer.h.
References m_timestamp.
Referenced by stk_timer_get_timestamp().
|
inlineinherited |
Check whether the timer is currently active.
Definition at line 168 of file stk_time_timer.h.
References m_active.
Referenced by osTimerDelete(), osTimerStop(), stk_timer_destroy(), stk_timer_is_active(), xTimerDelete(), xTimerGetExpiryTime(), xTimerStop(), and xTimerStopFromISR().
|
inlineinherited |
Check whether this entry is currently a member of any list.
true if linked (m_head != NULL); false otherwise. Definition at line 122 of file stk_linked_list.h.
|
inlineprivateinherited |
Wire this entry into a list between prev and next.
| [in] | head | The owning DListHead. Stored as a back-pointer for IsLinked() and ownership checks. |
| [in] | next | The entry that will follow this one, or NULL if this becomes the last entry. |
| [in] | prev | The entry that will precede this one, or NULL if this becomes the first entry. |
Definition at line 157 of file stk_linked_list.h.
|
inlineoverridevirtual |
Callback invoked by the handler task when this timer expires.
| [in] | host | Pointer to the TimerHost that fired this timer. |
Implements stk::time::TimerHost::Timer.
Definition at line 835 of file freertos_stk.cpp.
References PendCall::func, g_PendCallPipe, PendCall::param1, PendCall::param2, and stk::time::TimerHost::Stop().
|
inlineinherited |
Implicit conversion to a const pointer to the host object (T).
Definition at line 136 of file stk_linked_list.h.
|
inlineinherited |
Implicit conversion to a mutable pointer to the host object (T).
Definition at line 129 of file stk_linked_list.h.
|
privateinherited |
|
inlineprivateinherited |
Remove this entry from its current list.
Definition at line 181 of file stk_linked_list.h.
|
privateinherited |
true if active
Definition at line 201 of file stk_time_timer.h.
Referenced by GetRemainingTicks(), IsActive(), stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::Reset(), stk::time::TimerHost::SetPeriod(), stk::time::TimerHost::Start(), stk::time::TimerHost::Stop(), Timer(), and stk::time::TimerHost::UpdateTime().
|
privateinherited |
absolute expiration time (ticks)
Definition at line 198 of file stk_time_timer.h.
Referenced by GetDeadline(), GetRemainingTicks(), stk::time::TimerHost::ProcessCommands(), Timer(), and stk::time::TimerHost::UpdateTime().
|
privateinherited |
Owning list head, or NULL when the entry is not linked.
Definition at line 198 of file stk_linked_list.h.
|
privateinherited |
Next entry in the list, or NULL (open list boundary) / first entry (closed loop).
Definition at line 199 of file stk_linked_list.h.
|
privateinherited |
true if pending to be handled
Definition at line 202 of file stk_time_timer.h.
Referenced by stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::ProcessTimers(), Timer(), and stk::time::TimerHost::UpdateTime().
|
privateinherited |
reload period in ticks (0 = one-shot)
Definition at line 200 of file stk_time_timer.h.
Referenced by GetPeriod(), stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::Reset(), stk::time::TimerHost::SetPeriod(), Timer(), and stk::time::TimerHost::UpdateTime().
|
privateinherited |
Previous entry in the list, or NULL (open list boundary) / last entry (closed loop).
Definition at line 200 of file stk_linked_list.h.
|
privateinherited |
true while a CMD_RESTART / CMD_START_OR_RESET is already in the command queue
Definition at line 203 of file stk_time_timer.h.
Referenced by stk::time::TimerHost::ProcessCommands(), stk::time::TimerHost::PushCommand(), and Timer().
|
privateinherited |
absolute time at which timer expired (ticks), updated by TimerHost
Definition at line 199 of file stk_time_timer.h.
Referenced by GetTimestamp(), Timer(), and stk::time::TimerHost::UpdateTime().