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

uptimehandler.h

Go to the documentation of this file.
00001 
00002 /*
00003 ** Copyright (C) 2004 Russell Leighton
00004 **
00005 ** This program is free software; you can redistribute it and/or modify
00006 ** it under the terms of the GNU General Public License as published by
00007 ** the Free Software Foundation; either version 2 of the License, or
00008 ** (at your option) any later version.
00009 **
00010 ** This program is distributed in the hope that it will be useful,
00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 ** GNU General Public License for more details.
00014 **
00015 ** You should have received a copy of the GNU General Public License
00016 ** along with this program; if not, write to the Free Software
00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 */
00019 
00020 
00021 #ifndef __AWHANDLER_UPTIMEHANDLER__
00022 #define __AWHANDLER_UPTIMEHANDLER__
00023 
00024 #include "monitor.h"
00025 #include "wire.h"
00026 
00068 /*
00069 
00070 Changes:
00071 
00072 02/09/04 Russell Leighton
00073 Port to handler
00074 
00075 */
00076 
00080 typedef struct {
00081 
00082   aw_event_sig_t
00083    uptime;
00084 
00085 } aw_uptimehandler_events_t;
00086 
00087 /* from uptimehandler.c */
00088 
00092 typedef struct {
00093 
00094   aw_handler_t 
00095    handler_header;
00096 
00097   aw_uptimehandler_events_t
00098    events;
00099 
00100 } aw_uptimehandler_t ;
00101 
00111 aw_uptimehandler_t *aw_create_uptimehandler(aw_uptimehandler_events_t *events,
00112                                             int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00113                                             int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00114                                             aw_alarm_sched_t *sched,
00115                                             aw_logger_t *logger
00116                                         );
00121 void aw_free_uptimehandler(aw_uptimehandler_t *p);
00122 
00126 aw_handler_t *aw_wire_uptimehandler(aw_wire_mkhandler_args_t *args);
00127 
00128 #endif
00129 
Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)