ni / niveristand-communications-bus-template

Template custom device for using communications buses in VeriStand
http://www.ni.com
MIT License
0 stars 3 forks source link

Add example of dynamic RTM entries with Timing section #138

Closed Karl-G1 closed 2 years ago

Karl-G1 commented 2 years ago

What does this Pull Request accomplish?

Why should this Pull Request be merged?

I was looking for a way to implement Dynamic menu items like you can specify in the Custom Device XML. Because the RTM Wrapper is already building a custom menu item, I extended the wrapper VIs to allow programmatic disabling of menu items. From there, two things were needed: 1) the ability to call scripting VIs in the Dispatcher class and 2) remove the 'first call' logic to dynamically rebuild the menu items each time the page is loaded.

As an example of these changes, I started implementing support for the "timing channels" recently added to the ARINC 429 Custom Devices. These were implemented with 4x RTM VIs (2 in support, 2 in CD) and a new section in the CD XML. This approach lets the CD Project and CD XML stay relatively uncoupled with the RTM implementation.

What testing has been done?

Manually test the RTM items in System Explorer. image

niveristand-diff-bot commented 2 years ago

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.

Communication Bus Template Scripting.lvlib--Add Timing Section.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20Scripting.lvlib--Add%20Timing%20Section.vi.png)
Communication Bus Template Scripting.lvlib--Constants.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20Scripting.lvlib--Constants.vi.png)
Communication Bus Template Scripting.lvlib--Get Frame Port Reference.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20Scripting.lvlib--Get%20Frame%20Port%20Reference.vi.png)
Communication Bus Template Scripting.lvlib--Get Timing Section Reference.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20Scripting.lvlib--Get%20Timing%20Section%20Reference.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--Add Timing Channels RTM.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--Add%20Timing%20Channels%20RTM.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Menu Item VI.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Item%20VI.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Owning Custom Device Ref.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Owning%20Custom%20Device%20Ref.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Page VI.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Page%20VI.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--Timing.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--Timing.vi.png)
Communication Bus Template System Explorer.lvlib--Interfaces.lvlib--System Explorer Dispatcher.lvclass--Get Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Interfaces.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--Parse Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--Parse%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--RunTimeMenu Custom Population.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/14%3A06%3A55/Communication%20Bus%20Template%20System%20Explorer.lvlib--RunTimeMenu%20Custom%20Population.vi.png)
niveristand-diff-bot commented 2 years ago

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.

Communication Bus Template Scripting.lvlib--Add Timing Section.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20Scripting.lvlib--Add%20Timing%20Section.vi.png)
Communication Bus Template Scripting.lvlib--Constants.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20Scripting.lvlib--Constants.vi.png)
Communication Bus Template Scripting.lvlib--Get Frame Port Reference.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20Scripting.lvlib--Get%20Frame%20Port%20Reference.vi.png)
Communication Bus Template Scripting.lvlib--Get Timing Section Reference.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20Scripting.lvlib--Get%20Timing%20Section%20Reference.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--Add Timing Channels RTM.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--Add%20Timing%20Channels%20RTM.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Menu Item VI.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Item%20VI.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Owning Custom Device Ref.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Owning%20Custom%20Device%20Ref.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--System Explorer Dispatcher.lvclass--Get Page VI.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Page%20VI.vi.png)
Communication Bus Template System Explorer.lvlib--Implementation.lvlib--Timing.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Implementation.lvlib--Timing.vi.png)
Communication Bus Template System Explorer.lvlib--Interfaces.lvlib--System Explorer Dispatcher.lvclass--Get Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Interfaces.lvlib--System%20Explorer%20Dispatcher.lvclass--Get%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--Parse Menu Items.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--Parse%20Menu%20Items.vi.png)
Communication Bus Template System Explorer.lvlib--RunTimeMenu Custom Population.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-138/2022-07-07/15%3A10%3A53/Communication%20Bus%20Template%20System%20Explorer.lvlib--RunTimeMenu%20Custom%20Population.vi.png)
rtzoeller commented 2 years ago
Karl-G1 commented 2 years ago
  • [ ] Not sure how I feel about the highlight parameter on Add Timing Section.vi. Do we have precedent for this elsewhere?

I was staying consistent with other VIs in the scripting API like Add Ports Section.vi and Add Databases Section. However, I haven't seen them implemented with a highlight input on the actual CDs we branched from the template.

rtzoeller commented 2 years ago

That's fine then.