GDS(Goop Development Suite)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use interfaces in GDS?

Hi!

I am trying to understand interfaces usage in GDS.Here is my question: I created bunch of classes all sharing common parent (say BaseClass) and implemented ITest interface in only some of them. In runtime i have array of this classes. How can i programatically find out which of them implements ITest so i can treat it in some different way from the ones that don't implement ITest? Thanks

0 Kudos
Message 1 of 5
(9,462 Views)

There are 2 Interface support types that are supported in the latest version of OpenGDS. If you're not using that version you only have one implementation.

This is the type I call Interface by Aggregation,this type could be an issue to use if you use By value classes though.

Now back to your question.

One way to check if a class impements an interface, is to check if all the method names the interface has exists in the class.

You can do that by checking if the VI is in memory: <Classname>.lvclass:<InterfaceMethod>.vi

BTW, I'm about to do a video presentation of these two Interface implementation.

//Mike

0 Kudos
Message 2 of 5
(7,641 Views)

Thank you Mike

How exactly do I do that

Is there a vi that will tell me that?

Also can open gds be installed side by side with ni version?

Vlad

Sent from my iPhone

0 Kudos
Message 3 of 5
(7,641 Views)

Soemthing like this:

MethodExists.png

OpenGDS will be sitting next to NI’s GDS, but will disable the NI’s GDS, by overwriting the Provider-ini files that tells LV which provide to load

(LabVIEW 20XX\resource\Framework\Providers\GProviders\GOOP_*.ini).

The OpenGDS is the same code base than NI’s version, but with more bug fixes and some new features, my goal is to push the latest version of OpenGDS into the NI repository.

0 Kudos
Message 4 of 5
(7,641 Views)

Here is a demo using Interface By VI Server.

I've disconnected the Common VIs from the addons-folder, so you don't need to have GDS installed to test this.

Message 5 of 5
(7,641 Views)