Avionics
Dropship Simulator
Xplane.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Bus.h"
4 
5 namespace Devices
6 {
7  struct XplaneConfig
8  {
9  bool enabled;
10  USHORT port;
11  };
12 
13  struct sentence
14  {
15  unsigned char group;
17 
18  union
19  {
20  char charData[4];
21  float floatData;
22  } data[8];
23  };
24 
26  class Xplane
27  {
28  private:
29  Logger* logger = nullptr;
30  XplaneConfig* config = nullptr;
31  Bus* bus = nullptr; // needs a pointer because it is two-way (digital in or sensor can add, commands removed can trigger digital out)
32  SOCKET fd = static_cast<SOCKET>(SOCKET_ERROR);
33 
34  public:
35  void Initialize(Logger* logger, XplaneConfig* config, Bus* prmBus);
36  void FrameMove() const;
37  ~Xplane();
38  };
39 }
SOCKET fd
Definition: Xplane.h:32
Definition: Logger.h:5
okay, the portable keyboard numbers don&#39;t work like the outside keypad because the outside keypad is ...
Definition: Analog.cpp:3
float floatData
Definition: Xplane.h:21
Bus * bus
Definition: Xplane.h:31
XplaneConfig * config
Definition: Xplane.h:30
Definition: Bus.h:12
unsigned char group
Definition: Xplane.h:15
void FrameMove() const
Definition: Xplane.cpp:44
union Devices::sentence::@5 data[8]
Logger * logger
Definition: Xplane.h:29
char charData[4]
Definition: Xplane.h:20
void Initialize(Logger *logger, XplaneConfig *config, Bus *prmBus)
Definition: Xplane.cpp:5