📄 xy.pas
字号:
//文件名称:xy.pas
//文件标识:SGIP协议(只有SG与SMG交互协议)
//摘 要:根据SGIP1.2对原协议进行更新
//当前版本:1.2
//作 者:邵青山
//完成日期:2002年10月11日
unit xy;
interface
uses
SysUtils;
const
SGIP_BIND:longword =$1; //对客户端验证
SGIP_BIND_RESP:longword =$80000001; //服务端返回验证请求
SGIP_UNBIND:longword =$2; //断开连接
SGIP_UNBIND_RESP:longword =$80000002; //返回断开连接状态
SGIP_SUBMIT:longword =$3; //向SMG提交MT短消息
SGIP_SUBMIT_RESP:longword =$80000003; //返回SP提交MT短消息状态
SGIP_DELIVER:longword =$4; //SMG向SP发送一条MO短消息
SGIP_DELIVER_RESP:longword =$80000004; //返回SMG状态
SGIP_REPORT:longword =$5; //向SP发送一条先前的submit命令的当前状态
SGIP_REPORT_RESP:longword =$80000005; //响应SMG状态
type
TEMPTY=Packed Record //空纪录
end;
//消息头
SGIPHead=Packed Record
MessageLength :longword; //消息的总长度(字节)
CommandId :longword; //命令ID
SNumber1,SNumber2,SNumber3 :longword; //序列号
end;
//消息体
XBind=Packed Record //
LonginType :byte;
LonginPass :array[0..15] of char;
LonginName :array[0..15] of char;
Reserve :array[0..7] of char;
end;
Bind_Resp=Packed Record
Result :byte;
Reserve :array[0..7] of char;
end;
//
Unbind=TEMPTY;
Unbind_Resp=TEMPTY;
//
TelCount=Packed Record //手机号码
TelN :array[0..20] of char;
end;
XSubmit=Packed Record
SPNumber :array[0..20] of char;
ChargeNumber :array[0..20] of char;
UserCount :byte; //1-100
UserNumber :array[0..99] of TelCount; //长度为UserCount
CorpID :array[0..4] of char;
ServiceType :array[0..9] of char;
FeeType :byte;
FeeValue :array[0..5] of char;
GivenValue :array[0..5] of char;
AgentFlag :byte;
MOrelatetoMTFlag :byte;
Priority :byte;
ExpireTime :array[0..15] of char;
ScheduleTime :array[0..15] of char;
ReportFlag :byte;
TP_pid :byte;
TP_udhi :byte;
MessageCoding :byte;
MessageType :byte;
MessageLength :longword;
MessageContent :array of char; //长度为 MessageLength;
Reserve :array[0..7] of char;
end;
Submit_Resp=Packed Record
Result :byte;
Reserve :array[0..7] of char;
end;
//
XDeliver=Packed Record
UserNumber :array[0..20] of char;
SPNumber :array[0..20] of char; //array[0..20] of char;
TP_pid :byte;
TP_udhi :byte;
MessageCoding :byte;
MessageLength :longword;
MessageContent :array[0..254] of char; //长度为 MessageLength;
Reserver :array[0..7] of char;
end;
Deliver_Resp=Packed Record
Result :byte;
Reserve :array[0..7] of char;
end;
//
XReport=Packed Record
SubSequNumber1,SubSequNumber2,SubSequNumber3:longword;
ReportType :byte;
UserNumber :array[0..20] of char;
State :byte;
ErrorCode :byte;
Reserve :array[0..7] of char;
end;
Report_Resp=Packed Record
Result :byte;
Reserve :array[0..7] of char;
end;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -