mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
Add methods to receive and write raw FSD messages
This commit adds methods to register for live FSD message reception. The amount of traffic can be quite high, therefore no normal signal is used - which would be available via DBus. Instead one has to connect manually by passing a functor. This guarantees that we communicate only in-process. If someone tries to connect on the proxy side, the connection will fail. This needs to be handled properly in client code. This commit also adds a method to write the FSD message to a selected file. Maniphest Tasks: T222
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/weather/metar.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
//! \addtogroup dbus
|
||||
//! @{
|
||||
|
||||
@@ -302,6 +304,13 @@ namespace BlackCore
|
||||
//! Request parts for callsign (from another client)
|
||||
virtual void testRequestAircraftConfig(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
|
||||
public:
|
||||
//! Raw FSD message receiver functor
|
||||
using RawFsdMessageReceivedSlot = std::function<void(const BlackMisc::Network::CRawFsdMessage &)>;
|
||||
|
||||
//! Connect to receive raw fsd messages
|
||||
virtual QMetaObject::Connection connectRawFsdMessageSignal(QObject *receiver, RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot) = 0;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
IContextNetwork(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : CContext(mode, runtime) {}
|
||||
|
||||
Reference in New Issue
Block a user