1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

adapt to new plugin registry

This commit is contained in:
Steffen Vogel 2022-03-04 03:31:56 -05:00
parent 53c4c4bf77
commit 49572d0a74
5 changed files with 15 additions and 4 deletions

@ -1 +1 @@
Subproject commit 3b5952a413ba8f8c7731c6a0c8336e1f523884b8 Subproject commit fc69b4c4e8377e36ae536d6697276a1a2b528a4e

View file

@ -141,6 +141,12 @@ public:
virtual std::string virtual std::string
getDescription() const getDescription() const
{ return "Xilinx PCIe FPGA cards"; } { return "Xilinx PCIe FPGA cards"; }
virtual
std::string getType() const
{
return "card";
}
}; };
} /* namespace fpga */ } /* namespace fpga */

View file

@ -55,7 +55,6 @@ class Core;
class CoreFactory; class CoreFactory;
class InterruptController; class InterruptController;
class IpIdentifier { class IpIdentifier {
public: public:
@ -245,6 +244,12 @@ public:
static Core::List static Core::List
make(PCIeCard* card, json_t *json_ips); make(PCIeCard* card, json_t *json_ips);
virtual
std::string getType() const
{
return "core";
}
protected: protected:
Logger Logger
getLogger() const getLogger() const

View file

@ -332,7 +332,7 @@ Core::dump()
CoreFactory* CoreFactory*
CoreFactory::lookup(const Vlnv &vlnv) CoreFactory::lookup(const Vlnv &vlnv)
{ {
for (auto &ip : plugin::Registry::lookup<CoreFactory>()) { for (auto &ip : plugin::registry->lookup<CoreFactory>()) {
if (ip->getCompatibleVlnv() == vlnv) if (ip->getCompatibleVlnv() == vlnv)
return ip; return ip;
} }

View file

@ -92,7 +92,7 @@ setupFpgaCard(const std::string &configFile, const std::string &fpgaName)
} }
// get the FPGA card plugin // get the FPGA card plugin
auto fpgaCardFactory = plugin::Registry::lookup<fpga::PCIeCardFactory>("pcie"); auto fpgaCardFactory = plugin::registry->lookup<fpga::PCIeCardFactory>("pcie");
if (fpgaCardFactory == nullptr) { if (fpgaCardFactory == nullptr) {
logger->error("No FPGA plugin found"); logger->error("No FPGA plugin found");
exit(1); exit(1);