![]() |
EM-ODP
3.8.0-1
Event Machine on ODP
|
#include <event_machine_timer.h>
Data Fields | |
em_timer_res_param_t | resparam |
uint32_t | num_tmo |
em_timer_flag_t | flags |
char | name [EM_TIMER_NAME_LEN] |
em_timer_ring_param_t | ringparam |
uint32_t | __internal_check |
EM timer attributes.
The type is used when creating a timer or inquiring its configuration later.
This needs to be initialized with em_timer_attr_init(), which fills default values to each field. After that the values can be modified as needed. Values set are considered a requirement, e.g. setting 'resparam.res_ns' to 1000(ns) requires the timer to have at least 1us resolution. The timer creation will fail if the implementation cannot support such a resolution (e.g. if it only goes down to 1500ns). The implementation is free to provide better than requested, but not worse.
To know the implementation specific limits, use em_timer_capability() and em_timer_res_capability().
When creating the alternative periodic ring timer, this type needs to be initialized with em_timer_ring_attr_init() instead. EM_TIMER_FLAG_RING will be set by em_timer_ring_attr_init() so it does not need to be manually set.
Definition at line 332 of file api/event_machine_timer.h.
uint32_t em_timer_attr_t::__internal_check |
Internal check - don't touch!
EM will verify that em_timer_attr_init() has been called before creating a timer
Definition at line 361 of file api/event_machine_timer.h.
em_timer_flag_t em_timer_attr_t::flags |
Extra flags. A set flag is a requirement
Definition at line 344 of file api/event_machine_timer.h.
char em_timer_attr_t::name[EM_TIMER_NAME_LEN] |
Optional name for this timer
Definition at line 346 of file api/event_machine_timer.h.
uint32_t em_timer_attr_t::num_tmo |
Maximum simultaneous timeouts
Definition at line 342 of file api/event_machine_timer.h.
em_timer_res_param_t em_timer_attr_t::resparam |
Resolution parameters for em_timer_create(). Used when creating normal one shot or periodic timers, but not when creating periodic ring timers (see ringparam below instead). (cleared by em_timer_ring_attr_init() when using a ring timer)
Definition at line 339 of file api/event_machine_timer.h.
em_timer_ring_param_t em_timer_attr_t::ringparam |
Parameters specifically for em_timer_ring_create(). Used when creating an alternative periodic ring timer. (cleared by em_timer_attr_init() since not needed in that case)
Definition at line 353 of file api/event_machine_timer.h.