A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Assert

assert functions and macros More...

Macros

#define NS_ASSERT(condition)
 
#define NS_ASSERT_MSG(condition, message)
 

Detailed Description

assert functions and macros

The assert macros are used to verify at runtime that a certain condition is true. If it is not true, the program halts. These checks are built into the program only in debugging builds. They are removed in optimized builds.

These macro are intended to check certain conditions to be true. Do not put code that also have side effects that your program relies on (eg. code that advances an iterator and return false at end of file) because the code will not be executed on release builds!!

If assertion-style checks are required for release builds, use NS_ABORT_UNLESS and NS_ABORT_MSG_UNLESS.

Macro Definition Documentation

#define NS_ASSERT (   condition)
Value:
do \
{ \
if (!(condition)) \
{ \
std::cerr << "assert failed. cond=\"" << \
# condition << "\", "; \
NS_FATAL_ERROR_NO_MSG (); \
} \
} \
while (false)
Parameters
conditioncondition to verify.

At runtime, in debugging builds, if this condition is not true, the program prints the source file, line number and unverified condition and halts by calling std::terminate

Definition at line 64 of file assert.h.

Referenced by ns3::EpcHelper::ActivateEpsBearer(), ns3::EpcTftClassifier::Add(), ns3::TcpRxBuffer::Add(), ns3::NdiscCache::Add(), ns3::ArpCache::Add(), ns3::ByteTagList::Add(), ns3::DeviceEnergyModelContainer::Add(), ns3::EnergySourceContainer::Add(), ns3::Gnuplot2dDataset::Add(), ns3::DcfManagerTest::AddAccessRequestWithSuccessfullAck(), ns3::Buffer::AddAtEnd(), ns3::Buffer::AddAtStart(), ns3::BridgeNetDevice::AddBridgePort(), ns3::EpcHelper::AddEnb(), ns3::olsr::RoutingProtocol::AddEntry(), ns3::MeshPointDevice::AddInterface(), ns3::flame::FlameRtable::AddPath(), ns3::SingleModelSpectrumChannel::AddPropagationLossModel(), ns3::MultiModelSpectrumChannel::AddPropagationLossModel(), ns3::Address::Address(), ns3::MultiModelSpectrumChannel::AddRx(), ns3::SingleModelSpectrumChannel::AddSpectrumPropagationLossModel(), ns3::MultiModelSpectrumChannel::AddSpectrumPropagationLossModel(), ns3::WifiRemoteStationManager::AddSupportedMode(), ns3::aodv::RerrHeader::AddUnDestination(), ns3::EpcX2::AddX2Interface(), ns3::Object::AggregateObject(), ns3::CidFactory::AllocateBasic(), ns3::CidFactory::AllocateMulticast(), ns3::CidFactory::AllocatePrimary(), ns3::CidFactory::AllocateTransportOrSecondary(), ns3::EnergySource::AppendDeviceEnergyModel(), ns3::RandomVariableStreamHelper::AssignStreams(), ns3::InternetStackHelper::AssignStreams(), ns3::PointToPointChannel::Attach(), ns3::CsmaChannel::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::Buffer::Begin(), ns3::UdpSocketImpl::BindToNetDevice(), ns3::TcpSocketBase::BindToNetDevice(), ns3::ModelTypeidCreator::Build(), ns3::Rectangle::CalculateIntersection(), ns3::Box::CalculateIntersection(), ns3::FriisSpectrumPropagationLossModel::CalculateLoss(), ns3::BasicEnergySource::CalculateRemainingEnergy(), ns3::LiIonEnergySource::CalculateRemainingEnergy(), ns3::ErrorRateModel::CalculateSnr(), ns3::EmpiricalVariable::CDF(), ns3::cell_edited_callback(), ns3::cell_edited_callback_config_default(), ns3::AcousticModemEnergyModel::ChangeState(), ns3::WifiRadioEnergyModel::ChangeState(), ns3::dot11s::PeerManagementProtocol::CheckBeaconCollisions(), ns3::Address::CheckCompatible(), ns3::FlowMonitor::CheckForLostPackets(), ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::EpcTftClassifier::Classify(), ns3::LteEnbRrc::ConfigureCell(), ns3::WifiMac::ConfigureStandard(), ns3::dot11s::PeerLink::ConfirmAccept(), ns3::dot11s::PeerLink::ConfirmReject(), ns3::NscTcpSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::Config::MatchContainer::Connect(), ns3::JakesProcess::ConstructOscillators(), ns3::SpectrumConverter::Convert(), ns3::UanAddress::ConvertFrom(), ns3::PacketSocketAddress::ConvertFrom(), ns3::Mac64Address::ConvertFrom(), ns3::Mac48Address::ConvertFrom(), ns3::InetSocketAddress::ConvertFrom(), ns3::Inet6SocketAddress::ConvertFrom(), ns3::Ipv4Address::ConvertFrom(), ns3::Ipv6Address::ConvertFrom(), ns3::Address::CopyAllFrom(), ns3::Address::CopyAllTo(), ns3::Address::CopyFrom(), ns3::TcpTxBuffer::CopyFromSequence(), ns3::CopyObject(), ns3::Address::CopyTo(), ns3::Ns2MobilityHelperTest::CourseChange(), ns3::SpectrumPhyHelper::Create(), ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::Packet::CreateFragment(), ns3::Buffer::CreateFragment(), ns3::MeshHelper::CreateInterface(), ns3::Socket::CreateSocket(), ns3::WifiModeFactory::CreateWifiMode(), ns3::LiIonEnergySource::DecreaseRemainingEnergy(), ns3::dsdv::RoutingProtocol::DeferredRouteOutput(), ns3::aodv::RoutingProtocol::DeferredRouteOutput(), ns3::UanModesList::DeleteMode(), ns3::Queue::Dequeue(), ns3::WifiMacQueue::DequeueByTidAndAddress(), ns3::aodv::TypeHeader::Deserialize(), ns3::LtePdcpHeader::Deserialize(), ns3::dsdv::DsdvHeader::Deserialize(), ns3::dot11s::PeerLinkFrameStart::Deserialize(), ns3::Icmpv4Echo::Deserialize(), ns3::aodv::RreqHeader::Deserialize(), ns3::NixVector::Deserialize(), ns3::WifiInformationElement::Deserialize(), ns3::Ipv6Header::Deserialize(), ns3::aodv::RrepHeader::Deserialize(), ns3::olsr::MessageHeader::Deserialize(), ns3::Address::Deserialize(), ns3::Ipv4Header::Deserialize(), ns3::aodv::RrepAckHeader::Deserialize(), ns3::aodv::RerrHeader::Deserialize(), ns3::Buffer::Deserialize(), ns3::EnumValue::DeserializeFromString(), ns3::Ssid::DeserializeInformationField(), ns3::dot11s::IeMeshId::DeserializeInformationField(), ns3::dot11s::IePerr::DeserializeInformationField(), ns3::ExtendedSupportedRatesIE::DeserializeInformationField(), ns3::dot11s::IePeerManagement::DeserializeInformationField(), ns3::SupportedRates::DeserializeInformationField(), ns3::dot11s::IePreq::DeserializeInformationField(), ns3::MacLow::DestroyBlockAckAgreement(), ns3::CsmaChannel::Detach(), ns3::DeviceEnergyModelContainer::DeviceEnergyModelContainer(), ns3::TcpTxBuffer::DiscardUpTo(), ns3::RvBatteryModel::Discharge(), ns3::Config::MatchContainer::Disconnect(), ns3::ConstantSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(), ns3::FriisSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(), ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity(), ns3::Icmpv6L4Protocol::DoDAD(), ns3::Object::DoDispose(), ns3::AcousticModemEnergyModel::DoGetCurrentA(), ns3::AmrrWifiManager::DoGetDataMode(), ns3::OnoeWifiManager::DoGetDataMode(), ns3::olsr::RoutingProtocol::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::Object::DoInitialize(), ns3::BasicEnergySourceHelper::DoInstall(), ns3::RvBatteryModelHelper::DoInstall(), ns3::AcousticModemEnergyModelHelper::DoInstall(), ns3::WifiRadioEnergyModelHelper::DoInstall(), ns3::TcpSocketBase::DoPeerClose(), ns3::AarfWifiManager::DoReportDataFailed(), ns3::AarfcdWifiManager::DoReportDataFailed(), ns3::ArfWifiManager::DoReportDataFailed(), GlobalRouteManagerImplTestCase::DoRun(), ns3::dsr::DsrOptionRerr::DoSendError(), ns3::RandomWalk2dMobilityModel::DoSetPosition(), ns3::Buffer::End(), ns3::EnergySourceContainer::EnergySourceContainer(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::UanMacCw::Enqueue(), ns3::EpcHelper::EpcHelper(), ns3::TcpRxBuffer::Extract(), ns3::MultiModelSpectrumChannel::FindAndEventuallyAddTxSpectrumModel(), ns3::Icmpv6L4Protocol::FindCache(), ns3::dot11s::PeerManagementProtocol::FindPeerLink(), ns3::SystemPath::FindSelfDirectory(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::dot11s::HwmpProtocol::ForwardUnicast(), ns3::BriteTopologyHelper::GenerateBriteTopology(), ns3::WifiRemoteStationManager::GetAckMode(), ns3::Ipv4Interface::GetAddress(), ns3::dot11s::PeerManagementProtocol::GetBeaconTimingElement(), ns3::MinstrelWifiManager::GetCalcTxTime(), ns3::WifiRemoteStationManager::GetCtsMode(), ns3::WifiRemoteStationManager::GetDataMode(), ns3::UeManager::GetDataRadioBearerInfo(), ns3::Timer::GetDelayLeft(), ns3::MultiModelSpectrumChannel::GetDevice(), ns3::Buffer::Iterator::GetDistanceFrom(), ns3::MacLowTransmissionParameters::GetDurationId(), ns3::Building::GetFloor(), ns3::WifiRemoteStationManager::GetFragmentOffset(), ns3::WifiRemoteStationManager::GetFragmentSize(), ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), ns3::PbbMessage::GetHopCount(), ns3::PbbMessage::GetHopLimit(), ns3::dot11s::IeMeshId::GetInformationFieldSize(), ns3::ExtendedSupportedRatesIE::GetInformationFieldSize(), ns3::GlobalRouter::GetInjectedRoute(), ns3::UniformVariable::GetInteger(), ns3::UniformRandomVariable::GetInteger(), ns3::Address::GetLength(), ns3::ArpCache::Entry::GetMacAddress(), ns3::Ipv6StaticRouting::GetMetric(), ns3::Ipv4StaticRouting::GetMetric(), ns3::UanPhyGen::GetMode(), ns3::dsr::DsrRouting::GetNetDeviceFromContext(), ns3::LteEnbRrc::GetNewSrsConfigurationIndex(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), ns3::UanChannel::GetNoiseDbHz(), ns3::WifiMacQueue::GetNPacketsByTidAndAddress(), ns3::PbbMessage::GetOriginatorAddress(), ns3::LteMiErrorModel::GetPcfichPdcchError(), ns3::dot11s::PeerManagementProtocol::GetPeers(), ns3::PointToPointNetDevice::GetRemote(), ns3::Building::GetRoomX(), ns3::Building::GetRoomY(), ns3::Ipv6StaticRouting::GetRoute(), ns3::Ipv4GlobalRouting::GetRoute(), ns3::Ipv4StaticRouting::GetRoute(), ns3::WifiRemoteStationManager::GetRtsMode(), ns3::AnimPacketInfo::GetRxInfo(), ns3::PbbPacket::GetSequenceNumber(), ns3::PbbMessage::GetSequenceNumber(), ns3::ArpHeader::GetSerializedSize(), ns3::dot11s::PeerLinkFrameStart::GetSerializedSize(), ns3::olsr::MessageHeader::GetSerializedSize(), ns3::LteEnbRrc::GetSrsPeriodicity(), ns3::Timer::GetState(), ns3::PacketTagIterator::Item::GetTag(), ns3::LteMiErrorModel::GetTbDecodificationStats(), ns3::NscTcpSocketImpl::GetTxAvailable(), ns3::PbbTlv::GetTypeExt(), ns3::LteEnbRrc::GetUeManager(), ns3::PbbTlv::GetValue(), ns3::DeterministicRandomVariable::GetValue(), ns3::LiIonEnergySource::IncreaseRemainingEnergy(), ns3::CtrlBAckResponseHeader::IndexInBitmap(), ns3::MapScheduler::Insert(), ns3::PointToPointHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::MeshHelper::Install(), ns3::Integral(), ns3::Ipv4Mask::Ipv4Mask(), ns3::Ipv6Prefix::Ipv6Prefix(), ns3::WifiRemoteStationManager::IsLastFragment(), ns3::UeManager::Lcid2Bid(), ns3::UeManager::Lcid2Drbid(), ns3::olsr::RoutingProtocol::LinkSensing(), ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::LteRrcConnectionEstablishmentTestCase::LteRrcConnectionEstablishmentTestCase(), ns3::Mac48Address::Mac48Address(), ns3::Mac64Address::Mac64Address(), ns3::ArpCache::Entry::MarkAlive(), ns3::ArpCache::Entry::MarkWaitReply(), ns3::WifiRemoteStationManager::NeedDataRetransmission(), ns3::WifiRemoteStationManager::NeedRtsRetransmission(), ns3::Buffer::Iterator::Next(), ns3::PacketTagIterator::Next(), ns3::aodv::RoutingProtocol::NotifyAddAddress(), ns3::dsdv::RoutingProtocol::NotifyAddAddress(), ns3::BlockAckManager::NotifyAgreementEstablished(), ns3::BlockAckManager::NotifyAgreementUnsuccessful(), ns3::dsr::DsrRouting::NotifyDataReceipt(), ns3::aodv::RoutingProtocol::NotifyInterfaceDown(), ns3::dsdv::RoutingProtocol::NotifyInterfaceDown(), ns3::aodv::RoutingProtocol::NotifyInterfaceUp(), ns3::dsdv::RoutingProtocol::NotifyInterfaceUp(), ns3::OriginatorBlockAckAgreement::NotifyMpduTransmission(), ns3::BlockAckManager::NotifyMpduTransmission(), ns3::MacLow::NotifyNav(), ns3::DcfManager::NotifyNavStartNow(), ns3::aodv::RoutingProtocol::NotifyRemoveAddress(), ns3::dsdv::RoutingProtocol::NotifyRemoveAddress(), ns3::DcfManager::NotifySwitchingStartNow(), ns3::AlohaNoackNetDevice::NotifyTransmissionEnd(), ns3::UanMacCw::NotifyTxStart(), ns3::DcfManager::NotifyTxStartNow(), ns3::AsciiFile::Open(), ns3::PcapFile::Open(), ns3::dot11s::PeerLink::OpenAccept(), ns3::dot11s::PeerLink::OpenReject(), ns3::dsr::RouteCacheEntry::operator==(), ns3::operator>>(), ns3::UanModesList::operator[](), ns3::Packet::Packet(), ns3::WifiMacQueue::PeekByTidAndAddress(), ns3::Buffer::PeekData(), ns3::MapScheduler::PeekNext(), ns3::CalendarScheduler::PeekNext(), ns3::dot11s::PeerManagementProtocol::PeerLinkStatus(), ns3::Buffer::Iterator::Prev(), BenchHeader< N >::Print(), ns3::ArpHeader::Print(), anonymous_namespace{packet-metadata-test.cc}::HistoryHeader< N >::Print(), anonymous_namespace{packet-metadata-test.cc}::HistoryTrailer< N >::Print(), ns3::Packet::Print(), ns3::Packet::PrintByteTags(), ns3::Packet::PrintPacketTags(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::CsmaChannel::PropagationCompleteEvent(), ns3::QosUtilsIsOldPacket(), ns3::RadvdInterface::RadvdInterface(), ns3::AsciiFile::Read(), ns3::PcapFile::Read(), ns3::PacketMetadata::ReadItems(), ns3::TagBuffer::ReadU8(), ns3::CsmaChannel::Reattach(), ns3::dot11s::PeerManagementProtocolMac::Receive(), ns3::MacRxMiddle::Receive(), ns3::MpiReceiver::Receive(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::CsmaNetDevice::Receive(), ns3::RegularWifiMac::Receive(), ns3::dot11s::HwmpProtocolMac::ReceiveAction(), ns3::TcpSocketBase::ReceivedAck(), ns3::dot11s::HwmpProtocolMac::ReceiveData(), ns3::LteEnbMac::ReceiveDlCqiLteControlMessage(), ns3::MacLow::ReceiveError(), ns3::MpiInterface::ReceiveMessages(), ns3::MacLow::ReceiveOk(), ns3::UdpSocketImpl::RecvFrom(), ns3::NscTcpSocketImpl::RecvFrom(), ns3::PacketSocket::RecvFrom(), ns3::EpcEnbApplication::RecvFromLteSocket(), ns3::EpcSgwPgwApplication::RecvFromS1uSocket(), ns3::EpcEnbApplication::RecvFromS1uSocket(), ns3::UeManager::RecvHandoverPreparationFailure(), ns3::UeManager::RecvHandoverRequestAck(), ns3::aodv::RoutingProtocol::RecvReply(), ns3::SimpleRefCount< SpectrumSignalParameters >::Ref(), ns3::MapScheduler::Remove(), ns3::ListScheduler::Remove(), ns3::CalendarScheduler::Remove(), ns3::Buffer::RemoveAtEnd(), ns3::Buffer::RemoveAtStart(), ns3::GlobalRouter::RemoveInjectedRoute(), ns3::MapScheduler::RemoveNext(), ns3::CalendarScheduler::RemoveNext(), ns3::Ipv6StaticRouting::RemoveRoute(), ns3::Ipv4GlobalRouting::RemoveRoute(), ns3::Ipv4StaticRouting::RemoveRoute(), ns3::flame::FlameProtocol::RemoveRoutingStuff(), ns3::PacketMetadata::ReplaceTail(), ns3::Dot11sStack::Report(), ns3::FlameStack::Report(), ns3::dot11s::PeerManagementProtocol::Report(), ns3::MeshHelper::Report(), ns3::WifiRemoteStationManager::ReportDataFailed(), ns3::WifiRemoteStationManager::ReportDataOk(), ns3::WifiRemoteStationManager::ReportFinalDataFailed(), ns3::WifiRemoteStationManager::ReportFinalRtsFailed(), ns3::WifiRemoteStationManager::ReportRtsFailed(), ns3::WifiRemoteStationManager::ReportRtsOk(), ns3::DcfManager::RequestAccess(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), ns3::flame::FlameProtocol::RequestRoute(), ns3::WifiRemoteStationManager::Reset(), ns3::Dot11sStack::ResetStats(), ns3::FlameStack::ResetStats(), ns3::MeshHelper::ResetStats(), ns3::Timer::Resume(), ns3::dot11s::HwmpProtocol::RetryPathDiscovery(), ns3::dsr::DsrOptions::ReverseSearchNextTwoHop(), ns3::aodv::RoutingProtocol::RouteInput(), ns3::Ipv4StaticRouting::RouteInput(), ns3::Ipv4ListRouting::RouteInput(), ns3::Ipv4GlobalRouting::RouteInput(), ns3::Ipv6ListRouting::RouteInput(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::Ipv6StaticRouting::RouteInput(), ns3::aodv::RoutingProtocol::RouteOutput(), ns3::dsdv::RoutingProtocol::RouteOutput(), ns3::olsr::RoutingProtocol::RouteOutput(), ns3::DefaultSimulatorImpl::Run(), ns3::DistributedSimulatorImpl::Run(), ns3::DefaultSimulatorImpl::Schedule(), ns3::DistributedSimulatorImpl::Schedule(), ns3::Timer::Schedule(), ns3::BlockAckManager::ScheduleBlockAckReqIfNeeded(), ns3::NscTcpSocketImpl::Send(), ns3::YansWifiChannel::Send(), ns3::WifiNetDevice::Send(), ns3::Ping6::Send(), ns3::EpcUeNas::Send(), ns3::Radvd::Send(), ns3::Ipv6L3Protocol::Send(), ns3::Ipv4L3Protocol::Send(), ns3::Ipv6Interface::Send(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::WifiNetDevice::SendFrom(), ns3::VirtualNetDevice::SendFrom(), ns3::AlohaNoackNetDevice::SendFrom(), ns3::CsmaNetDevice::SendFrom(), ns3::LteEnbRrc::SendHandoverRequest(), ns3::Icmpv6L4Protocol::SendMessage(), ns3::dot11s::HwmpProtocolMac::SendMyPreq(), ns3::YansWifiPhy::SendPacket(), ns3::dsr::DsrRouting::SendPacketFromBuffer(), ns3::Ipv6L3Protocol::SendRealOut(), ns3::aodv::RoutingProtocol::SendReply(), ns3::aodv::RoutingProtocol::SendReplyAck(), ns3::aodv::RoutingProtocol::SendReplyByIntermediateNode(), ns3::aodv::RoutingProtocol::SendRerrMessage(), ns3::aodv::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::LteUePhy::SendSrs(), ns3::Ipv4RawSocketImpl::SendTo(), ns3::Ipv6RawSocketImpl::SendTo(), ns3::EpcEnbApplication::SendToLteSocket(), ns3::dsdv::RoutingProtocol::SendTriggeredUpdate(), ns3::ArpHeader::Serialize(), ns3::dot11s::PeerLinkFrameStart::Serialize(), ns3::WifiMacHeader::Serialize(), ns3::olsr::MessageHeader::Serialize(), ns3::Ssid::SerializeInformationField(), ns3::ExtendedSupportedRatesIE::SerializeInformationField(), ns3::EnumValue::SerializeToString(), ns3::RvBatteryModel::SetAlpha(), ns3::dot11s::PeerLink::SetBeaconInformation(), ns3::RvBatteryModel::SetBeta(), ns3::WifiRadioEnergyModelPhyListener::SetChangeStateCallback(), ns3::YansWifiPhy::SetChannelNumber(), ns3::AnimationInterface::SetConstantPosition(), ns3::RvBatteryModel::SetCutoffVoltage(), ns3::SimpleDeviceEnergyModel::SetEnergySource(), ns3::AcousticModemEnergyModel::SetEnergySource(), ns3::WifiRadioEnergyModel::SetEnergySource(), ns3::ItuR1411LosPropagationLossModel::SetFrequency(), ns3::BuildingsMobilityModel::SetIndoor(), ns3::BasicEnergySource::SetInitialEnergy(), ns3::LiIonEnergySource::SetInitialEnergy(), ns3::aodv::RoutingProtocol::SetIpv4(), ns3::dsdv::RoutingProtocol::SetIpv4(), ns3::Ipv4StaticRouting::SetIpv4(), ns3::Ipv4ListRouting::SetIpv4(), ns3::Ipv4GlobalRouting::SetIpv4(), ns3::Ipv4NixVectorRouting::SetIpv4(), ns3::olsr::RoutingProtocol::SetIpv4(), ns3::Ipv6ListRouting::SetIpv6(), ns3::Ipv6StaticRouting::SetIpv6(), ns3::AnimationInterface::SetLinkDescription(), ns3::MatrixPropagationLossModel::SetLoss(), ns3::SimpleDeviceEnergyModel::SetNode(), ns3::AcousticModemEnergyModel::SetNode(), ns3::EnergySource::SetNode(), ns3::AnimationInterface::SetNodeColor(), ns3::AnimationInterface::SetNodeDescription(), ns3::UanChannel::SetNoiseModel(), ns3::HalfDuplexIdealPhy::SetNoisePowerSpectralDensity(), ns3::LteSpectrumPhy::SetNoisePowerSpectralDensity(), ns3::RvBatteryModel::SetOpenCircuitVoltage(), ns3::Icmpv6DestinationUnreachable::SetPacket(), ns3::Icmpv6TooBig::SetPacket(), ns3::Icmpv6TimeExceeded::SetPacket(), ns3::Icmpv6ParameterError::SetPacket(), ns3::Icmpv6OptionRedirected::SetPacket(), ns3::Icmpv6OptionPrefixInformation::SetPrefixLength(), ns3::SingleModelSpectrumChannel::SetPropagationDelayModel(), ns3::MultiModelSpectrumChannel::SetPropagationDelayModel(), ns3::SpectrumAnalyzer::SetRxSpectrumModel(), ns3::RandomVariableStream::SetStream(), ns3::HalfDuplexIdealPhy::SetTxPowerSpectralDensity(), ns3::LteSpectrumPhy::SetTxPowerSpectralDensity(), ns3::Object::SetTypeId(), ns3::RegularWifiMac::SetupEdcaQueue(), ns3::TcpSocketBase::SetupEndpoint(), ns3::MeshWifiInterfaceMac::ShiftTbtt(), ns3::AnimationInterface::ShowNode(), ns3::SpectrumModel::SpectrumModel(), ns3::AnimationInterface::StartAnimation(), ns3::V4Ping::StartApplication(), ns3::Ping6::StartApplication(), ns3::Radvd::StartApplication(), ns3::DcfState::StartBackoffNow(), ns3::UeManager::StartDataRadioBearers(), ns3::LteInterference::StartRx(), ns3::UanPhyGen::StartRxPacket(), ns3::YansWifiPhy::StartSensing(), ns3::AlohaNoackNetDevice::StartTransmission(), ns3::MacLow::StartTransmission(), ns3::SingleModelSpectrumChannel::StartTx(), ns3::MultiModelSpectrumChannel::StartTx(), ns3::LteSpectrumPhy::StartTxDataFrame(), ns3::LteSpectrumPhy::StartTxDlCtrlFrame(), ns3::LteSpectrumPhy::StartTxUlSrsFrame(), ns3::dot11s::PeerLink::StateMachine(), ns3::BlockAckManager::StorePacket(), ns3::Timer::Suspend(), ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(), ns3::BlockAckManager::SwitchToBlockAckIfNeeded(), ns3::CsmaNetDevice::TransmitCompleteEvent(), ns3::CsmaChannel::TransmitEnd(), ns3::PointToPointChannel::TransmitStart(), ns3::UanChannel::TxPacket(), ns3::TypeId::TypeId(), ns3::AnimationInterface::UpdateLinkDescription(), ns3::OnoeWifiManager::UpdateMode(), ns3::AnimationInterface::UpdateNodeColor(), ns3::AnimationInterface::UpdateNodeDescription(), ns3::ArpCache::Entry::UpdateWaitReply(), BatteryLifetimeTest::VariableLoadTest(), ns3::Buffer::Iterator::Write(), ns3::TagBuffer::WriteU8(), ns3::NscTcpSocketImpl::~NscTcpSocketImpl(), and ns3::UdpSocketImpl::~UdpSocketImpl().

#define NS_ASSERT_MSG (   condition,
  message 
)
Value:
do \
{ \
if (!(condition)) \
{ \
std::cerr << "assert failed. cond=\"" << \
# condition << "\", "; \
NS_FATAL_ERROR (message); \
} \
} \
while (false)
Parameters
conditioncondition to verify.
messagemessage to output

At runtime, in debugging builds, if this condition is not true, the program prints the message to output and halts by calling std::terminate.

Definition at line 86 of file assert.h.

Referenced by ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::EpcHelper::ActivateEpsBearer(), ns3::EpcMme::AddBearer(), ns3::EpcHelper::AddEnb(), ns3::CsmaNetDevice::AddHeader(), ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(), ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(), ns3::MultiModelSpectrumChannel::AddRx(), ns3::LteEnbRrc::AddUe(), ns3::EpcX2::AddX2Interface(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv4AddressHelper::Assign(), ns3::AodvHelper::AssignStreams(), ns3::OlsrHelper::AssignStreams(), ns3::PointToPointChannel::Attach(), ns3::LteHelper::AttachToClosestEnb(), ns3::Socket::BindToNetDevice(), ns3::BSSchedulerRtps::BSSchedulerRTPSConnection(), ns3::dot11s::PeerManagementProtocol::CheckBeaconCollisions(), ns3::LteAmc::CreateCqiFeedbacks(), ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::EmuFdNetDeviceHelper::CreateFileDescriptor(), ns3::PlanetLabFdNetDeviceHelper::CreateFileDescriptor(), ns3::TapFdNetDeviceHelper::CreateFileDescriptor(), ns3::EmuNetDevice::CreateSocket(), ns3::TapBridge::CreateTap(), ns3::CsParameters::CsParameters(), ns3::WimaxMacQueue::Dequeue(), ns3::RadiotapHeader::Deserialize(), ns3::Tlv::Deserialize(), ns3::GlobalRouter::DiscoverLSAs(), ns3::RandomWaypointMobilityModel::DoAssignStreams(), ns3::Ipv4L3Protocol::DoFragmentation(), ns3::LteHelper::DoInitialize(), ns3::LteRlcAm::DoNotifyTxOpportunity(), ns3::RandomRoomPositionAllocatorTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::SameRoomPositionAllocatorTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), ns3::Ipv6Interface::DoSetup(), ns3::dsr::DsrOptionPadnHeader::DsrOptionPadnHeader(), ns3::InternetStackHelper::EnableAsciiIpv4Internal(), ns3::InternetStackHelper::EnableAsciiIpv6Internal(), ns3::InternetStackHelper::EnablePcapIpv4Internal(), ns3::InternetStackHelper::EnablePcapIpv6Internal(), ns3::LteHelper::EnablePdcpTraces(), ns3::LteHelper::EnableRlcTraces(), ns3::BaseStationNetDevice::Enqueue(), ns3::SubscriberStationNetDevice::Enqueue(), ns3::PointToPointNetDevice::EtherToPpp(), ns3::LteRlcAm::ExpireReorderingTimer(), ns3::dsr::DsrRouting::ForwardErrPacket(), ns3::dsr::DsrRouting::ForwardPacket(), ns3::RttMeanDeviation::Gain(), ns3::BriteTopologyHelper::GenerateBriteTopology(), ns3::Gnuplot::GenerateOutput(), ns3::LteHarqPhy::GetAccumulatedMiUl(), ns3::Ipv6Interface::GetAddress(), ns3::Node::GetApplication(), ns3::GlobalRoutingLSA::GetAttachedRouter(), ns3::TopologyReader::Link::GetAttribute(), ns3::SPFVertex::GetChild(), ns3::LteAmc::GetCqiFromSpectralEfficiency(), ns3::Node::GetDevice(), ns3::Ipv6Interface::GetLinkLocalAddress(), ns3::GlobalRoutingLSA::GetLinkRecord(), ns3::OhBuildingsPropagationLossModel::GetLoss(), ns3::ItuR1238PropagationLossModel::GetLoss(), ns3::OkumuraHataPropagationLossModel::GetLoss(), ns3::ItuR1411LosPropagationLossModel::GetLoss(), ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetLoss(), ns3::HybridBuildingsPropagationLossModel::GetLoss(), ns3::GlobalRouter::GetLSA(), ns3::LteAmc::GetMcsFromCqi(), ns3::Ipv6StaticRouting::GetMulticastRoute(), ns3::Ipv4StaticRouting::GetMulticastRoute(), ns3::RandomBuildingPositionAllocator::GetNext(), ns3::RandomRoomPositionAllocator::GetNext(), ns3::SameRoomPositionAllocator::GetNext(), ns3::Ipv4MulticastRoutingTableEntry::GetOutputInterface(), ns3::Ipv6MulticastRoutingTableEntry::GetOutputInterface(), ns3::LteMiErrorModel::GetPcfichPdcchError(), ns3::SPFVertex::GetRootExitDirection(), ns3::LteAmc::GetSpectralEfficiencyFromCqi(), ns3::LteSpectrumValueHelper::GetSpectrumModel(), ns3::Ipv6StaticRoutingHelper::GetStaticRouting(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::Ipv4Address::GetSubnetDirectedBroadcast(), ns3::UanPdp::GetTap(), ns3::LteAmc::GetTbSizeFromMcs(), ns3::TopologyReaderHelper::GetTopologyReader(), ns3::LteEnbRrc::GetUeManager(), ns3::GlobalRoutingLSA::GlobalRoutingLSA(), ns3::Ipv6ExtensionFragment::HandleFragmentsTimeout(), ns3::LteHelper::HandoverRequest(), ns3::AsciiTraceHelper::HookDefaultDequeueSinkWithContext(), ns3::AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(), ns3::AsciiTraceHelper::HookDefaultDropSinkWithContext(), ns3::AsciiTraceHelper::HookDefaultDropSinkWithoutContext(), ns3::AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(), ns3::AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(), ns3::AsciiTraceHelper::HookDefaultReceiveSinkWithContext(), ns3::AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(), ns3::PcapHelper::HookDefaultSink(), ns3::WaveformGeneratorHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::IpcsClassifierRecord::IpcsClassifierRecord(), ns3::Ipv6OptionPadnHeader::Ipv6OptionPadnHeader(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::TypeId::LookupByName(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::LteUePhy::LteUePhy(), ns3::LteMiErrorModel::MappingMiBler(), ns3::LteMiErrorModel::Mib(), ns3::Ipv4AddressHelper::NewAddress(), ns3::AlohaNoackNetDevice::NotifyTransmissionEnd(), ns3::Ipv4AddressHelper::NumAddressBits(), ns3::AthstatsWifiTraceSink::Open(), ns3::PointToPointNetDevice::PppToEther(), ns3::PppHeader::Print(), ns3::GlobalRoutingLSA::Print(), ns3::BsServiceFlowManager::ProcessDsaReq(), ns3::BSLinkManager::ProcessRangingRequest(), ns3::TapBridge::ReadCallback(), ns3::Buffer::Iterator::ReadU8(), ns3::TcpL4Protocol::Receive(), ns3::Ipv4L3Protocol::Receive(), ns3::EpcX2::RecvFromX2cSocket(), ns3::EpcX2::RecvFromX2uSocket(), ns3::UeManager::RecvHandoverRequestAck(), ns3::UeManager::ReleaseDataRadioBearer(), ns3::Ipv4Interface::RemoveAddress(), ns3::Ipv6Interface::RemoveAddress(), ns3::UeManager::RemoveDataRadioBearerInfo(), ns3::LteEnbRrc::RemoveSrsConfigurationIndex(), ns3::PendingData::RemoveToSeq(), ns3::LteEnbRrc::RemoveUe(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::RealtimeSimulatorImpl::Run(), ns3::DefaultSimulatorImpl::Schedule(), ns3::SSScheduler::Schedule(), ns3::RealtimeSimulatorImpl::Schedule(), ns3::DefaultSimulatorImpl::ScheduleDestroy(), ns3::DefaultSimulatorImpl::ScheduleNow(), ns3::RealtimeSimulatorImpl::ScheduleWithContext(), ns3::Ipv4L3Protocol::SelectSourceAddress(), ns3::LoopbackNetDevice::Send(), ns3::LteEnbNetDevice::Send(), ns3::LteUeNetDevice::Send(), ns3::Ping6::Send(), ns3::Ipv4Interface::Send(), ns3::Ipv6Interface::Send(), ns3::dsr::DsrRouting::Send(), ns3::dsr::DsrRouting::SendAck(), ns3::LteEnbRrc::SendData(), ns3::dsr::DsrRouting::SendErrorRequest(), ns3::LoopbackNetDevice::SendFrom(), ns3::UanNetDevice::SendFrom(), ns3::FdNetDevice::SendFrom(), ns3::EmuNetDevice::SendFrom(), ns3::CsmaNetDevice::SendFrom(), ns3::dsr::DsrRouting::SendInitialRequest(), ns3::dsr::DsrRouting::SendPacketFromBuffer(), ns3::dsr::DsrRouting::SendReply(), ns3::dsr::DsrRouting::SendRequest(), ns3::ServiceFlow::ServiceFlow(), ns3::UanNetDevice::SetAddress(), ns3::Ipv4AddressHelper::SetBase(), ns3::TapBridge::SetBridgedNetDevice(), ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(), ns3::BuildingsMobilityModel::SetIndoor(), ns3::UanNetDevice::SetPromiscReceiveCallback(), ns3::MeshPointDevice::SetRoutingProtocol(), ns3::LteSpectrumPhy::SetTransmissionMode(), ns3::EpcSgwPgwApplication::SetUeAddress(), ns3::UeManager::SetupDataRadioBearer(), ns3::FdReader::Start(), ns3::LteTestRrc::Start(), ns3::WimaxPhy::StartScanning(), ns3::LteEnbPhy::StartSubFrame(), ns3::SingleModelSpectrumChannel::StartTx(), ns3::MultiModelSpectrumChannel::StartTx(), ns3::EmuNetDevice::StopDevice(), ns3::LteUePhy::SubframeIndication(), ns3::UanPdp::SumTapsC(), ns3::UanPdp::SumTapsFromMaxC(), ns3::UanPdp::SumTapsFromMaxNc(), ns3::UanPdp::SumTapsNc(), ns3::CsmaNetDevice::TransmitAbort(), ns3::PointToPointNetDevice::TransmitComplete(), ns3::CsmaNetDevice::TransmitCompleteEvent(), ns3::CsmaNetDevice::TransmitReadyEvent(), ns3::PointToPointNetDevice::TransmitStart(), ns3::CsmaNetDevice::TransmitStart(), ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteHtonU16(), ns3::Buffer::Iterator::WriteHtonU32(), ns3::Buffer::Iterator::WriteU8(), and ns3::SPFVertex::~SPFVertex().