03-15-2016 04:36 PM
I have been creating classes and coding "labview native style" for a few years now, but this GOOP stuff has me completely overwhelmed. My problem is that I am an electrical engineer and not a computer scientist.
I really want to separate my user interface from my application processes (like in Jorgen's tutorial white paper found at the NI site) and I really want the power of using references to objects without having to pass the whole object around.
So what I need is some actual working code (Like the counter example in the Active Object video) that I can use to get the big picture. It would be nice if the installation came with some example code from the tutorials and the videos..
Does anyone have any links to good code examples made with GOOP?
Thanks!
03-16-2016 04:54 AM
Overwhelmed by GOOP? Relax and take a look at http://jki.net/state-machine-objects!
03-16-2016 09:01 AM
Thank you Whitenoiz:
But I do not think this is what I am looking for at all. I am quite experienced at creating state machines in LV.
What draws me to GOOP is the ability to easily access objects by reference rather than passing the entire object around. I like the object creation tools so far, and I want to be able to more easily separate my UI from the application code. (this is what I really want an example of, where the UI is NOT the main vi but is a subvi and stands alone.
One question i have is if creating user events, labview style is still the best method of passing events, commands, and parameters to GOOP objects or is there a better method.
03-16-2016 09:37 AM - edited 12-28-2016 05:39 PM
argolds wrote:
Thank you Whitenoiz:
But I do not think this is what I am looking for at all. I am quite experienced at creating state machines in LV.
What draws me to GOOP is the ability to easily access objects by reference rather than passing the entire object around. I like the object creation tools so far, and I want to be able to more easily separate my UI from the application code. (this is what I really want an example of, where the UI is NOT the main vi but is a subvi and stands alone.
One question i have is if creating user events, labview style is still the best method of passing events, commands, and parameters to GOOP objects or is there a better method.
The following blogpost shows a way to wrap by value classes in a QMH, you could continue to use the classes that you are already familiar with and use the QMH as a wrapper that gives you an API to communicate with your classes that is neither by val nor by reference. Check it out:
http://delacor.com/hal-in-your-dqmh-2/
03-16-2016 04:32 PM
You have 2 design patterns added here:
03-17-2016 03:53 PM
Thank you Fabiola:
I have been following this up with Chris Roebuck and got him to port the demo to LV2014 for me.
I have now installed DQMH and am learning about it using the HAL demo (which is close to what I want to do). However I really am looking for GOOP examples because I want to pass references rather than objects around.
But neither QMH nor DQMH templates are based on GOOP, or use references to pass objects (as far as I can see at first glance).
So, the question is will using the QMH/DQMH templates stop me from using the GOOP methodology? Perhaps the templates can be thought of as pattern, but I would need to re-create the classes GOOP style?
What do readers think?
03-17-2016 04:04 PM
What is your definition of GOOP? How are you "passing references"?
By ref:
You can wrap objects in a DVR. Or your objects can contain DVRs.
03-17-2016 04:27 PM
The command example seems to have a number of dependencies that I do not have installed.
I tend to try not to load up my LV with too many dependencies due to issues with chasing revisions and sharing code. If someone tries to get me to use their code with too many dependencies, I generally say thanks but no thanks... the closer to vanilla LV, in my book, the better. I didn't always think this way.
03-17-2016 04:29 PM
GOOP as in the name of this entire forum: GDS by Symbio (formally Endrego). It uses DVR and does alot of pretty helpful stuff...