20 Commits

Author SHA1 Message Date
Thomas Boyer-Chammard
578e61f1da
Format Os Module (#3959)
* Format Os module

* Add Os to format-check CI

* Remove double semi-colon
2025-07-31 15:40:30 -07:00
Vince Woo
20d1b54de4
Fix directory detection bug in Os::FileSystem::getPathType (#3727)
* Fixing directory detection bug.

* Removed some superfluous whitespace

* Adding branch path for non-directory and non-file to return PathType::OTHER. Fixing a spelling mistake.

* Moving getPathType to OS specific FileSystem implementations

* Incorporating PR comments and cleaning up comments

* Reverting unnecessary comment changes

* Incorporating fixes for static analysis findings
2025-06-16 15:22:16 -07:00
M Starch
0659f0940b
Refactored type organization (#3422)
* Refactored type organization

* Creating better configuration/types header hierarchy

* Replace FpConfig type aliases with FPP generated aliases

* Add the aliases to the FPP model

* Config + Type Aliases builds

* Renamed Fw/Types.h,hpp to Fw/FPrimeBasicTypes.h,hpp

* Updating to FPP-a7

* Adding newline

* sp

* Fixing minor nit from review

* Spurious ;

---------

Co-authored-by: Andrei Tumbar <andrei.tumbar@jpl.nasa.gov>
2025-04-03 12:11:36 -07:00
M Starch
f912e1bd75
Issue 3285 reducing signed size type in os file (#3402)
* Remove FwSignedSizeType from file

* Restoring FwSignedSizeType to seek offsets

* Fixing usages and UTs

* Fixes on Linux

* CI fix

* CI round 3

* CI rev 4

* Fixing code scan errors

* Review fixes - pt 1

* Failed to save
2025-03-28 11:47:07 -07:00
M Starch
d034786bc6
Refactor Os::Queue into CMake selection (#2895)
* Initial interface tests

* Initial working rules tests

* Moving MaxHeap to Types; Fixing minor bugs

* Basic ConditionVariables, Queue blocking, and UTs

* Queue updates for Ref

* Queue build all WIP

* UTs compile

* Passing UTs

* Removing unupdated linux queue implementations

* Fixing linux specific build issues

* Fixing task regression

* Fixing queue test memory leak

* Spelling, comments, formating, and todos

* Condition variable tests

* Minor edits from review

* Condition variable interface tests, fixes

* sp

* ci fixes

* Minor condition variable fix

* Fixing post merge issues

* Final review fixes

* Fixing FS stubs

* Fixing max heap failures

* Linux fixes

* Fixing issues w.r.t. CI
2024-09-30 12:42:50 -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
58c21418aa
Issue 2457 (#2502)
* Os::File refactor: open w/ basic stub, posix UTs

* Refactoring Os::File for all methods, less UTs

* Adding rules-based common tests

* Fixing posix file for common UTs

* Adding WriteRead and WriteReadSeek tests

* Working random tests

* Working randomized tests and stub testing

* Fixing PrmDb unit tests

* Updating files to used FwSignedSizeType

* Factoring out the synthetic file system

* Initial work on CmdSequencer UTs

* Fixing linux implementation

* Newlines at end of file

* sp

* Static analysis checks

* Changing API to use enums

* Refactoring for proper class tree

* CmdSequencer UTs - WIP

* CmdSequencer UTs work

* Adding copy constructor functionality

* Spelling and static analysis fixes

* Copy constructor/assignment operator UTs and fixes

* Initial CRC work

* Working CRC and FPP models

* Minor UT fixes

* Correcting CMake choices implementation

* MAking implementation choices real dependencies

* Fixing implementation to use source files

* Fixing posix file read/write permissions

* Allowing None implementations

* Fixed CI breakages

* Fixing MyRules.hpp formatting

* Minor CRC unit test fix

* Removing direct write support

* Changing get delegate to static method of interface

* Replacing old comments with new comments

* Fixing friend regression

* Review fixes

* Fixing serialization method usages

* Review fixes

* Fixing RPI build

* Fixing FwBuffSizeType overflow

* Fixing review comment

* Renaming FwExternalSize -> FwSizeStoreType
2024-02-28 11:25:19 -08:00
M Starch
d177bb7ef9
lestarch: update for small platform support (no U64) (#1721)
* lestarch: update for small platform support (no U64)

* first-pass at fixing types interface

* fixing U64s in merged commit

* fixing improper loop limit

* fixing FwSizeType redefinition

* fixing review comments

* formatting Linux/FileSystem

* fixing static analysis errors

* fixing UTs when file system or memory to large

* disabling broken ut and fixing spelling

* cleaning up unused variable

* adding more comments to explain casting checks
2022-12-22 18:00:24 -08:00
M Starch
b76d8c9a0c
Update/types refactor as constants (#1623)
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp

* lestarch: removing VxWorks StandardTypes from repository

* updated fprime types for correct compilation with vxworks and baremetal

* lestarch: refactoring types and configuration header w.r.t type design

* lestarch: replacing usages of AssertArg with FwAssertArgType

* lestarch: missspelled configuration

* lestarch: minor compilation fixes

* lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp

* lestarch: updating PRI tokens

* lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp

* lestarch: UT and compilation fixes for types refactor

* lestarch: sp

* lestarch: fixing RPI issues in PassiveConsoleTextLogger

* lestarch: converting RPI build to debug

* lestarch: removing duplicate config imports

* lestarch: fixing documentation

* lestarch: fixing up multiple definitions and RPI compilation problems

* lestarch: reverting debug build

* lestarch: reverting platform types to class-based constants

* lestarch: reworking basic types

* lestarch: configured types refactor into classes

* lestarch: fixing bugs with static constants in classes

* lestarch: fixing platform types spelling and documentation

* lestarch: adding include guards to types headers

Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
2022-08-18 13:25:56 -07:00
Joshua Anderson
3168f02cec Os: Convert C style casts to C++ style casts 2021-09-09 18:07:56 -07:00
Joshua Anderson
4cd74518ad
Replace usage of 80 Char String with FixLengthString (#893) 2021-08-10 12:53:38 -07:00
Josh Soref
8857fd2e38 spelling: implementation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-07 14:48:31 -05:00
jhdeerin
345b8e3250 Addressed FileManager PR comments 2020-08-05 09:40:52 -04:00
jhdeerin
a9ca73a211 Fixed append command to create new files properly; added appropriate unit tests to FileManager 2020-08-03 11:58:27 -04:00
Kevin F. Ortega
4ac5843681 added comment pointing to cleaner read-directory implementation. 2020-07-16 16:14:03 -07:00
Kevin F. Ortega
735b50116a removed. using FILE_SYSTEM_CHUNK_SIZE instead 2020-07-16 12:32:58 -07:00
Kevin F. Ortega
7691f01937 adding files for jplffs 2020-07-14 13:24:16 -07:00
Michael D Starch
02fa437829 mstarch: moving configuration files to a specified place 2020-07-13 14:35:02 -07:00
Timothy Canham
84afa1b95e Merge Autocoder/framework/Gse fixes from helicopter 2019-02-27 10:56:36 -08:00
Timothy Canham
6d9c4c2d06 Initial check-in 2017-06-16 08:25:38 -07:00