thanks for your advice..
I have tried your suggests for several weeks, but i still have trouble in implement your advices.
I prefer to write the "mobility monitor" function within the StaWifiMac class, and I tried to transmit the Ptr<Node> of the mobile station into stawifimac like this:
namespace ns3 {
extern NodeContainer stas;
........
private:
Ptr<Node> node;
and in sta-wifi-mac.cc,i add such sentence in the the construction function of StaWifiMac: node = stas.Get(0);
StaWifiMac::StaWifiMac ()
: m_state (BEACON_MISSED),
m_probeRequestEvent (),
m_assocRequestEvent (),
m_beaconWatchdogEnd (Seconds (0.0))
{
NS_LOG_FUNCTION (this);
node = stas.Get(0);
// Let the lower layers know that we are acting as a non-AP STA in
// an infrastructure BSS.
SetTypeOfStation (STA);
}
then it come out with such error:
[2276/2435] cxxprogram: build/src/wifi/examples/wifi-phy-test.cc.1.o -> build/src/wifi/examples/ns3.22-wifi-phy-test-debug
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/dinglei/ns-allinone-3.22/ns-3.22/build'
these error only come out when i add "node = stas.Get(0);".
I check it on google for a week but I still have no idea about it, could you please give me some advise?
thanks
在 2015年3月13日星期五 UTC+8下午4:29:06,Konstantinos写道: