CARLA
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ATrafficLightBase Class Reference

#include <TrafficLightBase.h>

+ Inheritance diagram for ATrafficLightBase:
+ Collaboration diagram for ATrafficLightBase:

Public Member Functions

void AddTimeToRecorder ()
 
 ATrafficLightBase (const FObjectInitializer &ObjectInitializer)
 
float GetElapsedTime () const
 
float GetGreenTime () const
 
TArray< ATrafficLightBase * > GetGroupTrafficLights () const
 
int GetPoleIndex () const
 
float GetRedTime () const
 
bool GetTimeIsFrozen () const
 
UTrafficLightComponent * GetTrafficLightComponent ()
 
const UTrafficLightComponent * GetTrafficLightComponent () const
 
ETrafficLightState GetTrafficLightState () const
 
float GetYellowTime () const
 
void LightChangedCompatibility (ETrafficLightState NewLightState)
 
void NotifyWheeledVehicle (ACarlaWheeledVehicle *Vehicle)
 
void SetElapsedTime (float InElapsedTime)
 
void SetGreenTime (float InGreenTime)
 
void SetGroupTrafficLights (TArray< ATrafficLightBase *> InGroupTrafficLights)
 
void SetPoleIndex (int InPoleIndex)
 
void SetRedTime (float InRedTime)
 
void SetTimeIsFrozen (bool InTimeIsFrozen)
 
void SetTrafficLightState (ETrafficLightState State)
 
void SetYellowTime (float InYellowTime)
 
void UnNotifyWheeledVehicle (ACarlaWheeledVehicle *Vehicle)
 
- Public Member Functions inherited from ATrafficSignBase
 ATrafficSignBase (const FObjectInitializer &ObjectInitializer)
 
ETrafficSignState GetTrafficSignState () const
 
UBoxComponent * GetTriggerVolume () const
 
TArray< UBoxComponent * > GetTriggerVolumes () const
 
void SetTrafficSignState (ETrafficSignState State)
 

Protected Member Functions

void OnTrafficLightStateChanged (ETrafficLightState TrafficLightState)
 

Private Attributes

TArray< ATrafficLightBase * > GroupTrafficLights
 
int PoleIndex = 0
 
UTrafficLightComponent * TrafficLightComponent = nullptr
 
TArray< AWheeledVehicleAIController * > Vehicles
 

Detailed Description

Definition at line 20 of file TrafficLightBase.h.

Constructor & Destructor Documentation

◆ ATrafficLightBase()

ATrafficLightBase::ATrafficLightBase ( const FObjectInitializer &  ObjectInitializer)

Definition at line 40 of file TrafficLightBase.cpp.

References ATrafficSignBase::SetTrafficSignState(), TrafficLightComponent, and TrafficLightGreen.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddTimeToRecorder()

void ATrafficLightBase::AddTimeToRecorder ( )

Definition at line 267 of file TrafficLightBase.cpp.

References UCarlaStatics::GetRecorder().

Referenced by SetGreenTime(), SetRedTime(), and SetYellowTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetElapsedTime()

float ATrafficLightBase::GetElapsedTime ( ) const

Definition at line 178 of file TrafficLightBase.cpp.

References TrafficLightComponent.

◆ GetGreenTime()

float ATrafficLightBase::GetGreenTime ( ) const

Definition at line 112 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by FFrameData::AddTrafficLightTime(), and ACarlaRecorder::AddTrafficLightTime().

+ Here is the caller graph for this function:

◆ GetGroupTrafficLights()

TArray< ATrafficLightBase * > ATrafficLightBase::GetGroupTrafficLights ( ) const

Definition at line 231 of file TrafficLightBase.cpp.

References ATrafficLightGroup::GetControllers(), GroupTrafficLights, and TrafficLightComponent.

+ Here is the call graph for this function:

◆ GetPoleIndex()

int ATrafficLightBase::GetPoleIndex ( ) const

Definition at line 226 of file TrafficLightBase.cpp.

References PoleIndex.

Referenced by FTrafficLightData::RecordActorData().

+ Here is the caller graph for this function:

◆ GetRedTime()

float ATrafficLightBase::GetRedTime ( ) const

Definition at line 164 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by FFrameData::AddTrafficLightTime(), and ACarlaRecorder::AddTrafficLightTime().

+ Here is the caller graph for this function:

◆ GetTimeIsFrozen()

bool ATrafficLightBase::GetTimeIsFrozen ( ) const

Definition at line 210 of file TrafficLightBase.cpp.

References TrafficLightComponent.

◆ GetTrafficLightComponent() [1/2]

UTrafficLightComponent * ATrafficLightBase::GetTrafficLightComponent ( )

Definition at line 258 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by ATrafficLightManager::MatchTrafficLightActorsWithOpenDriveSignals(), FTrafficLightData::RecordActorData(), FTrafficLightData::RestoreActorData(), and ATrafficLightManager::SpawnTrafficLights().

+ Here is the caller graph for this function:

