Пример #1
0
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg = null;
            //GPS Code
            string fullGpsCode = string.Empty;
            GPSLogDataStruct logData = new GPSLogDataStruct();
            List<GPSDataEntity> dataEntitys = new List<GPSDataEntity>();

            logData.buffer = (byte[])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;

            dataEntitys = Parse(sessionData.ReceivedData, out responseMsg, out fullGpsCode, sessionData.SessionID);

            if (responseMsg != null && responseMsg.Count > 0)
            {
                foreach (byte[] Msg in responseMsg)
                {
                    OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                    Thread.Sleep(50);
                }
            }

            logData.FullGpsCode = fullGpsCode;
            base.AddInLogQueue(logData);

            return dataEntitys;
        }
Пример #2
0
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg;
            //GPS Code
            string gpsCode = string.Empty;

            List<GPSDataEntity> lstData = null;
            GPSLogDataStruct logData = new GPSLogDataStruct();
            //edit by huangyz Ticket #2956 : 避免记录日志数据是decode之后的数据,保持日志的GPS数据为原始数据。
            logData.buffer = (byte [])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;
            lstData = Parse(sessionData.ReceivedData, out responseMsg, out gpsCode, sessionData.SessionID);

            logData.FullGpsCode = gpsCode;
            base.AddInLogQueue(logData); 

            //若有需要应答下发的数据,发送
            if (responseMsg != null && responseMsg.Count > 0)
            {
                foreach (byte[] Msg in responseMsg)
                {
                    if (base.TransfersType == TransfersType.IsTcp)
                        OnPostSendHandlerEvent(gpsCode, sessionData.SessionID, Msg);
                    else
                    {
                        string[] strremortpoint = sessionData.SessionID.Split(':');
                        IPEndPoint ippoint = new IPEndPoint(IPAddress.Parse(strremortpoint[0]), int.Parse(strremortpoint[1]));
                        OnSendDataEvent((EndPoint)ippoint, Msg);
                    }
                }
            }
            return lstData;
        }
Пример #3
0
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg;
            string gpsCode = string.Empty;
            List<GPSDataEntity> lstData = null;
            GPSLogDataStruct logData = new GPSLogDataStruct();

            try
            {
                logData.buffer = (byte[])sessionData.ReceivedData.Clone();
                logData.ReceiveTime = DateTime.Now;
                lstData = Parse(sessionData.ReceivedData, out responseMsg, out gpsCode, sessionData.SessionID);

                logData.FullGpsCode = gpsCode;
                base.AddInLogQueue(logData);

                if (responseMsg != null && responseMsg.Count > 0)
                {
                    foreach (byte[] Msg in responseMsg)
                    {
                        OnPostSendHandlerEvent(gpsCode, sessionData.SessionID, Msg);
                        Thread.Sleep(50);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }
            return lstData;
        }
Пример #4
0
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg = null;
            List<GPSDataEntity> dataList = new List<GPSDataEntity>();
            //GPS Code
            string fullGpsCode = string.Empty;
            GPSLogDataStruct logData = new GPSLogDataStruct();

            logData.buffer = (byte[])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;

            List<byte[]> bufferList = LianHuaYingKeDataSpliter.SplitData(sessionData.ReceivedData);//对包根据协议分割,以防止粘包的情况出现,目前没有对02设备的包进行分割
            if (bufferList != null && bufferList.Count > 0)
            {

                foreach (byte[] buffer in bufferList)
                {
                    GPSDataEntity dataEntity = Parse(buffer, out responseMsg, out fullGpsCode, sessionData.SessionID);

                    if (dataEntity != null)
                        dataList.Add(dataEntity);

                    if (responseMsg != null && responseMsg.Count > 0)
                    {
                        foreach (byte[] Msg in responseMsg)
                        {
                            OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                            Thread.Sleep(50);
                        }
                    }
                }
            }

            logData.FullGpsCode = fullGpsCode;
            base.AddInLogQueue(logData);
            return dataList;
        }
Пример #5
0
 /// <summary>
 /// 将收到的数据加入字节队列
 /// </summary>
 /// <param name="receivedBytes"></param>
 public virtual void AddInBytesQueue(SessionData sessionData)
 {
     try
     {
         List<GPSDataEntity> tempList = null;
         if (_distributeSevice != null)
             _distributeSevice.AddRawData2Queue(sessionData.ReceivedData);  
         tempList = AnalyseData(sessionData);
         if (tempList == null)
         {
             Logger.Warn("解析数据返回空", null);
             return;
         }
         if (tempList.Count > 0)
         {
             //updated by lixun 改用单线程处理GPS数据
             lock (_StorageService.GetQueue())
             {
                 foreach (GPSDataEntity entity in tempList)
                 {
                     //entity.SourceData = sessionData.ReceivedData;
                     entity.DataSource = DataSource.ToString();  
                     _StorageService.GetQueue().Enqueue(entity);
                 }
             }
             //Logger.Info("Enqueue:" + tempList.Count.ToString());
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex, null);
     }
 }
Пример #6
0
        /// <summary>
        /// 解析接收到的数据
        /// </summary>
        /// <param name="sessionData"></param>
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg = null;

            //GPS Code
            string fullGpsCode = string.Empty;
            GPSLogDataStruct logData = new GPSLogDataStruct();
            //edit by huangyz Ticket #2956 : 避免记录日志数据是decode之后的数据,保持日志的GPS数据为原始数据。
            logData.buffer = (byte[])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;

            List<GPSDataEntity> dataList = new List<GPSDataEntity>();
            GPSDataEntity dataEntity = null;

            //还原数据
            byte[] buffer = BuBiaoData.FromESC(sessionData.ReceivedData);

            byte[] bPrevPkg = null;
            if (_DicPreviousPkg.ContainsKey(sessionData.SessionID))
            {
                bPrevPkg = _DicPreviousPkg[sessionData.SessionID];
            }

            //added by lixun on 2012/6/12 解决粘包
            byte[] Msgbuffer = null;
            if (bPrevPkg == null)
            {
                Msgbuffer = buffer;
            }
            else
            {
                Msgbuffer = BuBiaoData.SuperPorcPasterPkg(bPrevPkg, buffer);
                if (_DicPreviousPkg.ContainsKey(sessionData.SessionID))
                {
                    _DicPreviousPkg.Remove(sessionData.SessionID);
                }
                Logger.Trace("[部标:出现粘包]合包:" + bPrevPkg.Length + " " + buffer.Length);
            }

            if (Msgbuffer[0] != 0x7e)
            {
                StringBuilder sbMsgbuffer1 = new StringBuilder();
                for (int i = 0; i < Msgbuffer.Length; i++)
                {
                    sbMsgbuffer1.Append(Msgbuffer[i].ToString("X2"));
                    if (i < Msgbuffer.Length - 1)
                        sbMsgbuffer1.Append(",");
                }

                if (bPrevPkg == null)
                {
                    Logger.Trace("[部标:出现脏包]" + sbMsgbuffer1.ToString());
                }
                else
                {
                    Logger.Trace("[部标:合包后出现脏包]" + sbMsgbuffer1.ToString());
                }

                return dataList;
            }
            //end added


            //拆分数据
            //List<byte[]> bufferList = BuBiaoDataSpliter.SplitData(buffer);
            List<byte[]> bufferList = BuBiaoDataSpliter.SplitDataEx(Msgbuffer, ref bPrevPkg);
            if (bPrevPkg != null)
            {
                Logger.Trace("[部标:出现粘包]" + Msgbuffer.Length + " " + bPrevPkg.Length);
                if (_DicPreviousPkg.ContainsKey(sessionData.SessionID))
                    _DicPreviousPkg.Remove(sessionData.SessionID);
                _DicPreviousPkg.Add(sessionData.SessionID, bPrevPkg);
            }

            for (int index = 0; index < bufferList.Count; index++)
            {

                //将解决粘包后的数据分发给809平台
                if (base._distributeSevice != null)
                {
                    base._distributeSevice.AddRawData2Queue(bufferList[index]);
                }

                dataEntity = Parse(bufferList[index], out responseMsg, out fullGpsCode, sessionData.SessionID);
                //取得GPSCode
                if (dataEntity != null)
                {
                    //added by lixun 发送网关业务处理服务的GPSCode不能带前缀
                    if (fullGpsCode.StartsWith("0037"))
                        dataEntity.GPSCode = fullGpsCode.Substring(4);
                    else
                        dataEntity.GPSCode = fullGpsCode;

                    //dataEntity.GPSCode = GetGPSCode(sessionData.SessionID);
                    dataList.Add(dataEntity);
                }

                //若有需要应答下发的数据,发送
                if (responseMsg != null && responseMsg.Count > 0)
                {
                    foreach (byte[] Msg in responseMsg)
                    {
                        OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                        //Thread.Sleep(500);
                    }
                }
            }

            logData.FullGpsCode = fullGpsCode;
            base.AddInLogQueue(logData);

            return dataList;
        }
Пример #7
0
        /// <summary> 接收gps客户端命令数据
        /// 接收gps客户端命令数据
        /// </summary>
        private void AcceptDatafByGPS()
        {
            while (bRunning)
            {
                try
                {
                    //取出数据
                    byte[] buffer = new byte[1024];

                    //取出一个定户端套接字,暂时定为客户端发送完数据即关闭
                    EndPoint remotePoint = new IPEndPoint(IPAddress.Any, 0);

                    udpListener.ReceiveFrom(buffer, ref remotePoint);

                    SessionData sessionData = new SessionData();
                    //取得远端IP地址与端口号作为连接哈希表的Key
                    sessionData.SessionID = remotePoint.ToString();
                    sessionData.ReceivedData = buffer;

                    //入队列
                    GpsDataParser.AddInBytesQueue(sessionData);

                    //抛出收到的数据,测试用
                    string received = Encoding.ASCII.GetString(buffer);
                    OnPostReceivedMessage(received);
                }
                catch (Exception ex)
                {
                    Logger.Error(ex, null);
                }
            }
        }
Пример #8
0
        /// <summary>
        /// 解析接收到的数据
        /// </summary>
        /// <param name="sessionData"></param>
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            List<GPSDataEntity> lstData = null;
            try
            {                
                //需应答的消息
                List<byte[]> responseMsg;

                //GPS Code
                string fullGpsCode = string.Empty;
                GPSLogDataStruct logData = new GPSLogDataStruct();
                //edit by huangyz Ticket #2956 : 避免记录日志数据是decode之后的数据,保持日志的GPS数据为原始数据。
                logData.buffer = (byte[])sessionData.ReceivedData.Clone();
                logData.ReceiveTime = DateTime.Now;
                lstData = Parse(sessionData.ReceivedData, out responseMsg, out fullGpsCode, sessionData.SessionID);

                logData.FullGpsCode = fullGpsCode;
                base.AddInLogQueue(logData);
                //if (lstData != null && lstData.Count > 0)
                    //base.OnParsedDataEvent();

                //若有需要应答下发的数据,发送
                if (responseMsg != null && responseMsg.Count > 0)
                {
                    foreach (byte[] Msg in responseMsg)
                    {
                        OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                    }
                }

                return lstData;
            }
            catch (Exception ex)
            {
                Logger.Error(ex,null);
                return lstData;
            }
        }        
Пример #9
0
        //处理接收到的数据
        // This method is invoked when an asynchronous receive operation completes. 
        // If the remote host closed the connection, then the socket is closed.  
        // If data was received then the data is echoed back to the client.
        private void ProcessReceive(SocketAsyncEventArgs e)
        {
            try
            {
                // check if the remote host closed the connection
                AsyncUserToken token = (AsyncUserToken)e.UserToken;

                if (e.SocketError != SocketError.Success)
                {
                    //有其它套按字错误,关闭套接字
                    CloseClientSocket(e);

                    //测试,关闭一个现有的连接
                    Logger.Error("关闭一个现有的连接:ProcessReceive:SocketError=" + e.SocketError.ToString());

                    return;
                }

                if (e.BytesTransferred == 0)
                {
                    //传输为零的情况下如何处理?
                    //有其它套按字错误,关闭套接字
                    CloseClientSocket(e);

                    //测试,关闭一个现有的连接
                    Logger.Error("关闭一个现有的连接:BytesTransferred == 0 " + e.SocketError.ToString());
                }
                else if (e.BytesTransferred > 0)
                {                    
                    //取出数据,测试用
                    string received = Encoding.ASCII.GetString(e.Buffer, e.Offset, e.BytesTransferred);

                    //echo the data received back to the client

                    //处理接收到的数据
                    int nRead = e.BytesTransferred;

                    //收到数据,更新UserTocken状态
                    token.ReceiveDataCount = nRead;
                    token.UpdateTime = DateTime.Now;

                    byte[] destBuffer = new byte[nRead];

                    Buffer.BlockCopy(e.Buffer, e.Offset, destBuffer, 0, destBuffer.Length);
                    
                    //将数据加入队列
                    SessionData sessionData = new SessionData();
                    //取得远端IP地址与WEB端口号作为连接哈希表的Key
                    sessionData.SessionID = token.socket.RemoteEndPoint.ToString();
                    sessionData.ReceivedData = destBuffer;
                    //抛出接收到的会话数据
                    try
                    {
                        OnPostReceiveMsgEvent(sessionData);
                    }
                    catch (Exception ex)
                    {
                        Logger.Error(ex, null);
                    }
                    destBuffer = null;
                    //投递一个接收请求收取下一包数据
                    PostReceiveAsync(e);
                }
            }
            catch (SocketException error)
            {
                //发生套接字错误,关闭Socket
                CloseClientSocket(e);

                Logger.Error(error.ToString() + ",SocketError=" + e.SocketError.ToString(), null);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
            }
        }
Пример #10
0
 /// <summary>
 /// 抛出接收到的会话数据
 /// </summary>
 /// <param name="sessionData"></param>
 private void OnPostReceiveMsgEvent(SessionData sessionData)
 {
     if (PostReceiveMsgEvent != null)
     {
         PostReceiveMsgEvent(sessionData);
     }
 }
Пример #11
0
        /// <summary>
        /// 解析接收到的数据
        /// </summary>
        /// <param name="sessionData"></param>
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg = null;

            //GPS Code
            string fullGpsCode = string.Empty;
            GPSLogDataStruct logData = new GPSLogDataStruct();
            //edit by huangyz Ticket #2956 : 避免记录日志数据是decode之后的数据,保持日志的GPS数据为原始数据。
            logData.buffer = (byte[])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;

            List<GPSDataEntity> dataList = new List<GPSDataEntity>();

            GPSDataEntity dataEntity = null;
            //拆分数据
            List<byte[]> bufferList = YaXunDataSpliter.SplitData(sessionData.ReceivedData);

            for (int index = 0; index < bufferList.Count; index++)
            {
                //转义数据
                byte[] buffer = YaXunDataSpliter.BufferFromESC(bufferList[index]);
                dataEntity = Parse(buffer, out responseMsg, out fullGpsCode, sessionData.SessionID);

                //取得GPSCode
                if (dataEntity != null)
                {
                    //added by lixun 发送网关业务处理服务的GPSCode不能带前缀
                    if (fullGpsCode.StartsWith("0019"))
                        dataEntity.GPSCode = fullGpsCode.Substring(4);
                    else
                        dataEntity.GPSCode = fullGpsCode;

                    //dataEntity.GPSCode = GetGPSCode(sessionData.SessionID);
                    dataList.Add(dataEntity);
                }    

#if DEVELOPMENT

                if (dataEntity != null && dataEntity.IsLocatedData)
                {
                    Logger.Info("gpscode=" + dataEntity.GPSCode + "lon=" + dataEntity.Longitude.ToString() + ",lat=" + dataEntity.Latitude.ToString());
                }
#endif

                //若有需要应答下发的数据,发送
                if (responseMsg != null && responseMsg.Count > 0)
                {
                    foreach (byte[] Msg in responseMsg)
                    {
                        OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                        Thread.Sleep(500);
                    }
                }
            }

            logData.FullGpsCode = fullGpsCode;
            base.AddInLogQueue(logData);

            return dataList;
        }
