Skip to content

Commit b66409d

Browse files
committed
Fix signal filter regex matching in ComponentTable
In ComponentFMUCS, ComponentFMUME the regex in addSignalsToResults and removeSignalsFromResults is matched against the full cref of the signal, e.g. model.root.component.signal. In ComponentTable, the regex was matched against the signal name only. This commit fixes this inconsistency by updating the ComponentTable implementations to match against the full cref of the signal.
1 parent 81bd489 commit b66409d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/OMSimulatorLib/ComponentTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ oms_status_enu_t oms::ComponentTable::addSignalsToResults(const char* regex)
394394
if (x.second)
395395
continue;
396396

397-
if (regex_match(std::string(x.first), exp))
397+
if (regex_match(std::string(getFullCref() + x.first), exp))
398398
x.second = true;
399399
}
400400

@@ -409,7 +409,7 @@ oms_status_enu_t oms::ComponentTable::removeSignalsFromResults(const char* regex
409409
if (!x.second)
410410
continue;
411411

412-
if (regex_match(std::string(x.first), exp))
412+
if (regex_match(std::string(getFullCref() + x.first), exp))
413413
x.second = false;
414414
}
415415

0 commit comments

Comments
 (0)