Can someone help me with an ideea? … I need to make an application that needs to receive programmed tasks…
An user needs to enter an at command like in the following example:
at+taskadd = ,,,,,,task (task is a function to call - ex…gprs connection or something else)
How can i implement this? …i’m using the RTC service to store the date/time entered by the user. But how can i call a task at that time?..
The user can be able to enter something like this:
at+taskadd = 12,,,,14,,task… - * - means every month/year/minute etc. This task for example needs to execute every 12 day of every month at 2 pm.
I have no ideea…Can someone help with an ideea of what APIs i need to user?
There is no API to get “alarm” signals - so you’d either have to implement it youself with a timer, or use AT+CALA
As for your “schedule” of tasks, you could use a list ordered by the required date+time for the task: one-off events are deleted when done; recurring events are re-inserted in the list…
Ok…i understand… that means i need to create the AT+CALA command…with at+cmdCreate command every time a user uses at+taskadd to insert a task…and to subscribe to the unsolicited response +CALA … and when i receive this response to call my function/task…i’m correct?
Yes…but as you said …there is no reccurency in at+cala…it accepts only one time alarm…i need reccurency…
I don’t know how to do it…it seems dificult to compute every parameter and compare if it is not * then comparing with the RTC and if it’s correct go to next parameter and so on…
Something like a “hierarhical IF”
if (!userday and userday==rtcday)
then verify month and so on…
etc
etc…
Yes…i think is quite laborious…and i know that has nothing to do with Open AT…have any sugestion on how can i implement this easier with C ? i`m not very experienced in a large types of application…i can only think at a lot of if’s…maybe to contruct some arrays for easier comparison?..
Thanks…i’m not a student …i’m a recently graduate and employed…and i work in a research and development for industrial space at a company…they want to implement some applications with open at modems specially for data aquisition…and it’s my responsibility…i started to work like a month ago with Open AT…and i learned a lot…made some applications for different purposes…but know i need to make a complex one…like a small firmware…with some configurations…and all that…a run mode part wich uses some configurations written in flash and all that…this witch scheduling is the most dificult part for now…and the last one that i need to implement before i finish the configuration part…
As a recent graduate, you should be familiar with researching & looking up references - your supervisors/mentors should be able to help you find if there’s a suitable library nearby, or recommend books to buy.
As the old saying goes, “A good education is not so much about what you know, as about what you know how to find out…”