swift
Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
swift::simplugin::fs9::CFs9Client Class Reference

Class faking a FS9 multiplayer client connection. More...

Inheritance diagram for swift::simplugin::fs9::CFs9Client:
[legend]

Public Types

enum  ClientStatus { Connected , Disconnected }
 Connection status.
 

Signals

void statusChanged (const swift::misc::simulation::CSimulatedAircraft &remoteAircraft, swift::simplugin::fs9::CFs9Client::ClientStatus)
 Client status changed.
 
- Signals inherited from swift::simplugin::fs9::CDirectPlayPeer
void customPacketReceived (const QByteArray &data)
 Received custom FS9 packet.
 
void connectionComplete ()
 Async operatione complete.
 

Public Member Functions

 CFs9Client (const swift::misc::simulation::CSimulatedAircraft &remoteAircraft, const swift::misc::physical_quantities::CTime &updateInterval, swift::misc::simulation::CInterpolationLogger *logger, swift::core::ISimulator *simulator)
 Constructor.
 
virtual ~CFs9Client ()
 Destructor.
 
void setHostAddress (const QString &hostAddress)
 Set DirectPlay host address.
 
void start ()
 Starts the FS9 client messaging.
 
swift::misc::CStatusMessageList getInterpolationMessages (swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const
 Interpolation messages. More...
 
void sendMultiplayerPosition (const swift::misc::aviation::CAircraftSituation &situation)
 Send a situation (position)
 
void sendMultiplayerParts (const swift::misc::aviation::CAircraftParts &parts)
 Send parts (lights, gear ...)
 
void sendTextMessage (const QString &textMessage)
 Send new text message.
 
swift::misc::simulation::CInterpolatorMultigetInterpolator ()
 Get interpolator.
 
const swift::misc::simulation::CInterpolatorMultigetInterpolator () const
 Get interpolator.
 
- Public Member Functions inherited from swift::simplugin::fs9::CDirectPlayPeer
 CDirectPlayPeer (const swift::misc::aviation::CCallsign &callsign, QObject *parent=nullptr)
 Constructor.
 
virtual ~CDirectPlayPeer ()
 Destructor.
 
DPNID getPlayerUserId () const
 Returns users DirectPlay ID.
 
void setPlayerUserId (DPNID id)
 Sets users DirectPlay ID.
 

Protected Member Functions

virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from swift::simplugin::fs9::CDirectPlayPeer
HRESULT directPlayMessageHandler (DWORD messageId, void *msgBuffer)
 DirectPlay message handler.
 
HRESULT initDirectPlay ()
 Initialize DirectPlay.
 
bool isServiceProviderValid (const GUID *pGuidSP)
 Returns true of the service provider is a valid on this machine.
 
HRESULT createDeviceAddress ()
 Creates a new DirectPlay device address.
 
HRESULT createHostAddress ()
 Creates a new DirectPlay device address.
 

Additional Inherited Members

- Public Slots inherited from swift::simplugin::fs9::CDirectPlayPeer
HRESULT sendMessage (const QByteArray &data)
 Send a custom DirectPlay message. More...
 
void reset ()
 Reset peer.
 
- Static Public Member Functions inherited from swift::simplugin::fs9::CDirectPlayPeer
static const QStringList & getLogCategories ()
 Log categories.
 
- Protected Types inherited from swift::simplugin::fs9::CDirectPlayPeer
using TCallbackWrapper = CallbackWrapper< CDirectPlayPeer, HRESULT, DWORD, void * >
 DirectPlay peer message handler wrapper.
 
- Protected Attributes inherited from swift::simplugin::fs9::CDirectPlayPeer
const swift::misc::aviation::CCallsign m_callsign
 Peer callsign.
 
IDirectPlay8Peer * m_directPlayPeer = nullptr
 DirectPlay peer address.
 
IDirectPlay8Address * m_deviceAddress = nullptr
 DirectPlay device address.
 
QList< CHostNodem_hostNodeList
 List of enumerated hosts.
 
quint32 m_packetIndex = 0
 Multiplayer packet index.
 
std::atomic< DPNID > m_playerLocal = { 0 }
 Local player Id.
 
std::atomic< DPNID > m_playerUser = { 0 }
 User player Id.
 
TCallbackWrapper m_callbackWrapper
 Callback wrapper.
 

Detailed Description

Class faking a FS9 multiplayer client connection.

Definition at line 26 of file fs9client.h.

Member Function Documentation

◆ getInterpolationMessages()

CStatusMessageList swift::simplugin::fs9::CFs9Client::getInterpolationMessages ( swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode  mode) const

Interpolation messages.

Definition at line 218 of file fs9client.cpp.

◆ timerEvent()

void swift::simplugin::fs9::CFs9Client::timerEvent ( QTimerEvent *  event)
protectedvirtual

Definition at line 224 of file fs9client.cpp.


The documentation for this class was generated from the following files: