summaryrefslogtreecommitdiff
path: root/cesar/cp2/fsm/test/utest/src/actions.c
diff options
context:
space:
mode:
authorschodet2008-06-12 08:49:37 +0000
committerschodet2008-06-12 08:49:37 +0000
commit242e1f6615aa2ea06b31bf0a3fd4a91fce921a95 (patch)
tree5fcb5d404f5b0f9dbcf1bd310156f877a7fe4bc6 /cesar/cp2/fsm/test/utest/src/actions.c
parent8b15c19938610533bf1f25637037c58b5cb52d6a (diff)
* cp2/fsm:
- base test structure and first test. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2288 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/fsm/test/utest/src/actions.c')
-rw-r--r--cesar/cp2/fsm/test/utest/src/actions.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/cesar/cp2/fsm/test/utest/src/actions.c b/cesar/cp2/fsm/test/utest/src/actions.c
new file mode 100644
index 0000000000..93f65fded7
--- /dev/null
+++ b/cesar/cp2/fsm/test/utest/src/actions.c
@@ -0,0 +1,33 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/actions.c
+ * \brief Scenario actions.
+ * \ingroup test
+ */
+#include "common/std.h"
+
+#include "lib/scenario/scenario.h"
+
+void
+scenario_action_post_and_process_cb (scenario_globals_t *globals,
+ scenario_params_t *params)
+{
+ scenario_action_post_and_process_t *p = &params->action_post_and_process;
+ cp_fsm_event_t *event;
+ if (p->mme)
+ event = cp_fsm_event_mme_new (globals->cp, p->type, p->mme);
+ else if (p->beacon)
+ event = cp_fsm_event_beacon_new (globals->cp, p->type, p->beacon,
+ p->net, p->sta);
+ else
+ event = cp_fsm_event_bare_new (globals->cp, p->type);
+ cp_fsm_post (globals->cp, event);
+ cp_fsm_process (globals->cp);
+}
+