做过CNGP短信SP端的高人请进!急等!(50分)

  • 主题发起人 主题发起人 wugwdelphi
  • 开始时间 开始时间
W

wugwdelphi

Unregistered / Unconfirmed
GUEST, unregistred user!
我看了PHS短消息网关技术规范第一分册以后对几个概念很模糊,望高人指点。<br>1)mo 就是一种 deliver,只是其isreport=0是吗?<br>2)mt 就是一种 submit,只是专门用于回应deliver(isreport=0)的一条短消息吗?<br>3)deliver的isreport(0或者1),当0时其代表MO,当1时表示对submit(needreport=1)消息的回应吗?<br>4) 当mo上来时SP要mt(也就是submit)下去一条短消息,而此时SP如何取回mt的“状态报告”,此时的MT状态报告就是一个deliver(isreport=1)的消息吗?如果是这样那么协议定义MT状态报告中四个属性(sub,dlvrd,stat,err)值怎么取得,前面两个属性值倒一在意,都是001,另两个才正是想要的,可deliver数据结构并没有明确指明哪几个与此对应,真是急死人了。
 
接分~<br>呵呵
 
楼上的兄弟别傻了,楼主要放分就不会把问题撤了。
 
楼主没分了
 
哈哈,我是没分了.跟分没关系,问题挂这很久了,没有人问,反而改成这个名字却有人问题了,哈哈<br>目前我有一个小问题哪个朋友回答一下?<br>TList.assign(sourceList,la***,bList),用它把多个tlIST连接起来.
 
此问题是问cngp短信开发的,一直没人回答于是就撤了.
 
啊~~~~~<br>原来如此<br>恐怕要让楼主失望了,SORRY
 
现在问题名变了,japhe是否可以给点建议
 
TList.assign 是TLIST的拷贝。。<br>如果能进行追加方式的拷贝的话,楼主的问题是不是就解决了啊?<br><br>Copies elements of one list to another. <br><br>procedure Assign(ListA: TList; AOperator: TListAssignOp = laCopy; ListB: TList = nil);<br><br>TListAssignOp = (laCopy, laAnd, laOr, laXor, laSrcUnique, laDestUnique);<br><br>Description<br><br>Call Assign to assign the elements of another list to this one. Assign combines the source list with this one using the logical operator specified by the AOperator parameter.<br><br>If the ListB parameter is specified, then Assign first replaces all the elements of this list with those in ListA, and then merges ListB into this list using the operator specified by AOperator.<br><br>If the ListB parameter is not specified, then Assign merges ListA into this list using the operator specified by AOperator.
 
哈,是啊,这段我看过了,不得其法,参数全试过了,没解决代码如下<br>unit Unit1;<br><br>interface<br><br>uses<br> &nbsp;Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> &nbsp;Dialogs, StdCtrls;<br><br>type<br> &nbsp;TForm1 = class(TForm)<br> &nbsp; &nbsp;Button1: TButton;<br> &nbsp; &nbsp;procedure Button1Click(Sender: TObject);<br> &nbsp; &nbsp;procedure FormCreate(Sender: TObject);<br> &nbsp; &nbsp;procedure FormClose(Sender: TObject; var Action: TCloseAction);<br> &nbsp;private<br> &nbsp; &nbsp;{ Private declarations }<br> &nbsp;public<br> &nbsp; &nbsp;{ Public declarations }<br> &nbsp;end;<br>type<br> &nbsp; &nbsp;pTest = ^ rTest;<br> &nbsp; &nbsp;rTest = packed record<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;x : string[120];<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;y : integer;<br> &nbsp; &nbsp;end;<br><br>var<br> &nbsp;Form1: TForm1;<br> &nbsp; &nbsp;al : Tlist;<br> &nbsp; &nbsp;bl : Tlist;<br> &nbsp; &nbsp;cl : Tlist;<br> &nbsp; &nbsp;dl : Tlist;<br> &nbsp; &nbsp;all : Tlist;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> &nbsp; &nbsp;rt : rTest;<br> &nbsp; &nbsp;i : integer;<br>begin<br> &nbsp; &nbsp; &nbsp;rt.x := '123';<br> &nbsp; &nbsp; &nbsp;rt.y := 123;<br> &nbsp; &nbsp; &nbsp;for i := 0 to 9 do begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;al.Add(@rt);<br> &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp;rt.x := 'ddd';<br> &nbsp; &nbsp; &nbsp;rt.y := 999;<br> &nbsp; &nbsp; &nbsp;for i := 0 to 9 do begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bl.Add(@rt);<br> &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp;for i := 0 to 9 do begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cl.Add(@rt);<br> &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp;for i := 0 to 9 do begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dl.Add(@rt);<br> &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp;all.Assign(al,laOr);<br>// &nbsp; &nbsp; &nbsp;all.Assign(bl,laOr);<br>// &nbsp; &nbsp; &nbsp;all.Assign(bl,laand);<br>// &nbsp; &nbsp; &nbsp;all.Assign(cl,lacopy,all);<br>// &nbsp; &nbsp; &nbsp;all.Assign(dl,lacopy,all);<br> &nbsp; &nbsp; &nbsp;showmessage(inttostr(all.count));<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> &nbsp; &nbsp; &nbsp;al := Tlist.Create ;<br> &nbsp; &nbsp; &nbsp;bl := Tlist.Create ;<br> &nbsp; &nbsp; &nbsp;cl := Tlist.Create ;<br> &nbsp; &nbsp; &nbsp;dl := Tlist.Create ;<br> &nbsp; &nbsp; &nbsp;all := Tlist.Create ;<br>end;<br><br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>begin<br> &nbsp; &nbsp; &nbsp;al.Free ;<br> &nbsp; &nbsp; &nbsp;bl.Free ;<br> &nbsp; &nbsp; &nbsp;cl.Free ;<br> &nbsp; &nbsp; &nbsp;dl.Free ;<br> &nbsp; &nbsp; &nbsp;all.Free ;<br>end;<br><br>end.
 
我也没接触过,只能在网上帮忙找找资料了,呵呵。
 
按说法:<br>1)If the ListB parameter is not specified, then Assign merges ListA into this list using the operator specified by AOperator<br>2) &nbsp;// &nbsp; laOr &nbsp; = union of the two lists(摘自CLASSES单元)<br><br> &nbsp; &nbsp; &nbsp;all.Assign(al);<br> &nbsp; &nbsp; &nbsp;all.Assign(bl,laOr);<br>以下两行应该得到的all.count =20 ,but 10 why?
 
谢谢japhe,我也在网上搜了一会,但没有找到这方面的东西,希望你能有所获,呵呵.
 
这样把,你把<br>al : Tlist;<br>bl : Tlist;<br>cl : Tlist;<br>dl : Tlist;<br>的指针放到 all : Tlist; 中<br>all.Clear;<br>all.Add(@al);<br>all.Add(@bl);<br>all.Add(@cl);<br>all.Add(@dl);<br>取值的时候用<br>TList(all.Items[0]^)取al : Tlist;的值<br>TList(all.Items[1]^)取bl : Tlist;的值<br>TList(all.Items[2]^)取cl : Tlist;的值<br>TList(all.Items[3]^)取dl : Tlist;的值
 
哈哈,那成多维了,我这里不想要这个,原因是我这是按不同优先级存放的信息,比如0-9我就可以按顺序合并,而取的时候只管从ALL 中由0开始取,程序根本不必要管,优先顺序,一个个取就行了,你这样一弄反倒麻烦了.<br>我试验了一下还是FOR吧,我看了tlIST的assign它也没什么好办法,也是FOR完成的.
 
多人接受答案了。
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部