fprime-component-design-fpp
Fungsinya
Skill ini memandu AI untuk menulis model antarmuka FPP yang menghasilkan kode dasar C++ untuk komponen F Prime. Skill ini untuk insinyur yang merancang komponen perangkat lunak penerbangan.
Kapan dipakai
- βSaat persyaratan untuk komponen F Prime sudah disetujui dan antarmukanya perlu ditulis.
- βSaat Anda perlu memilih port, perintah, event, atau telemetri untuk sebuah komponen.
- βSaat Anda ingin memakai ulang pola desain standar F Prime dalam sebuah komponen.
Link skill
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-design-fpp/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPersyaratan kami sudah disetujui. Bisakah Anda menulis model FPP untuk komponen F Prime ini?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI mengubah persyaratan yang disetujui menjadi berkas FPP, menanyakan setiap pilihan port atau perintah yang belum jelas, lalu compiler menghasilkan kode dasarnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Skill: F Prime Component Design (FPP)
The design phase codifies requirements into an FPP model β the single source of truth for the component's interface. The FPP compiler generates C++ base classes, test harnesses, and dictionaries from this model.
For FPP syntax and modeling details, see the FPP User's Guide. For component/port/command kinds, see Selecting Component, Port, and Command Kinds.
Reference the F Prime design patterns where possible β standard solutions exist for common needs:
- Rate Group Pattern β
docs/user-manual/design-patterns/rate-group.md - Health Checking β
docs/user-manual/design-patterns/health-checking.md - Manager-Worker β
docs/user-manual/design-patterns/manager-worker.md - Application-Manager-Driver β
docs/user-manual/design-patterns/app-man-drv.md - Common Port Patterns β
docs/user-manual/design-patterns/common-port-patterns.md - Hub Pattern β
docs/user-manual/design-patterns/hub-pattern.md - Subtopologies β
docs/user-manual/design-patterns/subtopologies.md
STOP β Confirm Before Designing
Before writing any FPP:
- Requirements must be confirmed (see
fprime-component-requirements). - Ask the user about any ambiguity in:
- Port types (does a suitable port already exist, or do we need a new one?)
- Command argument types and names
- Telemetry channel update frequency semantics (on-change vs. periodic)
- Event severity levels (DIAGNOSTIC, ACTIVITY_LO, ACTIVITY_HI, WARNING_LO, WARNING_HI, FATAL)
- Parameter default values
- Whether to use existing F Prime standard ports (
Fw.Signal,Svc.Sched,Svc.Ping, etc.)
Step-by-Step Process
Step 0 β Scaffold with fprime-util
Start with fprime-util new --component for the base structure. This
generates the initial directory layout, CMakeLists.txt, and FPP stub.
Step 1 β Choose Component Kind
Based on requirements (see
docs/user-manual/framework/component-and-port-selection.md for the
full decision guide):
| Work Type | Component Kind | When to Use |
|---|---|---|
| Cyclic (hard deadline) | passive |
Rate-group driven, no own thread |
| Cyclic with internal queue | queued |
Deferred work within a cycle |
| Event-driven | active |
Owns a thread, processes async messages |
Ask the user if unsure. The component kind determines thread ownership and port synchronization semantics.
Step 2 β Define Ports
For each interface requirement, define input/output ports. Port kinds:
sync inputβ executes in caller's threadasync inputβ enqueued, executes in component's threadguarded inputβ sync with component-wide mutex
See the FPP User's Guide for port definition syntax.
Standard framework ports to consider including:
| Need | Port | Import |
|---|---|---|
| Rate-group scheduling | sync input port run: Svc.Sched |
import Svc.Sched |
| Health ping | async input port pingIn: Svc.Ping drop |
import Svc.Ping |
| Time access | time get port timeCaller |
(special port) |
| Command handling | command recv port cmdIn |
(special port) |
| Event logging | event port eventOut |
(special port) |
| Telemetry | telemetry port tlmOut |
(special port) |
If the component is
active, it probably needs health-ping support. Requirements should imply whether rate-group scheduling is needed. Ask the user only if unsure about which standard services to connect to.
Step 3 β Define Commands, Telemetry, Events, Parameters
Follow the FPP User's Guide for syntax. Follow F Prime Style Guidelines for naming conventions:
- Commands:
UPPER_SNAKE_CASE - Telemetry channels:
PascalCase - Events:
PascalCase - Parameters:
PascalCase
For each construct, derive names, types, and semantics from the confirmed requirements. Define an event for each command that describes what the command did, including the command arguments, so the implementation can emit it (CPP-37). Every event emission must be traceable to a single call site (CPP-36): give each site its own event, or an argument (typically an enum) whose value differs at every site. Ask the user if:
- The command kind (sync/async/guarded) is
Pertanyaan umum
Apakah skill ini akan merancang tanpa bertanya?
Tidak. Skill ini menyebutkan untuk menanyakan tipe port dan detail antarmuka yang belum jelas sebelum merancang.
Apa yang dihasilkan berkas FPP?
Compiler FPP menghasilkan kelas dasar C++, harness tes, dan dictionary darinya.
Pola desain apa yang disebutkan?
Skill ini menyebutkan pola seperti rate group, health checking, manager-worker, dan hub.
Detail
Deskripsi asli dari pembuat
FPP design phase of F Prime component development. Guides the agent through creating the FPP model that codifies the component's interface β ports, commands, events, telemetry, and parameters. Trigger when the requirements are confirmed and the next step is to write the .fpp file. Keywords: F Prime, FPP, design, model, ports, commands, telemetry, events, parameters, component definition.
repo: nasa/fprime
Popularitas
- Bintang GitHub
- 12k
- Peringkat
- #11494
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
fprime-cmake-build-system
12kMembantu agent Anda menambahkan modul, target build, dan pengaturan platform ke proyek perangkat lunak penerbangan F Prime melalui lapisan CMake-nya.
fprime-component-development
12kMembantu agent Anda memandu komponen F Prime melalui setiap fase pengembangan, dari persyaratan hingga tes integrasi.
fprime-component-implementation
12kMembantu agent Anda menulis kode C++ di balik fungsi handler yang dihasilkan untuk komponen F Prime, dengan mengikuti aturan proyek.
fprime-component-integration-test
12kMembantu agent Anda menulis tes integrasi pytest yang dapat dipakai ulang untuk komponen F Prime dan dijalankan terhadap deployment yang aktif.
Skill serupa
api-connector-builder
280kMembuat agent Anda membangun koneksi API baru mengikuti pola yang sudah ada. Gunakan saat ingin menambah integrasi lagi tanpa membuat cara baru.
api-design
280kMembantu agent Anda merancang REST API sesuai praktik terbaik. Berguna untuk mengatur cara API berkomunikasi, menampilkan error, dan mengorganisasi data.
backend-patterns
280kMembantu agent Anda dengan pola arsitektur sisi server dan optimasi database. Berguna untuk membangun atau meninjau kode yang berjalan di server.