コード例 #1
0
 /**
  * ConnectCommandsServer methods connect to commands-server in asychronized mode
  * this connection enable the user to set properties in flight-gear application
  **/
 public void ConnectCommandsServer()
 {
     if (commands_server != null)
     {
         return;
     }
     commands_server = CommandsServer.Instance;
     commands_server.connectToServer();
 }
コード例 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="server"> The server to which the commands will be sent </param>
 public ManualControlModel(CommandsServer server) : base(server)
 {
     this.commandsNamesPaths = new Dictionary <string, string>
     {
         { "THROTTLE", "/controls/engines/current-engine/throttle" },
         { "RUDDER", "/controls/flight/rudder" },
         { "ELEVATOR", "/controls/flight/elevator" },
         { "AILERON", "/controls/flight/aileron" }
     };
 }
コード例 #3
0
        private CommandsServer server;          // command server instance

        /**
         * ManualModel creates manual model instance
         * the model responsible for manual logics and contains methods which performs
         * complex calculations and operations
         **/
        public ManualModel()
        {
            server = CommandsServer.Instance;
        }
コード例 #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="server"> The server to which the commands are sent </param>
 public CommandsParser(CommandsServer server)
 {
     this.server = server;
 }
コード例 #5
0
        private CommandsServer server;          // commands flight server

        /**
         * AutoPilotModel creates auto-pilot model instance
         * the model responsible for auto-pilot logics and contains methods which performs
         * complex calculations and operations
         **/
        public AutoPilotModel()
        {
            server = CommandsServer.Instance;
        }
コード例 #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="server"> The server to which the commands will be sent </param>
 public AutoControlModel(CommandsServer server) : base(server)
 {
 }
コード例 #7
0
 /**
  *  closeConnection method close the connection to flightgear server.
  **/
 public override void closeConnection()
 {
     client.Close();
     instance = null;
 }