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

Node of the PLC graph. More...

#include <plc-node.h>

List of all members.

Public Member Functions

Vector3D GetPosition (void)
void SetPosition (Vector3D pos)
void SetPosition (double pos_x, double pos_y, double pos_z)
void SetImpedance (Ptr< PLC_Impedance > impedance)
Ptr< PLC_ImpedanceGetImpedancePtr (void)
PLC_ImpedanceGetImpedancePeekPtr (void) const
unsigned int GetVertexId (void)
Ptr< PLC_OutletGetOutlet (void)
PLC_OutletGetOutletPeekPtr (void)
bool HasOutlet (void)
bool IsOpenCircuit (void)
void OpenCircuit (void)
void CloseCircuit (void)
void AddEdge (Ptr< PLC_Node > to, Ptr< PLC_Edge > edge)
size_t GetNumEdges (void)
PLC_EdgeGetEdge (PLC_Node *node)
PLC_NodeOutEdgesMap GetEdges (void)
void AssociateBackboneBranch (Ptr< PLC_BackboneBranch > backboneBranch)
PLC_NodeOutEdgesMap::iterator OutEdgesBegin (void)
PLC_NodeOutEdgesMap::iterator OutEdgesEnd (void)
void SetName (std::string name)
std::string GetName (void)
void Lock (void)
void Unlock (void)
bool IsTimeVariant (void)
Ptr< PLC_GraphGetGraph (void)
Ptr< PLC_ChannelGetChannel (void)
void SetGraph (Ptr< PLC_Graph > graph)
void SetOutlet (Ptr< PLC_Outlet > outlet)

Static Public Member Functions

static TypeId GetTypeId (void)
static uint64_t GetImpedanceHashSum (void)

Protected Member Functions

virtual void DoStart (void)
virtual void DoDispose (void)

Protected Attributes

Vector3D m_position
PLC_Mutex m_node_mutex
unsigned int m_vertex_id
bool m_open_circuit
Ptr< PLC_Graphm_graph
Ptr< PLC_Impedancem_impedance
Ptr< PLC_Outletm_outlet
PLC_NodeOutEdgesMap m_edges
std::set< Ptr
< PLC_BackboneBranch > > 
m_associated_backbone_branches
std::string m_name

Static Protected Attributes

static uint64_t m_impedance_hash_sum = 0

Friends

class PLC_Graph
class PLC_Outlet

Detailed Description

Node of the PLC graph.

In order to calculate the transmission channels of the PLC network an undirected graph will be constructed. This class defines the graph nodes which are used as an abstract representation of network components, e.g. impedances, outlets, branches, etc.


Member Function Documentation

void ns3::PLC_Node::AddEdge ( Ptr< PLC_Node to,
Ptr< PLC_Edge edge 
)

Links an edge to the node. An edge represents a two port network (e.g. a cable or transformer instance so far)

Parameters:
todestination node
edgeinstance

associates an instance of a backbone branch to this node. A reference to the backbone branches is needed by PLC_Outlet to set them out of date in case of an impedance change

Parameters:
pointerto the backbone branch
void ns3::PLC_Node::CloseCircuit ( void  )

reconnects the impedance to the circuit if existing

Returns:
the global channel instance
Parameters:
node
Returns:
the linked edge leading to node
PLC_NodeOutEdgesMap ns3::PLC_Node::GetEdges ( void  )
Returns:
a std::map of all linked edges of the node
Ptr<PLC_Graph> ns3::PLC_Node::GetGraph ( void  ) [inline]
Returns:
pointer to the graph
Returns:
node impedance raw poiner
Returns:
node impedance smart pointer
std::string ns3::PLC_Node::GetName ( void  ) [inline]

Get the assigned name of the node

Returns:
size_t ns3::PLC_Node::GetNumEdges ( void  ) [inline]
Returns:
the number of edges assigned to this node
Ptr<PLC_Outlet> ns3::PLC_Node::GetOutlet ( void  ) [inline]
Returns:
pointer to the outlet or NULL if it doesn't have one
Returns:
raw pointer to the outlet or NULL if it doesn't have one
Vector3D ns3::PLC_Node::GetPosition ( void  ) [inline]
Returns:
the node's assigned position
unsigned int ns3::PLC_Node::GetVertexId ( void  ) [inline]
Returns:
id assigned to this node by the network graph
bool ns3::PLC_Node::HasOutlet ( void  ) [inline]
Returns:
true if node has an outlet
bool ns3::PLC_Node::IsOpenCircuit ( void  ) [inline]
Returns:
true if node has no impedance assigned
Returns:
whether the connected impedance is time variant
void ns3::PLC_Node::Lock ( void  ) [inline]

Locks the mutex of this node

void ns3::PLC_Node::OpenCircuit ( void  ) [inline]

disconnects a contigent impedance

PLC_NodeOutEdgesMap::iterator ns3::PLC_Node::OutEdgesBegin ( void  ) [inline]
Returns:
the start iterator of the edge map
PLC_NodeOutEdgesMap::iterator ns3::PLC_Node::OutEdgesEnd ( void  ) [inline]
Returns:
the end iterator of the edge map
void ns3::PLC_Node::SetGraph ( Ptr< PLC_Graph graph)
Parameters:
graphset the graph
void ns3::PLC_Node::SetImpedance ( Ptr< PLC_Impedance impedance)

Connect an impedance in parallel to all two wire transission lines linked to this node

Parameters:
impedance
void ns3::PLC_Node::SetName ( std::string  name) [inline]

Assign a name to the node

Parameters:
name
void ns3::PLC_Node::SetOutlet ( Ptr< PLC_Outlet outlet)

allocates outlet to the node

Parameters:
outlet
void ns3::PLC_Node::SetPosition ( Vector3D  pos) [inline]
Parameters:
posposition to be assigned to the node
void ns3::PLC_Node::SetPosition ( double  pos_x,
double  pos_y,
double  pos_z 
)
Parameters:
pos_xx coordinate
pos_yy coordinate
pos_zz coordinate
void ns3::PLC_Node::Unlock ( void  ) [inline]

Unlocks the mutex of this node


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