From d684b8eb5a6bd131d3b2aa7ae2c8b139a2c18912 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 11 Mar 2022 11:04:01 -0800 Subject: [PATCH] docs: updated emane python example to use updated set_config --- docs/python.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/python.md b/docs/python.md index fe776662..ba4b4f33 100644 --- a/docs/python.md +++ b/docs/python.md @@ -341,19 +341,11 @@ EMANE Model Configuration: ```python from core import utils -# emane network specific config -session.emane.set_model_config(emane.id, EmaneIeee80211abgModel.name, { - "unicastrate": "3", -}) - -# node specific config -session.emane.set_model_config(node.id, EmaneIeee80211abgModel.name, { - "unicastrate": "3", -}) - -# node interface specific config +# standardized way to retrieve an appropriate config id +# iface id can be omitted, to allow a general configuration for a model, per node config_id = utils.iface_config_id(node.id, iface_id) -session.emane.set_model_config(config_id, EmaneIeee80211abgModel.name, { +# set emane configuration for the config id +session.emane.set_config(config_id, EmaneIeee80211abgModel.name, { "unicastrate": "3", }) ```