|
API Reference Manual
1.50.0
|
Periodic timer parameters. More...
#include <timer_types.h>
Data Fields | |
| odp_queue_t | queue |
| Destination queue. More... | |
| const void * | user_ptr |
| User pointer. More... | |
| struct { | |
| uint64_t multiplier | |
| Base frequency multiplier. More... | |
| } | base_mul |
| Parameters for ODP_TIMER_TYPE_PERIODIC_BASE_MUL timers. | |
| struct { | |
| odp_fract_u64_t freq_hz | |
| Timer frequency in hertz. More... | |
| } | freq |
| Parameters for ODP_TIMER_TYPE_PERIODIC_FREQ timers. | |
| struct { | |
| void(* init_fn )(void *uarea, uint32_t size, void *args, uint32_t index, uint32_t max_num) | |
| User area initialization function. More... | |
| void * args | |
| Pointer to application defined arguments to be passed to every call of 'init_fn'. More... | |
| } | uarea_init |
| Parameters for user area initialization. | |
Periodic timer parameters.
Definition at line 557 of file api/spec/timer_types.h.
| odp_queue_t odp_timer_periodic_param_t::queue |
Destination queue.
When timer expires, an ODP_EVENT_TIMEOUT event is sent to this queue. The event is from an implementation-created timeout pool configured during odp_timer_pool_create().
Definition at line 563 of file api/spec/timer_types.h.
| const void* odp_timer_periodic_param_t::user_ptr |
User pointer.
The provided user pointer value is copied into the timeout events and can be retrieved with odp_timeout_user_ptr() call. The default value is NULL.
Definition at line 570 of file api/spec/timer_types.h.
| uint64_t odp_timer_periodic_param_t::multiplier |
Base frequency multiplier.
Periodic timer expiration frequency is defined as a multiple of the timer pool base frequency 'base_freq_hz' (odp_timer_pool_param_t::periodic::base_mul::base_freq_hz): timer frequency (Hz) = 'base_freq_hz' * 'multiplier'. Valid values range from 1 to timer pool parameter 'max_multiplier' (odp_timer_pool_param_t::periodic::base_mul::max_multiplier). Depending on the implementation, a multiplier value that is a divisor of 'max_multiplier' may improve timer expiration accuracy: 'max_multiplier' = k * 'multiplier', where k is an integer. The default value is 1.
Definition at line 586 of file api/spec/timer_types.h.
| odp_fract_u64_t odp_timer_periodic_param_t::freq_hz |
Timer frequency in hertz.
Should be within the interval defined during timer pool configuration (see odp_timer_pool_param_t::periodic::freq::freq_hz). The default value is zero.
Definition at line 598 of file api/spec/timer_types.h.
| void(* odp_timer_periodic_param_t::init_fn) (void *uarea, uint32_t size, void *args, uint32_t index, uint32_t max_num) |
User area initialization function.
Application defined user area initialization function to be called during odp_timer_periodic_alloc() for the implementation-allocated timeout events for this timer. The events are from the implementation-created timeout pool configured as part of odp_timer_pool_create(). The default value is NULL.
| uarea | Pointer to the user area of an event |
| size | User area size |
| args | Pointer to application defined arguments |
| index | Index of the event (0..'max_num' - 1) in order |
| max_num | Maximum number of timeout events allocated for this timer |
Definition at line 617 of file api/spec/timer_types.h.
| void* odp_timer_periodic_param_t::args |
Pointer to application defined arguments to be passed to every call of 'init_fn'.
The default value is NULL.
Definition at line 623 of file api/spec/timer_types.h.