现在的位置: 首页 > 综合 > 正文

手机短信PDU编码与解码

2013年12月02日 ⁄ 综合 ⁄ 共 1375字 ⁄ 字号 评论关闭

[csharp] view
plain
copy

  1. /////////////////////////////////////  
  2. ///文    件:PDUdecoding.cs  
  3. ///程 序 员:klude  
  4. ///编制日期:2007-11-04  
  5. ///概    要:针对国内短信编码(USC2)  
  6. ///组成结构:包含四个函数:  
  7. ///          smsDecodedCenterNumber(string srvCenterNumber)            短信中心号编码  
  8. ///          smsPDUEncoded(string srvContent)                          短信内容编码  
  9. ///          smsDecodedNumber(string srvNumber)                        接收短信手机号编码  
  10. ///          smsDecodedsms(string strCenterNumber, string strNumber, string strSMScontent)   整个短信的编码  
  11. ///          一个字段  
  12. ///          string nLength;   //要发送内容的长度,由两部分组成,接收手机号加上要发送的内容  
  13. ///            
  14. ///版    本:1.0.20071104  
  15. ///用    法:  
  16. ///         1,把文件拷贝到你的项目中,添加引用  using SMS;  
  17. ///         2,定义本类,例如:PDUdecoding ss = new SMS.PDUdecoding();  
  18. ///         3,现在你就可以使用本类了,例如:  
  19. ///         textBox2.Text = ss.smsDecodedsms(txtCenterNumber.Text,txtNumber.Text,textBox1.Text);  
  20.   
  21. ////////////////////////////////////  
  22. using System;  
  23. using System.Text;  
  24.   
  25. namespace SMS  
  26. {  
  27.     public class PDUdecoding  
  28.     {  
  29.           
  30.         public string nLength;   //要发送内容的长度,由两部分组成,接收手机号加上要发送的内容  
  31.         /// <summary>  
  32.             /// 函数功能:短信内容编码  
  33.             /// 函数名称:smsPDUEncoded(string srvContent)  
  34.             /// 参    数:srvContent 要进行转换的短信内容,string类型  
  35.             /// 返 回 值:编码后的短信内容,string类型  
  36.             /// 程 序 员:klude  
  37.             /// 编制日期:2007-11-04  
  38.             /// 函数说明:  

抱歉!评论已关闭.