EM-ODP  3.7.0
Event Machine on ODP
api/event_machine_timer.h File Reference
#include <inttypes.h>
Include dependency graph for api/event_machine_timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  em_fract_u64_t
 
struct  em_timer_res_param_t
 
struct  em_timer_ring_param_t
 
struct  em_timer_attr_t
 
struct  em_tmo_stats_t
 
struct  em_timer_capability_t
 
struct  em_tmo_args_t
 

Macros

#define EM_TIMER_API_VERSION_MAJOR   EM_API_VERSION_MAJOR
 
#define EM_TIMER_API_VERSION_MINOR   EM_API_VERSION_MINOR
 

Typedefs

typedef enum em_tmo_state_t em_tmo_state_t
 
typedef enum em_tmo_type_t em_tmo_type_t
 
typedef uint64_t em_timer_tick_t
 
typedef struct em_fract_u64_t em_fract_u64_t
 
typedef struct em_timer_res_param_t em_timer_res_param_t
 
typedef struct em_timer_ring_param_t em_timer_ring_param_t
 
typedef struct em_timer_attr_t em_timer_attr_t
 
typedef struct em_tmo_stats_t em_tmo_stats_t
 
typedef struct em_timer_capability_t em_timer_capability_t
 
typedef struct em_tmo_args_t em_tmo_args_t
 

Enumerations

enum  em_tmo_state_t { EM_TMO_STATE_UNKNOWN = 0, EM_TMO_STATE_IDLE = 1, EM_TMO_STATE_ACTIVE = 2, EM_TMO_STATE_INACTIVE = 3 }
 
enum  em_tmo_type_t { EM_TMO_TYPE_NONE = 0, EM_TMO_TYPE_ONESHOT = 1, EM_TMO_TYPE_PERIODIC = 2 }
 

Functions

void em_timer_attr_init (em_timer_attr_t *tmr_attr)
 
em_status_t em_timer_ring_attr_init (em_timer_attr_t *ring_attr, em_timer_clksrc_t clk_src, uint64_t base_hz, uint64_t max_mul, uint64_t res_ns)
 
em_status_t em_timer_capability (em_timer_capability_t *capa, em_timer_clksrc_t clk_src)
 
em_status_t em_timer_res_capability (em_timer_res_param_t *res, em_timer_clksrc_t clk_src)
 
em_status_t em_timer_ring_capability (em_timer_ring_param_t *ring)
 Check periodic ring timer capability. More...
 
em_timer_t em_timer_create (const em_timer_attr_t *tmr_attr)
 
em_timer_t em_timer_ring_create (const em_timer_attr_t *ring_attr)
 
em_status_t em_timer_delete (em_timer_t tmr)
 
em_timer_tick_t em_timer_current_tick (em_timer_t tmr)
 
em_tmo_t em_tmo_create (em_timer_t tmr, em_tmo_flag_t flags, em_queue_t queue)
 
em_tmo_t em_tmo_create_arg (em_timer_t tmr, em_tmo_flag_t flags, em_queue_t queue, em_tmo_args_t *args)
 
em_status_t em_tmo_delete (em_tmo_t tmo, em_event_t *cur_event)
 
em_status_t em_tmo_set_abs (em_tmo_t tmo, em_timer_tick_t ticks_abs, em_event_t tmo_ev)
 
em_status_t em_tmo_set_rel (em_tmo_t tmo, em_timer_tick_t ticks_rel, em_event_t tmo_ev)
 
em_status_t em_tmo_set_periodic (em_tmo_t tmo, em_timer_tick_t start_abs, em_timer_tick_t period, em_event_t tmo_ev)
 
em_status_t em_tmo_set_periodic_ring (em_tmo_t tmo, em_timer_tick_t start_abs, uint64_t multiplier, em_event_t tmo_ev)
 
em_status_t em_tmo_cancel (em_tmo_t tmo, em_event_t *cur_event)
 
em_status_t em_tmo_ack (em_tmo_t tmo, em_event_t next_tmo_ev)
 
int em_timer_get_all (em_timer_t *tmr_list, int max)
 
em_status_t em_timer_get_attr (em_timer_t tmr, em_timer_attr_t *tmr_attr)
 
uint64_t em_timer_get_freq (em_timer_t tmr)
 
uint64_t em_timer_tick_to_ns (em_timer_t tmr, em_timer_tick_t ticks)
 
em_timer_tick_t em_timer_ns_to_tick (em_timer_t tmr, uint64_t ns)
 
em_tmo_state_t em_tmo_get_state (em_tmo_t tmo)
 
em_status_t em_tmo_get_stats (em_tmo_t tmo, em_tmo_stats_t *stat)
 
em_tmo_type_t em_tmo_get_type (em_event_t event, em_tmo_t *tmo, bool reset)
 
void * em_tmo_get_userptr (em_event_t event, em_tmo_t *tmo)
 
em_timer_t em_tmo_get_timer (em_tmo_t tmo)
 
uint64_t em_timer_to_u64 (em_timer_t timer)
 
uint64_t em_tmo_to_u64 (em_tmo_t tmo)
 

Detailed Description

Event Machine timer

Definition in file api/event_machine_timer.h.