Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

writing in message queue for refreshing Gui

$
0
0

Hello together,

 

i want to make a project, in which i can create windows dynamically and use one window handler for this. This windows have to be refreshed periodic. My idea was to create a TX_TIMER and write in the message queue of the GuiX Messaging framework.

 

I first tried it at the "hello world" project.

 

i create a timer like this:

status = tx_timer_create(&my_timer, "HMITimer", timer_expired, 4, 500, 500, TX_AUTO_ACTIVATE);

and a timer callback like this:

void timer_expired(ULONG param)
{
UINT result = TX_SUCCESS;

p_message_test.event = 0;
p_message_test.event_b.code = 0;
p_message_test.event_b.class_instance = 0;
p_message_test.event_b.class = 1;


result = tx_queue_send(&main_thread_message_queue, &p_message_test, TX_NO_WAIT);
if(result){
while(1);
}
}

 

my timer runs right and i get over the 

err = g_sf_message0.p_api->pend(g_sf_message0.p_ctrl, &main_thread_message_queue, (sf_message_header_t **) &p_message, TX_WAIT_FOREVER);

form the messaging framework.

 

But after the pend function i got very different values for p_message for example:

 

i set p_message_test like the code snippet above.

and after the pend function i have this

p_message.eventb.class = 255

p_message.eventb.class_instance = 254

p_message.eventb.code = 32031

 

Can someone explain me this behaviour and give me some hint that it runs right?

 

I use the DK-S7G2

SSP V1.5.0

 

Thank you,

Regards

Matthias


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>