#include <wire.h>
Public Member Functions | |
| Wire (Pin *startPin, Pin *endPin) | |
| ~Wire () | |
| bool | calculateCurrent () |
| bool | currentIsKnown () const |
| void | setCurrentKnown (bool known) |
| double | current () const |
| double | voltage () const |
| Pin * | startPin () const |
| Pin * | endPin () const |
Protected Attributes | |
| double | m_current |
| bool | m_bCurrentIsKnown |
| QGuardedPtr< Pin > | m_pStartPin |
| QGuardedPtr< Pin > | m_pEndPin |
Definition at line 22 of file wire.h.
| bool Wire::calculateCurrent | ( | ) |
Attempts to calculate the current that is flowing through the connector. Returns true if successfuly, otherwise returns false
Definition at line 37 of file wire.cpp.
References m_bCurrentIsKnown, m_current, m_pEndPin, and m_pStartPin.
| bool Wire::currentIsKnown | ( | ) | const [inline] |
Returns true if the current flowing through the connector is known
Definition at line 36 of file wire.h.
References m_bCurrentIsKnown.
| void Wire::setCurrentKnown | ( | bool | known | ) |
Set whether the actual current flowing into this node is known (in some cases - such as this node being ground - it is not known, and so the value returned by current() cannot be relied on.
Definition at line 125 of file wire.cpp.
References m_bCurrentIsKnown, and m_current.
| double Wire::current | ( | ) | const [inline] |
| double Wire::voltage | ( | ) | const |
Returns the voltage at the connector. This is an average of the voltages at either end.
Definition at line 117 of file wire.cpp.
References m_pEndPin, and m_pStartPin.
1.5.1