ni / niveristand-custom-device-development-tools

LabVIEW VIs providing common functionality used by multiple VeriStand custom devices.
MIT License
18 stars 9 forks source link

Custom device serialization utilities #29

Closed rtzoeller closed 3 years ago

rtzoeller commented 3 years ago

What does this Pull Request accomplish?

Create a new library for serializing and deserializing custom devices. This is intended as a replacement for the existing import/export utility, although as a reimagination of the library rather than a drop-in substitute.

The library builds and installs to vi.lib like other libraries in this repository, and includes a starting palette.

Why should this Pull Request be merged?

We are exploring a more robust serialization and deserialization library. This is the first effort.

What testing has been done?

Hand testing of the library in both online (in VeriStand) and offline (in LabVIEW) contexts.

What work remains?

niveristand-diff-bot commented 3 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.

Custom Device Serialization.lvlib--Add BaseNodeType Child.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Add%20BaseNodeType%20Child.vi.png)
Custom Device Serialization.lvlib--Export.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Export.vi.png)
Custom Device Serialization.lvlib--Force Remove Item.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Force%20Remove%20Item.vi.png)
Custom Device Serialization.lvlib--Get Item Name.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Get%20Item%20Name.vi.png)
Custom Device Serialization.lvlib--Get System Definition Schema Path.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Get%20System%20Definition%20Schema%20Path.vi.png)
Custom Device Serialization.lvlib--Import as Child.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Import%20as%20Child.vi.png)
Custom Device Serialization.lvlib--Import in Place.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Import%20in%20Place.vi.png)
Custom Device Serialization.lvlib--Import.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Import.vi.png)
Custom Device Serialization.lvlib--Item Ref to BaseNodeType.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Item%20Ref%20to%20BaseNodeType.vi.png)
Custom Device Serialization.lvlib--Load BaseNodeType from System Storage File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Load%20BaseNodeType%20from%20System%20Storage%20File.vi.png)
Custom Device Serialization.lvlib--NI VeriStand - Visually Update the System Explorer Tree.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--NI%20VeriStand%20-%20Visually%20Update%20the%20System%20Explorer%20Tree.vi.png)
Custom Device Serialization.lvlib--Remove Broken Mappings.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Remove%20Broken%20Mappings.vi.png)
Custom Device Serialization.lvlib--Rename BaseNodeType if not Empty.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Rename%20BaseNodeType%20if%20not%20Empty.vi.png)
Custom Device Serialization.lvlib--Reroll BaseNodeType Identifiers.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Reroll%20BaseNodeType%20Identifiers.vi.png)
Custom Device Serialization.lvlib--Save BaseNodeType to System Storage File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-custom-device-development-tools/PR-29/2021-01-20/12%3A18%3A46/Custom%20Device%20Serialization.lvlib--Save%20BaseNodeType%20to%20System%20Storage%20File.vi.png)
rtzoeller commented 3 years ago

@buckd previously we've had custom devices install error codes to <Program Files>\National Instruments\Shared\LabVIEW Run-Time\<LabVIEW version>, rather than <Program Files>\National Instruments\Shared\Errors, because the year-versioned path makes it easier to install one error file per package which removes the need for a common package.

It seems like there is an IDE-specific location, <LabVIEW>\resource\errors, which also can hold error files.

How do you feel about us installing the error file for this repository twice? Once to <Program Files>\National Instruments\Shared\LabVIEW Run-Time\<LabVIEW version>, to cover built applications, and once to <LabVIEW>\resource\errors, to cover the IDE use case? The alternative would be to create another package to install common error files to <Program Files>\National Instruments\Shared\Errors.

buckd commented 3 years ago

@rtzoeller I'm fine installing it to both locations.

rtzoeller commented 3 years ago

Does this give an error when closing if the ref is invalid?

No.

Can you put a note about why this only works in certain versions (and the earliest version where it shouldn't be broken)?

Done.