Ejemplo n.º 1
0
 //解析开度上下限
 public static xd100x.valvemm Read_valvemm(byte[] inByte)
 {
     xd100x.valvemm vmm = new xd100x.valvemm();
     vmm._min = DataInfo.GetLongValue2(inByte, 3);
     vmm._max = DataInfo.GetLongValue2(inByte, 5);
     return(vmm);
 }
Ejemplo n.º 2
0
 //解析室外温度修正
 public static xd100x.temprevise Read_temprevise(byte[] inByte)
 {
     xd100x.temprevise or = new xd100x.temprevise();
     or._k = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 1000.0, 3);
     or._b = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 10.0, 1);
     return(or);
 }
Ejemplo n.º 3
0
 //解析补水泵模式及设定压力
 public static xd100x.addpumpvalue Read_addpumpvalue(byte[] inByte)
 {
     xd100x.addpumpvalue av = new xd100x.addpumpvalue();
     av._type     = Convert.ToInt16(DataInfo.GetLongValue2(inByte, 3));
     av._pressure = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 100.0, 2);;
     return(av);
 }
Ejemplo n.º 4
0
 //解析流量限定
 public static xd100x.valvelimit Read_valvelimit(byte[] inByte)
 {
     xd100x.valvelimit vl = new xd100x.valvelimit();
     vl._enable = DataInfo.GetLongValue2(inByte, 3);
     vl._limit  = DataInfo.GetLongValue2(inByte, 5);
     return(vl);
 }
Ejemplo n.º 5
0
 //解析补水泵压力上下限和水箱水位上下限
 public static xd100x.addpumpmm Read_addpumpmm(byte[] inByte)
 {
     xd100x.addpumpmm amm = new xd100x.addpumpmm();
     amm._presshight = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 100.0, 2);
     amm._presslow   = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 100.0, 2);
     amm._levelhight = (float)Math.Round(DataInfo.GetLongValue2(inByte, 7) / 100.0, 2);
     amm._levellow   = (float)Math.Round(DataInfo.GetLongValue2(inByte, 9) / 100.0, 2);
     return(amm);
 }
Ejemplo n.º 6
0
 //解析报警设置
 public static xd100x.alarmt Read_alarmt(byte[] inByte)
 {
     xd100x.alarmt at = new xd100x.alarmt();
     at._yicigdiwen  = DataInfo.GetLongValue2(inByte, 3);
     at._erciggaowen = DataInfo.GetLongValue2(inByte, 5);
     at._waterlow    = (float)Math.Round(DataInfo.GetLongValue2(inByte, 7) / 100.0, 2);
     at._waterhight  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 9) / 100.0, 2);
     return(at);
 }
Ejemplo n.º 7
0
 //解析报警设置
 public static xd100x.alarmp Read_alarmp(byte[] inByte)
 {
     xd100x.alarmp ap = new xd100x.alarmp();
     ap._yicigdiya  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 100.0, 2);
     ap._erciggaoya = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 100.0, 2);
     ap._ercihgaoya = (float)Math.Round(DataInfo.GetLongValue2(inByte, 7) / 100.0, 2);
     ap._ercihdiya  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 9) / 100.0, 2);
     return(ap);
 }
Ejemplo n.º 8
0
        //数据解析区域
        #region Read
        //解析实时数据
        public static xd100x.Data Read_ai(byte[] inByte)
        {
            xd100x.Data _rdata = new xd100x.Data();
            _rdata._dt  = DateTime.Now;
            _rdata._OT  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 15) / 10.0, 1);
            _rdata._GT1 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 17) / 10.0, 1);
            _rdata._BT1 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 19) / 10.0, 1);
            _rdata._GT2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 21) / 10.0, 1);
            _rdata._BT2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 23) / 10.0, 1);

            _rdata._GP1 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 25) / 1000.0, 2);
            _rdata._BP1 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 27) / 1000.0, 2);
            _rdata._GP2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 29) / 1000.0, 2);
            _rdata._BP2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 31) / 1000.0, 2);

            _rdata._OD = (float)Math.Round(DataInfo.GetLongValue2(inByte, 33) / 10.0, 1);
            _rdata._WL = (float)Math.Round(DataInfo.GetLongValue2(inByte, 35) / 100.0, 1);

            _rdata._WI1 = (float)Math.Round(DataInfo.GetFloatValue2(inByte, 37), 1);
            _rdata._WS1 = DataInfo.GetULongValue2(inByte, 41);

            _rdata._HS1 = (float)Math.Round(DataInfo.GetFloatValue2(inByte, 45), 1);
            _rdata._HI1 = DataInfo.GetULongValue2(inByte, 49) / 10d;

            _rdata._WI2 = (float)Math.Round(DataInfo.GetFloatValue2(inByte, 65), 1);
            _rdata._WS2 = DataInfo.GetULongValue2(inByte, 69);

            _rdata._HS2 = (float)Math.Round(DataInfo.GetFloatValue2(inByte, 73), 1);
            _rdata._HI2 = DataInfo.GetULongValue2(inByte, 77) / 10d;

            _rdata._WI3 = (float)Math.Round(DataInfo.GetFloatValue2(inByte, 53), 1);
            _rdata._WS3 = DataInfo.GetULongValue2(inByte, 57);

            byte statebyte = DataInfo.GetByteValue(inByte, 86);

            xd100x.PumpState grPumpState = PumpParse(statebyte);
            _rdata._pump = grPumpState;
            byte[] warnbyte = new byte[2];
            warnbyte[1] = DataInfo.GetByteValue(inByte, 88);
            warnbyte[0] = DataInfo.GetByteValue(inByte, 87);
            xd100x.AlarmState grAlarmData = AlarmParse(warnbyte);
            _rdata._alarm = grAlarmData;

            _rdata._GTB2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 97) / 10.0, 1);
            _rdata._PA2  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 99) / 100.0, 2);
            _rdata._BPB2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 101) / 100.0, 2);
            return(_rdata);
        }
