Edge of the PLC graph. More...
#include <plc-edge.h>
Public Member Functions | |
PLC_Edge (Ptr< const SpectrumModel > sm, Ptr< PLC_Node > from, Ptr< PLC_Node > to) | |
virtual | ~PLC_Edge ()=0 |
double | GetLength (void) |
void | Lock () const |
void | Unlock () const |
PLC_Node * | GetConnectedNode (PLC_Node *src_node) |
virtual void | CalculateInputImpedance (PLC_Node *dst_node)=0 |
virtual void | CalculateEdgeTransferFactor (PLC_Node *dst_node)=0 |
virtual double | GetAttenuationApproxdB (void)=0 |
virtual double | GetIdealPropagationDelay (void)=0 |
bool | IsInputImpedanceUp2Date (PLC_Node *dst_node) |
bool | IsEdgeTransferFactorUp2Date (PLC_Node *dst_node) |
void | SetInputImpedanceOutOfDate (PLC_Node *dst_node) |
void | SetEdgeTransferFactorOutOfDate (PLC_Node *dst_node) |
PLC_Impedance * | GetInputImpedance (PLC_Node *dst_node) |
void | CacheImpedances (PLC_Node *dst_node, Ptr< PLC_Impedance > input_impedance, Ptr< PLC_Impedance > load_impedance) |
void | InitEdgeTransferFactor (PLC_Node *dst_node, bool time_variant=false) |
PLC_EdgeTransferUnit * | GetEdgeTransferUnit (PLC_Node *dst_node) |
PLC_EdgeTransferUnit * | GetUpdatedEdgeTransferUnit (PLC_Node *dst_node) |
std::vector< PLC_Node * > | GetNodes (void) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
virtual void | DoDispose (void) |
Protected Attributes | |
PLC_Mutex | m_line_mutex |
Ptr< const SpectrumModel > | m_spectrum_model |
double | m_propagation_delay |
bool | added2graph |
double | m_length |
PLC_EdgeTransferDataMap | m_edge_transfer_data |
Friends | |
class | PLC_Graph |
class | PLC_Outlet |
Edge of the PLC graph.
This class represents an edge of the undirected graph defined by the PLC network topology. An edge instance can either be a transmission line connecting two nodes or an abstract two port network, that is used to characterize network transformers
ns3::PLC_Edge::PLC_Edge | ( | Ptr< const SpectrumModel > | sm, |
Ptr< PLC_Node > | from, | ||
Ptr< PLC_Node > | to | ||
) |
Constructor No default constructor, because an edge can't exists without connected nodes
sm | The spectrum model to be used |
from | First node linked by this edge |
to | Second node linked by this edge |
ns3::PLC_Edge::~PLC_Edge | ( | void | ) | [pure virtual] |
Destructor Pure virtual due to abstract base class
void ns3::PLC_Edge::CacheImpedances | ( | PLC_Node * | dst_node, |
Ptr< PLC_Impedance > | input_impedance, | ||
Ptr< PLC_Impedance > | load_impedance | ||
) |
Caches the input and node impedances respectively in direction to dst_node
dst_node | Destination node |
input_impedance | Input impedance |
load_impedance | Load impedance |
virtual void ns3::PLC_Edge::CalculateEdgeTransferFactor | ( | PLC_Node * | dst_node | ) | [pure virtual] |
Triggers the calculation of the so called edge transfer factor which is the transfer function representation of a two port network
dst_node | Output destination node |
Implemented in ns3::PLC_Line.
virtual void ns3::PLC_Edge::CalculateInputImpedance | ( | PLC_Node * | dst_node | ) | [pure virtual] |
Triggers calculation of the input impedance of this node This function is recursive
dst_node | Output destination node |
Implemented in ns3::PLC_Line.
virtual double ns3::PLC_Edge::GetAttenuationApproxdB | ( | void | ) | [pure virtual] |
Approximation of the damping through this edge. This function is not used yet, but meant to reduce the computational effort in order to mask non reachable nodes
Implemented in ns3::PLC_Line.
PLC_Node * ns3::PLC_Edge::GetConnectedNode | ( | PLC_Node * | src_node | ) |
Get the second node linked by this edge
src_node | First node |
PLC_EdgeTransferUnit * ns3::PLC_Edge::GetEdgeTransferUnit | ( | PLC_Node * | dst_node | ) |
Get the edge transfer unit for computation of the transfer function
dst_node | Destination node |
virtual double ns3::PLC_Edge::GetIdealPropagationDelay | ( | void | ) | [pure virtual] |
Propagation delay for signals running through this node Ideal because the calculated delay is non dispersive
Implemented in ns3::PLC_Line.
PLC_Impedance * ns3::PLC_Edge::GetInputImpedance | ( | PLC_Node * | dst_node | ) |
Get the input impedance looking to dst_node
dst_node | Destination node |
double ns3::PLC_Edge::GetLength | ( | void | ) | [inline] |
The length of this edge
PLC_EdgeTransferUnit * ns3::PLC_Edge::GetUpdatedEdgeTransferUnit | ( | PLC_Node * | dst_node | ) |
Get the edge transfer unit but trigger an update cycle before
dst_node | Destination node |
void ns3::PLC_Edge::InitEdgeTransferFactor | ( | PLC_Node * | dst_node, |
bool | time_variant = false |
||
) |
Inits the data structures used to cache the edge data
dst_node | Destination node |
time_variant | Can be set true if already known that the input impedance of dst_node is time variant |
bool ns3::PLC_Edge::IsEdgeTransferFactorUp2Date | ( | PLC_Node * | dst_node | ) |
Indicates whether the calculated edge transfer factor is still up to date
dst_node | Destination node |
bool ns3::PLC_Edge::IsInputImpedanceUp2Date | ( | PLC_Node * | dst_node | ) |
Indicates whether the cached input impedance of this edge is up to date
dst_node | Destination node |
void ns3::PLC_Edge::Lock | ( | void | ) | const [inline] |
Lock edge mutex for multiprocessing
void ns3::PLC_Edge::SetEdgeTransferFactorOutOfDate | ( | PLC_Node * | dst_node | ) |
Set the edge transfer function in direction to dst_node out of date
dst_node | Destination node |
void ns3::PLC_Edge::SetInputImpedanceOutOfDate | ( | PLC_Node * | dst_node | ) |
Set the input impedance heading to dst_node out of date
dst_node | Destination node |
void ns3::PLC_Edge::Unlock | ( | void | ) | const [inline] |
Unlock edge mutex