ns-3 PLC model
 All Classes Functions Variables Enumerations
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
ns3::PLC_Edge Class Reference

Edge of the PLC graph. More...

#include <plc-edge.h>

Inheritance diagram for ns3::PLC_Edge:
ns3::PLC_Line ns3::PLC_TwoPort

List of all members.

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_NodeGetConnectedNode (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_ImpedanceGetInputImpedance (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_EdgeTransferUnitGetEdgeTransferUnit (PLC_Node *dst_node)
PLC_EdgeTransferUnitGetUpdatedEdgeTransferUnit (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

Detailed Description

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


Constructor & Destructor Documentation

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

Parameters:
smThe spectrum model to be used
fromFirst node linked by this edge
toSecond node linked by this edge
ns3::PLC_Edge::~PLC_Edge ( void  ) [pure virtual]

Destructor Pure virtual due to abstract base class


Member Function Documentation

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

Parameters:
dst_nodeDestination node
input_impedanceInput impedance
load_impedanceLoad 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

Parameters:
dst_nodeOutput 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

Parameters:
dst_nodeOutput 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

Returns:
Approximation of the node attenuation

Implemented in ns3::PLC_Line.

Get the second node linked by this edge

Parameters:
src_nodeFirst node
Returns:
Second node (opposite of src_node)

Get the edge transfer unit for computation of the transfer function

Parameters:
dst_nodeDestination node
Returns:
Pointer to the edge transfer unit instance
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

Returns:

Implemented in ns3::PLC_Line.

Get the input impedance looking to dst_node

Parameters:
dst_nodeDestination node
Returns:
Input impedance
double ns3::PLC_Edge::GetLength ( void  ) [inline]

The length of this edge

Returns:
Distance between the linked nodes

Get the edge transfer unit but trigger an update cycle before

Parameters:
dst_nodeDestination node
Returns:
Pointer to the edge transfer unit instance
void ns3::PLC_Edge::InitEdgeTransferFactor ( PLC_Node dst_node,
bool  time_variant = false 
)

Inits the data structures used to cache the edge data

Parameters:
dst_nodeDestination node
time_variantCan be set true if already known that the input impedance of dst_node is time variant

Indicates whether the calculated edge transfer factor is still up to date

Parameters:
dst_nodeDestination node
Returns:
true if no reachable impedance has changed, false otherwise

Indicates whether the cached input impedance of this edge is up to date

Parameters:
dst_nodeDestination node
Returns:
True if impedance is up to date, false otherwise
void ns3::PLC_Edge::Lock ( void  ) const [inline]

Lock edge mutex for multiprocessing

Set the edge transfer function in direction to dst_node out of date

Parameters:
dst_nodeDestination node

Set the input impedance heading to dst_node out of date

Parameters:
dst_nodeDestination node
void ns3::PLC_Edge::Unlock ( void  ) const [inline]

Unlock edge mutex


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations