-
Try out the new Jake: AI Coding Assistant for LabVIEW (beta)!
Get answers to questions about LabVIEW and discuss your code.
NI State Pattern Actor by NI - Toolkit for LabVIEW Download
Version | 1.1.0.10 |
Released | Aug 25, 2016 |
Publisher | NI |
License | NI Sample Code License (NI SCL) |
LabVIEW Version | LabVIEW>=13.0 |
Operating System | Windows, Mac, and Linux |
Project links | Homepage |
Description
The state pattern is a behavioral design pattern that “allow[s] an object to alter its behavior when its internal state changes. The object will appear to change its class.”[1] Use this pattern if an object must change its behavior based on its internal state (i.e. if the class has two or more modes of operation such that the mode change alters the behavior of most of the class methods). This pattern lets you avoid adding case structures that test for mode to all of your VIs, generally making for more maintainable code. This package demonstrates a straightforward way to create a family of actors that together implement the state pattern. We refer to this collection of actors as a State Pattern Actor.
This package adds a new actor, called State Actor, to your user.lib folder. It also adds the State Pattern Actor project to your list of available sample projects.
[1] Gamma, Helm, Johnson, and Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, 1994, p. 305