summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/maximus/dur/inc
diff options
context:
space:
mode:
authorsave2008-04-07 14:17:42 +0000
committersave2008-04-07 14:17:42 +0000
commit3d58a62727346b7ac1a6cb36fed1a06ed72228dd (patch)
treed7788c3cf9f76426aef0286d0202e2097f0fa0eb /cesar/hal/phy/maximus/dur/inc
parent095dca4b0a8d4924093bab424f71f588fdd84613 (diff)
Moved the complete svn base into the cesar directory.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1769 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/hal/phy/maximus/dur/inc')
-rw-r--r--cesar/hal/phy/maximus/dur/inc/maximus_dur.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/cesar/hal/phy/maximus/dur/inc/maximus_dur.h b/cesar/hal/phy/maximus/dur/inc/maximus_dur.h
new file mode 100644
index 0000000000..10b3afdfe8
--- /dev/null
+++ b/cesar/hal/phy/maximus/dur/inc/maximus_dur.h
@@ -0,0 +1,77 @@
+#ifndef hal_phy_maximus_dur_inc_maximus_dur_h
+#define hal_phy_maximus_dur_inc_maximus_dur_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/phy/maximus/dur/inc/maximus_dur.h
+ * \brief Compute mac frames duration.
+ * \ingroup hal_phy_maximus
+ */
+#include "hal/phy/defs.h"
+#include "lib/blk.h"
+
+BEGIN_DECLS
+
+/**
+ * Count the number of used carriers.
+ * \param tonemask tone mask
+ * \return number of carriers
+ *
+ * This function takes its parameter in the same format as the HAL PHY
+ * functions.
+ *
+ * Call this when the tone mask is changed and cache its return value.
+ */
+uint
+maximus_dur_carrier_nb (const u8 *tonemask);
+
+/**
+ * Compute the number of bits per OFDM symbol.
+ * \param mod PHY modulation
+ * \param tonemask tone mask
+ * \param tonemap first tone map descriptor or NULL for ROBO modes
+ * \param carrier_nb number of carriers for this tone mask
+ * \return the number of bits per OFDM symbol
+ *
+ * This function takes its parameters in the same format as the HAL PHY
+ * functions. The tone map uses two blocks.
+ *
+ * If you only have linear buffers, initialise blk_t structures to point to
+ * your buffers.
+ *
+ * The carrier_nb is used as an optimisation for ROBO modes.
+ */
+uint
+maximus_dur_bits_per_symbol (phy_mod_t mod, const u8 *tonemask,
+ const blk_t *tonemap, uint carrier_nb);
+
+/**
+ * Compute the number of symbols for a given number of PB.
+ * \param fecrate FEC encoding rate
+ * \param pb_size PB size
+ * \param bits_per_symbol number of bits per symbol
+ * \param pb_nb PB number
+ * \return number of used symbols
+ */
+uint
+maximus_dur_symbol_nb (phy_fecrate_t fecrate, phy_pb_size_t pb_size,
+ uint bits_per_symbol, uint pb_nb);
+
+/**
+ * Compute the duration of the data part of a frame for a given number of
+ * symbols.
+ * \param gil guard interval for third symbol and following symbols
+ * \param symbol_nb number of OFDM symbols
+ * \return duration in ticks
+ */
+uint
+maximus_dur_data_tck (phy_gil_t gil, uint symbol_nb);
+
+END_DECLS
+
+#endif /* hal_phy_maximus_dur_inc_maximus_dur_h */