Skip to content

Latest commit

 

History

History
33 lines (33 loc) · 2.69 KB

FPrime CLI.md

File metadata and controls

33 lines (33 loc) · 2.69 KB
  • To start the GDS in headless mode fprime-gds -g none
    • then to run any commands or whatever you use the fprime-cli tool
  • What you can do with the CLI
    • channels - you can receive the values of open telemetry channels - receives data
    • command-send - sends commands to the deployment
    • events - allows to receive events the deployment is recording - receives data
    • to use these the format is fprime-cli [COMMAND]
      • ex. fprime-cli channels
  • Just like the regular GDS, it uses the autogenerated dictionary to know what commands and things are available
    • if for whatever reason it couldn't find the dictionary, you can specify where to look for it by using the command fprime-cli [COMMAND] --dictionary /path/to/dictionary
      • where [COMMAND] is one of the options previously mentioned
  • Receiving events and channel data
    • when you request to receive events or channel data, it just prints it all out into the console
    • there's several ways to filter out what information you want and what you don't
      • -i /--ids - prints only data with the matching numeric id's
        • ex. fprime-cli events --ids 1 2 3
      • -c / --components - only print items generated by the specified component instances
        • ex. fprime-cli channels --components pingRcvr - this will only display data sent from the component named pingRcvr
      • s / --search - only prints strings containing the (case-sensitive) search term provided
        • ex. fprime-cli events --search WARNING_LO - this will only display WARNING_LO events from pingRcvr
        • this will only take a single search string
    • combining these filters will allow for you to narrow your search
    • to see the full list of all events or channels available, use the -l / --list flag to list everything in the dictionary
      • ex. fprime-cli events -l will list all known events for the project
    • to get the most detailed information about what is being sent or received, use the -j / --json flag to print out the full data objects in their JSON format
  • Sending commands
    • to send a command that has no arguments, simply type the name of the command
      • ex. fprime-cli command-send cmdDisp.CMD_NO_OP - the command in this case being cmdDisp.CMD_NO_OP
    • to send a command that has arguments, use the -args / --arguments option after the name of the command
      • ex. fprime-cli command-send health.HLTH_CHNG_PING --arguments eventLogger 50 20
      • to pass in strings, simply surround them in quotes "like this"
    • just like with events and channel data, you can see a list of all commands by using the command - fprime-cli command-send -l
  • to scp something to your computer scp [email protected]:~/photos/testing1 ~/Desktop/