src/devices/point-to-point/point-to-point-net-device.cc
changeset 2927 73b47ce1d805
parent 2834 1aab57845b07
child 2965 4b28e9740e3b
equal deleted inserted replaced
2926:96d1fc816681 2927:73b47ce1d805
    24 #include "ns3/simulator.h"
    24 #include "ns3/simulator.h"
    25 #include "ns3/mac48-address.h"
    25 #include "ns3/mac48-address.h"
    26 #include "ns3/llc-snap-header.h"
    26 #include "ns3/llc-snap-header.h"
    27 #include "ns3/error-model.h"
    27 #include "ns3/error-model.h"
    28 #include "ns3/trace-source-accessor.h"
    28 #include "ns3/trace-source-accessor.h"
       
    29 #include "ns3/pointer.h"
    29 #include "point-to-point-net-device.h"
    30 #include "point-to-point-net-device.h"
    30 #include "point-to-point-channel.h"
    31 #include "point-to-point-channel.h"
    31 
    32 
    32 NS_LOG_COMPONENT_DEFINE ("PointToPointNetDevice");
    33 NS_LOG_COMPONENT_DEFINE ("PointToPointNetDevice");
    33 
    34 
    48     .AddAttribute ("DataRate", "The default data rate for point to point links",
    49     .AddAttribute ("DataRate", "The default data rate for point to point links",
    49                    DataRate ("10Mb/s"),
    50                    DataRate ("10Mb/s"),
    50                    MakeDataRateAccessor (&PointToPointNetDevice::m_bps),
    51                    MakeDataRateAccessor (&PointToPointNetDevice::m_bps),
    51                    MakeDataRateChecker ())
    52                    MakeDataRateChecker ())
    52     .AddAttribute ("ReceiveErrorModel", "XXX",
    53     .AddAttribute ("ReceiveErrorModel", "XXX",
    53                    Ptr<ErrorModel> (0),
    54                    Pointer (),
    54                    MakePtrAccessor (&PointToPointNetDevice::m_receiveErrorModel),
    55                    MakePointerAccessor (&PointToPointNetDevice::m_receiveErrorModel),
    55                    MakePtrChecker<ErrorModel> ())
    56                    MakePointerChecker<ErrorModel> ())
    56     .AddAttribute ("TxQueue", "XXX",
    57     .AddAttribute ("TxQueue", "XXX",
    57                    Ptr<Queue> (0),
    58                    Pointer (),
    58                    MakePtrAccessor (&PointToPointNetDevice::m_queue),
    59                    MakePointerAccessor (&PointToPointNetDevice::m_queue),
    59                    MakePtrChecker<Queue> ())
    60                    MakePointerChecker<Queue> ())
    60     .AddAttribute ("InterframeGap", "XXX",
    61     .AddAttribute ("InterframeGap", "XXX",
    61                    Seconds (0.0),
    62                    Seconds (0.0),
    62                    MakeTimeAccessor (&PointToPointNetDevice::m_tInterframeGap),
    63                    MakeTimeAccessor (&PointToPointNetDevice::m_tInterframeGap),
    63                    MakeTimeChecker ())
    64                    MakeTimeChecker ())
    64     .AddTraceSource ("Rx", "Receive MAC packet.",
    65     .AddTraceSource ("Rx", "Receive MAC packet.",