LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2OO Implementation

 Hi,

 

I am trying to implement LV2OO style global using the Visitor pattern example provided in this document.

 

Simulate_LV.vi shows the way I normally use LV2 globals. Simulate_LV2OO.vi is how I have used visitor pattern to implement the same functionality using visitor pattern.

 

I would like to know whether this is the correct implementation and if there a better way to do this?

 

Thanks.

 

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
Message 1 of 5
(3,166 Views)
Can you save it as 8.5?  I would like to see your implementation.
>

"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 2 of 5
(3,128 Views)

Hi,

 

LabVIEW 8.5 version attached.

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 3 of 5
(3,125 Views)

Very interesting.  I really want to use the LV2OO methods, but I'm still really having trouble understanding how they are easier or better.

 

To quote Stephen Mercer: "I am tired of writing LV2-style globals. These globals are great – very dataflow efficient, very easy to

understand. But you have to duplicate the VI every time you want to support a different data type. I figured

there had to be a better way. I’ve been thinking about this implementation for a while. It may not be optimal,

but I think it is an excellent starting point."

 

I understand his sentiments, but the LV2OO implementation looks a lot more complicated to me.  Just look at how many vi's had to be written.  The LV2 style is sooo much easier.

 

Would anyone like to comment?

>

"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
Message 4 of 5
(3,091 Views)

vt92 wrote:

 

I understand his sentiments, but the LV2OO implementation looks a lot more complicated to me.  Just look at how many vi's had to be written.  The LV2 style is sooo much easier.


It is rather too big compared to a simple Get/Set LV2 Style. That's one of the reasons that prompted me to start this thread Smiley Happy

 

But if you have a complex multifunctional LV2 global, then I guess it will be wise to use LV2OO approach. I am yet to try out the performance implications of LV2OO method.

 

Anyway I've decided to use LV2OO so that I can understand LabVOOP concepts better.

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 5 of 5
(3,079 Views)