Esempio n. 1
0
        /// <summary>
        /// 识别结果回调函数
        /// </summary>
        /// <param name="recResultEx"></param>
        /// <param name="dwUser"></param>
        private void OnDataEx2Callback(ref CLIENT_LPRC_PLATE_RESULTEX recResultEx, uint dwUser)
        {
            recRes = recResultEx;
            if (recRes.chLicense == string.Empty)
            {
                RS485Send(Properties.Settings.Default.Plate_Error);
                return;
            }
            RS485Send(string.Format("{0},{1}", recRes.chLicense, Properties.Settings.Default.Plate_Tmp));
            delegatesOpenGate(Properties.Settings.Default.OutDoorIp, Properties.Settings.Default.OutDoorPort, Properties.Settings.Default.OutDoorSN);

            DateTime time = new DateTime(recRes.shootTime.Year, recRes.shootTime.Month, recRes.shootTime.Day, recRes.shootTime.Hour, recRes.shootTime.Minute, recRes.shootTime.Second);

            Data_.InserOut(time, recRes.chLicense);
            Log_.logInfo.Info(string.Format("{0} 写入数据库", recRes.chLicense));
            GetmessageAction(string.Format("{0} 写入数据库", recRes.chLicense));
            string mes = string.Format("Ip:{0},Plate:{1},Color:{2},Date:{3}", recRes.chCLIENTIP, recRes.chLicense, recRes.chColor,
                                       string.Format("{0}/{1}/{2} {3}:{4}:{5}", recRes.shootTime.Year, recRes.shootTime.Month, recRes.shootTime.Day, recRes.shootTime.Hour, recRes.shootTime.Minute, recRes.shootTime.Second));

            Log_.logInfo.Info(mes);
            GetmessageAction(mes);
            PlateDataCallBack(recRes.chCLIENTIP, recRes.chLicense, recRes.chColor,
                              string.Format("{0}/{1}/{2} {3}:{4}:{5}", recRes.shootTime.Year, recRes.shootTime.Month, recRes.shootTime.Day, recRes.shootTime.Hour, recRes.shootTime.Minute, recRes.shootTime.Second));
            Data(recRes);
        }
Esempio n. 2
0
        /// <summary>
        /// 显示识别结果中的图片
        /// </summary>
        /// <param name="recResultEx"></param>
        private void Data(CLIENT_LPRC_PLATE_RESULTEX recResultEx)
        {
            byte[] chJpegStream = new byte[NativeConstants.CLIENT_LPRC_BIG_PICSTREAM_SIZE_EX + 312];
            Int32  nJpegStream  = recResultEx.pFullImage.nLen;

            Array.Clear(chJpegStream, 0, chJpegStream.Length);
            Marshal.Copy(recResultEx.pFullImage.pBuffer, chJpegStream, 0, nJpegStream);
            DataJpegCallBack(chJpegStream);
        }