cfs-tools / cfs-basecamp

Provides a framework and tools for developing, downloading, and integrating core Flight System (cFS) applications into an operational system.
Other
25 stars 3 forks source link

Add protection against invalid commands #37

Closed dmccomas closed 1 year ago

dmccomas commented 1 year ago

There are two levels of invalid commands causing unhandled exceptions.

  1. The 'Quick Command' menus allow non-apps to be selected. For example, the "-- Apps --" placeholder can be selected.
  2. The TelecommandInterface object doesn't catch exceptions in its get_cmd_entry() method.

The solutions include:

  1. Non-app dropdown menu items should be ignored
  2. The TelecommandInterface method get_topic_commands() should call get_topic_id() that catches exceptions
dmccomas commented 1 year ago

Also created separate command and telemetry null strings. The command is now '--' so it is short and easier to replace rather than selecting a longer string.