The NetSignalGroupController class represents a controller for handling network signal groups in a simulation.
More...
#include <netsignalgroupcontroller.h>
The NetSignalGroupController class represents a controller for handling network signal groups in a simulation.
◆ NetSignalGroupController()
| NetSignalGroupController::NetSignalGroupController |
( |
std::set< std::shared_ptr< NetNode > > |
nodes | ) |
|
Constructor.
- Parameters
-
| nodes | The set of nodes confined by this group controller. |
◆ addNode()
| void NetSignalGroupController::addNode |
( |
std::shared_ptr< NetNode > |
node | ) |
|
Adds a node to the group controller.
- Parameters
-
◆ clear()
| void NetSignalGroupController::clear |
( |
| ) |
|
Clears the controller to its initial state.
◆ getFeedback()
| std::pair< std::shared_ptr< NetSignal >, Vector< std::shared_ptr< NetSignal > > > NetSignalGroupController::getFeedback |
( |
| ) |
|
Gets the feedback on which signals should be turned on/off.
- Returns
- A pair of the locked network signal and the signals to be turned off.
◆ sendPassRequestToControlTo()
| void NetSignalGroupController::sendPassRequestToControlTo |
( |
std::shared_ptr< NetSignal > |
networkSignal, |
|
|
double & |
simulationTime, |
|
|
Vector< std::shared_ptr< NetSignal > > & |
sameDirectionSignals |
|
) |
| |
Sends a pass request to control a specific network signal.
- Parameters
-
| networkSignal | The network signal to control. |
| simulationTime | The current simulation time. |
| sameDirectionSignals | The signals in the same direction as the train. |
◆ setSignalsInSameDirection()
| void NetSignalGroupController::setSignalsInSameDirection |
( |
Vector< std::shared_ptr< NetSignal > > |
sameDirectionSignals | ) |
|
Sets the signals in the same direction as the train.
- Parameters
-
| sameDirectionSignals | The signals in the same direction. |
◆ updateTimeStep()
| void NetSignalGroupController::updateTimeStep |
( |
double & |
timeStep | ) |
|
Updates the controller state based on the time step.
- Parameters
-
◆ operator<<
Overloaded ostream operator for printing the NetSignalGroupController object.
- Parameters
-
- Returns
- The output stream object.
◆ atNodes
| Vector<std::shared_ptr<NetNode> > NetSignalGroupController::atNodes |
The nodes confined by this group controller.
◆ confinedLinks
| Vector<std::shared_ptr<NetLink> > NetSignalGroupController::confinedLinks |
The confined links in the group.
◆ lockedOnSignal
| std::shared_ptr<NetSignal> NetSignalGroupController::lockedOnSignal |
The locked network signal.
◆ movements
| Map<std::shared_ptr<NetSignal>, bool> NetSignalGroupController::movements |
The movement status of the signals.
◆ networkSignalsGroup
| Vector<std::shared_ptr<NetSignal> > NetSignalGroupController::networkSignalsGroup |
The network signals in the group.
◆ otherDirectionSignals
| Vector<std::shared_ptr<NetSignal> > NetSignalGroupController::otherDirectionSignals |
The signals in the opposite direction.
◆ timeStamp
| double NetSignalGroupController::timeStamp |
The timestamp of the controller.