Jump to content

Am I going about this the rigth way?


Recommended Posts

I'm trying to write a little program using GOOP Developer Evaluation just to see if I understand/implement GOOP.

Here's my scenario:

I have a VME Chassis, in the chassis are 2 potential types of cards, for each card, there can be up to 6 potential modules (I/O, communication, etc) and then there are specific module types.

I've created essentially a master class (VME Chassis) and under it are a bunch of child classes:

VME

VME.Card

VME.Card.Module

VME.Card.Module.Type1

VME.Card.Module.Type2

VME.Card.Module.Type3

...and so on.

Now, am I implementing GOOP/OOP as intended? It feels like I'm setting it up for 2 diferent usages: Components and subcomponents and Generic Components and specific components?

What I've done, is when I create a VME object, it searches for all available cards and creates new VME.Card objects. Each of those card objects then searches for modules and creates module objects, each module object determines what type it is, and then creates a specific module type object... and so on.

I'm still at the "creating" stages and haven't run any of this yet... am I on the right path?

Link to comment

Hi Bryan

From what you have described about your VME system your object hierachy looks correct, you are allowing the ability to branch out with different cards and different modules, quite a deep and interesting hierarchy, but nonetheless easily handled.

I'm not quite sure you are on the right track with your object creation, my impression is that you are calling the VME base object Create which calls a card Create which calls a module Create and so on. If so this is not the way to create your object. The base or parent Create is never called, it is really only there to be used as a template for the object Create. When you want to use a VME.Card.Module.Type1 then call that classes creator, place whatever code that is required inside its Create to initialize the HW or get HW references to channels.

What you are doing is very similar to the DataIO class that ships with the examples, take a look in there and that should guide you. Also the tutorials provide an excellent guide and go into how to architect the type of class that you are looking to develop.

Link to comment

Thanks for the reply.

You're right as to how I was going about it. I got about halfway thorugh this and figured I wasn't going about it the right way. Something just seemed off.

I have been looking at the tutorials, but have been having a hard time absorbing it. I seem to be having a bout of temporary 2-week ADD or something... nothing seems to be sinking in.

I've since deleted this little project and am trying another route. I'm going to look at the DataIO tutorial again. I've actually read the manual (something I never do I might add), but I'll need to go through it again now that I'm fully awake. :D

Link to comment
Thanks for the reply.

You're right as to how I was going about it. I got about halfway thorugh this and figured I wasn't going about it the right way. Something just seemed off.

I have been looking at the tutorials, but have been having a hard time absorbing it. I seem to be having a bout of temporary 2-week ADD or something... nothing seems to be sinking in.

I've since deleted this little project and am trying another route. I'm going to look at the DataIO tutorial again. I've actually read the manual (something I never do I might add), but I'll need to go through it again now that I'm fully awake. :D

If anything is unclear in the tutorials, or you are just saying to yourself "What the hell is he on about" then just let me know, I'll moddify the documentation for the next point release and hopefully explain it better. Also if you feel that something was missed and you would like to see more tutorials or examples then again I'm happy to do so. The best way to tackle the tutorials is to just go through them step by step with GOOP Developer and hopefully it will all start to gel.

Link to comment

Going through step by step is definitely what I need to do... finding time to do it right now is difficult.

It's getting clearer as I go. Props again to you and Jim for creating this stuff!

Never say never!! :P

I've been learning that the hard way lately :D

Link to comment
  • 2 weeks later...

That Goop eval copy. Is that an Eval copy of the expensive one from Endevco?

IF its shareware Id like to get it too

Thanks

Duh! I just woke up a little.

I can see its a new release Thanks!

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.