|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/lte-helper.h"
22 #include "ns3/epc-helper.h"
23 #include "ns3/core-module.h"
24 #include "ns3/network-module.h"
25 #include "ns3/ipv4-global-routing-helper.h"
26 #include "ns3/ipv6-static-routing.h"
27 #include "ns3/internet-module.h"
28 #include "ns3/mobility-module.h"
29 #include "ns3/lte-module.h"
30 #include "ns3/applications-module.h"
31 #include "ns3/point-to-point-helper.h"
32 #include "ns3/config-store.h"
45 main (
int argc,
char *argv[])
48 cmd.Parse (argc, argv);
58 remoteHostContainer.
Create (1);
61 internet.
Install (remoteHostContainer);
77 for (uint16_t i = 0; i < 2; i++)
79 positionAlloc->
Add (Vector (60.0 * i, 0, 0));
82 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
83 mobility.SetPositionAllocator (positionAlloc);
116 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
125 lteHelper->
Attach (ueLteDevs1.
Get (0), enbLteDevs.
Get (0));
126 lteHelper->
Attach (ueLteDevs2.
Get (0), enbLteDevs.
Get (1));
146 echoClient1.SetAttribute (
"MaxPackets",
UintegerValue (1000));
148 echoClient1.SetAttribute (
"PacketSize",
UintegerValue (1024));
150 echoClient2.SetAttribute (
"MaxPackets",
UintegerValue (1000));
152 echoClient2.SetAttribute (
"PacketSize",
UintegerValue (1024));
holds a vector of ns3::NetDevice pointers
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
AttributeValue implementation for DataRate.
Parse command-line arguments.
void Add(Vector v)
Add a position to the list of positions.
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
uint32_t GetId(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
void SetForwarding(uint32_t i, bool state)
Set the state of the stack (act as a router or as an host) for the specified index.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Create an application which sends a UDP packet and waits for an echo of this packet.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
@ LOG_LEVEL_ALL
Print everything.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
NetDeviceContainer Install(NodeContainer c)
Describes an IPv6 address.
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
void SetBase(Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base=Ipv6Address("::1"))
Set the base network number, network prefix, and base interface ID.
void SetDefaultRouteInAllNodes(uint32_t router)
Set the default route for all the devices (except the router itself).
Helper class to auto-assign global IPv6 unicast addresses.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ipv6InterfaceContainer Assign(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses.
Class for representing data rates.
void SetDefaultRoute(Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address("::"), uint32_t metric=0)
Set the default route.
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.
Keep track of a set of IPv6 interfaces.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Helper class that adds ns3::Ipv6StaticRouting objects.
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
virtual Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices)
Assign IPv6 addresses to UE devices.
static void Run(void)
Run the simulation.
void AddNetworkRouteTo(Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, uint32_t metric=0)
Add route to network.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Time Seconds(double value)
Construct a Time in the indicated unit.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
holds a vector of ns3::Application pointers.
AttributeValue implementation for Time.
Build a set of PointToPointNetDevice objects.
keep track of a set of node pointers.
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Access to the IPv6 forwarding table, interfaces, and configuration.
Hold an unsigned integer type.
Create a server application which waits for input UDP packets and sends them back to the original sen...
void EnablePcapIpv6(std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename=false)
Enable pcap output the indicated Ipv6 and interface pair.
Describes an IPv6 prefix.
aggregate IP/TCP/UDP functionality to existing Nodes.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Ptr< Ipv6StaticRouting > GetStaticRouting(Ptr< Ipv6 > ipv6) const
Get Ipv6StaticRouting pointer from IPv6 stack.
Helper class used to assign positions and mobility models to nodes.
virtual Ipv6Address GetUeDefaultGatewayAddress6()