реклама на сайте
подробности

 
 
> Задержка OpenAT
kban
сообщение Jun 27 2008, 05:45
Сообщение #1


Частый гость
**

Группа: Новичок
Сообщений: 97
Регистрация: 29-10-07
Пользователь №: 31 837



Как организовать длительную (>30 секунд) задержку в OpenAT приложении?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов (1 - 6)
dezzer
сообщение Jun 30 2008, 15:16
Сообщение #2


Участник
*

Группа: Свой
Сообщений: 66
Регистрация: 27-09-05
Пользователь №: 9 012



Там же таймеры есть, в чём проблема?
Go to the top of the page
 
+Quote Post
sobr
сообщение Jul 1 2008, 04:55
Сообщение #3


Знающий
****

Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552



Цитата(kban @ Jun 27 2008, 12:45) *
Как организовать длительную (>30 секунд) задержку в OpenAT приложении?

Подробнее скажи что хочешь сделать...
Go to the top of the page
 
+Quote Post
de__
сообщение Jul 1 2008, 06:02
Сообщение #4


Участник
*

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045



для меня тоже это тоже актуально.
Пока обхожусь псевдомногозадачностью и мне большие задержки в одном потоке не нужны. По идее это более изящно. Меньше нагрузка на проц и защита от зависания.
По идее (по мануалу) внешня схема должна сбрасывать "сторожевого пса".

Есть ещё вопросы (сразу до кучи) по Q24. Из за того что в этом модеме (в отличии от Q26) нет истинной многозадачности:
1. как организовать задержки без выхода из потока. (без передачи управления). То есть хочу, например, иметь функцию типа bool Delay_ms(unsigned long ms);
2. можно ли как нибудь в одном потоке организовать запросы АТ команд? То есть выполняем первую команду. После того как она выполнилась - выполняем 2ую команду и т.д. С помощью обработчиков то можно. Но хотелось бы как то проще. линейно.
Go to the top of the page
 
+Quote Post
kban
сообщение Jul 1 2008, 06:17
Сообщение #5


Частый гость
**

Группа: Новичок
Сообщений: 97
Регистрация: 29-10-07
Пользователь №: 31 837



C таймерами заробрался... Но возник другой вопрос
sobr - вы писали про функцию adl_atCmdSend ( "",NULL,NULL,NULL);
А где про неё можно узнать подробнее? И чего она требует? (в adl-евских .h файлах я её не нашёл....)
Go to the top of the page
 
+Quote Post
sobr
сообщение Jul 1 2008, 08:13
Сообщение #6


Знающий
****

Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552



Цитата(kban @ Jul 1 2008, 13:17) *
А где про неё можно узнать подробнее? И чего она требует? (в adl-евских .h файлах я её не нашёл....)

не получается прилепить файл... попробую так:

Код
3.3.5.5 The adl_atCmdSend Function
Add command to the required port command stack, in order to be executed as soon
as this port is ready.
• Prototype
s8 adl_atCmdSend ( ascii * atstr,
adl_atRspHandler_t rsphdl,
… )
• Parameters
atstr:
The string (name) of the command we want to send. Since this service only
handles AT commands, this string has to begin by the "AT" characters.
rsphdl:
The response handler of the callback function associated to the command.
…:
A list of strings of the response to subscribed to. This list has to be
terminated by NULL.
• Returned values
o OK on success
o ERROR if an error occurred
o ADL_RET_ERR_SERVICE_LOCKED if called from a low level interrupt handler
Note:
Arguments rsphdl and the list of subscribed responses can be set to NULL to only
send the command
3.3.5.6 The adl_atCmdSendExt Function
This function sends AT command with 2 added arguments compared to
adl_atCmdCreate / adl_atCmdSend : a NI (Notification Identifier) and a Context.
Add command to the required port command stack, in order to be executed as soon
as this port is ready.
• Prototype
s8 adl_atCmdSendExt ( ascii * atstr,
adl_atPort_e port,
u16 NI,
ascii * Contxt,
adl_atRspHandler_t rsphdl,
… )
API
AT Commands Service
© Confidential Page: 65 / 365
This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without
prior written agreement.
WM_DEV_OAT_UGD_060 - 003 December 17, 2007
• Parameters
atstr:
The string (name) of the command we want to send. Since this service only
handles AT commands, this string has to begin by the "AT" characters.
port:
The required port on which the command will be executed.
NI:
This parameter is to hold the Notification Identifier provided by the
command handler when re sending the command already subscribed to
solve any loop effect.
Note:
In this current release the notification identifier (NI) is not used.
Contxt:
Context made to hold information gathered at the time the command was
sent.
rsphdl:
The response handler of the callback function associated to the command.
…:
A list of strings of the response to subscribed to. This list has to be
terminated by NULL.
• Returned values
o OK on success
o ERROR if an error occurred
o ADL_RET_ERR_SERVICE_LOCKED if called from a low level interrupt handler
Note:
Arguments rsphdl and the list of subscribed responses can be set to NULL to only
send the command.
3.3.5.7 The adl_atCmdSendText Function
Sends text for a running text command.
• Prototype
s8 adl_atCmdSendText ( adl_port_e Port,
ascii * Text )
• Parameters
Port:
Port on which is currently running the "Text Mode" command, waiting for
some text input.
API
AT Commands Service
© Confidential Page: 66 / 365
This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without
prior written agreement.
WM_DEV_OAT_UGD_060 - 003 December 17, 2007
Text:
Text to be provided to the running "Text Mode" command on the required
port. If the text does not end with a ‘Ctrl-Z’ character (0x1A code), the
function will add it automatically.
• Returned values
o OK on success
o ERROR if an error occurred
o ADL_RET_ERR_SERVICE_LOCKED if called from a low level Interrupt handler.
• Example
This example demonstrates how to use the AT Command Sending service in a
nominal case (error cases not handled) with a Wireless CPU®.
Complete examples using the AT Command service are also available on the SDK.
• Example 1
// ati responses callback function
s16 ATI_Response_Handler(adl_atResponse_t *paras)
{
TRACE((1, "Reponse handled"));
TRACE((1, paras->StrData));
return FALSE;
}
// function 1
void function1(adl_InitType_e adlInitType)
{
// We send ati and subscribe to its responses
adl_atCmdSend("ati",
(adl_atRspHandler_t)ATI_Response_Handler,
"*",
NULL);
}
API
AT Commands Service
© Confidential Page: 67 / 365
This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without
prior written agreement.
WM_DEV_OAT_UGD_060 - 003 December 17, 2007
• Example 2
// at+mycmd responses callback function 2
s16 AT_MYCMD_Response_Handler_2(adl_atResponse_t *paras)
{
// we send a terminal response
adl_atSendStdResponsePort(ADL_AT_RPS, paras-> Port, ADL_STR_OK);
return FALSE;
}
// at+mycmd callback function 1
void AT_MYCMD_Handler_l(adl_atCmdPrepaerser_t *paras)
{
// we send a terminal response
adl_atSendStdResponsePort(ADL_AT_RSP, paras->Port, ADL_STR_OK);
}
// at+mycmd callback function 2
void AT_MYCMD_Handler_2(adl_atCmdPreParser_t *paras)
}
// Only spying we resend the command
adl_atCmdSendExt(paras->StrData,
paras->Port,
0,
NULL,
(adl_atRspHandler_t)AT_MYCMD_Response_Handler_2
“*”,
NULL);
}
// function 1
void function1(adl_InitType_e adl InitType)
{
// Subscribe to the ‘at+mycmd’ command.
adl_atCmdSubscribe (“attmycmd”,
(adl_atCmdHandler_t)AT_MYCMD_Handler_1
ADL_CMD_TYPE_ACT);
// Subscribe to the ‘at+mycmd’ command again
adl_atCmdSubscribe (“at+mycmd”,
(adl_atCmdHandler_t)AT_MYCMD_Handler_2,
ADL_CMD_TYPE_ACT
}
Go to the top of the page
 
+Quote Post
sobr
сообщение Jul 1 2008, 10:37
Сообщение #7


Знающий
****

Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552



Жди, у меня почта не уходит...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 22nd July 2025 - 16:58
Рейтинг@Mail.ru


Страница сгенерированна за 0.01398 секунд с 7
ELECTRONIX ©2004-2016