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 AccountingConsumer::GetTypeId(void) { static TypeId tid = TypeId("ns3::ndn::AccountingConsumer") .SetGroupName("Ndn") .SetParent<ConsumerCbr>() .AddConstructor<AccountingConsumer>() .AddAttribute("ConsumerID", "Consumer ID", IntegerValue(std::numeric_limits<uint32_t>::max()), MakeIntegerAccessor(&AccountingConsumer::m_id), MakeIntegerChecker<uint32_t>()) .AddAttribute("NumberOfContents", "Number of the Contents in total", StringValue("100"), MakeUintegerAccessor(&AccountingConsumer::SetNumberOfContents, &AccountingConsumer::GetNumberOfContents), MakeUintegerChecker<uint32_t>()) .AddAttribute("q", "parameter of improve rank", StringValue("0.7"), MakeDoubleAccessor(&AccountingConsumer::SetQ, &AccountingConsumer::GetQ), MakeDoubleChecker<double>()) .AddAttribute("s", "parameter of power", StringValue("0.7"), MakeDoubleAccessor(&AccountingConsumer::SetS, &AccountingConsumer::GetS), MakeDoubleChecker<double>()) .AddTraceSource("ReceivedMeaningfulContent", "Trace called every time meaningful content is received", MakeTraceSourceAccessor(&AccountingConsumer::m_receivedMeaningfulContent)); return tid; }
TypeId ConsumerZipfMandelbrot::GetTypeId(void) { static TypeId tid = TypeId("ns3::ndn::ConsumerZipfMandelbrot") .SetGroupName("Ndn") .SetParent<ConsumerCbr>() .AddConstructor<ConsumerZipfMandelbrot>() .AddAttribute("NumberOfContents", "Number of the Contents in total", StringValue("100"), MakeUintegerAccessor(&ConsumerZipfMandelbrot::SetNumberOfContents, &ConsumerZipfMandelbrot::GetNumberOfContents), MakeUintegerChecker<uint32_t>()) .AddAttribute("q", "parameter of improve rank", StringValue("0.7"), MakeDoubleAccessor(&ConsumerZipfMandelbrot::SetQ, &ConsumerZipfMandelbrot::GetQ), MakeDoubleChecker<double>()) .AddAttribute("s", "parameter of power", StringValue("0.7"), MakeDoubleAccessor(&ConsumerZipfMandelbrot::SetS, &ConsumerZipfMandelbrot::GetS), MakeDoubleChecker<double>()); return tid; }
TypeId FileConsumerCbr::GetTypeId(void) { static TypeId tid = TypeId("ns3::ndn::FileConsumerCbr") .SetGroupName("Ndn") .SetParent<FileConsumer>() .AddConstructor<FileConsumerCbr>() .AddAttribute("WindowSize", "The amount of interests that are issued per second (0 = automatically determine maximum)", UintegerValue(0), MakeUintegerAccessor(&FileConsumerCbr::m_windowSize), MakeUintegerChecker<uint32_t>()) .AddAttribute("StartWindowSize", "The amount of interests that are allowed to be issued at the beginning of the download without knowing the actual file size (0 = none)", UintegerValue(0), MakeUintegerAccessor(&FileConsumerCbr::m_fileStartWindow), MakeUintegerChecker<uint32_t>()) ; return tid; }
TypeId A2A4RsrqHandoverAlgorithm::GetTypeId () { static TypeId tid = TypeId ("ns3::A2A4RsrqHandoverAlgorithm") .SetParent<LteHandoverAlgorithm> () .AddConstructor<A2A4RsrqHandoverAlgorithm> () .AddAttribute ("ServingCellThreshold", "If the RSRQ of the serving cell is worse than this threshold, " "neighbour cells are consider for handover", UintegerValue (30), MakeUintegerAccessor (&A2A4RsrqHandoverAlgorithm::m_servingCellThreshold), MakeUintegerChecker<uint8_t> (0, 34)) // RSRQ range is [0..34] as per Section 9.1.7 of 3GPP TS 36.133 .AddAttribute ("NeighbourCellOffset", "Minimum offset between serving and best neighbour cell to trigger the Handover", UintegerValue (1), MakeUintegerAccessor (&A2A4RsrqHandoverAlgorithm::m_neighbourCellOffset), MakeUintegerChecker<uint8_t> ()) ; return tid; }
TypeId IpL4Protocol::GetTypeId (void) { static TypeId tid = TypeId ("ns3::IpL4Protocol") .SetParent<Object> () .AddAttribute ("ProtocolNumber", "The Ip protocol number.", UintegerValue (0), MakeUintegerAccessor (&IpL4Protocol::GetProtocolNumber), MakeUintegerChecker<int> ()) ; return tid; }
TypeId Channel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Channel") .SetParent<Object> () .AddAttribute ("Id", "The id (unique integer) of this Channel.", TypeId::ATTR_GET, UintegerValue (0), MakeUintegerAccessor (&Channel::m_id), MakeUintegerChecker<uint32_t> ()); return tid; }
TypeId NdiscCache::GetTypeId () { static TypeId tid = TypeId ("ns3::NdiscCache") .SetParent<Object> () .AddAttribute ("UnresolvedQueueSize", "Size of the queue for packets pending an NA reply.", UintegerValue (DEFAULT_UNRES_QLEN), MakeUintegerAccessor (&NdiscCache::m_unresQlen), MakeUintegerChecker<uint32_t> ()) ; return tid; }
TypeId LteAnr::GetTypeId () { static TypeId tid = TypeId ("ns3::LteAnr") .SetParent<Object> () .AddAttribute ("Threshold", "Minimum RSRQ range value required for detecting a neighbour cell", UintegerValue (0), MakeUintegerAccessor (&LteAnr::m_threshold), MakeUintegerChecker<uint8_t> (0, 34)) // RSRQ range is [0..34] as per Section 9.1.7 of 3GPP TS 36.133 ; return tid; }
TypeId TcpNewReno::GetTypeId (void) { static TypeId tid = TypeId ("ns3::TcpNewReno") .SetParent<TcpSocketBase> () .AddConstructor<TcpNewReno> () .AddAttribute ("ReTxThreshold", "Threshold for fast retransmit", UintegerValue (3), MakeUintegerAccessor (&TcpNewReno::m_retxThresh), MakeUintegerChecker<uint32_t> ()) .AddAttribute ("LimitedTransmit", "Enable limited transmit", BooleanValue (false), MakeBooleanAccessor (&TcpNewReno::m_limitedTx), MakeBooleanChecker ()) .AddTraceSource ("CongestionWindow", "The TCP connection's congestion window", MakeTraceSourceAccessor (&TcpNewReno::m_cWnd)) ; return tid; }
TypeId ContentStoreImpl<Policy>::GetTypeId() { static TypeId tid = TypeId(("ns3::ndn::cs::" + Policy::GetName()).c_str()) .SetGroupName("Ndn") .SetParent<ContentStore>() .AddConstructor<ContentStoreImpl<Policy>>() .AddAttribute("MaxSize", "Set maximum number of entries in ContentStore. If 0, limit is not enforced", StringValue("100"), MakeUintegerAccessor(&ContentStoreImpl<Policy>::GetMaxSize, &ContentStoreImpl<Policy>::SetMaxSize), MakeUintegerChecker<uint32_t>()) .AddTraceSource("DidAddEntry", "Trace fired every time entry is successfully added to the cache", MakeTraceSourceAccessor(&ContentStoreImpl<Policy>::m_didAddEntry)); return tid; }
TypeId WimaxMacQueue::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WimaxMacQueue") .SetParent<Object> () .AddAttribute ( "MaxSize", "Maximum size", UintegerValue (1024), MakeUintegerAccessor (&WimaxMacQueue::GetMaxSize, &WimaxMacQueue::SetMaxSize), MakeUintegerChecker<uint32_t> ()) .AddTraceSource ("Enqueue", "Enqueue trace", MakeTraceSourceAccessor (&WimaxMacQueue::m_traceEnqueue)) .AddTraceSource ("Dequeue", "Dequeue trace", MakeTraceSourceAccessor (&WimaxMacQueue::m_traceDequeue)) .AddTraceSource ("Drop", "Drop trace", MakeTraceSourceAccessor (&WimaxMacQueue::m_traceDrop)) ; 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; }