17#ifndef DAISI_MANAGER_HELPER_H_
18#define DAISI_MANAGER_HELPER_H_
20#include "ns3/application-container.h"
21#include "ns3/ipv4-address.h"
22#include "ns3/object-factory.h"
23#include "ns3/uinteger.h"
24#include "utils/socket_manager.h"
25#include "utils/sola_utils.h"
29template <
typename T>
void installApplication(ns3::Ptr<ns3::Node> node) {
30 ns3::ObjectFactory factory;
31 factory.SetTypeId(T::GetTypeId());
32 ns3::Ptr<ns3::Application> app = factory.Create<T>();
33 node->AddApplication(app);
36inline void registerNodes(ns3::NodeContainer container) {
37 for (uint64_t i = 0; i < container.GetN(); i++) {
38 std::vector<ns3::Ipv4Address> addresses = daisi::getAddressesForNode(container, i);
45template <
typename App>
inline void setupApplication(ns3::NodeContainer container) {
46 for (uint64_t i = 0; i < container.GetN(); i++) {
47 installApplication<App>(container.Get(i));
48 container.Get(i)->GetApplication(0)->SetStartTime(ns3::MilliSeconds(0));
static SocketManager & get()
Getter for singleton.
Definition socket_manager.h:33