|
EpcTools
An event based multi-threaded C++ development framework.
|
Represents the local PFCP node. More...
#include <epfcp.h>
Public Types | |
| enum | State { State::Initialized, State::Started, State::Stopping, State::Stopped } |
Public Member Functions | |
| LocalNode () | |
| Default constructor. More... | |
| virtual | ~LocalNode () |
| Class destructor. More... | |
| State | state () |
| Gets the state of the local node. More... | |
| Seid | allocSeid () |
| Creates a new SEID. More... | |
| Void | freeSeid (Seid seid) |
| Deallocates a SEID. More... | |
| ULong | allocSeqNbr () |
| Allocates a message sequence number for a request message. More... | |
| Void | freeSeqNbr (ULong sn) |
| Deallocates a sequence number. More... | |
| Void | setNbrActivityWnds (size_t nbr) |
| Sets the number of activity windows. More... | |
| RemoteNodeSPtr | createRemoteNode (cpStr addr, UShort port) |
| Creates a remote Node that this local node will "talk" to. More... | |
| RemoteNodeSPtr | createRemoteNode (EIpAddress &address, UShort port) |
| Creates a remote Node that this local node will "talk" to. More... | |
| RemoteNodeUMap & | remoteNodes () |
| Returns the map of current remote nodes. Access to this map must be protected with the read/write lock returned by remoteNodesLock() for thread-safety. More... | |
| ERWLock & | remoteNodesLock () |
| Returns a lock protected access to the remote nodes map. More... | |
| virtual Void | collectStats (EJsonBuilder &builder) |
| Appends stats about the current local node object to the provided json builder. Derived classes can override this function with additional information to append. This function is called during a call to Stats::collectNodeStats(). Derived implementations should call this base method in their implementation (e.g. LocalNode::collectStats(builder)). Derived implementations should ensure thread-safety for accessed members. This function is thread-safe. More... | |
| SessionBaseSPtr | createSession (LocalNodeSPtr &ln, RemoteNodeSPtr &rn) |
| Creates a new Session object and registers it with the local and remote nodes. More... | |
| NodeSocket & | socket () |
| Returns a reference to the underlying socket object for this local host. More... | |
| State | state () const |
| Returns the current state of the local node. More... | |
Public Member Functions inherited from PFCP::Node | |
| Node () | |
| Default constructor. More... | |
| virtual | ~Node () |
| Class destructor. More... | |
| EIpAddress & | ipAddress () |
| Returns the IP address associated with this node. More... | |
| Node & | setIpAddress (const EIpAddress &ipaddr) |
| Assigns the IP address for this node. More... | |
| ESocket::Address & | address () |
| Returns the ESocket::Address object representing the IP address for this node. More... | |
| Node & | setAddress (const ESocket::Address &addr) |
| Assigns the ESocket::Address object representing the IP address for this node. More... | |
| const ETime & | startTime () const |
| Returns the Node start time. More... | |
| Node & | setStartTime (const ETime &st=ETime::Now()) |
| Assigns the Node start time. More... | |
| SessionBaseSPtr | getSession (Seid seid) |
| Returns the session object for the specified SEID. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from PFCP::Node | |
| static ULongLong | nodesCreated () |
| static ULongLong | nodesDeleted () |
Represents the local PFCP node.
|
strong |
| PFCP::LocalNode::LocalNode | ( | ) |
Default constructor.
|
virtual |
Class destructor.
| Seid PFCP::LocalNode::allocSeid | ( | ) |
Creates a new SEID.
| ULong PFCP::LocalNode::allocSeqNbr | ( | ) |
Allocates a message sequence number for a request message.
|
virtual |
Appends stats about the current local node object to the provided json builder. Derived classes can override this function with additional information to append. This function is called during a call to Stats::collectNodeStats(). Derived implementations should call this base method in their implementation (e.g. LocalNode::collectStats(builder)). Derived implementations should ensure thread-safety for accessed members. This function is thread-safe.
| builder | the json builder to populate |
|
inline |
Creates a remote Node that this local node will "talk" to.
| addr | the IP address of the remote host. |
| port | the port that messages will be sent to. |
| RemoteNodeSPtr PFCP::LocalNode::createRemoteNode | ( | EIpAddress & | address, |
| UShort | port | ||
| ) |
Creates a remote Node that this local node will "talk" to.
| address | the IP address of the remote host. |
| port | the port that messages will be sent to. |
| SessionBaseSPtr PFCP::LocalNode::createSession | ( | LocalNodeSPtr & | ln, |
| RemoteNodeSPtr & | rn | ||
| ) |
Creates a new Session object and registers it with the local and remote nodes.
| ln | the local node shared pointer. |
| rn | the remote node shared pointer. |
| Void PFCP::LocalNode::freeSeid | ( | Seid | seid | ) |
Deallocates a SEID.
| seid | the SEID to deallocate. |
| Void PFCP::LocalNode::freeSeqNbr | ( | ULong | sn | ) |
Deallocates a sequence number.
| sn | the sequence number to deallocate. |
|
inline |
Returns the map of current remote nodes. Access to this map must be protected with the read/write lock returned by remoteNodesLock() for thread-safety.
|
inline |
Returns a lock protected access to the remote nodes map.
| Void PFCP::LocalNode::setNbrActivityWnds | ( | size_t | nbr | ) |
Sets the number of activity windows.
| nbr | the number of activity windows. |
|
inline |
Returns a reference to the underlying socket object for this local host.
|
inline |
Gets the state of the local node.
|
inline |
Returns the current state of the local node.
1.8.11