Skip to content

Move BlockDriver to Ref example#3651

Merged
LeStarch merged 13 commits intonasa:develfrom
timcanham:blkdrv-move
Jun 4, 2025
Merged

Move BlockDriver to Ref example#3651
LeStarch merged 13 commits intonasa:develfrom
timcanham:blkdrv-move

Conversation

@timcanham
Copy link
Collaborator

@timcanham timcanham commented May 22, 2025

Related Issue(s)
Has Unit Tests (y/n) Y
Documentation Included (y/n) N

Change Description

This PR moves Drv/BlockDriver to Ref/BlockDriver to make the point that BlockDriver is not a real driver, but a demonstration.
The PR also removes the timer ISR and substitutes Svc/LinuxTimer to drive the cycle.

Rationale

Svc/BlockDriver is causing a lot of confusion for adapter since many feel that they need to use or modify BlockDriver to run F Prime cycles.

Testing/Review Recommendations

Unit tests have been updated and pass.

Future Work

#3693
#3694

@timcanham timcanham requested review from LeStarch and Copilot May 22, 2025 22:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR moves the BlockDriver component from Drv to Ref to emphasize its role as an example rather than a production driver and updates the associated topology and test configurations. Key changes include renaming and relocating the BlockDriver component, replacing the timer ISR with Svc/LinuxTimer for cycle management, and updating the test harness and build configurations.

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Ref/Top/instances.fpp Updates the BlockDriver instance path and adds the linuxTimer instance.
Ref/Top/RefTopologyDefs.hpp Adjusts include paths for BlockDriver headers.
Ref/Top/RefTopology.cpp Replaces the ISR-based cycle simulation with linuxTimer-based timing.
Ref/CMakeLists.txt Adds subdirectory for the relocated BlockDriver code.
Ref/BlockDriver/* Renames namespaces, header guards, and class names; removes ISR functions.
Test files under Ref/BlockDriver/test Adjusts namespaces and tests to remove ISR invocation in favor of Sched usage.
Drv/BlockDriver/* Removes obsolete BlockDriver files.

@timcanham timcanham self-assigned this May 22, 2025
@timcanham timcanham added the Refactoring / Code Clarity Code clarity refactoring to ensure the code is highly-maintainable. label May 22, 2025
@timcanham timcanham requested a review from thomas-bc May 22, 2025 22:34
namespace Svc {

void LinuxTimerComponentImpl::startTimer(FwSizeType interval) {
void LinuxTimer::startTimer(FwSizeType interval) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
@timcanham
Copy link
Collaborator Author

@thomas-bc The intent is to update the bootstrap to match this.

@timcanham
Copy link
Collaborator Author

BTW, see the failures, I'll work them down one by one.

@LeStarch
Copy link
Collaborator

Thank you @timcanham !!!!

@thomas-bc
Copy link
Collaborator

Merged devel to re-trigger CI all at once

@LeStarch
Copy link
Collaborator

LeStarch commented Jun 4, 2025

@timcanham fixed the CI problems, and reviewed this PR!

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LeStarch LeStarch merged commit 719faac into nasa:devel Jun 4, 2025
47 checks passed
thomas-bc added a commit to fprime-community/fprime-system-reference that referenced this pull request Jun 4, 2025
* Removed BlockDriver

* Scrubbing references to blockDrv

* Remocing block driver from defs

* Correcting cycle

* More fixes

* signalHandler

---------

Co-authored-by: Timothy Canham <timothy.canham@jpl.nasa.gov>
Co-authored-by: M Starch <LeStarch@googlemail.com>
thomas-bc pushed a commit to nasa/fprime-tools that referenced this pull request Jun 4, 2025
* Removed BlockDriver

* Removed BlockDrv channel/packet

* Added linux to spelling expect
thomas-bc added a commit to fprime-community/fprime-tutorial-hello-world that referenced this pull request Jun 4, 2025
Co-authored-by: Timothy Canham <timothy.canham@jpl.nasa.gov>
thomas-bc added a commit to fprime-community/fprime-workshop-led-blinker that referenced this pull request Jun 4, 2025
* Remove BlockDriver

* Fixes for linuxTimer

---------

Co-authored-by: Timothy Canham <timothy.canham@jpl.nasa.gov>
thomas-bc added a commit to fprime-community/fprime-tutorial-math-component that referenced this pull request Jun 4, 2025
* Update for new BlockDriver location

* Fully removed BlockDrive

* More linuxTimer updates

* Removed blockDrv from ping entries

---------

Co-authored-by: Timothy Canham <timothy.canham@jpl.nasa.gov>
thomas-bc added a commit to nasa/fprime-examples that referenced this pull request Jun 5, 2025
* Removed BlockDriver

* Fixed ReceiveTask .start() arguments

* Use project-builder option to checkout devel

---------

Co-authored-by: Timothy Canham <timothy.canham@jpl.nasa.gov>
@thomas-bc thomas-bc added the Breaking Changes / Needs Release Notes Need to add instructions in the release notes for updates. label Aug 6, 2025
@thomas-bc
Copy link
Collaborator

Breaking Change

  • Drv.BlockDriver has been removed. Users can use a timer component to tick the RateGroupDriver instead, such as Svc.LinuxTimer. An example of such a changeset can be found here: fprime-tutorial-hello-world#46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Changes / Needs Release Notes Need to add instructions in the release notes for updates. Refactoring / Code Clarity Code clarity refactoring to ensure the code is highly-maintainable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants