README
Transport abstracts the movement of data between locations.
Important Semantics
Constructors are always concrete and therefore know specific details about the Transport being constructed. They often check for validity of inputs to ensure the requester won't be disappointed later. The requester calls concrete "Construct..." and then shares its Transport object with the sender (you or some framework decide how). A Transport Constructor may return any number of specific errors that are intended to preempt unexpected failures at the write end. (bad refnums, incompatible types, bad format strings, etc.)
Transport Data.vi has standard error in/out functionality. Any errors generated by concrete Transport Data will be returned as code 517002 so the sender can implement consistent error-handling semantics across types and also be easier to debug. (Sender does not depend on type specifics, which is required for DIP and LSP compliance)
Abstract Transport.lvclass:Transport Data.vi returns error if called at run-time because abstract Transport makes no sense for a runnning application. Transport is the glue that holds an application together. Abstract glue at run-time produces a bunch uf useless, disconnected pieces.
Transport Types
ITransport
This class defines an interface that all descendants must implement. Transport writers should depend on this interface.
TerminalPropertyBinding
Abstract ancestor of several terminal-based transports. (Has a non-specific control refnum)
Concrete Implementations
- ActorMessageTransport - Transport data into an Actor's core (concrete message override required)
- BooleanTextBinding - Bind the Boolean Text property of a button to a value using a format string
- ConfigurationFileBinding - Persist a value to a LabVIEW INI file
- EventTransport - Transport a value into an event structure
- FormattedStringBinding - Bind a string control or indicator to a value using a format string
- ListboxItemNamesBinding - Bind a single-column listbox's ItemNames property to a 1-D sting array
- MCListboxItemNamesBinding - Bind a multicolumn listbox's ItemNames property to a 2-D string array
- NotifierTransport - Transport data using a notifier
- PersistToDiskTransport - Persist anything to a folder to be recovered later (user preferences, last values, etc.)
- QueueTransport - Transport values using a queue
- RingStringsBinding - Bind the strings displayed in a ring control to a 1-D string array
- StreamToDiskTransport - Stream time and value to a TDMS file (#notelegant use of TDMS)
- TerminalCaptionBinding - Bind a string control or indicator's caption to a string value (localization, etc.)
- TerminalEnableStateBinding - Bind the enabled state (enabled, disabled, disabled & grayed out) of a terminal to a Boolean or Numeric value
- TerminalSignalingValueBinding - Transport a value to a control or indicator and trigger the terminal's value change event
- TerminalValueBinding - Effieciently transport a value to a control or indicator (no signaling, best performance)
- TerminalVisibilityBinding - Bind the visible state of a control or indicator to a Boolean or Numeric value
- ValueReferenceTransport - Transport a value by DVR
Addional Info
How do I get set up?
- Install this package using GPM and start coding
Examples
- The automated tests located in the open-source repo (linked by GPM) illustrate basic use and semantics of the transport types.
Dependencies
- A few concrete implementations in this package depend on @cs/variant and @cs/composed-af-messages
- These dependencies will be automatically installed by GPM
Contribution guidelines
- Please contact the author if you want to contribute.
- Issues and bug reports appreciated via the linked issue tracker.
Who do I talk to?
- Ethan Stern | Composed Systems, LLC
- ethan.stern@composed.io
License
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[Unreleased]
Added
Changed
Deprecated
Removed
Fixed
Security
[0.0.4] - 2019-09-12
Fixed
- FormattedStringBinding and BooleanTextBinding allow empty format string without returning constructor errors (writes using empty format string follow standard LabVIEW Format into String rules).
[0.0.3] - 2019-09-09
Changed
- ActorMessageTransport's Notification Msg now has all DD methods. This is for backward compatibility in MVA Framework and will be removed in a future release. Do not override any Notification Msg methods.
[0.0.2] - 2019-08-06
Added
- Additional API documentation to Readme (No source code changes)
[0.0.1] - 2019-08-05
Fixed
- Error semantics now consistent across all types. Failure to write = 517002 (explanations vary by type), All implementations of Transport Data.vi have standard error in/out functionality (upstream error causes no-op and propagates error through unaltered)
[0.0.1.beta] - 2019-08-02
Changed
- Whitelisted only source folder (omits tests from installed package)
[0.0.0.beta] - 2019-08-01
Added
- Everything. Some error semantics known to be inconsistent but, hey, it's a beta. Interfaces are stable. Look for a proper release soon.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.