--- a/src/common/spectrum-converter.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/common/spectrum-converter.cc Mon Jun 14 17:13:43 2010 +0200
@@ -29,6 +29,9 @@
namespace ns3 {
+SpectrumConverter::SpectrumConverter ()
+{
+}
SpectrumConverter::SpectrumConverter (Ptr<const SpectrumModel> fromSpectrumModel, Ptr<const SpectrumModel> toSpectrumModel)
{
--- a/src/common/spectrum-converter.h Sun Jun 13 14:46:13 2010 -0700
+++ b/src/common/spectrum-converter.h Mon Jun 14 17:13:43 2010 +0200
@@ -50,6 +50,8 @@
*/
SpectrumConverter (Ptr<const SpectrumModel> fromSpectrumModel, Ptr<const SpectrumModel> toSpectrumModel);
+ SpectrumConverter ();
+
/**
--- a/src/common/spectrum-value.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/common/spectrum-value.cc Mon Jun 14 17:13:43 2010 +0200
@@ -31,6 +31,9 @@
namespace ns3 {
+SpectrumValue::SpectrumValue ()
+{
+}
SpectrumValue::SpectrumValue (Ptr<const SpectrumModel> sof)
: m_spectrumModel (sof),
--- a/src/common/spectrum-value.h Sun Jun 13 14:46:13 2010 -0700
+++ b/src/common/spectrum-value.h Mon Jun 14 17:13:43 2010 +0200
@@ -74,6 +74,10 @@
*/
SpectrumValue (Ptr<const SpectrumModel> sm);
+
+ SpectrumValue ();
+
+
/**
* Access value at given frequency index
*
@@ -517,6 +521,14 @@
std::ostream& operator << (std::ostream& os, const SpectrumValue& pvf);
+double Norm (const SpectrumValue& x);
+double Sum (const SpectrumValue& x);
+double Prod (const SpectrumValue& x);
+SpectrumValue Pow (const SpectrumValue& base, double exp);
+SpectrumValue Pow (double base, const SpectrumValue& exp);
+SpectrumValue Log10 (const SpectrumValue& arg);
+SpectrumValue Log2 (const SpectrumValue& arg);
+SpectrumValue Log (const SpectrumValue& arg);
} // namespace ns3
--- a/src/devices/spectrum/aloha-noack-net-device.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/devices/spectrum/aloha-noack-net-device.cc Mon Jun 14 17:13:43 2010 +0200
@@ -263,6 +263,13 @@
}
+void
+AlohaNoackNetDevice::SetChannel (Ptr<Channel> c)
+{
+ NS_LOG_FUNCTION (this << c);
+ m_channel = c;
+}
+
Ptr<Channel>
AlohaNoackNetDevice::GetChannel (void) const
--- a/src/devices/spectrum/non-communicating-net-device.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/devices/spectrum/non-communicating-net-device.cc Mon Jun 14 17:13:43 2010 +0200
@@ -196,6 +196,12 @@
}
+void
+NonCommunicatingNetDevice::SetChannel (Ptr<Channel> c)
+{
+ NS_LOG_FUNCTION (this << c);
+ m_channel = c;
+}
Ptr<Channel>
NonCommunicatingNetDevice::GetChannel (void) const
--- a/src/devices/spectrum/waveform-generator.h Sun Jun 13 14:46:13 2010 -0700
+++ b/src/devices/spectrum/waveform-generator.h Mon Jun 14 17:13:43 2010 +0200
@@ -112,16 +112,6 @@
/**
- * Set the time resolution of the generated waveforms.
- *
- * @param resolution time resolution of the generated
- * waveforms. This determines both the duration of waveforms, and
- * the time between subsequent waveforms (i.e., they are generated
- * back to back during the active portion of the generator cycle).
- */
- void SetResolution (Time resolution);
-
- /**
* Start the waveform generator
*
*/
--- a/src/helper/adhoc-aloha-noack-ideal-phy-helper.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/helper/adhoc-aloha-noack-ideal-phy-helper.cc Mon Jun 14 17:13:43 2010 +0200
@@ -126,6 +126,7 @@
NS_ASSERT_MSG (m_channel, "you forgot to call AdhocAlohaNoackIdealPhyHelper::SetChannel ()");
phy->SetChannel (m_channel);
+ dev->SetChannel (m_channel);
m_channel->AddRx (phy);
phy->SetPhyMacTxEndCallback (MakeCallback (&AlohaNoackNetDevice::NotifyTransmissionEnd, dev));
--- a/src/helper/spectrum-analyzer-helper.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/helper/spectrum-analyzer-helper.cc Mon Jun 14 17:13:43 2010 +0200
@@ -153,6 +153,8 @@
NS_ASSERT_MSG (m_channel, "you forgot to call SpectrumAnalyzerHelper::SetChannel ()");
m_channel->AddRx (phy);
+ dev->SetChannel (m_channel);
+
uint32_t devId = node->AddDevice (dev);
devices.Add (dev);
--- a/src/helper/waveform-generator-helper.cc Sun Jun 13 14:46:13 2010 -0700
+++ b/src/helper/waveform-generator-helper.cc Mon Jun 14 17:13:43 2010 +0200
@@ -108,7 +108,8 @@
NS_ASSERT_MSG (m_channel, "you forgot to call WaveformGeneratorHelper::SetChannel ()");
phy->SetChannel (m_channel);
- //m_channel->AddRx (phy);
+ dev->SetChannel (m_channel);
+
node->AddDevice (dev);
devices.Add (dev);