ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

by Reference OO Desing

Hello!

 

I am looking for some documentation with examples about Labview by Value and by Reference OO Design. Mostly, I interested in by Ref. OO Desing.

So I would be greatfuly If you could send me some useful links, examples.

 

Thank you!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 1 of 6
(3,300 Views)

labview is normally "by value"...what you can do if you like to pass some objects by reference, you can use single-element queues or DVR (data value references) to pass your objects around in your code...just search in labview for these terms.


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 2 of 6
(3,291 Views)

You can download GOOP Development Suite, and create some classes to see the different ways of implementing this.

http://www.symbio.com/products/trial/

KEY: COMM-UNIT-YEDI-TION-2010

Here are some demos videos you can have a look at.

http://goop.endevo.net/GDS/videos/GDSFeatures
http://goop.endevo.net/GDS/videos/GettingStarted
http://goop.endevo.net/GDS/videos/GOOP4Demo

 

Cheers,

Mikael

Message 3 of 6
(3,277 Views)

Oh! Yes!!

Thanks!!!!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 4 of 6
(3,268 Views)

As a general rule, in 80 or 90% you can use the native by-val design. So don't try to make everything by-ref as in other OOP languages.

 

By-ref has two flavours (only using DVR, neglecting SEQ):

* Your private data is a DVR to a type def. All accessors use the IPE structure to access the data stored in the DVR.

* Put your object in the DVR.

There is a lot of discussion on these designs on LAVA, but of course nothing like a tutorial but an advanced brainstorming.

 

Felix

0 Kudos
Message 5 of 6
(3,261 Views)

In my case the rule "As a general rule, in 80 or 90%, you can use the native by-val design" doesn’t apply.
Were I found OO serving the best purpose is in the instrument layer (HAL), there we have around 100 classes, and there I don’t want to use by value. Normally my test application uses 10-20 different driver classes and around 5 higher level classes, plus my Top application. So for me it about 60-80% that has to be reference classes. And the 5 higher level classes usually use a Singleton design pattern so then I’m close to 90% of them being reference classes.

But this is just me. 

Cheers,

Mikael

0 Kudos
Message 6 of 6
(3,219 Views)