summaryrefslogtreecommitdiff
path: root/maximus/channel/inc/ChannelSettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'maximus/channel/inc/ChannelSettings.h')
-rw-r--r--maximus/channel/inc/ChannelSettings.h76
1 files changed, 74 insertions, 2 deletions
diff --git a/maximus/channel/inc/ChannelSettings.h b/maximus/channel/inc/ChannelSettings.h
index 816e445338..540265a618 100644
--- a/maximus/channel/inc/ChannelSettings.h
+++ b/maximus/channel/inc/ChannelSettings.h
@@ -32,6 +32,10 @@ The original location of this file is /home/buret/eclipse/maximus/channel/inc/Ch
#define CHANNELSETTINGS_H
#include "networkclock_types.h" // for 'Network_Clock_Tick'
+#include "channel_types.h" // for 'Channel_Mod'
+
+#include "mac/common/defs.h" // for 'TONEMAP_INTERVAL_NB'
+#include "hal/phy/defs.h" // for 'PHY_CARRIER_NB'
/**
@@ -51,14 +55,17 @@ private:
// private attributes
//
+ bool mIsConfigured;
+ float mSnrArray[TONEMAP_INTERVAL_NB][PHY_CARRIER_NB + 1];
+ Channel_Mod mTonemapArray[PHY_CARRIER_NB];
Network_Clock_Tick mPreDetectionDate;
Network_Clock_Tick mFcReceptionDate;
protected:
-
+
// protected attributes
//
-
+
public:
// Constructors/Destructors
@@ -77,6 +84,29 @@ public:
// public methods
//
+ /**
+ * Gets the first symbol start date (in ticks).
+ * @return tick at which the first symbol has started
+ */
+ const Network_Clock_Tick getFirstSymbolStartDate ( ) const;
+
+ /**
+ * Gets the tonemap modulation.
+ * @param carrier the current carrier number
+ * @return the tonemap modulation
+ */
+ const Channel_Mod getModulation ( const unsigned int carrier ) const;
+
+ /**
+ * Gets the SNR in dB.
+ * @param interval the current interval number
+ * @param carrier the current carrier number
+ * @return the SNR in dB
+ */
+ const float getSnr ( const Network_Clock_Tick beacon_period,
+ const Network_Clock_Tick symbol_start_date,
+ const unsigned int carrier ) const;
+
// public attribute accessor methods
//
@@ -84,6 +114,33 @@ public:
//
/**
+ * Gets if the channel has been configured.
+ * @return mIsConfigured
+ */
+ const bool isConfigured ( ) const;
+
+ /**
+ * Sets the SNR.
+ * @param snr_value SNR value in dB
+ * @return bool
+ */
+ bool setSnr ( const float snr_value );
+
+ /**
+ * Sets the SNR.
+ * @param snr array of SNR values in dB
+ * @return bool
+ */
+ bool setSnr ( const float snr_values[TONEMAP_INTERVAL_NB][PHY_CARRIER_NB + 1] );
+
+ /**
+ * Sets the tonemap of the current transmission.
+ * @return bool
+ * @param tonemap_array the new value of mTonemapArray
+ */
+ bool setTonemap ( const Channel_Mod tonemap_array[PHY_CARRIER_NB + 1] );
+
+ /**
* Sets the PRE detection date.
* @param date tick at which the preamble has been received
* @return bool
@@ -111,6 +168,13 @@ private:
void initAttributes ( );
/**
+ * Sets if the channel is configured.
+ * @param is_configured the new value of mIsConfigured
+ * @return bool
+ */
+ bool setIsConfigured ( const bool is_configured = true );
+
+ /**
* Gets the PRE detection date.
* @return mPreDetectionDate tick at which the preamble has been received
*/
@@ -122,6 +186,14 @@ private:
*/
const Network_Clock_Tick getFcReceptionDate ( ) const;
+ /**
+ * Gets the time interval.
+ * @param symbol_start_date the current symbol start date in ticks
+ * @return the interval number
+ */
+ const unsigned int getInterval ( const Network_Clock_Tick beacon_period,
+ const Network_Clock_Tick symbol_start_date ) const;
+
protected:
// protected methods