class NS3BaseNode(NS3Base):
_rtype = "abstract::ns3::Node"
+ @classmethod
+ def _register_attributes(cls):
+ enablestack = Attribute("enableStack",
+ "Install network stack in Node, including: ARP, "
+ "IP4, ICMP, UDP and TCP ",
+ type = Types.Bool,
+ default = False,
+ flags = Flags.Design)
+
+ cls._register_attribute(enablestack)
+
@property
def simulation(self):
from nepi.resources.ns3.ns3simulation import NS3Simulation
if ipv4:
self.simulation.invoke(self.uuid, "AggregateObject", ipv4.uuid)
+ if self.get("enableStack"):
+ uuid_stack_helper = self.simulation.create("InternetStackHelper")
+ self.simulation.invoke(uuid_stack_helper, "Install", self.uuid)
+
mobility = self.mobility
if mobility:
self.simulation.invoke(self.uuid, "AggregateObject", mobility.uuid)
def invoke(self, uuid, operation, *args, **kwargs):
if operation == "isRunning":
- return self.is_running()
+ return self.is_running
if operation == "isAppRunning":
return self._is_app_running(uuid)
if operation == "addStaticRoute":