Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New cmd keywords for related telemetry and remove legacy snmp #1005

Merged
merged 4 commits into from
Jan 7, 2024

Conversation

ryanmelt
Copy link
Member

closes #403

@ryanmelt ryanmelt requested a review from jmthomas December 26, 2023 05:08
Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 62 lines in your changes are missing coverage. Please review.

Comparison is base (50de766) 75.37% compared to head (86d6a5c) 75.29%.

Files Patch % Lines
openc3/python/openc3/packets/packet.py 43.75% 18 Missing ⚠️
openc3/python/openc3/packets/packet_config.py 0.00% 18 Missing ⚠️
openc3/lib/openc3/packets/packet.rb 55.17% 13 Missing ⚠️
openc3/lib/openc3/packets/packet_config.rb 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1005      +/-   ##
==========================================
- Coverage   75.37%   75.29%   -0.09%     
==========================================
  Files         588      588              
  Lines       42879    42968      +89     
  Branches      747      747              
==========================================
+ Hits        32320    32351      +31     
- Misses      10481    10539      +58     
  Partials       78       78              
Flag Coverage Δ
python 83.64% <28.00%> (-0.20%) ⬇️
ruby-api 48.69% <ø> (ø)
ruby-backend 80.43% <38.09%> (-0.09%) ⬇️

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.


COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
<%= render "_ccsds_cmd.txt", locals: {id: 4} %>
# ERB syntax:
<% (1..5).each do |i| %>
APPEND_PARAMETER VALUE<%= i %> 16 UINT 0 5 1 "Value <%= i %> setting"
RELATED_ITEM <%= target_name %> PARAMS VALUE<%= i %>
<% end %>
Copy link
Member

Choose a reason for hiding this comment

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

Remove RELATED_ITEM and add SCREEN INST PARAMS just to show how that works

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add both. SCREEN wins if present.

@@ -214,7 +214,8 @@ def process_file(filename, process_target_name)
'PARAMETER', 'ID_ITEM', 'ID_PARAMETER', 'ARRAY_ITEM', 'ARRAY_PARAMETER', 'APPEND_ITEM',\
'APPEND_PARAMETER', 'APPEND_ID_ITEM', 'APPEND_ID_PARAMETER', 'APPEND_ARRAY_ITEM',\
'APPEND_ARRAY_PARAMETER', 'ALLOW_SHORT', 'HAZARDOUS', 'PROCESSOR', 'META',\
'DISABLE_MESSAGES', 'HIDDEN', 'DISABLED', 'ACCESSOR', 'TEMPLATE', 'TEMPLATE_FILE'
'DISABLE_MESSAGES', 'HIDDEN', 'DISABLED', 'ACCESSOR', 'TEMPLATE', 'TEMPLATE_FILE',\
'RESPONSE', 'ERROR_RESPONSE', 'SCREEN', 'RELATED_ITEM'
Copy link
Member

Choose a reason for hiding this comment

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

You need to document all these keywords!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep.

when 'ERROR_RESPONSE'
usage = "#{keyword} <Target Name> <Packet Name>"
parser.verify_num_parameters(2, 2, usage)
@current_packet.error_response = [params[0].upcase, params[1].upcase]
Copy link
Member

Choose a reason for hiding this comment

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

How will RESPONSE and ERROR_RESPONSE be used?

Copy link
Member Author

Choose a reason for hiding this comment

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

This will be the standard way to build command/response patterns. I'm using it with SNMP

Copy link

sonarqubecloud bot commented Jan 7, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ryanmelt ryanmelt merged commit b67066d into main Jan 7, 2024
23 of 24 checks passed
@ryanmelt ryanmelt deleted the new_cmd_keywords_remove_snmp branch January 7, 2024 20:03
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.

Associated Telemetry Points with Commands
2 participants