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:
parent
967e39e36c
commit
a1daf95202
2 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue