private void Job_Entrance_Guard_Validate(APParser apPaser)
        {
            int num = 0;

            apPaser.GetParam_Entrance_Guard(ref byte_guard_uid, ref byte_guard_data, ref num);

            string tmp1 = System.Text.Encoding.Default.GetString(byte_guard_uid);
            string tmp2 = ByteToHexString(byte_guard_data, 0, byte_guard_data.Length, 8, "");

            if (database.Guard_Validate(tmp1, tmp2, num))
            {
                udpSocket.Send(apEncapsulator.Response_Guard_Validate(byte_guard_uid, true));
            }
            else
            {
                udpSocket.Send(apEncapsulator.Response_Guard_Validate(byte_guard_uid, false));
            }
            database.CmdLog("05010700", tmp1, apPaser.GetParam_Origin_Hex());
            tmp1 = null;
            tmp2 = null;
        }
        //handle guard validate
        private void Job_Entrance_Guard_Validate(APParser apPaser)
        {
            int num = 0;

            apPaser.GetParam_Entrance_Guard(ref byte_guard_uid, ref byte_guard_data, ref num);

            string tmp1 = System.Text.Encoding.Default.GetString(byte_guard_uid);
            string tmp2 = ByteToHexString(byte_guard_data, 0, byte_guard_data.Length, 8, "");

            /* TimeSpan span = time_last.Subtract( time_receive);
             * if(span.Minutes > 2)
             * {
             *
             * }
             * else
             * {
             *
             * }*/


            iCounter_invalid = database.Guard_Validate(tmp1, tmp2, num, ref index[0], ref index[1], ref index[2], ref iPk_id);
            if (iCounter_invalid == 0)
            {
                udpSocket.Send(apEncapsulator.Response_Guard_Validate(byte_guard_uid, true));
            }
            else
            {
                udpSocket.Send(apEncapsulator.Response_Guard_Validate(byte_guard_uid, false));
                //stop cut threading
                //VideoHandler handler = new VideoHandler(iPk_id, time_receive, database, videoFilesManager, index[0], index[1], index[2]);
                //Process_Alarm();
            }

            database.CmdLog("05010700", tmp1, apPaser.GetParam_Origin_Hex());
            tmp1 = null;
            tmp2 = null;
        }