Giter Club home page Giter Club logo

fprime-gds's Introduction

F´ GDS

Note: This README describes GDS internals. Refer to the user's guide for instructions on how to use the GDS.

Issues should be reported here: File an issue

Overview

The GDS consists of a collection of classes and tools that provide an interface for fprime deployments, allowing users to view telemetry and events and send commands.

The GDS HTML GUI is an almost completely rewritten version of the F´ GSE UI, our historical ground system that has been deprecated due to its Python 2 requirement.

The GDS was designed to be adaptable, easily understandable, and easily expandable. To this end, it is built using publisher/subscriber relationships.

The diagram below shows the basic layout of the GDS. Data from the F´ deployment first enters the GDS at the TCP client. Each packet is then passed directly to the distributor which is responsible for parsing the packets in to data messages and sending on each message type (currently only events, channels, and packetized telemetry are supported) to decoders registered for that type. The decoder is responsible for turning that data message into a data object which it passes along to all consumers registered to it. These consumers could be anything, but in the GDS they are GUI panels that display the data. For outgoing data, the structure is similar. Currently, commands are the only output data type included. Command data objects are created in the command panel and then sent to the command encoder registered to that panel. Encoders take a data object and turn it into binary data that can be sent to the F´ deployment. The binary data is then passed to the TCP client which is registered to the encoder. Finally, the TCP client send the data back to the TCP server and the F´ deployment. The layout of the GDS

All of these objects are created and registered to other objects when the GDS is initialized. Thus, all of the structure of the GDS is created in one place, and can be easily modified.

GDS Tools

The GDS was designed to have flexible configurations of consumers for its various data decoders. This has been used to support several additional tools.

GDS Standard Pipeline

The standard pipeline can be thought of as a Python helper-layer to instantiate the GDS and connect to an F´ deployment. The pipeline provides event, telemetry and command histories, sending commands and registering consumers to the GDS decoders. The Standard Pipeline can be found here.

GDS Integration Test API

The Integration Test API is a tool that provides the ability to write integration-level tests for an F´ deployment using the GDS. The tool provides history searches/asserts, command sending, a detailed test log, sub-histories and convenient access to GDS data objects. The test API comes with separate documentation and its own user guide and is built on top of the Standard Pipeline.

GDS GUI Usage

A guide for how to use the GDS is available in the fprime documentation

Classes

The GDS back end is composed of several different data processing units. For most of the units described below, a base class describes the interface and subclasses implement the interface for specific data types (such as events, channels, etc).

To expand the GDS to accept more data types or have additional features, new classes can be written and registered into the existing structure.

TCP Client

The TCP client is simply a passthrough for data coming from the TCP Server and the F´ Distribution. The client handles all the socket connection overhead and passes un-parsed data onto all objects registered with it.

Distributor

The distributer is responsible for taking in raw binary data, parsing off the length and descriptor, and then passing the data to all decoders registered to that descriptor. Descriptor types include events, channels, packets, etc (a full enumeration can be found in (src/utils/data_desc_type.py). The binary data that the descriptor receives should be of the form:

Length (4 bytes) Type Descriptor (4 bytes) Message Data

The distributor should then pass only the message data along to the decoders.

Templates

For each general data type (channel, event, etc) there is a template type. Instances of these classes hold information about specific channels or event types (ex. the NumPkts channel or the FirstPacketReceived event).

Template classes hold information such as the channel/event/packet's id, name, argument types, value type, format string, etc. This information is used by decoders when parsing data that they receive.

Data Types

For each general data type (channel, event, etc) there is a type class. Instances of these classes hold information about a specific channel reading or event. They contain the actual data parsed by the decoders. As such, they are the data type returned by encoders. All of these classes have a time field are derived from type SysData, which implements a compare function, allowing any list of SysData objects to be sorted by time. Each inherited type should also implement the str method so the objects can be easily printed.

Each instance of a type class also has a reference to the corresponding template class for that channel or event type.

Loaders

Loaders are used to construct dictionaries of channel and events. These dictionaries have template classes as values and ids or names as keys.

Each dictionary type has their own loader, but subclassing is used to prevent code duplication. For example, there are loaders for channel and event python file dictionaries, but they both subclass the python loader class which provides helper functions for reading python file dictionaries.

Decoders

Decoders are responsible for parsing the message data for a specific descriptor type.

Each decoder uses dictionaries produced by loaders to help with its parsing. These are given to the decoder's constructor.

The knowledge for how to parse that descriptor type should stay within the decoder. Each decoder type takes in the binary message data, parses it, and sends the resulting data object to all consumers registered to it.

Encoders

Encoders are responsible for taking data objects from consumers (GUI panels), converting them to binary data, and passing them to the TCP client to send to the F´ deployment.

Like the decoders, encoders use dictionaries produced by loaders to help craft the binary output.

Consumers

Consumers do not have a specific base class, but instead simply implement a data callback method that is called by decoders with parsed data objects as the argument. In the case of the Gds, the consumers are the GUI panels that display data. Consumers can also produce data that is sent to encoders and eventually on to the F´ deployment.

Main Frame Factory

This class is responsible for setting up the pipeline of data between different components in the publisher/subscriber interface - that is, it is responsible for registering all of the various components that wish to share data. This class also supports the creation of multiple Gds GUI windows which all share the same subscriptions and therefore receive the same data.

ConfigManager

The ConfigManager class is responsible for storing configurations used by GDS classes. An instance of this class is passed to some GDS classes such as distributors and encoders (to indicate the types of some binary data fields) and to some consumers (to indicate colors). The ConfigManager class sets the defaults for each config, but a .ini file can also be passed into the constructor to set the configs to custom values.

Modify GDS Structure

To setup the structure of the GDS, instances of the above classes are first created. Then, they are registered to one another by calling the data producer's register function with the data consumer as the argument. The data consumer is expected to implement a callback function to receive the data (data_callback for most classes, but check the base class's documentation for details).

An example of how to instantiate and register classes into the correct structure can be found in the MainFrameFactory class.

Setup

The Gds requires the packages specified in setup.py.

These can be installed along the Gds package using the following commands:

pip install --upgrade fprime-gds

For full installation instructions, including virtual environment creation and installation verification, see INSTALL.md.

Generate Documentation

You can generate a doxygen documentation page for the GDS source. To do this, you will need to install doxygen, doxypypy and graphviz.

Linux/Windows WSL

apt-get install doxygen graphviz
pip install doxypypy

Mac

Install doxygen from the website (http://www.stack.nl/~dimitri/doxygen/download.html) or by using the following command if you have Homebrew

brew install doxygen
brew install graphviz
pip install doxypypy

Next, make docs/py_filter available in your system path however you see fit. Now you can run doxygen Doxyfile in the root directory to generate documentation in docs/doxy/index.html

Notes

  • Currently, the models/common directory has command.py, event.py, and channel.py. These files must be present in order for the python dictionaries to be properly imported. However, they are empty and not used in the GDS. When we switch fully to XML dictionaries, these can go away.

fprime-gds's People

Contributors

abdur-rahmaanj avatar acxz avatar aidan-wagner avatar bastianzim avatar billallen256 avatar bwignall avatar cmuck avatar codeflight1 avatar gjwatney avatar hunterpaulson avatar jacknwhite avatar jhdeerin avatar jonathanmichel avatar joshua-anderson avatar jsoref avatar jugmac00 avatar jwest115 avatar lestarch avatar linked-liszt avatar miladsade96 avatar notmatical avatar rmelick-muon avatar saba-ja avatar sauravmaheshkar avatar smorettini avatar thibfrgsgmz avatar thomas-bc avatar timcanham avatar v1k1nghawk avatar zkneupper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fprime-gds's Issues

Multi-field Command Validation

Version 3.3.2
Component GDS

Problem Description

When sending a command with the ground station, validation always returns the cursor to the first field, even if the error is in a subsequent field. For example, when first filling out the fields, after every number typed, you must click on the field again to type the next digit.

How to Reproduce

  1. Create a command with a structure containing at least 3 values.
  2. Click on the second field and type a number.
  3. Note that cursor is placed in the first field.
  4. Clear all fields
  5. Type a number in first field.
  6. Type a number in the second field.
  7. Note that cursor is placed in the first field again.
    image

Expected Behavior

The validation should not move the cursor from the field it is in. It should not matter which field you're typing in first, and it absolutely shouldn't require N clicks to type an N-digit number.

Change Sequence Upload and Download to Open and Save As

F´ Version
Affected Component

Feature Description

Change Upload to Open and Download to Save As on the sequence builder tab. Update icons too.

Rationale

This tab is essentially a text editor. Using Upload and Download terms are confusing to users.

large File Uplink fails due to PacketOutOfOrder

F´ Version v2.0.0 and later
Affected Component FileUplink

Problem Description

When uplinking a big file(>1MB), f' throws PacketOutOfOrder.

Example Events:
022-02-08T03:58:03.286Z | 0x7ff | fileUplink.PacketOutOfOrder | WARNING_HI | Received packet 49 after packet 34
2022-02-08T03:58:03.304Z | 0x7ff | fileUplink.PacketOutOfOrder | WARNING_HI | Received packet 54 after packet 49

How to Reproduce

  1. Changed Topology.cpp QUEUE_SIZE so that f` can receive large files.
enum
{
  UPLINK_BUFFER_STORE_SIZE = 3000,
  UPLINK_BUFFER_QUEUE_SIZE = 25000,
  UPLINK_BUFFER_MGR_ID = 200
};
  1. Try uplinking large files over the network.

Expected Behavior

FileUplink should be able to upload files without losing packets.
Maybe put a delay in GDS while sending files or make changes in fprime to request for missed packets or account for out of order packets.

TypeError: input_element.setCustomValidity is not a function

F´ Version F' GDS 2.0
Affected Component Commands page

Problem Description

Noticed the following error while setting command argument in the Command page

Screen Shot 2021-08-15 at 3 06 24 PM

How to Reproduce

  1. Open Chrome Dev tool
  2. Select a command with Enum argument and try to change the Enum arg.
  3. Observe the error in the Dev tool

Expected Behavior

There should not be a validation error

Layout of the GDS image link leads to 404

F´ Version
Affected Component fprime-community/fprime-gds/README.md

Problem Description

Image link "The layout of the GDS" leads to Page Not Found.

How to Reproduce

  1. Follow "The layout of the GDS" in fprime-gds/README.md

Expected Behavior

Shows an image of the layout of the GDS.

Make `openpyxl` a Required Package

F´ Version
Affected Component

Problem Description

Openpyxl is used to make the test reports from the integration and test setup. We should make this default as most users expect this functionality without additional trouble.

Local installation of `fprime-gds`

F´ Version
Affected Component fprime-gds

Problem Description

setup.py's instructions for installing locally are:

# Developer and Dynamic Installation:
# ```
# pip install -e ./Gds
# ```

When running this from the top-level directory in this repository I get:

# pip install -e ./Gds
Obtaining file:///home/ptl/lib/fprime-gds-dtn/Gds
ERROR: file:///home/ptl/lib/fprime-gds-dtn/Gds does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

I tried running a pip install -e . instead and got:


Obtaining file:///home/ptl/lib/fprime-gds-dtn
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /usr/local/lib/python3.9/dist-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/ptl/lib/fprime-gds-dtn/setup.py", line 39, in <module>
          setup(
        File "/usr/local/lib/python3.9/dist-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 488, in __init__
          _Distribution.__init__(
        File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 912, in finalize_options
          ep(self)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 932, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/usr/local/lib/python3.9/dist-packages/setuptools_scm/integration.py", line 91, in version_keyword
          _assign_version(dist, config)
        File "/usr/local/lib/python3.9/dist-packages/setuptools_scm/integration.py", line 63, in _assign_version
          _version_missing(config)
        File "/usr/local/lib/python3.9/dist-packages/setuptools_scm/__init__.py", line 108, in _version_missing
          raise LookupError(
      LookupError: setuptools-scm was unable to detect version for /home/ptl/lib/fprime-gds-dtn.

      Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

      For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

A python3 setup.py install --user --prefix=/some/install/path results in the same error message as above.

Am I missing some sort of venv Python step here?

Expected Behaviour

I'd like to basically run something like python3 setup.py install --user --prefix=/some/install/path.

GDS Fails To Launch With Unknown Types In Dictionary

F´ Version all

Problem Description

The GDS crashes on launch when provided with a dictionary containing references to a handcoded type. See: nasa/fprime#1643 (comment)

This may also apply to other complicated types like serlizables.

Expected Behavior

Instead of failing to launch, the GDS should launch but warn that it's unable to deserialize EVRs referencing the handcoded type.

I64 and U64

F´ Version all
Affected Component

Problem Description

The GDS is incapable of handling (precisely) U64 and I64 types. JavaScript numbers are floating point numbers of double precisions, meaning they are limited to 53bits of precise integer representation.

How to Reproduce

  1. Define telemetry, command, or event data of U64 or I64 type
  2. Attempt to input or output the data
  3. Observe loss in precsision

Expected Behavior

64 bit types should be handled exactly.

Add PIP Package Install CI

F´ Version
Affected Component

Feature Description

Install and run GDS with sample dictionary (no binary) and make sure it comes up after PIP installation process.

Make command history reversed

F´ Version 2.0
Affected Component None

Feature Description

When a command is sent, it is added to the end of the command history. Reverse this, and add commands to the beginning.

Rationale

If you frequently reuse commands, clicking on the one in the list can mean scrolling down through many commands. This was how the old GUI worked, and it was handy during testing.

Bonus: If the same command with the same arguments is already on the end of the list, don't add it.

Crash on Bad Values

F´ Version
Affected Component

Problem Description

GDS should not crash if it cannot determine or convert values. E.g. enum with an out-of-range value should not crash the system.

Could not use scroll bar to auto scroll down the event list

F´ Version F' GDS 2.0
Affected Component events.js

Problem Description

Could not use scroll bar to auto scroll down the event list.
This issue was observed only on Browsers running on Windows OS.

How to Reproduce

  1. Create more than 100 EVRs
  2. Without being connected to a mouse use touchpad to scroll to the bottom of the Event list.
  3. Observe the Event list does not get updated despite having more than 100 EVRs.

Expected Behavior

Event list should get updated when using scroll bar.

Python 3.10: import error

F´ Version
Affected Component

Problem Description

Running the existing package fprime-gds in python 3.10 causes an import error.

Uncaught (in promise) DOMException

F´ Version F' GDS 2.0
Affected Component loader.js

Problem Description

On initial load or refresh of the page Chrome complains about the following error:

Screen Shot 2021-08-15 at 12 06 26 AM

How to Reproduce

  1. From Chrome dev tool setting enable Preserve Log
  2. Hard Refresh GDS by pressing Shift and Refresh button
  3. Observe Chrome error log in the dev tool

Expected Behavior

There should be no error when refreshing page

Update GDS to support multiple telemetry channels in downlink packet

F´ Version v3.0
Affected Component GDS?

Feature Description

Update GDS telemetry decoder to accept multiple channels in a packet. It would have to use the dictionary to decode each channel entry based on the size of the type, and then advance to the next channel until reaching the end of the packet.

Paired with: nasa/fprime#1204
This issue must be done first.

Rationale

This will fill downlink packets more efficiently.

Renaming of install_dest in fprime-tools

F´ Version 3.1
Affected Component

Problem Description

When using fprime-tools v3.1.1, install_dest was renamed intentionally to install_destination. I believe that is causing the following error when I try to run the GDS.

Traceback (most recent call last):
  File "/Users/earunkumar/fprime-devel/mac-venv/bin/fprime-gds", line 8, in <module>
    sys.exit(main())
  File "/Users/earunkumar/fprime-devel/mac-venv/lib/python3.9/site-packages/fprime_gds/executables/run_deployment.py", line 278, in main
    settings = vars(get_settings())
  File "/Users/earunkumar/fprime-devel/mac-venv/lib/python3.9/site-packages/fprime_gds/executables/run_deployment.py", line 26, in get_settings
    root = fprime_gds.executables.utils.get_artifacts_root()
  File "/Users/earunkumar/fprime-devel/mac-venv/lib/python3.9/site-packages/fprime_gds/executables/utils.py", line 141, in get_artifacts_root
    assert "install_dest" in ini_settings, "install_dest not in settings.ini"
AssertionError: install_dest not in settings.ini

How to Reproduce

  1. Upgrade fprime-tools to v3.1.1
  2. Run fprime-gds on any deployment

Expected Behavior

Error should be install_dest not in settings.ini

Fprime-gds GUI not handling NaNs

F´ Version 3.1.4
Affected Component fprime-gds loader.js

Problem Description

When a telemetry channel sent to fprime-gds contains a value of NaN, it appears that the GUI does not know how to handle it, and so the telemetry stops updating in the Channels window. When looking at developer tools in chrome, I get the following error message:

VM251:1 Uncaught SyntaxError: Unexpected token 'N', ..."2, "val": NaN, "disp"... is not valid JSON
    at JSON.parse (<anonymous>)
    at xhttp.onreadystatechange (loader.js:198:40)
xhttp.onreadystatechange @ loader.js:198
XMLHttpRequest.send (async)
(anonymous) @ loader.js:216
load @ loader.js:191
poller @ loader.js:248

Inspecting the JSON that it complains about:

{
  "time": {
    "base": 2,
    "context": 0,
    "seconds": 1711929600,
    "microseconds": 197687
  },
  "id": 8972,
  "val": NaN,
  "display_text": "nanC"
},
{
  "time": {
    "base": 2,
    "context": 0,
    "seconds": 1711929600,
    "microseconds": 197694
  },
  "id": 8973,
  "val": NaN,
  "display_text": "nanC"
},

I verified that fprime-gds actually receives the value just fine, as you can see below if I use the CLI to view the data.

$ fprime-cli channels -d ~/dev-working-tlm-power/CadreFlightDeploymentTopologyAppDictionary.xml -p 50058 -s nan
2024-04-01 00:08:11: power.PWR_BattExtTemp1 (8972) (2(0)-1711930091:106129) nanC
2024-04-01 00:08:11: power.PWR_BattExtTemp2 (8973) (2(0)-1711930091:106134) nanC
2024-04-01 00:08:12: power.PWR_BattExtTemp1 (8972) (2(0)-1711930092:156472) nanC
2024-04-01 00:08:12: power.PWR_BattExtTemp2 (8973) (2(0)-1711930092:156491) nanC
2024-04-01 00:08:13: power.PWR_BattExtTemp1 (8972) (2(0)-1711930093:199988) nanC
2024-04-01 00:08:13: power.PWR_BattExtTemp2 (8973) (2(0)-1711930093:199993) nanC
2024-04-01 00:08:14: power.PWR_BattExtTemp1 (8972) (2(0)-1711930094:253030) nanC
2024-04-01 00:08:14: power.PWR_BattExtTemp2 (8973) (2(0)-1711930094:253048) nanC

How to Reproduce

  1. Create an fprime component that sends telemetry channel with a value of NaN
  2. Run fprime-gds with the GUI enabled
  3. Open the web browser fprime-gds GUI and go to the channels tab
  4. Run fprime deployment with above component
  5. Observe that the GUI channels tab stops updating.

Expected Behavior

It should gracefully handle a NaN and probably just display Nan in the browser.

Streamline GDS GUI test procedure

F´ Version
Affected Component

Feature Description

The CI can test the fprime-cli, but for the Flask GUI we need to manually test it before shipping a release. We need to create a test procedure with detailed steps to fully test the GDS GUI. This should make testing faster and more complete, easier to delegate, and is a better practice.
The test procedure can be a Markdown file, or any other appropriate format.

Uplink page "unpause/pause uplink queue" buttons do not work

F´ Version F' GDS 2.0
Affected Component Uplink

Problem Description

In uplink page the unpause button does not change to pause button when uplink starts.
I manually removed v-if from the JS to enable pause button in the GUI and observed that pressing pause button cancels all running uplinks.

How to Reproduce

  1. Uplink one or several large file
  2. Press the unpause button
  3. Observe the unpause button does not change to pause button automatically.

Expected Behavior

Unpause uplink queue button should change to Pause uplink queue when uplink is running.
The Pause uplink should pause the uplink instead of cancelling all the uplink queues.

VxWorks connection issues

F´ Version v2.0.0
Affected Component n/a

Problem Description

We frequently get these messages on VxWorks:

-> 0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
0x203cf2f8 (TV_ELOG): [ERROR] Failed to send framed data: 0
...
0x203f3320 (TV_ReceiveTask): Connected to �:0 as a tcp client

In some cases, the FSW doesn't initially connect, and it can take a minute or so to reconnect. I don't know if this unique to our case, but I wanted to capture it.

How to Reproduce

On an internal system, so we would have to show it.

Expected Behavior

Clean first-time and secondary connections.

Tables Don't Sort New Items

F´ Version
Affected Component

Problem Description

The table sorting doesn't work on new items: nasa/fprime#272

Note: when fixing this, be careful to not break the efficient handling of new items.

Fix UI responsive issues

F´ Version F' GDS 2.0
Affected Component JS

Problem Description

The current UI has many responsive issues that should be fixed.
1- Buttons do not change size and location on smaller screens
2- [DOM] Found 2 elements with non-unique id #command-text
3- DevTools failed to load source map: Could not load content for *.css.map or *.js.map
4- Navbar expands to a very long vertical list in md size
5- Unclosed HTML tags in different parts of the GDS

How to Reproduce

  1. Start GDS
  2. Resize window and observe HTML elements placement
  3. Open chrome dev tool and see Devtool warnings

Expected Behavior

Responsive HTML behavior on resize, and no JS or HTML warning or error.

Green "data present" icon does not return to red after FSW stops transmitting.

F´ Version 3.x
Affected Component n/a

Problem Description

When the FSW stops transmitting data, the green "data received" light does not transition to red again.

How to Reproduce

  1. Build Ref demo app
  2. Run GDS without starting binary: fprime-gds -n
  3. Run binary manually: ./build-fprime-automatic-native/bin/Linux/Ref -p 50000 -a 0.0.0.0
  4. Kill binary with Ctrl-C
  5. Green light stays lit

Expected Behavior

The green icon should transition to red after a timeout, and then become green again if the binary is restarted.

`fprime-cli` not working

F´ Version devel
Affected Component fprime-cli

Problem Description

fprime-cli events is not working properly in the current devel version. I haven't been able to investigate more.

How to Reproduce

  1. checkout fprime-gds:devel
  2. pip install . to install
  3. fprime-cli events
    errors out with:
$ fprime-cli events
Traceback (most recent call last):
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/bin/fprime-cli", line 33, in <module>
    sys.exit(load_entry_point('fprime-gds==3.1.5a2.dev5+g7382c8c.d20230125', 'console_scripts', 'fprime-cli')())
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/lib/python3.8/site-packages/fprime_gds/executables/fprime_cli.py", line 399, in main
    args = parse_args(parser, sys.argv[1:])
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/lib/python3.8/site-packages/fprime_gds/executables/fprime_cli.py", line 390, in parse_args
    args = args.validate(parser, args)
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/lib/python3.8/site-packages/fprime_gds/executables/fprime_cli.py", line 186, in validate_args
    args = add_valid_dictionary(args)
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/lib/python3.8/site-packages/fprime_gds/executables/fprime_cli.py", line 138, in add_valid_dictionary
    args.dictionary = get_dictionary_path(args)
  File "/Users/chammard/Work/fprime/fprime/Ref/old_env/lib/python3.8/site-packages/fprime_gds/executables/fprime_cli.py", line 128, in get_dictionary_path
    args = GdsParser.handle_arguments(args, kwargs={})
TypeError: handle_arguments() missing 1 required positional argument: 'args'

Expected Behavior

Waiting for an event, no error showing up.

Impossible to retrieve an event using fprime-cli in JSON

F´ Version 3.1.1
Affected Component fprime-cli

Problem Description

Requesting an event in JSON format with fprime-cli doesn't work.

How to Reproduce

  1. Ask for an event in json format using a command like fprime-cli events -i 4353 -d /path_to/build-artifacts/Linux/dict/TopologyAppDictionary.xml -j

Output:

2022-10-27 12:27:41: managerJoints.ERROR EventSeverity.WARNING_HI : ManagerJoint_Error ERROR_PORT_SETJOINTSACTUATIONTARGET_NO_SUCCESS
Traceback (most recent call last):
  File "/usr/local/bin/fprime-cli", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/executables/fprime_cli.py", line 412, in main
    function(**argument_dict)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/executables/fprime_cli.py", line 359, in command_func
    events.EventsCommand.handle_arguments(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/common/gds_cli/base_commands.py", line 235, in handle_arguments
    cls._execute_query(connection_info, search_info, kwargs["timeout"])
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/common/gds_cli/base_commands.py", line 195, in _execute_query
    cls._log(cls._get_item_string(item, json))
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/common/gds_cli/base_commands.py", line 111, in _get_item_string
    return misc_utils.get_item_string(item, json)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/common/gds_cli/misc_utils.py", line 90, in get_item_string
    return get_item_json_string(item) if as_json else item.get_str(verbose=True)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/common/gds_cli/misc_utils.py", line 72, in get_item_json_string
    return json.dumps(gds_item, indent=tab_spaces, cls=GDSJsonEncoder)
  File "/usr/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/usr/lib/python3.8/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/usr/lib/python3.8/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/flask/json.py", line 181, in default
    return self.JSON_ENCODERS[type(obj)](obj)
  File "/usr/local/lib/python3.8/dist-packages/fprime_gds/flask/json.py", line 94, in minimal_event
    return {"time": obj.time, "id": obj.id, "display_text": obj.display_text}
AttributeError: 'EventData' object has no attribute 'display_text'

Expected Behavior

The command should return the event in the format JSON as it happens for channels.

Command Drop Down Resumes

F´ Version
Affected Component

Feature Description

Can we make the command drop down resume where you last were when you click the drop down? I always hate that it goes back to the top so I have to scroll all the way back down to get back where I was.

image

Missing diagram link

F´ Version 3.x
Affected Component n/a

Problem Description

There is a broken link pointing to a diagram

How to Reproduce

See the README:

image

Expected Behavior

Link should have a image.

Incorrect variable reference causes exception when running "fprime-cli channels"

F´ Version 3.x
Affected Component

Problem Description

When running the channels sub-command of the fprime-cli tool, I run into the following exception:

$ fprime-cli channels -d <path/to/my/deployment/dictionary.xml>
2022-06-16 10:28:58: gncStub.NumImuRecordsReceived (33537) (2(0)-1655400538:842603) 42
Traceback (most recent call last):
  File "/home/jpldev/repos/alt/cadre-fsw/venv/bin/fprime-cli", line 33, in <module>
    sys.exit(load_entry_point('fprime-gds', 'console_scripts', 'fprime-cli')())
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/executables/fprime_cli.py", line 410, in main
    function(**argument_dict)
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/executables/fprime_cli.py", line 236, in command_func
    channels.ChannelsCommand.handle_arguments(*args, **kwargs)
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/common/gds_cli/base_commands.py", line 235, in handle_arguments
    cls._execute_query(connection_info, search_info, kwargs["timeout"])
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/common/gds_cli/base_commands.py", line 209, in _execute_query
    misc_utils.repeat_until_interrupt(print_upcoming_item, "NOW")
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/common/gds_cli/misc_utils.py", line 53, in repeat_until_interrupt
    new_args = func(*args)  # lgtm [py/call/wrong-arguments]
  File "/home/jpldev/repos/alt/cadre-fsw/fprime-gds/src/fprime_gds/common/gds_cli/base_commands.py", line 203, in print_upcoming_item
    min_start_time = predicates.greater_than(item.get_time())
NameError: free variable 'item' referenced before assignment in enclosing scope

The code snippet shown below is where the problem occurs. On line 203, the variable name item is used, but it looks like it should be referencing the variable item_ instead, which is defined on line 199.
https://github.com/fprime-community/fprime-gds/blob/9edae8d750935f7b7ff06fc587fdbb152c4807e8/src/fprime_gds/common/gds_cli/base_commands.py#L199-L207

Dictionary versions with just a Git Commit SHA produce a confusing error message

F´ Version 3.1.0
Affected Component Ref Application

Problem Description

GDS suggests upgrading when builds from a Git checkout - without tags - produce a dictionary with just a commit SHA as version, like this:

<dictionary topology="Ref" framework_version="7cb9feed0" project_version="7cb9feed0">
[ERROR] Dictionary version  is not in supported range: 0.0.0-9.9.9. Please upgrade fprime-gds.

How to Reproduce

  1. Build the Ref app from an F´ checkout that doesn't have Git Tags in the local history
  2. Run fprime-gds as documented in the Install guide

I have a longer-form description of the problem and how I encountered it in this blog post.

Expected Behaviour

Suggested solutions:

  • An error about version format instead of version range, possibly suggesting that release tags are missing
  • Run with a warning instead of an error when the version number can't be evaluated
  • Fix fprime-util so it doesn't produce invalid versions

Missing documentation link

F´ Version 3.x
Affected Component n/a

Problem Description

There are some broken links in the README documentation:

How to Reproduce

See the documentation and user's guide links.

image

Expected Behavior

A description of the expected behavior.

Cannot test fresh install of F prime due to NameError: name 'Path' is not defined

F´ Version fprime from master branch, fprime-gds==3.1.1
Affected Component fprime-gds

Problem Description

I was following the F' Installation Guide, and followed the steps successfully up until "Testing F´ GDS Installation Via Running HTML GUI".

That had me run the command

fprime-gds -g html -r ./build-artifacts

which failed with the following exception

Traceback (most recent call last):
  File "/Users/xxx/.pyenv/versions/fprime-stock/bin/fprime-gds", line 8, in <module>
    sys.exit(main())
  File "/Users/xxx/.pyenv/versions/3.10.4/envs/fprime-stock/lib/python3.10/site-packages/fprime_gds/executables/run_deployment.py", line 277, in main
    settings = vars(get_settings())
  File "/Users/xxx/.pyenv/versions/3.10.4/envs/fprime-stock/lib/python3.10/site-packages/fprime_gds/executables/run_deployment.py", line 23, in get_settings
    root = Path(args.root_dir)
NameError: name 'Path' is not defined

How to Reproduce

  1. Do a fresh checkout of F', and following installation guide

Expected Behavior

I would expect the command to work correctly, starting up the fprime-gds and allowing me to continue with the tutorial.

Thoughts on root cause

I suspect this is caused by commit 97f5492, which removed the line from pathlib import Path from run_deployment.py.

Related tickets

This was also reported in the main fprime system: nasa/fprime#1562

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.