change node's shape in net anim

272 views
Skip to first unread message

Francisco Eduardo Balart Sanchez

unread,
Jun 20, 2017, 5:42:32 PM6/20/17
to ns-3-users
I have search in the forum and i haven't came across with the answer
¿how to change the node's shape? (not to an image) to a square, triangle, etc.

Regarding the image this has already been resolved: https://groups.google.com/d/topic/ns-3-users/J2LUo2yYsSU/discussion

But regarding the shape that by default is a red circle, not.

Tommasso mentioned that "Let's say that you assign a red color to the AP1 (other APs could have another color). AP is a square and the STA is a circle."

Also this is mentioned but not explicitly in: https://groups.google.com/d/topic/ns-3-users/0YfpN7hDrtc/discussion

I tried to back-track where this is defined but is quite murky since the net anim is split in the src file and the netanim<version> directory.

A simple C++ command would suffice for me, or a file that explicitly change the square shape.

Thanks in advance and best regards

Francisco Eduardo Balart Sanchez

unread,
Jun 21, 2017, 2:40:02 PM6/21/17
to ns-3-users
There is an example in the src net anim directory the dumbbell-animation.cc
Which creates nodes in square shape, I´m trying to backtrack this as well, since it uses the point to point files and point to point layout.

regards

Francisco Eduardo Balart Sanchez

unread,
Jun 21, 2017, 3:55:51 PM6/21/17
to ns-3-users
Actually i just ran the dumbbell-animation with the followin command

sudo ./waf --run "dumbbell-animation --nLeftLeaf=5 --nRightLeaf=5 --animFile=dumbbell.xml"

And when ran the nodes are no longer square shaped ... not sure what is happening here, maybe the netanim has something missing

I´m using netanim-3.107 and ns3.25

Again i just require a command in net anim to make the node's shape a square, triangle, etc.

Not sure if the right direction is the node description in net anim as in the wireless-animation.cc 

anim.UpdateNodeDescription (wifiStaNodes.Get (i), "STA");

since it seems there is a relationship between this enum of TypeOfStation (in edca-txop-n.h"

enum TypeOfStation
{
  STA,
  AP,
  ADHOC_STA,
  MESH,
  HT_STA,
  HT_AP,
  HT_ADHOC_STA,
  OCB
};

And the code in the netanim-3.107 directory

balart40@balart40-VirtualBox:~/Desktop/balart40/ns/ns-allinone-3.25/netanim-3.107$ grep -rn m_description *
animatormode.cpp:1543:              animNode->setNodeDescription (ev->m_description);
animevent.h:223:    m_description (description)
animevent.h:227:  QString m_description;




Screen Shot 2017-06-21 at 2.50.46 PM.png

John Abraham

unread,
Jun 22, 2017, 5:17:13 PM6/22/17
to ns-3-...@googlegroups.com
Hi ,

Support for shapes was removed.
People tend to use a color or custom image (from a file) to depict things

John

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages