ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::env::TrafficLightStatus Class Reference

#include <trafficlight.h>

Collaboration diagram for adore::env::TrafficLightStatus:
Collaboration graph

Public Member Functions

 TrafficLightStatus (TrafficLightColor currentcolor=TrafficLightColor::UNDEFINED_COLOR, long validUntilTimestamp=0)
 
TrafficLightColor getCurrentColor () const
 
void setCurrentColor (TrafficLightColor color)
 
void setValidUntilTimestamp (long timestamp)
 
long getValidUntilTimestamp () const
 
std::string toString ()
 

Static Public Member Functions

static void GenerateSpeedAdvisories (adore::env::TrafficLightStatus &state, float speedLimit=10.0f)
 

Public Attributes

std::map< float, float > distanceSpeedTuples
 

Private Attributes

TrafficLightColor m_currentColor
 
long m_validUntilTimestamp
 

Detailed Description

holds traffic light state and validity timestamp

Constructor & Destructor Documentation

◆ TrafficLightStatus()

adore::env::TrafficLightStatus::TrafficLightStatus ( TrafficLightColor  currentcolor = TrafficLightColor::UNDEFINED_COLOR,
long  validUntilTimestamp = 0 
)
inline

Member Function Documentation

◆ GenerateSpeedAdvisories()

static void adore::env::TrafficLightStatus::GenerateSpeedAdvisories ( adore::env::TrafficLightStatus state,
float  speedLimit = 10.0f 
)
inlinestatic

generates speedadvisories based on the durations defined in the TrafficLight exception: 50 m/s is defined as the velocity value that shall inform the driver that there is no possibility to reach the traffic light while tl is in green state.

Parameters
tlreference to the traffic light that shall hold the speed advisories
speedLimitpreference for vmax - default is 10 m/s
Here is the call graph for this function:

◆ getCurrentColor()

TrafficLightColor adore::env::TrafficLightStatus::getCurrentColor ( ) const
inline
Here is the caller graph for this function:

◆ getValidUntilTimestamp()

long adore::env::TrafficLightStatus::getValidUntilTimestamp ( ) const
inline
Here is the caller graph for this function:

◆ setCurrentColor()

void adore::env::TrafficLightStatus::setCurrentColor ( TrafficLightColor  color)
inline
Here is the caller graph for this function:

◆ setValidUntilTimestamp()

void adore::env::TrafficLightStatus::setValidUntilTimestamp ( long  timestamp)
inline

◆ toString()

std::string adore::env::TrafficLightStatus::toString ( )
inline
Here is the call graph for this function:

Member Data Documentation

◆ distanceSpeedTuples

std::map<float,float> adore::env::TrafficLightStatus::distanceSpeedTuples

◆ m_currentColor

TrafficLightColor adore::env::TrafficLightStatus::m_currentColor
private

◆ m_validUntilTimestamp

long adore::env::TrafficLightStatus::m_validUntilTimestamp
private

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