1 // ExternalPipe.hxx -- a "pipe" interface to an external flight dynamics model
3 // Written by Curtis Olson, started March 2003.
5 // Copyright (C) 2003 Curtis L. Olson - http://www.flightgear.org/~curt
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _EXTERNAL_PIPE_HXX
24 #define _EXTERNAL_PIPE_HXX
26 #include <stdio.h> // FILE*, fopen(), fread(), fwrite(), et. al.
28 #include <simgear/timing/timestamp.hxx> // fine grained timing measurements
30 #include <Network/net_ctrls.hxx>
31 #include <Network/net_fdm.hxx>
32 #include <FDM/flight.hxx>
35 class FGExternalPipe: public FGInterface {
52 double last_cg_offset;
54 vector <string> property_names;
55 vector <SGPropertyNode_ptr> nodes;
57 // Protocol specific init routines
61 // Protocol specific update routines
62 void update_binary( double dt );
63 void update_property( double dt );
68 FGExternalPipe( double dt, string fifo_name, string protocol );
73 // Reset flight params to a specific position
77 void update( double dt );
82 #endif // _EXTERNAL_PIPE_HXX