Does anybody knows where to open a mssg and use it with cgi functions?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does anybody knows where to open a mssg and use it with cgi functions?

Jump to solution
923 Views
MQXuser
Contributor III
I need to  send and receive Messages From other Tasks into cgi functions. In order to do this
I need to open a mssg queue and create a message pool in the task calling this functions.

Where should I open mssg queue and create the mssg pool??
0 Kudos
1 Solution
340 Views
JuroV
NXP Employee
NXP Employee

You create message pool in order to have "shared common memory" to which you send messages and read messages from.

You can imagine message queue as a mailbox. A task can send messages to any mailbox (queue), but if you want to read from a queue, you have to open it.

So: you have to open queue in the task, which should read those messages (place breakpoint on the CGI request handler and you can see in which task's context you are). You create pools independetly on queues: e.g. at init of main task.

Messages cannot be read in the interrupt service routines.

Message Edited by JuroV on 2009-09-09 05:02 PM

View solution in original post

0 Kudos
1 Reply
341 Views
JuroV
NXP Employee
NXP Employee

You create message pool in order to have "shared common memory" to which you send messages and read messages from.

You can imagine message queue as a mailbox. A task can send messages to any mailbox (queue), but if you want to read from a queue, you have to open it.

So: you have to open queue in the task, which should read those messages (place breakpoint on the CGI request handler and you can see in which task's context you are). You create pools independetly on queues: e.g. at init of main task.

Messages cannot be read in the interrupt service routines.

Message Edited by JuroV on 2009-09-09 05:02 PM
0 Kudos