Esempio n. 1
0
        /// <summary>
        /// Inicializa comunicaçao do router com o mission planner
        /// </summary>
        private void startMissionPlannerConn() 
        {
            try
            {

                MissionPlannerServer = new TCPCommServer();
                MissionPlannerServer.Open();
                MissionPlannerServer.rMessage += showMessages;
                MissionPlannerServer.newMsg += TCPServer_packetReceived;
                MissionPlannerServer.StartSendingHB();

               
            }
            catch
            {
                MissionPlannerServer.Close();
                MissionPlannerServer = null;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Inicializa comunicaçao do router com o ExoMonitor
        /// </summary>
        private void startExoMonitorConn()
        {
            int port;
            try
            {
                try
                {
                    port = int.Parse(tx_ExoPort.Text);
                }
                catch 
                {
                    MessageBox.Show("Erro na definição de porta");
                    return;
                }
                ExoMonitorServer = new TCPCommServer(port);
                ExoMonitorServer.Open();
                ExoMonitorServer.rMessage += showMessages;
                ExoMonitorServer.newMsg += TCPServer_packetReceived;
                ExoMonitorServer.StartSendingHB();


            }
            catch
            {
                ExoMonitorServer.Close();
                ExoMonitorServer = null;
            }
        }