m2etis  0.4
m2etis::net::NetworkController< NetworkType > Class Template Reference

NetworkController. More...

#include <NetworkController.h>

Inheritance diagram for m2etis::net::NetworkController< NetworkType >:
Inheritance graph

Classes

struct  DeliverInfo
 

Public Types

typedef boost::function< void(typename message::NetworkMessage< NetworkType >::Ptr message)> net_deliver_func
 
typedef boost::function< pubsub::FIPtr(typename message::NetworkMessage< NetworkType >::Ptr message)> net_forward_func
 

Public Member Functions

 NetworkController (NetworkInterface< NetworkType > *network, pubsub::PubSubSystemEnvironment *pssi)
 creates new interface for communication with a wrapper adds a polling job for incoming messages More...
 
 ~NetworkController ()
 stops polling job and cleans up wrapper More...
 
bool forward (typename message::NetworkMessage< NetworkType >::Ptr message, const typename NodeHandle< NetworkType >::Ptr hint)
 
void deliver (typename message::NetworkMessage< NetworkType >::Ptr message)
 called from wrapper for every arriving message because of this method call can be done from different threads, messages are pushed into a queue being worked on in the m2etis thread More...
 
void update (const typename NetworkType::Key &, const typename NodeHandle< NetworkType >::Ptr_const, bool)
 
void send (typename message::NetworkMessage< NetworkType >::Ptr msg)
 sends a message to the receiver defined within the message if the sender is the receiver, message is put into deliver method directly to remove overhead by serializing and trying to send message otherwise the message is forwarded to the corresponding wrapper More...
 
void registerMessageType (message::MessageType type, const bool ack=true)
 
void register_forward (message::MessageType nr, net_forward_func f)
 
void register_deliver (message::MessageType nr, net_deliver_func f)
 
void deregister_forward (message::MessageType nr)
 
void deregister_deliver (message::MessageType nr)
 
NetworkType::Key getSelf () const
 
- Public Member Functions inherited from m2etis::net::NetworkCallbackInterface< NetworkType >
 NetworkCallbackInterface ()
 
virtual ~NetworkCallbackInterface ()
 

Public Attributes

NetworkInterface< NetworkType > * network_
 

Detailed Description

template<class NetworkType>
class m2etis::net::NetworkController< NetworkType >

NetworkController.

Long Desc

Definition at line 52 of file NetworkController.h.

Member Typedef Documentation

template<class NetworkType>
typedef boost::function<void(typename message::NetworkMessage<NetworkType>::Ptr message)> m2etis::net::NetworkController< NetworkType >::net_deliver_func

Definition at line 54 of file NetworkController.h.

template<class NetworkType>
typedef boost::function<pubsub::FIPtr(typename message::NetworkMessage<NetworkType>::Ptr message)> m2etis::net::NetworkController< NetworkType >::net_forward_func

Definition at line 55 of file NetworkController.h.

Constructor & Destructor Documentation

creates new interface for communication with a wrapper adds a polling job for incoming messages

Definition at line 72 of file NetworkController.h.

template<class NetworkType>
m2etis::net::NetworkController< NetworkType >::~NetworkController ( )
inline

stops polling job and cleans up wrapper

Definition at line 80 of file NetworkController.h.

Member Function Documentation

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::deliver ( typename message::NetworkMessage< NetworkType >::Ptr  message)
inlinevirtual

called from wrapper for every arriving message because of this method call can be done from different threads, messages are pushed into a queue being worked on in the m2etis thread

Implements m2etis::net::NetworkCallbackInterface< NetworkType >.

Definition at line 107 of file NetworkController.h.

Here is the caller graph for this function:

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::deregister_deliver ( message::MessageType  nr)
inline

Definition at line 151 of file NetworkController.h.

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::deregister_forward ( message::MessageType  nr)
inline

Definition at line 147 of file NetworkController.h.

template<class NetworkType>
bool m2etis::net::NetworkController< NetworkType >::forward ( typename message::NetworkMessage< NetworkType >::Ptr  message,
const typename NodeHandle< NetworkType >::Ptr  hint 
)
inlinevirtual
template<class NetworkType>
NetworkType::Key m2etis::net::NetworkController< NetworkType >::getSelf ( ) const
inline

Definition at line 155 of file NetworkController.h.

Here is the caller graph for this function:

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::register_deliver ( message::MessageType  nr,
net_deliver_func  f 
)
inline

Definition at line 143 of file NetworkController.h.

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::register_forward ( message::MessageType  nr,
net_forward_func  f 
)
inline

Definition at line 139 of file NetworkController.h.

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::registerMessageType ( message::MessageType  type,
const bool  ack = true 
)
inline

Definition at line 135 of file NetworkController.h.

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::send ( typename message::NetworkMessage< NetworkType >::Ptr  msg)
inline

sends a message to the receiver defined within the message if the sender is the receiver, message is put into deliver method directly to remove overhead by serializing and trying to send message otherwise the message is forwarded to the corresponding wrapper

Definition at line 126 of file NetworkController.h.

Here is the caller graph for this function:

template<class NetworkType>
void m2etis::net::NetworkController< NetworkType >::update ( const typename NetworkType::Key ,
const typename NodeHandle< NetworkType >::Ptr_const  ,
bool   
)
inlinevirtual

Member Data Documentation

template<class NetworkType>
NetworkInterface<NetworkType>* m2etis::net::NetworkController< NetworkType >::network_

Definition at line 66 of file NetworkController.h.


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