|
ns-3
|
Simple Point To Point Channel. More...
#include <point-to-point-channel.h>


Classes | |
| class | Link |
Public Member Functions | |
| PointToPointChannel () | |
| Create a PointToPointChannel. | |
| void | Attach (Ptr< PointToPointNetDevice > device) |
| Attach a given netdevice to this channel. | |
| virtual bool | TransmitStart (Ptr< Packet > p, Ptr< PointToPointNetDevice > src, Time txTime) |
| Transmit a packet over this channel. | |
| virtual uint32_t | GetNDevices (void) const |
| Get number of devices on this channel. | |
| Ptr< PointToPointNetDevice > | GetPointToPointDevice (uint32_t i) const |
| virtual Ptr< NetDevice > | GetDevice (uint32_t i) const |
Public Member Functions inherited from ns3::Channel | |
| uint32_t | GetId (void) const |
Public Member Functions inherited from ns3::Object | |
| virtual TypeId | GetInstanceTypeId (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| void | Dispose (void) |
| void | AggregateObject (Ptr< Object > other) |
| AggregateIterator | GetAggregateIterator (void) const |
| void | Start (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount (const SimpleRefCount &o) | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
| uint32_t | GetReferenceCount (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| void | GetAttribute (std::string name, AttributeValue &value) const |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
| 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) |
| This method returns the TypeId associated to ns3::PointToPointChannel. | |
Protected Member Functions | |
| Time | GetDelay (void) const |
| bool | IsInitialized (void) const |
| Ptr< PointToPointNetDevice > | GetSource (uint32_t i) const |
| Ptr< PointToPointNetDevice > | GetDestination (uint32_t i) const |
Simple Point To Point Channel.
This class represents a very simple point to point channel. Think full duplex RS-232 or RS-422 with null modem and no handshaking. There is no multi-drop capability on this channel – there can be a maximum of two point-to-point net devices connected.
There are two "wires" in the channel. The first device connected gets the [0] wire to transmit on. The second device gets the [1] wire. There is a state (IDLE, TRANSMITTING) associated with each wire.
| ns3::PointToPointChannel::PointToPointChannel | ( | ) |
Create a PointToPointChannel.
By default, you get a channel that has zero transmission delay.
References NS_LOG_FUNCTION_NOARGS.
| void ns3::PointToPointChannel::Attach | ( | Ptr< PointToPointNetDevice > | device | ) |
Attach a given netdevice to this channel.
| device | pointer to the netdevice to attach to the channel |
References NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::PointToPointNetDevice::Attach().
| i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
References NS_LOG_FUNCTION_NOARGS.
|
virtual |
Get number of devices on this channel.
Implements ns3::Channel.
References NS_LOG_FUNCTION_NOARGS.
|
static |
This method returns the TypeId associated to ns3::PointToPointChannel.
Attributes defined for this type:
Attributes defined in parent class ns3::Channel:
TraceSources defined for this type:
Reimplemented from ns3::Channel.
Reimplemented in ns3::PointToPointRemoteChannel.
References ns3::MakeTraceSourceAccessor(), ns3::Seconds(), and ns3::TypeId::SetParent().
|
virtual |
Transmit a packet over this channel.
| p | Packet to transmit |
| src | Source PointToPointNetDevice |
| txTime | Transmit time to apply |
Reimplemented in ns3::PointToPointRemoteChannel.
References ns3::Packet::GetUid(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::PointToPointNetDevice::Receive(), and ns3::Simulator::ScheduleWithContext().