一. SMS协议结构
秘鲁渔场 CDMA模式中SMS协议结构如图所示,包括SMS Relay Layer,SMS Transport Layer和SMS Teleservice Layer。
SMS Relay Layer. This section defines the requirements for the lower layer of the SMS bearer service protocols. The SMS Relay Layer provides the interface between 25
the Transport Layer and the Link Layer used for message transmission. 26
SMS Transport Layer. This section defines the requirements for the upper layer of the SMS bearer service protocols. The SMS Transport Layer manages the end- to-end delivery of messages. 29
SMS Teleservice Layer. This section defines the requirements for the SMS Teleservice Layer, which provides application-level data formats and procedures.
二.流程
三. UI层程序分析
uinusms_initial_smsi(smsi_msg_type * smsi_msg_ptr) 函数中将短信做初始化, 主要是一些参数的配置. 之后编辑短信内容及收件人号码并将这些内容也都依据IS637协议规定填进结构中.具体参数定义请看IS637协议. uiuasms_get_next_msg_id() 得到当前的MSG_ID.
uasmsu_convert_from_smsi
(
smsi_msg_type * smsi_ptr,
uasms_client_message_type * cl_ptr
)
uasms_status_e_type uasms_send_message
(
const void * user_data,
拉丁美洲音乐教案 /* The client can pass a void* pointer with any chosen value.
The UAPI later delivers the message submission status with this
same user_data pointer, so that the client can correlate the message
submitted in this function with the status of it.
*/
const uasms_client_message_type * cl_msg_ptr
/* The message to be sent. */
)
这个函数是CM层函数, 在这个函数中将指令加入命令队列中, 然后一层一层发下去。调用这个函数并不等于短信发送成功了,因为一,只是将指令添加到队列中;二,需要与网络交互,只有网络反馈回发送结果信息才能真正结束过程。
void uiuasms_status_listener
(
纳米医药 const void * user_data,
uasms_error_class_e_type error_class,
uasms_status_e_type status
)
开机时CM设置了这个回调函数,这个函数在发送过程中会被调用,反馈短信发送状态。本函数中给UI TASK发命令。收到命令之后调用以下函数处理
void uinusms_sms_process_msg_status
(
const void * user_data,
uasms_error_class_e_type error_class,
uasms_status_e_type status
)
有两种情况:
一. ACCESS信道可。
二. ACCESS信道不可发TRAFFIC信道上可发短信。
我的张爱玲
判断一条短信是否可从ACCESS信道上是由手机根据发送过来的参数来进行计算判断的。
如果status为UASMS_ACCESS_TOO_LARGE_S,则需要建立DTC通道.如果为UASMS_OK_S则发送成功. DTC通道建立结果调用事件监听函数
void uiuasms_event_listener
(
uasms_event_e_type sms_event_type,
uasms_event_info_type *sms_event_info
)
在这个函数中可得到DTC是否建立状态, 给UI TASK发命令转到UI层进行处理.
void uinusms_return_DTC_event_process(uasms_event_e_type sms_event_type)
本函数中对DTC EVENT 处理.
DTC建立之后重发短信, 发送状态仍调用状态监听函数
void uiuasms_status_listener
(
const void * user_data,
uasms_error_class_e_type error_class,
uasms_status_e_type status
) 来得到短信发送状态.
之后过程不再详述.
四. 短信发送过程中LOG信息
图一是OTA信息,一条短信息通过ACCESS信道发送出去.
图二是反馈回来的的状态的信息.
走Taffic 信息的OTA就不再赘述.
(图一)
2010年广东高考数学
(图二)
五. 与其它模块接口
乔姆斯基1.其它模块接口:
boolean uinusms_send_msg_entry
(
uint8 * addr_num_buf, /*pointer to address number buffer*/
uint8 * addr_name_buf, /*pointer to the ower of the address number buffer*/
uint8 * text_buf, /*pointer to the the text of the message buffer*/
uint8 addr_num_count, /*the byte count of the address number*/
uint8 addr_name_count, /*the byte count of the ower of the address number*/
uint8 text_count /*the byte count of the text of the message*/