CARLA
Loading...
Searching...
No Matches
carla::traffic_manager::constants::WorldInfoRefresh Namespace Reference

Functions

bool IsBatchSyncDue (const uint64_t unwaited_batches, const uint64_t limit)
bool IsEarlyRefreshDue (const bool refreshed_this_step, const bool missing_from_the_last_refresh)
 A vehicle the server already omitted from a fresh list must not re-arm the unscheduled read on every other step.
bool IsRefreshDue (const double now, const double last, const double period)
 Also true when the clock jumps backwards (new episode) or on NaN, so an unusable clock refreshes rather than pins the cache for ever.

Variables

static const uint64_t MAX_UNWAITED_CONTROL_BATCHES = 4u
static const std::chrono::milliseconds SNAPSHOT_POLL_PERIOD {1}
static const double VEHICLE_LIGHT_STATES_REFRESH_PERIOD = 0.25
static const double WEATHER_REFRESH_PERIOD = 1.0

Function Documentation

◆ IsBatchSyncDue()

bool carla::traffic_manager::constants::WorldInfoRefresh::IsBatchSyncDue ( const uint64_t unwaited_batches,
const uint64_t limit )
inlinenodiscard

Definition at line 68 of file Constants.h.

References IsBatchSyncDue().

Referenced by IsBatchSyncDue(), and carla::traffic_manager::TrafficManagerLocal::Step().

◆ IsEarlyRefreshDue()

bool carla::traffic_manager::constants::WorldInfoRefresh::IsEarlyRefreshDue ( const bool refreshed_this_step,
const bool missing_from_the_last_refresh )
inlinenodiscard

A vehicle the server already omitted from a fresh list must not re-arm the unscheduled read on every other step.

Definition at line 62 of file Constants.h.

References IsEarlyRefreshDue().

Referenced by IsEarlyRefreshDue(), and carla::traffic_manager::VehicleLightStage::Update().

◆ IsRefreshDue()

bool carla::traffic_manager::constants::WorldInfoRefresh::IsRefreshDue ( const double now,
const double last,
const double period )
inline

Also true when the clock jumps backwards (new episode) or on NaN, so an unusable clock refreshes rather than pins the cache for ever.

Definition at line 56 of file Constants.h.

References IsRefreshDue().

Referenced by IsRefreshDue(), and carla::traffic_manager::VehicleLightStage::UpdateWorldInfo().

Variable Documentation

◆ MAX_UNWAITED_CONTROL_BATCHES

const uint64_t carla::traffic_manager::constants::WorldInfoRefresh::MAX_UNWAITED_CONTROL_BATCHES = 4u
static

Definition at line 50 of file Constants.h.

◆ SNAPSHOT_POLL_PERIOD

const std::chrono::milliseconds carla::traffic_manager::constants::WorldInfoRefresh::SNAPSHOT_POLL_PERIOD {1}
static

Definition at line 52 of file Constants.h.

◆ VEHICLE_LIGHT_STATES_REFRESH_PERIOD

const double carla::traffic_manager::constants::WorldInfoRefresh::VEHICLE_LIGHT_STATES_REFRESH_PERIOD = 0.25
static

Definition at line 45 of file Constants.h.

◆ WEATHER_REFRESH_PERIOD

const double carla::traffic_manager::constants::WorldInfoRefresh::WEATHER_REFRESH_PERIOD = 1.0
static

Definition at line 46 of file Constants.h.