Skip to content

Subpackets#2474

Merged
ryanmelt merged 16 commits intomainfrom
subpackets
Nov 15, 2025
Merged

Subpackets#2474
ryanmelt merged 16 commits intomainfrom
subpackets

Conversation

@ryanmelt
Copy link
Copy Markdown
Member

@ryanmelt ryanmelt commented Oct 23, 2025

Subpackets provides a process for breaking up packets during decom into subpackets.
Can be used for channelized telemetry and for packets that are a bunch of samples for the same inherent item.

I'm going to build a plugin for FPrime to further test this before merging.

closes #1168

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 65.03759% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.37%. Comparing base (a33514e) to head (ecf501c).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
...nc3/lib/openc3/microservices/decom_microservice.rb 27.27% 32 Missing ⚠️
openc3/lib/openc3/models/target_model.rb 41.86% 25 Missing ⚠️
openc3/lib/openc3/topics/decom_interface_topic.rb 10.00% 18 Missing ⚠️
...lib/openc3/microservices/interface_decom_common.rb 10.00% 9 Missing ⚠️
openc3/lib/openc3/api/tlm_api.rb 83.33% 2 Missing ⚠️
openc3/lib/openc3/packets/packet.rb 86.66% 2 Missing ⚠️
openc3/lib/openc3/packets/packet_config.rb 96.00% 2 Missing ⚠️
...lib/openc3/microservices/interface_microservice.rb 66.66% 1 Missing ⚠️
openc3/lib/openc3/packets/commands.rb 95.45% 1 Missing ⚠️
openc3/lib/openc3/packets/telemetry.rb 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2474      +/-   ##
==========================================
- Coverage   79.60%   79.37%   -0.24%     
==========================================
  Files         658      660       +2     
  Lines       50463    50691     +228     
  Branches      736      736              
==========================================
+ Hits        40171    40235      +64     
- Misses      10212    10376     +164     
  Partials       80       80              
Flag Coverage Δ
python 81.25% <ø> (-0.33%) ⬇️
ruby-api 84.50% <100.00%> (-0.04%) ⬇️
ruby-backend 82.66% <64.50%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is huge and I love the new auto-detect for unique ID mode. I think we need more docs on this feature and some tie into your FPrime example.

this.api.get_tlm_values(this.screenItems).then((data) => {
if (this.availableItems.length !== 0) {
this.api.get_tlm_values(this.availableItems).then((data) => {
this.updateValues(data)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the calculation of available just to optimize this update() method so it doesn't call updateValues() if there are no available items?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

available is required once we implement the time series database. Just getting ahead on that.

subpackets = packet.subpacketize

subpackets.each do |subpacket|
if subpacket.subpacket
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels weird to me ... subpacket.subpacket? Is there ever a time this is nil? Who sets the subpacket of the subpacket? Maybe it's just the variable names ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to packet_and_subpackets, and packet_or_subpacket to clarify.

packet.ignore_overlap = hash['ignore_overlap']

packet
end
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used anywhere, a bit defective, and hard to maintain.

parser.verify_num_parameters(0, 0, usage)
@tlm_unique_id_mode = true
when 'CMD_UNIQUE_ID_MODE', 'TLM_UNIQUE_ID_MODE'
# Deprecated - Now autodetected
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay! closes #1168

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were going to warn the user if they end up in a UNIQUE_ID_MODE that this is not an optimized telemetry format and they would suffer performance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with no warning. Sometimes its unavoidable.

SUBPACKET:
summary: Marks this packet as as a subpacket which will exclude it from Interface level identification
description: Used with a SUBPACKETIZER to breakup up packets into subpackets at decom time
since: 6.10.0 No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some more docs in the telemetry page to talk about VIRTUAL vs SUBPACKET and when you would use one vs the other. I'm not sure I'm entirely clear on it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add a new guide page

@ryanmelt
Copy link
Copy Markdown
Member Author

Going to go ahead and merge this. Will do doc updates in a smaller PR.

@ryanmelt ryanmelt merged commit 504c410 into main Nov 15, 2025
49 of 50 checks passed
@ryanmelt ryanmelt deleted the subpackets branch November 15, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-detect CMD/TLM_UNIQUE_ID_MODE

2 participants