Beispiel #1
0
        /// <summary>
        /// 解析所有数据 GPS数据 附加数据包 状态数据包
        /// </summary>
        public override int AnalyseData()
        {
            //解析Gps数据包
            GpsData = new ZhongXunGpsData();
            int index = GpsData.AnalyseData(0, _gprsFrame.ContentBytes);
            //解析附加数据包
            index--;
            STATDATA = new ZhongXunSTATDATA();
            index = STATDATA.AnalyseData(index, _gprsFrame.ContentBytes);

            //解析警情信息据包
            ALARM = new ZhongXunALARM();
            index = ALARM.AnalyseData(index, _gprsFrame.ContentBytes);

            return 0;
        }
Beispiel #2
0
        /// <summary>
        /// 解析所有数据 GPS数据 附加数据包 状态数据包
        /// </summary>
        public override int AnalyseData()
        {
            //解析Gps数据包
            GpsData = new ZhongXunGpsData();
            int index = GpsData.AnalyseData(0, _gprsFrame.ContentBytes);

            //附加数据包
            byte[] destBuffer = new byte[_gprsFrame.ContentBytes.Length - index - 6];
            Array.Copy(_gprsFrame.ContentBytes, index, destBuffer, 0, destBuffer.Length);
            STATDATA = new ZhongXunSTATDATA();
            STATDATA.AnalyseData(0, destBuffer);


            //状态数据包 最后6个数据包
            index += destBuffer.Length;
            destBuffer = new byte[6];
            Array.Copy(_gprsFrame.ContentBytes, index, destBuffer, 0, destBuffer.Length);
            VSTATE = new ZhongXunVSTATE(destBuffer);
            return 0;
        }