Commit a8ca4dc2 authored by Daniel Krebs's avatar Daniel Krebs
Browse files

lib/card: lookup IP by identifier

parent b509e870
......@@ -77,6 +77,7 @@ public:
ip::IpCore* lookupIp(const std::string& name) const;
ip::IpCore* lookupIp(const Vlnv& vlnv) const;
ip::IpCore* lookupIp(const ip::IpIdentifier& id) const;
bool
mapMemoryBlock(const MemoryBlock& block);
......
......@@ -161,6 +161,17 @@ PCIeCard::lookupIp(const Vlnv& vlnv) const
return nullptr;
}
ip::IpCore*PCIeCard::lookupIp(const ip::IpIdentifier& id) const
{
for(auto& ip : ips) {
if(*ip == id) {
return ip.get();
}
}
return nullptr;
}
bool
PCIeCard::mapMemoryBlock(const MemoryBlock& block)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment