Message Edité par JeanPierre le 03-03-2006 06:45 PM
LabVIEW, C'est LabVIEW
For modularity and speed, it sounds like a producer/consumer events structure would work well. Your producer case would check your failure modes (it sounded like some of them were event driven that's why I suggested the events structure, otherwise the regular producer/consumer would be better), and your consumer loop would have the regular cases and the specific failure cases. When your producer loop finds a failure it can enqueue in front the enumerated value for the failure case. Then you check all the fail cases in real time without slowing down your normal execution. It also makes it really easy to add more cases and failure modes without big code change.
Also, as a general rule, I don't like numbers determining cases because it's hard to understand/debug and easy to mess up. If you changed your priority, for example, you'd have to rewrite all of your logic and it would be very confusing. Using Enums is more clear.
You know that this thread has not seen activity for 10 years, right.
If you think you have a revolutionary new insight into the old problem, please be more specific and even attach some code or pictures. Also make sure to quote relevant section of the previous posts so we understand what part you are replying to. Thanks! 😄
I actually didn't notice how old it was until I had already written my reply. Then I just figured, if I found myself here, other people with the problem might also, I might as well post it. But you are absolutely right, altenbach, this horse it way too old to beat.