Hello.
Let's supose you want to pass 2 uint32_t variables to that application, you should first add a new TracedCallback to sta-wifi-mac.h , like this:
TracedCallback<uint32_t,uint32_t> m_Mycallback;
(just replace the type and number of desired parameters for whatever you need in the template)
Then you should modifiy the GetTypeId(void) function definition of sta-wifi-ma.cc to include a new TraceSource:
.AddTraceSource ("NewCallback"," pass parameters to application ",
MakeTraceSourceAccessor (&StaWifiMac::m_Mycallback))Now in your application you should declare a function that receives exactly these parameters:
void MyApplication::MyFunction(uint32_t,uint32_t)Next, in some of the functions of your application (maybe StartApplication would be a good choice ) you should use the Config::Connect function to connect to the TraceSource.
Config::ConnectWithoutContext (oss.str (),MakeCallback (&MyApplication::MyFunction,this));Finally, in sta-wifi-mac.cc whenever you call:
m_Mycallback(parameter1, parameter2);
MyApplication::MyFunction will be invoked with those parameters.
I hope that helps.