The NetSignal class represents a network signal in a simulation.
More...
#include <netsignal.h>
|
| | NetSignal (int signalID, std::shared_ptr< NetLink > hostingLink) |
| | Constructor.
|
| |
| | NetSignal (int signalID, std::shared_ptr< NetLink > hostingLink, std::shared_ptr< NetNode > previousLinkNode, std::shared_ptr< NetNode > currentLinkNode) |
| | Constructor.
|
| |
|
| int | userID |
| | The user identifier of the signal.
|
| |
| int | id |
| | The identifier of the signal.
|
| |
| bool | isGreen |
| | Indicates whether the signal is green.
|
| |
| double | proximityToActivate |
| | The proximity at which the signal activates.
|
| |
| std::weak_ptr< NetLink > | link |
| | The link associated with the signal.
|
| |
| std::weak_ptr< NetNode > | previousNode |
| | The previous node connected to the signal.
|
| |
| std::weak_ptr< NetNode > | currentNode |
| | The current node connected to the signal.
|
| |
The NetSignal class represents a network signal in a simulation.
◆ NetSignal() [1/2]
| NetSignal::NetSignal |
( |
int |
signalID, |
|
|
std::shared_ptr< NetLink > |
hostingLink |
|
) |
| |
Constructor.
- Parameters
-
| signalID | The identifier of the signal. |
| hostingLink | The link hosting the signal. |
◆ NetSignal() [2/2]
| NetSignal::NetSignal |
( |
int |
signalID, |
|
|
std::shared_ptr< NetLink > |
hostingLink, |
|
|
std::shared_ptr< NetNode > |
previousLinkNode, |
|
|
std::shared_ptr< NetNode > |
currentLinkNode |
|
) |
| |
Constructor.
- Parameters
-
| signalID | The identifier of the signal. |
| hostingLink | The link hosting the signal. |
| previousLinkNode | The previous node connected to the signal. |
| currentLinkNode | The current node connected to the signal. |
◆ getNumberOfSignalsInSimulator()
| unsigned int NetSignal::getNumberOfSignalsInSimulator |
( |
| ) |
|
|
static |
Gets the number of signals in the simulator.
- Returns
- The number of signals.
◆ operator<<
| ostream & operator<< |
( |
ostream & |
ostr, |
|
|
const NetSignal & |
signal |
|
) |
| |
|
friend |
Overloaded ostream operator for printing the NetSignal object.
- Parameters
-
| ostr | The output stream object. |
| signal | The NetSignal object to be printed. |
- Returns
- The output stream object.
◆ currentNode
| std::weak_ptr<NetNode> NetSignal::currentNode |
The current node connected to the signal.
◆ id
The identifier of the signal.
◆ isGreen
Indicates whether the signal is green.
◆ link
| std::weak_ptr<NetLink> NetSignal::link |
The link associated with the signal.
◆ previousNode
| std::weak_ptr<NetNode> NetSignal::previousNode |
The previous node connected to the signal.
◆ proximityToActivate
| double NetSignal::proximityToActivate |
The proximity at which the signal activates.
◆ userID
The user identifier of the signal.