pointer config


#1

Hi,

smsSend=adl_smsSend(smsSu,phonenumber,CmdCreate ,ADL_SMS_MODE_TEXT);

for this code i got error messsage of:
"passing arg 3 of ‘adl_smsSend’ makes pointer from integer without a cast [Conflicting names][applic.c] "
.
What does this error mean?
this is our original code

ascii phonenumber[20]="+6594868899"; 
ascii SmsTel[20]="+6581507582";
ascii SmsTimeorLength[20]="1000";
ascii SmsText[20]="hi";
ascii smsSu,CmdSu,CmdCreate;
ascii u;
u32 smsSend;
s16 smsUn,CmdUn;
bool SMS_TELE_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
    return TRUE;
}
void SMS_TELE_ctrl_Handler ( u8 Event, u16 Nb )  
{ 
switch ( Event ) 
{ 
    case ADL_SMS_EVENT_SENDING_OK : 
    TRACE (( 1, "Report OK" )); 
    break; 

    case ADL_SMS_EVENT_SENDING_ERROR : 
    TRACE (( 1, "Report sending error %d", Nb )); 
    adl_atSendResponse ( ADL_AT_UNS, "\r\nFailed...\r\n" ); 

if ( Nb == 512 ) 
{ 
    TRACE (( 1, "Retry later..." )); 
} 
break; 
} 
}
ascii ADC_Response_Handler (adl_atResponse_t *paras)
{
    //CmdCreate=adl_atCmdCreate("at+adc?\x1A",  ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ),(adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);  
return TRUE;
}
void tele_tmrRetryHandler ( u8 ID )
{   
    CmdCreate=adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ) , (adl_atRspHandler_t)ADC_Response_Handler, "+ADC:", NULL);
    smsSu=adl_smsSubscribe( SMS_TELE_Handler, SMS_TELE_ctrl_Handler, ADL_SMS_MODE_TEXT ); 
    smsSend=adl_smsSend(smsSu,phonenumber,CmdCreate ,ADL_SMS_MODE_TEXT); 
    smsUn=adl_smsUnsubscribe(smsSu);
    TRACE ((1, " Send Command: %d ", CmdCreate));
    TRACE ((1, " Send SMS: %d ", smsSu));
    TRACE ((1, " Send SMS: %d ", smsSend));
    TRACE ((1, " Send SMS: %d ", smsUn)); 
}

void adl_main ( adl_InitType_e InitType ) 
{ 
    adl_tmrSubscribe ( FALSE, 200, ADL_TMR_TYPE_100MS, tele_tmrRetryHandler );
}

best regards ,
Thia


#2

It means exactly what it says!

You can see which is arg (short for argument - or “parameter”) 3, can’t you?

You can see what you’ve supplied for that argument, and what type it is;

You can look-up the definition of adl_smsSend, and see what type it requires for its 3rd argument…


#3

hi anweii,
i look up the adl_smsSend the 3rd argument for this is ascii type and i want to ask is it possible to change the 3rd argument to other type?
or how can i get the result from the terminal emulator and put it in the the 3rd argument of adl_smsSend?

best regards
thia


#4

No, it isn’t - look again!

No - the function is provided by Wavecom as described.

What result?


#5

Hi,

     Yes, the third arugment is ascii SmsText; .

AUG_OpenAT_ADL_Development_Guide-004.pdf, page: 61 of 103

We want to return the value that I show in this photo.
We are mesuring the meter and want to send the value through sms .

http://i274.photobucket.com/albums/jj277/metalfonix/resultsfromterminalemulator.jpg

best regards,
Thia


#6

Not in my copy, it isn’t:

[attachment=0]adl_smsSend.gif[/attachment]

That is an Unsolicited Response - so look at adl_atUnSoSubscribe