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

Add scripting examples for import parameters configuration file and for build from cluster configuration #105

Merged
merged 15 commits into from
Jun 16, 2021

Conversation

dbendele
Copy link
Contributor

@dbendele dbendele commented Jun 10, 2021

What does this Pull Request accomplish?

Implements and documents two examples to demonstrate use of the scripting API.

Why should this Pull Request be merged?

Examples will help custom device developers and users learn and use the custom device.

What testing has been done?

Ran each example and deployed the resulting system definition (after configuring target).

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action.vi.png

capture

@dbendele dbendele marked this pull request as ready for review June 11, 2021 05:37
@dbendele dbendele requested a review from buckd as a code owner June 11, 2021 05:37
@dbendele
Copy link
Contributor Author

dbendele commented Jun 11, 2021

Note to reviewers, here's what's ready for feedback:

  • Examples for import of parameters configuration file
  • Example for build of system definition from cluster configuration
  • Automatically copy scripting build spec output to vi.lib
  • Include scripting examples in package
  • Tests specifically to verify execution of example VIs and deployment of generated system definitions

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action.vi.png

capture

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action.vi.png

capture

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action.vi.png

capture

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action.vi.png

capture

Copy link
Collaborator

@buckd buckd left a comment

Choose a reason for hiding this comment

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

  • Convert to Absolute Path.vi used in the two top-level example VIs is linked to SLSC Switch Examples.lvlib.

The file paths of the VIs in vi.lib don't look like final paths we would want, so we'll probably need to revisit the top-level files to relink them once we decide on final paths, but hopefully that won't be too bad.

@buckd
Copy link
Collaborator

buckd commented Jun 11, 2021

  • The top-level examples should not be part of the .lvlib. The subVIs should be, but if the examples are part of the library, it makes it harder for users to copy/modify that VI because they'll have to pull it out of the library first.
  • Examples and example library need source separated.

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Build New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@dbendele
Copy link
Contributor Author

dbendele commented Jun 11, 2021

  • Convert to Absolute Path.vi used in the two top-level example VIs is linked to SLSC Switch Examples.lvlib.

The file paths of the VIs in vi.lib don't look like final paths we would want, so we'll probably need to revisit the top-level files to relink them once we decide on final paths, but hopefully that won't be too bad.

Installation directory structure reflects built structure. It is pretty easy to change the example project dependencies if we later decide to change the structure. I would like to build the palette soon, and that is very coupled to the installation file structure but can be changed easily enough using the palette API. Do you have a vision for what you want the structure to look like on disk?

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Examples.lvclass--test Add Script Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@buckd
Copy link
Collaborator

buckd commented Jun 14, 2021

I don't see the point of duplicating the code for the tests. If we're going to have a test for the example code, we should just call the example VIs to generate the system definitions and then deploy those.

@buckd
Copy link
Collaborator

buckd commented Jun 14, 2021

  • In Post-Build Action.vi, either remove the labels of the constants or rename them as they have no relevance to the values stored in them. I know the comment says not to rename them, but that's for the template, not for a copy of that VI used in a different place in a custom device.
    image

@buckd
Copy link
Collaborator

buckd commented Jun 14, 2021

Installation directory structure reflects built structure. It is pretty easy to change the example project dependencies if we later decide to change the structure. I would like to build the palette soon, and that is very coupled to the installation file structure but can be changed easily enough using the palette API. Do you have a vision for what you want the structure to look like on disk?

I would imagine the ARINC 429 library, Import library, and Shared being located at VeriStand Custom Device Scripting APIs/ARINC 429 and the Ballard 429 library going to VeriStand Custom Device Scripting APIs/Ballard/ARINC 429. Again, it doesn't have to be done for this PR, unless it makes it easier on you. The main idea is to keep the generic ARINC 429 libraries separated from the Ballard library so we can reuse them for other custom devices.

This also makes it much easier to create the two separate nipkg files outlined in the design spec. If the files are in different top-level locations, it makes building the packages much easier.

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Examples.lvclass--test Add Script Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@dbendele
Copy link
Contributor Author

Installation directory structure reflects built structure. It is pretty easy to change the example project dependencies if we later decide to change the structure. I would like to build the palette soon, and that is very coupled to the installation file structure but can be changed easily enough using the palette API. Do you have a vision for what you want the structure to look like on disk?

I would imagine the ARINC 429 library, Import library, and Shared being located at VeriStand Custom Device Scripting APIs/ARINC 429 and the Ballard 429 library going to VeriStand Custom Device Scripting APIs/Ballard/ARINC 429. Again, it doesn't have to be done for this PR, unless it makes it easier on you. The main idea is to keep the generic ARINC 429 libraries separated from the Ballard library so we can reuse them for other custom devices.

This also makes it much easier to create the two separate nipkg files outlined in the design spec. If the files are in different top-level locations, it makes building the packages much easier.

Agree with vision and proposal, and as discussed offline, we will defer these moves for now. Filed #109

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Examples.lvclass--test Add Script Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

Copy link
Collaborator

@buckd buckd left a comment

Choose a reason for hiding this comment

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

  • Post-Build Action.vi doesn't run after the Examples build.

Copy link
Collaborator

@buckd buckd left a comment

Choose a reason for hiding this comment

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

Several VIs from the Shared directory are missing from the scripting API when run through the installer. I don't think that affects this PR, but it is something that needs to be fixed or else you can't run the examples.

@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Examples.lvclass--test Add Script Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@ni ni deleted a comment from niveristand-diff-bot Jun 15, 2021
@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.

Ballard ARINC 429 Scripting Examples.lvlib--Convert to Absolute Path.vi.png

capture

Ballard ARINC 429 Scripting Examples.lvlib--Open System Definition.vi.png

capture

Build New Ballard ARINC 429 Custom Device.vi.png

capture

Examples.lvclass--setUp.vi.png

capture

Examples.lvclass--tearDown.vi.png

capture

Examples.lvclass--test Add Import Deploy.vi.png

capture

Examples.lvclass--test Add Script Deploy.vi.png

capture

Import Parameters Configuration to New Ballard ARINC 429 Custom Device.vi.png

capture

Post-Build Action Scripting.vi.png

capture

Post-Build Action.vi.png

capture

@buckd buckd merged commit c20a71d into main Jun 16, 2021
@buckd buckd deleted the dev/scripting-examples branch June 16, 2021 13:21
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.

3 participants