API Reference Manual
1.47.0
|
Timer pool parameters. More...
#include <timer_types.h>
Data Fields | |
odp_timer_type_t | timer_type |
Timer type. More... | |
odp_timer_clk_src_t | clk_src |
Clock source for timers. More... | |
odp_timer_exp_mode_t | exp_mode |
Timer expiration mode. More... | |
uint64_t | res_ns |
Timeout resolution in nanoseconds. More... | |
uint64_t | res_hz |
Timeout resolution in hertz. More... | |
uint64_t | min_tmo |
Minimum relative timeout in nanoseconds. More... | |
uint64_t | max_tmo |
Maximum relative timeout in nanoseconds. More... | |
struct { | |
odp_fract_u64_t base_freq_hz | |
Timer pool base frequency in hertz. More... | |
uint64_t max_multiplier | |
Maximum base frequency multiplier. More... | |
} | periodic |
Periodic timer parameters. More... | |
uint32_t | num_timers |
Number of timers in the pool. | |
uint16_t | priority |
Timer pool priority. More... | |
int | priv |
Thread private timer pool. More... | |
Timer pool parameters.
Definition at line 289 of file api/spec/timer_types.h.
odp_timer_type_t odp_timer_pool_param_t::timer_type |
Timer type.
Select whether the pool is created for single shot (ODP_TIMER_TYPE_SINGLE) or periodic (ODP_TIMER_TYPE_PERIODIC) timers. All timers in a pool are of the same type. Timer capabilities specify how many pools of each type are supported.
The default value is ODP_TIMER_TYPE_SINGLE.
Definition at line 298 of file api/spec/timer_types.h.
odp_timer_clk_src_t odp_timer_pool_param_t::clk_src |
Clock source for timers.
The default value is ODP_CLOCK_DEFAULT.
Definition at line 303 of file api/spec/timer_types.h.
odp_timer_exp_mode_t odp_timer_pool_param_t::exp_mode |
Timer expiration mode.
The default value is ODP_TIMER_EXP_AFTER.
Definition at line 308 of file api/spec/timer_types.h.
uint64_t odp_timer_pool_param_t::res_ns |
Timeout resolution in nanoseconds.
Timer pool must serve timeouts with this or higher resolution. The minimum valid value (highest resolution) is defined by timer resolution capability. When this parameter is used, set 'res_hz' to zero. The default value is zero.
Definition at line 314 of file api/spec/timer_types.h.
uint64_t odp_timer_pool_param_t::res_hz |
Timeout resolution in hertz.
This may be used to specify the highest required resolution in hertz instead of nanoseconds. When this parameter is used, set 'res_ns' to zero. The default value is zero.
Definition at line 319 of file api/spec/timer_types.h.
uint64_t odp_timer_pool_param_t::min_tmo |
Minimum relative timeout in nanoseconds.
All requested timeouts will be at least this many nanoseconds after the current time of the timer pool. Timer set functions return an error, if too short timeout was requested. The value may be also smaller than the requested resolution.
The default value is zero. Ignored when timer type is periodic.
Definition at line 329 of file api/spec/timer_types.h.
uint64_t odp_timer_pool_param_t::max_tmo |
Maximum relative timeout in nanoseconds.
All requested timeouts will be at most this many nanoseconds after the current time of the timer pool. Timer set functions return an error, if too long timeout was requested.
Ignored when timer type is periodic.
Definition at line 339 of file api/spec/timer_types.h.
odp_fract_u64_t odp_timer_pool_param_t::base_freq_hz |
Timer pool base frequency in hertz.
A periodic timer pool has a base frequency. Each timer of the pool has an expiration frequency that is an integer multiple of the base frequency. Depending on the implementation, base frequency may need to be selected carefully to avoid timer periods to drift against the source clock. Use odp_timer_periodic_capability() to check base frequency support, and resulting max_multiplier and resolution values.
Fraction part of the value is always less than one, see odp_timer_periodic_capability_t::base_freq_hz for details. The default value is zero.
An example with two timer frequencies: base_freq_hz.integer = 33333, .numer = 1, .denom = 3 max_multiplier = 30 timer A: freq_multiplier = 2 timer frequency: 2 * 33333 1/3 Hz = 66.6666..kHz timer B: freq_multiplier = 30 timer frequency: 30 * 33333 1/3 Hz = 1 MHz
Definition at line 367 of file api/spec/timer_types.h.
uint64_t odp_timer_pool_param_t::max_multiplier |
Maximum base frequency multiplier.
This is the maximum base frequency multiplier value (odp_timer_periodic_start_t::freq_multiplier) for any timer in the pool.
Definition at line 374 of file api/spec/timer_types.h.
struct { ... } odp_timer_pool_param_t::periodic |
Periodic timer parameters.
Additional parameters for periodic timers. Ignored when timer type is single shot.
uint16_t odp_timer_pool_param_t::priority |
Timer pool priority.
Timers allocated from pools with a higher priority value are served with higher priority than timers allocated from pools with a lower priority value. The prioritization algorithm is implementation specific. Note that lower priority timers may get delayed due to higher priority timer processing. All values between zero and 'max_priority' (see odp_timer_capability_t) are valid. The default value is zero.
Definition at line 389 of file api/spec/timer_types.h.
int odp_timer_pool_param_t::priv |
Thread private timer pool.
When zero, multiple thread may use the timer pool concurrently. When non-zero, only single thread uses the timer pool (concurrently). The default value is zero.
Definition at line 394 of file api/spec/timer_types.h.