How to send messages to Touchgfx simulator app?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-29 3: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.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-29 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-29 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-29 4:23 AM
"you can use FrontEndApplication to react to keyboard events" - how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
