Skip to main content

Requirements and Design

OpenC3 COSMOS is a command and control system providing commanding, scripting, and data visualization capabilities for embedded systems and systems of systems. COSMOS is intended for use during all phases of testing (board, box, integrated system) and during operations.

COSMOS is currently made up of the following applications:

  1. Command and Telemetry Server - Provides status of realtime commanding, telemetry reception, logging, limits monitoring, and packet routing.
  2. Limits Monitor - Monitors telemetry with defined limits and shows items that currently are or have violated limits.
  3. Command Sender - Provides a graphical interface for manually sending individual commands.
  4. Script Runner - Executes scripts and provides highlighting of the currently executing line. Now also includes TestRunner functionality.
  5. Packet Viewer - Provides realtime visualization of every telemetry packet that has been defined.
  6. Telemetry Viewer - Provides custom telemetry screen functionality with advanced layout and visualization widgets.
  7. Telemetry Grapher - Provides realtime and offline graphing of telemetry data.
  8. Data Extractor - Extracts telemetry and command packet log files into CSV data.
  9. Data Viewer - Provides text based telemetry visualization for items.
  10. Bucket Explorer - Browse the COSMOS bucket storage in any cloud environment.
  11. Table Manager - Binary file editor with Script Runner integration for upload / download.
  12. Handbooks - Generate html page of the command and telemetry definitions.
  13. Calendar - Provides scheduling of commands and scripts. Also provides a framework for reserving resources.
  14. Admin - Provides an administrative interface to COSMOS.

More detailed descriptions, requirements, and design for each tool are found later in this document. Additionally, each of the above applications is built using COSMOS libraries that are available for use as a framework to develop custom program/project applications.

Terminology

The COSMOS system uses several terms that are important to understand. The following table defines these terms.

TermDefinition
TargetA COSMOS target is an embedded system that the COSMOS Command and Telemetry Server connects to using an interface in order to send commands to and/or receive telemetry from.
CommandA packet of information telling a target to perform an action of some sort.
Telemetry PacketA packet of information providing status from a target.
InterfaceA Ruby class that knows how to send commands to and/or receive telemetry from a target. COSMOS comes with interfaces that support TCP/IP, UDP, and serial connections. Custom interfaces are easy to add to the system.
RubyThe powerful dynamic programming language used to write the COSMOS applications and libraries as well as COSMOS scripts and test procedures.
Configuration FilesCOSMOS uses simple plain text configuration files to define commands and telemetry packets, and to configure each COSMOS application. These files are easily human readable/editable and machine readable/editable.
Packet Log FilesBinary files containing either logged commands or telemetry packets.
Message Log FilesText files containing messages generated by the system.
ToolAnother name for a COSMOS application.

Overall Architecture and Context Diagram

The following diagram shows the COSMOS 5 architecture.

COSMOS Architecture

Key aspects of this architecture:

COSMOS 5 is a cloud native, containerized, microservice oriented command and control system. All the COSMOS microservices are docker containers which is why Docker is shown containing the entire COSMOS system. The green boxes on the left represent external embedded systems (Targets) which COSMOS connects to. The Redis data store contains the configuration for all the microservices, the current value table, as well as data streams containing decommutated data. The Minio data store contains plugins, targets, configuration data, text logs as well as binary logs of all the raw, decommutated, and reduced data. Users interact with COSMOS from a web browser which routes through the internal Traefik load balancer.

  • COSMOS can connect to many different kinds of targets. The examples include things like Flight software (FSW), Ground Support Equipment (GSE), Labview, and COTS targets such as an Agilent power supply. Any embedded system that provides a communication interface can be connected to COSMOS.
  • COSMOS ships with interfaces for connecting over TCP/IP, UDP, MQTT, and serial connections. This covers most systems, but custom interfaces can also be written to connect to anything.
  • All realtime communication with targets flows through the COSMOS system. This ensures all commands and telemetry are logged.
  • Every tool is configured with plain text configuration files.
  • Program specific tools can be written using the COSMOS libraries that can interact with the realtime command and telemetry streams and can process logged data.

Overall Requirements

Reqt. IDDescriptionTest Description
COSMOS-1All COSMOS core functionality shall be containerized.Verify COSMOS is running in Docker
COSMOS-2The COSMOS user interface shall be accessible from Chromium based web browsersOpen COSMOS in Chrome/Edge
COSMOS-3The COSMOS user interface shall be accessible from the Firefox web browserOpen COSMOS in Firefox
COSMOS-4COSMOS shall log all commands sent
COSMOS-5COSMOS shall log all telemetry received
COSMOS-6COSMOS shall decommutate all telemetry packets received
COSMOS-7COSMOS shall support autonomously attempting to connect to targets.Verify targets are connected upon starting the CTS.
COSMOS-8COSMOS shall time stamp telemetry packets upon receipt.Verify logged packets are timestamped.
COSMOS-9COSMOS shall time stamp telemetry packets to a resolution of 1 millisecond or better. Note: This requirement only refers to resolution. COSMOS does not run on real-time operating systems and accuracy cannot be guaranteed.View time stamps in log.
COSMOS-10COSMOS shall time stamp received telemetry with a UTC timestamp.Verify logged time stamps are as expected.
COSMOS-11COSMOS shall maintain a timestamped log of commands received, limits violations, and errors encountered.View COSMOS message log.

Api Requirements

Reqt. IDDescriptionTest Description
API-1The COSMOS API shall allow scripted connection and disconnection of interfaces.Disconnect and connect an interface from a script.
API-2The COSMOS API shall allow scripted connection and disconnection of routers.Disconnect and connect a router from a script.
API-3The COSMOS API shall allow scripted setting of the current limits set.Select a different limits set from a script.
API-4The COSMOS API shall allow commanding of targetsSend a command
API-5The COSMOS API shall allow reading the current value of any telemetry itemRead a telemetry point
API-6The COSMOS API shall allow streaming realtime and logged telemetry packetsStream telemetry packets
API-7The COSMOS API shall allow streaming realtime and logged command packetsStream command packets
API-8The COSMOS API shall allow starting COSMOS scriptsStart a script using the API

Command and Telemetry Server

The Command and Telemetry server provides status on the the overall COSMOS installation for a specific scope.

Reqt. IDDescriptionTest Description
CTS-1The Command and Telemetry Server shall display a list of all interfaces.View the Interfaces tab.
CTS-2The Command and Telemetry Server shall allow manual connection and disconnection of interfaces.Press a GUI button to disconnect and connect an interface.
CTS-3The Command and Telemetry Server shall display a list of all targets.View the Targets tab.
CTS-4The Command and Telemetry Server shall display a list of known commands.View the Cmd Packets tab.
CTS-5The Command and Telemetry Server shall display raw command data for the most recent command received.View the Cmd Packets tab and click the View Raw button for a command.
CTS-6The Command and Telemetry Server shall display a list of known telemetry packets.View the Tlm Packets tab.
CTS-7The Command and Telemetry Server shall display raw telemetry packet data for the most recent telemetry packet received.View the Tlm Packets tab and click the View Raw button for a telemetry packet.
CTS-8The Command and Telemetry Server shall display a list of all routers.View the Routers tab.
CTS-9The Command and Telemetry Server shall allow manual connection and disconnection of routers.Press a GUI button to disconnect and connect a router.
CTS-10The Command and Telemetry Server shall allow manually setting the current limits set.Select a different limits set from the combobox.
CTS-11The Command and Telemetry Server shall support opening telemetry packets in Packet Viewer.On the Tlm Packets tab click View in Packet Viewer for a telemetry packet.
CTS-12The Command and Telemetry Server shall display time stamps in local time.View time stamps in log.

Limits Monitor

Limits Monitor displays all telemetry points that are currently out of limits and also shows any telemetry points that have gone out of limits since Limits Monitor was started.

Reqt. IDDescriptionTest Description
LM-1Limits Monitor shall display all telemetry points currently out of limits.View displayed telemetry points.
LM-2Limits Monitor shall support ignoring telemetry points.Click ignore on a telemetry point.
LM-3Limits Monitor shall keep a displayed log of limits violations.View the log tab.
LM-4Limits Monitor shall continue displaying a telemetry point that temporarily went out of limits.Watch until a telemetry points returns to green.
LM-5Limits Monitor shall support saving its configuration.Save the configuration.
LM-6Limits Monitor shall support loading its configuration.Load the configuration.

Command Sender

Command Sender provides an easy method to send single commands to targets. The graphical user interface provides simple dropdowns to quickly select the desired command to send organized by target name and command name. After the user has selected the command, they then fill in the desired command parameters and click send to send the command to the target.

Reqt. IDDescriptionTest Description
CMD-1Command Sender shall allow selection of a command by target name and packet name.Select a specific command by target name and packet name in the drop down menus.
CMD-2Command Sender shall allow sending the selected command.Send the selected command by pressing the Send button.
CMD-3Command Sender shall display non-ignored parameters for the selected command.Select a specific command and verify the expected parameters are shown.
CMD-4Command Sender shall provide a mechanism to select state values for command parameters with states.Select a specific state value for a specific command with states.
CMD-5Command Sender shall allow sending a manually entered value for a command parameter with states.Manually enter a value for a specific command with states.
CMD-6Command Sender shall refuse to send commands if required parameters are not provided.Attempt to send a command with a required parameter not filled out.
CMD-7Command Sender shall support sending commands while ignoring range checking.Enter Ignore Range Checking mode and then send a command with an out of range parameter.
CMD-8Command Sender shall optionally display state values in hex.Enter "Display State Values in Hex" mode and verify state values are displayed as hex.
CMD-9Command Sender shall optionally display ignored command parameters.Enter "Show Ignored Parameters" mode and verify ignored parameters are displayed.
CMD-10Command Sender shall respect hazardous commands and notify the user before proceeding.Send a hazardous command and verify a dialog box appears before the command is sent. Verify both accepting the dialog and declining to send.
CMD-11Command Sender shall keep a command history of each command sent.Send a command and verify that it shows up in the command history box.
CMD-12Command Sender shall allow resending of any command in the command history.Resend one of the commands in the command history box.

Script Runner

Script Runner provides a visual interface for editing and executing scripts/procedures. A full featured text editor provides syntax highlighting and code completion while developing scripts. During script execution, the currently executing line is highlighted and any logged messages are highlighted to the user. If any failure occurs, the script is paused and the user alerted. The user can then decide whether to stop the script, or ignore the failure and continue. The user can also retry the failed lines, or other nearby lines before proceeding.

Script Runner now also provides a structured methodology for designing system level scripting that mirrors the very successful pattern used in software unit tests (previously implemented in the Test Runner tool). System level tests/procedures are built up of cases that are organized into groups. For example, you might have one group that verified all of the requirements associated with a particular mechanism. Ideally you would break this down into individual cases for different scenarios. One perhaps for opening a shutter, another for closing it, etc. Cases are ideally small and independent tasks. A number of these groups are then combined into an overall suite which would be run to execute a major test such as EMI, or software FQT.

Reqt. IDDescriptionTest Description
SR-1Script Runner shall provide a text editor for developing test scripts.Open Script Runner and create a simple test script. Perform all standard file operations including New, Open, Reload, Close, Save, and Save As. Perform all standard editing operations such as Cut, Copy, Paste, Undo, Redo, Select All, and Comment/Uncomment lines.
SR-2Script Runner shall provide search and replace functionality.Perform all standard search and replace functionality, including search, replace, find next, and find previous.
SR-3Script Runner shall provide code completion for cmd(), tlm(), and wait_check() COSMOS API methods. Note: Other methods may also be supported.Create a script and exercise code completion on the mentioned keywords.
SR-4Script Runner shall execute Ruby-based COSMOS scripts.Press start and execute a script.
SR-5Script Runner shall highlight the currently executing line of the script.Verify that lines are highlighted as a test script executes.
SR-6Script Runner shall allow pausing an executing script.Press pause button and verify script is paused. Press start to resume.
SR-7Script Runner shall allow stopping an executing script.Press stop and verify script stops.
SR-8Script Runner shall pause an executing script upon the occurrence of an error.Create a script with a statement that is guaranteed to fail and verify that the script is paused.
SR-9Script Runner shall log commands sent.Execute a script that sends a command and verify it is logged.
SR-10Script Runner shall log text written to STDOUT. Note: Typically through the puts method.Execute a script that uses puts to write a message and verify it is logged.
SR-11Script Runner shall log wait times.Execute a script that includes a wait method and verify wait time is logged.
SR-12Script Runner shall log errors that occur while the script is executing.Create a script with a check statement that is guaranteed to fail and verify it is logged.
SR-13Script Runner shall log check statement success and failure.Create a script with a check statement that is guaranteed to fail and one that is guaranteed to succeed. Verify both the success and failure are logged.
SR-14Script Runner shall support executing selected lines.Select a set of lines and execute them using Script->Execute Selected Lines.
SR-15Script Runner shall support executing selected lines while paused.Select a set of lines and execute them from the right-click context menu.
SR-16Script Runner shall support starting a script from any line.Place the mouse cursor at the desired first line and then select Script->Execute From Cursor.
SR-17Script Runner shall support a mnemonic checking function.Select Script->Mnemonic Check.
SR-18Script Runner shall support a syntax checking function.Select Script->Ruby Syntax Check.
SR-19Script Runner shall support viewing the script instrumentation.Select Script->View Instrumented Script.
SR-20Script Runner shall support an disconnected mode to allow for executing scripts without a connection to the Command and Telemetry Server.Select Script->Toggle Disconnect. Execute a script with commands and check statements and verify that it runs to completion.
SR-21Script Runner shall support a Debug terminal to aid in debugging scripts.Select Script->Toggle Debug.
SR-22Script Runner shall support a step mode where the script will stop and wait for use interaction after each line.Press Step to progress through the script.
SR-23Script Runner shall support breakpoint functionality.Create a breakpoint then execute the script and verify it stops at the specified line.
SR-25Script Runner Suite Mode shall support executing individual test suites.Execute an individual test suite.
SR-26Script Runner Suite Mode shall support executing individual test groups.Execute an individual test group.
SR-27Script Runner Suite Mode shall support executing individual test cases.Execute an individual test case.
SR-28Script Runner Suite Mode shall support executing test group setup and teardown methods individually.Execute a test group setup. Execute a test group teardown.
SR-29Script Runner Suite Mode shall support executing test suite setup and teardown methods individually.Execute a test suite setup. Execute a test suite teardown.
SR-30Script Runner Suite Mode shall create a report after executing any suite test.Verify a report is generated after executing a suite.
SR-31Script Runner Suite Mode shall support pausing when an error occurs.Execute a test script with the pause on error box checked and without.
SR-32Script Runner Suite Mode shall support allowing the user to proceed on an error.Execute a test script with the Allow go/retry on error box checked and without.
SR-33Script Runner Suite Mode shall support aborting execution on an error.Execute a test script with the abort on error box checked and without.
SR-34Script Runner Suite Mode shall support looping a test.Execute a test script with the loop testing box checked and without.
SR-35Script Runner Suite Mode shall support breaking the looping of a test on error.Execute a test script with the break loop on error box checked and without.
SR-36Script Runner Suite Mode shall support a user readable flag indicating that loop testing is occurring.Execute a test script that checks the $loop_testing variable while looping and again while not looping.
SR-37Script Runner Suite Mode shall support a user readable flag indicating manual operations are desired.Execute a test script with the manual box checked and without.

Packet Viewer

Packet Viewer provides a simple tool to view the realtime contents of any telemetry packet defined in the system in a tabular, key-value format.

Reqt. IDDescriptionTest Description
PV-1Packet Viewer shall allow selection of a telemetry packet by target name and packet name.Select a specific telemetry packet by target name and packet name in the drop down menus.
PV-2Packet Viewer shall display the contents of the selected telemetry packet.Ensure all items of the selected telemetry packet are displayed and updating.
PV-3Packet Viewer shall provide a mechanism to get detailed information on a telemetry item.Right click on a telemetry item and select "Details" from the context menu.
PV-4Packet Viewer shall provide a mechanism to view a graph of any telemetry item.Right click on a telemetry item and select "Graph" from the context menu.
PV-5Packet Viewer shall color telemetry values based upon limits state.View a packet with items containing limits and verify they are colored.
PV-6Packet Viewer shall support a configurable polling rate.Select File->Options and change the polling rate.
PV-7Packet Viewer shall support a color-blind mode to allow distinguishing limits states for those who are color blind.Select View->Color Blind Mode and verify that items with limits are also displayed with a textual indication of limits state color.
PV-8Packet Viewer shall support displaying telemetry in each of the four COSMOS value types (raw, converted, formatted, and formatted with units)In the View menu, select each of the four value types and verify values are displayed accordingly.

Telemetry Viewer

Telemetry Viewer provides a way to organize telemetry points into custom "screens" that allow for the creation of unique and organized views of telemetry data. Screens are made up of widgets or small GUI components that display telemetry in unique ways.

Reqt. IDDescriptionTest Description
TV-1Telemetry Viewer shall display user-defined telemetry screens.Open a telemetry
TV-2Telemetry Viewer shall display realtime data.Verify telemetry screens show realtime data.
TV-3Telemetry Viewer shall support saving open telemetry screens and their positions.Open three telemetry screens and then select File->Save Configuration.

Telemetry Grapher

Telemetry Grapher performs graphing of telemetry points in both realtime and log file playback.

Reqt. IDDescriptionTest Description
TG-1Telemetry Grapher shall provide line graphs of telemetry points.Add several housekeeping data objects to a plot.
TG-2Telemetry Grapher shall support realtime graphing of telemetry.Press Start to start realtime graphing.
TG-3Telemetry Grapher shall support graphing data from logged telemetry.Select the menu option to graph data from a logged data
TG-4Telemetry Grapher shall support multiple plots per browser tab.Add multiple plots.
TG-5Telemetry Grapher shall support multiple telemetry points per plot.Add multiple data objects to one plot.
TG-6Telemetry Grapher shall support saving a variable number of data points.Edit Points Saved.
TG-7Telemetry Grapher shall support graphing a variable duration of time.Edit Seconds Plotted.
TG-8Telemetry Grapher shall support graphing a variable number of data points.Edit Points Plotted.
TG-9Telemetry Grapher shall support saving its configuration.Save the current configuration.
TG-10Telemetry Grapher shall support loading its configuration.Load the previously saved configuration.

Data Extractor

Data Extractor processes logged data and extracts data into a CSV format for analysis in Excel or other tools.

Reqt. IDDescriptionTest Description
DE-1Data Extractor shall support adding individual telemetry points.Add an individual telemetry point.
DE-2Data Extractor shall support adding entire telemetry packets.Add an entire packet.
DE-3Data Extractor shall support adding entire telemetry targets.Add all packets for a target.
DE-4Data Extractor shall support selecting the value type to extract for each telemetry point (RAW, CONVERTED, FORMATTED, WITH_UNITS)Click an item and change the value type.
DE-5Data Extractor shall support saving configurations.Select File->Save Config
DE-6Data Extractor shall support loading configurations.Select File->Load Config
DE-7Data Extractor shall support deleting itemsSelect an Item and press delete

Data Viewer

Data Viewer provides for textual display of telemetry packets where other display methods are not a good fit. It is especially useful for memory dumps and for log message type data display.

Reqt. IDDescriptionTest Description
DV-1Data Viewer shall support realtime processing of telemetry packets.Press Start to start realtime processing.
DV-2Data Viewer shall support logged playback of telemetry packets.Select a time range to playback.
DV-3Data Viewer shall support textual display of telemetry packets.View the display of data.
DV-4Data Viewer shall support multiple tabs for data display.Switch between several tabs of data.
DV-5Data Viewer shall support deleting tabs.Delete a tab.

Calendar

The Calendar tool provides a user interface and API for initiating scheduled actions in COSMOS

Reqt. IDDescriptionTest Description
TL-1Calendar shall allow creating new timelinesClick the button and create a new timeline
TL-2Calendar shall allow scheduling commands for future execectionAdd a command to a timeline
TL-3Calendar shall allow scheduling scripts for future executionAdd a script to a timeline
TL-4Calendar shall allow for reserving a resourceAdd a reservation to a timeline
TL-5Calendar shall track success or failure of commandsLook at status from a completed command
TL-6Calendar shall track success or failure of scriptsLook at status from a completed script
TL-7Calendar shall allow deleting activities from timelinesDelete a preexisting item from a timeline
TL-8Calendar shall allow deleting timelinesDelete a timeline

Admin

The Admin tool provides administrative functionality including managing plugins for the COSMOS system

Reqt. IDDescriptionTest Description
AD-1The Admin Tool shall allow installing pluginsUpload and Install a Plugin
AD-2The Admin Tool shall support upgrading pluginsUpgrade an installed plugin
AD-3The Admin Tool shall support uninstalling pluginsUninstall a plugin
AD-4The Admin Tool shall display information on installed pluginsView info on Interfaces, Microservices, etc
AD-5The Admin Tool shall support editing microservicesEdit the settings for a microservice
AD-6The Admin Tool shall support discovery of pluginsDiscover and download a plugin
AD-7The Admin Tool shall support adding links to external toolsAdd a link to Google
AD-8The Admin Tool shall support reordering toolsReorder tools on the tools tab
AD-9The Admin Tool shall support configuring a classification barAdd a classification bar on the settings tab