summaryrefslogtreecommitdiff
path: root/cesar/cp/cco/action/handover.h
blob: a585498b9f1f196a9cfc035c1ec5b56ebe534754 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef cp_cco_action_handover_h
#define cp_cco_action_handover_h
/* Cesar project {{{
 *
 * Copyright (C) 2009 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    cp/cco/action/handover.h
 * \brief   Handover functions.
 * \ingroup cp_cco_action
 *
 * All the functions for the handover described by the FSM in the doc
 * directory.
 */
#include "cp/cp.h"
#include "cp/sta/mgr/sta.h"

BEGIN_DECLS

/* FSM HANDOVER */

/**
 * Start the handover procedure,
 * \param  ctx  the module context.
 *
 * The FSM calls this function once the discover procedure is ended (the event
 * is posted by the beacon module).
 * The CCo selection shall be done and the cc_handover.req sent to the
 * station.
 * If the station is a user appointed CCo, this shall ends the handover
 * procedure.
 *
 * If a station is elected to be the NEW CCo, and if booth the actual CCo and
 * the new CCo can handle the soft handover it shall start a soft handover.
 * In the other case a hard handover is initiated.
 */
void
cp_cco_action_handover__start (cp_t *ctx);

/**
 * Start the handover.
 * \param  ctx  the module context.
 */
void
cp_cco_action_handover__discover_done (cp_t *ctx);

/**
 * Received the cc_handover_cnf from the peer station.
 * \param  ctx  the module context.
 * \param  mme  the MME received.
 *
 * This function shall continue the procedure if the peer station accepted the
 * request or abort it.
 */
void
cp_cco_action_handover__cc_handover_cnf_receive (cp_t *ctx,
                                                 cp_mme_rx_t *mme);

/**
 * The procedure timeout for the cc_handover_cnf.
 * \param  ctx  the module context.
 */
void
cp_cco_action_handover__timeout_cc_handover_cnf (cp_t *ctx);

/**
 * The procedure timeout for the cc_handover_cnf.
 * \param  ctx  the module context.
 */
void
cp_cco_action_handover__timeout_cc_handover_info_rsp (cp_t *ctx);

/**
 * Receives a CC_HANDOVER.RSP from the peer station.
 * \param  ctx  the module context.
 * \param  mme  the MME received.
 *
 * This function shall inform the Beacon module to start the handover
 * countdown and insert it in the central beacon.
 */
void
cp_cco_action_handover__cc_handover_info_rsp_receive (cp_t *ctx,
                                                      cp_mme_rx_t *mme);

/**
 * Countdown expires.
 * \param  ctx  the module context.
 *
 * This function shall stop the CCo function of the station and clear the
 * selection set.
 */
void
cp_cco_action_handover__hoip_countdown_expired (cp_t *ctx);

END_DECLS

#endif /* cp_cco_action_handover_h */