C-code and QThread
Jeroentjehome last edited by
Hi all readers,
At the moment I have to write some C-code for an embedded system, but because the hardware is far from ready I need to be able to debug my C-code in a simulation program. I used Qt to run the C-code and parse the GUI with C-code variables. No I also want to generate some graphs, but to minimize the effort I created a debugEngine (just a timer that stores C-code data into a file). The only down side to this mechanism is that the timer in the debugEngine isn't consistent enough when run at e.g. 10 msec.
Because the C-code isn't able to use signal/slots or QThreads its a bit of a problem to get/set and parse the data between C and Qt code. Does anyone have a good suggestion how to do this? I was thinking of placing the DebugEngine into a QThread and create a "Getter/Setter" class that could be called from C and Qt code and that is threadsafe or do you guys have any better ideas??
Greetz and happy coding!