26 #include "ns3/uan-net-device.h"
27 #include "ns3/uan-mac.h"
28 #include "ns3/uan-phy.h"
29 #include "ns3/uan-channel.h"
30 #include "ns3/uan-prop-model.h"
31 #include "ns3/uan-prop-model-ideal.h"
32 #include "ns3/uan-transducer.h"
33 #include "ns3/mobility-model.h"
35 #include "ns3/uan-tx-mode.h"
36 #include "ns3/config.h"
37 #include "ns3/simulator.h"
38 #include "ns3/uan-noise-model-default.h"
147 std::ostringstream oss;
149 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::UanNetDevice/Phy/RxOk";
154 oss <<
"/NodeList/" << nodeid <<
"/DeviceList/" << deviceid <<
"/$ns3::UanNetDevice/Phy/Tx";
164 EnableAscii (os, dev->GetNode ()->GetId (), dev->GetIfIndex ());
175 for (uint32_t j = 0; j < node->
GetNDevices (); ++j)
194 channel->SetPropagationModel (CreateObject<UanPropModelIdeal> ());
195 channel->SetNoiseModel (noise);
210 devices.
Add (device);
226 device->SetMac (mac);
227 device->SetPhy (phy);
228 device->SetTransducer (trans);
229 device->SetChannel (channel);
239 int64_t currentStream = stream;
247 currentStream += uan->GetPhy ()->AssignStreams (currentStream);
248 currentStream += uan->GetMac ()->AssignStreams (currentStream);
251 return (currentStream - stream);
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
std::vector< Ptr< Node > >::const_iterator Iterator
Hold a value for an Attribute.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
#define NS_LOG_COMPONENT_DEFINE(name)
void SetTypeId(TypeId tid)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
void Connect(std::string path, const CallbackBase &cb)
Keep track of the current position and velocity of an object.
double GetSeconds(void) const
ObjectFactory m_transducer
Virtual base class for all UAN MAC protocols.
static void EnablePrinting(void)
void SetMac(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())
Ptr< Object > Create(void) const
void SetTransducer(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())
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Abstraction of packet modulation information.
holds a vector of ns3::NetDevice pointers
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Ptr< NetDevice > GetDevice(uint32_t index) const
Virtual base for Transducer objects.
static void EnableAscii(std::ostream &os, uint32_t nodeid, uint32_t deviceid)
static void AsciiPhyRxOkEvent(std::ostream *os, std::string context, Ptr< const Packet > packet, double snr, UanTxMode mode)
uint32_t GetNDevices(void) const
keep track of a set of node pointers.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
void Set(std::string name, const AttributeValue &value)
static void EnableAsciiAll(std::ostream &os)
Base class for UAN Phy models.
static NodeContainer GetGlobal(void)
Create a NodeContainer that contains a list of all nodes created through NodeContainer::Create() and ...
static void AsciiPhyTxEvent(std::ostream *os, std::string context, Ptr< const Packet > packet, double txPowerDb, UanTxMode mode)
instantiate subclasses of ns3::Object.
uint32_t AddDevice(Ptr< NetDevice > device)
static UanAddress Allocate()
Allocates UanAddress from 0-254 (will wrap back to 0 if more than 255 are allocated) ...
std::vector< Ptr< NetDevice > >::const_iterator Iterator
#define NS_LOG_DEBUG(msg)
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
NetDeviceContainer Install(NodeContainer c) const
Ptr< T > GetObject(void) const
void SetPhy(std::string phyType, 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())