summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorJérôme Jutteau2011-09-23 17:19:15 +0200
committerCyril Jourdan2013-01-18 11:27:23 +0100
commit24e3b3102ff73b95c5a5011ccaacbf3332ab92a0 (patch)
treec5a790eb7e5b5cfcfc1d86ea02b3b393dedb1a6f /cesar
parent5cf9fd21a81694b3219c3fb175a4a2503c166afd (diff)
cesar/ce/rx: configure CE RX intervals from internal.conf
Diffstat (limited to 'cesar')
-rw-r--r--cesar/ce/rx/rx.h16
-rw-r--r--cesar/ce/rx/src/rx.c18
2 files changed, 34 insertions, 0 deletions
diff --git a/cesar/ce/rx/rx.h b/cesar/ce/rx/rx.h
index 135456aa9d..46d7e9f491 100644
--- a/cesar/ce/rx/rx.h
+++ b/cesar/ce/rx/rx.h
@@ -19,6 +19,22 @@
#include "ce/rx/forward.h"
#include "bsu/aclf/aclf.h"
+/**
+ * CE RX behaviors.
+ */
+typedef enum ce_rx_behavior_t
+{
+ /* Do not use intervals. */
+ CE_RX_BEHAVIOR_INTERVALS_DISABLE,
+ /* Use intervals.
+ * CE will switch to intervals after default tone map negotiation. */
+ CE_RX_BEHAVIOR_INTERVALS_ENABLE,
+ CE_RX_BEHAVIOR_NB
+} ce_rx_behavior_t;
+
+/* Control CE RX behavior. */
+extern ce_rx_behavior_t ce_rx_behavior;
+
BEGIN_DECLS
/**
diff --git a/cesar/ce/rx/src/rx.c b/cesar/ce/rx/src/rx.c
index afe6edb1a9..1f00469457 100644
--- a/cesar/ce/rx/src/rx.c
+++ b/cesar/ce/rx/src/rx.c
@@ -20,6 +20,7 @@
#include "mac/common/timings.h"
#include "mac/common/defs.h"
#include "mac/common/store.h"
+#include "mac/common/interval.h"
#include "lib/stats.h"
#include "ce/rx/bitloading/pber.h"
#include "ce/rx/bitloading/inc/pber.h"
@@ -35,6 +36,9 @@
*/
static ce_rx_t ce_rx;
+/* Control CE RX behavior. */
+ce_rx_behavior_t ce_rx_behavior = CE_RX_BEHAVIOR_INTERVALS_DISABLE;
+
/**
* Table with the list of functions to call for each flag.
*/
@@ -86,6 +90,20 @@ ce_rx_init (mac_store_t *mac_store, sar_t *sar, pbproc_t *pbproc,
/* Register our configuration variables.
* FIXME: this is a dirty hack. */
+ /* Interval config. */
+ lib_stats_set_stat_value_notype ("CE_RX_INTERVALS_BEHAVIOR",
+ &ce_rx_behavior,
+ LIB_STATS_ACCESS_READ_WRITE,
+ LIB_STATS_DEBUG);
+ lib_stats_set_stat_value_notype ("CE_RX_INTERVALS_FSM_NB",
+ &mac_interval_fsm_count_,
+ LIB_STATS_ACCESS_READ_WRITE,
+ LIB_STATS_DEBUG);
+ lib_stats_set_stat_value_notype ("CE_RX_INTERVALS_REPETITION_NB",
+ &mac_interval_repetition_count_,
+ LIB_STATS_ACCESS_READ_WRITE,
+ LIB_STATS_DEBUG);
+ /* Bitloading config. */
lib_stats_set_stat_value_notype ("CE_RX_BL_NSR_MARGIN",
&ce_rx_bl_nsr_margin_,
LIB_STATS_ACCESS_READ_WRITE,