def make_node(sim, rule_manager, devaddr=None, extra_config={}): node = simul.SimulSCHCNode(sim, extra_config) node.protocol.set_rulemanager(rule_manager) if devaddr is None: devaddr = node.id node.layer2.set_devaddr(devaddr) return node
def make_node(self, sim, rule_manager, devaddr=None, extra_config={}): """ Method to create a node with its rules :param sim: Simul instance :param rule_manager: Rule manager instance :param devaddr: device address :param extra_config: extra information to configure node instance :return node: node instance """ node = simul.SimulSCHCNode(sim, extra_config) node.protocol.set_rulemanager(rule_manager) if devaddr is None: devaddr = node.id node.layer2.set_devaddr(devaddr) return node