How curiosity-workshop/cockpitlink works
CockpitLink is an experimental hardware-to-simulator behavior layer: firmware requests named behaviors, a host resolves them into typed handles, and simulator adapters bind those behaviors to simulator-specific controls. The graph covers the documented serial-first vertical slice, Arduino bindings, catalog and profile concepts, host protocol and logging, and both simulator adapters. Some source was sampled only in excerpts; edges are limited to visible calls or README-described behavior, so unsampled subsystem connections are omitted.
Main entry points: CockpitLinkProbe.cpp Host probe · TransportSession.cpp Transport session · CockpitLinkMSFS.cpp MSFS adapter · BehaviorCatalog.cpp Catalog loader
Components 20
Device firmware
- Arduino device API
firmware/arduino/libraries/CockpitLink/src/CockpitLink.cpp - Arduino API types
firmware/arduino/libraries/CockpitLink/src/CockpitLink.h - Firmware protocol
firmware/arduino/libraries/CockpitLink/src/CockpitLinkProtocol.h
Host foundation
- Host probe
host/apps/CockpitLinkProbe.cpp - Transport session
host/src/transport/TransportSession.cpp - Windows serial transport
host/src/serial/WindowsSerialTransport.cpp - Serial discovery
host/src/serial/WindowsSerialEnumerator.cpp - Frame parser
host/src/protocol/FrameParser.cpp - Protocol payloads
host/src/protocol/Payloads.cpp - Decoded serial logging
host/src/logging/SerialTraceLogger.cpp - Device runtime
host/src/runtime/DeviceRuntime.cpp
Simulator adapters
- X-Plane adapter
xplane/CockpitLinkXPlanePlugin.cpp - MSFS adapter
msfs/CockpitLinkMSFS.cpp - MSFS connection probe
msfs/CockpitLinkMSFSProbe.cpp
Behavior definitions
- Catalog loader
host/src/catalog/BehaviorCatalog.cpp - Base behavior catalog
catalog/base-behaviors.json - Aircraft profiles
profiles/aircraft/msfs-king-air-350i.json
Other components
- Device builder
- Cockpit hardware
- Flight simulator
Connections 22
- Device builder → Arduino device API: builds bindings
README.md - Arduino device API → Arduino API types: uses API types
firmware/arduino/libraries/CockpitLink/src/CockpitLink.cpp - Arduino API types → Firmware protocol: includes protocol
firmware/arduino/libraries/CockpitLink/src/CockpitLink.h - Arduino device API → Cockpit hardware: sends requests
- Cockpit hardware → Host probe: exchanges frames
README.md - Host probe → Catalog loader: loads and resolves
host/apps/CockpitLinkProbe.cpp - Catalog loader → Base behavior catalog: reads catalog
- Aircraft profiles → MSFS adapter: overrides bindings
- Host probe → Serial discovery: lists serial ports
README.md - Host probe → Windows serial transport: opens device link
README.md - Host probe → Transport session: exchanges frames
- Transport session → Windows serial transport: reads and writes
host/src/transport/TransportSession.cpp - Transport session → Frame parser: parses incoming bytes
- Host probe → Protocol payloads: encodes handshake
host/apps/CockpitLinkProbe.cpp - Host probe → Decoded serial logging: logs serial trace
README.md - Flight simulator → X-Plane adapter: runs adapter
- X-Plane adapter → Catalog loader: loads bindings
xplane/CockpitLinkXPlanePlugin.cpp - X-Plane adapter → Transport session: uses device session
- Flight simulator → MSFS adapter: runs adapter
- MSFS adapter → Catalog loader: loads catalog
msfs/CockpitLinkMSFS.cpp - MSFS adapter → Device runtime: implements adapter
msfs/CockpitLinkMSFS.cpp - MSFS connection probe → Flight simulator: connects through SimConnect