From 242e1f6615aa2ea06b31bf0a3fd4a91fce921a95 Mon Sep 17 00:00:00 2001 From: schodet Date: Thu, 12 Jun 2008 08:49:37 +0000 Subject: * cp2/fsm: - base test structure and first test. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2288 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/cp2/fsm/test/utest/src/actions.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cesar/cp2/fsm/test/utest/src/actions.c (limited to 'cesar/cp2/fsm/test/utest/src/actions.c') 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 + * + * <<>> + * + * }}} */ +/** + * \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 = ¶ms->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); +} + -- cgit v1.2.3