20 #include <ns3/core-module.h>    22 #include <ns3/spectrum-module.h>    38   virtual void DoRun (
void);
    50   if (
Now ().GetSeconds () > m_stop)
    59   m_dutyCycle (dutyCycle),
    73   Ptr<SpectrumValue> txPsd = MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo1 ();
    76   channelHelper.
SetChannel (
"ns3::SingleModelSpectrumChannel");
    83   waveformGeneratorHelper.SetChannel (
channel);
    92   Simulator::Schedule (
Seconds (1.0), &WaveformGenerator::Start, wave);
    93   Simulator::Schedule (
Seconds (
m_stop), &WaveformGenerator::Stop, wave);
    95   Simulator::Stop (
Seconds (3.0));
   100   Simulator::Destroy ();
   111   : 
TestSuite (
"waveform-generator", SYSTEM)
   113   NS_LOG_INFO (
"creating WaveformGeneratorTestSuite");
 
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
 
This class implements a device which does not communicate, in the sense that it does not interact wit...
 
  AttributeValue implementation for Time. 
 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
 
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not. 
 
holds a vector of ns3::NetDevice pointers 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object. 
 
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void SetChannel(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
Time Now(void)
create an ns3::Time instance which contains the current simulation time. 
 
This class can be used to hold variables of floating point type such as 'double' or 'float'...
 
Ptr< SpectrumChannel > Create(void) const