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

ConnectString: also allow pipe as a connection target

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2023-02-08 10:31:52 +01:00
parent dbd496c2c6
commit cbad1ca9d1

View file

@ -63,7 +63,7 @@ void fpga::ConnectString::parseString(std::string& connectString)
return;
}
static const std::regex regex("([0-9]+)([<\\->]+)([0-9]+|stdin|stdout)");
static const std::regex regex("([0-9]+)([<\\->]+)([0-9]+|stdin|stdout|pipe)");
std::smatch match;
if (!std::regex_match(connectString, match, regex) || match.size() != 4) {
@ -92,7 +92,7 @@ void fpga::ConnectString::parseString(std::string& connectString)
int fpga::ConnectString::portStringToInt(std::string &str) const
{
if (str == "stdin" || str == "stdout") {
if (str == "stdin" || str == "stdout" || str == "pipe") {
return -1;
} else {
const int port = std::stoi(str);