コード例 #1
0
        /// <summary>
        /// 得到195(H:C3)实体
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public static LV_61506_0419_199_Mod GetMod(byte[] content)
        {
            LV_61506_0419_199_Mod info = new LV_61506_0419_199_Mod();

            info.设备时间  = ConverUtil.Time(content, 0);
            info.中继号   = content[6].ToString();
            info.设备类型  = ConverUtil.ByteToInt_2(content, 7);
            info.设备编号  = ConverUtil.ByteToInt_4(content, 9);
            info.命令字   = content[13];
            info.进出几人次 = content[14];

            info.进出方向标识_信息 = Get_进出方向标识(content[15]);
            info.每个人身高_信息  = Get_每个人身高(content.Skip(16).Take(8).ToArray());

            info.进出结果1_信息 = Get_进出结果1(content[24]);
            info.进出结果2_信息 = Get_进出结果2(content[25]);


            info.进门累计统计 = content[26];
            info.出门累计统计 = content[27];
            info.门状态信息2 = Bit.GetBin(content[28], 0);

            info.RSSI值 = content[33];
            info.版本号   = content[34];

            return(info);
        }
コード例 #2
0
        public static Pro_IndataBase_ZNMP_Mod Get_Pro_Mod(LV_61506_0419_199_Mod info)
        {
            Pro_IndataBase_ZNMP_Mod m = new Pro_IndataBase_ZNMP_Mod();

            m.PI_STATIONNO    = info.基站编号.ToString();
            m.PI_SERVICETIME  = info.平台时间;
            m.PI_DEVICETIME   = info.设备时间;
            m.PI_RELAYNO      = info.中继号;
            m.PI_DEVICETYPE   = info.设备类型.ToString();
            m.PI_DEVID        = info.设备编号.ToString();
            m.PI_PROTOCOLTYPE = info.命令字.ToString();


            m.PI_PARAM1 = info.进出几人次.ToString();

            m.PI_PARAM2 = info.进出方向标识_信息.Merge();


            m.PI_PARAM3 = info.每个人身高_信息.Merge();
            m.PI_PARAM4 = info.进出结果1_信息.Merge();

            m.PI_PARAM5 = info.进出结果2_信息.Merge();

            m.PI_PARAM6 = info.进出结果2_信息.开始门状态.ToString();
            m.PI_PARAM7 = info.进出结果2_信息.最后门状态.ToString();


            m.PI_PARAM8 = info.进出结果2_信息.关门标志.ToString();
            m.PI_PARAM9 = info.进出结果2_信息.开门标志.ToString();



            m.PI_PARAM10 = info.进门累计统计.ToString();
            m.PI_PARAM11 = info.出门累计统计.ToString();
            m.PI_PARAM12 = info.门状态信息2.ToString();


            m.PI_VERSION = info.版本号.ToString();


            return(m);
        }
コード例 #3
0
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                LV_61506_0419_199_Mod Cm = LV_61506_0419_199_Dal.GetMod(this._content);
                Cm.基站编号 = (uint)StationId;
                Cm.平台时间 = this.PlatformTime;

                Pro_IndataBase_ZNMP_Mod info = LV_61506_0419_199_Dal.Get_Pro_Mod(Cm);

                List <Pro_IndataBase_ZNMP_Mod> list = GetList(info);


                Pro_IndataBase_ZNMP_Bll c;
                string Result = "";
                foreach (var v in list)
                {
                    c      = new Pro_IndataBase_ZNMP_Bll(v);
                    Result = c.Exec();
                    if (Result != "0")
                    {
                        MyLibrary.Log.Debug(NAME + "出错:" + Result + " 原始代码:" + OriginalCode);
                    }
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }