// $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/tiptilt_ctrl/bcu/Interface/Sharknir/Bcu/DeviceFactoryImpl.cpp 989 2018-10-31 10:58:06Z depa $

#include "tiptilt_ctrl/bcu/Interface/Sharknir/Bcu/DeviceFactoryImpl.h"
#include "tiptilt_ctrl/bcu/Interface/Sharknir/Bcu/DeviceImpl.h"

#include "tiptilt_ctrl/bcu/util/Assertions.h"

namespace Sharknir { namespace Bcu {

DeviceFactoryImpl::DeviceFactoryImpl(const Nice::JointPtr& config) :
    config_(config)
{
    SHARKNIR_PRECONDITION(0 != config, "Config must be valid");
}

DevicePtr DeviceFactoryImpl::buildDevice()
{
    Sharknir::Bcu::DeviceImplPtr device= new Sharknir::Bcu::DeviceImpl(config_);
    device->initialize();

    return device;
}

DeviceFactoryImpl::~DeviceFactoryImpl()
{
}

}
}
