Jump to content

HELP with Labview 8.2 GOOP Inheritance!


Recommended Posts

Hey everyone,

I am building a software application with a bunch of different classes. One class is entitiled 'File Settings', it handles all of the path information. Another class is called 'Communications'. In the inheritance tree Communications has two classes below it (one of which is 'File Settings'). In a method of 'Communications' I am trying to unbundle the 'File Settings' data to use in writing a configuration file for communicatins. When I try to wire the 'File Settings' object to the unbundle by name function, it says "Neither bundle or unbundle of this Labview class is allowed on this VI".

Any reasons as to why?? I thought any classes below the 'Communcations' class would be able to share their private data and methods!

Link to comment
Hey everyone,

I am building a software application with a bunch of different classes. One class is entitiled 'File Settings', it handles all of the path information. Another class is called 'Communications'. In the inheritance tree Communications has two classes below it (one of which is 'File Settings'). In a method of 'Communications' I am trying to unbundle the 'File Settings' data to use in writing a configuration file for communicatins. When I try to wire the 'File Settings' object to the unbundle by name function, it says "Neither bundle or unbundle of this Labview class is allowed on this VI".

Any reasons as to why?? I thought any classes below the 'Communcations' class would be able to share their private data and methods!

You can only bundle the wire in a method of a class that owns the private data (that's why it's called private data cluster in LabVIEW). Decendents can access the private data only trough ancestor protected or public class methods. All other VIs and other classes can access the private data only trough owning class public methods. So you need to write protected or public methods like getSomething and setSomething to modify the private data of the class outside the class. However it's often more convenient to include the required logic to the class methods instead of just getting and setting the data and using logic outside the class. But it's always case dependent.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.