Sign Up

NI State Pattern Actor by NI - Toolkit for LabVIEW Download

Contains a framework and examples for implementing the state pattern in Actor Framework

Watch * 0 ↓1,968
 logo
Version1.1.0.10
ReleasedAug 25, 2016
Publisher NI
License NI Sample Code License (NI SCL)
LabVIEW VersionLabVIEW>=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

Release Notes

1.1.0.10 (Aug 25, 2016)

Two changes to State Actor.lvclass.

Entry.vi and Exit.vi are no longer marked "child class must override". That proved to be overly restrictive.

Actor Core.vi now calls Exit.vi just before exiting.


Download Package

Versions

  Post an Idea   Post a Resource

Recent Posts