CARLA
Macros
Debug.h File Reference
#include "carla/Exception.h"
#include <stdexcept>
#include <cassert>
+ Include dependency graph for Debug.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_ASSERT(predicate)   DEBUG_ONLY(assert(predicate));
 
#define DEBUG_ASSERT_EQ(lhs, rhs)   DEBUG_ASSERT((lhs) == (rhs))
 
#define DEBUG_ASSERT_NE(lhs, rhs)   DEBUG_ASSERT((lhs) != (rhs))
 
#define DEBUG_ERROR   DEBUG_ASSERT(false);
 
#define DEBUG_ONLY(code)   code
 
#define DEVELOPMENT_ASSERT(pred)   DEVELOPMENT_ONLY(LIBCARLA_ASSERT_THROW__(pred, #pred))
 
#define DEVELOPMENT_ONLY(code)   code
 
#define LIBCARLA_ASSERT_LEVEL   LIBCARLA_ASSERT_LEVEL_DEBUG
 
#define LIBCARLA_ASSERT_LEVEL_DEBUG   30
 Macro utilities for assertions and debug-only code. More...
 
#define LIBCARLA_ASSERT_LEVEL_DEVELOPMENT   20
 
#define LIBCARLA_ASSERT_LEVEL_RELEASE   10
 
#define LIBCARLA_ASSERT_THROW__(pred, msg)   if (!(pred)) { ::carla::throw_exception(std::runtime_error(msg)); }
 
#define RELEASE_ASSERT(pred)   LIBCARLA_ASSERT_THROW__(pred, #pred)
 

Macro Definition Documentation

◆ DEBUG_ASSERT

#define DEBUG_ASSERT (   predicate)    DEBUG_ONLY(assert(predicate));

Definition at line 66 of file Debug.h.

