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 initial interface for RT engine #6

Closed buckd closed 4 years ago

buckd commented 4 years ago

What does this Pull Request accomplish?

Creates the Execution Unit and factory interfaces to be used by the template RT engine.

Why should this Pull Request be merged?

This interface will be used to implement the custom device engine. It will also by used for the skeleton XNET implementation.

What testing has been done?

Built and made sure the PPL is not broken and contains all the correct files.

niveristand-diff-bot commented 4 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 Interfaces.lvlib--Execution Unit.lvlib--Execution Unit Factory.lvclass--Create Execution Unit.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit%20Factory.lvclass--Create%20Execution%20Unit.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Finalize.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Finalize.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Get Identifier.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Get%20Identifier.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Initialize.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Initialize.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Read from Hardware.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Read%20from%20Hardware.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Start.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Start.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Execution Unit.lvclass--Write to Hardware.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Execution%20Unit.lvclass--Write%20to%20Hardware.vi.png)
Communication Bus Template Interfaces.lvlib--Execution Unit.lvlib--Set Channels.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-communications-bus-template/PR-6/2020-09-04/16%3A27%3A49/Communication%20Bus%20Template%20Interfaces.lvlib--Execution%20Unit.lvlib--Set%20Channels.vi.png)
buckd commented 4 years ago

In thinking more about this, Set Channels shouldn’t live in the interface. It should probably be something common to the System Explorer code so the library isn’t tied to VeriStand.

My intent in having Create Execution Unit return only a single object instead of an array of synchronous and one of asynchronous EUs is to divorce the unit from how it is scheduled by the caller. This may not be practical when we start implementing, and we may need to change it, but that was the thought behind it.

rtzoeller commented 4 years ago

In thinking more about this, Set Channels shouldn’t live in the interface. It should probably be something common to the System Explorer code so the library isn’t tied to VeriStand.

Execution Unit Factory.lvclass:Create Execution Unit.vi still makes use of the channel typedefs. Or were you envisioning separating that out as well somehow?

My intent in having Create Execution Unit return only a single object instead of an array of synchronous and one of asynchronous EUs is to divorce the unit from how it is scheduled by the caller. This may not be practical when we start implementing, and we may need to change it, but that was the thought behind it.

@buckd I'm struggling to follow this.

Why is it sufficient to return a single execution unit, rather than a list of them (w/ or w/o scheduling information)? Is the expectation that it would perform its own scheduling/asynchonous execution handling, and that the custom device would always invoke it inline?