|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
See ab_gp_cycle_ticks.h. More...
Go to the source code of this file.
Functions | |
| rte_status_t | ab_gp_cycle_ticks_setup (ab_gp_cycle_ticks_t *ticks) |
Creates the mutex and clears the count. Setup phase only (rte_mutex_create() is a setup-only resource, ADR-026); call before the timer that posts is created. Does not check for an earlier setup of ticks. | |
| rte_status_t | ab_gp_cycle_ticks_post (ab_gp_cycle_ticks_t *ticks) |
| Adds one tick (timer callback side). The count saturates at UINT32_MAX. | |
| rte_status_t | ab_gp_cycle_ticks_take (ab_gp_cycle_ticks_t *ticks, uint32_t *out_pending) |
| Returns every pending tick and clears the count, as one critical section (cycle thread side). | |
| rte_status_t | ab_gp_cycle_ticks_teardown (ab_gp_cycle_ticks_t *ticks) |
| Destroys the mutex. Call only when no other task can post or take any more (the posting timer is destroyed). The instance is not set up afterwards, whatever the result. | |
See ab_gp_cycle_ticks.h.
Definition in file ab_gp_cycle_ticks.c.
| rte_status_t ab_gp_cycle_ticks_setup | ( | ab_gp_cycle_ticks_t * | ticks | ) |
Creates the mutex and clears the count. Setup phase only (rte_mutex_create() is a setup-only resource, ADR-026); call before the timer that posts is created. Does not check for an earlier setup of ticks.
| ticks | instance to set up, all-zero or torn down |
ticks is NULL; otherwise the status of rte_mutex_create() (the instance then stays not set up) Definition at line 9 of file ab_gp_cycle_ticks.c.
| rte_status_t ab_gp_cycle_ticks_post | ( | ab_gp_cycle_ticks_t * | ticks | ) |
Adds one tick (timer callback side). The count saturates at UINT32_MAX.
| ticks | instance to post to |
ticks is NULL; RTE_STATUS_INVALID_STATE before setup or after teardown; otherwise the status of the failed rte_mutex_lock_timed() (RTE_STATUS_TIMEOUT after AB_GP_CYCLE_TICKS_LOCK_TIMEOUT_MS; the tick is then not counted) or of the failed rte_mutex_unlock() (the tick is then counted) Definition at line 30 of file ab_gp_cycle_ticks.c.
| rte_status_t ab_gp_cycle_ticks_take | ( | ab_gp_cycle_ticks_t * | ticks, |
| uint32_t * | out_pending ) |
Returns every pending tick and clears the count, as one critical section (cycle thread side).
| ticks | instance to take from |
| out_pending | receives the number of ticks posted since the previous take; 0 when none. Written only when the lock was acquired. |
ticks or out_pending is NULL; RTE_STATUS_INVALID_STATE before setup or after teardown; otherwise the status of the failed rte_mutex_lock_timed() (the count is then unchanged) or of the failed rte_mutex_unlock() (the count is then already taken and cleared) Definition at line 57 of file ab_gp_cycle_ticks.c.
| rte_status_t ab_gp_cycle_ticks_teardown | ( | ab_gp_cycle_ticks_t * | ticks | ) |
Destroys the mutex. Call only when no other task can post or take any more (the posting timer is destroyed). The instance is not set up afterwards, whatever the result.
| ticks | instance to tear down |
ticks is NULL; RTE_STATUS_INVALID_STATE when it is not set up; otherwise the status of rte_mutex_destroy() Definition at line 83 of file ab_gp_cycle_ticks.c.