fprime-topology-development
できること
F Primeのシステムでどのコンポーネントが動き、どう接続されるかを定義するトポロジーのファイルを編集する手順を、AIに案内します。F Primeのデプロイを組み立てるエンジニア向けです。
使う場面
- ✓既存のF Primeのデプロイに新しいコンポーネントを追加するとき。
- ✓トポロジーのインスタンス、接続、レートグループを変更するとき。
- ✓デプロイ内にサブトポロジーを作成または変更する必要があるとき。
スキルのリンク
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-topology-development/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“新しいセンサーのコンポーネントをF Primeのトポロジーに追加して、レートグループに接続してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIはインスタンスの定義とトポロジーの接続を編集し、定義と所属を一致させたうえで、トポロジーがビルドできることを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Skill: F Prime Topology Development
Covers everything between "a component exists" and "a deployment runs".
Most work here extends an existing topology rather than creating one
from scratch. Component-level work belongs to
fprime-component-development; CMake and build-cache mechanics belong
to fprime-cmake-build-system.
Canonical references:
building the topology,
port/component/topology overview,
autocoded functions.
Working exemplar: TestDeploymentsProject/Ref/Top/.
1 — Anatomy of a Top/ directory
| File | Holds |
|---|---|
instances.fpp |
Instance definitions: type, base id, queue/stack/priority/cpu |
topology.fpp |
Topology membership, pattern graphs, connection graphs, packet include |
system.fpp |
system <Name>: <Topology> — the deployment entry point |
<Dep>Packets.fppi |
telemetry packets + omit { ... } list |
<Dep>TopologyDefs.hpp |
TopologyState struct, PingEntries constants |
<Dep>Topology.cpp |
setupTopology / teardownTopology, project-specific configureTopology |
Definition and membership are separate: an instance defined in
instances.fpp only joins the topology when named by instance <name>
inside deployment topology <Name> { ... }. Defined-but-unused
instances are legal and are neither constructed nor started.
2 — Instance definitions
- Passive:
instance posixTime: Svc.PosixTime base id 0x10020000 - Queued: add
queue size ... - Active: add
queue size ...,stack size ...,priority ..., andcpu ...where affinity matters.
Base IDs must be unique and non-overlapping across the whole
deployment, including subtopologies. Ref uses 0xDSSCCxxx
(deployment / subtopology / component / reserved low 12 bits for the
instance's own events, commands, channels) — see the header comment in
instances.fpp.
Subtopologies offset from a configurable BASE_ID constant.
Thread priorities, stack sizes and affinities are project- and platform-specific; take them from the project's own conventions rather than from a generic default.
3 — Connections
Pattern graphs — one specifier per service wires the whole
deployment's command, event, telemetry, text-event, parameter, time,
and health ports, each naming the serving instance, e.g.
telemetry connections instance CdhCore.tlmSend. Prefer these over
hand-wiring service ports.
Direct graphs — named blocks connections <Name> { a.out -> b.in }.
Group by subsystem or by instance pair; port arrays are indexed, and
indices should come from an FPP enum (e.g. Ports_RateGroups) rather
than bare integers.
Matched ports — match <a> with <b> in the component model forces
parallel arrays to be connected at identical indices; FPP errors when
they are not. See
common port patterns.
Rate group scheduling — a timer drives
rateGroupDriverComp.CycleIn; each CycleOut[<group>] drives one
ActiveRateGroup.CycleIn, whose RateGroupMemberOut[<slot>] ports call
each member's schedIn-style port synchronously, in slot order. Rates
come from the DividerSet passed to RateGroupDriver::configure in the
topology .cpp. See
rate groups.
Unconnected output ports assert when invoked. A port that is
optional by design can be guarded with
isConnected_<port>_OutputPort(portNum) in the C++ implementation.
4 — Phased initialization
setupTopology calls autocoded functions in a fixed order:
initComponents → setBaseIds → connectComponents →
configComponents → project configureTopology → regCommands →
loadParameters → startTasks. Teardown reverses it:
stopTasks → freeThreads → tearDownComponents → deinitComponents.
Never start tasks or register commands before connections exist.
Per-instance C++ can be attached in FPP instead of the .cpp, via init
specifiers on an instance body:
instance $health: Svc.Health base id CdhCoreConfig.BASE_ID + 0x002000 \
queue size CdhCoreConfig.QueueSizes.$health \
{
phase Fpp.ToCpp.Phases.configComponents """
CdhCore::health.setPingEntries(...);
"""
}
Phases are mandatory inside subtopologies; d
よくある質問
インスタンスはどこで定義しますか?
instances.fppで定義し、topology.fppがそのうちどれをデプロイに含めるかを決めます。
コンポーネント自体のビルドにも対応していますか?
いいえ。コンポーネントの設計とコードは、コンポーネントの開発スキルが担当します。
従うべき例はありますか?
はい。動作する参考例として、TestDeploymentsProjectの参照トポロジーを挙げています。
詳細
作者による元の説明
Develop and evolve an F Prime deployment topology: FPP instance definitions, base IDs, queue/stack/priority, connection graphs, rate group scheduling, phased initialization, subtopologies, and wiring a new or changed component into an existing deployment. Use whenever a task touches a `Top/` directory, `instances.fpp`, `topology.fpp`, a `*TopologyDefs.hpp`, or a subtopology. Keywords: F Prime, topology, deployment, instance, base id, connections, rate group, subtopology, phases, ping entries.
repo: nasa/fprime
人気
- GitHubのスター
- 12k
- ランキング
- #11503
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
fprime-cmake-build-system
12kエージェントが、CMakeの層を通じて、F Primeの飛行ソフトウェアのプロジェクトにモジュール、ビルドのターゲット、プラットフォームの設定を追加できるよう支援します。
fprime-component-design-fpp
12kエージェントが、承認されたF Primeのコンポーネント要件を、ポート、コマンド、イベント、テレメトリのFPPモデルに変換できるよう支援します。
fprime-component-development
12kエージェントが、要件からインテグレーションテストまで、F Primeのコンポーネントを各開発フェーズで進められるよう支援します。
fprime-component-implementation
12kエージェントが、プロジェクトのルールに従って、F Primeのコンポーネントの自動生成されたハンドラー関数の裏にあるC++のコードを書けるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。