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; }
QVariant ComponentExtension::data( const QModelIndex &index, int role ) const { size_t roleId; if (!decodeRole( role, roleId )) { return QVariant( QVariant::Invalid ); } if (roleId != ItemRole::componentId) { return QVariant( QVariant::Invalid ); } auto data = index.model()->data( index, ItemRole::valueTypeId ); auto typeName = std::string( data.toString().toUtf8() ); auto typeId = TypeId( typeName.c_str() ); std::function< bool ( size_t ) > predicate = [&] ( size_t role ) { return index.model()->data( index, static_cast< int >( role ) ) == true; }; auto component = qtFramework_->findComponent( typeId, predicate ); if (component == nullptr) { return QVariant( QVariant::Invalid ); } auto qmlComponent = qtFramework_->toQmlComponent( *component ); if (qmlComponent == nullptr) { return QVariant( QVariant::Invalid ); } return QVariant::fromValue< QObject * >( qmlComponent ); }
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 TopologyReader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::TopologyReader") .SetParent<Object> () ; return tid; }
TypeId FriisPropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::FriisPropagationLossModel") .SetParent<PropagationLossModel> () .AddConstructor<FriisPropagationLossModel> () .AddAttribute ("Frequency", "The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).", DoubleValue (5.150e9), MakeDoubleAccessor (&FriisPropagationLossModel::SetFrequency, &FriisPropagationLossModel::GetFrequency), MakeDoubleChecker<double> ()) .AddAttribute ("SystemLoss", "The system loss", DoubleValue (1.0), MakeDoubleAccessor (&FriisPropagationLossModel::m_systemLoss), MakeDoubleChecker<double> ()) .AddAttribute ("MinDistance", "The distance under which the propagation model refuses to give results (m)", DoubleValue (0.5), MakeDoubleAccessor (&FriisPropagationLossModel::SetMinDistance, &FriisPropagationLossModel::GetMinDistance), MakeDoubleChecker<double> ()) ; return tid; }
void Entry::setValue(uint16 type, uint32 count, const char* buf, long len) { long dataSize = count * TypeInfo::typeSize(TypeId(type)); // No minimum size requirement, but make sure the buffer can hold the data if (len < dataSize) { throw Error("Size too small"); } if (alloc_) { delete[] pData_; pData_ = new char[len]; memset(pData_, 0x0, len); memcpy(pData_, buf, dataSize); size_ = len; } else { if (size_ == 0) { // Set the data pointer of a virgin entry pData_ = const_cast<char*>(buf); size_ = len; } else { // Overwrite existing data if it fits into the buffer if (dataSize > size_) throw Error("Value too large"); memset(pData_, 0x0, size_); memcpy(pData_, buf, dataSize); // do not change size_ } } type_ = type; count_ = count; } // Entry::setValue
TypeId Socket::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Socket") .SetParent<Object> (); return tid; }
TypeId TwoRayGroundPropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::TwoRayGroundPropagationLossModel") .SetParent<PropagationLossModel> () .AddConstructor<TwoRayGroundPropagationLossModel> () .AddAttribute ("Frequency", "The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).", DoubleValue (5.150e9), MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::SetFrequency, &TwoRayGroundPropagationLossModel::GetFrequency), MakeDoubleChecker<double> ()) .AddAttribute ("SystemLoss", "The system loss", DoubleValue (1.0), MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::m_systemLoss), MakeDoubleChecker<double> ()) .AddAttribute ("MinDistance", "The distance under which the propagation model refuses to give results (m)", DoubleValue (0.5), MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::SetMinDistance, &TwoRayGroundPropagationLossModel::GetMinDistance), MakeDoubleChecker<double> ()) .AddAttribute ("HeightAboveZ", "The height of the antenna (m) above the node's Z coordinate", DoubleValue (0), MakeDoubleAccessor (&TwoRayGroundPropagationLossModel::m_heightAboveZ), MakeDoubleChecker<double> ()) ; 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 Ipv4RoutingProtocol::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Ipv4RoutingProtocol") .SetParent<Object> () ; return tid; }
TypeId LogDistancePropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::LogDistancePropagationLossModel") .SetParent<PropagationLossModel> () .AddConstructor<LogDistancePropagationLossModel> () .AddAttribute ("Exponent", "The exponent of the Path Loss propagation model", DoubleValue (3.0), MakeDoubleAccessor (&LogDistancePropagationLossModel::m_exponent), MakeDoubleChecker<double> ()) .AddAttribute ("ReferenceDistance", "The distance at which the reference loss is calculated (m)", DoubleValue (1.0), MakeDoubleAccessor (&LogDistancePropagationLossModel::m_referenceDistance), MakeDoubleChecker<double> ()) .AddAttribute ("ReferenceLoss", "The reference loss at reference distance (dB). (Default is Friis at 1m with 5.15 GHz)", DoubleValue (46.6777), MakeDoubleAccessor (&LogDistancePropagationLossModel::m_referenceLoss), MakeDoubleChecker<double> ()) ; return tid; }
TypeId Ipv4RawSocketFactory::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Ipv4RawSocketFactory") .SetParent<SocketFactory> () ; return tid; }
TypeId Hijacker::GetTypeId() { static TypeId tid = TypeId("Hijacker").SetParent<ndn::App>().AddConstructor<Hijacker>(); return tid; }
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 PeerLinkFrameStart::GetTypeId () { static TypeId tid = TypeId ("ns3::dot11s::PeerLinkFrameStart").SetParent<Header> ().AddConstructor< PeerLinkFrameStart> (); 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 SocketSetDontFragmentTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SocketSetDontFragmentTag") .SetParent<Tag> () .AddConstructor<SocketSetDontFragmentTag> (); return tid; }
TypeId Synchronizer::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Synchronizer") .SetParent<Object> () ; return tid; }
TypeId Tag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Tag") .SetParent<ObjectBase> () ; return tid; }
TypeId Header::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Header") .SetParent<Chunk> () ; return tid; }
TypeId EnergySource::GetTypeId (void) { static TypeId tid = TypeId ("ns3::EnergySource") .SetParent<Object> () ; return tid; }
TypeId PropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::PropagationLossModel") .SetParent<Object> () ; return tid; }
TypeId LtePhyTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::LtePhyTag") .SetParent<Tag> () .AddConstructor<LtePhyTag> () ; return tid; }
TypeId UanPropModelIdeal::GetTypeId (void) { static TypeId tid = TypeId ("ns3::UanPropModelIdeal") .SetParent<UanPropModel> () .AddConstructor<UanPropModelIdeal> () ; return tid; }
TypeId UanHeaderRcData::GetTypeId () { static TypeId tid = TypeId ("ns3::UanHeaderRcData") .SetParent<Header> () .AddConstructor<UanHeaderRcData> () ; return tid; }
TypeId RerrHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RerrHeader") .SetParent<Header> () .AddConstructor<RerrHeader> () ; return tid; }
TypeId JakesPropagationLossModel::GetTypeId () { static TypeId tid = TypeId ("ns3::JakesPropagationLossModel") .SetParent<PropagationLossModel> () .AddConstructor<JakesPropagationLossModel> () ; return tid; }
TypeId FriisSpectrumPropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::FriisSpectrumPropagationLossModel") .SetParent<SpectrumPropagationLossModel> () .AddConstructor<FriisSpectrumPropagationLossModel> () ; return tid; }
TypeId TcpRfc793::GetTypeId (void) { static TypeId tid = TypeId ("ns3::TcpRfc793") .SetParent<TcpSocketBase> () .AddConstructor<TcpRfc793> () ; return tid; }
TypeId SocketIpv6TclassTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SocketIpv6TclassTag") .SetParent<Tag> () .AddConstructor<SocketIpv6TclassTag> () ; return tid; }