network: Enable modifing system IDs for automatic partition

This commit is contained in:
F5
2022-10-25 17:06:44 +08:00
parent 5110ade9ed
commit 89c128b1a2
2 changed files with 14 additions and 0 deletions

View File

@@ -126,6 +126,13 @@ Node::GetSystemId (void) const
return m_sid; return m_sid;
} }
void
Node::SetSystemId (uint32_t systemId)
{
NS_LOG_FUNCTION (this << systemId);
m_sid = systemId;
}
uint32_t uint32_t
Node::AddDevice (Ptr<NetDevice> device) Node::AddDevice (Ptr<NetDevice> device)
{ {

View File

@@ -94,6 +94,13 @@ public:
*/ */
uint32_t GetSystemId (void) const; uint32_t GetSystemId (void) const;
/**
* \brief Set the system ID for auto-partition in the multithreaded simulator
*
* \param systemId the system ID this node will be
*/
void SetSystemId (uint32_t systemId);
/** /**
* \brief Associate a NetDevice to this node. * \brief Associate a NetDevice to this node.
* *