My Project
Loading...
Searching...
No Matches
TrafficSignal Struct Reference

#include <TrafficSignal.h>

Collaboration diagram for TrafficSignal:
Collaboration graph

Public Member Functions

 TrafficSignal ()
void Timer (bool state, float time)
float starvationCost () const
void turnGreen (bool &state)
void turnRed (bool &state)
bool canSwitch (int currentQueue, int maxOtherQueue) const
bool mustSwitch () const

Public Attributes

float greentimer
float minGreenTime
float queueThreshold
float maxGreenTime
float redtimer
float pa
float pb

Detailed Description

Definition at line 3 of file TrafficSignal.h.

Constructor & Destructor Documentation

◆ TrafficSignal()

TrafficSignal::TrafficSignal ( )
inline

Definition at line 10 of file TrafficSignal.h.

Member Function Documentation

◆ canSwitch()

bool TrafficSignal::canSwitch ( int currentQueue,
int maxOtherQueue ) const
inline

Definition at line 39 of file TrafficSignal.h.

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

◆ mustSwitch()

bool TrafficSignal::mustSwitch ( ) const
inline

Definition at line 54 of file TrafficSignal.h.

Here is the caller graph for this function:

◆ starvationCost()

float TrafficSignal::starvationCost ( ) const
inline

Definition at line 29 of file TrafficSignal.h.

Here is the caller graph for this function:

◆ Timer()

void TrafficSignal::Timer ( bool state,
float time )
inline

Definition at line 20 of file TrafficSignal.h.

◆ turnGreen()

void TrafficSignal::turnGreen ( bool & state)
inline

Definition at line 30 of file TrafficSignal.h.

◆ turnRed()

void TrafficSignal::turnRed ( bool & state)
inline

Definition at line 34 of file TrafficSignal.h.

Member Data Documentation

◆ greentimer

float TrafficSignal::greentimer

Definition at line 4 of file TrafficSignal.h.

◆ maxGreenTime

float TrafficSignal::maxGreenTime

Definition at line 7 of file TrafficSignal.h.

◆ minGreenTime

float TrafficSignal::minGreenTime

Definition at line 5 of file TrafficSignal.h.

◆ pa

float TrafficSignal::pa

Definition at line 9 of file TrafficSignal.h.

◆ pb

float TrafficSignal::pb

Definition at line 9 of file TrafficSignal.h.

◆ queueThreshold

float TrafficSignal::queueThreshold

Definition at line 6 of file TrafficSignal.h.

◆ redtimer

float TrafficSignal::redtimer

Definition at line 8 of file TrafficSignal.h.


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