cFS-GroundSystem icon indicating copy to clipboard operation
cFS-GroundSystem copied to clipboard

Telemetry, GenericTelemetry, EventMessage UI bugs supporting multiple spacecraft

Open mafoste3 opened this issue 10 months ago • 0 comments

Describe the bug The Telemetry, GenericTelemetry, and EventMessage UIs will not show message data from the 'Selected IP Address' spacecraft telemetry when multiple spacecraft are detected.

To Reproduce Steps to reproduce the behavior:

  1. Start two or more unique instances of cFS connected to the CFS Ground System network
  2. Start the CFS Ground System
  3. Start the Command System
  4. Enable Telemetry Output for cFS instances
  5. Wait for the CFS Ground System to detect spacecraft telemetry from all running cFS instances
  6. In the Main Window UI click the Selected IP Address dropdown and select the last spacecraft IP address
  7. In the Main Window UI click the Start Telemetry System (no data will appear)
  8. In the Telemetry System Page UI click Event Messages (no data will appear)
  9. In the Telemetry System Page UI click Display Page any Generic Telemetry Subsystem/Page (no data will appear)

Expected behavior The selected spacecraft data is expected to be correctly displayed in the respective Telemetry, GenericTelemetry, and EventMessage UI - as indicated by the '*No packets? Remember to select the IP address of your spacecraft in the Main Window.' message at the bottom of each GenericTelemetry UI.

Code snips https://github.com/nasa/cFS-GroundSystem/blob/821a163729ebd5bb77ce89711929d55ee837204d/GroundSystem.py#L90-L93

https://github.com/nasa/cFS-GroundSystem/blob/821a163729ebd5bb77ce89711929d55ee837204d/Subsystems/tlmGUI/EventMessage.py#L141-L146

https://github.com/nasa/cFS-GroundSystem/blob/821a163729ebd5bb77ce89711929d55ee837204d/Subsystems/tlmGUI/GenericTelemetry.py#L131-L137

System observed on: -Hardware: VirtualBox -OS: Ubuntu 20.04 -Versions [e.g. cFE v7.0.0, OSAL v6.0.0, PSP v1.5.0, cFS-GroundSystem 3.0]

Additional context Two sets of fixes are required for proper behavior:

  1. The spacecraft names are stored as bytes, but the list is initialized with the string 'All' for all telemetry. Therefore always return a string in get_selected_spacecraft_name in GroundSystem.py for either case to build the correct subscription sting:
    # Returns the name of the selected spacecraft
    def get_selected_spacecraft_name(self):
        if isinstance(self.spacecraft_names[self.ip_addresses_list.index(self.get_selected_spacecraft_address())], str):
            return self.spacecraft_names[self.ip_addresses_list.index(self.get_selected_spacecraft_address())].strip()
        else:
            return self.spacecraft_names[self.ip_addresses_list.index(self.get_selected_spacecraft_address())].decode("UTF-8")
  1. The subscription is defaulted to always use Spacecraft1, therefore use the subscription string sting passed directly to the EMTlmReceiver class in both GenericTelemetry and EventMessage UIs:
        # Init zeroMQ
        self.context = zmq.Context()
        self.subscriber = self.context.socket(zmq.SUB)
        self.subscriber.connect("ipc:///tmp/GroundSystem")
        self.subscriber.setsockopt_string(zmq.SUBSCRIBE, subscr)

Reporter Info Mark Foster NASA / Johnson Space Center / ER6

mafoste3 avatar Mar 29 '24 15:03 mafoste3