My MFC program for testing new digital designs is coming along nicely. (see here for details: http://forum.allaboutcircuits.com/showthread.php?t=70900) However, I've hit a snag. I'm using the Document/View structure, which allows me to build a very functional, if still evolving, interface for setting up tests, configuring my electronics systems, getting output, etc. Now, I need to be able to create threads for connecting to the DUT and managing communications. Further, I need for the threads to be able to communicate data back to the main program. I generate the thread from the view module, and everthing goes OK until I need to feed data back from the thread. The view defines data members and data access member methods, and the thread calls those methods via an object pointer to the view. The methods modify the data members, as usual for the C++ methodology. The problem is, when the thread calls the methods, the data members don't get modified as they should. But, I can use the method calls to modify global variables ( as a work-around, though that isn't the right way to do things ) So, in summary, the methods can modify global variables but not class data members.
I can post my code, but it's alot of experimental code and might be tough to unwind. If anyone seriously wants to go through it, let me know.
Thanks!
I can post my code, but it's alot of experimental code and might be tough to unwind. If anyone seriously wants to go through it, let me know.
Thanks!