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

lib/card: lookup IP by identifier

This commit is contained in:
Daniel Krebs 2018-06-04 13:51:58 +02:00
parent 967e39e36c
commit a1daf95202
2 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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)