◆ GetTrafficLightComponent() [2/2]

const UTrafficLightComponent * ATrafficLightBase::GetTrafficLightComponent ( ) const

Definition at line 262 of file TrafficLightBase.cpp.

References TrafficLightComponent.

◆ GetTrafficLightState()

ETrafficLightState ATrafficLightBase::GetTrafficLightState ( ) const

Definition at line 52 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by NotifyWheeledVehicle(), and FTrafficLightData::RecordActorData().

+ Here is the caller graph for this function:

◆ GetYellowTime()

float ATrafficLightBase::GetYellowTime ( ) const

Definition at line 138 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by FFrameData::AddTrafficLightTime(), and ACarlaRecorder::AddTrafficLightTime().

+ Here is the caller graph for this function:

◆ LightChangedCompatibility()

void ATrafficLightBase::LightChangedCompatibility ( ETrafficLightState  NewLightState)

Definition at line 276 of file TrafficLightBase.cpp.

References OnTrafficLightStateChanged().

+ Here is the call graph for this function:

◆ NotifyWheeledVehicle()

void ATrafficLightBase::NotifyWheeledVehicle ( ACarlaWheeledVehicle Vehicle)

Definition at line 73 of file TrafficLightBase.cpp.

References GetTrafficLightState(), IsValid(), and Vehicles.

+ Here is the call graph for this function:

◆ OnTrafficLightStateChanged()

void ATrafficLightBase::OnTrafficLightStateChanged ( ETrafficLightState  TrafficLightState)
protected

Referenced by LightChangedCompatibility().

+ Here is the caller graph for this function:

◆ SetElapsedTime()

void ATrafficLightBase::SetElapsedTime ( float  InElapsedTime)

Definition at line 192 of file TrafficLightBase.cpp.

References TrafficLightComponent.

◆ SetGreenTime()

void ATrafficLightBase::SetGreenTime ( float  InGreenTime)

Definition at line 100 of file TrafficLightBase.cpp.

References AddTimeToRecorder(), UTrafficLightController::SetGreenTime(), and TrafficLightComponent.

+ Here is the call graph for this function:

◆ SetGroupTrafficLights()

void ATrafficLightBase::SetGroupTrafficLights ( TArray< ATrafficLightBase *>  InGroupTrafficLights)

Definition at line 253 of file TrafficLightBase.cpp.

References GroupTrafficLights.

◆ SetPoleIndex()

void ATrafficLightBase::SetPoleIndex ( int  InPoleIndex)

Definition at line 221 of file TrafficLightBase.cpp.

References PoleIndex.

Referenced by FTrafficLightData::RestoreActorData().

+ Here is the caller graph for this function:

◆ SetRedTime()

void ATrafficLightBase::SetRedTime ( float  InRedTime)

Definition at line 152 of file TrafficLightBase.cpp.

References AddTimeToRecorder(), UTrafficLightController::SetRedTime(), and TrafficLightComponent.

+ Here is the call graph for this function:

◆ SetTimeIsFrozen()

void ATrafficLightBase::SetTimeIsFrozen ( bool  InTimeIsFrozen)

Definition at line 202 of file TrafficLightBase.cpp.

References TrafficLightComponent.

◆ SetTrafficLightState()

void ATrafficLightBase::SetTrafficLightState ( ETrafficLightState  State)

Definition at line 64 of file TrafficLightBase.cpp.

References TrafficLightComponent.

Referenced by FTrafficLightData::RestoreActorData().

+ Here is the caller graph for this function:

◆ SetYellowTime()

void ATrafficLightBase::SetYellowTime ( float  InYellowTime)

Definition at line 126 of file TrafficLightBase.cpp.

References AddTimeToRecorder(), UTrafficLightController::SetYellowTime(), and TrafficLightComponent.

+ Here is the call graph for this function:

◆ UnNotifyWheeledVehicle()

void ATrafficLightBase::UnNotifyWheeledVehicle ( ACarlaWheeledVehicle Vehicle)

Definition at line 87 of file TrafficLightBase.cpp.

References IsValid().

+ Here is the call graph for this function:

Member Data Documentation

◆ GroupTrafficLights

TArray<ATrafficLightBase *> ATrafficLightBase::GroupTrafficLights
private

Definition at line 107 of file TrafficLightBase.h.

Referenced by GetGroupTrafficLights(), and SetGroupTrafficLights().

◆ PoleIndex

int ATrafficLightBase::PoleIndex = 0
private

Definition at line 104 of file TrafficLightBase.h.

Referenced by GetPoleIndex(), and SetPoleIndex().

◆ TrafficLightComponent

UTrafficLightComponent* ATrafficLightBase::TrafficLightComponent = nullptr
private

◆ Vehicles

TArray<AWheeledVehicleAIController *> ATrafficLightBase::Vehicles
private

Definition at line 101 of file TrafficLightBase.h.

Referenced by NotifyWheeledVehicle().


The documentation for this class was generated from the following files: