examples: fixed python emane example to leverage current internal api

This commit is contained in:
Blake Harnden 2022-11-03 12:08:40 -07:00
parent 898a4f7c84
commit 568b1360a2

View file

@ -36,14 +36,15 @@ options.model = "mdr"
position = Position(x=300, y=100) position = Position(x=300, y=100)
n2 = session.add_node(CoreNode, position=position, options=options) n2 = session.add_node(CoreNode, position=position, options=options)
# configure general emane settings # configure emane settings
config = session.emane.get_configs() # configuration values are currently supported as strings
config.update({"eventservicettl": "2"}) session.emane.set_config(
emane.id,
# configure emane model settings EmaneIeee80211abgModel.name,
# using a dict mapping currently support values as strings {
session.emane.set_model_config( "unicastrate": "3",
emane.id, EmaneIeee80211abgModel.name, {"unicastrate": "3"} "eventservicettl": "2"
},
) )
# link nodes to emane # link nodes to emane