22 #ifndef __M2ETIS_SIM_PUBSUBWRAPPER_H__
23 #define __M2ETIS_SIM_PUBSUBWRAPPER_H__
38 class PubSubSystemEnvironment;
42 class OmNetCallbackInterface;
55 PubSubWrapper(
OmNetCallbackInterface * o,
const std::string & ip,
const int port,
const std::string & known_hostname,
const int known_hostport,
const std::vector<std::string> & rootList);
78 void unsubscribe(
const pubsub::ChannelName channel)
const;
boost::shared_ptr< M2Message< EventType > > Ptr
void Update()
method updating Scheduler for simulator
pubsub::PubSubSystemEnvironment * pssi()
getter for PubSubSystemEnvironment
PubSubWrapper(OmNetCallbackInterface *o, const std::string &ip, const int port, const std::string &known_hostname, const int known_hostport, const std::vector< std::string > &rootList)
constructor creating wrapper out of simulator
void subscribe(const pubsub::ChannelName channel, pubsub::BasicDeliverCallbackInterface< SimulationEventType > &callback)
wrapper for subscribe method of PubSubSystem
pubsub::PubSubSystem * _pubsub
PubSubSystem being wrapped by this class.
void publish(const pubsub::ChannelName channel, const message::M2Message< SimulationEventType >::Ptr msg) const
wrapper for publish method of PubSubSystem
message::M2Message< SimulationEventType >::Ptr transformToM2etisMessage(message::NetworkMessage< net::NetworkType< net::OMNET >>::Ptr msg, const pubsub::ChannelName chan)
method to create M2Message out of a NetworkMessage
void unsubscribe(const pubsub::ChannelName channel) const
wrapper for unsubscribe method of PubSubSystem
message::M2Message< SimulationEventType >::Ptr createMessage(const pubsub::ChannelName channel, const SimulationEventType &v)
method to create a message for the specified channel with the given payload
class for accessing the m2etis pub/sub system. It is the main entry point for the usage of the m2etis...
message::NetworkMessage< net::NetworkType< net::OMNET > >::Ptr transformToNetworkMessage(message::M2Message< SimulationEventType >::Ptr msg, const pubsub::ChannelName chan)
method to create NetworkMessage out of a M2Message