Change in wireless-phy.cc
Problem:
Fix:
The uAMPs assumes that the node_ attribute is a MobileNode*, but when it's really of a base type, Node*.
As a quick fix, I just cast it down to a MobileNode* like the following:
generally bad practice, I know, but I'm only trying to patch it, and I'm pretty sure that the uAMPs code only deals with mobile nodes, so having it call getLoc() assuming a MobileNode isn't too bad...
Problem:
mac/wireless-phy.cc: In member function `virtual int
WirelessPhy::sendUp(Packet*)':
mac/wireless-phy.cc:456: error: `getLoc' undeclared (first use this function)
mac/wireless-phy.cc:456: error: (Each undeclared identifier is reported only
once for each function it appears in.)
Fix:
The uAMPs assumes that the node_ attribute is a MobileNode*, but when it's really of a base type, Node*.
As a quick fix, I just cast it down to a MobileNode* like the following:
dynamic_cast<MobileNode*>(node_)->getLoc(&tX, &tY, &tZ);
generally bad practice, I know, but I'm only trying to patch it, and I'm pretty sure that the uAMPs code only deals with mobile nodes, so having it call getLoc() assuming a MobileNode isn't too bad...
0 Comments:
Post a Comment
<< Home