#include <uan-helper.h>
Public Member Functions | |
UanHelper () | |
virtual | ~UanHelper () |
int64_t | AssignStreams (NetDeviceContainer c, int64_t stream) |
NetDeviceContainer | Install (NodeContainer c) const |
NetDeviceContainer | Install (NodeContainer c, Ptr< UanChannel > channel) const |
Ptr< UanNetDevice > | Install (Ptr< Node > node, Ptr< UanChannel > channel) const |
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()) |
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()) |
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()) |
Static Public Member Functions | |
static void | EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid) |
static void | EnableAscii (std::ostream &os, NetDeviceContainer d) |
static void | EnableAscii (std::ostream &os, NodeContainer n) |
static void | EnableAsciiAll (std::ostream &os) |
Private Attributes | |
ObjectFactory | m_device |
ObjectFactory | m_mac |
ObjectFactory | m_phy |
ObjectFactory | m_transducer |
Definition at line 34 of file uan-helper.h.
ns3::UanHelper::UanHelper | ( | ) |
Definition at line 58 of file uan-helper.cc.
References m_mac, m_phy, m_transducer, and ns3::ObjectFactory::SetTypeId().
|
virtual |
Definition at line 66 of file uan-helper.cc.
int64_t ns3::UanHelper::AssignStreams | ( | NetDeviceContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
c | NetDeviceContainer of the set of net devices for which the UanNetDevice should be modified to use a fixed stream |
stream | first stream index to use |
Definition at line 237 of file uan-helper.cc.
References ns3::NetDeviceContainer::Begin(), and ns3::NetDeviceContainer::End().
|
static |
os | output stream |
nodeid | the id of the node to generate ascii output for. |
deviceid | the id of the device to generate ascii output for. |
Enable ascii output on the specified deviceid within the specified nodeid if it is of type ns3::UanNetDevice and dump that to the specified stdc++ output stream.
Definition at line 144 of file uan-helper.cc.
References ns3::AsciiPhyRxOkEvent(), ns3::AsciiPhyTxEvent(), ns3::Config::Connect(), ns3::Packet::EnablePrinting(), and ns3::MakeBoundCallback().
Referenced by EnableAscii(), and EnableAsciiAll().
|
static |
os | output stream |
d | device container |
Enable ascii output on each device which is of the ns3::UanNetDevice type and which is located in the input device container and dump that to the specified stdc++ output stream.
Definition at line 159 of file uan-helper.cc.
References ns3::NetDeviceContainer::Begin(), EnableAscii(), and ns3::NetDeviceContainer::End().
|
static |
os | output stream |
n | node container |
Enable ascii output on each device which is of the ns3::UanNetDevice type and which is located in one of the input node and dump that to the specified stdc++ output stream.
Definition at line 169 of file uan-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), EnableAscii(), ns3::NodeContainer::End(), ns3::Node::GetDevice(), and ns3::Node::GetNDevices().
|
static |
os | output stream |
Enable ascii output on each device which is of the ns3::UanNetDevice type and dump that to the specified stdc++ output stream.
Definition at line 184 of file uan-helper.cc.
References EnableAscii(), and ns3::NodeContainer::GetGlobal().
Referenced by Experiment::Run().
NetDeviceContainer ns3::UanHelper::Install | ( | NodeContainer | c | ) | const |
c | a set of nodes |
This method creates a simple ns3::UanChannel (with a default ns3::UanNoiseModelDefault and ns3::UanPropModelIdeal) and creates, for each of the input nodes, a new ns3::UanNetDevice attached to this shared channel. Each ns3::UanNetDevice is also configured with an ns3::UanTransducerHd, ns3::UanMac, and, ns3::UanPhy, all of which are created based on the user-specified attributes specified in UanHelper::SetTransducer, UanHelper::SetMac, and, UanHelper::SetPhy.
Definition at line 190 of file uan-helper.cc.
Referenced by ns3::AcousticModemEnergyTestCase::DoRun(), ns3::AcousticModemEnergyDepletionTestCase::DoRun(), Install(), NetAnimExperiment::Run(), and Experiment::Run().
NetDeviceContainer ns3::UanHelper::Install | ( | NodeContainer | c, |
Ptr< UanChannel > | channel | ||
) | const |
c | a set of nodes |
channel | a channel to use |
For each of the input nodes, a new ns3::UanNetDevice is attached to the shared input channel. Each ns3::UanNetDevice is also configured with an ns3::UanTransducerHd, a ns3::UanMac, and ns3::UanPhy, all of which are created based on the user-specified attributes specified in UanHelper::SetTransducer, UanHelper::SetMac, and UanHelper::SetPhy.
Definition at line 201 of file uan-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), first::devices, ns3::NodeContainer::End(), ns3::Object::GetObject(), Install(), and NS_LOG_DEBUG.
Ptr< UanNetDevice > ns3::UanHelper::Install | ( | Ptr< Node > | node, |
Ptr< UanChannel > | channel | ||
) | const |
node | a node where to install the uan components |
channel | a channel to use |
Create a default uan stack with:
Channel, physical layer, transducer and mac layer are added to the UanNetDevice and then added to the node.
Definition at line 217 of file uan-helper.cc.
References ns3::Node::AddDevice(), ns3::UanAddress::Allocate(), ns3::ObjectFactory::Create(), m_mac, m_phy, and m_transducer.
void ns3::UanHelper::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 () |
||
) |
type | the type of ns3::UanMac to create. |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested mac.
Definition at line 73 of file uan-helper.cc.
References m_mac, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by NetAnimExperiment::Run(), and Experiment::Run().
void ns3::UanHelper::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 () |
||
) |
phyType | the type of ns3::UanPhy to create. |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested phy.
Definition at line 96 of file uan-helper.cc.
References m_phy, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by Experiment::Run().
void ns3::UanHelper::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 () |
||
) |
type | the type of ns3::Transducer to create |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested transducer.
Definition at line 120 of file uan-helper.cc.
References m_transducer, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
|
private |
Definition at line 232 of file uan-helper.h.
|
private |
Definition at line 233 of file uan-helper.h.
Referenced by Install(), SetMac(), and UanHelper().
|
private |
Definition at line 234 of file uan-helper.h.
Referenced by Install(), SetPhy(), and UanHelper().
|
private |
Definition at line 235 of file uan-helper.h.
Referenced by Install(), SetTransducer(), and UanHelper().