summaryrefslogtreecommitdiff
path: root/cp/beacon/inc/beacons.h
diff options
context:
space:
mode:
authorlaranjeiro2008-01-17 16:53:31 +0000
committerlaranjeiro2008-01-17 16:53:31 +0000
commitf073d36e9f9bc31b2cbf4bce757d7a6166ce6def (patch)
tree151c47ec47dcd32cc840089ea3ad17d97f21d2b2 /cp/beacon/inc/beacons.h
parent293b87f8599d100e84394e4515854dfcb0ba7e49 (diff)
Modified the CP to generate central beacon or discover beacons when it is respectively a CCo or a UCCo.
Update the traces to follow exactly what is happening. Update the test. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1287 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cp/beacon/inc/beacons.h')
-rw-r--r--cp/beacon/inc/beacons.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/cp/beacon/inc/beacons.h b/cp/beacon/inc/beacons.h
index 540a70e37c..451be608dc 100644
--- a/cp/beacon/inc/beacons.h
+++ b/cp/beacon/inc/beacons.h
@@ -17,6 +17,25 @@
#include "cp/beacon/beacons.h"
/**
+ * Initialize the sub module for the discover, central and proxy beacons.
+ * The beacon_ctx corresponds to the each part contained in the ctx.
+ *
+ * \param ctx the becon module context.
+ * \param beacon_ctx the central, discover or proxy context.
+ */
+void
+cp_beacon_init_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
+ * Uninit the sub beacon modules.
+ *
+ * \param ctx the beacon module context
+ * \param beacon_ctx the beacon context to uninit.
+ */
+void
+cp_beacon_uninit_beacons (cp_beacon_t *ctx, cp_beacon_common_t *beacon_ctx);
+
+/**
* Compute the beacon period using the beacon period thereotic calculated
* during the pw frequency detection.
*
@@ -25,6 +44,40 @@
uint
cp_beacon_pwl_period (cp_beacon_t *ctx);
+/**
+ * Fill the payload of the beacon when the STA is accting as CCo or UCCo.
+ * Can be use for
+ * - the Central beacon when acting as a CCo
+ * - the discover beacon when acting as a UCCo.
+ *
+ *
+ * \param ctx the beacon module context
+ * \param beacon the beacon to fill.
+ */
+void
+cp_beacon_xcco_fill_common_part (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
+
+/**
+ * Generate the beacon.
+ *
+ * \param ctx the beacon context.
+ * \parma common the beacon central or discover context.
+ * \param beacon the central beacon to fill
+ */
+void
+cp_beacon_cco_beacon_generate (cp_beacon_t *ctx, cp_beacon_common_t *common,
+ cp_beacon_desc_t *beacon);
+
+
+/**
+ * Send the beacon over the PWL.
+ *
+ * \param ctx the cp beacon context
+ * \param beacon the beacon to send
+ */
+void
+cp_beacon_send_beacon (cp_beacon_t *ctx, cp_beacon_desc_t *beacon);
+
/**
* Process a the central beacon received.