core: (fixes #43) Check if ObjectFactory has been configured
This commit is contained in:
@@ -63,6 +63,8 @@ us a note on ns-developers mailing list.</p>
|
||||
<li>Added a new trace source <b>EndOfHePreamble</b> in WifiPhy for tracing end of preamble (after training fields) for received 802.11ax packets.</li>
|
||||
<li>Added a new helper method to SpectrumWifiPhyHelper and YansWifiPhyHelper to set the frame capture model</li>
|
||||
<li>Added a new helper method to SpectrumWifiPhyHelper and YansWifiPhyHelper to set the preamble detection model</li>
|
||||
<li>Added a method to ObjectFactory to check whether a TypeId has been configured on the factory</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
|
||||
@@ -60,6 +60,15 @@ ObjectFactory::SetTypeId (const char *tid)
|
||||
NS_LOG_FUNCTION (this << tid);
|
||||
m_tid = TypeId::LookupByName (tid);
|
||||
}
|
||||
bool
|
||||
ObjectFactory::IsTypeIdSet (void) const
|
||||
{
|
||||
if (m_tid.GetUid () != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void
|
||||
ObjectFactory::Set (std::string name, const AttributeValue &value)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,13 @@ public:
|
||||
void SetTypeId (std::string tid);
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
* Check if the ObjectFactory has been configured with a TypeId
|
||||
*
|
||||
* \return true if a TypeId has been configured to the ObjectFactory
|
||||
*/
|
||||
bool IsTypeIdSet (void) const;
|
||||
|
||||
/**
|
||||
* Set an attribute to be set during construction.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user