swift
visualpilotdatatoggle.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2022 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_CORE_FSD_VISUALPILOTDATATOGGLE_H
7 #define SWIFT_CORE_FSD_VISUALPILOTDATATOGGLE_H
8 
9 #include "enums.h"
10 #include "messagebase.h"
11 
12 namespace swift::core::fsd
13 {
16  {
17  public:
19  VisualPilotDataToggle(const QString &sender, const QString &client, bool active);
20 
22  QStringList toTokens() const;
23 
25  static VisualPilotDataToggle fromTokens(const QStringList &tokens);
26 
28  static QString pdu() { return "$SF"; }
29 
32  QString m_client;
33  bool m_active = false;
35 
36  private:
38  };
39 
41  inline bool operator==(const VisualPilotDataToggle &lhs, const VisualPilotDataToggle &rhs)
42  {
43  return lhs.m_client == rhs.m_client && lhs.m_active == rhs.m_active;
44  }
45 
47  inline bool operator!=(const VisualPilotDataToggle &lhs, const VisualPilotDataToggle &rhs) { return !(lhs == rhs); }
48 } // namespace swift::core::fsd
49 
50 #endif // SWIFT_CORE_FSD_VISUALPILOTDATATOGGLE_H
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition: addatc.h:68
FSD message base class.
Definition: messagebase.h:58
Message from server to start or stop sending visual pilot data updates.
static QString pdu()
PDU identifier.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.