EMBEDDED APPLICATIONS FCT
LZT 123 8017 R1A
10
if (sirfc (0, 4) > 0)
{
while (1)
{
prtf("\nAwaiting SMS Command\n");
if (ReadSMS(sMsg, 160, sAdrs, 160) == 1)
{
if (scmp(sMsg, msgRequest) == 0)
{
prtf("\nSending Nav Data on Request\n");
SendNavData(sAdrs, 1);
}
else
{
sncpy(msg, sMsg, 8);
msg[8] = '\0';
if (scmp(msg, msgSchedule) == 0)
{
sRes = atoi(sMsg);
prtf("\nUpdating Schedule to %d Seconds\n", sRes);
ScheduleNavData(sMsg, sAdrs, sRes);
}
}
}
dlys(1);
}
}
}
prtf("\nInitialisation Error\n");
atdst();
}