#include <canopen/CanopenFramer.h>
#include <canopen/CanopenParser.h>
#include <softbus_core/plugin/IParser.h>
#include <canopen/CanopenObjectDictionary.h>
#include <canopen/EdsDcfLoader.h>
#include <canopen/CanopenNodeManager.h>
#include <canopen/CanopenMapper.h>

namespace canopen {

softbus::core::FrameResult CanopenFramer::extract(const uint8_t*, std::size_t)
{
    return {};
}

softbus::core::ParseResult CanopenParser::parseFrame(const uint8_t*, std::size_t, const std::string&)
{
    return {};
}

bool CanopenObjectDictionary::loadEds(const std::string&) { return false; }
bool CanopenObjectDictionary::loadDcf(const std::string&) { return false; }
bool CanopenObjectDictionary::hasEntry(uint16_t, uint8_t) const { return false; }

bool EdsDcfLoader::load(const std::string&, CanopenObjectDictionary*) { return false; }

bool CanopenNodeManager::registerNode(uint8_t) { return false; }
bool CanopenNodeManager::setState(uint8_t, const std::string&) { return false; }
std::string CanopenNodeManager::state(uint8_t nodeId) const
{
    const auto it = states_.find(nodeId);
    return it == states_.end() ? "Unknown" : it->second;
}

bool CanopenMapper::mapToDom(uint16_t, uint8_t, softbus::core::DOMMessage*) { return false; }

} // namespace canopen

extern "C" SOFTBUS_PLUGIN_API softbus::core::IFramer* create_framer()
{
    return new canopen::CanopenFramer();
}

extern "C" SOFTBUS_PLUGIN_API void destroy_framer(softbus::core::IFramer* framer)
{
    delete framer;
}

extern "C" SOFTBUS_PLUGIN_API softbus::core::IParser* create_parser()
{
    return new canopen::CanopenParser();
}

extern "C" SOFTBUS_PLUGIN_API void destroy_parser(softbus::core::IParser* parser)
{
    delete parser;
}
