EM-ODP  3.8.0-1
Event Machine on ODP
em_timer_attr_t Struct Reference

#include <event_machine_timer.h>

Collaboration diagram for em_timer_attr_t:

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
 

Detailed Description

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.

See also
em_timer_attr_init(), em_timer_create(), em_timer_ring_attr_init(), em_timer_ring_create(), em_timer_
Examples
timer_hello.c, timer_test.c, timer_test_periodic.c, and timer_test_ring.c.

Definition at line 332 of file api/event_machine_timer.h.

Field Documentation

◆ __internal_check

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.

◆ flags

em_timer_flag_t em_timer_attr_t::flags

Extra flags. A set flag is a requirement

Examples
timer_test_ring.c.

Definition at line 344 of file api/event_machine_timer.h.

◆ name

char em_timer_attr_t::name[EM_TIMER_NAME_LEN]

Optional name for this timer

Examples
timer_hello.c, timer_test.c, timer_test_periodic.c, and timer_test_ring.c.

Definition at line 346 of file api/event_machine_timer.h.

◆ num_tmo

uint32_t em_timer_attr_t::num_tmo

Maximum simultaneous timeouts

Examples
timer_hello.c, timer_test.c, timer_test_periodic.c, and timer_test_ring.c.

Definition at line 342 of file api/event_machine_timer.h.

◆ resparam

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)

Examples
timer_hello.c, timer_test.c, timer_test_periodic.c, and timer_test_ring.c.

Definition at line 339 of file api/event_machine_timer.h.

◆ ringparam

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)

Examples
timer_test_ring.c.

Definition at line 353 of file api/event_machine_timer.h.


The documentation for this struct was generated from the following file: