DataStorm  0.1
Data Distribution Service
Public Member Functions | Friends | List of all members
DataStorm::Node Class Reference

The Node class allows creating topic readers and writers. More...

#include <DataStorm/DataStorm.h>

Public Member Functions

 Node (std::shared_ptr< Ice::Communicator > communicator) noexcept
 Construct a DataStorm node. More...
 
template<class... T>
 Node (int &argc, const char *argv[], T &&... iceArgs)
 Construct a DataStorm node. More...
 
template<class... T>
 Node (int &argc, char *argv[], T &&... iceArgs)
 Construct a DataStorm node. More...
 
template<class... T>
 Node (T &&... iceArgs)
 Construct a DataStorm node. More...
 
 Node (Node &&node) noexcept
 Construct a new Node by taking ownership of the given node. More...
 
 ~Node ()
 Node destructor. More...
 
void shutdown () noexcept
 Shutdown the node. More...
 
bool isShutdown () const noexcept
 Return whether or not the node shutdown has been initiated. More...
 
void waitForShutdown () const noexcept
 Wait for shutdown to be called. More...
 
Nodeoperator= (Node &&node) noexcept
 Move assignement operator. More...
 
std::shared_ptr< Ice::Communicator > getCommunicator () const noexcept
 Returns the Ice communicator associated with the node. More...
 
std::shared_ptr< Ice::Connection > getSessionConnection (const std::string &ident) const noexcept
 Returns the Ice connection associated with a session given a session identifir. More...
 

Friends

template<typename , typename , typename >
class Topic
 

Detailed Description

The Node class allows creating topic readers and writers.

A Node is the main DataStorm object which allows creating topic readers or writers.

Constructor & Destructor Documentation

◆ Node() [1/5]

DataStorm::Node::Node ( std::shared_ptr< Ice::Communicator >  communicator)
noexcept

Construct a DataStorm node.

A node is the main DataStorm object. It is required to construct topics. The node uses the given Ice communicator.

Parameters
communicatorThe Ice communicator used by the topic factory for its configuration and communications.

◆ Node() [2/5]

template<class... T>
DataStorm::Node::Node ( int &  argc,
const char *  argv[],
T &&...  iceArgs 
)
inline

Construct a DataStorm node.

A node is the main DataStorm object. It is required to construct topics. This constructor parses the command line arguments into Ice properties and initialize a new Node. The constructor initializes the Ice communicator using the given Ice arguments. If the communicator creation fails, an Ice exception is raised.

Parameters
argcThe number of command line arguments in the argv array.
argvThe command line arguments.
iceArgsAdditonal arguments which are passed to the Ice::initialize function in addition to the argc and argv arguments.

◆ Node() [3/5]

template<class... T>
DataStorm::Node::Node ( int &  argc,
char *  argv[],
T &&...  iceArgs 
)
inline

Construct a DataStorm node.

A node is the main DataStorm object. It is required to construct topics. This constructor parses the command line arguments into Ice properties and initialize a new Node. The constructor initializes the Ice communicator using the given Ice arguments. If the communicator creation fails, an Ice exception is raised.

Parameters
argcThe number of command line arguments in the argv array.
argvThe command line arguments.
iceArgsAdditonal arguments which are passed to the Ice::initialize function in addition to the argc and argv arguments.

◆ Node() [4/5]

template<class... T>
DataStorm::Node::Node ( T &&...  iceArgs)
inline

Construct a DataStorm node.

A node is the main DataStorm object. It is required to construct topics. The constructor initializes the Ice communicator using the given arguments. If the communicator creation fails, an Ice exception is raised.

Parameters
iceArgsArguments which are passed to the Ice::initialize function.

◆ Node() [5/5]

DataStorm::Node::Node ( Node &&  node)
noexcept

Construct a new Node by taking ownership of the given node.

Parameters
nodeThe node to transfer ownership from.

◆ ~Node()

DataStorm::Node::~Node ( )

Node destructor.

The node destruction releases associated resources. If the node created the Ice communicator, the communicator is destroyed.

Member Function Documentation

◆ getCommunicator()

std::shared_ptr<Ice::Communicator> DataStorm::Node::getCommunicator ( ) const
noexcept

Returns the Ice communicator associated with the node.

◆ getSessionConnection()

std::shared_ptr<Ice::Connection> DataStorm::Node::getSessionConnection ( const std::string &  ident) const
noexcept

Returns the Ice connection associated with a session given a session identifir.

Session identifiers are provided with the sample origin data member as the first tuple element.

Parameters
identThe session identifier.
Returns
The connection associated with the given session
See also
DataStorm::Sample::ElementId DataStorm::Sample::getSession

◆ isShutdown()

bool DataStorm::Node::isShutdown ( ) const
noexcept

Return whether or not the node shutdown has been initiated.

Returns
True if the node is shutdown, false otherwise.

◆ operator=()

Node& DataStorm::Node::operator= ( Node &&  node)
noexcept

Move assignement operator.

Parameters
nodeThe node.

◆ shutdown()

void DataStorm::Node::shutdown ( )
noexcept

Shutdown the node.

The shutdown interrupts calls which are waiting for events, writers or readers.

◆ waitForShutdown()

void DataStorm::Node::waitForShutdown ( ) const
noexcept

Wait for shutdown to be called.

Friends And Related Function Documentation

◆ Topic

template<typename , typename , typename >
friend class Topic
friend

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