Esempio n. 1
0
 /// <summary>
 /// ��ȡ�ϴ�����״̬
 /// </summary>
 /// <param name="data"></param>
 /// <param name="refValue"></param>
 private void Read_Sts(byte[] Data, ref object oPars)
 {
     switch (Data[5])
     {
         //���״̬
         case 0x00:
             oPars = new Pump_Sts(address, "��óɹ�");
             break;
         //ͣ��״̬
         case 0x01:
             oPars = new Pump_Sts(address, "ͣ�óɹ�");
             break;
         //ˮ������״̬
         case 0x02:
             oPars = new Pump_Sts(address, "ˮ�����óɹ�");
             break;
         //���������
         case 0x03:
             oPars = new Pump_Sts(address, "��������óɹ�");
             break;
         //��ͣ������
         case 0x04:
             oPars = new Pump_Sts(address, "��ͣ�����óɹ�");
             break;
         //���ݿ�����
         case 0x05:
             oPars = new Pump_Sts(address, "���ݿ����óɹ�");
             break;
         //��������
         case 0x07:
             oPars = new Pump_Sts(address, "�������óɹ�");
             break;
         //������
         case 0x08:
             oPars = new Pump_Sts(address, "Ч�����óɹ�");
             break;
         //վ������
         case 0x09:
             oPars = new Pump_Sts(address, "վ�����óɹ�");
             break;
         //�񶯴���������ʱ��
         case 0x0A:
             oPars = new Pump_Sts(address, "�񶯴���������ʱ�����óɹ�");
             break;
         //�޸�����
         case 0x0B:
             oPars = new Pump_Sts(address, "�޸����ڳɹ�");
             break;
         //�޸�ʱ��
         case 0x0C:
             oPars = new Pump_Sts(address, "�޸�ʱ��ɹ�");
             break;
         //������м�¼
         case 0x0D:
             oPars = new Pump_Sts(address, "������м�¼�ɹ�");
             break;
         //����򿨼�¼
         case 0x0E:
             oPars = new Pump_Sts(address, "����򿨼�¼�ɹ�");
             break;
         //���ʣ��ˮ������ˮ��
         case 0x0F:
             oPars = new Pump_Sts(address, "���ʣ��ˮ������ˮ���ɹ�");
             break;
         //�������ʱ��
         case 0x10:
             oPars = new Pump_Sts(address, "�������ʱ��ɹ�");
             break;
         //���ñ�վǿ��״̬
         case 0x18:
             oPars = new Pump_Sts(address, "�������óɹ�");
             break;
         //��ȡ���������
         case 0x1E:
             string Pwd_Mn = Convert.ToString(Data[7] * 256 + Data[8]);
             oPars = new Pump_Sts(address, "���������:" + "\r\n" + Pwd_Mn);
             break;
         //��ȡ��ͣ������
         case 0x1F:
             string Pwd_Rs = Convert.ToString(Data[7] * 256 + Data[8]);
             oPars = new Pump_Sts(address, "��ͣ������:" + "\r\n" + Pwd_Rs);
             break;
         //��ȡ���ݿ�����
         case 0x20:
             string Pwd_Dt = Convert.ToString(Data[7] * 256 + Data[8]);
             oPars = new Pump_Sts(address, "���ݿ�����:" + "\r\n" + Pwd_Dt);
             break;
         //���ù��������
         case 0x21:
             oPars = new Pump_Sts(address, "���ù��������ɹ�");
             break;
         //������ͣ������
         case 0x22:
             oPars = new Pump_Sts(address, "������ͣ������ɹ�");
             break;
         //�������ݿ�����
         case 0x23:
             oPars = new Pump_Sts(address, "�������ݿ�����ɹ�");
             break;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 读取上传数据状态
        /// </summary>
        /// <param name="data"></param>
        /// <param name="refValue"></param>
        private void Read_Sts(byte[] Data, ref object oPars)
        {
            switch (Data[5])
            {
            //启泵状态
            case 0x00:
                oPars = new Pump_Sts(address, "启泵成功");
                break;

            //停泵状态
            case 0x01:
                oPars = new Pump_Sts(address, "停泵成功");
                break;

            //水量设置状态
            case 0x02:
                oPars = new Pump_Sts(address, "水量设置成功");
                break;

            //管理卡设置
            case 0x03:
                oPars = new Pump_Sts(address, "管理卡设置成功");
                break;

            //启停卡设置
            case 0x04:
                oPars = new Pump_Sts(address, "启停卡设置成功");
                break;

            //数据卡设置
            case 0x05:
                oPars = new Pump_Sts(address, "数据卡设置成功");
                break;

            //流量设置
            case 0x07:
                oPars = new Pump_Sts(address, "流量设置成功");
                break;

            //效率设置
            case 0x08:
                oPars = new Pump_Sts(address, "效率设置成功");
                break;

            //站号设置
            case 0x09:
                oPars = new Pump_Sts(address, "站号设置成功");
                break;

            //振动传感器阻尼时间
            case 0x0A:
                oPars = new Pump_Sts(address, "振动传感器阻尼时间设置成功");
                break;

            //修改日期
            case 0x0B:
                oPars = new Pump_Sts(address, "修改日期成功");
                break;

            //修改时间
            case 0x0C:
                oPars = new Pump_Sts(address, "修改时间成功");
                break;

            //清除运行记录
            case 0x0D:
                oPars = new Pump_Sts(address, "清除运行记录成功");
                break;

            //清除打卡记录
            case 0x0E:
                oPars = new Pump_Sts(address, "清除打卡记录成功");
                break;

            //清除剩余水量总用水量
            case 0x0F:
                oPars = new Pump_Sts(address, "清除剩余水量总用水量成功");
                break;

            //清除已用时间
            case 0x10:
                oPars = new Pump_Sts(address, "清除已用时间成功");
                break;

            //设置泵站强启状态
            case 0x18:
                oPars = new Pump_Sts(address, "操作设置成功");
                break;

            //读取管理卡密码
            case 0x1E:
                string Pwd_Mn = Convert.ToString(Data[7] * 256 + Data[8]);
                oPars = new Pump_Sts(address, "管理卡密码:" + "\r\n" + Pwd_Mn);
                break;

            //读取启停卡密码
            case 0x1F:
                string Pwd_Rs = Convert.ToString(Data[7] * 256 + Data[8]);
                oPars = new Pump_Sts(address, "启停卡密码:" + "\r\n" + Pwd_Rs);
                break;

            //读取数据卡密码
            case 0x20:
                string Pwd_Dt = Convert.ToString(Data[7] * 256 + Data[8]);
                oPars = new Pump_Sts(address, "数据卡密码:" + "\r\n" + Pwd_Dt);
                break;

            //设置管理卡密码
            case 0x21:
                oPars = new Pump_Sts(address, "设置管理卡密码成功");
                break;

            //设置启停卡密码
            case 0x22:
                oPars = new Pump_Sts(address, "设置启停卡密码成功");
                break;

            //设置数据卡密码
            case 0x23:
                oPars = new Pump_Sts(address, "设置数据卡密码成功");
                break;
            }
        }