Skip to content

Commit

Permalink
WIP Updating Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Reg Marr committed Nov 18, 2024
1 parent a3bd393 commit c6c5f87
Show file tree
Hide file tree
Showing 11 changed files with 314 additions and 101 deletions.
21 changes: 17 additions & 4 deletions .gen-run-complete.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
#!/bin/bash

_run_sh_completions()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="docker-build build inspect exec gds gen-deps teardown update sync test topology --daemon --persist --debug --as-host --local --clean --host-thread-ctl --help --force"

# Main commands
local commands="docker-build build inspect exec update teardown topology sync"
# Options/flags
local flags="--daemon --debug --as-host --clean --host-thread-ctrl --help"
# All options combined
local opts="$commands $flags"

if [[ ${cur} == -* ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
# If current word starts with a dash, complete with flags
COMPREPLY=( $(compgen -W "${flags}" -- ${cur}) )
return 0
fi

case "${prev}" in
inspect)
# You can add container names here if you want to provide completion for specific containers
# Container names for inspect command
local containers="fsw gds"
COMPREPLY=( $(compgen -W "${containers}" -- ${cur}) )
return 0
;;
exec)
# Executable targets
local targets="gds FlightComputer test"
COMPREPLY=( $(compgen -W "${targets}" -- ${cur}) )
return 0
;;
*)
# Default to main commands and flags
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ core
*TopologyAppID.csv
*TopologyAppAi_IDTableLog.txt

.vscode
# .vscode
py_dict
.settings
build-fprime-automatic*
Expand Down
Binary file added .org_out/FlightSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .org_out/LegacyDeploymentLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .org_out/NewDeploymentLink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .org_out/run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
254 changes: 195 additions & 59 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,201 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program in Docker",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/FlightComputer/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"args": ["-a", "127.0.0.1", "-u", "${env:UPLINK_TARGET_PORT}", "-d", "${env:DOWNLINK_TARGET_PORT}"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
"version": "0.2.0",
"configurations": [
{
"name": "FSW_IMG",
"value": "${env:FSW_IMG}"
}
],
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
"name": "Python attach local",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"cwd": "${workspaceFolder}/deploy",
"console": "integratedTerminal",
"justMyCode": false
},
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"externalConsole": false,
"pipeTransport": {
"pipeProgram": "docker",
"pipeArgs": [
"exec",
"-i",
"fsw",
"gdbserver",
":${env:GDB_PORT}",
"/fsw/target/build-artifacts/Linux/FlightComputer/bin/FlightComputer"
],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/fsw": "${workspaceFolder}/fsw"
}
},
{
"name": "Attach to Program in Docker",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerServerAddress": "localhost:${env:GDB_PORT}",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
"name": "MBSE Python attach in docker",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"cwd": "${workspaceFolder}/scripts",
"console": "integratedTerminal",
"justMyCode": false,
"pathMappings": [
{
"localRoot": "/home/reggiemarr/Projects/MBSE_FSW/",
"remoteRoot": "/MBSE_FSW"
},
{
"localRoot": "/home/reggiemarr/Projects/MBSE_FSW/scripts/",
"remoteRoot": "/MBSE_FSW/scripts"
}
]
},
{
"name": "run deployment",
"type": "python",
"request": "launch",
"args": [
"${workspaceFolder}/run-paramiko.py"
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "(gdb) Launch Docker App",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/FlightComputer/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"miDebuggerServerAddress": "localhost:5555",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Docker Debug",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "Attach debug Flight SW"
},
{
"name": "Attach to Flight SW on local",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/FlightComputer/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"miDebuggerServerAddress": "localhost:5555",
"environment": [],
"useExtendedRemote": true,
"externalConsole": false,
"MIMode": "gdb",
"sourceFileMap": {
"/fsw": "${workspaceFolder}"
}
},
{
"name": "Launch GDS Integration tests",
"type": "python",
"request": "launch",
"connect": {
"host": "localhost",
"port": 5678
},
"program": "${file}",
"console": "externalTerminal",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/fprime/flightcomputer-software"
}
]
},
{
"name": "Attach GDS Integration Test Runner",
"type": "python",
"request": "attach",
"connect": {
"host": "172.29.1.5",
"port": 5678
},
"program": "${file}",
"console": "externalTerminal",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/fprime/flightcomputer-software"
}
],
"postDebugTask": "Teardown Integration Tests"
},
{
"name": "Launch Flight SW in docker",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/FlightComputer/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"args": [
"-a",
"127.1.1.1",
"-u",
"50050",
"-d",
"50000"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"sourceFileMap": {
"/fsw/": "${workspaceFolder}"
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/fsw/"
}
],
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "docker",
"pipeArgs": [
"compose",
"run",
"-i",
"fsw",
"bash",
"-c"
],
"debuggerPath": "/usr/bin/gdb",
"preLaunchTask": "Build Flight SW"
},
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
"name": "Launch Flight SW on host",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/FlightComputer/build-artifacts/Linux/FlightComputer/bin/FlightComputer",
"args": [
"-a",
"127.0.0.1",
"-u",
"50000",
"-d",
"50050"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"useExtendedRemote": true,
"sourceFileMap": {
"/fsw/": "${workspaceFolder}"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
],
"sourceFileMap": {
"/fsw": "${workspaceFolder}/fsw"
}
}
]
]
}
3 changes: 1 addition & 2 deletions FlightComputer/CCSDSTester/CCSDSTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void CCSDSTester::PING_cmdHandler(const FwOpcodeType opCode, const U32 cmdSeq) {

U32 dfltMessage = 0x9944fead;
com.resetSer();
U8 packetType = Fw::ComPacket::ComPacketType::FW_PACKET_COMMAND;
Fw::ComPacket::ComPacketType packetType = Fw::ComPacket::ComPacketType::FW_PACKET_COMMAND;
com.serialize(packetType);
com.serialize(dfltMessage);

Expand All @@ -142,7 +142,6 @@ void CCSDSTester::MESSAGE_cmdHandler(const FwOpcodeType opCode,
com.resetSer();
// U32 starter = 0xFFFF;
// com.serialize(starter);
// Fw::ComPacket::ComPacketType_t packetType = Fw::ComPacket::ComPacketType_e::FW_PACKET_FILE;
U8 packetType = Fw::ComPacket::ComPacketType::FW_PACKET_FILE;
com.serialize(packetType);
com.serialize(str1);
Expand Down
Loading

0 comments on commit c6c5f87

Please sign in to comment.