How to Configure F Prime Telemetry: Channel-Based and Packetized Approaches
F Prime telemetry is configured through two interchangeable implementations—channel-based (Svc::TlmChan) for individual channel storage and packetized (Svc::TlmPacketizer) for grouped transmission—using sections, groups, and port mappings defined in Svc/TlmPacketizer/config/TlmPacketizerConfig/TlmPacketizerCfg.fpp.
The F Prime flight software framework (nasa/fprime) provides a modular telemetry infrastructure that adapts to different bandwidth and latency requirements. When you configure F Prime telemetry, you choose between storing individual channel values or bundling them into packets, then fine-tune behavior through compile-time constants and runtime parameters.
Telemetry Implementation Architectures
Channel-Based Storage with Svc::TlmChan
The channel-based implementation stores the most recent value of each telemetry channel in a double-buffered database. According to the F Prime source code in Svc/TlmChan/docs/sdd.md, Svc::TlmChan sends channels individually on every down-link cycle, making it suitable for applications requiring immediate access to individual data points.
Packetized Transmission with Svc::TlmPacketizer
The packetized approach groups multiple channels into predefined packets, reducing bandwidth by sending one packet header per group. As implemented in Svc/TlmPacketizer/docs/sdd.md, this method is ideal for bandwidth-constrained down-links where header overhead must be minimized.
Compile-Time Configuration in TlmPacketizerCfg.fpp
All telemetry configuration begins in Svc/TlmPacketizer/config/TlmPacketizerConfig/TlmPacketizerCfg.fpp. This file defines the three core configuration concepts that both implementations share.
Telemetry Sections
Telemetry sections are logical groups—such as REALTIME and RECORDED—that can be enabled or disabled independently. These sections are defined in the configurable enum TelemetrySection inside the configuration file. Each section typically contains four groups that define rate-logic behavior.
Telemetry Groups and Rate Logic
Each section contains one or more groups that define rate-logic (on-change or time-based), enable flags, and min/max thresholds. The default group configuration lives in constants such as DEFAULT_GROUP_CONFIG at lines 39-41 of the configuration file.
Port Mapping Constants
The 2-D constant TELEMETRY_SEND_PORT_MAPPING maps [section][group] pairs to concrete telemetry output port indices. Changing this mapping redirects specific section/group combinations to different down-link ports without modifying component logic.
Runtime Telemetry Configuration
Enabling and Disabling Sections
The section-enabled defaults are stored in TELEMETRY_SECTION_ENABLED_DEFAULTS. At runtime, toggle sections using the Svc::TlmPacketizer::setSectionEnabled method:
Svc::TlmPacketizer tlmPktizer;
tlmPktizer.setSectionEnabled(Svc::TelemetrySection::REALTIME, Fw::Enabled::ENABLED);
tlmPktizer.setSectionEnabled(Svc::TelemetrySection::RECORDED, Fw::Enabled::DISABLED);
Overriding Group Configuration
Override default group configurations via the SECTION_CONFIGS parameter table exposed through Svc::PrmDb. This allows changing telemetry rates without rebuilding the system:
Fw::ParamIdType id = /* parameter id for the group config */;
Fw::ParamBuffer buf;
buf.serialize(Fw::Enabled::ENABLED); // enabled
buf.serialize(Fw::Enabled::DISABLED); // forceEnabled
buf.serialize(Svc::RateLogic::ON_TIME); // rateLogic
buf.serialize(1000U); // min interval (ms)
buf.serialize(0U); // max (unused)
prmDb.setParameter(id, buf);
Defining Telemetry Channels in FPP
Components declare telemetry channels in their FPP model using the @ Telemetry channel annotation. The autocoder generates setter methods that write values into the telemetry database or mark channels for packet inclusion.
Update Policies
Define the telemetry update policy per channel to control bandwidth usage:
module MyComponent {
@ Telemetry channel temperature
@ Update on_change
telemetry Temperature : F32;
}
The on_change policy ensures the channel is sent only when its value changes, while omitting the policy sends data on every down-link cycle.
Scheduling Telemetry Transmission
Telemetry output is driven by rate group components (Svc::RateGroup). The rate group periodically invokes either Svc::TlmChan or Svc::TlmPacketizer to emit pending telemetry according to the configured intervals.
Summary
- F Prime offers two telemetry implementations: Choose
Svc::TlmChanfor individual channel access orSvc::TlmPacketizerfor bandwidth-efficient packetized transmission. - Configuration is section-based: Define logical groups in
Svc/TlmPacketizer/config/TlmPacketizerConfig/TlmPacketizerCfg.fppusing theTelemetrySectionenum andTELEMETRY_SEND_PORT_MAPPINGconstants. - Runtime flexibility: Toggle sections via
setSectionEnabled()and modify rates through theSECTION_CONFIGSparameter table without recompiling. - FPP model control: Declare channels with
@ Telemetryand use@ Update on_changeto minimize bandwidth consumption. - Rate group scheduling: Connect telemetry components to
Svc::RateGroupfor periodic emission.
Frequently Asked Questions
What is the difference between TlmChan and TlmPacketizer in F Prime?
Svc::TlmChan stores the most recent value of each channel in a double-buffered database and transmits channels individually, while Svc::TlmPacketizer groups multiple channels into predefined packets to reduce header overhead. Choose TlmChan for low-latency individual channel access and TlmPacketizer when bandwidth conservation is critical.
How do I change telemetry transmission rates at runtime?
Update the SECTION_CONFIGS parameter table through Svc::PrmDb using serialized parameter buffers that specify rate logic (such as Svc::RateLogic::ON_TIME) and timing intervals. This overrides the DEFAULT_GROUP_CONFIG constants without requiring a system rebuild.
Where are telemetry sections defined in F Prime?
Telemetry sections are defined in the TelemetrySection enum inside Svc/TlmPacketizer/config/TlmPacketizerConfig/TlmPacketizerCfg.fpp. This file also contains the TELEMETRY_SECTION_ENABLED_DEFAULTS and port mapping constants that control section behavior.
How does the on_change update policy affect telemetry bandwidth?
The on_change policy, declared in the FPP model with @ Update on_change, ensures telemetry values are only transmitted when the data changes rather than on every cycle. This significantly reduces bandwidth usage for slowly varying channels compared to the default cycle-based transmission.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →