User:Bugman/subsystems
From FlightGear wiki
Jump to navigation
Jump to search
Tracking down subsystems
Script
The following script is for finding all FlightGear dependencies:
Python script: Python script for finding all subsystems within the flightgear and simgear C++ code bases.
This script requires the grep Unix command, which can be installed on any OS. And it must be run with Python3.
#! /usr/bin/env python3
# Python module imports.
import operator
from os import access, F_OK, sep
from re import search, split
from subprocess import PIPE, Popen
import sys
# Source code repository paths.
SIMGEAR_PATH = "/flightgear/src/flightgear-simgear"
FLIGHTGEAR_PATH = "/flightgear/src/flightgear-flightgear"
# Directories to exclude from the grep.
EXCLUDE_DIR = [
".git",
"build*"
]
class FindSubsystems:
"""Class for finding all subsystems and subsystem groups."""
def __init__(self):
"""Find all subsystems and subsystem groups."""
# Command line options.
self.xml = False
if len(sys.argv) == 2 and sys.argv[1] == "--xml":
self.xml = True
# SGSubsystem storage lists.
self.subsystems = [[], [], [], []]
self.groups = [[], [], [], []]
# Grep exclude options.
self.grep_exclude_dir = ""
for name in EXCLUDE_DIR:
self.grep_exclude_dir += "--exclude-dir \"%s\" " % name
# The base objects.
subsystem_base = Subsystem("SGSubsystem", xml=self.xml)
group_base = Subsystem("SGSubsystemGroup", base_class=Subsystem("SGSubsystem"), xml=self.xml)
# Add some problematic non-parsable classes.
self.subsystems[1].append(Subsystem("FGAISim", base_class=Subsystem("FGInterface", base_class=Subsystem("SGSubsystem")), declaration_file="src/FDM/SP/AISim.hpp", xml=self.xml))
# Find all SGSubsystem and SGSubsystemGroup derived classes.
paths = [SIMGEAR_PATH, FLIGHTGEAR_PATH]
for path in paths:
self.find_primary(path=path, text="classes", primary=self.subsystems[0], base_name="SGSubsystem", base=subsystem_base, skip=["SGSubsystemGroup"])
self.find_primary(path=path, text="groups", primary=self.groups[0], base_name="SGSubsystemGroup", base=group_base)
self.find_secondary(path=path, text="classes", primary=self.subsystems[0], secondary=self.subsystems[1])
self.find_secondary(path=path, text="groups", primary=self.groups[0], secondary=self.groups[1])
self.find_tertiary(path=path, text="classes", secondary=self.subsystems[1], tertiary=self.subsystems[2])
self.find_tertiary(path=path, text="groups", secondary=self.groups[1], tertiary=self.groups[2])
self.find_quaternary(path=path, text="classes", tertiary=self.subsystems[2], quaternary=self.subsystems[3])
self.find_quaternary(path=path, text="groups", tertiary=self.groups[2], quaternary=self.groups[3])
# Find the subsystem and subsystem group implementation files.
self.find_implementations()
# Final summary.
self.summarise()
def count(self, storage_list):
"""Count the number of subsystems and subsystem groups.
@param storage_list: The data structure to count.
@type storage_list: list of Subsystem instances
@return: The number of subsystems and number of groups.
@rtype: int, int
"""
# Init.
subsystems = 0
groups = 0
for element in storage_list:
if element.is_group():
groups += 1
else:
subsystems += 1
# Return the counts.
return subsystems, groups
def find_implementations(self):
"""Find all implementation files for all subsystems and subsystem groups."""
# Loop over all subsystems and groups.
for subsystem in self.subsystems[0] + self.subsystems[1] + self.subsystems[2] + self.subsystems[3] + self.groups[0] + self.groups[1] + self.groups[2] + self.groups[3]:
# The repository location.
if subsystem.declaration_file[:7] == "simgear":
path = SIMGEAR_PATH
else:
path = FLIGHTGEAR_PATH
# The grep command for the ctor and dtor implementation.
ctor = "\<%s\>::\<%s\>[ \(]" % (subsystem.name, subsystem.name)
dtor = "\<%s\>::\~\<%s\>[ \(]" % (subsystem.name, subsystem.name)
grep_ctor = 'grep -rI "%s\|%s"' % (ctor, dtor)
# The grep command for any function implementation.
grep_any = 'grep -rI %s "^[A-Za-z ]*\<%s\>::"' % (self.grep_exclude_dir, subsystem.name)
# Search for matching file roots.
if subsystem.declaration_file[-3:] == "hxx":
# The probable implementation file name.
file_name = subsystem.declaration_file[:-3] + "cxx"
full_path = path + sep + file_name
if access(full_path, F_OK):
# The Unix grep commands to run.
cmds = [
'%s %s' % (grep_ctor, full_path),
'%s %s | grep -v "return"' % (grep_any, full_path)
]
# Search.
for cmd in cmds:
pipe = Popen(cmd, shell=True, stdout=PIPE)
lines = pipe.stdout.readlines()
if len(lines):
subsystem.implementation_file = file_name
break
# Search everywhere.
else:
# The Unix grep commands to run.
cmds = [
'cd %s; %s' % (path, grep_ctor),
'cd %s; %s | grep -v "return"' % (path, grep_any)
]
# Search.
for cmd in cmds:
pipe = Popen(cmd, shell=True, stdout=PIPE)
# Read all output.
files = []
for line in pipe.stdout.readlines():
# Convert the byte-array.
line = line.decode()
# Add the file if not already present.
file_name = line.split(":")[0]
if file_name not in files:
files.append(file_name)
# Bad grep.
if len(files) > 1:
sys.stderr.write("Warning: Excessive grep matching, too many implementation files found for:\n")
sys.stderr.write(" %s: %s\n" % (subsystem.name, files))
# Store the implementation file.
elif len(files):
subsystem.implementation_file = files[0]
break
def find_primary(self, path=None, text=None, primary=None, base_name=None, base=None, skip=[]):
"""Find all primary subsystems and groups
@keyword path: The path to the repository to search through.
@type path: str
@keyword text: Text identifying subsystems vs. subsystem groups.
@type text: str
@keyword primary: The primary list of subsystems or groups.
@type primary: list of Subsystem instances
@keyword base_name: The name of the base class.
@type base_name: str
@keyword base: The base class object.
@type base: Subsystem instance
@keyword skip: A list of class names to skip.
@type skip: list of str
"""
# Printout.
sys.stderr.write("Finding all primary %s in: %s\n" % (text, path))
# Find all subsystems or groups.
for file_name, class_name in self.grep(path=path, base_name=base_name):
if class_name in skip:
continue
primary.append(Subsystem(class_name, base_class=base, declaration_file=file_name, xml=self.xml))
# Sort the subsystems by name.
primary.sort(key=operator.attrgetter('name'))
def find_secondary(self, path=None, text=None, primary=None, secondary=None):
"""Find all secondary subsystems and groups
@keyword path: The path to the repository to search through.
@type path: str
@keyword text: Text identifying subsystems vs. subsystem groups.
@type text: str
@keyword primary: The primary list of subsystems or groups.
@type primary: list of Subsystem instances
@keyword secondary: The secondary list of subsystems or groups.
@type secondary: list of Subsystem instances
"""
# Printout.
sys.stderr.write("Finding all secondary %s in: %s\n" % (text, path))
# Loop over all primary subsystems.
for subsystem in primary:
for file_name, derived_class in self.grep(path=path, base_name=subsystem.name):
secondary.append(Subsystem(derived_class, base_class=subsystem, declaration_file=file_name, xml=self.xml))
# Sort the subsystems by name.
secondary.sort(key=operator.attrgetter('name'))
def find_tertiary(self, path=None, text=None, secondary=None, tertiary=None):
"""Find all tertiary subsystems and groups
@keyword path: The path to the repository to search through.
@type path: str
@keyword text: Text identifying subsystems vs. subsystem groups.
@type text: str
@keyword secondary: The secondary list of subsystems or groups.
@type secondary: list of Subsystem instances
@keyword tertiary: The tertiary list of subsystems or groups.
@type tertiary: list of Subsystem instances
"""
# Printout.
sys.stderr.write("Finding all tertiary %s in: %s\n" % (text, path))
# Loop over all secondary subsystems.
for subsystem in secondary:
for file_name, derived_class in self.grep(path=path, base_name=subsystem.name):
tertiary.append(Subsystem(derived_class, base_class=subsystem, declaration_file=file_name, xml=self.xml))
# Sort all subsystems by name.
tertiary.sort(key=operator.attrgetter('name'))
def find_quaternary(self, path=None, text=None, tertiary=None, quaternary=None):
"""Find all quaternary subsystems and groups
@keyword path: The path to the repository to search through.
@type path: str
@keyword text: Text identifying subsystems vs. subsystem groups.
@type text: str
@keyword tertiary: The tertiary list of subsystems or groups.
@type tertiary: list of Subsystem instances
@keyword quaternary: The quaternary list of subsystems or groups.
@type quaternary: list of Subsystem instances
"""
# Printout.
sys.stderr.write("Finding all quaternary %s in: %s\n" % (text, path))
# Loop over all tertiary subsystems.
for subsystem in tertiary:
for file_name, derived_class in self.grep(path=path, base_name=subsystem.name):
quaternary.append(Subsystem(derived_class, base_class=subsystem, declaration_file=file_name, xml=self.xml))
# Sort all subsystems by name.
quaternary.sort(key=operator.attrgetter('name'))
def grep(self, path=None, base_name=None):
"""Generator method for finding all classes derived from the given base name and repository.
@keyword path: The path to the repository to search through.
@type path: str
@keyword base_name: The name of the base class.
@type base_name: str
@return: The source file and the name of the derived class.
@rtype: str, str
"""
# The Unix grep command to run.
cmd = 'cd %s; grep -rI %s "public \<%s\>" | grep -v "%s::"' % (path, self.grep_exclude_dir, base_name, base_name)
pipe = Popen(cmd, shell=True, stdout=PIPE)
# Read all output.
for line in pipe.stdout.readlines():
# Convert the byte-array.
line = line.decode()
# Skip this script.
if search("grep ", line):
continue
# Cannot handle this line!
if not search("class ", line):
sys.stderr.write("Skipping: %s\n" % repr(line[:-1]))
continue
# Split by single colons.
elements = split("(?<!:):(?!:)", line)
# The file and class name.
file_name = elements[0]
class_name = elements[1]
class_name = class_name.replace("class", "")
class_name = class_name.strip()
# Generator method.
yield file_name, class_name
def summarise(self):
"""Print out a summary of all found subsystems and subsystem groups."""
# XML start.
if self.xml:
print("<subsystems>")
# Subsystem and group printouts.
labels = ["primary", "secondary", "tertiary", "quaternary"]
labels2 = ["Primary", "Secondary", "Tertiary", "Quaternary"]
classes = ["subsystems", "groups"]
for i in range(len(self.subsystems)):
for j in range(len(classes)):
if classes[j] == "subsystems":
subsystem_list = self.subsystems[i]
else:
subsystem_list = self.groups[i]
# Nothing in the list.
if not len(subsystem_list):
continue
# Count all.
counts = self.count(subsystem_list)
# Start.
if self.xml:
print(" <%s_%s count=\"%i\">" % (labels[i], classes[j], counts[j]))
else:
print("\n%s %s (%i):" % (labels2[i], classes[j], counts[j]))
# Subsystems.
for subsystem in subsystem_list:
print(" %s" % (subsystem))
# End.
if self.xml:
print(" </%s_%s>" % (labels[i], classes[j]))
# Counts.
subsystem_classes = len(self.subsystems[0] + self.subsystems[1] + self.subsystems[2] + self.subsystems[3])
subsystem_groups = len(self.groups[0] + self.groups[1] + self.groups[2] + self.groups[3])
subsystem_total = subsystem_classes + subsystem_groups
# Separate simgear and flightgear subsystems.
subsystem_classes_simgear = 0
subsystem_classes_flightgear = 0
subsystem_groups_simgear = 0
subsystem_groups_flightgear = 0
for subsystem in self.subsystems[0] + self.subsystems[1] + self.subsystems[2] + self.subsystems[3]:
if subsystem.declaration_file[:7] == "simgear":
subsystem_classes_simgear += 1
else:
subsystem_classes_flightgear += 1
for group in self.groups[0] + self.groups[1] + self.groups[2] + self.groups[3]:
if group.declaration_file[:7] == "simgear":
subsystem_groups_simgear += 1
else:
subsystem_groups_flightgear += 1
# Sums.
simgear_total = subsystem_classes_simgear + subsystem_groups_simgear
flightgear_total = subsystem_classes_flightgear + subsystem_groups_flightgear
if self.xml:
print(" <counts>")
print(" <simgear>")
print(" <subsystem_classes>%i</subsystem_classes>" % subsystem_classes_simgear)
print(" <subsystem_groups>%i</subsystem_groups>" % subsystem_groups_simgear)
print(" <total>%i</total>" % simgear_total)
print(" </simgear>")
print(" <flightgear>")
print(" <subsystem_classes>%i</subsystem_classes>" % subsystem_classes_flightgear)
print(" <subsystem_groups>%i</subsystem_groups>" % subsystem_groups_flightgear)
print(" <total>%i</total>" % flightgear_total)
print(" </flightgear>")
print(" <combined>")
print(" <subsystem_classes>%i</subsystem_classes>" % subsystem_classes)
print(" <subsystem_groups>%i</subsystem_groups>" % subsystem_groups)
print(" <total>%i</total>" % subsystem_total)
print(" </combined>")
print(" </counts>")
else:
print("\nCounts: %i subsystem classes (%i flightgear, %i simgear)." % (subsystem_classes, subsystem_classes_flightgear, subsystem_classes_simgear))
print("Counts: %i subsystem groups (%i flightgear, %i simgear)." % (subsystem_groups, subsystem_groups_flightgear, subsystem_groups_simgear))
print("Counts: %i subsystem classes and groups (%i flightgear, %i simgear)." % (subsystem_total, flightgear_total, simgear_total))
# XML end.
if self.xml:
print("</subsystems>")
class Subsystem:
"""Object for storing the information for a specific subsystem."""
def __init__(self, name, base_class=None, declaration_file=None, implementation_file=None, xml=False):
"""Set up the object.
@param name: The name of the subsystem.
@type name: str
@keyword base_class: The name of the base class.
@type base_class: str
@keyword declaration_file: The name of the file containing the subsystem declaration.
@type declaration_file: str
@keyword implementation_file: The name of the file containing the subsystem declaration.
@type implementation_file: str
@keyword xml: Produce a valid XML representation of the object.
@type xml: bool
"""
# Store the data.
self.name = name
self.base_class = base_class
self.declaration_file = declaration_file
self.implementation_file = implementation_file
self.xml = xml
def __repr__(self):
"""Overwrite the string representation of the object.
@return: The string representation.
@rtype: str
"""
# The subsystem name.
string = "<%s" % self.name
# The inheritance chain.
if self.base_class:
if self.xml:
string += " from=\""
else:
string += " : "
string += "%s" % self.base_class.name
if self.base_class.base_class:
string += " : %s" % self.base_class.base_class.name
if self.base_class.base_class.base_class:
string += " : %s" % self.base_class.base_class.base_class.name
if self.base_class.base_class.base_class.base_class:
string += " : %s" % self.base_class.base_class.base_class.base_class.name
if self.base_class.base_class.base_class.base_class.base_class:
string += " : %s" % self.base_class.base_class.base_class.base_class.base_class.name
if self.xml:
string += "\""
# Add the declaration file name.
if self.xml:
string += " declaration="
else:
string += " in "
string += "\"%s\"" % self.declaration_file
# Add the implementation file name.
if self.implementation_file:
if self.xml:
string += " implementation="
else:
string += ", "
string += "\"%s\"" % self.implementation_file
# Closure.
if self.xml:
string += "/"
string += ">"
# Return the representation.
return string
def is_group(self):
"""Determine this is a subsystem or subsystem group.
@return: True if this is a subsystem group.
@rtype: bool
"""
# Chase the base name as far as possible.
if self.name == "SGSubsystemGroup":
return True
if self.base_class.name == "SGSubsystemGroup":
return True
if self.base_class.base_class:
if self.base_class.base_class.name == "SGSubsystemGroup":
return True
if self.base_class.base_class.base_class:
if self.base_class.base_class.base_class.name == "SGSubsystemGroup":
return True
if self.base_class.base_class.base_class.base_class:
if self.base_class.base_class.base_class.base_class.name == "SGSubsystemGroup":
return True
if self.base_class.base_class.base_class.base_class.base_class:
if self.base_class.base_class.base_class.base_class.name.base_class.name == "SGSubsystemGroup":
return True
# A normal subsystem.
return False
# Instantiate the class if run as a script.
if __name__ == "__main__":
FindSubsystems()
All subsystems
The result is:
XML output: A listing of all flightgear and simgear subsystems and subsystem groups.
XML output from the Python script for finding all subsystems within the flightgear and simgear C++ code bases. The error output from the script was redirected and hence not shown below.
<subsystems>
<primary_subsystems count="91">
<ADF from="SGSubsystem" declaration="src/Instrumentation/adf.hxx" implementation="src/Instrumentation/adf.cxx"/>
<AirportDynamicsManager from="SGSubsystem" declaration="src/Airports/airportdynamicsmanager.hxx" implementation="src/Airports/airportdynamicsmanager.cxx"/>
<AirspeedIndicator from="SGSubsystem" declaration="src/Instrumentation/airspeed_indicator.hxx" implementation="src/Instrumentation/airspeed_indicator.cxx"/>
<Altimeter from="SGSubsystem" declaration="src/Instrumentation/altimeter.hxx" implementation="src/Instrumentation/altimeter.cxx"/>
<AreaSampler from="SGSubsystem" declaration="src/Environment/terrainsampler.cxx" implementation="src/Environment/terrainsampler.cxx"/>
<AttitudeIndicator from="SGSubsystem" declaration="src/Instrumentation/attitude_indicator.hxx" implementation="src/Instrumentation/attitude_indicator.cxx"/>
<Clock from="SGSubsystem" declaration="src/Instrumentation/clock.hxx" implementation="src/Instrumentation/clock.cxx"/>
<CommRadio from="SGSubsystem" declaration="src/Instrumentation/commradio.hxx"/>
<Component from="SGSubsystem" declaration="src/Autopilot/component.hxx" implementation="src/Autopilot/component.cxx"/>
<DCLGPS from="SGSubsystem" declaration="src/Instrumentation/dclgps.hxx" implementation="src/Instrumentation/dclgps.cxx"/>
<DME from="SGSubsystem" declaration="src/Instrumentation/dme.hxx" implementation="src/Instrumentation/dme.cxx"/>
<Ephemeris from="SGSubsystem" declaration="src/Environment/ephemeris.hxx" implementation="src/Environment/ephemeris.cxx"/>
<FDMShell from="SGSubsystem" declaration="src/FDM/fdm_shell.hxx" implementation="src/FDM/fdm_shell.cxx"/>
<FGAIManager from="SGSubsystem" declaration="src/AIModel/AIManager.hxx" implementation="src/AIModel/AIManager.cxx"/>
<FGATCManager from="SGSubsystem" declaration="src/ATC/atc_mgr.hxx" implementation="src/ATC/atc_mgr.cxx"/>
<FGAircraftModel from="SGSubsystem" declaration="src/Model/acmodel.hxx" implementation="src/Model/acmodel.cxx"/>
<FGCom from="SGSubsystem" declaration="src/Network/fgcom.hxx" implementation="src/Network/fgcom.cxx"/>
<FGControls from="SGSubsystem" declaration="src/Aircraft/controls.hxx" implementation="src/Aircraft/controls.cxx"/>
<FGDNSClient from="SGSubsystem" declaration="src/Network/DNSClient.hxx" implementation="src/Network/DNSClient.cxx"/>
<FGElectricalSystem from="SGSubsystem" declaration="src/Systems/electrical.hxx" implementation="src/Systems/electrical.cxx"/>
<FGEventInput from="SGSubsystem" declaration="src/Input/FGEventInput.hxx" implementation="src/Input/FGEventInput.cxx"/>
<FGFlightHistory from="SGSubsystem" declaration="src/Aircraft/FlightHistory.hxx" implementation="src/Aircraft/FlightHistory.cxx"/>
<FGHTTPClient from="SGSubsystem" declaration="src/Network/HTTPClient.hxx" implementation="src/Network/HTTPClient.cxx"/>
<FGHttpd from="SGSubsystem" declaration="src/Network/http/httpd.hxx"/>
<FGIO from="SGSubsystem" declaration="src/Main/fg_io.hxx" implementation="src/Main/fg_io.cxx"/>
<FGInterface from="SGSubsystem" declaration="src/FDM/flight.hxx" implementation="src/FDM/flight.cxx"/>
<FGJoystickInput from="SGSubsystem" declaration="src/Input/FGJoystickInput.hxx" implementation="src/Input/FGJoystickInput.cxx"/>
<FGKR_87 from="SGSubsystem" declaration="src/Instrumentation/kr_87.hxx" implementation="src/Instrumentation/kr_87.cxx"/>
<FGKeyboardInput from="SGSubsystem" declaration="src/Input/FGKeyboardInput.hxx" implementation="src/Input/FGKeyboardInput.cxx"/>
<FGLight from="SGSubsystem" declaration="src/Time/light.hxx" implementation="src/Time/light.cxx"/>
<FGLogger from="SGSubsystem" declaration="src/Main/logger.hxx" implementation="src/Main/logger.cxx"/>
<FGMagVarManager from="SGSubsystem" declaration="src/Environment/magvarmanager.hxx" implementation="src/Environment/magvarmanager.cxx"/>
<FGMarkerBeacon from="SGSubsystem" declaration="src/Instrumentation/marker_beacon.hxx" implementation="src/Instrumentation/marker_beacon.cxx"/>
<FGModelMgr from="SGSubsystem" declaration="src/Model/modelmgr.hxx" implementation="src/Model/modelmgr.cxx"/>
<FGMouseInput from="SGSubsystem" declaration="src/Input/FGMouseInput.hxx" implementation="src/Input/FGMouseInput.cxx"/>
<FGMultiplayMgr from="SGSubsystem" declaration="src/MultiPlayer/multiplaymgr.hxx" implementation="src/MultiPlayer/multiplaymgr.cxx"/>
<FGNasalSys from="SGSubsystem" declaration="src/Scripting/NasalSys.hxx" implementation="src/Scripting/NasalSys.cxx"/>
<FGNavRadio from="SGSubsystem" declaration="src/Instrumentation/navradio.hxx" implementation="src/Instrumentation/navradio.cxx"/>
<FGPanel from="SGSubsystem" declaration="utils/fgpanel/FGPanel.hxx" implementation="utils/fgpanel/FGPanel.cxx"/>
<FGPanelProtocol from="SGSubsystem" declaration="utils/fgpanel/FGPanelProtocol.hxx" implementation="utils/fgpanel/FGPanelProtocol.cxx"/>
<FGPrecipitationMgr from="SGSubsystem" declaration="src/Environment/precipitation_mgr.hxx" implementation="src/Environment/precipitation_mgr.cxx"/>
<FGProperties from="SGSubsystem" declaration="src/Main/fg_props.hxx" implementation="src/Main/fg_props.cxx"/>
<FGReplay from="SGSubsystem" declaration="src/Aircraft/replay.hxx" implementation="src/Aircraft/replay.cxx"/>
<FGRidgeLift from="SGSubsystem" declaration="src/Environment/ridge_lift.hxx" implementation="src/Environment/ridge_lift.cxx"/>
<FGRouteMgr from="SGSubsystem" declaration="src/Autopilot/route_mgr.hxx" implementation="src/Autopilot/route_mgr.cxx"/>
<FGScenery from="SGSubsystem" declaration="src/Scenery/scenery.hxx" implementation="src/Scenery/scenery.cxx"/>
<FGSoundManager from="SGSubsystem" declaration="src/Sound/soundmanager.hxx" implementation="src/Sound/soundmanager.cxx"/>
<FGSubmodelMgr from="SGSubsystem" declaration="src/AIModel/submodel.hxx" implementation="src/AIModel/submodel.cxx"/>
<FGSubsystemExample from="SGSubsystem" declaration="docs-mini/README.introduction" implementation="docs-mini/README.introduction"/>
<FGTrafficManager from="SGSubsystem" declaration="src/Traffic/TrafficMgr.hxx" implementation="src/Traffic/TrafficMgr.cxx"/>
<FGViewMgr from="SGSubsystem" declaration="src/Viewer/viewmgr.hxx" implementation="src/Viewer/viewmgr.cxx"/>
<FGVoiceMgr from="SGSubsystem" declaration="src/Sound/voice.hxx" implementation="src/Sound/voice.cxx"/>
<GPS from="SGSubsystem" declaration="src/Instrumentation/gps.hxx" implementation="src/Instrumentation/gps.cxx"/>
<GSDI from="SGSubsystem" declaration="src/Instrumentation/gsdi.hxx" implementation="src/Instrumentation/gsdi.cxx"/>
<GUIMgr from="SGSubsystem" declaration="src/Canvas/gui_mgr.hxx" implementation="src/Canvas/gui_mgr.cxx"/>
<GroundRadar from="SGSubsystem" declaration="src/Cockpit/groundradar.hxx" implementation="src/Cockpit/groundradar.cxx"/>
<HUD from="SGSubsystem" declaration="src/Instrumentation/HUD/HUD.hxx" implementation="src/Instrumentation/HUD/HUD.cxx"/>
<HeadingIndicator from="SGSubsystem" declaration="src/Instrumentation/heading_indicator.hxx" implementation="src/Instrumentation/heading_indicator.cxx"/>
<HeadingIndicatorDG from="SGSubsystem" declaration="src/Instrumentation/heading_indicator_dg.hxx" implementation="src/Instrumentation/heading_indicator_dg.cxx"/>
<HeadingIndicatorFG from="SGSubsystem" declaration="src/Instrumentation/heading_indicator_fg.hxx" implementation="src/Instrumentation/heading_indicator_fg.cxx"/>
<InstVerticalSpeedIndicator from="SGSubsystem" declaration="src/Instrumentation/inst_vertical_speed_indicator.hxx" implementation="src/Instrumentation/inst_vertical_speed_indicator.cxx"/>
<LayerInterpolateController from="SGSubsystem" declaration="src/Environment/environment_ctrl.hxx"/>
<MK_VIII from="SGSubsystem" declaration="src/Instrumentation/mk_viii.hxx" implementation="src/Instrumentation/mk_viii.cxx"/>
<MagCompass from="SGSubsystem" declaration="src/Instrumentation/mag_compass.hxx" implementation="src/Instrumentation/mag_compass.cxx"/>
<MasterReferenceGyro from="SGSubsystem" declaration="src/Instrumentation/mrg.hxx" implementation="src/Instrumentation/mrg.cxx"/>
<NavDisplay from="SGSubsystem" declaration="src/Cockpit/NavDisplay.hxx" implementation="src/Cockpit/NavDisplay.cxx"/>
<NavRadio from="SGSubsystem" declaration="src/Instrumentation/newnavradio.hxx"/>
<NewGUI from="SGSubsystem" declaration="src/GUI/new_gui.hxx" implementation="src/GUI/new_gui.cxx"/>
<PerformanceDB from="SGSubsystem" declaration="src/AIModel/performancedb.hxx" implementation="src/AIModel/performancedb.cxx"/>
<PitotSystem from="SGSubsystem" declaration="src/Systems/pitot.hxx" implementation="src/Systems/pitot.cxx"/>
<PropertyBasedMgr from="SGSubsystem" declaration="simgear/props/PropertyBasedMgr.hxx" implementation="simgear/props/PropertyBasedMgr.cxx"/>
<PropertyInterpolationMgr from="SGSubsystem" declaration="simgear/props/PropertyInterpolationMgr.hxx" implementation="simgear/props/PropertyInterpolationMgr.cxx"/>
<RadarAltimeter from="SGSubsystem" declaration="src/Instrumentation/rad_alt.hxx" implementation="src/Instrumentation/rad_alt.cxx"/>
<RealWxController from="SGSubsystem" declaration="src/Environment/realwx_ctrl.hxx" implementation="src/Environment/realwx_ctrl.cxx"/>
<SGEventMgr from="SGSubsystem" declaration="simgear/structure/event_mgr.hxx" implementation="simgear/structure/event_mgr.cxx"/>
<SGInterpolator from="SGSubsystem" declaration="simgear/misc/interpolator.hxx" implementation="simgear/misc/interpolator.cxx"/>
<SGPerformanceMonitor from="SGSubsystem" declaration="simgear/structure/SGPerfMon.hxx" implementation="simgear/structure/SGPerfMon.cxx"/>
<SGSoundMgr from="SGSubsystem" declaration="simgear/sound/soundmgr.hxx"/>
<SGSubsystemMgr from="SGSubsystem" declaration="simgear/structure/subsystem_mgr.hxx" implementation="simgear/structure/subsystem_mgr.cxx"/>
<SGTerraSync from="SGSubsystem" declaration="simgear/scene/tsync/terrasync.hxx" implementation="simgear/scene/tsync/terrasync.cxx"/>
<SlipSkidBall from="SGSubsystem" declaration="src/Instrumentation/slip_skid_ball.hxx" implementation="src/Instrumentation/slip_skid_ball.cxx"/>
<StaticSystem from="SGSubsystem" declaration="src/Systems/static.hxx" implementation="src/Systems/static.cxx"/>
<TACAN from="SGSubsystem" declaration="src/Instrumentation/tacan.hxx" implementation="src/Instrumentation/tacan.cxx"/>
<TCAS from="SGSubsystem" declaration="src/Instrumentation/tcas.hxx" implementation="src/Instrumentation/tcas.cxx"/>
<TimeManager from="SGSubsystem" declaration="src/Time/TimeManager.hxx" implementation="src/Time/TimeManager.cxx"/>
<Transponder from="SGSubsystem" declaration="src/Instrumentation/transponder.hxx" implementation="src/Instrumentation/transponder.cxx"/>
<TurnIndicator from="SGSubsystem" declaration="src/Instrumentation/turn_indicator.hxx" implementation="src/Instrumentation/turn_indicator.cxx"/>
<VacuumSystem from="SGSubsystem" declaration="src/Systems/vacuum.hxx" implementation="src/Systems/vacuum.cxx"/>
<VerticalSpeedIndicator from="SGSubsystem" declaration="src/Instrumentation/vertical_speed_indicator.hxx" implementation="src/Instrumentation/vertical_speed_indicator.cxx"/>
<View from="SGSubsystem" declaration="src/Viewer/view.hxx" implementation="src/Viewer/view.cxx"/>
<wxRadarBg from="SGSubsystem" declaration="src/Cockpit/wxradar.hxx" implementation="src/Cockpit/wxradar.cxx"/>
</primary_subsystems>
<primary_groups count="8">
<Autopilot from="SGSubsystemGroup : SGSubsystem" declaration="src/Autopilot/autopilot.hxx" implementation="src/Autopilot/autopilot.cxx"/>
<CockpitDisplayManager from="SGSubsystemGroup : SGSubsystem" declaration="src/Cockpit/cockpitDisplayManager.hxx" implementation="src/Cockpit/cockpitDisplayManager.cxx"/>
<FGEnvironmentMgr from="SGSubsystemGroup : SGSubsystem" declaration="src/Environment/environment_mgr.hxx" implementation="src/Environment/environment_mgr.cxx"/>
<FGInput from="SGSubsystemGroup : SGSubsystem" declaration="src/Input/input.hxx" implementation="src/Input/input.cxx"/>
<FGInstrumentMgr from="SGSubsystemGroup : SGSubsystem" declaration="src/Instrumentation/instrument_mgr.hxx" implementation="src/Instrumentation/instrument_mgr.cxx"/>
<FGSystemMgr from="SGSubsystemGroup : SGSubsystem" declaration="src/Systems/system_mgr.hxx" implementation="src/Systems/system_mgr.cxx"/>
<FGXMLAutopilotGroup from="SGSubsystemGroup : SGSubsystem" declaration="src/Autopilot/autopilotgroup.hxx" implementation="src/Autopilot/autopilotgroup.cxx"/>
<TerrainSampler from="SGSubsystemGroup : SGSubsystem" declaration="src/Environment/terrainsampler.hxx"/>
</primary_groups>
<secondary_subsystems count="28">
<AnalogComponent from="Component : SGSubsystem" declaration="src/Autopilot/analogcomponent.hxx" implementation="src/Autopilot/analogcomponent.cxx"/>
<BasicRealWxController from="RealWxController : SGSubsystem" declaration="src/Environment/realwx_ctrl.cxx" implementation="src/Environment/realwx_ctrl.cxx"/>
<CanvasMgr from="PropertyBasedMgr : SGSubsystem" declaration="simgear/canvas/CanvasMgr.hxx" implementation="simgear/canvas/CanvasMgr.cxx"/>
<CommRadioImpl from="CommRadio : SGSubsystem" declaration="src/Instrumentation/commradio.cxx" implementation="src/Instrumentation/commradio.cxx"/>
<DigitalComponent from="Component : SGSubsystem" declaration="src/Autopilot/digitalcomponent.hxx" implementation="src/Autopilot/digitalcomponent.cxx"/>
<FGACMS from="FGInterface : SGSubsystem" declaration="src/FDM/SP/ACMS.hxx" implementation="src/FDM/SP/ACMS.cxx"/>
<FGADA from="FGInterface : SGSubsystem" declaration="src/FDM/SP/ADA.hxx" implementation="src/FDM/SP/ADA.cxx"/>
<FGAISim from="FGInterface : SGSubsystem" declaration="src/FDM/SP/AISim.hpp" implementation="src/FDM/SP/AISim.cpp"/>
<FGBalloonSim from="FGInterface : SGSubsystem" declaration="src/FDM/SP/Balloon.h" implementation="src/FDM/SP/Balloon.cxx"/>
<FGExternalNet from="FGInterface : SGSubsystem" declaration="src/FDM/ExternalNet/ExternalNet.hxx" implementation="src/FDM/ExternalNet/ExternalNet.cxx"/>
<FGExternalPipe from="FGInterface : SGSubsystem" declaration="src/FDM/ExternalPipe/ExternalPipe.hxx" implementation="src/FDM/ExternalPipe/ExternalPipe.cxx"/>
<FGHIDEventInput from="FGEventInput : SGSubsystem" declaration="src/Input/FGHIDEventInput.hxx" implementation="src/Input/FGHIDEventInput.cxx"/>
<FGJSBsim from="FGInterface : SGSubsystem" declaration="src/FDM/JSBSim/JSBSim.hxx" implementation="src/FDM/JSBSim/JSBSim.cxx"/>
<FGLaRCsim from="FGInterface : SGSubsystem" declaration="src/FDM/LaRCsim/LaRCsim.hxx" implementation="src/FDM/LaRCsim/LaRCsim.cxx"/>
<FGLinuxEventInput from="FGEventInput : SGSubsystem" declaration="src/Input/FGLinuxEventInput.hxx" implementation="src/Input/FGLinuxEventInput.cxx"/>
<FGMacOSXEventInput from="FGEventInput : SGSubsystem" declaration="src/Input/FGMacOSXEventInput.hxx" implementation="src/Input/FGMacOSXEventInput.cxx"/>
<FGMagicCarpet from="FGInterface : SGSubsystem" declaration="src/FDM/SP/MagicCarpet.hxx" implementation="src/FDM/SP/MagicCarpet.cxx"/>
<FGNullFDM from="FGInterface : SGSubsystem" declaration="src/FDM/NullFDM.hxx" implementation="src/FDM/NullFDM.cxx"/>
<FGReadablePanel from="FGPanel : SGSubsystem" declaration="utils/fgpanel/panel_io.hxx" implementation="utils/fgpanel/panel_io.cxx"/>
<FGSoundManager from="SGSoundMgr : SGSubsystem" declaration="src/Sound/soundmanager.hxx" implementation="src/Sound/soundmanager.cxx"/>
<FGUFO from="FGInterface : SGSubsystem" declaration="src/FDM/UFO.hxx" implementation="src/FDM/UFO.cxx"/>
<KLN89 from="DCLGPS : SGSubsystem" declaration="src/Instrumentation/KLN89/kln89.hxx" implementation="src/Instrumentation/KLN89/kln89.cxx"/>
<LayerInterpolateControllerImplementation from="LayerInterpolateController : SGSubsystem" declaration="src/Environment/environment_ctrl.cxx" implementation="src/Environment/environment_ctrl.cxx"/>
<MongooseHttpd from="FGHttpd : SGSubsystem" declaration="src/Network/http/httpd.cxx" implementation="src/Network/http/httpd.cxx"/>
<NavRadioImpl from="NavRadio : SGSubsystem" declaration="src/Instrumentation/newnavradio.cxx" implementation="src/Instrumentation/newnavradio.cxx"/>
<StateMachineComponent from="Component : SGSubsystem" declaration="src/Autopilot/autopilot.cxx" implementation="src/Autopilot/autopilot.cxx"/>
<YASim from="FGInterface : SGSubsystem" declaration="src/FDM/YASim/YASim.hxx" implementation="src/FDM/YASim/YASim.cxx"/>
<agRadar from="wxRadarBg : SGSubsystem" declaration="src/Cockpit/agradar.hxx" implementation="src/Cockpit/agradar.cxx"/>
</secondary_subsystems>
<secondary_groups count="2">
<FGXMLAutopilotGroupImplementation from="FGXMLAutopilotGroup : SGSubsystemGroup : SGSubsystem" declaration="src/Autopilot/autopilotgroup.cxx" implementation="src/Autopilot/autopilotgroup.cxx"/>
<TerrainSamplerImplementation from="TerrainSampler : SGSubsystemGroup : SGSubsystem" declaration="src/Environment/terrainsampler.cxx" implementation="src/Environment/terrainsampler.cxx"/>
</secondary_groups>
<tertiary_subsystems count="6">
<DigitalFilter from="AnalogComponent : Component : SGSubsystem" declaration="src/Autopilot/digitalfilter.hxx" implementation="src/Autopilot/digitalfilter.cxx"/>
<Logic from="DigitalComponent : Component : SGSubsystem" declaration="src/Autopilot/logic.hxx" implementation="src/Autopilot/logic.cxx"/>
<NoaaMetarRealWxController from="BasicRealWxController : RealWxController : SGSubsystem" declaration="src/Environment/realwx_ctrl.cxx" implementation="src/Environment/realwx_ctrl.cxx"/>
<PIDController from="AnalogComponent : Component : SGSubsystem" declaration="src/Autopilot/pidcontroller.hxx" implementation="src/Autopilot/pidcontroller.cxx"/>
<PISimpleController from="AnalogComponent : Component : SGSubsystem" declaration="src/Autopilot/pisimplecontroller.hxx" implementation="src/Autopilot/pisimplecontroller.cxx"/>
<Predictor from="AnalogComponent : Component : SGSubsystem" declaration="src/Autopilot/predictor.hxx" implementation="src/Autopilot/predictor.cxx"/>
</tertiary_subsystems>
<quaternary_subsystems count="1">
<FlipFlop from="Logic : DigitalComponent : Component : SGSubsystem" declaration="src/Autopilot/flipflop.hxx" implementation="src/Autopilot/flipflop.cxx"/>
</quaternary_subsystems>
<counts>
<simgear>
<subsystem_classes>9</subsystem_classes>
<subsystem_groups>0</subsystem_groups>
<total>9</total>
</simgear>
<flightgear>
<subsystem_classes>117</subsystem_classes>
<subsystem_groups>10</subsystem_groups>
<total>127</total>
</flightgear>
<combined>
<subsystem_classes>126</subsystem_classes>
<subsystem_groups>10</subsystem_groups>
<total>136</total>
</combined>
</counts>
</subsystems>
Text output: A listing of all flightgear and simgear subsystems and subsystem groups.
Output from the Python script for finding all subsystems within the flightgear and simgear C++ code bases. The error output from the script was redirected and hence not shown below.
Primary subsystems (91):
<ADF : SGSubsystem in "src/Instrumentation/adf.hxx", "src/Instrumentation/adf.cxx">
<AirportDynamicsManager : SGSubsystem in "src/Airports/airportdynamicsmanager.hxx", "src/Airports/airportdynamicsmanager.cxx">
<AirspeedIndicator : SGSubsystem in "src/Instrumentation/airspeed_indicator.hxx", "src/Instrumentation/airspeed_indicator.cxx">
<Altimeter : SGSubsystem in "src/Instrumentation/altimeter.hxx", "src/Instrumentation/altimeter.cxx">
<AreaSampler : SGSubsystem in "src/Environment/terrainsampler.cxx", "src/Environment/terrainsampler.cxx">
<AttitudeIndicator : SGSubsystem in "src/Instrumentation/attitude_indicator.hxx", "src/Instrumentation/attitude_indicator.cxx">
<Clock : SGSubsystem in "src/Instrumentation/clock.hxx", "src/Instrumentation/clock.cxx">
<CommRadio : SGSubsystem in "src/Instrumentation/commradio.hxx">
<Component : SGSubsystem in "src/Autopilot/component.hxx", "src/Autopilot/component.cxx">
<DCLGPS : SGSubsystem in "src/Instrumentation/dclgps.hxx", "src/Instrumentation/dclgps.cxx">
<DME : SGSubsystem in "src/Instrumentation/dme.hxx", "src/Instrumentation/dme.cxx">
<Ephemeris : SGSubsystem in "src/Environment/ephemeris.hxx", "src/Environment/ephemeris.cxx">
<FDMShell : SGSubsystem in "src/FDM/fdm_shell.hxx", "src/FDM/fdm_shell.cxx">
<FGAIManager : SGSubsystem in "src/AIModel/AIManager.hxx", "src/AIModel/AIManager.cxx">
<FGATCManager : SGSubsystem in "src/ATC/atc_mgr.hxx", "src/ATC/atc_mgr.cxx">
<FGAircraftModel : SGSubsystem in "src/Model/acmodel.hxx", "src/Model/acmodel.cxx">
<FGCom : SGSubsystem in "src/Network/fgcom.hxx", "src/Network/fgcom.cxx">
<FGControls : SGSubsystem in "src/Aircraft/controls.hxx", "src/Aircraft/controls.cxx">
<FGDNSClient : SGSubsystem in "src/Network/DNSClient.hxx", "src/Network/DNSClient.cxx">
<FGElectricalSystem : SGSubsystem in "src/Systems/electrical.hxx", "src/Systems/electrical.cxx">
<FGEventInput : SGSubsystem in "src/Input/FGEventInput.hxx", "src/Input/FGEventInput.cxx">
<FGFlightHistory : SGSubsystem in "src/Aircraft/FlightHistory.hxx", "src/Aircraft/FlightHistory.cxx">
<FGHTTPClient : SGSubsystem in "src/Network/HTTPClient.hxx", "src/Network/HTTPClient.cxx">
<FGHttpd : SGSubsystem in "src/Network/http/httpd.hxx">
<FGIO : SGSubsystem in "src/Main/fg_io.hxx", "src/Main/fg_io.cxx">
<FGInterface : SGSubsystem in "src/FDM/flight.hxx", "src/FDM/flight.cxx">
<FGJoystickInput : SGSubsystem in "src/Input/FGJoystickInput.hxx", "src/Input/FGJoystickInput.cxx">
<FGKR_87 : SGSubsystem in "src/Instrumentation/kr_87.hxx", "src/Instrumentation/kr_87.cxx">
<FGKeyboardInput : SGSubsystem in "src/Input/FGKeyboardInput.hxx", "src/Input/FGKeyboardInput.cxx">
<FGLight : SGSubsystem in "src/Time/light.hxx", "src/Time/light.cxx">
<FGLogger : SGSubsystem in "src/Main/logger.hxx", "src/Main/logger.cxx">
<FGMagVarManager : SGSubsystem in "src/Environment/magvarmanager.hxx", "src/Environment/magvarmanager.cxx">
<FGMarkerBeacon : SGSubsystem in "src/Instrumentation/marker_beacon.hxx", "src/Instrumentation/marker_beacon.cxx">
<FGModelMgr : SGSubsystem in "src/Model/modelmgr.hxx", "src/Model/modelmgr.cxx">
<FGMouseInput : SGSubsystem in "src/Input/FGMouseInput.hxx", "src/Input/FGMouseInput.cxx">
<FGMultiplayMgr : SGSubsystem in "src/MultiPlayer/multiplaymgr.hxx", "src/MultiPlayer/multiplaymgr.cxx">
<FGNasalSys : SGSubsystem in "src/Scripting/NasalSys.hxx", "src/Scripting/NasalSys.cxx">
<FGNavRadio : SGSubsystem in "src/Instrumentation/navradio.hxx", "src/Instrumentation/navradio.cxx">
<FGPanel : SGSubsystem in "utils/fgpanel/FGPanel.hxx", "utils/fgpanel/FGPanel.cxx">
<FGPanelProtocol : SGSubsystem in "utils/fgpanel/FGPanelProtocol.hxx", "utils/fgpanel/FGPanelProtocol.cxx">
<FGPrecipitationMgr : SGSubsystem in "src/Environment/precipitation_mgr.hxx", "src/Environment/precipitation_mgr.cxx">
<FGProperties : SGSubsystem in "src/Main/fg_props.hxx", "src/Main/fg_props.cxx">
<FGReplay : SGSubsystem in "src/Aircraft/replay.hxx", "src/Aircraft/replay.cxx">
<FGRidgeLift : SGSubsystem in "src/Environment/ridge_lift.hxx", "src/Environment/ridge_lift.cxx">
<FGRouteMgr : SGSubsystem in "src/Autopilot/route_mgr.hxx", "src/Autopilot/route_mgr.cxx">
<FGScenery : SGSubsystem in "src/Scenery/scenery.hxx", "src/Scenery/scenery.cxx">
<FGSoundManager : SGSubsystem in "src/Sound/soundmanager.hxx", "src/Sound/soundmanager.cxx">
<FGSubmodelMgr : SGSubsystem in "src/AIModel/submodel.hxx", "src/AIModel/submodel.cxx">
<FGSubsystemExample : SGSubsystem in "docs-mini/README.introduction", "docs-mini/README.introduction">
<FGTrafficManager : SGSubsystem in "src/Traffic/TrafficMgr.hxx", "src/Traffic/TrafficMgr.cxx">
<FGViewMgr : SGSubsystem in "src/Viewer/viewmgr.hxx", "src/Viewer/viewmgr.cxx">
<FGVoiceMgr : SGSubsystem in "src/Sound/voice.hxx", "src/Sound/voice.cxx">
<GPS : SGSubsystem in "src/Instrumentation/gps.hxx", "src/Instrumentation/gps.cxx">
<GSDI : SGSubsystem in "src/Instrumentation/gsdi.hxx", "src/Instrumentation/gsdi.cxx">
<GUIMgr : SGSubsystem in "src/Canvas/gui_mgr.hxx", "src/Canvas/gui_mgr.cxx">
<GroundRadar : SGSubsystem in "src/Cockpit/groundradar.hxx", "src/Cockpit/groundradar.cxx">
<HUD : SGSubsystem in "src/Instrumentation/HUD/HUD.hxx", "src/Instrumentation/HUD/HUD.cxx">
<HeadingIndicator : SGSubsystem in "src/Instrumentation/heading_indicator.hxx", "src/Instrumentation/heading_indicator.cxx">
<HeadingIndicatorDG : SGSubsystem in "src/Instrumentation/heading_indicator_dg.hxx", "src/Instrumentation/heading_indicator_dg.cxx">
<HeadingIndicatorFG : SGSubsystem in "src/Instrumentation/heading_indicator_fg.hxx", "src/Instrumentation/heading_indicator_fg.cxx">
<InstVerticalSpeedIndicator : SGSubsystem in "src/Instrumentation/inst_vertical_speed_indicator.hxx", "src/Instrumentation/inst_vertical_speed_indicator.cxx">
<LayerInterpolateController : SGSubsystem in "src/Environment/environment_ctrl.hxx">
<MK_VIII : SGSubsystem in "src/Instrumentation/mk_viii.hxx", "src/Instrumentation/mk_viii.cxx">
<MagCompass : SGSubsystem in "src/Instrumentation/mag_compass.hxx", "src/Instrumentation/mag_compass.cxx">
<MasterReferenceGyro : SGSubsystem in "src/Instrumentation/mrg.hxx", "src/Instrumentation/mrg.cxx">
<NavDisplay : SGSubsystem in "src/Cockpit/NavDisplay.hxx", "src/Cockpit/NavDisplay.cxx">
<NavRadio : SGSubsystem in "src/Instrumentation/newnavradio.hxx">
<NewGUI : SGSubsystem in "src/GUI/new_gui.hxx", "src/GUI/new_gui.cxx">
<PerformanceDB : SGSubsystem in "src/AIModel/performancedb.hxx", "src/AIModel/performancedb.cxx">
<PitotSystem : SGSubsystem in "src/Systems/pitot.hxx", "src/Systems/pitot.cxx">
<PropertyBasedMgr : SGSubsystem in "simgear/props/PropertyBasedMgr.hxx", "simgear/props/PropertyBasedMgr.cxx">
<PropertyInterpolationMgr : SGSubsystem in "simgear/props/PropertyInterpolationMgr.hxx", "simgear/props/PropertyInterpolationMgr.cxx">
<RadarAltimeter : SGSubsystem in "src/Instrumentation/rad_alt.hxx", "src/Instrumentation/rad_alt.cxx">
<RealWxController : SGSubsystem in "src/Environment/realwx_ctrl.hxx", "src/Environment/realwx_ctrl.cxx">
<SGEventMgr : SGSubsystem in "simgear/structure/event_mgr.hxx", "simgear/structure/event_mgr.cxx">
<SGInterpolator : SGSubsystem in "simgear/misc/interpolator.hxx", "simgear/misc/interpolator.cxx">
<SGPerformanceMonitor : SGSubsystem in "simgear/structure/SGPerfMon.hxx", "simgear/structure/SGPerfMon.cxx">
<SGSoundMgr : SGSubsystem in "simgear/sound/soundmgr.hxx">
<SGSubsystemMgr : SGSubsystem in "simgear/structure/subsystem_mgr.hxx", "simgear/structure/subsystem_mgr.cxx">
<SGTerraSync : SGSubsystem in "simgear/scene/tsync/terrasync.hxx", "simgear/scene/tsync/terrasync.cxx">
<SlipSkidBall : SGSubsystem in "src/Instrumentation/slip_skid_ball.hxx", "src/Instrumentation/slip_skid_ball.cxx">
<StaticSystem : SGSubsystem in "src/Systems/static.hxx", "src/Systems/static.cxx">
<TACAN : SGSubsystem in "src/Instrumentation/tacan.hxx", "src/Instrumentation/tacan.cxx">
<TCAS : SGSubsystem in "src/Instrumentation/tcas.hxx", "src/Instrumentation/tcas.cxx">
<TimeManager : SGSubsystem in "src/Time/TimeManager.hxx", "src/Time/TimeManager.cxx">
<Transponder : SGSubsystem in "src/Instrumentation/transponder.hxx", "src/Instrumentation/transponder.cxx">
<TurnIndicator : SGSubsystem in "src/Instrumentation/turn_indicator.hxx", "src/Instrumentation/turn_indicator.cxx">
<VacuumSystem : SGSubsystem in "src/Systems/vacuum.hxx", "src/Systems/vacuum.cxx">
<VerticalSpeedIndicator : SGSubsystem in "src/Instrumentation/vertical_speed_indicator.hxx", "src/Instrumentation/vertical_speed_indicator.cxx">
<View : SGSubsystem in "src/Viewer/view.hxx", "src/Viewer/view.cxx">
<wxRadarBg : SGSubsystem in "src/Cockpit/wxradar.hxx", "src/Cockpit/wxradar.cxx">
Primary groups (8):
<Autopilot : SGSubsystemGroup : SGSubsystem in "src/Autopilot/autopilot.hxx", "src/Autopilot/autopilot.cxx">
<CockpitDisplayManager : SGSubsystemGroup : SGSubsystem in "src/Cockpit/cockpitDisplayManager.hxx", "src/Cockpit/cockpitDisplayManager.cxx">
<FGEnvironmentMgr : SGSubsystemGroup : SGSubsystem in "src/Environment/environment_mgr.hxx", "src/Environment/environment_mgr.cxx">
<FGInput : SGSubsystemGroup : SGSubsystem in "src/Input/input.hxx", "src/Input/input.cxx">
<FGInstrumentMgr : SGSubsystemGroup : SGSubsystem in "src/Instrumentation/instrument_mgr.hxx", "src/Instrumentation/instrument_mgr.cxx">
<FGSystemMgr : SGSubsystemGroup : SGSubsystem in "src/Systems/system_mgr.hxx", "src/Systems/system_mgr.cxx">
<FGXMLAutopilotGroup : SGSubsystemGroup : SGSubsystem in "src/Autopilot/autopilotgroup.hxx", "src/Autopilot/autopilotgroup.cxx">
<TerrainSampler : SGSubsystemGroup : SGSubsystem in "src/Environment/terrainsampler.hxx">
Secondary subsystems (28):
<AnalogComponent : Component : SGSubsystem in "src/Autopilot/analogcomponent.hxx", "src/Autopilot/analogcomponent.cxx">
<BasicRealWxController : RealWxController : SGSubsystem in "src/Environment/realwx_ctrl.cxx", "src/Environment/realwx_ctrl.cxx">
<CanvasMgr : PropertyBasedMgr : SGSubsystem in "simgear/canvas/CanvasMgr.hxx", "simgear/canvas/CanvasMgr.cxx">
<CommRadioImpl : CommRadio : SGSubsystem in "src/Instrumentation/commradio.cxx", "src/Instrumentation/commradio.cxx">
<DigitalComponent : Component : SGSubsystem in "src/Autopilot/digitalcomponent.hxx", "src/Autopilot/digitalcomponent.cxx">
<FGACMS : FGInterface : SGSubsystem in "src/FDM/SP/ACMS.hxx", "src/FDM/SP/ACMS.cxx">
<FGADA : FGInterface : SGSubsystem in "src/FDM/SP/ADA.hxx", "src/FDM/SP/ADA.cxx">
<FGAISim : FGInterface : SGSubsystem in "src/FDM/SP/AISim.hpp", "src/FDM/SP/AISim.cpp">
<FGBalloonSim : FGInterface : SGSubsystem in "src/FDM/SP/Balloon.h", "src/FDM/SP/Balloon.cxx">
<FGExternalNet : FGInterface : SGSubsystem in "src/FDM/ExternalNet/ExternalNet.hxx", "src/FDM/ExternalNet/ExternalNet.cxx">
<FGExternalPipe : FGInterface : SGSubsystem in "src/FDM/ExternalPipe/ExternalPipe.hxx", "src/FDM/ExternalPipe/ExternalPipe.cxx">
<FGHIDEventInput : FGEventInput : SGSubsystem in "src/Input/FGHIDEventInput.hxx", "src/Input/FGHIDEventInput.cxx">
<FGJSBsim : FGInterface : SGSubsystem in "src/FDM/JSBSim/JSBSim.hxx", "src/FDM/JSBSim/JSBSim.cxx">
<FGLaRCsim : FGInterface : SGSubsystem in "src/FDM/LaRCsim/LaRCsim.hxx", "src/FDM/LaRCsim/LaRCsim.cxx">
<FGLinuxEventInput : FGEventInput : SGSubsystem in "src/Input/FGLinuxEventInput.hxx", "src/Input/FGLinuxEventInput.cxx">
<FGMacOSXEventInput : FGEventInput : SGSubsystem in "src/Input/FGMacOSXEventInput.hxx", "src/Input/FGMacOSXEventInput.cxx">
<FGMagicCarpet : FGInterface : SGSubsystem in "src/FDM/SP/MagicCarpet.hxx", "src/FDM/SP/MagicCarpet.cxx">
<FGNullFDM : FGInterface : SGSubsystem in "src/FDM/NullFDM.hxx", "src/FDM/NullFDM.cxx">
<FGReadablePanel : FGPanel : SGSubsystem in "utils/fgpanel/panel_io.hxx", "utils/fgpanel/panel_io.cxx">
<FGSoundManager : SGSoundMgr : SGSubsystem in "src/Sound/soundmanager.hxx", "src/Sound/soundmanager.cxx">
<FGUFO : FGInterface : SGSubsystem in "src/FDM/UFO.hxx", "src/FDM/UFO.cxx">
<KLN89 : DCLGPS : SGSubsystem in "src/Instrumentation/KLN89/kln89.hxx", "src/Instrumentation/KLN89/kln89.cxx">
<LayerInterpolateControllerImplementation : LayerInterpolateController : SGSubsystem in "src/Environment/environment_ctrl.cxx", "src/Environment/environment_ctrl.cxx">
<MongooseHttpd : FGHttpd : SGSubsystem in "src/Network/http/httpd.cxx", "src/Network/http/httpd.cxx">
<NavRadioImpl : NavRadio : SGSubsystem in "src/Instrumentation/newnavradio.cxx", "src/Instrumentation/newnavradio.cxx">
<StateMachineComponent : Component : SGSubsystem in "src/Autopilot/autopilot.cxx", "src/Autopilot/autopilot.cxx">
<YASim : FGInterface : SGSubsystem in "src/FDM/YASim/YASim.hxx", "src/FDM/YASim/YASim.cxx">
<agRadar : wxRadarBg : SGSubsystem in "src/Cockpit/agradar.hxx", "src/Cockpit/agradar.cxx">
Secondary groups (2):
<FGXMLAutopilotGroupImplementation : FGXMLAutopilotGroup : SGSubsystemGroup : SGSubsystem in "src/Autopilot/autopilotgroup.cxx", "src/Autopilot/autopilotgroup.cxx">
<TerrainSamplerImplementation : TerrainSampler : SGSubsystemGroup : SGSubsystem in "src/Environment/terrainsampler.cxx", "src/Environment/terrainsampler.cxx">
Tertiary subsystems (6):
<DigitalFilter : AnalogComponent : Component : SGSubsystem in "src/Autopilot/digitalfilter.hxx", "src/Autopilot/digitalfilter.cxx">
<Logic : DigitalComponent : Component : SGSubsystem in "src/Autopilot/logic.hxx", "src/Autopilot/logic.cxx">
<NoaaMetarRealWxController : BasicRealWxController : RealWxController : SGSubsystem in "src/Environment/realwx_ctrl.cxx", "src/Environment/realwx_ctrl.cxx">
<PIDController : AnalogComponent : Component : SGSubsystem in "src/Autopilot/pidcontroller.hxx", "src/Autopilot/pidcontroller.cxx">
<PISimpleController : AnalogComponent : Component : SGSubsystem in "src/Autopilot/pisimplecontroller.hxx", "src/Autopilot/pisimplecontroller.cxx">
<Predictor : AnalogComponent : Component : SGSubsystem in "src/Autopilot/predictor.hxx", "src/Autopilot/predictor.cxx">
Quaternary subsystems (1):
<FlipFlop : Logic : DigitalComponent : Component : SGSubsystem in "src/Autopilot/flipflop.hxx", "src/Autopilot/flipflop.cxx">
Counts: 126 subsystem classes (117 flightgear, 9 simgear).
Counts: 10 subsystem groups (10 flightgear, 0 simgear).
Counts: 136 subsystem classes and groups (127 flightgear, 9 simgear).
Refactoring
To check that all subsystems on a branch have been updated or refactored:
Python script: Python script verifying if all subsystems have been updated.
#! /usr/bin/env python3
# Python module imports.
from subprocess import PIPE, Popen
# Other module imports.
from find_subsystems import FindSubsystems
# Source code repository paths.
SIMGEAR_PATH = "/flightgear/src/flightgear-simgear"
FLIGHTGEAR_PATH = "/flightgear/src/flightgear-flightgear"
class ToUpdate:
"""Class for finding all files yet to be updated."""
def __init__(self):
"""Find all files to be updated."""
# First find all subsystems.
subsystems = FindSubsystems()
# Generate a list of files to skip.
cmd = "cd %s;" % SIMGEAR_PATH
cmd += "git diff --name-only ..next;"
cmd += "cd %s;" % FLIGHTGEAR_PATH
cmd += "git diff --name-only ..next"
pipe = Popen(cmd, shell=True, stdout=PIPE)
blacklist = []
for line in pipe.stdout.readlines():
file_name = line.decode()
file_name = file_name.strip()
blacklist.append(file_name)
# Loop over all derived classes.
print("\nYet to be updated:")
for storage_list in subsystems.subsystems + subsystems.groups:
for subsystem in storage_list:
if subsystem.file_name not in blacklist:
print(" %s: %s" % (subsystem.file_name, subsystem))
# Instantiate the class if run as a script.
if __name__ == "__main__":
ToUpdate()