10 Commits

Author SHA1 Message Date
Thomas Boyer-Chammard
ba65039fff
Finish code formatting (#4134) 2025-09-10 15:02:07 -07:00
Moises Mata
268e168f23
Restructure core subtopologies and add Svc_Subtopologies target (#3904)
* Modify Com/Ccsds/Fprime ComDriverConfig & TopologyDefs for easier ComDriver config

* Fix BaseID collision

* Removed restrict platform, UART/TCP driver configs different files, CMake switch depending on FPRIME_HAS_SOCKETS

* Add Exclude_FROM_ALL to all subtopology cmake modules

* remove exclude from ComCcsds (needed for Ref)

* Remove exclude from all for testing

* Exclude_from_all only on comLoggerTee, comFprime (not used in Ref)

* Added Svc_Subtopologies target

* Use add_custom_target, spelling fix

* Add Configs to Svc_Subtopologies target

* Removed comDriver as instance within subtopologies, now within project topology

* Take out cmdSeq from ComSubtopologies, put in FileHandling

* Added Subtopology States for all, common pattern users can follow

* Fix Extra newline

* Moved Phased comDriver code into RefTopology.cpp

* Update metadata

check-spelling run (pull_request_target) for subtopology-config-phasing-updates

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Fixed call to default stack size

* Moved cmdSeq from FileHandling subtopology to Ref Root Topology

* Fix integration test

* Remove unneeded Os includes in RefTopology.cpp

* Fix BaseIds

* Add comment for BaseIDs, comDriver configuration order fix

* Restructure of enums within Com Subtopologies

* Correct include for ComCcsds enum headers

* Using namespace syntax change

* Fix BaseIds

* Update metadata

check-spelling run (pull_request_target) for subtopology-config-phasing-updates

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Remove unneeded Dependency

* Add enum at the top

* Fix RefTopology.cpp

* Update Comment

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Moises Mata <moisesmata@users.noreply.github.com>
2025-07-30 10:25:29 -07:00
Moises Mata
d69b7a10d1
Add Core Subtopologies: ComFprime, ComCcsds, DataProducts, FileHandling (#3768)
* Added led-blinker workflow for aarch64-linux platform

* Update runner label

* Added Tags to RPI self hosted workflows, sparse-checkout-cone-mode false

* Add subtopologies to Svc/ restructing of Ref to include CDH subtopology

* CDHCore Subtopology added under Svc and integrated into Ref

* Health instance within CDHCore references CDHCoreConfig for queue size

* Update metadata

check-spelling run (push) for add-subtopologies

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Added AssertFatalAdapter Version PassiveTextLogger to Subtopology, config clarity improvements

* Comms subtopology without cmdSeq created, integrated in Ref

* Added cmdSeq to Comms Subtopology, integrated into Ref

* Add FileHandling Subtopology, initial structure

* Fixed Spelling, Flie -> File

* Update metadata

check-spelling run (push) for add-subtopologies

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Added working FileHandling, DataProducts subtopology, integrated into Ref

* prmDb part of FileHandling, fatalHandler part of CDHCore

* Update metadata

check-spelling run (push) for add-subtopologies

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Update comment for clarity

* Initial move to phasing components

* Fixing Phasing: Adding initial Phasing for CDHCore, DataProducts, FileHandling

* Renaming topologydefs.hpp, phasing fully working on all four subtopologies, needs cleaning up

* Cleanup with Ports_ComPacketQueue, definition only in Comms.fpp now

* Base project with all 4 subtopologies, integrated into Ref, and passing CI

* Initial Commit with all Subtopologies in Svc/Subtopologies

* Added posixtime back in to Ref Deployment (Accidentally Deleted)

* Updates to match new subtopology structure, integrate CCSDS into Ref

* Changes to CommCCSDS that go with last changes

* Standardize subtopology structure and naming to PascalCase

* Namespace fixe for ComFprime

* CDHCore->Cdhcore for consistency

* Rename CDHCore to CdhCore for consistency

* Update metadata

check-spelling run (pull_request_target) for add-subtopologies

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Reorder on teardown phases for Com Subtopolgies

* Cpp check style fix

* Fix: Add missing tearDownComponents cleanup for DataProducts dpBufferManager

* Delete old comments, test using same mallocator for all subtopologies

* fix: Deallocated DataProducts BufferMgr

* Fix DataProducts subtopology memory cleanup

* Fix: Dataproducts subtopology teardown order

* Added tearDownComponents(state)

* Consolidate all cleanup to teardowncomponents

* Fix memory leaks: restore teardown phases

* Removal of redundant teardowncomponents()

* Revert "Removal of redundant teardowncomponents()"

This reverts commit 29d4ff8242574f1afc1bb6aacdf5cfef4d79987d.

* Fix formatting, remove commented out code

* Swap hardcoded numbers to config constants in subtopologies

* register_fprime_config() in config modules, isolated ComDriver into a separate config fpp file

* Added explicit CMake Module Names and Depends between Subtopologies and their Configs

* Fixed CCSDS case, more config constants

* Added explicit depends for each subtopology config

* added mallocator config, subtopology state structure

* Update subtopology config names for clarity, fixes #3571

* Fix reference to dpBuffer config Constants

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Moises Mata <moisesmata@users.noreply.github.com>
2025-06-26 15:00:57 -07:00
Timothy Canham
719faac6f2
Move BlockDriver to Ref example (#3651)
* Moved BlockDrv to Ref

* Fixed unit tests

* Updated LinuxTimer component name

* Fixed unit tests

* Re-removed LinuxTimerImpl.hpp

* Fixed a bunch of doc references to Drv/BlockDriver

* Spelling fix

* Added linux to spelling expect

* Doc fixes, have Svc/LinuxTimer use tick interface

* Added to change log

---------

Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
2025-06-04 10:38:29 -07:00
Rob Bocchino
da11b3a7c5
Improve warning flags in builds (#3319)
* Update fpp version

Add more warnings to FppTest

* Update fpp version

Add warnings to build

* Enable warnings in unit tests

Fix warnings

* Clean up test code

* Update fpp version

Remove workarounds in unit test builds

* Update fpp version

Fix warnings

* Revise DpManager tests

Remove conversion warnings

* Revise DpWriter tests

Remove conversion warnings

* Refactor Hash

Provide a size type to remove dependencies on NATIVE_INT_TYPE,
which is going away.

* Revise top-level CMakeLists.txt

* Fix warnings in Ref

* Fix warnings in Ref, RPI

* Revise warning flags

* Revise code to eliminate warnings

* Revise code to fix warnings

* Revise code to fix warnings

* Revise code to fix warnings

* Revise Serializable.cpp

* Revise Serializable.cpp

* Revise warning flags

* Fix warnings in test code

* Fix warnings

* Fix warnings

* Fix warnings and static analysis errors

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Turn off -Wshadow for unit tests

* Revise comments

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Fix warnings

* Enable -Wshadow for main ut builds

* Revise compile options

* Remove commented-out code

* Update STest

Eliminate warnings

* Fix warning

* Fix warnings

* Fix warning

* Fix warning

* Fix warning

* Revise comments

* Revise static cast expression

* Cast return type to void

* Remove unneeded cast

* Fix warnings that appear on the F Prime dev machine

* Fix more warnings

* Enable more warnings

* Update fpp version

* Remove commented-out compiler flags

* Enable warning flag in CmdDispatcher

* Disable -Wconversion in gtest

* Revise compiler warning flags

* Revise compiler options

* Revise compiler flags

* Revise compiler flags

* Revise compiler flags

* Revise compiler flags

* Revise Buffer

* Fix comments

* Fix warning flags

* Fix compiler warning flags

* Fix compiler warnings

* Fix compiler warning flags

* Fix compiler warnings

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Fix compiler warning flags

* Revise compiler warning flags

* Restore deleted test

* Fixing UT_TARGET collision

---------

Co-authored-by: Robert L Bocchino <bocchino@fprime-fsw-0.jpl.nasa.gov>
Co-authored-by: Michael D Starch <Michael.D.Starch@jpl.nasa.gov>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-03-12 12:04:43 -07:00
Thomas Boyer-Chammard
564cb5773b
Add Os::RawTime OSAL implementation, refactor Os::IntervalTimer (#2923)
* Add Os::RawTime and preliminary rule-based tests

* Implement Stubs and stub tests tests + misc improvements

* Update delay functions to use Fw::TimeInterval instead of Fw::Time

* Replace TimerVal with Os::RawTime FPP type, SERIALIZED_SIZE fixed to 2*sizeof(U32)

* Fix spelling and legacy code

* Fix test import

* Remove TimerVal files and misc clean up

* Add Fw/Time as dependency of Os module

* Fix include guards

* Fix default constructors and missing getHandle stub

* Add Handle and Serialization size to FpConfig, refactor interface for less vtable calls, refactor IntervalTimer

* Fixes for new OS CMake API

* Add RawTime FPP Model

* Rename getRawTime to now(), better error handling, added docs for all functions

* Correct handle size, spelling, and more robust test IntervalTimer test

* Peer review changes

* Move `Os.RawTime` to `Os/Types.fpp`

* Fix unused variable

* Fix spelling and comments

* spelling extravaganza

* Update metadata

check-spelling run (pull_request_target) for os-interval-timer

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Reference based approach to minuend and subtrahend

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Thomas Boyer-Chammard <thomas-bc@users.noreply.github.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2024-10-14 10:06:45 -07:00
Thomas Boyer-Chammard
d6ebdff460
Refactor Os::FileSystem and Os::Directory (#2871)
* Add FileSystem Interface

* Add OS::FileSystem interface and implementations

* static interface + global Os::init()

* Add test harness

* Implement Os::Directory interfaces and use it in FileSystem::readDirectory

* Add Stub tests for Directory and FileSystem

* wip: modify the interface from Michael feedback

* wip: move functions around and rework interface a little more

* Add Directory rule-based tests

* Refactored Directory for open-create + WIP: FileSystem tests

* Update state tracking mechanism in FileSystem test implementation + add RandomizedTesting

* Replace bounded while-loop with for-loop

* Code cleanup

* fix typo

* Rename FileTracker and code reorganization / clarification

* Code style and add CWD rule

* Clean up tester code

* More cleanup

* Add Posix tests to Os_ut_exe

* Fix DpCatalog readDirectory usage

* Appease CI checks

* Spelling and CI warnings

* Spelling + removing FppConstants include

* Add review changes and todos

* Add Directory::read(Fw::StringBase&) overload

* Refactor copyFileData to iterate over copied size

* Remove FppConstants.hpp include

* Rework moveFile into rename/copy-remove

* Add majestic comments

* Add option to error if dir exist in Fs::createDirectory

* spelling

* include <algorithm> for std::find in tests

* Fix leftover ::CREATE modes in comments and stub tests

* Fix CmdSequencer test case

* Fix memory leak in testing by conditioning the Open rule

* Fix FileManager tests

* Add Directory and FileSystem FPP type definitions; update CMakeLists and clean up comments

* spelling

* Reoder header guards

* Implement changes from peer-review

* read into StringBase with const_cast

* Fix resetSer() call

* Fix spelling

* fix spelling again i guess

* Fix DpCatalog unchecked return value
2024-09-27 09:15:21 -07:00
M Starch
7159e7e347
Implements #2723: Adds Os::Console to replace Os::Log (#2831)
* Initial logging refactor - WIP

* Removing LogAssert as it is not used

* Working on Fw::Logger rewrite

* Initial Os::Console refactor

* Fixing Fw::Logger unit tests

* Fixing up UT build

* Adding Os::Stub::Console implementation

* Added interface UTs

* Adding posix console tests

* Fixing Linux errors

* Spelling

* Initial review requests

* Fixing RPI build issues

* Fixing codeql errors

* Fixing code QL

* Validating 'message' parameter
2024-08-15 18:53:36 -07:00
M Starch
640cf44c80
Os task refactor issue 2526 (#2672)
* Task refactor WIP -- compiles, but does not link

* Adding isCooperative method - WIP

* more WIP

* Initial Os::Posix::Task implementaion

* Adding makeDelegate functions; Fixing existing UTs

* Touching up comments

* Fixing Linux issues

* Adding type_traits import

* Removing TaskId and reworking handle storage

* Do not need to assert that a reference is not nullptr; compiler will get angry

* Starting UT development

* Start test works

* Working start and join rules; random test

* Adding state, delay, and count tests

* Adding stub interface tests

* sp

* Registry tests

* Fixing UTs

* Fixing PTHREAD_MIN_STACK for linux

* Missing newlines

* Fixing GPIO driver's task

* More build fixes

* Fixes for CI

* Correcting errors in GNU only code

* Fixing review comments

* Fixing sp

* Fixing RPI (again)

* Removing divergent open rules from interface testing. Fixes #2733

* Fixing review comments

---------

Co-authored-by: Kevin F. Ortega <kevin.f.ortega@jpl.nasa.gov>
2024-05-22 16:38:18 -07:00
M Starch
ab38283287
lestarch: updating Ref app to remove phases (#1748)
* lestarch: updating Ref app to remove phases

* lestarch: fixing CI errors

* lestarch: sp

* lestarch: fixing review comments and formatting code

* lestarch: renaming ambiguous files

* lestarch: sp
2022-11-07 17:19:30 -08:00