mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
move configure ips into function
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
cb53713953
commit
05f7a03909
2 changed files with 10 additions and 0 deletions
|
@ -209,6 +209,9 @@ public:
|
|||
|
||||
static std::list<IpIdentifier> parseVLNV(json_t *json_ips);
|
||||
static std::list<IpIdentifier> reorderIps(std::list<IpIdentifier> allIps);
|
||||
static std::list<std::shared_ptr<Core>>
|
||||
configureIps(std::list<IpIdentifier> orderedIps, json_t *json_ips,
|
||||
Card *card);
|
||||
|
||||
// Returns a running and checked FPGA IP
|
||||
static std::list<std::shared_ptr<Core>> make(Card *card, json_t *json_ips);
|
||||
|
|
|
@ -86,6 +86,11 @@ CoreFactory::reorderIps(std::list<IpIdentifier> allIps) {
|
|||
|
||||
return orderedIps;
|
||||
}
|
||||
std::list<std::shared_ptr<Core>>
|
||||
CoreFactory::configureIps(std::list<IpIdentifier> orderedIps, json_t *json_ips,
|
||||
Card *card) {
|
||||
std::list<std::shared_ptr<Core>> configuredIps;
|
||||
auto loggerStatic = CoreFactory::getStaticLogger();
|
||||
// Configure all IPs
|
||||
for (auto &id : orderedIps) {
|
||||
loggerStatic->info("Configuring {}", id);
|
||||
|
@ -234,6 +239,8 @@ CoreFactory::reorderIps(std::list<IpIdentifier> allIps) {
|
|||
configuredIps.push_back(std::move(ip));
|
||||
}
|
||||
|
||||
return configuredIps;
|
||||
}
|
||||
// Start and check IPs now
|
||||
for (auto &ip : configuredIps) {
|
||||
loggerStatic->info("Initializing {}", *ip);
|
||||
|
|
Loading…
Add table
Reference in a new issue