bug 1420: no python bindings for csma-layout

This commit is contained in:
Tom Henderson
2012-05-01 11:56:16 -07:00
parent b5cac1da24
commit 235118cd41
3 changed files with 21 additions and 1 deletions

View File

@@ -14,5 +14,5 @@ def build(bld):
if bld.env['ENABLE_EXAMPLES']:
bld.add_subdirs('examples')
#bld.ns3_python_bindings()
bld.ns3_python_bindings()

View File

@@ -58,6 +58,12 @@ CsmaChannel::CsmaChannel ()
m_deviceList.clear ();
}
CsmaChannel::~CsmaChannel ()
{
NS_LOG_FUNCTION (this);
m_deviceList.clear ();
}
int32_t
CsmaChannel::Attach (Ptr<CsmaNetDevice> device)
{
@@ -345,6 +351,12 @@ CsmaDeviceRec::CsmaDeviceRec (Ptr<CsmaNetDevice> device)
active = true;
}
CsmaDeviceRec::CsmaDeviceRec (CsmaDeviceRec const &deviceRec)
{
devicePtr = deviceRec.devicePtr;
active = deviceRec.active;
}
bool
CsmaDeviceRec::IsActive ()
{

View File

@@ -45,6 +45,7 @@ public:
CsmaDeviceRec();
CsmaDeviceRec(Ptr< CsmaNetDevice > device);
CsmaDeviceRec (CsmaDeviceRec const &);
/**
* \return If the net device pointed to by the devicePtr is active
@@ -81,6 +82,10 @@ public:
* \brief Create a CsmaChannel
*/
CsmaChannel ();
/**
* \brief Destroy a CsmaChannel
*/
virtual ~CsmaChannel ();
/**
* \brief Attach a given netdevice to this channel
@@ -269,6 +274,9 @@ public:
Time GetDelay (void);
private:
// Avoid implicit copy constructor and assignment (python bindings issues)
CsmaChannel (CsmaChannel const &);
CsmaChannel &operator = (CsmaChannel const &);
/**
* The assigned data rate of the channel