Pi-XPlane-FMC-CDU
ZiboFMC.h
1 /*
2  This file is part of Pi-XPlane-FMC-CDU
3  A Raspberry Pi-based External FMC for XPlane
4 
5  Copyright (C) 2017-2018 shahada abubakar
6  <shahada@abubakar.net>
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <https://www.gnu.org/licenses/>.
20 
21  */
22 
23 
24 #ifndef PIXPLANEFMCCDU_SRC_ZIBOFMC_H_
25 #define PIXPLANEFMCCDU_SRC_ZIBOFMC_H_
26 
27 #include <map>
28 #include <string>
29 #include <XPlaneUDPClient.h>
30 
31 #include "AbstractFMC.h"
32 
33 class ZiboFMC: public AbstractFMC {
34 protected:
35 
36  std::string side; // 0 = pilot, 1=first officer
37  std::map<int, std::map<int, std::string>> keyInfo;
38 
39 public:
40  ZiboFMC(bool isCaptain);
41  virtual ~ZiboFMC();
42 
43  virtual std::string getName();
44  virtual void init();
45  virtual void deInit();
46 
47  virtual void subscribeDataRefs();
48 
49  virtual void subscribe(std::string dataref);
50  virtual void unsubscribe (std::string dataref);
51 
52  virtual void keyPressEvent(int, int);
53  virtual void keyReleaseEvent(int, int);
54 
55 
56  virtual void receiveDataRef(std::string, std::string dataref, std::string value);
57 
58 
59 
60 };
61 
62 #endif /* PIXPLANEFMCCDU_SRC_ZIBOFMC_H_ */
Definition: AbstractFMC.h:28
virtual void receiveDataRef(std::string, std::string dataref, std::string value)
called when we receive a float dataref from the server.
Definition: ZiboFMC.cpp:283
virtual void deInit()
de-initialize the fmc.
Definition: ZiboFMC.cpp:205
virtual void subscribeDataRefs()
subscribe to datarefs
Definition: ZiboFMC.cpp:142
virtual std::string getName()
returns name of FMC plugin.
Definition: ZiboFMC.cpp:116
Definition: ZiboFMC.h:33