#include "NetworkDevice.h"


CNetworkDevice::CNetworkDevice(int DeviceID, int DeviceAddress, CAbstractNetworkCommIF *Interface)
{
    mDeviceAddress = DeviceAddress;
    mDeviceID = DeviceID;
    SetNetworkInterface(Interface);
    mIsOnline = false;
}

CNetworkDevice::~CNetworkDevice()
{
    if(mNetworkInterfacePtr != 0)
    {
        delete mNetworkInterfacePtr;
    }
}

void CNetworkDevice::SetNetworkInterface(CAbstractNetworkCommIF *Interface)
{
    mNetworkInterfacePtr = Interface;
    if(Interface != 0)
    {
        mNetworkInterfacePtr->mDevicePtr = this;
    }
}


