|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/sixlowpan-net-device.h"
23 #include "ns3/net-device.h"
25 #include "ns3/names.h"
53 for (uint32_t i = 0; i < c.
GetN (); ++i)
56 NS_ASSERT_MSG (device != 0,
"No NetDevice found in the node " <<
int(i) );
64 dev->SetNetDevice (device);
73 for (uint32_t i = 0; i < c.
GetN (); ++i)
79 sixDevice->AddContext (contextId, context,
true, validity);
88 for (uint32_t i = 0; i < c.
GetN (); ++i)
94 sixDevice->RenewContext (contextId, validity);
103 for (uint32_t i = 0; i < c.
GetN (); ++i)
109 sixDevice->InvalidateContext (contextId);
118 for (uint32_t i = 0; i < c.
GetN (); ++i)
124 sixDevice->RemoveContext (contextId);
131 int64_t currentStream = stream;
139 currentStream += dev->AssignStreams (currentStream);
142 return (currentStream - stream);
holds a vector of ns3::NetDevice pointers
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void RemoveContext(NetDeviceContainer c, uint8_t contextId)
Remove a compression Context in a set of NetDevices.
uint32_t GetId(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold a value for an Attribute.
void InvalidateContext(NetDeviceContainer c, uint8_t contextId)
Invalidates a compression Context in a set of NetDevices.
void AddContext(NetDeviceContainer c, uint8_t contextId, Ipv6Prefix context, Time validity)
Adds a compression Context to a set of NetDevices.
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
void RenewContext(NetDeviceContainer c, uint8_t contextId, Time validity)
Renew a compression Context in a set of NetDevices.
Shim performing 6LoWPAN compression, decompression and fragmentation.
virtual Ptr< Node > GetNode(void) const =0
NetDeviceContainer Install(NetDeviceContainer c)
Install the SixLoWPAN stack on top of an existing NetDevice.
Simulation virtual time values and global simulation resolution.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
uint32_t GetN(void) const
Get the number of Ptr<NetDevice> stored in this container.
Describes an IPv6 prefix.
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Set an attribute on each ns3::SixlowpanNetDevice created by SixlowpanHelper::Install.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
ObjectFactory m_deviceFactory
Object factory.