⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errormessagehelper.cs

📁 短信串口通信 于短信网关通信协议的封装 C#实现的类库
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace JeasonZhao.Sms.SGIP
{
    public class ErrorMessageHelper
    {
        private ErrorMessageHelper()
        {
        }
        public static string GetMsg(ErrorCodes err)
        {
            return GetMsg((uint)err);
        }
        public static string GetMsg(uint nErrorCode)
        {
            switch (nErrorCode)
            {
                case 0:
                    return "无错误,命令正确接收";
                case 1:
                    return "非法登录,如登录名、口令出错、登录名与口令不符等。";
                case 2:
                    return "重复登录,如在同一TCP/IP连接中连续两次以上请求登录。";
                case 3:
                    return "连接过多,指单个节点要求同时建立的连接数过多。";
                case 4:
                    return "登录类型错,指bind命令中的logintype字段出错。";
                case 5:
                    return "参数格式错,指命令中参数值与参数类型不符或与协议规定的范围不符。";
                case 6:
                    return "非法手机号码,协议中所有手机号码字段出现非86130号码或手机号码前未加“86”时都应报错。";
                case 7:
                    return "消息ID错";
                case 8:
                    return "信息长度错";
                case 9:
                    return "非法序列号,包括序列号重复、序列号格式错误等";
                case 10:
                    return "非法操作GNS";
                case 11:
                    return "节点忙,指本节点存储队列满或其他原因,暂时不能提供服务的情况";
                case 21:
                    return "目的地址不可达,指路由表存在路由且消息路由正确但被路由的节点暂时不能提供服务的情况";
                case 22:
                    return "路由错,指路由表存在路由但消息路由出错的情况,如转错SMG等";
                case 23:
                    return "路由不存在,指消息路由的节点在路由表中不存在";
                case 24:
                    return "计费号码无效,鉴权不成功时反馈的错误信息";
                case 25:
                    return "用户不能通信(如不在服务区、未开机等情况)";
                case 26:
                    return "手机内存不足";
                case 27:
                    return "手机不支持短消息";
                case 28:
                    return "手机接收短消息出现错误";
                case 29:
                    return "不知道的用户";
                case 30:
                    return "不提供此功能";
                case 31:
                    return "非法设备";
                case 32:
                    return "系统失败";
                case 33:
                    return "短信中心队列满";
                default:
                    return "其它其它错误码(待定义)";
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -