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

alarm.h File Reference

Go to the source code of this file.

Data Structures

struct  aw_alarm_events_t
 Events generated. More...

struct  aw_alarm_s
struct  aw_alarm_sched_cal_t
struct  aw_alarm_sched_pulse_t
struct  aw_alarm_sched_t
struct  aw_alarm_state_t

Defines

#define AW_DEFAULT_ALARM_CYCLE_TIME   ( AW_TIMESTAMP_PER_SEC / 10 )
 Default cycle times for schedulers.


Typedefs

typedef aw_alarm_s aw_alarm_t

Enumerations

enum  aw_alarm_code_t { AW_ALARM_OK, AW_ALARM_REMOVE, AW_ALARM_NCODES }
enum  aw_alarm_sched_code_t { AW_SCHED_NONE, AW_SCHED_PULSE, AW_SCHED_CALENDAR }
enum  aw_alarm_sched_flag_t { AW_SCHED_RUNONCE = 0x1 }
enum  aw_alarm_type_t { AW_ALARM_RUN_TYPE, AW_ALARM_INTERRUPT_TYPE }

Functions

int32_t aw_set_sched_calendar (aw_alarm_sched_cal_t *cal, const byte_t *crontab, FILE *message_stream)
 Set a calendar component in a sched object.


Define Documentation

#define AW_DEFAULT_ALARM_CYCLE_TIME   ( AW_TIMESTAMP_PER_SEC / 10 )
 

Default cycle times for schedulers.


Typedef Documentation

typedef struct aw_alarm_s aw_alarm_t
 


Enumeration Type Documentation

enum aw_alarm_code_t
 

Alarm return codes

Enumeration values:
AW_ALARM_OK  alarm method ok
AW_ALARM_REMOVE  alarm wants to be removed from monitor
AW_ALARM_NCODES  must be last!

enum aw_alarm_sched_code_t
 

Alarm run schedule types

Enumeration values:
AW_SCHED_NONE  MUST BE FIRST!
AW_SCHED_PULSE  schedule periodically
AW_SCHED_CALENDAR  schedule based on calendar time

enum aw_alarm_sched_flag_t
 

Flags for schedule

Enumeration values:
AW_SCHED_RUNONCE  Run this 1 time only

enum aw_alarm_type_t
 

Alarm types

Enumeration values:
AW_ALARM_RUN_TYPE  alarm generates events to start handlers running
AW_ALARM_INTERRUPT_TYPE  alarm generates events for running alarms


Function Documentation

int32_t aw_set_sched_calendar (  aw_alarm_sched_cal_t *  cal,
const byte_t *  crontab,
FILE *  message_stream
) 
 

Set a calendar component in a sched object.

aw_set_sched_calendar

Crontab is expected as a space delimited string with 5 fields:

field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 day of week 0-6

A field may be an asterisk (*), which always stands for ``first-last''.

Ranges of numbers are allowed. Ranges are two numbers separated with a hyphen. The specified range is inclusive. For example, 8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 and 11.

Lists are allowed. A list is a set of numbers (or ranges) separated by commas. Examples: ``1,2,5,9'', ``0-4,8-12''.

Parameters:
cal Calendar to set
crontab String in crontab format
message_stream FILE ptr for errors
Returns:
Returns non-zero on error

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