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

Replace the XPath overrides with a more intuitive syntax, add support for properties #18

Merged
merged 18 commits into from
Nov 12, 2018

Conversation

rtzoeller
Copy link
Contributor

What does this Pull Request accomplish?

Replace the existing XPath-based overrides system with a cleaner syntax, and add support for reading properties from the configuration file. The result is a cleaner system for overrides, and a solution to the existing problem of getting setup-specific information not included in the system definition, e.g. the FPGA IP used in the SLSC loopback tests.

Why should this Pull Request be merged?

The existing XPath configuration method assumes the user is intimately familiar with the system definition file format, as well as XPath queries, and provides many opportunities for error. The new syntax is more intuitive, and more directly maps to the system definition explorer.

An example configuration file is shown below.

[Overrides]
"Targets/Controller/IP Address" = "10.2.64.29"
"Targets/Controller/Loop Rate" = 100

[Properties]
"FPGA Loopback IP" = "10.2.64.30"

What testing has been done?

  • The existing test to open and close a VeriStand connection now also reads a singular property.
  • A test has been written to ensure overrides are applied to a system definition correctly.

rtzoeller and others added 14 commits November 6, 2018 12:51
The overrides are specified with the syntax demonstrated below.

[Overrides]
"Targets/Controller/IP Address" = "10.2.64.29"
"Aliases/DoNotAllowUnmappedAliases" = "false"
"Targets/Controller/Hardware/Chassis/Timing and Sync/Chassis TimeSync/user.CD.Priority1" = "64"
We want a 1D array, not a 2D array
This API is intended to be less verbose than using the SystemDefinition API directly, while allowing for dropping into the SystemDefinition API as needed. A test has been added which uses the getters to validate overrides were applied properly.
…tion to call common private methods. Added ConfigureSystemDefinitionFile to utilities.
@rtzoeller rtzoeller requested review from csjall and buckd November 8, 2018 22:38
@niveristand-diff-bot
Copy link
Collaborator

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

VeriStandTestCase.lvclass--4q4y0a_PatchSystemDefinitionFile.vi.png: capture

VeriStandTestCase.lvclass--aJhdsa_OpenVeriStandConnection.vi.png: capture

VeriStandTestCase.lvclass--fdvMnc_BenchmarkSystemDefinition.vi.png: capture

VeriStandTestCaseTests.lvclass--UP56Jb_testOpenCloseVeriStandConnection.vi.png: capture

VeriStandTestUtilities.lvlib--4Ddfwb_QueryDAQHardware.vi.png: capture

VeriStandTestUtilities.lvlib--7agktc_SaveSystemDefinitionFile.vi.png: capture

VeriStandTestUtilities.lvlib--A04Na9_ConfigureTarget.vi.png: capture

VeriStandTestUtilities.lvlib--e7vGJa_ReadSystemDefinitionOverrideFile.vi.png: capture

VeriStandTestUtilities.lvlib--Ewtcya_QueryHardware.vi.png: capture

VeriStandTestUtilities.lvlib--FeaeJa_GenerateOverriddenSystemDefinition.vi.png: capture

VeriStandTestUtilities.lvlib--Gtc1ab_QueryCustomDevices.vi.png: capture

VeriStandTestUtilities.lvlib--hOXiBa_QueryTimingAndSyncHardware.vi.png: capture

VeriStandTestUtilities.lvlib--nRzCyb_ParseSystemDefinitionFile.vi.png: capture

VeriStandTestUtilities.lvlib--w5jBcb_QueryTarget.vi.png: capture

@rtzoeller
Copy link
Contributor Author

There are a few VIs which still use XPath in their implementation, e.g. GetTargetIPAddresses.vi and GetExecutionMode.vi. I can do the work to retrofit them now, but I'm okay with leaving them as is for now to keep the already large pull request from growing larger if preferred.

Copy link
Collaborator

@csjall csjall left a comment

Choose a reason for hiding this comment

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

  • Set "VI in" terminal on PatchSystemDefinition.vi to required.
  • D.R.Y. Call SaveSystemDefinitionFile.vi in GenerateOverriddenSystemDefinition.vi to save your changes.

image

@rtzoeller rtzoeller added the enhancement New feature or request label Nov 9, 2018
The file now can also specify properties; overrides.ini is misleading.
@niveristand-diff-bot
Copy link
Collaborator

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

VeriStandTestCase.lvclass--9Osx1b_BenchmarkSystemDefinition.vi.png: capture

VeriStandTestCase.lvclass--CMwQDa_MakePathsAbsoluteWithDefaults.vi.png: capture

VeriStandTestCase.lvclass--Nq5HB9_PatchSystemDefinitionFile.vi.png: capture

VeriStandTestCase.lvclass--TeZHeb_OpenVeriStandConnection.vi.png: capture

VeriStandTestCaseTests.lvclass--CVLTna_testBenchmarkSystemDefinitionPasses.vi.png: capture

VeriStandTestCaseTests.lvclass--jAE1W9_testOpenCloseVeriStandConnection.vi.png: capture

VeriStandTestCaseTests.lvclass--zHMCE9_testBenchmarkSystemDefinitionFails.vi.png: capture

VeriStandTestUtilities.lvlib--5NcaWa_QueryDAQHardware.vi.png: capture

VeriStandTestUtilities.lvlib--A3hNjc_QueryCustomDevices.vi.png: capture

VeriStandTestUtilities.lvlib--bJDteb_ConfigureTarget.vi.png: capture

VeriStandTestUtilities.lvlib--FhhA88_QueryHardware.vi.png: capture

VeriStandTestUtilities.lvlib--iz2PBa_ReadSystemDefinitionOverrideFile.vi.png: capture

VeriStandTestUtilities.lvlib--O0hm9b_QueryTimingAndSyncHardware.vi.png: capture

VeriStandTestUtilities.lvlib--sbKMZ8_SaveSystemDefinitionFile.vi.png: capture

VeriStandTestUtilities.lvlib--xZdyYa_ParseSystemDefinitionFile.vi.png: capture

VeriStandTestUtilities.lvlib--YhBE4a_GenerateOverriddenSystemDefinition.vi.png: capture

VeriStandTestUtilities.lvlib--YZL7Ga_QueryTarget.vi.png: capture

@rtzoeller rtzoeller merged commit 6ae0465 into master Nov 12, 2018
@rtzoeller rtzoeller deleted the dev/intuitive_overrides branch November 12, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants