Eclipse SUMO - Simulation of Urban MObility
Command_Hotkey_InductionLoop Class Reference

Set/unsets inductionloop override. More...

#include <Command_Hotkey_InductionLoop.h>

Inheritance diagram for Command_Hotkey_InductionLoop:
[legend]
Collaboration diagram for Command_Hotkey_InductionLoop:
[legend]

Public Member Functions

 Command_Hotkey_InductionLoop (MSInductLoop *det, bool set)
 Constructor. More...
 
virtual SUMOTime shiftTime (SUMOTime, SUMOTime, SUMOTime)
 Reschedule or deschedule the command when quick-loading state. More...
 
 ~Command_Hotkey_InductionLoop ()
 Destructor. More...
 
Derived from Command
SUMOTime execute (SUMOTime currentTime)
 toggles override More...
 

Static Public Member Functions

static bool registerHotkey (const std::string &key, MSInductLoop *det)
 register hotkey actions More...
 

Data Fields

int priority = 0
 

Private Member Functions

 Command_Hotkey_InductionLoop (const Command_Hotkey_InductionLoop &)
 Invalidated copy constructor. More...
 
Command_Hotkey_InductionLoopoperator= (const Command_Hotkey_InductionLoop &)
 Invalidated assignment operator. More...
 

Private Attributes

MSInductLoopmyDetector
 The detector to be manipulated. More...
 
bool mySet
 whether the override shall be set or reset More...
 

Detailed Description

Set/unsets inductionloop override.

Definition at line 41 of file Command_Hotkey_InductionLoop.h.

Constructor & Destructor Documentation

◆ Command_Hotkey_InductionLoop() [1/2]

Command_Hotkey_InductionLoop::Command_Hotkey_InductionLoop ( MSInductLoop det,
bool  set 
)

Constructor.

Parameters
[in]detThe Detector to manipulate
[in]setwhether to set or unset the override

Definition at line 31 of file Command_Hotkey_InductionLoop.cpp.

Referenced by registerHotkey().

Here is the caller graph for this function:

◆ ~Command_Hotkey_InductionLoop()

Command_Hotkey_InductionLoop::~Command_Hotkey_InductionLoop ( )

Destructor.

Definition at line 36 of file Command_Hotkey_InductionLoop.cpp.

◆ Command_Hotkey_InductionLoop() [2/2]

Command_Hotkey_InductionLoop::Command_Hotkey_InductionLoop ( const Command_Hotkey_InductionLoop )
private

Invalidated copy constructor.

Member Function Documentation

◆ execute()

SUMOTime Command_Hotkey_InductionLoop::execute ( SUMOTime  currentTime)
virtual

toggles override

Returns always 1.

Parameters
[in]currentTimeThe current simulation time (unused)
Returns
Always DELTA_T (will be executed in next time step)
See also
Command

Implements Command.

Definition at line 40 of file Command_Hotkey_InductionLoop.cpp.

References myDetector, mySet, and MSInductLoop::overrideTimeSinceDetection().

◆ operator=()

Command_Hotkey_InductionLoop& Command_Hotkey_InductionLoop::operator= ( const Command_Hotkey_InductionLoop )
private

Invalidated assignment operator.

◆ registerHotkey()

bool Command_Hotkey_InductionLoop::registerHotkey ( const std::string &  key,
MSInductLoop det 
)
static

register hotkey actions

Definition at line 47 of file Command_Hotkey_InductionLoop.cpp.

References Command_Hotkey_InductionLoop(), MSNet::getInstance(), gn, TL, and WRITE_WARNINGF.

Referenced by GUIInductLoop::buildDetectorGUIRepresentation().

Here is the caller graph for this function:

◆ 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

◆ myDetector

MSInductLoop* Command_Hotkey_InductionLoop::myDetector
private

The detector to be manipulated.

Definition at line 74 of file Command_Hotkey_InductionLoop.h.

Referenced by execute().

◆ mySet

bool Command_Hotkey_InductionLoop::mySet
private

whether the override shall be set or reset

Definition at line 77 of file Command_Hotkey_InductionLoop.h.

Referenced by execute().

◆ 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: