-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving and importing a topology in simulation #100
Conversation
… sucess or a failure
This reverts commit 2e91caf.
@@ -45,6 +45,8 @@ Targets: | |||
Options | |||
--sim Run in simulator mode with default count of motes. | |||
--simCount=n Run in simulator mode with 'n' motes. | |||
--importTopo Run in simulator mode with data imported from a previous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace tabs by 4 spaces (applied throughout your PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Thank you, We tried to fix everything you pointed out, please tell us if you would like us to do further modifications. |
@@ -134,6 +136,12 @@ AddOption('--simTopology', | |||
type = 'string') | |||
runnerEnv['SIMTOPOLOGY'] = GetOption('simTopology') | |||
|
|||
AddOption('--importTopo', | |||
dest = 'pathTopo', | |||
default = '.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default should be ''
, not '.'
, right?
Wonderful! I left a couple of comments, but you're almost there! 🎉 |
I tried to fix everything, not sure about tabs though because they already appears as 4 spaces to me in my editor... |
@@ -45,6 +45,8 @@ Targets: | |||
Options | |||
--sim Run in simulator mode with default count of motes. | |||
--simCount=n Run in simulator mode with 'n' motes. | |||
--importTopo Run in simulator mode with data imported from a previous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename all importTopo
to pathTopo
. Please grep throughout your changes (or on this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, done!
Thanks a million @quentinl-c and @vince-nayal for the excellent work, including during the numerous discussions on this PR. I believe that this PR is adds a very important functionality to the OpenVisualizer, and I congratulate you on the high quality of the code. |
Saving and importing a topology in simulation
SW- Fix a bug introduced by pull request #100
From the Topology web page, it's possible to download a json file that contains : Motes position list, connections list and DAGRoots list for the current Topology
From the terminal, the '--importTopo' option followed by the json file's path let you reload a previous configuration you saved