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

Fix packet deployment #3035

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Autocoders/Python/bin/tlm_packet_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def generate_channel_size_dict(self, the_parsed_topology_xml, xml_filename):
# uses the topology model to process the items
# create list of used parsed component xmls
parsed_xml_dict = {}
# deployment = the_parsed_topology_xml.get_deployment()
for comp in the_parsed_topology_xml.get_instances():
if comp.get_type() in topology_model.get_base_id_dict():
parsed_xml_dict[comp.get_type()] = comp.get_comp_xml()
Expand Down Expand Up @@ -335,6 +336,18 @@ def gen_packet_file(self, xml_filename):
channel_list = []
for channel in entry:
channel_name = channel.attrib["name"]
# TKC 11/20/2024 - In order to work with the ground system,
# we have to strip off the leading module. This is a
# band-aid until FPP packets are done
name_parts = channel_name.split(".")
if len(name_parts) != 3:
raise TlmPacketParseValueError(
'Channel %s must be of the format "module.component.channel_name"'
% channel_name
)

(module, component, channel) = name_parts
channel_name = "%s.%s" % (component, channel)
if not channel_name in channel_size_dict:
raise TlmPacketParseValueError(
"Channel %s does not exist" % channel_name
Expand Down Expand Up @@ -381,6 +394,19 @@ def gen_packet_file(self, xml_filename):
)
for channel in entry:
channel_name = channel.attrib["name"]
# TKC 11/20/2024 - In order to work with the ground system,
# we have to strip off the leading module. This is a
# band-aid until FPP packets are done
name_parts = channel_name.split(".")
if len(name_parts) != 3:
raise TlmPacketParseValueError(
'Channel %s must be of the format "module.component.channel_name"'
% channel_name
)

(module, component, channel) = name_parts
channel_name = "%s.%s" % (component, channel)

if not channel_name in channel_size_dict:
raise TlmPacketParseValueError(
"Channel %s does not exist" % channel_name
Expand Down
Loading
Loading