SMS发送流程.doc_第1页
SMS发送流程.doc_第2页
SMS发送流程.doc_第3页
SMS发送流程.doc_第4页
SMS发送流程.doc_第5页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

SMS协议及发送消息流程一 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 25the Transport Layer and the Link Layer used for message transmission. 26SMS 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. 29SMS Teleservice Layer. This section defines the requirements for the SMS Teleservice Layer, which provides application-level data formats and procedures.二发送短信流程将发送指令添加到SMS任务队列SMS信号判断处理数据转换及编码添加CLIENT命令到CLIENT命令表中cm_task 中处理将该命令向前发送到MC进行处理uiuasms_status_listener() 回调函数来判断发送状态. 如果当前短信对于ACCESS信道太长, 则需建立DTC通道. DTC建立成功以后重发短信.uiuasms_event_listener() 回调函数来判断DTC状态. 如果DTC建立成功便重发短信.uiuasms_status_listener() 回调函数来判断发送状态. 如果当前短信对于ACCESS信道太长, 则需建立DTC通道. DTC建立成功以后重发短信.将发送指令添加到SMS任务队列SMS信号判断处理数据转换及编码添加CLIENT命令到CLIENT命令表中cm_task 中处理将该命令向前发送到MC进行处理将发送指令添加到SMS任务队列SMS信号判断处理数据转换及编码添加CLIENT命令到CLIENT命令表中cm_task 中处理将该命令向前发送到MC进行处理uiuasms_status_listener() 回调函数来判断发送状态. 如果当前短信对于ACCESS信道太长, 则需建立DTC通道. DTC建立成功以后重发短信. 三. 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就不再赘述. (图一) (图二)五. 发送短信与其它模块接口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*/)2.编辑短信接口uinxed_init_edit(UI_SK_SMS_DELETE, insert_buf);短信中调用这个接口进入编辑, 参数一标识为短信编辑, 二是预置内容.uinxed_insert_string_to_editor(uint8 *)buf);插入短信内容, 调用这个函数可在短信编辑过程中插入.短信编辑好之后返回到UI_SMS_S, ui.event=HS_STO_K;3.与PB接口boolean pb_mmi_get_num_name_from_pb ( byte* numbuf , /* Pointer to number buf in which to save number and its coresponding name got from PB */ byte* namebuf, /* pointer to name buf in which to save number and its coresponding name got from PB */ int* numlen, /* Pointer to the length of number */ int* namelen /* Pointer to the

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论