Skip to content

Fix several python packet config options #1201

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

Merged
merged 4 commits into from
Apr 29, 2024
Merged

Fix several python packet config options #1201

merged 4 commits into from
Apr 29, 2024

Conversation

jmthomas
Copy link
Member

@jmthomas jmthomas commented Apr 14, 2024

Fixed Python GENERIC_READ_CONVERSION, GENERIC_WRITE_CONVERSION, HAZARDOUS without descriptions, SEG_POLY_READ_CONVERSION, SEG_POLY_WRITE_CONVERSION, MINIMUM_VALUE, MAXIMUM_VALUE, DEFAULT_VALUE.
Removed Python TEMPLATE, TEMPLATE_FILE (new Python code should use RESPONSE and ERROR_RESPONSE)

@jmthomas jmthomas requested a review from ryanmelt April 14, 2024 23:09
@ryanmelt
Copy link
Member

TEMPLATE, TEMPLATE_FILE are still needed. They provide the default buffer value, especially required for certain accessors.

@@ -438,37 +472,44 @@ def process_current_packet(self, parser, keyword, params):
klass = get_class_from_module(
f"openc3.accessors.{filename}", params[0]
)
if params.length > 1:
# TODO: Dead code because accessors do not take parameters
# Remove or support future accessors with params?
Copy link
Member

Choose a reason for hiding this comment

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

Accessors can take parameters.

usage = f"{keyword} <Template string>"
parser.verify_num_parameters(1, 1, usage)
self.current_packet.template = params[0]
# TODO: Not implemented
Copy link
Member

Choose a reason for hiding this comment

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

put back

case "TEMPLATE_FILE":
usage = f"{keyword} <Template file path>"
parser.verify_num_parameters(1, 1, usage)
# case "TEMPLATE_FILE":
Copy link
Member

Choose a reason for hiding this comment

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

put back.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
10.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@jmthomas jmthomas merged commit 090fdab into main Apr 29, 2024
16 of 17 checks passed
@jmthomas jmthomas deleted the python_pkt_config branch April 29, 2024 15:16
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.

2 participants