Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
Loading...
Searching...
No Matches
icarus::IntrospectionGraph Struct Reference

Complete introspection graph: nodes (components) + typed edges. More...

#include <IntrospectionGraph.hpp>

Collaboration diagram for icarus::IntrospectionGraph:

Public Member Functions

nlohmann::json ToJSON () const
 Serialize the full graph to JSON.
void ToJSONFile (const std::string &path) const
 Write the full graph to a JSON file.
void ToYAMLFile (const std::string &path) const
 Write the full graph to a YAML file.

Public Attributes

DataDictionary dictionary
 The existing data dictionary (component nodes with signal lists).
std::vector< IntrospectionEdgeedges
 All topology edges (routes + resolves).

Detailed Description

Complete introspection graph: nodes (components) + typed edges.

Composes with DataDictionary (which provides component/signal node data) and adds topology edges for block diagram rendering.

Edge Sources

  • Route edges: From SignalRouter — explicit input-to-output wiring
  • Resolve edges: From Backplane::resolve() tracking — implicit source bindings where a component reads another component's output directly (e.g., Vehicle6DOF reading Engine.force.x via SignalHandle)

JSON Schema

Extends the DataDictionary schema with an additive "edges" array:

{
"summary": { "...existing...", "total_edges": 15 },
"components": [ "...unchanged..." ],
"edges": [
{ "source": "Rocket.Engine.force.x", "target": "Rocket.Vehicle", "kind": "resolve" }
]
}

Member Function Documentation

◆ ToJSON()

nlohmann::json icarus::IntrospectionGraph::ToJSON ( ) const
inlinenodiscard

Serialize the full graph to JSON.

Produces the existing DataDictionary schema with an additional top-level "edges" array and "total_edges" in summary.

◆ ToJSONFile()

void icarus::IntrospectionGraph::ToJSONFile ( const std::string & path) const
inline

Write the full graph to a JSON file.

◆ ToYAMLFile()

void icarus::IntrospectionGraph::ToYAMLFile ( const std::string & path) const
inline

Write the full graph to a YAML file.

Member Data Documentation

◆ dictionary

DataDictionary icarus::IntrospectionGraph::dictionary

The existing data dictionary (component nodes with signal lists).

◆ edges

std::vector<IntrospectionEdge> icarus::IntrospectionGraph::edges

All topology edges (routes + resolves).


The documentation for this struct was generated from the following file: