Adl_get_param

hi there

does anyone have a sample for using adl_get_param in the adl_atCmdPreParser_t.

Thanks

Hi, take a look at the following code, after you subscribe to the command you have created, and declared
the handler function, you can use its parameters

ADL_CMD_TYPE_PARA|0x0012 means that its gonna be at least 1 parameter and maximun 2 parameters

//****************************

adl_atCmdSubscribe(“at+httpget”,adl_atCmdHandler_t)athttpget_Handler,ADL_CMD_TYPE_READ|ADL_CMD_TYPE_ACT|ADL_CMD_TYPE_PARA|0x0011);

void athttpget_Handler(adl_atCmdPreParser_t *param){
int n;
switch(param->Type)
{
case ADL_CMD_TYPE_ACT:
adl_atSendResponse(ADL_AT_RSP,"\n\rOK\r\n");
break;

    case ADL_CMD_TYPE_PARA:
      
    adl_atSendResponse(ADL_AT_RSP,"\n\rOK\r\n"); 
    wm_strcpy(SRC_FILENAME,ADL_GET_PARAM(param,0));           
    flag_http=GET_FILE; 
    MyFunction_http();
    break;                        
    }    

}

ups!

It seems to me one of the lines was incomplete:
(sorry if my english is not clear)

//****************
adl_atCmdSubscribe(“at+httpget”,(adl_atCmdHandler_t)athttpget_Handler,ADL_CMD_TYPE_READ|ADL_CMD_TYPE_ACT|ADL_CMD_TYPE_PARA|0x0011);

Hi there

Thanks for the reply. Don’t worry about the english. I will keep you posted of any developments that I make.

Kind Regards,

Gugulethu