Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export signalFilter to ssp #985

Merged
merged 18 commits into from
Mar 16, 2021
Merged

Conversation

arun3688
Copy link
Contributor

Related Issues

#865

Purpose

This PR exports signal filters to an external xml file "signalFilter.xml" in ssp which is stored in the resources directory and referenced in ssd file. If no signal Filters are used the default signal filter is set to all ".*"

Example

signalFilter.xml

<?xml version="1.0" encoding="UTF-8"?>
<oms:SignalFilter version="1.0">
	<oms:Variable name="model.root.Gain.u" type="Real" kind="input" />
	<oms:Variable name="model.root.Gain.k" type="Real" kind="parameter" />
	<oms:Variable name="model.root.System2.Input_1" type="Real" kind="input" />
</oms:SignalFilter>

@arun3688 arun3688 requested a review from lochel March 10, 2021 15:36
@arun3688
Copy link
Contributor Author

@lochel , This should be merged

testsuite/OMSimulator/importStartValues.lua Show resolved Hide resolved
Comment on lines +382 to +386
else
{
// delete ssv node from <oms:snapshot> if flag not set
snapshot.deleteResourceNode("resources/" + std::string(this->getCref()) + ".ssv");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we generate the node in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is because of the current signature of exportToSSD(pugi::xml_node& node, pugi::xml_node& ssvNode, Snapshot& snapshot), And this should be changed when we restructure the exportToFile to use snapshot interface

src/OMSimulatorLib/Model.cpp Show resolved Hide resolved
src/OMSimulatorLib/Model.cpp Outdated Show resolved Hide resolved
testsuite/api/test03.py Show resolved Hide resolved
@lochel lochel mentioned this pull request Mar 15, 2021
4 tasks
@lochel lochel enabled auto-merge (squash) March 16, 2021 09:27
@lochel lochel merged commit b938646 into OpenModelica:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants