summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/inc
diff options
context:
space:
mode:
authordufour2009-05-13 13:42:03 +0000
committerdufour2009-05-13 13:42:03 +0000
commit34165115d708ae82507c73bfa69fc58d71931c2b (patch)
treeed01029ad4e6d4f32580390780db9ade8d6eaac4 /cesar/ce/rx/inc
parent1b155c9cd8cee64e05d0556e03467c64675ed7c6 (diff)
* ce/rx:
- add a sub module measure to handle the reception of the measures from the SAR. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@4645 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/ce/rx/inc')
-rw-r--r--cesar/ce/rx/inc/measure.h72
-rw-r--r--cesar/ce/rx/inc/rx.h10
2 files changed, 82 insertions, 0 deletions
diff --git a/cesar/ce/rx/inc/measure.h b/cesar/ce/rx/inc/measure.h
new file mode 100644
index 0000000000..b5981c8da5
--- /dev/null
+++ b/cesar/ce/rx/inc/measure.h
@@ -0,0 +1,72 @@
+#ifndef ce_rx_inc_measure_h
+#define ce_rx_inc_measure_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file ce/rx/inc/measure.h
+ * \brief Receive and pre-process measures from the SAR (private).
+ * \ingroup ce_rx
+ */
+
+#include "ce/rx.h"
+#include "ce/rx/measure.h"
+#include "lib/mbox.h"
+
+/**
+ * Mailbox used to exchange measure between the SAR and the CE RX.
+ */
+typedef struct ce_rx_measure_mbox_t
+{
+ /**
+ * Pointer to the mailbox node.
+ */
+ mbox_node_t mbox_node;
+ /**
+ * TEI of the station.
+ */
+ u8 tei;
+ /**
+ * Pointer to the beginning of the channel data.
+ */
+ phy_chandata_t *chan_data;
+ /**
+ * Count of channel data elements.
+ */
+ uint chan_data_count;
+} ce_rx_measure_mbox_t;
+
+BEGIN_DECLS
+
+/**
+ * Initialize the sub module of measure of the CE RX.
+ * \param ce_rx the CE RX context.
+ */
+void
+ce_rx_measure_init (ce_rx_t *ce_rx);
+
+/**
+ * Un-initialize the sub module of measure of the CE RX.
+ * \param ce_rx the CE RX context.
+ */
+void
+ce_rx_measure_uninit (ce_rx_t *ce_rx);
+
+/**
+ * Add a channel data measure to the mailbox and wake-up the CE RX.
+ * \param ce_rx the CE RX context.
+ * \param rx_params the RX params of the measure.
+ * \param chan_data the channel data received.
+ * \param chan_data_count number of elements of chan_data.
+ */
+void
+ce_rx_measure_add_chan_data (ce_rx_t *ce_rx, pbproc_rx_params_t *rx_params,
+ phy_chandata_t *chan_data, uint chan_data_count);
+
+END_DECLS
+
+#endif /* ce_rx_inc_measure_h */
diff --git a/cesar/ce/rx/inc/rx.h b/cesar/ce/rx/inc/rx.h
index ec958ffbf8..6beb703439 100644
--- a/cesar/ce/rx/inc/rx.h
+++ b/cesar/ce/rx/inc/rx.h
@@ -16,6 +16,8 @@
*/
#include "mac/common/store.h"
+#include "lib/mbox.h"
+#include "lib/slab.h"
#include <cyg/kernel/kapi.h>
#include <cyg/hal/hal_arch.h>
@@ -59,6 +61,14 @@ struct ce_rx_t
* Stop the CE in RX.
*/
bool stop_flag;
+ /**
+ * Mailbox for the measure communication.
+ */
+ mbox_t measure_mbox;
+ /**
+ * Cache slab allocator for the mailbox nodes.
+ */
+ slab_cache_t measure_cache;
};
/**