06-15-2012 02:16 AM
The Turducken is a very good analogy!
But you could also prepare and eat the three birds individually (I think I would prefer that).
In other words you could separate your clusters containing the commands and variants into individuall queues.
It seems that you allready designed some parts of your application, so for my opinion an OOP implementation would be a huge impact.
Christian
06-15-2012 07:30 AM
@jarcTec wrote:
...Could you provide an example of the "Expert Pattern"? If I understand correctly, you are saying that the sending end should only push a command into the queue and then ...
I am not free to post an example but I write a little and wave my hands a bit...
Look at the DAQmx implementation. After saying what you want you hit it with a start task and DAQmx is the expert at getting it started. We use the same DAQmx consruct if the widget is a PCI card a USB device or whatever.
In the old DAQ version we had to route wires while observing the phase of the moon and swing a dead cat over our heads (not offence to those cat lovers out there).
In my I/O libraries I support just about every widget I have touched ove that last year or two. They range from SPI devices to serial to DAQmx etc. I have implement the I/O library such that I select which flavor I want to use then tell it here is the config file, "Go configure yourself".
With the very little code you showed us it looks like your sender is micro-managing what is happening at the other end.
I don't mean to offend. I am only trying to help while at the same time put out some ideas for the community to concider or crush.
Take care,
Ben
06-15-2012 07:47 AM
It was fun catching up on this thread...
I wanted to reply, but Mark explained what I would have said.
Christian makes me want to cook this weekend.. BBQ, of course.
Ben... what can I say... Wow.... I was headed in the de-coupling route and he comes up with the "Expert Pattern". Just when I finally get comfortable with LVOOP (hope Putnam doesn't see this thread LOL!), Ben comes up with a pattern that triggers my curiosity. Hummmm.. can't stop thinking about this one.. Certainly would have improved a project I'm involved with... Hummm... Too late to change the architecture.... I'm digressing...
In short, everyone provided advice I would have provided, with "Expert Pattern" exception, as I would not have thought of that one.. Although... I keep thinking about it... Maybe we did implement something like this after all... I have to go back and read Ben's post again..
Ben: Thank man.... Keep on pushing that enveloppe. 🙂
06-15-2012 07:53 AM
@Ray.R wrote:
It was fun catching up on this thread...
...
Ben: Thank man.... Keep on pushing that enveloppe. 🙂
PLEASE push back!
"I am not a programmer but I play one at work."
I am still trying to learn the OOD ideas and writting about them helps me reinforce the ideas while also getting some peer review as was the case above where Mark clarified one of my points.
Take care,
Ben
06-15-2012 08:40 AM
@Christian_M wrote:
The Turducken is a very good analogy!
But you could also prepare and eat the three birds individually (I think I would prefer that).
In other words you could separate your clusters containing the commands and variants into individuall queues.
It seems that you allready designed some parts of your application, so for my opinion an OOP implementation would be a huge impact.
Christian
I see what you are saying. I will have to think about the separation of the command clusters into two queues in order to achieve the result I want. On the other hand, you are right that I have parts of the application already designed and changing to OOP would be impractical at this stage. Nonetheless, I can always apply OOP concepts to my next project
06-15-2012 08:59 AM
Ben wrote:
I am not free to post an example but I write a little and wave my hands a bit...
Look at the DAQmx implementation. After saying what you want you hit it with a start task and DAQmx is the expert at getting it started. We use the same DAQmx consruct if the widget is a PCI card a USB device or whatever.
In the old DAQ version we had to route wires while observing the phase of the moon and swing a dead cat over our heads (not offence to those cat lovers out there).
In my I/O libraries I support just about every widget I have touched ove that last year or two. They range from SPI devices to serial to DAQmx etc. I have implement the I/O library such that I select which flavor I want to use then tell it here is the config file, "Go configure yourself".
With the very little code you showed us it looks like your sender is micro-managing what is happening at the other end.
I don't mean to offend. I am only trying to help while at the same time put out some ideas for the community to concider or crush.
Take care,
Ben
You are not offending anyone (at least not me. I am not a cat lover myself either). It is always great to learn new concepts. I think I am starting to understand what you mean with the "Expert Pattern" but I will have to leave a background process running on my head for a while trying to put all the pieces together. Referring to the DAQmx example, what you are saying is that I could have a VI that configures a LV object with various available options (similar to how a "Create DAQmx Channel" does) be called first, and then call an executing VI with the already configured LV object as input (similar to the "DAQmx Start"). In this way , all the configuration is not happening on the sender side. Man, I don't think I will be able to sleep tonight thinking about this pattern
06-15-2012 09:04 AM
@jarcTec wrote:
... Man, I don't think I will be able to sleep tonight thinking about this pattern
I find a couple of beers on the front porch with The Princess* helps with that sitution.
Ben
* The Princess = My wife who has a masters in IS and politely pretends I am making sense.
06-19-2012 02:02 PM - edited 06-19-2012 02:08 PM
Thank you all for your replies. I put together the ATM CLD example using the now called "Turducken" style on this thread http://forums.ni.com/t5/Certification/ATM-CLD-Practice-Exam-Example/td-p/2033712. I basically use it for sending commands within commands.
I am still not sure how I like it.
Regards,