FNSS C++ library
C++ API for the Fast Network Simulation Setup (FNSS) toolchain
 All Classes Functions Typedefs Pages
Classes | Public Member Functions | List of all members
fnss::Node Class Reference

#include <node.h>

+ Inheritance diagram for fnss::Node:

Classes

class  ApplicationNotFoundException
 

Public Member Functions

 Node (const ProtocolStack &stack=ProtocolStack())
 
ProtocolStack getProtocolStack () const
 
void setProtocolStack (const ProtocolStack &stack)
 
Application getApplication (const std::string &name) const
 
void setApplication (const Application &application)
 
Application removeApplication (const std::string &name)
 
std::set< std::string > getAllApplications () const
 
- Public Member Functions inherited from fnss::PropertyContainer
std::string getProperty (const std::string &name) const
 
void setProperty (const std::string &name, const std::string &value="")
 
bool hasProperty (const std::string &name) const
 
void addProperties (const PropertyContainer &other)
 
std::string removeProperty (const std::string &name)
 
std::set< std::string > getAllProperties () const
 

Detailed Description

Represent a node of a topology

Each node comprises a set of properties (e.g. if the node is a router/switch or host), a protocol stack and multiple applications.

Author
Cosmin Cocora

Constructor & Destructor Documentation

fnss::Node::Node ( const ProtocolStack stack = ProtocolStack())

Constructor.

Parameters
stackthe ProtocolStack to be deployed on the node.

Member Function Documentation

std::set< std::string > fnss::Node::getAllApplications ( ) const

Remove the specified Application from the node.

Parameters
namename of the application to remove.
foundset to true if the Application with the specified name was found, false otherwise.
Returns
a copy of the Application object if present or Application() otherwise. Get a std::set containing the names of all the application deployed on the node.
a set with all the names of the stacks deployed.
Application fnss::Node::getApplication ( const std::string &  name) const

Get a a copy of the application with the specified name.

Throws an exception if the specified application was not found.

Parameters
namename of the application
Returns
a copy of the Application object.
ProtocolStack fnss::Node::getProtocolStack ( ) const

Get a copy of the ProtocolStack currently deployed on the node.

Returns
the deployed ProtocolStack.
Application fnss::Node::removeApplication ( const std::string &  name)

Remove the specified Application from the node.

Throws an exception if the specified application was not found.

Parameters
namename of the application to remove.
Returns
a copy of the removed Application object.
void fnss::Node::setApplication ( const Application application)

Get a a copy of the application with the specified name.

Parameters
namename of the application.
foundset to true if the Application with the specified name was found, false otherwise.
Returns
a copy of the Application object if present or Application() otherwise. Deploy or overwrite the given Application on the node.
Parameters
applicationthe Application to deploy.
void fnss::Node::setProtocolStack ( const ProtocolStack stack)

Overwrite the currently deployed ProtocolStack.

Parameters
stackthe ProtocolStack to deploy.

The documentation for this class was generated from the following files: