Langsung ke konten
Skillpedia
API & server (backend)12k Β· #11494

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.md

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-design-fpp/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

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:

  1. Requirements must be confirmed (see fprime-component-requirements).
  2. 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 thread
  • async input β€” enqueued, executes in component's thread
  • guarded 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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa