swift
|
Class faking a FS9 multiplayer client connection. More...
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. | |
![]() | |
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::CInterpolatorMulti * | getInterpolator () |
Get interpolator. | |
const swift::misc::simulation::CInterpolatorMulti * | getInterpolator () const |
Get interpolator. | |
![]() | |
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) |
![]() | |
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 | |
![]() | |
HRESULT | sendMessage (const QByteArray &data) |
Send a custom DirectPlay message. More... | |
void | reset () |
Reset peer. | |
![]() | |
static const QStringList & | getLogCategories () |
Log categories. | |
![]() | |
using | TCallbackWrapper = CallbackWrapper< CDirectPlayPeer, HRESULT, DWORD, void * > |
DirectPlay peer message handler wrapper. | |
![]() | |
const swift::misc::aviation::CCallsign | m_callsign |
Peer callsign. | |
IDirectPlay8Peer * | m_directPlayPeer = nullptr |
DirectPlay peer address. | |
IDirectPlay8Address * | m_deviceAddress = nullptr |
DirectPlay device address. | |
QList< CHostNode > | m_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. | |
Class faking a FS9 multiplayer client connection.
Definition at line 26 of file fs9client.h.
CStatusMessageList swift::simplugin::fs9::CFs9Client::getInterpolationMessages | ( | swift::misc::simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode | mode | ) | const |
Interpolation messages.
Definition at line 218 of file fs9client.cpp.
|
protectedvirtual |
Definition at line 224 of file fs9client.cpp.