[Ns-developers] Extending WifiHelper object

Mirko Banchi mk.banchi at gmail.com
Wed Mar 25 04:13:56 PDT 2009


Mathieu Lacage ha scritto:
> 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;
> };

Ah ok!So we can now call all methods that before was called in
contructor, in setVoEdca, setViEdca... methods.

Ok, thanks :)

Mirko

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


-- 
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/6892f63f/smime.bin


More information about the Ns-developers mailing list