Skip to content
Skillpedia
APIs & servers (backend)12k Β· #11503

fprime-topology-development

What it does

It guides the AI through editing the topology files that define which components run and how they connect in an F Prime system. It is for engineers assembling F Prime deployments.

When to use it

  • βœ“When you add a new component to an existing F Prime deployment.
  • βœ“When you change the instances, connections or rate groups in a topology.
  • βœ“When you need to create or change a subtopology in a deployment.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-topology-development/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œPlease add my new sensor component to the F Prime topology and connect it to the rate group.”

5 new skills a week. 1 minute to read.

How it works

The AI edits the instance definitions and topology connections, keeps definitions and membership in step, and then checks that the topology builds.

Technical content (original SKILL.md)

Original text by the author, straight from 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 ..., 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

FAQ

Where are instances defined?

They are defined in instances.fpp, and topology.fpp decides which of them join the deployment.

Does it cover building components themselves?

No. Component design and code belong to the component development skills.

Is there an example to follow?

Yes, the skill points to the TestDeploymentsProject reference topology as a working example.

Details

Original description by the author

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

Popularity

GitHub stars
12k
Ranking position
#11503
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills