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

Tlm Packetizer build error #3032

Open
garthwatney opened this issue Nov 18, 2024 · 6 comments
Open

Tlm Packetizer build error #3032

garthwatney opened this issue Nov 18, 2024 · 6 comments
Assignees
Labels

Comments

@garthwatney
Copy link
Contributor

F´ Version
v3.5.0
Affected Component

Problem Description

When using the TlmPacketizer, the fprime-gds requires that all telemetry channels be fully qualified.
However the build gives an error when using fully qualified names in the telemetry packetizer xml.

Packet XML parsing error: Channel Ref.cmdDisp.CommandsDispatched does not exist

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29
Python version: 3.8.10
CMake version: 3.23.1
Pip version: 20.0.2
Pip packages:
    fprime-tools==3.5.0
    fprime-gds==3.5.0
    fprime-fpp-*==2.2.0
--INSERT HERE--

How to Reproduce

  1. In fprime Ref, swap out the TlmChan with TlmPacketizer component
  2. Add the fully qualified name 'Ref' to the first telemetry channel in RefPackets.xml
  3. In Ref: fprime-util build

Expected Behavior

A description of the expected behavior.

@bocchino
Copy link
Collaborator

However the build gives an error when using fully qualified names in the telemetry packetizer xml.

This behavior is what I would expect, given the design of the XML packetizer. The XML packetizer is based on the XML topology, which does not support the concept of qualified instance names. I think the fix for this issue is to replace the packetizer, as described here:

nasa/fpp#307

In the mean time, to use the XML packetizer, one can avoid defining instances with qualified names.

@timcanham timcanham self-assigned this Nov 19, 2024
@timcanham
Copy link
Collaborator

Looks pretty straightforward... I'll take a look.

@bocchino
Copy link
Collaborator

I'm not sure it's straightforward. The packetizer uses the topology XML, which doesn't have any notion of qualified instance names. For example, given this model

module M {
  instance i: C
}

topology T {
  instance M.i
  ...
}

the topology XML uses the simple name i to represent the instance whose qualified name in the FPP model isM.i.

Perhaps one could write a channel name as M.i.c in the packetizer XML, and connect that name back to channel c of instance i in the topology XML. But this approach will run into problems if the qualification is needed to disambiguate the names. For example, instances M.i and N.i would both be represented as i in the topology XML.

@bocchino
Copy link
Collaborator

Another option might be to make the packetizer depend on the JSON dictionary, which does have the info about qualified instance names.

@timcanham
Copy link
Collaborator

@bocchino I'm not sure the dictionary is available yet in the build when this autocoder runs. @LeStarch?

@timcanham
Copy link
Collaborator

I'm updating the autocoder to use the assembly attribute in the topology XML, and it seems to compile OK. I'll try running it against the ground system. At least for the Ref example, just adding Ref. to the beginning seems to work for compiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants