TypeId Consumer::GetTypeId(void) { static TypeId tid = TypeId("ns3::ndn::Consumer") .SetGroupName("Ndn") .SetParent<App>() .AddAttribute("StartSeq", "Initial sequence number", IntegerValue(0), MakeIntegerAccessor(&Consumer::m_seq), MakeIntegerChecker<int32_t>()) .AddAttribute("Prefix", "Name of the Interest", StringValue("/"), MakeNameAccessor(&Consumer::m_interestName), MakeNameChecker()) .AddAttribute("LifeTime", "LifeTime for interest packet", StringValue("2s"), MakeTimeAccessor(&Consumer::m_interestLifeTime), MakeTimeChecker()) .AddAttribute("RetxTimer", "Timeout defining how frequent retransmission timeouts should be checked", StringValue("50ms"), MakeTimeAccessor(&Consumer::GetRetxTimer, &Consumer::SetRetxTimer), MakeTimeChecker()) .AddTraceSource("LastRetransmittedInterestDataDelay", "Delay between last retransmitted Interest and received Data", MakeTraceSourceAccessor(&Consumer::m_lastRetransmittedInterestDataDelay), "ns3::ndn::Consumer::LastRetransmittedInterestDataDelayCallback") .AddTraceSource("FirstInterestDataDelay", "Delay between first transmitted Interest and received Data", MakeTraceSourceAccessor(&Consumer::m_firstInterestDataDelay), "ns3::ndn::Consumer::FirstInterestDataDelayCallback"); return tid; }
TypeId Ping6::GetTypeId () { static TypeId tid = TypeId ("ns3::Ping6") .SetParent<Application>() .AddConstructor<Ping6>() .AddAttribute ("MaxPackets", "The maximum number of packets the application will send", UintegerValue (100), MakeUintegerAccessor (&Ping6::m_count), MakeUintegerChecker<uint32_t>()) .AddAttribute ("Interval", "The time to wait between packets", TimeValue (Seconds (1.0)), MakeTimeAccessor (&Ping6::m_interval), MakeTimeChecker ()) .AddAttribute ("RemoteIpv6", "The Ipv6Address of the outbound packets", Ipv6AddressValue (), MakeIpv6AddressAccessor (&Ping6::m_peerAddress), MakeIpv6AddressChecker ()) .AddAttribute ("LocalIpv6", "Local Ipv6Address of the sender", Ipv6AddressValue (), MakeIpv6AddressAccessor (&Ping6::m_localAddress), MakeIpv6AddressChecker ()) .AddAttribute ("PacketSize", "Size of packets generated", UintegerValue (100), MakeUintegerAccessor (&Ping6::m_size), MakeUintegerChecker<uint32_t>()) ; return tid; }
TypeId WimaxPhy::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WimaxPhy").SetParent<Object> () .AddAttribute ("Channel", "Wimax channel", PointerValue (), MakePointerAccessor (&WimaxPhy::GetChannel, &WimaxPhy::Attach), MakePointerChecker<WimaxChannel> ()) .AddAttribute ("FrameDuration", "The frame duration in seconds.", TimeValue (Seconds (0.01)), MakeTimeAccessor (&WimaxPhy::SetFrameDuration, &WimaxPhy::GetFrameDurationSec), MakeTimeChecker ()) .AddAttribute ("Frequency", "The central frequency in KHz.", UintegerValue (5000000), MakeUintegerAccessor (&WimaxPhy::SetFrequency, &WimaxPhy::GetFrequency), MakeUintegerChecker<uint32_t> (1000000, 11000000)) .AddAttribute ("Bandwidth", "The channel bandwidth in Hz.", UintegerValue (10000000), MakeUintegerAccessor (&WimaxPhy::SetChannelBandwidth, &WimaxPhy::GetChannelBandwidth), MakeUintegerChecker<uint32_t> (5000000, 30000000)) ; return tid; }
TypeId DelayJitterEstimationTimestampTag::GetTypeId (void) { static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag") .SetParent<Tag> () .AddConstructor<DelayJitterEstimationTimestampTag> () .AddAttribute ("CreationTime", "The time at which the timestamp was created", StringValue ("0.0s"), MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime), MakeTimeChecker ()) ; return tid; }
TypeId CsmaChannel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::CsmaChannel") .SetParent<Channel> () .AddConstructor<CsmaChannel> () .AddAttribute ("DataRate", "The transmission data rate to be provided to devices connected to the channel", DataRateValue (DataRate (0xffffffff)), MakeDataRateAccessor (&CsmaChannel::m_bps), MakeDataRateChecker ()) .AddAttribute ("Delay", "Transmission delay through the channel", TimeValue (Seconds (0)), MakeTimeAccessor (&CsmaChannel::m_delay), MakeTimeChecker ()) ; return tid; }
TypeId FdNetDevice::GetTypeId (void) { static TypeId tid = TypeId ("ns3::FdNetDevice") .SetParent<NetDevice> () .AddConstructor<FdNetDevice> () .AddAttribute ("Address", "The MAC address of this device.", Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")), MakeMac48AddressAccessor (&FdNetDevice::m_address), MakeMac48AddressChecker ()) .AddAttribute ("Start", "The simulation time at which to spin up the device thread.", TimeValue (Seconds (0.)), MakeTimeAccessor (&FdNetDevice::m_tStart), MakeTimeChecker ()) .AddAttribute ("Stop", "The simulation time at which to tear down the device thread.", TimeValue (Seconds (0.)), MakeTimeAccessor (&FdNetDevice::m_tStop), MakeTimeChecker ()) .AddAttribute ("EncapsulationMode", "The link-layer encapsulation type to use.", EnumValue (DIX), MakeEnumAccessor (&FdNetDevice::m_encapMode), MakeEnumChecker (DIX, "Dix", LLC, "Llc", DIXPI, "DixPi")) .AddAttribute ("RxQueueSize", "Maximum size of the read queue. " "This value limits number of packets that have been read " "from the network into a memory buffer but have not yet " "been processed by the simulator.", UintegerValue (1000), MakeUintegerAccessor (&FdNetDevice::m_maxPendingReads), MakeUintegerChecker<uint32_t> ()) // // Trace sources at the "top" of the net device, where packets transition // to/from higher layers. These points do not really correspond to the // MAC layer of the underlying operating system, but exist to provide // a consitent tracing environment. These trace hooks should really be // interpreted as the points at which a packet leaves the ns-3 environment // destined for the underlying operating system or vice-versa. // .AddTraceSource ("MacTx", "Trace source indicating a packet has arrived for transmission by this device", MakeTraceSourceAccessor (&FdNetDevice::m_macTxTrace)) .AddTraceSource ("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission", MakeTraceSourceAccessor (&FdNetDevice::m_macTxDropTrace)) .AddTraceSource ("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer " "and is being forwarded up the local protocol stack. This is a promiscuous trace,", MakeTraceSourceAccessor (&FdNetDevice::m_macPromiscRxTrace)) .AddTraceSource ("MacRx", "A packet has been received by this device, has been passed up from the physical layer " "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,", MakeTraceSourceAccessor (&FdNetDevice::m_macRxTrace)) // // Trace sources designed to simulate a packet sniffer facility (tcpdump). // .AddTraceSource ("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&FdNetDevice::m_snifferTrace)) .AddTraceSource ("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&FdNetDevice::m_promiscSnifferTrace)) ; return tid; }
TypeId RedQueue::GetTypeId (void) { static TypeId tid = TypeId ("ns3::RedQueue") .SetParent<Queue> () .AddConstructor<RedQueue> () .AddAttribute ("Mode", "Determines unit for QueueLimit", EnumValue (QUEUE_MODE_PACKETS), MakeEnumAccessor (&RedQueue::SetMode), MakeEnumChecker (QUEUE_MODE_BYTES, "QUEUE_MODE_BYTES", QUEUE_MODE_PACKETS, "QUEUE_MODE_PACKETS")) .AddAttribute ("MeanPktSize", "Average of packet size", UintegerValue (500), MakeUintegerAccessor (&RedQueue::m_meanPktSize), MakeUintegerChecker<uint32_t> ()) .AddAttribute ("IdlePktSize", "Average packet size used during idle times. Used when m_cautions = 3", UintegerValue (0), MakeUintegerAccessor (&RedQueue::m_idlePktSize), MakeUintegerChecker<uint32_t> ()) .AddAttribute ("Wait", "True for waiting between dropped packets", BooleanValue (true), MakeBooleanAccessor (&RedQueue::m_isWait), MakeBooleanChecker ()) .AddAttribute ("Gentle", "True to increases dropping probability slowly when average queue exceeds maxthresh", BooleanValue (true), MakeBooleanAccessor (&RedQueue::m_isGentle), MakeBooleanChecker ()) .AddAttribute ("MinTh", "Minimum average length threshold in packets/bytes", DoubleValue (5), MakeDoubleAccessor (&RedQueue::m_minTh), MakeDoubleChecker<double> ()) .AddAttribute ("MaxTh", "Maximum average length threshold in packets/bytes", DoubleValue (15), MakeDoubleAccessor (&RedQueue::m_maxTh), MakeDoubleChecker<double> ()) .AddAttribute ("QueueLimit", "Queue limit in bytes/packets", UintegerValue (25), MakeUintegerAccessor (&RedQueue::m_queueLimit), MakeUintegerChecker<uint32_t> ()) .AddAttribute ("QW", "Queue weight related to the exponential weighted moving average (EWMA)", DoubleValue (0.002), MakeDoubleAccessor (&RedQueue::m_qW), MakeDoubleChecker <double> ()) .AddAttribute ("LInterm", "The maximum probability of dropping a packet", DoubleValue (50), MakeDoubleAccessor (&RedQueue::m_lInterm), MakeDoubleChecker <double> ()) .AddAttribute ("Ns1Compat", "NS-1 compatibility", BooleanValue (false), MakeBooleanAccessor (&RedQueue::m_isNs1Compat), MakeBooleanChecker ()) .AddAttribute ("LinkBandwidth", "The RED link bandwidth", DataRateValue (DataRate ("1.5Mbps")), MakeDataRateAccessor (&RedQueue::m_linkBandwidth), MakeDataRateChecker ()) .AddAttribute ("LinkDelay", "The RED link delay", TimeValue (MilliSeconds (20)), MakeTimeAccessor (&RedQueue::m_linkDelay), MakeTimeChecker ()) ; return tid; }