1
0
Fork 0
flightgear/src/FDM/ExternalNet/ExternalNet.hxx
James Turner cff6b2034d Remove unnecessary includes/using
flight.hxx (FGInterface) was pulling in list, string and vector, and
'using' them, despite no actual need.
2013-07-29 22:59:45 +01:00

68 lines
1.7 KiB
C++

// ExternalNet.hxx -- an net interface to an external flight dynamics model
//
// Written by Curtis Olson, started November 2001.
//
// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#ifndef _EXTERNAL_NET_HXX
#define _EXTERNAL_NET_HXX
#include <simgear/timing/timestamp.hxx> // fine grained timing measurements
#include <simgear/io/raw_socket.hxx>
#include <Network/net_ctrls.hxx>
#include <Network/net_fdm.hxx>
#include <FDM/flight.hxx>
class FGExternalNet: public FGInterface {
private:
int data_in_port;
int data_out_port;
int cmd_port;
std::string fdm_host;
simgear::Socket data_client;
simgear::Socket data_server;
bool valid;
FGNetCtrls ctrls;
FGNetFDM fdm;
public:
// Constructor
FGExternalNet( double dt, std::string host, int dop, int dip, int cp );
// Destructor
~FGExternalNet();
// Reset flight params to a specific position
void init();
// update the fdm
void update( double dt );
};
#endif // _EXTERNAL_NET_HXX