swift
multiplayerpackets.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2014 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #ifndef SWIFT_SIMPLUGIN_FS9_MULTIPLAYER_PACKETS_H
5 #define SWIFT_SIMPLUGIN_FS9_MULTIPLAYER_PACKETS_H
6 
7 #include <tuple>
8 
9 #include <QString>
10 #include <QtGlobal>
11 
12 #include "fs9.h"
13 
15 
16 namespace swift::simplugin::fs9
17 {
20  {
22  auto getTuple()
23  {
27  }
28 
30  auto getTuple() const
31  {
35  }
36 
38  qint32 size() const { return 28; }
39  };
40 
43  {
45  std::tuple<CFs9Sdk::EngineType &, QString &> getTuple() { return std::tie(engine, aircraft_name); }
46 
48  std::tuple<const CFs9Sdk::EngineType &, const QString &> getTuple() const
49  {
50  return std::tie(engine, aircraft_name);
51  }
52 
54  qint32 size() const { return sizeof(CFs9Sdk::EngineType) + aircraft_name.size() + 1; }
55  };
56 
59  {
61  std::tuple<QString &> getTuple() { return std::tie(chat_data); }
62 
64  std::tuple<const QString &> getTuple() const { return std::tie(chat_data); }
65 
67  qint32 size() const { return chat_data.size() + 1; }
68  };
69 
72  {
74  auto getTuple()
75  {
76  return std::tie(application_time, packet_index, reserved[0], reserved[1], reserved[2], reserved[3], pbh,
78  }
79 
81  auto getTuple() const
82  {
83  return std::tie(application_time, packet_index, reserved[0], reserved[1], reserved[2], reserved[3], pbh,
85  }
86 
88  qint32 size() const { return 36; }
89  };
90 
93  {
95  auto getTuple()
96  {
99  lon_lo, alt_f);
100  }
101 
103  auto getTuple() const
104  {
107  lon_lo, alt_f);
108  }
109 
111  qint32 size() const { return 52; }
112  };
113 } // namespace swift::simplugin::fs9
114 
115 #endif // SWIFT_SIMPLUGIN_FS9_MULTIPLAYER_PACKETS_H
EngineType
Engine type.
Definition: fs9.h:27
Multiplayer packet - change player plane.
std::tuple< const CFs9Sdk::EngineType &, const QString & > getTuple() const
Return const tuple of member variables.
std::tuple< CFs9Sdk::EngineType &, QString & > getTuple()
Return tuple of member variables.
Multiplayer packet - chat text.
qint32 size() const
Struct size.
std::tuple< const QString & > getTuple() const
Return const tuple of member variables.
std::tuple< QString & > getTuple()
Return tuple of member variables.
Multiplayer param packet - aircraft configuration.
qint32 size() const
Struct size.
auto getTuple()
Return tuple of member variables.
auto getTuple() const
Return const tuple of member variables.
Multiplayer packet in slew mode.
auto getTuple()
Return tuple of member variables.
auto getTuple() const
Return const tuple of member variables.
Multiplayer packet - position and velocity.
auto getTuple() const
Return const tuple of member variables.
auto getTuple()
Return tuple of member variables.
Multiplayer player aircraft name packet.
Definition: fs9.h:118
Multiplayer packet aircraft parameter.
Definition: fs9.h:85
quint32 application_time
Application time - ignored.
Definition: fs9.h:86
Multiplayer position packet in slew mode.
Definition: fs9.h:137
quint32 application_time
Application time - ignored.
Definition: fs9.h:138
std::array< quint8, 4 > reserved
Reserved.
Definition: fs9.h:140
Full multiplayer position and velocity packet.
Definition: fs9.h:153
quint32 application_time
Application time - ignored.
Definition: fs9.h:155
std::array< quint8, 4 > reserved
Reserved.
Definition: fs9.h:160