1 // transponder.hxx -- class to impliment a transponder
3 // Written by Roy Vegard Ovesen, started September 2004.
5 // Copyright (C) 2004 Roy Vegard Ovesen - rvovesen@tiscali.no
6 // Copyright (C) 2013 Clement de l'Hamaide - clemaez@hotmail.fr
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef TRANSPONDER_HXX
23 #define TRANSPONDER_HXX 1
26 # error This library requires C++
29 #include <Main/fg_props.hxx>
31 #include <simgear/structure/subsystem_mgr.hxx>
34 class Transponder : public SGSubsystem, public SGPropertyChangeListener
37 Transponder(SGPropertyNode *node);
38 virtual ~Transponder();
41 virtual void update (double dt);
61 SGPropertyNode_ptr _pressureAltitude_node;
62 SGPropertyNode_ptr _busPower_node;
63 SGPropertyNode_ptr _serviceable_node;
65 SGPropertyNode_ptr _mode_node;
66 SGPropertyNode_ptr _knob_node;
67 SGPropertyNode_ptr _idCode_node;
68 SGPropertyNode_ptr _digit_node[4];
71 SGPropertyNode_ptr _identBtn_node;
75 SGPropertyNode_ptr _altitude_node;
76 SGPropertyNode_ptr _altitudeValid_node;
77 SGPropertyNode_ptr _transmittedId_node;
78 SGPropertyNode_ptr _ident_node;
86 double _requiredBusVolts;
87 std::string _altitudeSourcePath;
89 void valueChanged (SGPropertyNode *);
90 int setMinMax(int val);
91 bool has_power() const;
94 #endif // TRANSPONDER_HXX