LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data architecture

Hello all,

I am building a test stand and I would like some advice on the architecture, particulary regarding the data reporting and storage.

The test data is coming from various sources: DAQmx, RS-232, VISA, CAN, etc.  (Please see the attached diagram)

The question is how to structure the data so that the data from all these sources can be compiled into the various storage and reporting formats.  LVOOP seems the obvious answer and I am reasonably familiar with using classes, but I'm not really sure how to structure the classes. 

Should each data set be a class?  Each report a class? 

It gets confusing for me since the data is in pieces and compiling these pieces together seems very tedious for all of the file report and storage formats.

Any advice would be appreciated.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 1 of 2
(1,876 Views)

Don't overcomplicate it. From what you've drawn, all you need is some simple VIs (Report.vi and Storage.vi.) that take the super-cluster 'TEST DATA SETS' and a selector (type defed enum) to only save/report what needs to be done.

Then you can start OOPing whith thinking about what an abstract class storage might implement and which further implementations you'll need in an concrete class full storage. And if this kind of inheritance will give you a benefit.

 

Also think about the data. Is encapsulation needed (or natural) and to what degree (Cluster, Action Engine, Object)? Does it needs methods -> LVOOP?

 

To be very short on the modelling level (like uml), a 'class' consists of parents (enherited attributes and methods), attributes (=the data) and methods (functions operating on the data). Get a good balance of these three vectors (inheritance, methods and attributes) will result in good OOP code. If you don't find a reason for inheritance, you propably better use a cluster (I find it overarchitected to have a class Integer with private data int and an add(int) method).

 

Felix

Message 2 of 2
(1,849 Views)