summaryrefslogtreecommitdiff
path: root/cesar/cp2/fsm
diff options
context:
space:
mode:
authorschodet2008-07-11 08:14:10 +0000
committerschodet2008-07-11 08:14:10 +0000
commit0487d145ed78079ece1ea6cc378b588ae9550f11 (patch)
tree48348ff114f485b421d847078d36100f39184c55 /cesar/cp2/fsm
parent95afa9f84a72adc7f8d58781077aa4a261882049 (diff)
* cp2/fsm:
- added shortcut to post events. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2598 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/fsm')
-rw-r--r--cesar/cp2/fsm/fsm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cesar/cp2/fsm/fsm.h b/cesar/cp2/fsm/fsm.h
index 7db3a7ed39..d29a6287d3 100644
--- a/cesar/cp2/fsm/fsm.h
+++ b/cesar/cp2/fsm/fsm.h
@@ -17,6 +17,17 @@
#include "forward.h"
#include "inc/events.h"
+/**
+ * Shortcut to initialise and post an event.
+ * \param ctx control plane context
+ * \param kind one of the possible kinds of event
+ * \param type event type, automatically prefixed with CP_FSM_EVENT_TYPE_
+ * \param args event creation arguments
+ */
+#define cp_fsm_post_new_event(ctx, kind, type, args...) \
+ cp_fsm_post ((ctx), cp_fsm_event_ ## kind ## _new \
+ ((ctx), CP_FSM_EVENT_TYPE_ ## type, ## args))
+
BEGIN_DECLS
/**