Eclipse SUMO - Simulation of Urban MObility
MSCalibrator::CalibratorCommand Class Reference

#include <MSCalibrator.h>

Inheritance diagram for MSCalibrator::CalibratorCommand:
[legend]
Collaboration diagram for MSCalibrator::CalibratorCommand:
[legend]

Public Member Functions

 CalibratorCommand (MSCalibrator *cali)
 
SUMOTime execute (SUMOTime currentTime)
 Executes the command. More...
 
virtual SUMOTime shiftTime (SUMOTime, SUMOTime, SUMOTime)
 Reschedule or deschedule the command when quick-loading state. More...
 

Private Attributes

MSCalibratormyCalibrator
 

Detailed Description

Definition at line 145 of file MSCalibrator.h.

Constructor & Destructor Documentation

◆ CalibratorCommand()

MSCalibrator::CalibratorCommand::CalibratorCommand ( MSCalibrator cali)
inline

Definition at line 147 of file MSCalibrator.h.

Member Function Documentation

◆ execute()

SUMOTime MSCalibrator::CalibratorCommand::execute ( SUMOTime  currentTime)
inlinevirtual

Executes the command.

The implementations should return 0 if the command shall not be repeated, or a value larger than 0 that describe the time after which the command shall be executed again. Values below 0 must not be returned.

Parameters
[in]currentTimeThe current simulation time
Returns
The time after which the command shall be executed again, 0 if this command shall be descheduled.
Exceptions
ProcessErrorDerived actions may throw this exception

Implements Command.

Definition at line 150 of file MSCalibrator.h.

References MSCalibrator::execute(), and myCalibrator.

◆ shiftTime()

virtual SUMOTime Command::shiftTime ( SUMOTime  ,
SUMOTime  ,
SUMOTime   
)
inlinevirtualinherited

Reschedule or deschedule the command when quick-loading state.

The implementations should return -1 if the command shall not be re-scheduled, or a value >= 0 that describe the new time at which the command shall be executed again.

Parameters
[in]currentTimeThe current simulation time
[in]execTimeThe time at which the command would have been executed
[in]newTimeThe simulation time at which the simulation is restarted
Returns
The time at which the command shall be executed again

Reimplemented in MSTrafficLightLogic::SwitchCommand.

Definition at line 82 of file Command.h.

Field Documentation

◆ myCalibrator

MSCalibrator* MSCalibrator::CalibratorCommand::myCalibrator
private

Definition at line 155 of file MSCalibrator.h.

Referenced by execute().


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