Exemplo n.º 1
0
        public virtual IList <GlobalsatWaypoint> GetWaypoints(IJobMonitor jobMonitor)
        {
            IList <GlobalsatWaypoint> waypoints = null;

            if (this.Open())
            {
                try
                {
                    GlobalsatPacket packet   = PacketFactory.GetWaypoints();
                    GlobalsatPacket response = (GlobalsatPacket)this.SendPacket(packet);
                    waypoints = response.ResponseGetWaypoints();
                }
                catch (Exception e)
                {
                    jobMonitor.ErrorText = Properties.Resources.Device_GetWaypoints_Error + e;
                }
                finally
                {
                    this.Close();
                }
            }
            if (!this.DataRecieved)
            {
                NoCommunicationError(jobMonitor);
                waypoints = null;
            }
            return(waypoints);
        }