[Ns-developers] Extending WifiHelper object

Mirko Banchi mk.banchi at gmail.com
Wed Mar 25 03:15:46 PDT 2009


Mathieu Lacage ha scritto:
> On Tue, 2009-03-24 at 20:54 +0100, Mirko Banchi wrote:
>> Hi Mathieu,
>>
>> As you told me, i'm extending WifiHelper class in order to make easy
>> setting of Msdu aggregators and also Edca parameters (minCw, maxCW ...)
>> for each Qos station's queue. The discussed solution is the following:
> 
> looks good.
> 
>> class QosWifiMacHelper : public WifiMacHelper
>> {
>>   virtual Ptr<WifiMac> Create (void) const;
>>   void SetType (std::string,
>>                 std::string n0, const AttributeValue &v0,
>>                 ...);
>>   void SetMsduAggregatorForAc (AccessClass ac, std::string type,
>>                                std::string n0, const AttributeValue &v0
>>                                ,...);
>>   void SetEdcaParameterForAc (?);
>> };
> 
>> 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:

QapWifiMac::QapWifiMac ()
{
  ...
  m_voEdcaTxopN->SetTxOkCallback (MakeCallback (&QapWifiMac::TxOk,
                                                this));
  m_voEdcaTxopN->SetTypeOfStation (AP);
  ....
}

Could be a solution define a constructor like this?

QapWifiMac::QapWifiMac (Ptr<EdcaTxopN> voEdcaTxopN,
                        Ptr<EdcaTxopN> viEdcaTxopN
                        Ptr<EdcaTxopN> beEdcaTxopN
                        Ptr<EdcaTxopN> bkEdcaTxopN)
{
  ...
  m_voEdcaTxopN = voEdcaTxopN;
  m_viEdcaTxopN = viEdcaTxopN;
  m_beEdcaTxopN = beEdcaTxopN;
  m_bkEdcaTxopN = bkEdcaTxopN;
  ...
}

The same for QstaWifiMac, NqapWifiMac, NqstaWifiMac, AdhocWifiMac,
QadhocWifiMac

do you agree with this solution?

Mirko

-- 
Mirko Banchi

e-mail:    mk.banchi at gmail.com
e-mail:    mk.banchi at virgilio.it
id-jabber: mk.banchi at jabber.org
id-msn:    mb11684 at hotmail.com

PGP key fingerprint:

308F BFB1 4E67 2522 C88E
DC69 7631 52ED 32A5 6456

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3410 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.isi.edu/pipermail/ns-developers/attachments/20090325/653868bf/smime.bin


More information about the Ns-developers mailing list