📄 cmppsubmitrep.java
字号:
package com.ekun.sms.cmpp2;
import com.ekun.sms.common.BuffMemoUtil;
public class CmppSubmitRep
{
public CmppSubmitRep(byte bodys[], int bodylens)
{
bodybytes = new byte[bodylens];
int i = 0;
for (i = 0; i < bodylens; i++)
{
bodybytes[i] = bodys[i];
}
//MsgId = -1;
Result = -1;
}
/*名称:getMsgId
* 功能:获取消息标识MsgId
* 输入参数:无
*
* 输出参数:无
*
* 返回值:>0:消息标识,-1:失败
*/
public byte[] getMsgId()
{
byte MsgId[] = new byte[8];
int i = 0;
for (i = 0; i < 8; i++)
{
MsgId[i] = bodybytes[i];
}
//MsgId = CmppCommon.Bytes8ToLong(tmp);
return MsgId;
}
/*名称:getResult
* 功能:获取结果
* 输入参数:无
*
* 输出参数:无
*
* 返回值: 0:正确
* 1:消息结构错
* 2:命令字错
* 3:消息序号重复
* 4:消息长度错
* 5:资费代码错
* 6:超过最大信息长
* 7:业务代码错
* 8: 流量控制错
* 9~ :其他错误
* -1:失败
*/
public int getResult()
{
byte tmp = bodybytes[8];
Result = (int) tmp;
if(Result < 0)
Result = Result + 256;
return Result;
}
byte bodybytes[]; /*包体*/
byte[] MsgId;
int Result;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -