swift
Loading...
Searching...
No Matches
simulatorp3d.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_SIMPLUGIN_SIMULATOR_P3D_H
7#define SWIFT_SIMPLUGIN_SIMULATOR_P3D_H
8
11
12#include "misc/settingscache.h"
14
15namespace swift::simplugin::p3d
16{
19 {
20 EventP3dFoo = fsxcommon::EventFSXEndMarker + 1
21 };
22
25 {
30
31 public:
36 swift::misc::network::IClientProvider *clientProvider, QObject *parent = nullptr);
37
40 virtual bool connectTo() override;
42
43#ifdef Q_OS_WIN64
45 virtual bool requestElevation(const swift::misc::geo::ICoordinateGeodetic &reference,
46 const swift::misc::aviation::CCallsign &callsign) override;
47
49 virtual bool followAircraft(const swift::misc::aviation::CCallsign &callsign) override;
50#endif
51
52 protected:
54 virtual HRESULT initEventsP3D() override;
55
56#ifdef Q_OS_WIN64
58 virtual void removeCamera(fsxcommon::CSimConnectObject &simObject) override;
59
61 virtual void removeObserver(fsxcommon::CSimConnectObject &simObject) override;
62
65 virtual bool releaseAIControl(const fsxcommon::CSimConnectObject &simObject,
66 SIMCONNECT_DATA_REQUEST_ID requestId) override;
67#endif
69 static void CALLBACK SimConnectProc(SIMCONNECT_RECV *pData, DWORD cbData, void *pContext);
70
71 private:
73 };
74
77 {
79
80 public:
82 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67054 - Constructor inheritance with non-default constructible
83 // members using CSimulatorFsxCommonListener::CSimulatorFsxCommonListener;
87
88 protected:
89 virtual void startImpl() override;
90
91 private:
93 };
94} // namespace swift::simplugin::p3d
95
96#endif // SWIFT_SIMPLUGIN_SIMULATOR_P3D_H
Interface to a simulator.
Definition simulator.h:59
virtual bool followAircraft(const swift::misc::aviation::CCallsign &callsign)
Follow aircraft.
Class template for accessing a specific value in the CSettingsCache.
Value object encapsulating information of a callsign.
Definition callsign.h:30
Geodetic coordinate, a position in 3D space relative to the reference geoid.
Direct in memory access to client (network client) data.
Direct in memory access to interpolation setup, normally implemented by simulator.
Direct threadsafe in memory access to own aircraft.
Direct thread safe in memory access to remote aircraft.
Class representing a SimConnect object.
virtual bool requestElevation(const swift::misc::geo::ICoordinateGeodetic &reference, const swift::misc::aviation::CCallsign &aircraftCallsign)
Request elevation, there is no guarantee the requested elevation will be available in the provider.
virtual void removeCamera(CSimConnectObject &simObject)
Remove camera if any.
virtual void removeObserver(CSimConnectObject &simObject)
Remove observer if any.
virtual bool releaseAIControl(const CSimConnectObject &simObject, SIMCONNECT_DATA_REQUEST_ID requestId)
Release AI control.
CSimulatorFsxCommonListener(const swift::misc::simulation::CSimulatorPluginInfo &info)
Constructor.
static void CALLBACK SimConnectProc(SIMCONNECT_RECV *pData, DWORD cbData, void *pContext)
SimConnect Callback.
CSimulatorP3D(const swift::misc::simulation::CSimulatorPluginInfo &info, swift::misc::simulation::IOwnAircraftProvider *ownAircraftProvider, swift::misc::simulation::IRemoteAircraftProvider *remoteAircraftProvider, swift::misc::network::IClientProvider *clientProvider, QObject *parent=nullptr)
Constructor, parameters as in.
virtual HRESULT initEventsP3D()
Specific P3D events.
virtual bool connectTo()
Connect to simulator.
CSimulatorP3DListener(const swift::misc::simulation::CSimulatorPluginInfo &info)
Constructor.
virtual void startImpl()
Plugin specific implementation to start listener.
QObject(QObject *parent)
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const
unsigned long DWORD
Fake Windows DWORD.
EventsIdsP3D
P3D specific events.