Commit Graph
93 Commits
Author SHA1 Message Date
Edward d'Auvergne fa754ecaf8 SGSubsystem classes: Registration of all subsystems. 2019-07-01 14:37:49 +02:00
Edward d'Auvergne c8625ce599 SGSubsystem classes: Addition of staticSubsystemClassId() to all subsystems. 2019-07-01 14:37:48 +02:00
Edward d'Auvergne 10662e4ca5 SGSubsystem classes: Subsystem and subsystem group API declaration standardisation.
This is a cleanup commit.
2019-06-16 14:12:38 +02:00
Edward d'Auvergne b73dfb08ae SGSubsystem classes: Whitespace standardisation of the declarations.
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs.  It includes all SGSubsystem and SGSubsystemGroup derived classes.
2019-06-16 14:12:38 +02:00
Richard Harrison 5f9b17d55b Terrasync fixes;
- remove the old svn properties; a scan of FGAddon and FGdata showed these are not in use except for the dialog
- new property "active" - which is true when the worker thread is running.
- changes to enabled now take effect immediately; whereas before a reinit had to be issued. This could lead to confusing GUI state as the enabled property would be true but without closing the dialog (e.g. cancelling it) terrasync could be in a different state.
- use property nodes (performance optimisation)
2019-04-08 14:08:58 +02:00
Torsten Dreyer a4cf38925b move TS dns lookup into the worker thread 2017-03-07 11:32:39 +01:00
Torsten Dreyer 41059a24a7 Fix indention, no functional change 2017-03-07 09:22:05 +01:00
Torsten Dreyer e509fc3f5d Prepare for terrasync/https 2017-02-23 16:35:29 +01:00
Florent Rougon 79f869a7f3 Move IOStreams-related files to simgear/io/iostreams; rename zfstream.[ch]xx to gzfstream.[ch]xx
- Rename zfstream.cxx (resp. zfstream.hxx) to gzfstream.cxx (resp.
  gzfstream.hxx)

  This is because these files only deal with the gzip format (RFC 1952),
  while zlib can actually read and write two slightly different formats:
  this one and the "ZLIB Compressed Data Format" (RFC 1950). Since I am
  going to add std::streambuf and std::istream subclasses able to deal
  with both formats (and supporting data sources that are general
  std::istream instances, not just files), this renaming will make
  things a bit clearer, I hope.

- Add new folder simgear/io/iostreams and move the following files to
  this folder:

    simgear/misc/gzcontainerfile.cxx
    simgear/misc/gzcontainerfile.hxx
    simgear/misc/gzfstream.cxx
    simgear/misc/gzfstream.hxx
    simgear/misc/sgstream.cxx
    simgear/misc/sgstream.hxx
    simgear/misc/sgstream_test.cxx

- Adapt other files accordingly (mainly #includes and CMakeLists.txt
  files).
2017-02-12 21:18:52 +01:00
Stuart Buchanan 6c64e9b36c Add scenery-path-suffix support to terrasync
Remove /sim/rendering/building-mesh as it is
redundant.

Add check that objects are in the correct bounding
box of the containing STG file.
2017-01-21 22:19:38 +00:00
Erik Hofman e768553a4a Replace auto_ptr with unique_ptr 2016-12-07 11:03:49 +01:00
James Turner 2aaad212e8 Revert partial-update mode for TerraSync repos.
Going to implement this a different, simpler way now,
2016-11-25 22:19:51 +00:00
James Turner 87590cafb2 Fix terrasync behaviour when net is down. 2016-09-07 22:49:03 +01:00
Torsten Dreyer c1ba974538 Make requested tsync scenery-version settable from prop
set /sim/terrasync/scenery-version=ws30 to filter the DNS NAPTR
records for service=ws30
current default (and only available) scenery version is ws20

This enables usage of multiple scenery repositories
2016-08-29 21:00:03 +02:00
James Turner d7d59b08a2 Copy-from-install support in TerraSync
Allows repositories to be initialised based on data in the install.
This avoids duplicate downloading of the Model and Airport data,
and the starting scenery.

Requires a corresponding FlightGear change to be functional.
2016-08-18 16:21:31 +01:00
James Turner f21eac8473 Building with clean SGPath API 2016-06-30 16:17:52 +01:00
James Turner 37c551bae7 Fix for HTTP/curl waiting on update
This improves responsiveness of TerraSync with small files and general
throughout dramatically.
2016-06-08 15:43:59 +01:00
James Turner 0ccf3e1629 Threadsafe terrasync state updates/reading. 2016-06-08 15:27:47 +01:00
James Turner 00f4248137 Partial update support for HTTP repos.
Not used yet, we set full-update mode on repositories for the
moment. Pending Terrasync change will enable partial mode.
2016-05-26 23:35:11 +01:00
James Turner 43ebde9914 Expose pending count from terrasync
Total and expose HTTP pending download value as a new
property under terrasync-root.
2016-05-26 17:38:02 +01:00
James Turner 7d59dd977f AbstractRepository interface removed. 2016-05-26 17:38:02 +01:00
James Turner 9d2df12ab8 Remove old terraysnc backend methods.
Only in-process HTTP access is supported now, SVN and rsync
and removed. This is to allow changes for better use of the
HTTP API.
2016-05-26 17:38:02 +01:00
Torsten Dreyer 862980a67a Remove unneeded local scope
(no functional change intended)
2016-05-06 16:20:09 +02:00
Torsten Dreyer 9a29f54f8a Terrasync: implement HTTP service lookup via DNS
Let terrasync use the http repository if
  /sim/terrasync/http-server == "automatic"
  resolve DNS NAPTR RR for terrasync.flightgear.org with service "ws20"
  and flags "U". Pick one of the returned entries with lowest order
  and preference. If more than one entry  with the same order and
  preference is returned, pick a random entry of those returned.

or if
  /sim/terrasync/http-server != "automatic"
  explicitly use the value of that property as the http server

if
  /sim/terrasync/http-server is empty, fall back to the legacy
  SVN repository
2016-05-03 12:11:38 +02:00
James Turner 2438dd8a08 Disable persistent TerraSync cache for HTTP
- since the root-level request for an HTTP repo is small, and static,
  it doesn’t make sense to use the same persistent cache, especially
  for initial testing.
2016-03-05 09:53:37 +00:00
James Turner 0b4f416ddc More error reporting from TerraSync/HTTP
- raise more errors when requests fail, and report/catch these.
2016-02-25 21:20:33 +02:00
James Turner d179fccfcb Optionally use HTTP repository.
- disabled by default since needs much testing.
2016-02-21 21:49:20 +02:00
James Turner 7075a8707b Create TerraSync repo API
- create an abstract API for a remote repository, based on the current
  SVN repository API, and update the code accordingly.
2016-02-21 15:49:12 +01:00
Torsten Dreyer 951859d8a7 correct user-agent string for terrasync 2016-02-15 16:53:31 +01:00
James Turner 41f40a9a10 Fix misnamed macro.
- should fix TerraSync user-agent.
2016-02-08 09:37:35 +00:00
Gijs de Rooy 576ff21488 TerraSync log typo 2016-01-20 12:16:14 +01:00
James Turner b60f8b4989 New log class for terrasync 2016-01-16 15:49:58 -06:00
James Turner ef7a0dc5a3 Trying to debug HTTP timeouts 2016-01-01 17:17:55 -06:00
Erik Hofman 1e32c24a17 Fix two comparison between signed and unsigned integer warnings 2015-12-11 11:09:39 +01:00
James Turner a9742fba7c Fix SVN server fallback when query fails 2015-06-07 15:53:44 +02:00
James Turner 6683092bb2 Select default TerraSync server automatically. 2015-04-11 23:50:33 +01:00
James Turner 7d2ecef14a Whitespace clean-up 2015-03-11 09:43:40 +00:00
James Turner bc72c34d0f Terrasync logging tweaks 2015-03-11 09:43:24 +00:00
James Turner ddd9691439 Explicitly track not-found responses from SVN.
When SVN reports a path is not found (ocean tile), track
this data explicitly and cache the result. Reduces backend
hits for missing tiles.
2014-12-01 17:49:03 +00:00
James Turner bd5bc9cda0 TerraSync: expose method as public
- needed for command-line terrasync util.
2014-02-25 09:13:16 +00:00
James Turner a07cfdb683 Remove obsolete TerraSync methods.
- all scheduling is now done via paths/buckets, not lat+lon.
2014-02-24 18:45:57 +00:00
James Turner 2edbb1cf8b Reset: clear some property references. 2013-12-15 20:48:30 +00:00
Martin Spott 27063d0c32 Repository name preferred 2013-11-16 10:44:17 -08:00
James Turner 80ff0282c3 Give terrasync a custom HTTP UA. 2013-11-16 09:45:40 +00:00
James Turner b7df9026c0 Reset: Terrasync root can change, can be shutdown. 2013-11-12 23:04:13 +00:00
James Turner 2f42a8714c Terrasync: don't busy wait when no requests are running. 2013-10-28 14:51:52 +00:00
James Turner d896e71ae9 Add total bytes downloaded tracking. 2013-10-24 23:35:44 +01:00
James Turner 4766910413 Terraysnc: don't block requests when inactive.
Add the same check for data files so we don't block when terrasync is
disabled.
2013-10-17 17:29:06 +01:00
James Turner f75730f165 Initial work on syncing non-scenery data.
This is some initial pieces to synchronise other pieces of base
data than scenery via the sync mechanism. An additional sync slot is
added to avoid scenery or other data blocking each other.
2013-10-17 16:39:29 +01:00
James Turner 4a0377c0a1 Rename WaitingSyncItem -> SyncItem.
More accurate name (we have these for items which are not waiting),
and also shorter.
2013-09-30 21:59:18 +01:00