public YongHuaDataParser(string codefix, IGPSDataProcessor Storage) : base(Storage) { base.CodePrefix = codefix; base.TransfersType = TransfersType.IsTcp; }
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); }
/// <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); }
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); }
protected AnalyseBase(IGPSDataProcessor Storage) { _StorageService = Storage; }
/// <summary> /// 构造函数 /// </summary> protected AnalyseBase(TransfersType t,IGPSDataProcessor Storage) { _TransfersType = t; _StorageService = Storage; }
/// <summary> /// 创建数据解析器对象 /// </summary> private void CreateDataParser(IGPSDataProcessor Storage) { try { switch (gpsType) { case "0001": Storage.CodePrefix = "0001"; GpsDataParserUDP = new XinAnDataParser("0001", Storage); break; case "0007": Storage.CodePrefix = "0007"; GpsDataParserTCP = new KaiYanDataParser(TransfersType.IsTcp, "0007", Storage); GpsDataParserUDP = new KaiYanDataParser(TransfersType.IsUdp, "0007", Storage); break; case "0009": Storage.CodePrefix = "0009"; GpsDataParserTCP = new YouWeiDataParser("0009", IsPrivateCar, Storage); break; case "0013": Storage.CodePrefix = "0013"; GpsDataParserTCP = new BoShiJieDataParser(TransfersType.IsTcp, "0013", Storage); GpsDataParserUDP = new BoShiJieDataParser(TransfersType.IsUdp, "0013", Storage); break; case "0014": Storage.CodePrefix = "0014"; if (ProtocolType == "UDP") GpsDataParserUDP = new DiBiaoDataParser(TransfersType.IsUdp, "0014", Storage); else if (ProtocolType == "TCP") GpsDataParserTCP = new DiBiaoDataParser(TransfersType.IsTcp, "0014", Storage); else if (ProtocolType == "TCP|UDP") { GpsDataParserUDP = new DiBiaoDataParser(TransfersType.IsUdp, "0014", Storage); GpsDataParserTCP = new DiBiaoDataParser(TransfersType.IsTcp, "0014", Storage); } break; case "0016": Storage.CodePrefix = "0016"; GpsDataParserTCP = new LongHanDataParser(TransfersType.IsTcp, "0016", Storage); GpsDataParserUDP = new LongHanDataParser(TransfersType.IsUdp, "0016", Storage); break; case "0019": //雅讯 Storage.CodePrefix = gpsType; GpsDataParserTCP = new YaXunDataParser(gpsType, Storage); break; case "0020": //0020部标 Storage.CodePrefix = gpsType; GpsDataParserTCP = new BuBiaoDataParser(gpsType, Storage); GpsDataParserTCP.Distributor = lstDistributor; break; case "0022": //永华 Storage.CodePrefix = gpsType; GpsDataParserTCP = new YongHuaDataParser(gpsType, Storage); break; case "0023": //康凯斯 Storage.CodePrefix = "0023"; GpsDataParserTCP = new KangKaiSiDataParser(gpsType, Storage); break; case "0033": // 联华盈科 Storage.CodePrefix = gpsType; GpsDataParserTCP = new LianHuaYingKeDataParser(gpsType, Storage); break; case "0099": Storage.CodePrefix = gpsType; GpsDataParserTCP = new MovoOneDataParser(gpsType, Storage); break; default: throw new Exception("非法的GPS类型,请查看配置"); } } catch (Exception ex) { Logger.Error(ex, null); } }
/// <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); }
//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>(); } }
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); }
/// <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(); }
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); //} }
/// <summary> /// 构造函数 /// </summary> public YouWeiDataParser(string codefix, bool isprivatecar,IGPSDataProcessor Storage) : base(Storage) { /// <summary> /// 拍照超时(单位:秒) /// </summary> TAKEPICTURETIMEOUT = 45; mIsPrivateCar = isprivatecar; base.TransfersType = TransfersType.IsTcp; base.CodePrefix = codefix; //系统启动时初始化数据 InitData(); }