EMBEDDED APPLICATIONS FCT
LZT 123 8017 R1A
9
prtf("\nSending SMS to [%s]\n", adrs);
if (smss(adrs, pL_p, 145, slen(adrs), slen(pL_p)) > 0)
{
prtf("\nSMS Send Error\n");
return (0);
}
prtf("\nSMS Sent OK\n");
return (1);
}
/*******************************************************
* Name: ScheduleNavData
* Arguments: char *aMsg, char *sAdrs, int sInterval
* Return: None.
* Description: Request navigation if the SMS
* message Schedule'x' received
* Delay is 'x' second intervals
* Max delay = 255 seconds
*******************************************************/
ScheduleNavData (char *sMsg, char *sAdrs, int sInterval)
{
while (1)
{
prtf("\nSending Nav Data on Schedule\n");
SendNavData (sAdrs, 1);
if (ReadSMS(sMsg, 160, sAdrs, 160) == 1)
{
if (scmp(sMsg, msgStop) == 0)
{
prtf("\nSchedule Stopped\n");
return;
}
prtf("\nIgnored SMS Command[%s]\n", sMsg);
}
prtf("\nWaiting %d Seconds\n", sInterval);
dlys(sInterval);
}
}
main ()
{
char sMsg[160];
char sAdrs[160];
char msg[16];
int sRes = 0;
prs(0);
prtf("\tRunning:TCS Demo 14/07/03-11:40\n");
prtf("\nInitilising SMS Memory\n");
if ((atcrt() == 0)&&(smsi(1, 1) == 0))
{
/* create SIRF UART3 channel for Binary at 19200 */