You are on page 1of 18


Practical Examples of LVOOP Classes and Their Uses

Mark Yedinak Staff Engineer

Who is Mark Yedinak? What environment do I work in? Our development team

What problems did we need to solve?

Application wide messaging including broadcast messages Convenient methods to log data in multiple formats Common code to support multiple communication interfaces

Classes we chose to develop

Generic message class Data processing classes Message routing and route server classes General log class and derived child classes General Connection class Tree control class

Post Event Classes

Very lightweight with no direct coupling Only Two public methods
Post Message Post Status

Will work even if there are no listeners Message data is a variant


Message Router and Route Server Classes Route servers are

background tasks Routes bind messages with message handlers Messages are queue based Message routing is by name Messages can be broadcast Messages can be grouped

By Reference or By Value
Why is this necessary? When to consider using DVRs rather than By Value objects

Log class and its derived classes

Logs can be more than just files Base class provides core functionality Derived classes provide specific behaviors Each derived class extends the functionality of the class

Data processing base class

This is a Helper class to provide specific behaviors to other classes Provides the methods to process specific messages Very few methods Used with log class but not limited to that

Connection class


Connection class (continued)

Provides common API for multiple connection types Requires use of Helper classes by the base class Extends the handling of connection processing
Read/Write aborts Large file handling Posts messages which can be used for logging

Connection class (continued)

Base class handles most of the functionality Derived classes only provide the connection specific methods (Create, Configure, Open, Close, Destroy) TX-RX Helper class allows the base class to read/write the data on the specific connection


Application Demo
Tying it all together


Tree control class

Uses native LabVIEW tree control Encapsulates managing tree to improve performance Uses an internal flat representation of the tree data


Tree class demonstration

Native LabVIEW Tree (using Norms tree library) versus Zebras Implementation