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


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

                Pro_IndataBase_ZNMP_Mod info = LV_61506_0419_195_Dal.Get_Pro_Mod(Cm);

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

            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 得到智能门牌过程实体
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public static Pro_IndataBase_ZNMP_Mod Get_Pro_Mod(LV_61506_0419_195_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.头部信息.进出门标志.ToString();
            m.PI_PARAM3 = info.头部信息.关门标志.ToString();
            m.PI_PARAM4 = info.头部信息.开关标志.ToString();
            m.PI_PARAM5 = info.头部信息.是否有多人进入.ToString();

            m.PI_PARAM6  = info.腿部信息.Merge();
            m.PI_PARAM7  = info.手臂信息.Merge();
            m.PI_PARAM8  = info.肩膀信息.Merge();
            m.PI_PARAM9  = info.面部信息.Merge();
            m.PI_PARAM10 = info.头部信息.Merge();

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

            return(m);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 得到195(H:C3)实体
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public static LV_61506_0419_195_Mod GetMod(byte[] content)
        {
            LV_61506_0419_195_Mod info = new LV_61506_0419_195_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.腿部信息  = GetLegMod(content.Skip(15).Take(2).ToArray());
            info.手臂信息  = GetArmMod(content.Skip(17).Take(3).ToArray());
            info.肩膀信息  = GetShoulderMod(content.Skip(20).Take(4).ToArray());
            info.面部信息  = GetFaceMod(content.Skip(24).Take(3).ToArray());
            info.头部信息  = GetHeadMod(content.Skip(27).Take(6).ToArray());
            info.RSSI值 = content[33];
            info.版本号   = content[34];

            return(info);
        }