Skip to content

Commit

Permalink
Merge branch 'devel' into Fix-warnings-in-TCP/UDP-UT
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanBertrand committed Sep 28, 2024
2 parents ea5b7af + d6ebdff commit 67e3a9d
Show file tree
Hide file tree
Showing 295 changed files with 7,246 additions and 2,515 deletions.
2 changes: 2 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ usec
usecs
workaround
workarounds
DEVICESM
HACKSM
4 changes: 4 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ CMDPACKET
CMDREG
cmds
CMDSEQ
cmdsequencer
cnt
cntx
cobj
Expand Down Expand Up @@ -200,6 +201,7 @@ CRCs
crcstat
CREATEDIRECTORY
Crosscompiling
crsmith
crt
CRTSCTS
cryptsoft
Expand Down Expand Up @@ -548,6 +550,7 @@ lammertbies
LASTLOG
LBLOCK
LCHILD
leisher
lemstarch
lestarch
levelname
Expand Down Expand Up @@ -1212,4 +1215,5 @@ xsh
xsltproc
xxxx
yacgen
zimri
zmq

Check warning on line 1219 in .github/actions/spelling/expect.txt

View workflow job for this annotation

GitHub Actions / Spell checking

No newline at eof. (no-newline-at-eof)
10 changes: 0 additions & 10 deletions .github/actions/spelling/line_forbidden.patterns
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# s.b. anymore
\bany more[,.]

# s.b. cannot
\b[Cc]an not\b

# s.b. GitHub
(?<![&*.]|// |\btype )\bGithub\b(?![{)])

Expand Down Expand Up @@ -70,16 +67,9 @@
# s.b. or (more|less)
\bore (?:more|less)\b

# s.b. nonexistent
\bnon existing\b
\b[Nn]o[nt][- ]existent\b

# s.b. brief / details/ param / return / retval
(?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b

# s.b. preexisting
[Pp]re[- ]existing

# s.b. preempt
[Pp]re[- ]empt\b

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
JOBS: 2
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-framework-logs
Expand All @@ -58,7 +58,7 @@ jobs:
JOBS: 2
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-ref-logs
Expand All @@ -83,7 +83,7 @@ jobs:
JOBS: 2
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-int-logs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test-rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
run: mkdir -p artifact/RPI; cp -rp RPI/test RPI/build-artifacts artifact/RPI; cp -rp ci artifact
# Build Artifacts
- name: 'RPI Build Output'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rpi-build
path: artifact
retention-days: 5
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: rpi-logs
Expand All @@ -64,7 +64,7 @@ jobs:
. venv/bin/activate
pip install -r requirements.txt
- name: RPI Build Download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rpi-build
- name: RPI Integration Tests
Expand All @@ -74,7 +74,7 @@ jobs:
/bin/bash ci/tests/RPI-Ints.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: pi-int-logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: ./ci/tests/Framework.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-framework-logs
Expand All @@ -51,7 +51,7 @@ jobs:
run: ./ci/tests/Ref.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-ref-logs
Expand All @@ -75,7 +75,7 @@ jobs:
run: ./ci/tests/30-ints.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ci-int-logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-jpl-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Run jobs in parallel for each config-file
Expand All @@ -52,4 +52,4 @@ jobs:
fprime-util build --all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/codeql-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/actions/codeql/security-pack.yml
Expand All @@ -50,6 +50,6 @@ jobs:
fprime-util generate
fprime-util build --all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/cppcheck-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ jobs:
run: xsltproc .github/scripts/cppcheck-xml2text.xslt cppcheck_err.xml | tee $GITHUB_STEP_SUMMARY cppcheck_err.txt

- name: Upload SARIF file to GitHub Code Scanning Alerts
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ github.workspace }}/cppcheck_err.sarif
category: "cppcheck"

