summaryrefslogtreecommitdiff
path: root/cp2/vstate_fsm/vstate_fsm.h
blob: cf9f89cf2440d22eaa22f49b4b1f727bf1059c3c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef vstate_fsm__h__
#define vstate_fsm__h__
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    Cesare/cp/vstate_fsm/vstate_fsm.h
 * \brief   functions to run the visual state fsm
 * \ingroup cp/vstate_fsm
 *
 * « long description »
 */



BEGIN_DECLS


/**
 * initialisation of the vstate fsm.
 * 
 * \param	ctx cp context
 */
void
cp_vstate_fsm_init(cp_t *ctx);


/**
 * process the event from the fsm queue.
 *  
 * \param	ctx the cp context
 *
 * 1) get the last event for the fsm and process it
 * 2) if the event was related to a MME, free the buffer
 */
void
cp_vstate_fsm__process_event(cp_t *ctx);

/**
 * process the event immediately.
 *  
 * \param   ctx the cp context
 * \param   event_type the visual state event to process
 *
 * The event must be a transition from one state to another.
 */
void
cp_vstate_fsm_process_event_now(cp_t *ctx, SEM_EVENT_TYPE event_type);


/**
 * debugging function, will print the fsm state.
 */
void 
cp_vstate_fsm_print_state(void);



END_DECLS
  
#endif