Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)12k · #11503

fprime-topology-development

Skill này làm gì

Skill hướng dẫn AI chỉnh sửa các file topology, nơi định nghĩa thành phần nào chạy và chúng kết nối với nhau ra sao trong một hệ thống F Prime. Dành cho kỹ sư lắp ráp các triển khai F Prime.

Khi nào nên dùng

  • ✓Khi bạn thêm một thành phần mới vào triển khai F Prime đã có.
  • ✓Khi bạn thay đổi các thực thể, kết nối hoặc rate group trong topology.
  • ✓Khi bạn cần tạo hoặc thay đổi một subtopology trong triển khai.

Liên kết skill

https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-topology-development/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-topology-development/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thêm thành phần cảm biến mới của tôi vào topology F Prime và kết nối nó với rate group.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI chỉnh sửa định nghĩa thực thể và các kết nối topology, giữ cho định nghĩa và thành viên luôn nhất quán, rồi kiểm tra topology có build được không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 ..., and cpu ... 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

Câu hỏi thường gặp

Các thực thể được định nghĩa ở đâu?

Chúng được định nghĩa trong instances.fpp, còn topology.fpp quyết định thực thể nào tham gia triển khai.

Skill có bao quát việc build chính các thành phần không?

Không. Thiết kế và mã thành phần thuộc về các skill phát triển thành phần.

Có ví dụ để làm theo không?

Có. Skill chỉ đến topology tham chiếu TestDeploymentsProject làm ví dụ hoạt động.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
12k
Vị trí xếp hạng
#11503
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự