Commit Graph

35 Commits

Author SHA1 Message Date
Lars Toenning
b4cbed107b refactor: Remove CNetworkWatchdog
The watchdog was used in a few places as a shortcut to skip reading
data. Further, it was used in some places in the UI to display
connectivity. But it also introduced quite some complexity. In some
cases it can be fragile: network accessibilty cannot be looked up on all
platforms/hardware constellations. The connectivity could change
between the last watchdog call and the real call. Hence all readers must
still handle the case where the connection fails.
To simplify swift and further reduce the dependency onto the project
infrastructure (pings etc.), this removes the watchdog.
This also removes the QNetworkConfigurationManager, which is deprecated
and not available with Qt6.
2024-04-15 22:02:11 +02:00
Lars Toenning
9cdd624ae0 refactor: Remove ecosystem provider from WebDataServices
Spreading the information about the ecosystem into all
"low-level" readers, just to deactivate them when not using
a non-VATSIM ecosystem, should be avoided. Instead, the readers
should be disabled entirely from the outside . This will be done
in a upcoming refactoring (separate PR).
2024-03-21 22:42:02 +01:00
Lars Toenning
186af2777c refactor: Remove unused method 2024-03-21 22:42:01 +01:00
Lars Toenning
bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00
Lars Toenning
970b7c3650 clang-format src 2023-04-18 16:07:19 +02:00
Mat Sutcliffe
57d32da826 Use nested namespaces (C++17 feature) 2021-09-18 15:07:48 +01:00
Mat Sutcliffe
b80114213d Issue #77 Move mixin classes to separate files
By separating them from unrelated code, their dependents
can use them without depending on unrelated code, which
in turn helps to reduce cyclic dependencies.
2020-08-29 14:16:17 +01:00
Klaus Basan
5b3c011a15 Added "url" to signature "dataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number, const QUrl &url)"
Allows to write log. messages with URL
2020-06-12 18:42:38 +01:00
Klaus Basan
a6a787fdd7 Metar, slight style adjustments 2020-01-07 19:57:23 +00:00
Klaus Basan
928a76a042 Minor tweaks for METAR info 2020-01-07 19:57:20 +00:00
Klaus Basan
1d75b5fac7 Log info/warning about METAR URL 2019-09-16 22:41:32 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
20131d0b8e Do not parse METARs that are obvious html based error messages 2019-02-22 20:36:25 +00:00
Klaus Basan
f2b0417942 Check in readers "for shutdown"
* myself pattern
* use read as function name
2019-02-22 20:36:17 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Klaus Basan
956ffd949d Style 2018-08-26 15:26:49 +02:00
Klaus Basan
abfa12c1ec Ref T272, skip VATSIM readers if (for sure) connected to an other eco system
Remark: This requires the server (=> ecosystem) to be connected, otherwise VATSIM data (before that connection) are still read as default
2018-06-01 01:30:31 +02:00
Klaus Basan
b9760b4c60 Ref T149, use URL log to log network access in threaded reader classes
* added getFromNetworkAndLog
* adjusted DB reader
* adjusted other readers
2017-09-24 19:54:23 +01:00
Klaus Basan
f3847bd33c Ref T121, check if Internet is accessible
* in case the internet provider is down, this is not detected
* extended test to detect if access is possible
* in case of downtime this indicated in status component
2017-09-24 19:51:44 +01:00
Klaus Basan
874b517e23 Ref T104, use unified log function
and removed some redundant log messages
2017-09-24 19:50:25 +01:00
Klaus Basan
76b3b6c0b6 Utility function to directly log warning when network not accessible 2017-09-24 19:50:18 +01:00
Klaus Basan
8aed8f598e Ref T105, remove empty cleanup functions 2017-09-24 19:50:17 +01:00
Klaus Basan
b6b1b96ec4 Ref T105, use new style with threaded readers
* use doWorkCheck
* relaxed doWorkCheck in unit tests
* removed isShuttingDown, gracefulShutdown
* set timer object name (in case something is wrong, we might see the name in the log)
2017-09-24 19:50:08 +01:00
Roland Winklmeier
7edd1bb621 Rename CThreadedReader::isNetworkConnectedAndAccessible() for consistency
refs #869
2017-02-24 15:22:13 +00:00
Klaus Basan
1ced7f3c0b refs #857, check if network is accessible in readers
* new read state "skipped"
* renamed to "isNetworkConnectedAndAccessible"
* checking before reading, which would only fail if network is not accessible
2017-02-24 00:08:55 +00:00
Roland Winklmeier
4733c72553 Simplify CThreadedReader to avoid race conditions
refs #731
2016-08-26 21:04:39 +01:00
Mathew Sutcliffe
7a34cc6d9a refs #697 BlackCore settings renamed and reorganized. 2016-08-03 02:19:11 +01:00
Klaus Basan
0357dbde8f refs #712, improved readers
* only trigger read when network interface is available
* do not trigger all reads at same time but slightly shifted
* renamed to hasReceivedOkReply()
2016-07-28 21:08:25 +02:00
Klaus Basan
ade581fd50 Avoid issues during shutdown 2016-07-14 18:49:29 +02:00
Roland Winklmeier
63c88c6919 Replace private slot with private method
With the new Qt5 C++11 syntax, private slots are not really necessary.
Replacing it with a normal private method reduces the generated code
from moc and also syntax issues are raised as compiler errors instead
of runtime asserts.
2016-07-11 21:33:33 +02:00
Roland Winklmeier
a3fbbd7a67 Improve logging when parsing VATSIM METARs
refs #689
2016-07-11 21:33:33 +02:00
Roland Winklmeier
28ec2be1ca Change MetarSet to MetarList
CMetarSet was implemented as a collection. This only makes sense for
values which have one member variable only or hardly ever change. METARs
often change and therefore a collection didn't make much sense.
Additional profiling showed that a sequence has better algorithmic
performance.

refs #689
2016-07-11 21:33:33 +02:00
Klaus Basan
0939b1f08f refs #687, further performance improvements
* avoid redundant reads by excluding entities which will be periodically updated
* restart timers when data are received, avoid overlapping requests
2016-06-29 15:38:07 +02:00
Klaus Basan
0fca9c1f18 refs #687, use hash to avoid unnecessary operations
* for bookings
* VATSIM file (plus check if cache really changed before writing)
* METARs
2016-06-29 15:38:04 +02:00
Klaus Basan
488d437a2a #refs 686, used settings in readers
* moved threaded reader to BlackCore (settings are normally BlackCore aware)
* created ns/subfolder VATSIM
* prepared settings for the VATSIM readers
2016-06-29 01:04:41 +02:00