Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

timerhandler.h File Reference


Detailed Description

The timerhandler simply generates an event according to specified schedule. This is useful to drive handlers that are required to compute/react according to a schedule.

Wire keywords (standard handler keywords documented in Wire )

Example:
set interrupt create event { name: "timer(1sec)" priority: 1 } create handler timer { interrupt: $interrupt cycletime: 1 }

Events generated:
Event NameTypeDescription
interrupt AW_EVENT_TYPE_TIMESTAMP It's time :)

Events accepted:
TypeDescription
Any Generate an event of type AW_EVENT_TYPE_TIMESTAMP with current timestamp

NOTE: this is the simplest handler and useful as a template when developing new handlers.

#include "monitor.h"
#include "wire.h"

Go to the source code of this file.

Data Structures

struct  aw_timerhandler_events_t
 Events generated. More...

struct  aw_timerhandler_t
 Timer handler object. More...


Functions

aw_timerhandler_t * aw_create_timerhandler (const aw_timerhandler_events_t *events, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger)
 Create a timer handler.

void aw_free_timerhandler (aw_timerhandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_timerhandler (aw_wire_mkhandler_args_t *args)
 Create a timer handler using "wire". See header doc for keyword documentation.


Function Documentation

aw_timerhandler_t* aw_create_timerhandler (  const aw_timerhandler_events_t *  events,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  logger
) 
 

Create a timer handler.

Parameters:
events Events to generate
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
logger Logger object
Returns:
Handler object

void aw_free_timerhandler (  aw_timerhandler_t *  h  ) 
 

Free handler and all associated resources.

Parameters:
h The handler

aw_handler_t* aw_wire_timerhandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a timer handler using "wire". See header doc for keyword documentation.

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)