Ejemplo n.º 9
0
 //解析分时调整
 public static xd100x.valvetime Read_valvetime(byte[] inByte)
 {
     xd100x.valvetime vt = new xd100x.valvetime();
     vt._v1  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 10.0, 1);
     vt._v2  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 10.0, 1);
     vt._v3  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 7) / 10.0, 1);
     vt._v4  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 9) / 10.0, 1);
     vt._v5  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 11) / 10.0, 1);
     vt._v6  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 13) / 10.0, 1);
     vt._v7  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 15) / 10.0, 1);
     vt._v8  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 17) / 10.0, 1);
     vt._v9  = (float)Math.Round(DataInfo.GetLongValue2(inByte, 19) / 10.0, 1);
     vt._v10 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 21) / 10.0, 1);
     vt._v11 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 23) / 10.0, 1);
     vt._v12 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 25) / 10.0, 1);
     return(vt);
 }
Ejemplo n.º 10
0
 //解析压差曲线
 public static xd100x.cycpumpline Read_cycpumpline(byte[] inByte)
 {
     xd100x.cycpumpline cl = new xd100x.cycpumpline();
     cl._ov1 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 3));
     cl._pv1 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 5) / 100.0, 2);
     cl._ov2 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 7));
     cl._pv2 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 9) / 100.0, 2);
     cl._ov3 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 11));
     cl._pv3 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 13) / 100.0, 2);
     cl._ov4 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 15));
     cl._pv4 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 17) / 100.0, 2);
     cl._ov5 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 19));
     cl._pv5 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 21) / 100.0, 2);
     cl._ov6 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 23));
     cl._pv6 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 25) / 100.0, 2);
     cl._ov7 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 27));
     cl._pv7 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 29) / 100.0, 2);
     cl._ov8 = Convert.ToInt32(DataInfo.GetLongValue2(inByte, 31));
     cl._pv8 = (float)Math.Round(DataInfo.GetLongValue2(inByte, 33) / 100.0, 2);
     return(cl);
 }
Ejemplo n.º 11
0
 //解析曲线
 public static xd100x.valveline Read_valveline(byte[] inByte)
 {
     xd100x.valveline vl = new xd100x.valveline();
     vl._ov1 = DataInfo.GetLongValue2(inByte, 3);
     vl._gv1 = DataInfo.GetLongValue2(inByte, 5);
     vl._ov2 = DataInfo.GetLongValue2(inByte, 7);
     vl._gv2 = DataInfo.GetLongValue2(inByte, 9);
     vl._ov3 = DataInfo.GetLongValue2(inByte, 11);
     vl._gv3 = DataInfo.GetLongValue2(inByte, 13);
     vl._ov4 = DataInfo.GetLongValue2(inByte, 15);
     vl._gv4 = DataInfo.GetLongValue2(inByte, 17);
     vl._ov5 = DataInfo.GetLongValue2(inByte, 19);
     vl._gv5 = DataInfo.GetLongValue2(inByte, 21);
     vl._ov6 = DataInfo.GetLongValue2(inByte, 23);
     vl._gv6 = DataInfo.GetLongValue2(inByte, 25);
     vl._ov7 = DataInfo.GetLongValue2(inByte, 27);
     vl._gv7 = DataInfo.GetLongValue2(inByte, 29);
     vl._ov8 = DataInfo.GetLongValue2(inByte, 31);
     vl._gv8 = DataInfo.GetLongValue2(inByte, 33);
     return(vl);
 }
Ejemplo n.º 12
0
 //解析压差设定
 public static xd100x.cycpumpvalue Read_cycpumpvalue(byte[] inByte)
 {
     xd100x.cycpumpvalue cv = new xd100x.cycpumpvalue();
     cv._pressure = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 100.0, 2);;
     return(cv);
 }
Ejemplo n.º 13
0
 //解析室外温度设置
 public static xd100x.outmode Read_outmode(byte[] inByte)
 {
     xd100x.outmode om = new xd100x.outmode();
     om._outmode = DataInfo.GetLongValue2(inByte, 3);
     return(om);
 }
Ejemplo n.º 14
0
 //解析设定值
 public static xd100x.valvevalue Read_valvevalue(byte[] inByte)
 {
     xd100x.valvevalue vv = new xd100x.valvevalue();
     vv._value = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 10.0, 1);
     return(vv);
 }
Ejemplo n.º 15
0
 //解析设置类型
 public static xd100x.valvecontrol Read_valvecontrol(byte[] inByte)
 {
     xd100x.valvecontrol vc = new xd100x.valvecontrol();
     vc._control = DataInfo.GetLongValue2(inByte, 3);
     return(vc);
 }