|
Dynamical System Framework
|
Public Member Functions | |
| TrafficLightCycle (Delay greenTime, Delay phase) | |
| Construct a new TrafficLightCycle object. | |
| Delay | greenTime () const |
| Delay | phase () const |
| bool | isDefault () const |
| Returns true if the cycle has its default values. | |
| bool | isGreenTimeIncreased () const |
| Returns true if the current green time is greater than the default one. | |
| bool | isRedTimeIncreased () const |
| Returns true if the current green time is smaller than the default one. | |
| bool | isGreen (Delay const cycleTime, Delay const counter) const |
| Returns true if the traffic light is green. | |
| void | reset () |
| Reset the green and phase values to the default values. | |
|
inline |
Construct a new TrafficLightCycle object.
| greenTime | Delay, the green time |
| phase | Delay, the phase |
| bool dsf::mobility::TrafficLightCycle::isGreen | ( | Delay const | cycleTime, |
| Delay const | counter ) const |
Returns true if the traffic light is green.
| cycleTime | Delay, the total time of a red-green cycle |
| counter | Delay, the current counter |
| void dsf::mobility::TrafficLightCycle::reset | ( | ) |
Reset the green and phase values to the default values.
The default values are the values that the cycle had when it was created