Пример #12
0
        /// <summary> 解析数据入口
        /// 解析数据入口
        /// </summary>
        /// <param name="sessionData"></param>
        /// <returns></returns>
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg;


            //GPS Code
            string gpsCode = string.Empty;

            List<GPSDataEntity> lstData = null;
            GPSLogDataStruct logData = new GPSLogDataStruct();
            //edit by huangyz Ticket #2956 : 避免记录日志数据是decode之后的数据,保持日志的GPS数据为原始数据。
            logData.buffer = (byte [])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;
            lstData = Parse(sessionData.ReceivedData, out responseMsg, out gpsCode, sessionData.SessionID);

            logData.FullGpsCode = gpsCode;
            base.AddInLogQueue(logData);

            //若有需要应答下发的数据,发送
            if (responseMsg != null && responseMsg.Count > 0)
            {
                foreach (byte[] Msg in responseMsg)
                {
                    string[] strremortpoint = sessionData.SessionID.Split(':');
                    IPEndPoint ippoint = new IPEndPoint(IPAddress.Parse(strremortpoint[0]), int.Parse(strremortpoint[1]));
                    //updated by lixun 解决向远端发送数据用udpPortByGps绑定的端口发,解决星安回复消息本地端口必须为指定GPS端口
                    //OnSendDataEvent((EndPoint)ippoint, Msg);
                    OnSendDataWithGPSPortEvent((EndPoint)ippoint,Msg);
                    Logger.Info("已下发星按GPS " + "0001" + gpsCode + " 的数据,长度" + Msg.Length + ",IP=" + ippoint.Address.ToString() + ",Port=" + ippoint.Port.ToString());
                    //end update
                    
                    //OnPostSendHandlerEvent(gpsCode, sessionData.SessionID, Msg);
                }
            }
            return lstData;
        }
Пример #13
0
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg = null;
            List<GPSDataEntity> dataList = new List<GPSDataEntity>();
            //GPS Code
            string fullGpsCode = string.Empty;
            GPSLogDataStruct logData = new GPSLogDataStruct();

            logData.buffer = (byte[])sessionData.ReceivedData.Clone();
            logData.ReceiveTime = DateTime.Now;

            try
            {
                List<byte[]> bufferList = KangKaiSiDataSpliter.SplitData(sessionData.ReceivedData);//对包根据协议分割,以防止粘包的情况出现,目前没有对02设备的包进行分割
                if (bufferList != null && bufferList.Count > 0)
                {

                    foreach (byte[] buffer in bufferList)
                    {
                        GPSDataEntity dataEntity = Parse(buffer, out responseMsg, out fullGpsCode, sessionData.SessionID);

                        //Liuhuaihai Add on 2012/9/7
                        //如果上报的数据是1小时前的数据,抛弃这种数据
                        if (dataEntity != null)
                        {
                            double reportDataTimeInterval = (DateTime.Now - dataEntity.ReportTime).TotalHours;

                            if (reportDataTimeInterval > 1)
                            {
                                Logger.Trace("Receive the " + dataEntity.GPSCode + "'s history data!");
                                dataEntity = null;
                            }
                            else
                            {
                                dataList.Add(dataEntity);
                            }                            
                        }
                        //

                        if (responseMsg != null && responseMsg.Count > 0)
                        {
                            foreach (byte[] Msg in responseMsg)
                            {
                                OnPostSendHandlerEvent(fullGpsCode, sessionData.SessionID, Msg);
                                Thread.Sleep(50);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

            logData.FullGpsCode = fullGpsCode;
            base.AddInLogQueue(logData);
            return dataList;
        }
Пример #14
0
 /// <summary>
 /// Session重写入口, 基本功能: 
 /// 1) 判断包有效性与包类型(注意:包带起止符号); 
 /// 2) 分解包中的各字段数据
 /// 3) 校验包及其数据有效性
 /// 4) 发送确认消息给客户端(调用方法 SendDatagram())
 /// 5) 存储包数据到数据库中
 /// 6) 存储包原文到数据库中(可选)
 /// 7) 补充字段m_name, 表示数据包发送者的名称/编号
 /// 8) 其它相关方法
 /// <param name="receivedBytes">收到的字节数据</param>
 /// <param name="sessionID">会话ID,标明一个客户端</param>
 /// </summary>       
 protected abstract List<GPSDataEntity> AnalyseData(SessionData sessionData);
Пример #15
0
        /// <summary> 解析接收到的数据
        /// 
        /// </summary>
        /// <param name="sessionID"></param>
        /// <param name="receivedBytes"></param>
        protected override List<GPSDataEntity> AnalyseData(SessionData sessionData)
        {
            //需应答的消息
            List<byte[]> responseMsg;

            //GPS Code
            string gpsCode = string.Empty;

            List<GPSDataEntity> lstData = null;

            lstData = Parse(sessionData.ReceivedData, out responseMsg, out gpsCode, sessionData.SessionID);

            if (responseMsg != null && responseMsg.Count > 0)//若有需要应答下发的数据,发送
            {
                foreach (byte[] Msg in responseMsg)
                {
                    OnPostSendHandlerEvent(gpsCode, sessionData.SessionID, Msg);
                }
            }

            //测试代码,统计收到数据条数
            //Interlocked.Exchange(ref ValidCount, ValidCount + lstData.Count);

            //送出解析后的数据,测试
            OnPostSendHandlerEvent(gpsCode, sessionData.SessionID, null);

            return lstData;
        }
Пример #16
0
        /// <summary>
        /// 处理接收到的消息
        /// </summary>
        /// <param name="remotePoint">客户端地址端口</param>
        /// <param name="receivedBuffer">收到数据</param>
        public void _UdpServerBase_PostReceivedMsgEvent(EndPoint remotePoint, byte[] receivedBuffer)
        {
            try
            {
                SessionData sessionData = new SessionData();
                //取得远端IP地址与端口号作为连接哈希表的Key
                sessionData.SessionID = remotePoint.ToString();
                sessionData.ReceivedData = receivedBuffer;

                //入队列
                GpsDataParser.AddInBytesQueue(sessionData);

                //抛出收到的数据,测试用
                string received = Encoding.ASCII.GetString(receivedBuffer);

                OnPostUdpMsgEvent(received);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
            }
        }
Пример #17
0
        /// <summary>
        /// 收到数据
        /// </summary>
        /// <param name="sessionData"></param>
        public void _TcpServerBase_PostReceiveMsgEvent(SessionData sessionData)
        {
            try
            {
                //将数据加入队列
                _GpsDataParser.AddInBytesQueue(sessionData);

                //if (ReceiveDataEvent != null)
                //{
                //    ReceiveDataEvent(GPSGatewayServer.CommonMethod.Transfer.ToHexString(sessionData.ReceivedData));
                //}
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
            }
        }