You are on page 1of 18

1

Practical Examples of LVOOP Classes and Their Uses


Mark Yedinak Staff Engineer

Introduction
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


6

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
7

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
10

Connection class

11

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
12

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

13

Application Demo
Tying it all together

14

Tree control class


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

15

Tree class demonstration


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

16

Q&A

17

18