A simple channel, for simple things and testing. More...
#include <simple-channel.h>
Public Member Functions | |
SimpleChannel () | |
void | Add (Ptr< SimpleNetDevice > device) |
virtual Ptr< NetDevice > | GetDevice (uint32_t i) const |
virtual uint32_t | GetNDevices (void) const |
void | Send (Ptr< Packet > p, uint16_t protocol, Mac48Address to, Mac48Address from, Ptr< SimpleNetDevice > sender) |
![]() | |
Channel () | |
virtual | ~Channel () |
uint32_t | GetId (void) const |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Private Attributes | |
std::vector< Ptr < SimpleNetDevice > > | m_devices |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
A simple channel, for simple things and testing.
ns3::SimpleChannel is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 36 of file simple-channel.h.
ns3::SimpleChannel::SimpleChannel | ( | ) |
Definition at line 43 of file simple-channel.cc.
References NS_LOG_FUNCTION.
void ns3::SimpleChannel::Add | ( | Ptr< SimpleNetDevice > | device | ) |
Definition at line 67 of file simple-channel.cc.
References m_devices, and NS_LOG_FUNCTION.
Referenced by ns3::SimpleNetDevice::SetChannel().
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
Definition at line 80 of file simple-channel.cc.
References m_devices, and NS_LOG_FUNCTION.
|
virtual |
This method must be implemented by subclasses.
Implements ns3::Channel.
Definition at line 74 of file simple-channel.cc.
References m_devices, and NS_LOG_FUNCTION.
|
static |
Reimplemented from ns3::Channel.
Definition at line 34 of file simple-channel.cc.
References ns3::TypeId::SetParent().
void ns3::SimpleChannel::Send | ( | Ptr< Packet > | p, |
uint16_t | protocol, | ||
Mac48Address | to, | ||
Mac48Address | from, | ||
Ptr< SimpleNetDevice > | sender | ||
) |
Definition at line 49 of file simple-channel.cc.
References ns3::Packet::Copy(), ns3::Node::GetId(), ns3::SimpleNetDevice::GetNode(), m_devices, NS_LOG_FUNCTION, ns3::SimpleNetDevice::Receive(), ns3::Simulator::ScheduleWithContext(), and ns3::Seconds().
Referenced by ns3::SimpleNetDevice::Send(), and ns3::SimpleNetDevice::SendFrom().
|
private |
Definition at line 52 of file simple-channel.h.
Referenced by Add(), GetDevice(), GetNDevices(), and Send().