[Ns-developers] Problems with ObjectFactory

Mirko Banchi mk.banchi at gmail.com
Thu Mar 5 15:07:57 PST 2009


Hi all,

i have some problems with ObjectFactory. I'm using it in a new Helper
class to set a MSDU aggregator:

MsduAggregatorHelper::SetAggregatorType (std::string aggregatorType, ...)
{
  ...
  m_aggregator.SetTypeId (aggregatorType);
  ...
}

MsduAggregatorHelper::Install (...)
{
  ...

  Ptr<MsduAggregator> aggregator = m_aggregator.Create<MsduAggregator> ();
  ...

}

If i try to use this helper from a script an error occurs:

Requested constructor for ns3::Node but it does not have one.

The error is originated in IidManager::GetConstructor () method.

I have verified that

m_aggregator.SetTypeId ("ns3::MsduStandardAggregator");

doens't fail. The method ObjectFactory::Create instead fails.

That's strange...even if i call ObjectFactory::SetTypeId () with
"ns3::MsduStandardAggregator" as parameter, it's looking for a
constructor for ns3::Node.

Any idea?

Thanks,
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/20090306/169eb5dc/smime.bin


More information about the Ns-developers mailing list