]> git.mxchange.org Git - flightgear.git/blob - src/Network/lfsglass.hxx
Merge branch 'work4' into next
[flightgear.git] / src / Network / lfsglass.hxx
1
2 //// LFSGlass.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_LFSGlass_HXX
27 #define _FG_LFSGlass_HXX
28
29 #include <simgear/compiler.h>
30
31 #include <string>
32
33 #include <Main/fg_props.hxx>
34
35 #include "protocol.hxx"
36 #include "lfsglass_data.hxx"
37
38 class FGLFSGlass : public FGProtocol {
39
40     FGLFSGlassData buf;
41     int length;
42     
43     // Environment
44     SGPropertyNode_ptr press_node;
45     SGPropertyNode_ptr temp_node;
46     SGPropertyNode_ptr wind_dir_node;
47     SGPropertyNode_ptr wind_speed_node;
48     SGPropertyNode_ptr magvar_node;
49     
50     // Position on the Geod
51     SGPropertyNode_ptr p_latitude;
52     SGPropertyNode_ptr p_longitude;
53     SGPropertyNode_ptr p_elev_node;
54     //SGPropertyNode_ptr p_altitude;
55     SGPropertyNode_ptr p_altitude_agl;
56     
57     // Orientation
58     SGPropertyNode_ptr p_pitch;
59     SGPropertyNode_ptr p_bank;
60     SGPropertyNode_ptr p_heading;
61     SGPropertyNode_ptr p_yaw;
62     SGPropertyNode_ptr p_yaw_rate;
63     
64     // Flight Parameters
65     SGPropertyNode_ptr vel_kcas;
66     SGPropertyNode_ptr p_vvi;
67     SGPropertyNode_ptr p_mach;
68     
69     // Control surfaces
70     SGPropertyNode_ptr p_left_aileron;
71     SGPropertyNode_ptr p_right_aileron;
72     SGPropertyNode_ptr p_elevator;
73     SGPropertyNode_ptr p_elevator_trim;
74     SGPropertyNode_ptr p_rudder;
75     SGPropertyNode_ptr p_flaps;
76     SGPropertyNode_ptr p_flaps_cmd;
77     
78     // GEAR System
79     SGPropertyNode_ptr p_park_brake;
80     
81     // Engines
82     SGPropertyNode_ptr egt0_node;
83     SGPropertyNode_ptr egt1_node;
84     SGPropertyNode_ptr egt2_node;
85     SGPropertyNode_ptr egt3_node;
86     
87     SGPropertyNode_ptr epr0_node;
88     SGPropertyNode_ptr epr1_node;
89     SGPropertyNode_ptr epr2_node;
90     SGPropertyNode_ptr epr3_node;
91     
92     SGPropertyNode_ptr n10_node;
93     SGPropertyNode_ptr n11_node;
94     SGPropertyNode_ptr n12_node;
95     SGPropertyNode_ptr n13_node;
96     
97     SGPropertyNode_ptr n20_node;
98     SGPropertyNode_ptr n21_node;
99     SGPropertyNode_ptr n22_node;
100     SGPropertyNode_ptr n23_node;
101     
102     SGPropertyNode_ptr oil_temp0;
103     SGPropertyNode_ptr oil_temp1;
104     SGPropertyNode_ptr oil_temp2;
105     SGPropertyNode_ptr oil_temp3;
106    
107     // Fuel System
108     SGPropertyNode_ptr tank0_node;
109     SGPropertyNode_ptr tank1_node;
110     SGPropertyNode_ptr tank2_node;
111     SGPropertyNode_ptr tank3_node;
112     SGPropertyNode_ptr tank4_node;
113     SGPropertyNode_ptr tank5_node;
114     SGPropertyNode_ptr tank6_node;
115     SGPropertyNode_ptr tank7_node;
116     // Boost pumps; Center tank has only override pumps; boosts are in the
117     // four main wing tanks 1->4
118 //    SGPropertyNode_ptr boost1_node;
119 //    SGPropertyNode_ptr boost2_node;
120 //    SGPropertyNode_ptr boost3_node;
121 //    SGPropertyNode_ptr boost4_node;
122 //    SGPropertyNode_ptr boost5_node;
123 //    SGPropertyNode_ptr boost6_node;
124 //    SGPropertyNode_ptr boost7_node;
125 //    SGPropertyNode_ptr boost8_node;
126     // Override pumps
127 //    SGPropertyNode_ptr ovride0_node;
128 //    SGPropertyNode_ptr ovride1_node;
129 //    SGPropertyNode_ptr ovride2_node;
130 //    SGPropertyNode_ptr ovride3_node;
131 //    SGPropertyNode_ptr ovride4_node;
132 //    SGPropertyNode_ptr ovride5_node;
133     // X_Feed valves
134 //    SGPropertyNode_ptr x_feed0_node;
135 //    SGPropertyNode_ptr x_feed1_node;
136 //    SGPropertyNode_ptr x_feed2_node;
137 //    SGPropertyNode_ptr x_feed3_node;
138     
139     // Aero numbers
140     SGPropertyNode_ptr p_alphadot;
141     SGPropertyNode_ptr p_betadot;
142
143 public:
144
145     FGLFSGlass();
146     ~FGLFSGlass();
147
148     // open hailing frequencies
149     bool open();
150
151     // process work for this port
152     bool process();
153
154     // close the channel
155     bool close();
156
157     void collect_data(FGLFSGlassData *data );
158 };
159
160 #endif // _FG_LFSGlass_HXX
161
162
163