mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #865, further improved logging
* set log flag in hints, so no lock for each aircraft is needed * as a result log functions have a bool log parameter now * highlight situation and parts changed
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ff7756db38
commit
62d4a94106
@@ -111,13 +111,13 @@ namespace BlackMisc
|
||||
virtual BlackMisc::Aviation::CAircraftParts getInterpolatedParts(
|
||||
const Aviation::CCallsign &callsign,
|
||||
const BlackMisc::Aviation::CAircraftPartsList &parts, qint64 cutoffTime,
|
||||
PartsStatus &partsStatus) const;
|
||||
PartsStatus &partsStatus, bool log = false) const;
|
||||
|
||||
//! Parts before given offset time (aka pending parts)
|
||||
//! \threadsafe
|
||||
virtual BlackMisc::Aviation::CAircraftParts getInterpolatedParts(
|
||||
const BlackMisc::Aviation::CCallsign &callsign, qint64 cutoffTime,
|
||||
PartsStatus &partsStatus) const;
|
||||
PartsStatus &partsStatus, bool log = false) const;
|
||||
|
||||
//! Enable debug messages etc.
|
||||
//! \threadsafe
|
||||
@@ -129,6 +129,11 @@ namespace BlackMisc
|
||||
//! Clear log file
|
||||
void clearLog();
|
||||
|
||||
//! Enable log messages etc.
|
||||
//! \threadsafe
|
||||
//! \remark public for FS9 to get setup in Fs9Client
|
||||
CInterpolationAndRenderingSetup getInterpolatorSetup() const;
|
||||
|
||||
/*!
|
||||
* Takes input between 0 and 1 and returns output between 0 and 1 smoothed with an S-shaped curve.
|
||||
*
|
||||
@@ -170,16 +175,12 @@ namespace BlackMisc
|
||||
//! Constructor
|
||||
IInterpolator(BlackMisc::Simulation::IRemoteAircraftProvider *provider, const QString &objectName, QObject *parent);
|
||||
|
||||
//! Enable debug messages etc.
|
||||
//! \threadsafe
|
||||
CInterpolationAndRenderingSetup getInterpolatorSetup() const;
|
||||
|
||||
//! Log interpolation, only stores in memory, for performance reasons
|
||||
//! Log current interpolation cycle, only stores in memory, for performance reasons
|
||||
//! \remark const to allow const interpolator functions
|
||||
//! \threadsafe
|
||||
void logInterpolation(const InterpolationLog &log) const;
|
||||
|
||||
//! Log parts, only stores in memory, for performance reasons
|
||||
//! Log current parts cycle, only stores in memory, for performance reasons
|
||||
//! \remark const to allow const interpolator functions
|
||||
//! \threadsafe
|
||||
void logParts(const PartsLog &parts) const;
|
||||
@@ -202,7 +203,10 @@ namespace BlackMisc
|
||||
|
||||
private:
|
||||
//! Write log to file
|
||||
static CStatusMessage writeLogFile(const QList<InterpolationLog> &interpolation, const QList<PartsLog> &parts);
|
||||
static CStatusMessageList writeLogFile(const QList<InterpolationLog> &interpolation, const QList<PartsLog> &parts);
|
||||
|
||||
//! Status of file operation
|
||||
static CStatusMessage logStatusFileWriting(bool success, const QString &fileName);
|
||||
|
||||
//! Create readable time
|
||||
static QString msSinceEpochToTime(qint64 ms);
|
||||
|
||||
Reference in New Issue
Block a user