Base reference: An extension of LabVIEW object that has defined methods for creating and destroying the object as well as signaling updates. Sends Update and Destroy events using LabVIEW Events and can be interacted with by reference.
Loop reference: An extension of Base Reference that has a overrideable Loop.vi method that is launched and closed by the framework, making for speedy asynchronous processes.
Providing this additional structure gives some great advantages:
- Common understanding: Sharing vocabulary around these common methods and knowing how they're used helps your team communicate more efficiently.
- Faster development: Wrapping patterns like asynchronous calls lets you focus on application-specific code rather than dealing with the mechanics of parallel processes.
- Tooling: With common interfaces it is easier to write tooling to interact with these objects. Read more about that below.
LabVIEW has tended toward by-value development. Many of the established LabVIEW frameworks incorporate queues and messaging, which give some by-reference attributes. For Transom, we were looking for something more fully by-reference. By doing so, we get the following benefits:
- Synchronous execution: Queue- and messaging-based architectures introduce a break in timing when one component messages another. If there's a response, it's also sent by message and introduces an additional delay. When calling a method by-reference in Transom, the call happens synchronously with the code that's calling it.
- Ready access: Other frameworks prescribe careful control of message queues. They can be built around a caller-callee structure that can make message routing tedious. Transom encourages ready distribution of references to allow easy access for your business logic.
- Inheritance: Some frameworks build on producer-consumer models and aren't class-based. Transom allows you to build a clean hierarchy of classes that give the full benefit of inheritance. The addition of native interfaces in LabVIEW 2020 lets you take even more advantage of inheritance.
Tool: Reference Monitor
Monitor and interact with your Transom classes while the program runs. Reference Monitor lets you easily:
- Know which references currently exist
- Remotely destroy existing references
- See debug trace events to help troubleshoot execution
- Open the diagram or front panel of Loop.vi overrides
Tool: Reference Builder
LabVIEW 2020 provided some great improvements to the class properties dialog. Transom furnishes a separate class builder tool that lets you edit and extend classes in an even more user-friendly way. It allows you to:
- Quickly create override methods
- Apply color-themed glyphs directly to the icon with a double-click
- Apply color-themed library labels and wire colors
- Add children of Base Reference or Loop Reference directly
- Add VI documentation directly