CARLA
Loading...
Searching...
No Matches
Functions | Variables
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 (dormant on a large map) 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 double EPISODE_SETTINGS_REFRESH_PERIOD = 1.0
 
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 
)
inline

Definition at line 69 of file Constants.h.

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

◆ IsEarlyRefreshDue()

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

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

Definition at line 63 of file Constants.h.

Referenced by TEST(), TEST(), TEST(), 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 57 of file Constants.h.

References last.

Referenced by carla::traffic_manager::TrafficManagerLocal::Step(), TEST(), TEST(), TEST(), TEST(), TEST(), and carla::traffic_manager::VehicleLightStage::UpdateWorldInfo().

Variable Documentation

◆ EPISODE_SETTINGS_REFRESH_PERIOD

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

Definition at line 45 of file Constants.h.

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

◆ MAX_UNWAITED_CONTROL_BATCHES

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

◆ SNAPSHOT_POLL_PERIOD

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

Definition at line 53 of file Constants.h.

Referenced by carla::traffic_manager::TrafficManagerLocal::Step().

◆ VEHICLE_LIGHT_STATES_REFRESH_PERIOD

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

◆ WEATHER_REFRESH_PERIOD

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