1 /* $Id: fsm.h,v 1.3.2.2 2001/09/23 22:24:47 kai Exp $
6 * Copyright by Karsten Keil <keil@isdn4linux.de>
7 * by Kai Germaschewski <kai.germaschewski@gmx.de>
9 * This software may be used and distributed according to the terms
10 * of the GNU General Public License, incorporated herein by reference.
17 #include <linux/timer.h>
21 typedef void (*FSMFNPTR)(struct FsmInst *, int, void *);
25 int state_count, event_count;
26 char **strEvent, **strState;
35 void (*printdebug) (struct FsmInst *, char *, ...);
40 void (*routine) (struct FsmInst *, int, void *);
50 int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
51 void FsmFree(struct Fsm *fsm);
52 int FsmEvent(struct FsmInst *fi, int event, void *arg);
53 void FsmChangeState(struct FsmInst *fi, int newstate);
54 void FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft);
55 int FsmAddTimer(struct FsmTimer *ft, int millisec, int event,
56 void *arg, int where);
57 void FsmRestartTimer(struct FsmTimer *ft, int millisec, int event,
58 void *arg, int where);
59 void FsmDelTimer(struct FsmTimer *ft, int where);