- name: Archive static analysis artifacts to download and view
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cppcheck-errors
path: ./*cppcheck_err.*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpplint-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
sed -i -e 's/\"name\": \"CppCheck\"/\"name\": \"CppLint\"/g' cpplint_cppcheck_result.sarif
- name: Upload SARIF file to GitHub Code Scanning Alerts
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ github.workspace }}/cpplint_cppcheck_result.sarif
category: "cpplint"

- name: Archive static analysis artifacts to download and view
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cpplint-errors
path: ./*cpplint_cppcheck_result.*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ext-raspberry-led-blinker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
cp -r ./build-artifacts rpi-artifacts
cp -r Components/Led/test/int rpi-artifacts
- name: 'Archive Build Artifacts'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rpi-artifacts
path: rpi-artifacts
Expand All @@ -80,7 +80,7 @@ jobs:
. venv/bin/activate
pip install -r requirements.txt
- name: "Artifacts Download"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rpi-artifacts
- name: Run Integration Tests
Expand All @@ -92,7 +92,7 @@ jobs:
sleep 10
pytest --dictionary ./build-artifacts/raspberrypi/LedBlinker/dict/LedBlinkerTopologyDictionary.json ./int/led_integration_tests.py
- name: 'Archive logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: rpi-logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fpp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
fprime-util check
shell: bash
- name: "Archive Logs"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: FppTest-Logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Check formatting
Expand Down
61 changes: 48 additions & 13 deletions CFDP/Checksum/Checksum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,38 @@
namespace CFDP {

//! \class Checksum
//! \brief Class representing a CFDP checksum
//! \brief Class representing a 32-bit checksum as mandated by the CCSDS File
//! Delivery Protocol.
//!
//! This checksum is calculated by update of an existing 32-bit value
//! with the "next" 32-bit string drawn from the file data. Beginning
//! at the start of the file, a 4-byte window moves up the file by four
//! bytes per update. The update itself replaces the existing checksum
//! with the byte-wise sum of the existing checksum and the file data
//! contained in the window. Overflows in the addition are permitted
//! and the carry discarded.
//!
//! If an update is to be made beginning at an offset into the file
//! which is not aligned to a 4-byte boundary, the window is treated
//! as beginning at the last 4-byte boundary, but is left-zero-padded.
//! Similarly, where the file data for an update ends on an unaligned
//! byte, the window extends up to the next boundary and is
//! right-zero-padded.
//!
//! ## Example
//!
//! For buffer 0xDE 0xAD 0xBE 0xEF 0xCA 0xFE and initial zero checksum:
//!
//! ------------------------------------ Update 1
//! Window 0xDE 0xAD 0xBE 0xEF
//! Checksum 0xDEADBEEF
//!
//! ------------------------------------ Update 2
//! Window 0xCA 0xFE
//! Checksum 0xDEADBEEF+
//! 0xCAFE0000
//! ----------
//! 0xA8ABBEEF <- Final value
class Checksum {

public:
Expand All @@ -34,16 +64,16 @@ namespace CFDP {
// Construction and destruction
// ----------------------------------------------------------------------

//! Construct a fresh Checksum object
//! Construct a fresh Checksum object.
Checksum();

//! Construct a Checksum object and initialize it with a value
//! Construct a Checksum object and initialize it with a value.
Checksum(const U32 value);

//! Copy a Checksum object
//! Copy a Checksum object.
Checksum(const Checksum &original);

//! Destroy a Checksum object
//! Destroy a Checksum object.
~Checksum();

public:
Expand All @@ -52,20 +82,25 @@ namespace CFDP {
// Public instance methods
// ----------------------------------------------------------------------

//! Assign checksum to this
//! Assign checksum to this.
Checksum& operator=(const Checksum& checksum);

//! Compare checksum and this for equality
//! Compare checksum and this for equality.
bool operator==(const Checksum& checksum) const;

//! Compare checksum and this for inequality
//! Compare checksum and this for inequality.
bool operator!=(const Checksum& checksum) const;

//! Update the checksum value by accumulating the words in the data
void update(
const U8 *const data, //!< The data
const U32 offset, //!< The offset of the start of the data, relative to the start of the file
const U32 length //!< The length of the data in bytes
//! Update the checksum value by accumulating words in the given data.
//!
//! \important The data and data-length passed to this method are specifically
//! those over which the update is made, rather than the entire
//! file. Typically, therefore, `data` will be a pointer to the
//! byte given by the offset, e.g. `&file_buffer[offset]`.
//!
void update(const U8* const data, //!< Beginning of the data over which to update.
const U32 offset, //!< Offset into the file at which the data begins.
const U32 length //!< Length of the update data in bytes.
);

//! Get the checksum value
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Contributors to the [fprime](https://github.com/nasa/fprime) repository should u
F´ follows a standard git flow development model. Developers should start with a
[fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of one of the F´ repositories and then develop
according to [git flow](https://docs.github.com/en/get-started/quickstart/github-flow). Remember to add an
upstream remote to your fork such that you may fetch the latest changes.
[upstream remote](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) to your fork such that you may fetch the latest changes.

For each contribution, developers should first fetch the latest changes from upstream. Then create a new branch off
`devel` and submit back to F´ using a pull request as described above.
Expand Down
4 changes: 0 additions & 4 deletions Drv/BlockDriver/BlockDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ namespace Drv {

}

void BlockDriverImpl::init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instanceId) {
BlockDriverComponentBase::init(queueDepth, instanceId);
}

BlockDriverImpl::~BlockDriverImpl() {

}
Expand Down
1 change: 0 additions & 1 deletion Drv/BlockDriver/BlockDriverImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Drv {
// Only called by derived class
BlockDriverImpl(const char* compName);

void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instanceId = 0);
~BlockDriverImpl();
// a little hack to get the reference running
void callIsr();
Expand Down
Loading

0 comments on commit 67e3a9d

Please sign in to comment.