Skip to content
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

Merged
merged 35 commits into from
Mar 20, 2015

Conversation

quentinl-c
Copy link
Contributor

  1. Saving the topology into a json file:
    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
    capture d ecran 2015-03-15 a 18 02 05
  2. Importing a Topology from a json file:
    From the terminal, the '--importTopo' option followed by the json file's path let you reload a previous configuration you saved
    capture d ecran 2015-03-15 a 18 06 56

@@ -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
Copy link
Member

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@vince-nayal
Copy link

Thank you,

We tried to fix everything you pointed out, please tell us if you would like us to do further modifications.
Quentin will soon create the issues on JIRA

@twatteyne twatteyne changed the title Topology saving and importation Saving and importing a topology in simulation Mar 19, 2015
@@ -134,6 +136,12 @@ AddOption('--simTopology',
type = 'string')
runnerEnv['SIMTOPOLOGY'] = GetOption('simTopology')

AddOption('--importTopo',
dest = 'pathTopo',
default = '.',
Copy link
Member

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?

@twatteyne
Copy link
Member

Wonderful! I left a couple of comments, but you're almost there!

🎉

@vince-nayal
Copy link

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
Copy link
Member

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, done!

@twatteyne
Copy link
Member

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.
👍

twatteyne added a commit that referenced this pull request Mar 20, 2015
Saving and importing a topology in simulation
@twatteyne twatteyne merged commit cca2478 into openwsn-berkeley:develop Mar 20, 2015
vince-nayal pushed a commit to vince-nayal/openwsn-sw that referenced this pull request Mar 22, 2015
twatteyne added a commit that referenced this pull request Mar 22, 2015
SW- Fix a bug introduced by pull request #100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants