aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorLars Amsel <lars.amsel@ni.com>2021-07-13 11:34:53 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-07-14 16:19:36 -0500
commit16137f1dd5390a2321b5597c3a820dee45c10526 (patch)
tree6ed5a1d07f0dc8708d02039ae50d1dd755ffbdf7 /host/include
parentf47df4d1a83289043ef40469141aaa03d0c60d35 (diff)
downloaduhd-16137f1dd5390a2321b5597c3a820dee45c10526.tar.gz
uhd-16137f1dd5390a2321b5597c3a820dee45c10526.tar.bz2
uhd-16137f1dd5390a2321b5597c3a820dee45c10526.zip
rfnoc: fix block id check to allow underscore
We allow underscore in RFNoC's block names but the regular expressions only allowed the underscore in the block name RE. This fix adds the underscore to the block id RE as well as adapts the unit tests accordingly.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/constants.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/include/uhd/rfnoc/constants.hpp b/host/include/uhd/rfnoc/constants.hpp
index e059a5215..68833430c 100644
--- a/host/include/uhd/rfnoc/constants.hpp
+++ b/host/include/uhd/rfnoc/constants.hpp
@@ -90,6 +90,6 @@ static const size_t MAX_NUM_PORTS = 16;
// Regular expressions
static const std::string VALID_BLOCKNAME_REGEX = "[A-Za-z][A-Za-z0-9_]*";
static const std::string VALID_BLOCKID_REGEX =
- "(?:(\\d+)(?:/))?([A-Za-z][A-Za-z0-9]*)(?:(?:#)(\\d\\d?))?";
+ "(?:(\\d+)(?:/))?([A-Za-z][A-Za-z0-9_]*)(?:(?:#)(\\d\\d?))?";
}} /* namespace uhd::rfnoc */