examples: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters

This commit is contained in:
Rod A Santiago 2016-04-20 08:38:10 -07:00
parent b91b5125f2
commit 139b495982

View file

@ -64,7 +64,7 @@ def main():
slaveport = options.slave.split(':') slaveport = options.slave.split(':')
slave = slaveport[0] slave = slaveport[0]
if len(slaveport) > 1: if len(slaveport) > 1:
port = slaveport[1] port = int(slaveport[1])
else: else:
port = coreapi.CORE_API_PORT port = coreapi.CORE_API_PORT
print "connecting to slave at %s:%d" % (slave, port) print "connecting to slave at %s:%d" % (slave, port)
@ -98,6 +98,7 @@ def main():
name = "n%d" % i, start=False) name = "n%d" % i, start=False)
tmp.setposition(x=150*i,y=150) tmp.setposition(x=150*i,y=150)
tmp.server = slave tmp.server = slave
n.append(tmp)
session.broker.handlerawmsg(tmp.tonodemsg(flags=flags)) session.broker.handlerawmsg(tmp.tonodemsg(flags=flags))
# create remote links via API # create remote links via API
@ -122,7 +123,7 @@ def main():
session.broker.handlerawmsg(msg) session.broker.handlerawmsg(msg)
# start a shell on node 1 # start a shell on node 1
n[1].term("bash") n[7].term("bash")
# TODO: access to remote nodes is currently limited in this script # TODO: access to remote nodes is currently limited in this script