summaryrefslogtreecommitdiff
path: root/cesar/cp2/fsm/inc/context.h
blob: 0d7617bc12fb7ece0428628cf833ea64f753e422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef cp2_fsm_inc_context_h
#define cp2_fsm_inc_context_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    cp2/fsm/inc/context.h
 * \brief   FSM private context.
 * \ingroup cp2_fsm
 */

/** FSM context. */
struct cp_fsm_t
{
    /** Current state. */
    cp_fsm_state_t state;
    /** Currently handled event, reset to CP_FSM_EVENT_TYPE_NB when no event
     * is handled. */
    cp_fsm_event_type_t handled_event;
    /** Head of pending event list. */
    cp_fsm_event_t *head;
    /** Tail of pending event list. */
    cp_fsm_event_t *tail;
};
typedef struct cp_fsm_t cp_fsm_t;

#endif /* cp2_fsm_inc_context_h */