2019-05-29 03:47 AM
I need to simulate some external data while running simulator. For example, our device reads temperatures and I need some way to pass those temperatures (simulate) to simulator. Is there any way that is ready for this? Or I must write WinAPI code for that (sockets, COM, IPC, etc.)?
Solved! Go to Solution.
2019-05-29 04:11 AM
Hi @KMili,
There are a few ways to go about it. If you have a complex simulator application, yes, you can create a standalone simulator and just communicate with the TouchGFX Simulator using sockets (Check for socket data in Model::tick() ). We've done this in the past for customers - It's a very flexible solution.
Or, if you want to embed the simulated data inside the simulator application you can use FrontEndApplication to react to keyboard events to trigger various scenarios.
Edit (Adding text from other post): Override the handleKeyEvent() method in your FrontEndApplication class.
void FrontendApplication::handleKeyEvent(uint8_t c)
{
//Pass the keyevent on
touchgfx::MVPApplication::handleKeyEvent(c);
//Handle events
if (c == '1')
{
model.startSimulation();
return;
}
...
Let me know what you think
/Martin
2019-05-29 04:11 AM
Hi @KMili,
There are a few ways to go about it. If you have a complex simulator application, yes, you can create a standalone simulator and just communicate with the TouchGFX Simulator using sockets (Check for socket data in Model::tick() ). We've done this in the past for customers - It's a very flexible solution.
Or, if you want to embed the simulated data inside the simulator application you can use FrontEndApplication to react to keyboard events to trigger various scenarios.
Edit (Adding text from other post): Override the handleKeyEvent() method in your FrontEndApplication class.
void FrontendApplication::handleKeyEvent(uint8_t c)
{
//Pass the keyevent on
touchgfx::MVPApplication::handleKeyEvent(c);
//Handle events
if (c == '1')
{
model.startSimulation();
return;
}
...
Let me know what you think
/Martin
2019-05-29 04:23 AM
"you can use FrontEndApplication to react to keyboard events" - how to do that?
2019-06-03 12:59 AM
void FrontendApplication::handleKeyEvent(uint8_t c)
{
//Pass the keyevent on
touchgfx::MVPApplication::handleKeyEvent(c);
//Handle events
if (c == '1')
{
model.startSimulation();
return;
}
Override the handleKeyEvent() method in your FrontEndApplication class.
2024-01-09 12:12 PM
Hello,
I am learning to design a graphical interface in TouchGFX for STM32F746-DISCO. So far, I've sent everything to the board every time, but it's very tedious. I was looking for a simulator only test option and found this thread.
Can you advise me how to implement this communication?
"There are a few ways to go about it. If you have a complex simulator application, yes, you can create a standalone simulator and just communicate with the TouchGFX Simulator using sockets (Check for socket data in Model::tick() ). We've done this in the past for customers - It's a very flexible solution."
Jirka