Ejemplo n.º 1
0
 public KaiYanDataParser(TransfersType t, string codefix,IGPSDataProcessor Storage)
     : base(t,Storage)
 {
     base.TransfersType = t;
     base.CodePrefix = codefix;
     _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
     _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
         .OnSendAnswerToWebEvent);
     _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);
 }
Ejemplo n.º 2
0
        public LianHuaYingKeDataParser(string codefix, IGPSDataProcessor Storage)
            : base(Storage)
        {
            base.CodePrefix = codefix;
            base.TransfersType = TransfersType.IsTcp;

            _SessionCodeTb = new Hashtable();
            _CodeVehicleStatusTb = new Hashtable();
            _CodeVehicleGpsData = new Dictionary<string, GPSDataEntity>();
            _CodeGpsTypeRelation = new Dictionary<string, KKS_HDType>();

            _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
            _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
                .OnSendAnswerToWebEvent);
            _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);

        }
Ejemplo n.º 3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="codePrefix"></param>
 /// <param name="Storage"></param>
 public GPSHBBuBiaoDataParser(string codePrefix, IGPSDataProcessor Storage)
     : base(Storage)
 {
     //照片最大上传时间
     TAKEPICTURETIMEOUT = 60;
     base.TransfersType = TransfersType.IsTcp;
     base.CodePrefix = codePrefix;
     base.StorageService = Storage;
     _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
     _LongMsgProcessor = new BuBiaoLongMsgProcessor();
     PhotoPath = ConfigHelper.GetConfig("PhotoPath");
     dicSerialNum = new Dictionary<string, ushort>();
     dicDeviceHasRegiste = new Dictionary<string, byte>();
     _DicPreviousPkg = new Dictionary<string, byte[]>();
     dicNeedSaveDeviceRegiste = new Dictionary<string, TMLRegisterFrameReq>();
     dicCurPicCameraId = new Dictionary<string, string>();
     //dicPlatformAllVehilceInfo = FetchData.GetInstance().GetPlatformVehicleInfo();  
     _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
            .OnSendAnswerToWebEvent);
 }
Ejemplo n.º 4
0
        //private static void UpdatePhotoingType(string strGPSCode, byte PhotoingType)
        //{
        //    Logger.Info("[拍照]设置拍照类型:GPSCode:" + strGPSCode + "--PhotoingType:" + PhotoingType.ToString());
        //    lock (CurPhotoingType)
        //    {
        //        if (CurPhotoingType.ContainsKey(strGPSCode))
        //            CurPhotoingType[strGPSCode] = PhotoingType;
        //        else
        //            CurPhotoingType.Add(strGPSCode, PhotoingType);
        //    }

        //}

        public BoShiJieDataParser(TransfersType t, string codefix, IGPSDataProcessor Storage)
            : base(t, Storage)
        {
            //照片最大上传时间
            TAKEPICTURETIMEOUT = 80;

            base.TransfersType = t;
            base.CodePrefix = codefix;
            if (t == TransfersType.IsTcp)
            {
                BoShiJiePictures.Instance.ParserTCP = this;
                _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
                _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
                    .OnSendAnswerToWebEvent);
                _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);
            }

            //拍照路径
            PhotoPath = ConfigHelper.GetConfig("PhotoPath");

            if (t == TransfersType.IsUdp)
            {
                BoShiJiePictures.Instance.ParserUDP = this;
                BoShiJieVehicleSettings.Instance.Parser = this;
                ClearEvent += new ClearEnvironment(BoShiJiePictures.Instance.RemovePic);
                HardwareSendPic = new Dictionary<string, BoShiJiePicture>();
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="codePrefix"></param>
        /// <param name="Storage"></param>
        public YaXunDataParser(string codePrefix, IGPSDataProcessor Storage): base(Storage)
        {
            base.TransfersType = TransfersType.IsTcp;
            base.CodePrefix = codePrefix;

            base.StorageService = Storage;


            _CodeSessionTb = new Hashtable();

            _SessionCodeTb = new Hashtable();

            _LinkSeekTb = new Hashtable();

            _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
        }
Ejemplo n.º 6
0
 public XinAnDataParser(string codefix, IGPSDataProcessor Storage)
     : base(Storage)
 {           
     base.CodePrefix = codefix;
     base.TransfersType = TransfersType.IsUdp;
     _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
     _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
         .OnSendAnswerToWebEvent);
     //updated by lixun on 2010/11/11
     //_ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);
     _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataWithGPSPortEvent);
 }
Ejemplo n.º 7
0
        /// <summary> 将接收到的数据加入队列
        /// 
        /// </summary>
        /// <param name="receivedBytes"></param>
        //public override void AddInBytesQueue(SessionData sessionData)
        //{
        //    lock (ReceivedBytesQueue)
        //    {
        //        ReceivedBytesQueue.Enqueue(sessionData);
        //    }
        //}       

        public DiBiaoDataParser(TransfersType t, string codefix,IGPSDataProcessor Storage)
            : base(t,Storage)
        {
            //base.StorageService = Storage;
            base.TransfersType = t;
            base.CodePrefix = codefix;
            _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
            _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
                .OnSendAnswerToWebEvent);
            _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);
            //拍照初始化数据
            InitData();            
        }       
Ejemplo n.º 8
0
        public LongHanDataParser(TransfersType t, string codefix,IGPSDataProcessor Storage)
            : base(t, Storage)
        {
            base.TransfersType = t;
            base.CodePrefix = codefix;
            _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
            _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
                .OnSendAnswerToWebEvent);
            _ProcessAppLayerCmd.SendDataEvent += new ProcessAppLayerCmd.SendDataHandler(base.OnSendDataEvent);
            //拍照路径
            PhotoPath = ConfigHelper.GetConfig("PhotoPath");
            //LongHanPictures.Instance.Parser = this;
            LongHanVehicleSettings.Instance.Parser = this;

            //if (t == TransfersType.IsTcp)
            //{
            //    ContinuouslyShutters.Instance.IntervalTakePhoto = new ContinuouslyShutters.IntervalTakePhotoHandler(LongHanContinuouslyTakePhotoHandler);
            //    IntervalShutters.Instance.Parser = this;
            //    IntervalShutters.Instance.ReloadSetting(codefix);
            //    IntervalShutters.Instance.IntervalTakePhoto = new ContinuouslyShutters.IntervalTakePhotoHandler(LongHanIntervalTakePhotoHandler);
            //}

        }
Ejemplo n.º 9
0
        /// <summary>
        /// 系统启动时初始化数据
        /// </summary>
        private void InitData()
        {
            try
            {               
               
                //初始化定时监控列表
                FillDic_GpsTraceInterval();

                //初始化LED配置参数
                RefreshLedParaCache();

                this.TransfersType = TransfersType.IsTcp;

                _ProcessAppLayerCmd = new ProcessAppLayerCmd(this);
                _ProcessAppLayerCmd.SendAnswerToWebEvent += new ProcessAppLayerCmd.SendAnswerToWebHandler(base
                    .OnSendAnswerToWebEvent);

                //拍照路径
                PhotoPath = ConfigHelper.GetConfig("PhotoPath");
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
            }
        }