]> git.mxchange.org Git - flightgear.git/blob - src/Network/opengc.hxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Network / opengc.hxx
1
2 //// opengc.hxx - Network interface program to send sim data onto a LAN
3 //
4 // Created by:  J. Wojnaroski  -- castle@mminternet.com
5 // Date:                21 Nov 2001 
6 //
7 // 
8 // Adapted from original network code developed by C. Olson
9 //
10 // This program is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU General Public License as
12 // published by the Free Software Foundation; either version 2 of the
13 // License, or (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 // General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 //
24
25
26 #ifndef _FG_OPENGC_HXX
27 #define _FG_OPENGC_HXX
28
29 #include <simgear/compiler.h>
30
31 #include STL_STRING
32
33 #include <FDM/flight.hxx>
34 #include <Main/fg_props.hxx>
35
36 #include "protocol.hxx"
37 #include "opengc_data.hxx"
38
39 class FGOpenGC : public FGProtocol, public FGInterface {
40
41     ogcFGData buf;
42     int length;
43     
44     SGPropertyNode *press_node;
45     SGPropertyNode *temp_node;
46     SGPropertyNode *wind_dir_node;
47     SGPropertyNode *wind_speed_node;
48     SGPropertyNode *epr0_node;
49     
50     // Control surfaces
51     SGPropertyNode *p_left_aileron;
52     SGPropertyNode *p_right_aileron;
53     SGPropertyNode *p_elevator;
54     SGPropertyNode *p_elevator_trim;
55     SGPropertyNode *p_rudder;
56     SGPropertyNode *p_flaps;
57     SGPropertyNode *p_flaps_cmd;
58     
59     // Aero numbers
60     SGPropertyNode *p_alphadot;
61     SGPropertyNode *p_betadot;
62
63 public:
64
65     FGOpenGC();
66     ~FGOpenGC();
67
68     // open hailing frequencies
69     bool open();
70
71     // process work for this port
72     bool process();
73
74     // close the channel
75     bool close();
76
77     void collect_data( const FGInterface *fdm, ogcFGData *data );
78 };
79
80 #endif // _FG_OPENGC_HXX
81
82
83