Eclipse SUMO - Simulation of Urban MObility
MSPerson::MSPersonStage_Access::ProceedCmd Class Reference
Inheritance diagram for MSPerson::MSPersonStage_Access::ProceedCmd:
[legend]
Collaboration diagram for MSPerson::MSPersonStage_Access::ProceedCmd:
[legend]

Public Member Functions

SUMOTime execute (SUMOTime currentTime)
 Executes the command. More...
 
 ProceedCmd (MSTransportable *person, MSEdge *edge)
 
virtual SUMOTime shiftTime (SUMOTime, SUMOTime, SUMOTime)
 Reschedule or deschedule the command when quick-loading state. More...
 
 ~ProceedCmd ()
 

Data Fields

int priority = 0
 

Private Member Functions

ProceedCmdoperator= (const ProceedCmd &)
 Invalidated assignment operator. More...
 

Private Attributes

MSTransportable *const myPerson
 
MSEdgemyStopEdge
 

Detailed Description

Definition at line 110 of file MSPerson.h.

Constructor & Destructor Documentation

◆ ProceedCmd()

MSPerson::MSPersonStage_Access::ProceedCmd::ProceedCmd ( MSTransportable person,
MSEdge edge 
)
inline

Definition at line 112 of file MSPerson.h.

◆ ~ProceedCmd()

MSPerson::MSPersonStage_Access::ProceedCmd::~ProceedCmd ( )
inline

Definition at line 113 of file MSPerson.h.

Member Function Documentation

◆ execute()

SUMOTime MSPerson::MSPersonStage_Access::ProceedCmd::execute ( SUMOTime  currentTime)
virtual

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 128 of file MSPerson.cpp.

References MSTransportableControl::endedAccess(), MSTransportableControl::erase(), MSNet::getInstance(), and MSNet::getPersonControl().

◆ operator=()

ProceedCmd& MSPerson::MSPersonStage_Access::ProceedCmd::operator= ( const ProceedCmd )
private

Invalidated assignment operator.

◆ 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 MSCalibrator::CalibratorCommand, and MSTrafficLightLogic::SwitchCommand.

Definition at line 83 of file Command.h.

Field Documentation

◆ myPerson

MSTransportable* const MSPerson::MSPersonStage_Access::ProceedCmd::myPerson
private

Definition at line 116 of file MSPerson.h.

◆ myStopEdge

MSEdge* MSPerson::MSPersonStage_Access::ProceedCmd::myStopEdge
private

Definition at line 117 of file MSPerson.h.

◆ priority

int Command::priority = 0
inherited

Definition at line 87 of file Command.h.

Referenced by MSTrafficLightLogic::SwitchCommand::SwitchCommand().


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