예제 #1
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析补水泵压力设定
 public static xd100x.addpumpvalue Read_addpumpvalue(byte[] inByte)
 {
     xd100x.addpumpvalue av = new xd100x.addpumpvalue();
     av._type     = DataInfo.GetByteValue(inByte, 8);
     av._pressure = DataInfo.GetFloatValue(inByte, 9);
     return(av);
 }
예제 #2
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析报警设置温度液位
 public static xd100x.alarmt Read_alarmt(byte[] inByte)
 {
     xd100x.alarmt at = new xd100x.alarmt();
     at._yicigdiwen  = Convert.ToInt16(DataInfo.GetFloatValue(inByte, 8));
     at._erciggaowen = Convert.ToInt16(DataInfo.GetFloatValue(inByte, 12));
     at._waterhight  = DataInfo.GetFloatValue(inByte, 16);
     at._waterlow    = DataInfo.GetFloatValue(inByte, 20);
     return(at);
 }
예제 #3
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析报警设置压力
 public static xd100x.alarmp Read_alarmp(byte[] inByte)
 {
     xd100x.alarmp ap = new xd100x.alarmp();
     ap._yicigdiya  = DataInfo.GetFloatValue(inByte, 8);
     ap._erciggaoya = DataInfo.GetFloatValue(inByte, 12);
     ap._ercihgaoya = DataInfo.GetFloatValue(inByte, 16);
     ap._ercihdiya  = DataInfo.GetFloatValue(inByte, 20);
     return(ap);
 }
예제 #4
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析补水压力上下限 水箱水位上下限
 public static xd100x.addpumpmm Read_addpumpmm(byte[] inByte)
 {
     xd100x.addpumpmm sam = new xd100x.addpumpmm();
     sam._presshight = DataInfo.GetFloatValue(inByte, 8);
     sam._presslow   = DataInfo.GetFloatValue(inByte, 12);
     sam._levelhight = DataInfo.GetFloatValue(inByte, 16);
     sam._levellow   = DataInfo.GetFloatValue(inByte, 20);
     return(sam);
 }
예제 #5
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析温度修正
 public static xd100x.temprevise Read_temprevise(byte[] inByte)
 {
     xd100x.temprevise or = new xd100x.temprevise();
     or._channel = DataInfo.GetByteValue(inByte, 8);
     or._type    = DataInfo.GetByteValue(inByte, 9);
     or._unit    = DataInfo.GetByteValue(inByte, 10);
     or._max     = DataInfo.GetFloatValue(inByte, 11);
     or._min     = DataInfo.GetFloatValue(inByte, 15);
     or._k       = DataInfo.GetFloatValue(inByte, 19);
     or._b       = DataInfo.GetFloatValue(inByte, 23);
     return(or);
 }
예제 #6
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
        //解析实时数据
        public static xd100x.Data Read_ai(byte[] inByte)
        {
            xd100x.Data _rdata = new xd100x.Data();
            _rdata._dt = DateTime.Now;

            _rdata._GTB2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 15), 1);
            _rdata._PA2  = (float)Math.Round(DataInfo.GetFloatValue(inByte, 19), 2);
            _rdata._BPB2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 23), 2);

            _rdata._OT  = (float)Math.Round(DataInfo.GetFloatValue(inByte, 27), 1);
            _rdata._GT1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 31), 1);
            _rdata._BT1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 35), 1);
            _rdata._GT2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 39), 1);
            _rdata._BT2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 43), 1);

            _rdata._GP1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 47), 2);
            _rdata._BP1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 51), 2);
            _rdata._GP2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 55), 2);
            _rdata._BP2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 59), 2);

            _rdata._OD = DataInfo.GetByteValue(inByte, 63);
            _rdata._WL = (float)Math.Round(DataInfo.GetFloatValue(inByte, 64), 2);

            _rdata._WI1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 68), 1);
            _rdata._WI3 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 72), 1);
            _rdata._HS1 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 76), 1);
            _rdata._HS2 = (float)Math.Round(DataInfo.GetFloatValue(inByte, 80), 1);
            _rdata._WI2 = (float)Math.Round(0f, 1);

            _rdata._WS1 = DataInfo.GetULongValue(inByte, 84);
            _rdata._WS3 = DataInfo.GetULongValue(inByte, 88);
            _rdata._HI1 = DataInfo.GetULongValue(inByte, 92);
            _rdata._HI2 = DataInfo.GetULongValue(inByte, 96);
            _rdata._WS2 = 0;

            byte[] warnbyte = new byte[2];
            warnbyte[0] = DataInfo.GetByteValue(inByte, 101);
            warnbyte[1] = DataInfo.GetByteValue(inByte, 102);
            xd100x.AlarmState grAlarmData = AlarmParse(warnbyte);
            _rdata._alarm = grAlarmData;

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

            xd100x.PumpState grPumpState = PumpParse(statebyte);
            _rdata._pump = grPumpState;

            return(_rdata);
        }
예제 #7
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析室外温度值
 public static xd100x.outtemp Read_outtemp(byte[] inByte)
 {
     xd100x.outtemp op = new xd100x.outtemp();
     op._outtemp = DataInfo.GetFloatValue(inByte, 8);
     return(op);
 }
예제 #8
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析循环泵压差设定
 public static xd100x.cycpumpvalue Read_cycpumpvalue(byte[] inByte)
 {
     xd100x.cycpumpvalue cv = new xd100x.cycpumpvalue();
     cv._pressure = DataInfo.GetFloatValue(inByte, 8);
     return(cv);
 }
예제 #9
0
파일: xd100.cs 프로젝트: wwkkww1983/bt
 //解析设置值
 public static xd100x.valvevalue Read_valvevalue(byte[] inByte)
 {
     xd100x.valvevalue vv = new xd100x.valvevalue();
     vv._value = DataInfo.GetFloatValue(inByte, 9);
     return(vv);
 }