Set node address in "Node/MobileNode instproc add-interface" in ns-mobilenode.tcl:
$mac node-addr [AddrParams addr2id [$self node-addr]]
Add to Mac class:
int node_addr_;
inline int node_addr() { return node_addr_; }
Read parameter in Mac::command()
if (strcmp(argv[1], "node-addr") == 0) {
node_addr_= atoi(argv[2]);
return TCL_OK;
}
(이거 잘 넣어야 함, 소스를 잘 봐가면서 첫번째 if에 넣어야 함-)
Get mobilenode instance:
MobileNode *mnode_ = (MobileNode *) Node::get_node_by_address(node_addr());
출처 :
FW: [ns] How to access MobileNode at Mac-802_11.cc ?
http://mailman.isi.edu/pipermail/ns-users/2005-May/049559.html
$mac node-addr [AddrParams addr2id [$self node-addr]]
Add to Mac class:
int node_addr_;
inline int node_addr() { return node_addr_; }
Read parameter in Mac::command()
if (strcmp(argv[1], "node-addr") == 0) {
node_addr_= atoi(argv[2]);
return TCL_OK;
}
(이거 잘 넣어야 함, 소스를 잘 봐가면서 첫번째 if에 넣어야 함-)
Get mobilenode instance:
MobileNode *mnode_ = (MobileNode *) Node::get_node_by_address(node_addr());
출처 :
FW: [ns] How to access MobileNode at Mac-802_11.cc ?
http://mailman.isi.edu/pipermail/ns-users/2005-May/049559.html