Skip to content

Commit

Permalink
Merge pull request #521 from nasa/issue-520-dp-get
Browse files Browse the repository at this point in the history
Revise code gen for DpGet
  • Loading branch information
bocchino authored Oct 17, 2024
2 parents e4e137f + da3b681 commit e707963
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ on:
type: boolean
jobs:
build-jars:
runs-on: "ubuntu-latest"
runs-on: "ubuntu-22.04"
name: "Build Standard JARs"
steps:
- name: "Checkout repository"
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
outputs:
native: ${{ steps.set-matrix.outputs.native }}
tags: ${{ steps.set-matrix.outputs.tags }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- id: set-matrix
shell: python
Expand All @@ -105,7 +105,7 @@ jobs:
"tag": "macosx_12_0_universal2"
},
{
"runner": "ubuntu-latest",
"runner": "ubuntu-22.04",
"tag": "manylinux2014_x86_64",
"container": "quay.io/pypa/manylinux2014_x86_64"
}
Expand Down Expand Up @@ -135,6 +135,9 @@ jobs:
run: |
# https://github.com/actions/checkout/issues/1809
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
#
# NOTE: actions/checkout et al. @v3 are deprecated - however the manylinux2014_x86_64 Docker image does not have node20
# which prevents from upgrading to @v4. We keep the deprecated versions (@v3) for now for lack of a better solution
echo "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION=node16" >> $GITHUB_ENV
echo "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION=node16" >> $GITHUB_ENV
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
Expand Down Expand Up @@ -174,7 +177,7 @@ jobs:
${{ inputs.test }}
build-wheels:
needs: [build-jars, build-native-images, generate-run-matricies]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }}
steps:
Expand Down Expand Up @@ -242,7 +245,7 @@ jobs:
publish-wheels:
if: ${{ github.event_name == 'release' }}
needs: [test-wheels, generate-run-matricies]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix: ${{ fromJson(needs.generate-run-matricies.outputs.tags) }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ case class ComponentDataProducts (
|Fw::Buffer buffer;
|const Fw::Success::T status = this->$invokeProductGet(0, globalId, size, buffer);
|if (status == Fw::Success::SUCCESS) {
| container.setId(globalId);
| container.setBuffer(buffer);
| container.setBaseId(baseId);
| // Assign a fresh DpContainer into container
| // This action clears out all the container state
| container = DpContainer(globalId, buffer, baseId);
| container.setPriority(priority);
|}
|return status;""")
Expand Down
3 changes: 1 addition & 2 deletions compiler/tools/fpp-to-cpp/test/array/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
cd `dirname $0`

fprime_gcc=../../../../scripts/fprime-gcc
export FPRIME_GCC_FLAGS="-Iinclude"

../fprime/generate_cpp

Expand All @@ -20,5 +19,5 @@ do
cp $base.ref.hpp $base.hpp
cp $base.ref.cpp $base.cpp
echo "compiling $base.cpp"
$fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments
$fprime_gcc -Iinclude -c $base.cpp
done
Original file line number Diff line number Diff line change
Expand Up @@ -3433,9 +3433,9 @@ Fw::Success::T ActiveGetProductsComponentBase ::
Fw::Buffer buffer;
const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer);
if (status == Fw::Success::SUCCESS) {
container.setId(globalId);
container.setBuffer(buffer);
container.setBaseId(baseId);
// Assign a fresh DpContainer into container
// This action clears out all the container state
container = DpContainer(globalId, buffer, baseId);
container.setPriority(priority);
}
return status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2144,9 +2144,9 @@ Fw::Success::T PassiveGetProductsComponentBase ::
Fw::Buffer buffer;
const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer);
if (status == Fw::Success::SUCCESS) {
container.setId(globalId);
container.setBuffer(buffer);
container.setBaseId(baseId);
// Assign a fresh DpContainer into container
// This action clears out all the container state
container = DpContainer(globalId, buffer, baseId);
container.setPriority(priority);
}
return status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3433,9 +3433,9 @@ Fw::Success::T QueuedGetProductsComponentBase ::
Fw::Buffer buffer;
const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer);
if (status == Fw::Success::SUCCESS) {
container.setId(globalId);
container.setBuffer(buffer);
container.setBaseId(baseId);
// Assign a fresh DpContainer into container
// This action clears out all the container state
container = DpContainer(globalId, buffer, baseId);
container.setPriority(priority);
}
return status;
Expand Down
4 changes: 1 addition & 3 deletions compiler/tools/fpp-to-cpp/test/component/compile_base_cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ do
done

fprime_gcc=../../../../../scripts/fprime-gcc
export FPRIME_GCC_FLAGS="-I../../fprime"

## Set compiler flags
include_flags="-I../../../.. -I.."
include_flags="-I../../../.. -I.. -I../../fprime -I../../fprime/config"
warning_flags="
-Wno-gnu-zero-variadic-macro-arguments
-Wno-sign-conversion
-Wno-unused-parameter
-Wno-vla-extension
Expand Down
3 changes: 1 addition & 2 deletions compiler/tools/fpp-to-cpp/test/component/impl/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ cd `dirname $0`
fprime_gcc=../../../../../scripts/fprime-gcc
export FPRIME_GCC_FLAGS="-I../../fprime"
warning_flags="
-Wno-gnu-zero-variadic-macro-arguments
-Wno-return-type
-Wno-unused-parameter
"
Expand All @@ -25,5 +24,5 @@ do
cp $base.template.ref.hpp $base.hpp
cp $base.template.ref.cpp $base.cpp
echo "compiling $base.cpp"
$fprime_gcc -I../../../.. -I.. -c $base.cpp $warning_flags
$fprime_gcc -I../../../.. -I.. -I../../fprime/config $warning_flags -c $base.cpp
done
4 changes: 2 additions & 2 deletions compiler/tools/fpp-to-cpp/test/component/test-impl/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ cd `dirname $0`
fprime_gcc=../../../../../scripts/fprime-gcc
export FPRIME_GCC_FLAGS="-I../../fprime"
warning_flags="
-Wno-gnu-zero-variadic-macro-arguments
-Wno-return-type
-Wno-sign-conversion
-Wno-unused-parameter
Expand All @@ -17,6 +16,7 @@ include_flags="
-I../base
-I../impl
-I../test-base
-I../../fprime/config
"
define_flags="-DPROTECTED="public" -DBUILD_UT=1"

Expand Down Expand Up @@ -44,5 +44,5 @@ do
base=`basename $file .ref.cpp`
cp $file $base.cpp
echo "compiling $base.cpp"
$fprime_gcc $include_flags -c $define_flags $warning_flags $base.cpp
$fprime_gcc $include_flags $define_flags $warning_flags -c $base.cpp
done
2 changes: 1 addition & 1 deletion compiler/tools/fpp-to-cpp/test/enum/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ do
cp $base.ref.hpp $base.hpp
cp $base.ref.cpp $base.cpp
echo "compiling $base.cpp"
$fprime_gcc -I../../.. -c $base.cpp
$fprime_gcc -I../fprime/config -c $base.cpp
done
2 changes: 1 addition & 1 deletion compiler/tools/fpp-to-cpp/test/port/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ do
cp $base.ref.hpp $base.hpp
cp $base.ref.cpp $base.cpp
echo "compiling $base.cpp"
$fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments
$fprime_gcc -I../fprime/config -c $base.cpp
done
2 changes: 1 addition & 1 deletion compiler/tools/fpp-to-cpp/test/struct/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ do
cp $base.ref.hpp $base.hpp
cp $base.ref.cpp $base.cpp
echo "compiling $base.cpp"
$fprime_gcc -I../../.. -c $base.cpp -Wno-gnu-zero-variadic-macro-arguments
$fprime_gcc -I../fprime/config -c $base.cpp
done
1 change: 0 additions & 1 deletion compiler/tools/fpp-to-cpp/test/top/check-cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
cd `dirname $0`

../fprime/generate_cpp
export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable"
(cd check-cpp-dir; ./check)
3 changes: 1 addition & 2 deletions compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/Basic/check
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh -e

export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable"
fpp_to_cpp=../../../../../../bin/fpp-to-cpp

echo ' removing old files'
Expand All @@ -17,4 +16,4 @@ do
done

echo ' compiling C++'
fprime-gcc -c BasicTopologyAc.cpp
fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c BasicTopologyAc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh -e

export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable"
fpp_to_cpp=../../../../../../bin/fpp-to-cpp

echo ' removing old files'
Expand All @@ -18,4 +17,4 @@ do
done

echo ' compiling C++'
fprime-gcc -I .. -c CommandsTopologyAc.cpp
fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c CommandsTopologyAc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh -e

export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable"
fpp_to_cpp=../../../../../../bin/fpp-to-cpp

echo ' removing old files'
Expand All @@ -17,4 +16,4 @@ do
done

echo ' compiling C++'
fprime-gcc -c HealthTopologyAc.cpp
fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c HealthTopologyAc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh -e

export FPRIME_GCC_FLAGS="-I../../../fprime -Wno-unused-parameter -Wno-unused-variable"
fpp_to_cpp=../../../../../../bin/fpp-to-cpp

echo ' removing old files'
Expand All @@ -18,4 +17,4 @@ do
done

echo ' compiling C++'
fprime-gcc -I .. -c ParamsTopologyAc.cpp
fprime-gcc -I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c ParamsTopologyAc.cpp

0 comments on commit e707963

Please sign in to comment.