summaryrefslogtreecommitdiff
path: root/cesar/cp2/fsm/inc/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp2/fsm/inc/context.h')
-rw-r--r--cesar/cp2/fsm/inc/context.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/cesar/cp2/fsm/inc/context.h b/cesar/cp2/fsm/inc/context.h
new file mode 100644
index 0000000000..0d7617bc12
--- /dev/null
+++ b/cesar/cp2/fsm/inc/context.h
@@ -0,0 +1,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 */