Skillpedia
واجهات API والخوادم (backend)12k · #11494

fprime-component-design-fpp

ما الذي تفعله

يرشد وكيل الذكاء الاصطناعي إلى كتابة نموذج الواجهة بـ FPP الذي يولّد الشيفرة الأساسية بلغة C++ لمكوّن F Prime. وهي مناسبة لمهندسي تصميم مكونات برمجيات الطيران.

متى تستخدمها

  • ✓عندما تكون متطلبات مكوّن F Prime معتمدة ويجب كتابة واجهته.
  • ✓عندما تحتاج إلى اختيار المنافذ أو الأوامر أو الأحداث أو القياسات عن بُعد للمكوّن.
  • ✓عندما تريد إعادة استخدام نمط تصميم معياري من F Prime في مكوّن.

رابط المهارة

https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-design-fpp/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-design-fpp/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“متطلباتنا معتمدة. هل تستطيع كتابة نموذج FPP لمكوّن F Prime هذا؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يحوّل الوكيل المتطلبات المعتمدة إلى ملف FPP، ويسأل عن أي اختيارات غامضة للمنافذ أو الأوامر، ثم يولّد المترجم الشيفرة الأساسية.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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
الأسئلة الشائعة

هل سيصمم دون طرح أسئلة؟

لا. تقول المهارة إنه يجب السؤال عن أنواع المنافذ وتفاصيل الواجهة غير الواضحة قبل التصميم.

ماذا يولّد ملف FPP؟

يولّد مترجم FPP فئات C++ الأساسية وأدوات الاختبار والقواميس منه.

أي أنماط تصميم يذكرها؟

يذكر أنماطا مثل مجموعات المعدل، والفحص الصحي، ونمط المدير والعامل، ونمط المحور.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
12k
الترتيب
#11494
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة