Esempio n. 1
0
 public void Dispose()
 {
     if (NtripRtcm3Requestor != null)
     {
         NtripRtcm3Requestor.Dispose();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Ntrip 循环,主访问函数
        /// </summary>
        public void Request()
        {
            if (IsCancel)
            {
                log.Info("已经取消网络连接,请求无效!"); return;
            }
            //Pause for a bit in case we just disconnected and are now reconnecting.
            System.Threading.Thread.Sleep(1000);

            switch (this.NtripParam.ProtocolType)
            {
            case ProtocolType.RTCM3:     //NTRIP Protocol
                NtripRtcm3Requestor.Request();
                break;

            default:                                                     //0 Raw TCP/IP Socket
                NoticeNtripDataState(ResponseType.Connecting, "", null); //Connecting

                RawTcpIpVisitor = new RawTcpIpRequestor(NtripParam.CasterIp, NtripParam.Port);
                RawTcpIpVisitor.NtripDataStateChanged += NtripDataStateChanged;
                RawTcpIpVisitor.Request();
                break;
            }
        }