Referenced by carla::road::MapBuilder::AddConnection(), carla::road::MapBuilder::AddJunctionController(), carla::road::MapBuilder::AddLaneLink(), carla::nav::Navigation::AddOrUpdateVehicle(), carla::road::MapBuilder::AddRoadElevationProfile(), carla::road::MapBuilder::AddRoadGeometryArc(), carla::road::MapBuilder::AddRoadGeometryLine(), carla::road::MapBuilder::AddRoadGeometryParamPoly3(), carla::road::MapBuilder::AddRoadGeometryPoly3(), carla::road::MapBuilder::AddRoadGeometrySpiral(), carla::road::MapBuilder::AddRoadObjectCrosswalk(), carla::road::MapBuilder::AddRoadSection(), carla::road::MapBuilder::AddRoadSectionLane(), Benchmark::AddStream(), carla::geom::Mesh::AddTriangleFan(), carla::geom::Mesh::AddTriangleStrip(), carla::nav::Navigation::AddWalker(), carla::sensor::data::Array< data::SemanticLidarDetection >::Array(), carla::streaming::detail::tcp::IncomingMessage::buffer(), carla::road::MapBuilder::Build(), carla::streaming::detail::tcp::ServerSession::CloseNow(), carla::road::Lane::ComputeTransform(), carla::streaming::detail::tcp::Client::Connect(), carla::streaming::detail::MultiStreamState::ConnectSession(), carla::Buffer::copy_from(), carla::road::MapBuilder::CreateController(), carla::nav::Navigation::CreateCrowd(), carla::road::MapBuilder::CreateLaneAccess(), carla::road::MapBuilder::CreateLaneBorder(), carla::road::MapBuilder::CreateLaneHeight(), carla::road::MapBuilder::CreateLaneMaterial(), carla::road::MapBuilder::CreateLaneRule(), carla::road::MapBuilder::CreateLaneSpeed(), carla::road::MapBuilder::CreateLaneVisibility(), carla::road::MapBuilder::CreateLaneWidth(), carla::road::MapBuilder::CreatePointersBetweenRoadSegments(), carla::road::MapBuilder::CreateRoadMark(), carla::road::MapBuilder::CreateRoadMarkTypeLine(), carla::road::MapBuilder::CreateRoadSpeed(), carla::road::MapBuilder::CreateSectionOffset(), carla::profiler::LifetimeProfiler::Deregister(), carla::streaming::detail::Dispatcher::DeregisterSession(), carla::streaming::detail::MultiStreamState::DisconnectSession(), carla::geom::Math::DistanceArcToPoint(), carla::client::detail::EpisodeState::EpisodeState(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::client::detail::ActorVariant::Get(), carla::rpc::Response< T >::Get(), carla::streaming::detail::token_type::get_endpoint(), carla::client::detail::Simulator::GetActorById(), carla::client::detail::Simulator::GetActorsById(), carla::client::detail::Simulator::GetActorSnapshot(), carla::nav::Navigation::GetAgentRoute(), carla::client::detail::Simulator::GetAllTheActorsInTheEpisode(), carla::road::Lane::GetCornerPositions(), carla::client::detail::Simulator::GetCurrentEpisodeId(), carla::road::Lane::GetDistance(), carla::road::MapBuilder::GetEdgeLanePointer(), carla::rpc::Response< T >::GetError(), carla::rpc::Response< void >::GetError(), carla::road::Lane::GetInfo(), carla::road::Lane::GetInfos(), carla::road::MapBuilder::GetLaneNext(), carla::road::LaneSection::GetLength(), carla::road::Lane::GetLength(), carla::client::detail::Episode::GetNavigation(), carla::road::Road::GetNearestPoint(), carla::road::Map::GetNext(), carla::nav::Navigation::GetPath(), carla::sensor::s11n::LidarHeaderView::GetPointCount(), carla::sensor::s11n::SemanticLidarHeaderView::GetPointCount(), carla::road::Map::GetPrevious(), carla::nav::Navigation::GetRandomLocation(), carla::client::detail::Simulator::GetRandomLocationFromNavigation(), carla::road::Lane::GetRoad(), carla::road::Map::GetSignalsInDistance(), carla::rpc::Actor::GetStreamToken(), carla::client::detail::Client::Pimpl::GetTimeout(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerSpeed(), carla::nav::Navigation::GetWalkerTransform(), carla::client::detail::Simulator::GetWorldSnapshot(), carla::traffic_manager::TrafficManagerClient::HealthCheckRemoteTM(), carla::sensor::data::ImageTmpl< PixelT >::ImageTmpl(), carla::road::Lane::IsStraight(), carla::road::Lane::Lane(), carla::client::LaneInvasionCallback::LaneInvasionCallback(), carla::sensor::s11n::LidarHeaderView::LidarHeaderView(), carla::client::RssSensor::Listen(), carla::ListView< IT >::ListView(), carla::client::detail::MakeActorImpl(), UActorBlueprintFunctionLibrary::MakeLidarDefinition(), carla::streaming::detail::tcp::ServerSession::Open(), carla::road::element::RoadInfoIterator< T, IT >::operator*(), carla::road::element::RoadInfoIterator< T, IT >::operator++(), carla::road::element::RoadInfoIterator< T, IT >::operator->(), carla::nav::Navigation::PauseAgent(), carla::road::element::GeometryLine::PosFromDist(), carla::road::element::GeometryArc::PosFromDist(), carla::road::element::GeometrySpiral::PosFromDist(), carla::client::detail::CallbackList< carla::client::WorldSnapshot >::Push(), carla::image::io::detail::io_resolver::read_image(), carla::client::detail::Simulator::RegisterAIController(), carla::client::detail::Simulator::RegisterLightUpdateChangeEvent(), carla::client::detail::Simulator::RegisterOnTickEvent(), carla::streaming::detail::Dispatcher::RegisterSession(), carla::traffic_manager::TrafficManagerClient::RegisterVehicle(), carla::nav::Navigation::RemoveAgent(), carla::client::detail::Simulator::RemoveLightUpdateChangeEvent(), carla::client::detail::Simulator::RemoveOnTickEvent(), carla::sensor::data::LidarData::ResetSerPoints(), carla::sensor::data::SemanticLidarData::ResetSerPoints(), carla::road::element::RoadInfoGeometry::RoadInfoGeometry(), carla::road::element::RoadInfoIterator< T, IT >::RoadInfoIterator(), carla::sensor::s11n::SemanticLidarHeaderView::SemanticLidarHeaderView(), carla::sensor::s11n::ImageSerializer::Serialize(), carla::sensor::s11n::DVSEventArraySerializer::Serialize(), carla::traffic_manager::TrafficManagerClient::SetAutoLaneChange(), carla::traffic_manager::TrafficManagerClient::SetCollisionDetection(), carla::traffic_manager::TrafficManagerClient::SetDistanceToLeadingVehicle(), carla::traffic_manager::TrafficManagerClient::SetForceLaneChange(), carla::traffic_manager::TrafficManagerClient::SetGlobalDistanceToLeadingVehicle(), carla::traffic_manager::TrafficManagerClient::SetGlobalPercentageSpeedDifference(), carla::traffic_manager::TrafficManagerClient::SetHybridPhysicsMode(), carla::traffic_manager::TrafficManagerClient::SetHybridPhysicsRadius(), carla::traffic_manager::TrafficManagerClient::SetKeepRightPercentage(), carla::traffic_manager::TrafficManagerClient::SetOSMMode(), carla::client::detail::Episode::SetPedestriansCrossFactor(), carla::client::detail::Simulator::SetPedestriansCrossFactor(), carla::traffic_manager::TrafficManagerClient::SetPercentageIgnoreVehicles(), carla::traffic_manager::TrafficManagerClient::SetPercentageIgnoreWalkers(), carla::traffic_manager::TrafficManagerClient::SetPercentageRunningLight(), carla::traffic_manager::TrafficManagerClient::SetPercentageRunningSign(), carla::traffic_manager::TrafficManagerClient::SetPercentageSpeedDifference(), carla::traffic_manager::TrafficManagerClient::SetRandomDeviceSeed(), carla::traffic_manager::TrafficManagerClient::SetSynchronousMode(), carla::traffic_manager::TrafficManagerClient::SetSynchronousModeTimeOutInMiliSecond(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerMaxSpeed(), carla::sensor::RawData::size(), carla::sensor::data::Array< data::SemanticLidarDetection >::size(), carla::road::MapBuilder::SolveControllerAndJuntionReferences(), carla::client::detail::Simulator::SpawnActor(), carla::streaming::detail::Stream< StreamStateT >::Stream(), carla::client::detail::Simulator::SubscribeToSensor(), carla::traffic_manager::TrafficManagerClient::SynchronousTick(), carla::client::detail::Simulator::Tick(), carla::time_duration::time_duration(), carla::client::detail::Simulator::UnregisterAIController(), carla::traffic_manager::TrafficManagerClient::UnregisterVehicle(), carla::nav::Navigation::UpdateCrowd(), carla::client::detail::Simulator::WaitForTick(), carla::streaming::detail::tcp::ServerSession::Write(), carla::image::io::detail::io_resolver::write_view(), carla::pointcloud::PointCloudIO::WriteHeader(), ARayCastSemanticLidar::WritePointAsync(), and carla::sensor::data::LidarData::WritePointSync().

◆ DEBUG_ASSERT_EQ

#define DEBUG_ASSERT_EQ (   lhs,
  rhs 
)    DEBUG_ASSERT((lhs) == (rhs))

◆ DEBUG_ASSERT_NE

#define DEBUG_ASSERT_NE (   lhs,
  rhs 
)    DEBUG_ASSERT((lhs) != (rhs))

◆ DEBUG_ERROR

#define DEBUG_ERROR   DEBUG_ASSERT(false);

Definition at line 68 of file Debug.h.

Referenced by carla::profiler::LifetimeProfiler::~LifetimeProfiler().

◆ DEBUG_ONLY

#define DEBUG_ONLY (   code)    code

◆ DEVELOPMENT_ASSERT

#define DEVELOPMENT_ASSERT (   pred)    DEVELOPMENT_ONLY(LIBCARLA_ASSERT_THROW__(pred, #pred))

◆ DEVELOPMENT_ONLY

#define DEVELOPMENT_ONLY (   code)    code

Definition at line 61 of file Debug.h.

◆ LIBCARLA_ASSERT_LEVEL

#define LIBCARLA_ASSERT_LEVEL   LIBCARLA_ASSERT_LEVEL_DEBUG

Definition at line 43 of file Debug.h.

◆ LIBCARLA_ASSERT_LEVEL_DEBUG

#define LIBCARLA_ASSERT_LEVEL_DEBUG   30

Macro utilities for assertions and debug-only code.

Defines three levels of assertions: debug, development, and release. By default, if NDEBUG is defined the level is set to development, otherwise is set to debug.

The following macros are defined here:

Definition at line 35 of file Debug.h.

◆ LIBCARLA_ASSERT_LEVEL_DEVELOPMENT

#define LIBCARLA_ASSERT_LEVEL_DEVELOPMENT   20

Definition at line 36 of file Debug.h.

◆ LIBCARLA_ASSERT_LEVEL_RELEASE

#define LIBCARLA_ASSERT_LEVEL_RELEASE   10

Definition at line 37 of file Debug.h.

◆ LIBCARLA_ASSERT_THROW__

#define LIBCARLA_ASSERT_THROW__ (   pred,
  msg 
)    if (!(pred)) { ::carla::throw_exception(std::runtime_error(msg)); }

Definition at line 80 of file Debug.h.

◆ RELEASE_ASSERT

#define RELEASE_ASSERT (   pred)    LIBCARLA_ASSERT_THROW__(pred, #pred)