Hey, In this post we are discussing about changing of various attributes of a node in ns2. As you all know, each node is defined with a set of attributes.
Attributes specific to node are color, shape, label, label-color, position of label and adding/deleting mark on the node. Each node can have 3 shapes: circle (default), square, or hexagon. But once created, the shape of a node Cannot be changed during the simulation. Different node may have different colors, and its color may be changed during animation. The following OTcl procedures are used to set node attributes, they are methods of the class Node:
$node color [color] ;# sets color of node
$node shape [shape] ;# sets shape of node
$node label [label] ;# sets label on node
$node label-color [lcolor] ;# sets color of label
$node label-at [ldirection] ;# sets position of label
$node add-mark [name] [color] [shape] ;# adds a mark to node
$node delete-mark [name] ;# deletes mark from node
Happy Coding!
ReplyDeleteThis blog gives me some valuable information,thanks a lot.
Oracle Certification in Chennai
oracle certification courses online
oracle course in Coimbatore
Good blog!!! It is more impressive... thanks for sharing with us...
ReplyDeleteHow to Use Selenium in Python
Learn Selenium with Python