30 Commits

Author SHA1 Message Date
Ian Brault
2b65cc83cf
Add new Fw::ConstStringBase type for strings backed by immutable string literals (#4269)
* Add new Fw::StringBase type StaticString for strings backed my immutable literals

* Spellcheck fix

* Add disclaimer comment about use of StaticString

* Refactor the StringBase interface into an immutable ConstStringBase abstract base class and the now mutable StringBase class

* Rename StaticString to ConstExternalString and inherit from ConstStringBase

* Fix typo

* Change references from StringBase to ConstStringBase where applicable

* Updates following review meeting: add missing deserialize function and add new error status, move length function implementation into ConstStringBase so it is not pure virtual

* Clang format fix

* Additional clang-format fixes

* Fix the copy-assignment operator for StringBase not being correctly evaluated

* Clang format fix

* Explicitly delete the Serializable assignment operator and provide a skeleton implementation for RawTimeInterface to appease the compiler

* Revert "Explicitly delete the Serializable assignment operator and provide a skeleton implementation for RawTimeInterface to appease the compiler"

This reverts commit 086d7bcd3ca9c4f6e553d7fc34d0d126a69a165b.

* Move ConstStringBase to separate hpp/cpp files, plus other pull request feedback

* Clang format fix

* Update length implementation for ConstStringBase and ConstExternalString

* Improved asserts in ConstExternalString constructor

Co-authored-by: Rob Bocchino <bocchino@icloud.com>

* Fixed ConstStringBase length implementation

Co-authored-by: Rob Bocchino <bocchino@icloud.com>

* Clang format fix

* Add some UTs for ConstExternalString, fix non-overridden interfaces, and fix ConstStringBase::maxLength asserting for zero capacity strings

* Spell-check fix for ConstExternalString UTs

* Revise length implementation in ConstStringBase

If the capacity is zero, return zero

* Format

---------

Co-authored-by: Ian Brault <ian.r.brault@jpl.nasa.gov>
Co-authored-by: Rob Bocchino <bocchino@icloud.com>
Co-authored-by: Rob Bocchino <bocchino@jpl.nasa.gov>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-11-07 09:50:05 -08:00
Thomas Boyer-Chammard
c69ff72110
Format Svc and add to CI (#3978)
* Format Svc and add to CI

* Fix comlogger include

* fix assert UTs

* Fix static analysis warning

* formatting
2025-08-04 16:21:47 -07:00
Justine West
be91bfadf1
Support non-default Fw type config (ie: U16, U64) (#3714)
* Add FwBaseIdType, updates ActiveLogger, CmdDispatcher, TlmPacketizer to use Fw types, update unit tests

* Update unit tests, rename FwBaseIdType to FwIdType

* Cleanup

* Change type of sizeOfZeros

* Add FwIdType to TestConfigDeployment overriden config

* Add annotation

* Update Ref linuxTimer base id
2025-06-16 16:06:36 -07:00
M Starch
58f4f96915
Remove NATIVE_INT_TYPE, NATIVE_UINT_TYPE, and POINTER_CAST from Svc (#3374)
* Remove NATIVE_* types from FileUplink

* Remove NATIVE_* types from RateGroupDriver

* Remove NATIVE_* types from ComLogger

* Addressing init function usage of NATIVE_ types

* NATIVE_ types from command dispatcher

* NATIVE_ types from ComQueue

* NATIVE_ types from CmdSplitter

* U32 -> FwOpcodeType in CmdDispatcher

* NATIVE_ types in BufferManager

* NATIVE_ types in LinuxTimer

* NATIVE_ types from BufferAccumulator and renabling UT

* NATIVE_ types from TlmChan

* NATIVE_ types from BufferRepeater

* NATIVE_ types from Active/Passive Rate Group

* NATIVE_ types from ComSplitter and ComStub

* NATIVE_ types from ActiveLogger and fixed ActiveRateGroup sdd

* NATIVE_ types from Dp*

* NATIVE_ types from FileManager and ActiveLogger (missed)

* NATIVE_ types from BufferLogger, FileDownlink, StaticMemory

* Deleting UdpSender/UdpReceiver that lack models and build config

* NATIVE_ types from Health

* NATIVE_ types from CmdSequencer

* NATIVE_ types from TlmPacketizer

* Fixing unit test issues

* POINTER_CAST from Svc

* CI fixes

* CI fixes (Linux)

* Fixing Ref/RPI for RG context

* CI (sp)

* Fixing RPI build for time conversions

* CI fixes (RPI)

* Self review comments

* Removing UDP sender/receiver config

* Review recommendations - pt 1
2025-03-17 09:58:56 -07:00
M Starch
ec08d43dd3
Removes NATIVE_INT_TYPE, NATIVE_UINT_TYPE, and POINTER_CAST from Fw (#3286)
* NATIVE_INT_TYPE use in toString

* NATIVE_INT_TYPE use in SimpleObjRegistry

* NATIVE_INT_TYPE use in Asserts

* NATIVE_INT_TYPE use in Fw/Comp

* NATIVE_INT_TYPE use in getCapacity

* NATIVE_INT_TYPE use in getEntries

* NATIVE_INT_TYPE use in size/length

* NATIVE_INT_TYPE use in FILE_NAME_ARG

* NATIVE_INT_TYPE use in Fw (misc)

* NATIVE_INT_TYPE use in identifier

* NATIVE_INT_TYPE use in Fw (misc II)

* POINTER_CAST in Buffer

* POINTER_CAST in Serializable

* sp

* Removing no longer used DefaultTypes.hpp

* Fixes to accomidate Fw refactor

* Unit-test and CI fixes

* Fixing review comments - pt 1
2025-03-04 14:42:48 -08:00
M Starch
a5c853b9cf
NATIVE_INT_TYPE portNum to FwIndexType portNum (#3236) 2025-02-14 12:25:12 -08:00
M Starch
a049743e07
Removing component init() functions where unneeded (#2893)
* Removing component init() functions where unneeded

* Removing spurious assert
2024-09-23 18:39:00 -07:00
Zimri Leisher
b0716ad605
Add sequence dispatcher component (#2731)
* Add sequence dispatcher component

* Add seq start port to cmd sequencer

* Update author names and some include paths

* Get fully compiling, move consts/enums to correct places, check for connections on init

* Add spelling exceptions

* Get unit tests almost compiling...

* Fix string type in port, call component init in test

* Fix unit test compilation errors and assertions

* Switch back to using StringBase

* Switch to FwIndexType, remove textLogIn

* UpperCamel events, add warning for unexpected seq start

* remove init method, add check for connected to getNextAvailableIdx

* Update sdd, change event from low to high, static cast a portnum

* Add state diagram, add more warnings, fix wrong header types, use assert instead of warning for runSeq

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2024-09-17 17:55:09 -07:00
Rob Bocchino
cdac751845
Make single-argument string constructors explicit (#2707)
* Revise Linux platform types

* Fix regression in test autocoder

TimeBaseStoreType is not the same as TimeBase

* Revise test autocoder

Cast to the TimeBaseStore type with a known size

* Revise test autocoder

Remove unnecessary const casting

* Fix integer type mismatch in ComQueue

* Update fpp version

* Update fpp version

* Revise DpWriter unit tests

Remove manually written functions
Use new autocode in tester base

* Update fpp version

* Update fpp version

* Revise DpTest

Add check for priority set by dpGet

* Reivse StringType; add ExternalString

* Revise dp test

* Revise dp test; update fpp version

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise dp test

* Revise fpp version

* Update fpp version

* Revise ExternalString

* Reformat Fw/Serializable.{hpp,cpp}

* Reformat StringType.{hpp,cpp}

* Revise StringBase

* Update fpp version

* Remove trailing space

* Reformat code

* Revise dp test

* Reformat cpp and hpp files in Fw/Types

* Revise string types

* Revise string types

* Revise string types

* Remove EightyCharString

* Revise CmdString

* Revise LogString

* Revise PrmString

* Revise TextLogString

* Revise Test/String

* Revise TlmString

* Revise InternalInterfaceString

* Revise Os/QueueString

* Revise Os/TaskString

* Add missing type qualifier

* Fix warning in String.hpp

* Revise string types

* Remove stray character

* Revise StringBase

* Revise string types

* Revise String type

* Revise FileNameString

* Revise string types

* Add missing file

* Revise InternalInterfaceString

* Revise comment

* Revise TlmString

* Revise string types

* Revise log strings

* Revise PrmString

* Revise Os string classes

* Revise string types

* Revise string types

* Revise os strings

* Add test for ExternalString to TypesTest

* Revise ExternalString

* Revise ExternalString

* Update fpp version

* Format Fw/Types

* Add static serialized size to StringBase

* Update fpp version

* Update fpp version; revise string classes

* Revise event handling in DpWriter

* Revise string implementations

* Revise string implementations

* Refactor dp tests

* Add static assertion to PrmBuffer

For safety's sake!

* Revise string implementations; update fpp version

* Revise StringBase

Existing code was correct but somewhat terse and obscure
Refactor and add comments for clarity

* Fix tests to conform to FPP changes

* Remove helper scripts

* Add const qualifier

* Revise StringBase

* Revise StringBase

* Revise comment

* Update fpp version

* Fix code formatting

* Make constructors explicit

* Make string constructors explicit

* Make string constructors explicit

* Revise String.hpp

Remove explicit from char* constructor
The autocoder depends on the implicit constructor

* Fixing improper null-termination in fail case

* Fixing conversion warnings

* Removing broken link

---------

Co-authored-by: M Starch <LeStarch@googlemail.com>
Co-authored-by: Michael D Starch <Michael.D.Starch@jpl.nasa.gov>
2024-04-30 11:28:39 -07:00
M Starch
656514451d lestarch: merging devel into v3.0.0 2021-12-07 17:20:45 -08:00
Saba Janamian
5ff671dbe6
Added sequence join wait command (#1084)
* saba-ja: added join_wait cmd

* saba-ja: added UT

* saba-ja: fixed comment title

* saba-ja: making spell checker happy

* saba-ja: fixed m_join_wait cancel logic
2021-11-16 12:13:38 -08:00
bocchino
a10d260a74 Merge branch 'release/v3.0.0' into pass-by 2021-09-28 13:29:51 -07:00
M Starch
052bbdb8c0
lestarch: merged latest nasa/devel (#964)
* lestarch: merged latest nasa/devel

* lestarch: fixing coverage on macOs

* lestarch: correcting UTs for merging latest devel

* lestarch: integration tests

* lestarch: build error correction
2021-08-25 18:50:45 -07:00
Joshua Anderson
9c4f2cc6c8
Backport 80char replacement (#923)
* Backport replacement of EightyCharacterString with Fw::String

* Remove test usage of 80 charater strings
2021-08-20 16:05:52 -07:00
rohandkn
8e02596d4e
Merge branch 'pass-by-logic' into release/v3.0.0 2021-08-20 14:09:25 -05:00
rohandkn
666b297ee8 Removed all pass_by values and fixed all tests 2021-08-16 13:07:50 -05:00
Timothy Canham
73c0abd142 Header/const/name macro updates 2021-08-12 10:06:21 -07:00
Joshua Anderson
4cd74518ad
Replace usage of 80 Char String with FixLengthString (#893) 2021-08-10 12:53:38 -07:00
Joshua Anderson
1b9c785ce6
Remove void from parameterless functions (#811) 2021-07-14 12:54:01 -07:00
bocchino
1d98c13739 Revise Cmd Sequencer
Refactor types
Add changed symbols
2021-06-22 18:43:00 -07:00
bocchino
6354acb115 Revise CmdSequencer
Remove SeqMode inline enum
2021-06-16 15:40:26 -07:00
Timothy Canham
a6a5d86eca Copy from heli 2021-06-15 15:48:47 -07:00
bocchino
4fd9627965 Rename CommandResponse to CmdResponse 2021-06-02 20:47:07 -07:00
bocchino
fd0f278597 Revise command response port
Replace inline enum with XML enum type
Generate XML from FPP
Revise uses to match
2021-01-21 11:08:59 -08:00
Joshua Anderson
3cccd731d9
Refactor FW_OBJECT_NAMES switches and fix building without object names
Instead of adding the name argument to a constructor when FW_OBJECT_NAMES
is enabled, always supply a name argument.

Add a marco that conditionally sets the name to "" if FW_OBJECT_NAMES is not set.
This cleans up a lot of the conditional compilation switches that weren't being tested
and would silently break, while still stripping the strings from the binary.
2020-10-07 17:19:05 -07:00
Timothy Canham
5fd3749c2b Updated logic for changeable buffer size from allocator 2020-03-27 12:32:33 -07:00
Michael D Starch
136af07edd mstarch: more header cleaning for issue: #189 2019-04-18 14:12:02 -07:00
Robert L. Bocchino Jr
db6be3acea Revise command sequencer
Update copyright notices in comments
2018-04-08 16:23:45 -07:00
Robert L. Bocchino Jr
75933997ba Revise command sequencer
Refactor command sequencer into generic and format-specific parts
Add support for AMPCS format
Revise unit tests to support multiple formats
Add AMPCS tests
2018-04-08 16:19:48 -07:00
Timothy Canham
6d9c4c2d06 Initial check-in 2017-06-16 08:25:38 -07:00