Sub function is not executed,Why?


#1

Hello,
I am a user of Q24 wireless CPU. I am studying OPEN AT IDE,but I meet with a question.I have to ask help from you.This is my sources codes,please check.
//I want to let Q24 execute AT+CGMI
void AT_CGMI_Handler(adl_atCmdPreParser_t *paras) //response function ,sub function
{
adl_atCmdUnSubscribe(“AT+CGMI”,(adl_atCmdHandler_t)AT_CGMI_Handler);
adl_atCmdCreate(paras->StrData,TRUE,(adl_atRspHandler_t)NULL,
“WAVECOM MODEM”,
“OK”,
NULL);
void adl_main ( adl_InitType_e InitType )
{
TRACE (( 1, “Embedded Application : Main” ));
adl_atCmdSubscribe(“AT+CGMI”,(adl_atCmdHandler_t)AT_CGMI_Handler, ADL_CMD_TYPE_ACT);
adl_atSendResponse ( ADL_AT_UNS, “\r\nMain runned\r\n” ); // this is executed
}
I find adl_main is executed,and sub function AT_CGMI_Handler is not executed,but adl_atSendResponse is executed.I think It’s a basic knowledege about the IDE,I am not familiar with OPEN AT’s setting.Who can help me? Thanks


#2

Please note the ‘Code’ button for posting source code!

That’s because adl_atCmdUnSubscribe is used to cancel a subscription!