/***************************************************************************** * FUNCTION * mmi_frm_fetch_msg_from_extQ_to_circularQ * DESCRIPTION * fetch the message from external queue and put * in the circular queue . * (*) Need to set my_index & mmi_ext_qid before using * this function * PARAMETERS * void * RETURNS * 1 - the message is invalid, and discard the message * 0 - the message is valid
*****************************************************************************/
由这个函数注释我们可以知道,有两个队列,一个是外部队列,一个是循环队列
查看公司提供的文档了解是有三种队列:
n
E xternal queue (Inter-task queue, mod to mod(In the diff task))
n
Reseive message:
OslReceiveMsgExtQ(receive_msg_ext_q)
n
Send message: OslMsgSendExtQueue(msg_send_ext_queue)
n
Internal queue (Intra-task queue, mod to mod(In the same task))
n
Reseive message:
receive_msg_int_q
n
n
n
Circular queue (MMI only, default size 30)
n
Reseive message (From MMI Task):
OslReadCircularQ
n
Send message ( For NVRAM Access
):
OslWriteCircularQ
n
Send message:
msg _ send_int_queue
--------------------------------------------------------------------------------------------------------
n
如何向L4层发消息:
n
Step1: Construct a local parameter buffer.
n
Step2: Assign required values into local parameter buffer.
n
Step3: Send out the message to the L4C module.
n
---------------------------------------------------------------------------------------------------------
MMI_TASK函数结尾处有这样的代码:
default: ProtocolEventHandler( (U16) Message.oslMsgId, (void*)Message.oslDataPtr, (int)Message.oslSrcId, (void*)&Message); break;
也就是从外部队列里取出的消息除了特殊的消息,其他的默认的消息就放在这里面执行了。
OslMsgSendExtQueue (&Message);
n
n
Internal queue (Intra-task queue, mod to mod(In the same task))
n
Reseive message:
receive_msg_int_q
n
Send message:
msg _ send_int_queue
n
n
Circular queue(MMI only , default size 30)
n
Reseive message (From MMI Task):
OslReadCircularQ
n
Send message ( For NVRAM Access
):
OslWriteCircularQ
n
---------------------------------------------------------------------------------------------------------