Jump to content

MikaelH

Members
  • Posts

    835
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by MikaelH

  1. This CAR has been fixed in LV 2013.  The fix should be in LV 2013 Beta 2.

     

    MikhaelH: If you're part of the beta program, you can download the LV 2013 Beta 2 and test it out.  If not, PM me and I'll send you a link to sign up and my email address to get you into the beta program.

    Thanks,

    I have both 32 and 64 bit versions for 2013b2 and I can test it this week.

  2. I tried it the two projects and as soon as I run the Server Example all classes becomes locked as expected in that projects

    I then Run the Client-Server Examples and all classes gets locked in that Project just like it should. I did press some buttons on the client, and then closed the Client-Server VI, and all classes got unlocked.

    Then I close the Server Example VI and all classes in that project also got unlocked.

    So I can’t reproduce your problem, sorry.

  3. I have a very simple written an example app taken from the Head First's design Pattern book.

    Look at the Command patterns here:

    https://decibel.ni.com/content/message/35117#35117

     

    But basically you have to (not maybe have to, but if you want it scalable and reusable) use the Command Design pattern, (and together with the memento pattern to get a very scalable solution).

    This is just one link that descripbes it.

    http://www.codeproject.com/Articles/33384/Multilevel-Undo-and-Redo-Implementation-in-C-Part

     

    Cheers,

    Mike

  4. This way every DUT owns/has a Message Class in its attribute.

    A message class type (e.g. Type A) could be used by DUT Type A,B and C, and Message Type B, could be shared between DUT Type D,E,F

    Look at the example to see how I implemented it.

    I don't know your requirements, but this is one design I could think of.

  5. I’m sure we’ll get interface sooner or later to LabVIEW, in the mean time we have to implement it ourselves in different ways.

    Here a thread and one example I use: http://lavag.org/topic/10621-interface/

     

    I’ve not documented the Interface class template and how to use it, that comes with GDS.

    But here is a quick instruction, this design only makes sense to Referenced Objects.

     

    post-941-0-43208000-1361701841.png

     

    Add Interface Methods

    post-941-0-71377000-1361701867_thumb.png

     

    Create a Normal class that should implement the interface

    post-941-0-26061800-1361701846.png

     

    Add a design pattern: Interface

    post-941-0-07553600-1361701856_thumb.png

     

    This is what gets created

    post-941-0-00443000-1361701862.png

    post-941-0-87717300-1361701871.png

     

    Interface.zip

     

    Cheers,

    Mike

    • Like 1
  6. You’re right the interface isn't created, and that's because LabVIEW don't support Interface natively.

    Maybe a normal inheritance association will work for you.

    If not, there are ways of creating interfaces.

     

    I have a Design pattern, add-on you can add to a class to let it Implement an Interface class.

    But in your case just normal Inheritance might work just fine.

     

    Let me know how it goes.

    Cheers,

    Mike

  7. But I do agree with you I would like to know which questions I got wrong

    I did ask them, but of course they wouldn't tell me, but it would be good to know in what sections I missed out in.

    Maybe something like this:

    Software Development Process: 3/5

    Testing techniques: 1/3

    OO programming 5/5 (of course)

    X-Controls 2/3

     

    BTW, I've not asked my company to send me to the CLA Summit yet, what do you think I should say to convince them to send me there?

  8. My rule is that if the data in the attribute is huge, I use Reference based objects, just like NI does for the NI-IMAQ VIs. It helps the user not to accidentally use too much memory.

    Or sometime I use a GDS design pattern “Add reference variable to class” to a normal ByValue class.

    post-941-0-75669000-1359957434_thumb.png

    post-941-0-23490200-1359957444_thumb.png

    ..and sometimes I even spell ...Aray... with 2 Rs

     

  9. Is it a good practice to keep objects as DVRs within another object as shown below

    Why not.

    This will help you access the same object even if you branch the HAL Wire.

    Also it helps you locking the resource.

    Memory Wise, I think it could be an advantage, if the Aggregated Object Contains Huge amount of data.

    By replacing that with a 4byte DVR reference value, the HAL-Wire don't become so heavy.

    So e.g. if you branch the Hal-wire, or when you go into many SubVIs, those SubVIs has to allocate memory for this Huge amount of data.

     

    But should you ever branch a ByValue Wire?

    If you want to run things in parallel and accessing one object, you have to go with the Actor approach, or...just use ObjectByReference.

    //Mike

    • Like 2
×
×
  • Create New...

Important Information

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