cmpptype.~pas
来自「Delphi写的CMPP短信协议控件」· ~PAS 代码 · 共 129 行
~PAS
129 行
unit CMPPTYPE;
interface
uses
Windows, Messages, SysUtils, Classes, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient,SMSPUBLIC,SGIPTYPE,IdHash;
const
CMP_Connect :longword = 0x00000001;
CMP_Connect_REP :longword = 0x80000001;
CMP_Terminate :longword = 0x00000002;
CMP_Terminate_REP :longword = 0x80000002;
CMP_Submit :longword = 0x00000004;
CMP_Submit_REP :longword = 0x80000004;
CMP_Deliver :longword = 0x00000005;
CMP_Deliver_REP :longword = 0x80000005;
CMP_Query :longword = 0x00000006;
CMP_Query_REP :longword = 0x80000006;
CMP_Cancel :longword = 0x00000007;
CMP_Cancel_REP :longword = 0x80000007;
TYPE
TArrayMsg=Array[0..255] of Char;
TCMPPMsgHeader=record
Total_Length:LongWord;
Command_ID:LongWord;
Sequence_ID:LongWord;
end;
PCMPPMsgHeader=^TCMPPMsgHeader;
TCMPP_Connect=record
Source_Addr:String[6];
AuthenticatorSP:T4x4LongWordRecord;
Version:Byte;
TimeStamp:longWord;
end;
PCMPP_Connect=^TCMPP_Connect;
TCMPP_Connect_REP=record
Status:Byte;
AuthenticatorISMG:T4x4LongWordRecord;
Version:Byte;
end;
PCMPP_Connect_REP=^TCMPP_Connect_REP;
TCMPP_Submit=record
Msg_id:int64;
Pk_total:Byte;
Pk_number:Byte;
Registered_Deliver:Byte;
Msg_level:Byte;
Fee_UserType:Byte;
Service_id:String[10];
Fee_terminal_id:String[21];
TP_pid:Byte;
TP_udhi:Byte;
Msg_src:String[6];
FeeType:String[2];
FeeCode:String[6];
Valid_Time:String[17];
At_Time:String[17];
Src_terminal_id:String[21];
DestUsr_tl:Byte;
Dest_terminal_id:String;
Msg_Length:Byte;
case Msg_Fmt:Byte of
0,15:(Msg_Content_Str:String[170]);
3,4,8:(Msg_Content_array:TArrayMsg);
end;
PCMPP_Submit=^TCMPP_Submit;
TCMPP_Submit_Rep=Record
Msg_Id:int64;
Result:Byte;
end;
PCMPP_Submit_Rep=^TCMPP_Submit_Rep;
TCMPP_Query=Record
Time:String[8];
Query_Type:Byte;
Query_Code:String[10];
end;
PCMPP_Query=^TCMPP_Query;
TCMPP_Query_Rep=record
Time:String[8];
Query_Type:Byte;
Query_Code:String[10];
MT_TLMsg:LongWord;
MT_Tlusr:LongWord;
MT_Scs:LongWord;
MT_WT:LongWord;
MT_FL:LongWord;
MO_Scs:LongWord;
MO_WT:LongWord;
MO_FL:LongWord;
end;
PCMPP_Query_Rep=^TCMPP_Query_Rep;
TCMPP_Report=record
Msg_id:int64;
Stat:String[7];
Submit_Time:String[10];
Done_Time:String[10];
Dest_terminal_id:String[21];
SMSC_Sequence:LongWord;
end;
PCMPP_Report=^TCMPP_Report;
TCMPP_Deliver=record
Msg_Id:LongWord;
Destnation_id:String[21];
Service_id:String[10];
TP_pid:Byte;
TP_udhi:Byte;
Msg_Fmt:Byte;
Src_terminal_id:String[21];
Msg_Length:Byte;
Case Registered_Deliver:Byte of
0:(Msg_Content:TChararray);
1:(Msg_Report:TCMPP_Report);
end;
PCMPP_Deliver=^TCMPP_Deliver;
TCMPP_Deliver_Rep=record
Msg_id:Int64;
Result:Byte;
end;
PCMPP_Deliver_Rep=^TCMPP_Deliver_Rep;
implementation
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?