mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
add API for createCards without std::filesystem
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
033634ac47
commit
542132de92
2 changed files with 20 additions and 5 deletions
|
@ -18,11 +18,18 @@ std::shared_ptr<fpga::Card>
|
|||
setupFpgaCard(const std::string &configFile, const std::string &fpgaName);
|
||||
|
||||
std::shared_ptr<fpga::Card>
|
||||
createCard(json_t *config, std::filesystem::path &searchPath,
|
||||
createCard(json_t *config, const std::filesystem::path &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer,
|
||||
std::string card_name = "anonymous Card");
|
||||
int createCards(json_t *config, std::list<std::shared_ptr<fpga::Card>> &cards,
|
||||
std::filesystem::path &searchPath, std::shared_ptr<kernel::vfio::Container> vfioContainer = nullptr);
|
||||
|
||||
int createCards(
|
||||
json_t *config, std::list<std::shared_ptr<fpga::Card>> &cards,
|
||||
const std::filesystem::path &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer = nullptr);
|
||||
int createCards(
|
||||
json_t *config, std::list<std::shared_ptr<fpga::Card>> &cards,
|
||||
const std::string &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer = nullptr);
|
||||
|
||||
std::shared_ptr<std::vector<std::shared_ptr<fpga::ip::Node>>>
|
||||
getAuroraChannels(std::shared_ptr<fpga::Card> card);
|
||||
|
|
|
@ -226,7 +226,7 @@ void fpga::setupColorHandling()
|
|||
}
|
||||
|
||||
std::shared_ptr<fpga::Card>
|
||||
fpga::createCard(json_t *config, std::filesystem::path &searchPath,
|
||||
fpga::createCard(json_t *config, const std::filesystem::path &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer,
|
||||
std::string card_name) {
|
||||
auto configDir = std::filesystem::path().parent_path();
|
||||
|
@ -257,7 +257,7 @@ fpga::createCard(json_t *config, std::filesystem::path &searchPath,
|
|||
|
||||
int fpga::createCards(json_t *config,
|
||||
std::list<std::shared_ptr<fpga::Card>> &cards,
|
||||
std::filesystem::path &searchPath,
|
||||
const std::filesystem::path &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer) {
|
||||
int numFpgas = 0;
|
||||
if (vfioContainer == nullptr) {
|
||||
|
@ -284,6 +284,14 @@ int fpga::createCards(json_t *config,
|
|||
return numFpgas;
|
||||
}
|
||||
|
||||
int fpga::createCards(json_t *config,
|
||||
std::list<std::shared_ptr<fpga::Card>> &cards,
|
||||
const std::string &searchPath,
|
||||
std::shared_ptr<kernel::vfio::Container> vfioContainer) {
|
||||
const auto fsPath = std::filesystem::path(searchPath);
|
||||
return createCards(config, cards, fsPath, vfioContainer);
|
||||
}
|
||||
|
||||
std::shared_ptr<fpga::Card> fpga::setupFpgaCard(const std::string &configFile,
|
||||
const std::string &fpgaName) {
|
||||
auto configDir = std::filesystem::path(configFile).parent_path();
|
||||
|
|
Loading…
Add table
Reference in a new issue