[Ns-developers] Extending WifiHelper object
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed Mar 25 03:44:50 PDT 2009
On Wed, 2009-03-25 at 11:15 +0100, Mirko Banchi wrote:
> >> As you can see the main problems are with parameter list of
> >>
> >> NqosWifiMacHelper::SetDcaParameter
> >> QosWifiMacHelper::SetEdcaParameter
> >>
> >> Which kind of parameter we should use?
> >>
> >> Even if ns3::EdcaTxopN has attributes like "MinCw", "MaxCw" etc, when
> >> SetEdcaParameter is called i haven't in hand the pointer to the specific
> >> queue yet.
> >
> > Can you do what you do already for SetMsduAggregatorForAc with a factory
> > and create the EdcaTxop object from the helper rather than from the
> > WifiMac object ?
> >
>
> It's a problem :( Because EdcaTxopN needs to know for which type of
> WifiMac objects is created. For example in QapWifiMac constructor:
None of the below seem to be problematic: why can't you do this:
class QosWifiMacHelper
{
public:
void SetEdcaParameter (AccessClass ac,
std::string n0, const AttributeValue &v0,
...) {
if (ac == VO) {
m_voEdcaFactory.Set (n0, v0);
}
}
... Install (...) {
vo_edca = m_voEdcaFactory.Create... ();
mac->SetVoEdca (vo_edca); // or mac->SetAttribute (..., PointerValue
(vo_edca);
}
private:
ObjectFactory m_voEdcaFactory;
};
>
> QapWifiMac::QapWifiMac ()
> {
> ...
> m_voEdcaTxopN->SetTxOkCallback (MakeCallback (&QapWifiMac::TxOk,
> this));
> m_voEdcaTxopN->SetTypeOfStation (AP);
> ....
> }
More information about the Ns-developers
mailing list