Skip to content

v4.1.0

Latest

Choose a tag to compare

@LeStarch LeStarch released this 03 Dec 20:26
· 3 commits to devel since this release
6c80056

New Features

  • FPP dictionary specifiers
  • Shared flight/ground configuration
  • Aligned memory support in Fw::MemAllocator
  • Time-limited event throttling
  • Little-endian serialization interfaces
  • Upgrade to C++14
  • Secondary-file loading in the Parameter Database

Breaking Changes

  1. Configuration Changes
  2. User Changes
  3. OSAL Interface Changes
  4. Driver Interface Changes
  5. Misc Interface Changes
  6. Optional Changes

Configuration Changes

Users with custom config in their project need to understand these changes:

  1. FpConfig.h Break-Up
  2. New Configuration Files

FpConfig.h Break-Up

Many FpConfig.h's constants were needed in the model and have been moved into .fpp model files FpConfig.fpp, FpConstants.fpp, and PlatformCfg.fpp.

Warning

Users shipping custom FpConfig.h as of v4.0.0 must update to these new files.

New Configuration Files

  1. config/MemoryAllocation.hpp
  2. config/ActiveTextLoggerCfg.hpp
  3. config/FileManagerConfig.hpp
  4. config/PassiveTextLoggerCfg.hpp

config/MemoryAllocation.hpp

We've added configuration for a new default memory allocator. This is used by clients of Fw::MemAllocatorRegistry calling getAnAllocator() when no appropriate allocator has been defined.

config/MemoryAllocation.hpp

+using DefaultMemoryAllocatorType = Fw::MallocAllocator;

Users wanting a different default (other than MallocAllocator) should override this definition.

config/ActiveTextLoggerCfg.hpp and config/PassiveTextLoggerCfg.hpp

These files control the number of filter slots for these componnets.

config/FileManagerConfig.hpp

User Changes

Standard projects should update to the following changes:

  1. Linux Timer Interface Takes Fw::TimeInterval
  2. Tester Component Deinitialization

Linux Timer Interface Takes Fw::TimeInterval

LinuxTimer has been updated to tak Fw::TimeInterval(seconds, microseconds); instead of an integer number of milliseconds.

- linuxTimer.startTimer(milliseconds);
+ Fw::TimeInterval(milliseconds/1000, (milliseconds % 1000) * 1000);
+ linuxTimer.startTimer(interval);

Tester Component Deinitialization

Queued and Active components now have a deinit() function used to clean-up memory/resource allocation. Unit Tests run under leak checking will produce memory leak warnings. To fix this, add this->component.deinit() to the Tester destructor.

- ComponentTester::~ComponentTester() {}
+ ComponentTester::~ComponentTester() {
+     this->component.deinit();
+ }

OSAL Interface Changes

Developers shipping custom OSAL implementations must update to meet these interface changes:

  1. Os::QueueInterface Changes

Os::QueueInterface Changes

The Os::QueueInterface has had three changes that implementers must update to support.

  1. StringBase has been changed to ConstStringBase in the create method
  2. Queues are now supplied an id via the create method for use in potential allocation
  3. Queues should now define a teardown method for use in resource clean-up

Os::QueueInterface implementers should update to support both of these changes.

-QueueInterface::Status create(const Fw::StringBase& name, FwSizeType depth, FwSizeType messageSize);
+QueueInterface::Status create(FwEnumStoreType id, const Fw::ConstStringBase& name, FwSizeType depth, FwSizeType messageSize);
+ void teardown();

Driver Interface Changes

Implementers of driver interfaces found in Drv/Interfaces should meet these following changes:

  1. SPI Interface Changes

SPI Interface Changes

The former SPI interface did not support returning a status, which meant that the calling component was blind to problems arising within SPI. The interface now specifies a new WriteRead port that includes a status. Implementers of SPI components must add this port to their components.

//! Handler implementation for SpiWriteRead
//!
SpiStatus SpiWriteRead_handler(const FwIndexType portNum, /*!< The port number*/
                               Fw::Buffer& WriteBuffer,
                               Fw::Buffer& readBuffer);

We recommend deprecating the old void function as well.

Misc Interface Changes

There are a few changes to misc interfaces in F Prime. Developers to those interfaces must update:

  1. Fw::MemAllocator Requires Alignment
  2. Hand-Coded Serializables Require Endianness

Fw::MemAllocator Requires Alignment

Developers of custom Fw::MemAllocator objects must now support the alignment parameter. Alignment communicates the minimum Byte alignment for the object being allocated. Returned void* allocations must guarantee this alignment.

-void* allocate(const FwEnumStoreType identifier, FwSizeType& size, bool& recoverable);
+void* allocate(const FwEnumStoreType identifier, FwSizeType& size, bool& recoverable, FwSizeType alignment);

Hand-Coded Serializables Require Endianness

F Prime now supports a mode flag to serialization that communicates the desired endianness. This was done to better support external libraries, technologies, and products that use little endian format. Hand-coded serializables should update to accept this new parameter.

This affects both the serializeTo and deserializeFrom function.

-Fw::SerializeStatus Buffer::serializeTo(Fw::SerializeBufferBase& buffer) const;
+Fw::SerializeStatus serializeTo(Fw::SerialBufferBase& buffer, Fw::Endianness mode) const;
-Fw::SerializeStatus Buffer::deserializeFrom(Fw::SerializeBufferBase& buffer);
+Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase& buffer, Fw::Endianness mode);

Optional Changes

There are several optional changes. Users should consider these changes.

  1. Task Priorities
  2. serialize and deserialize Deprecated

Task Priorities

Subtopology and Ref priorities have been updated to better reflect Linux priority space. Users should consider their own priorities and ajust accordingly.

serialize and deserialize Deprecated

serialize and deserialize methods were renamed in v4.0.0 to serializeTo, serializeFrom, deserializeTo, and deserializeFrom. We have now DEPRECATED these serialize and deserialize functions. Users should update as these will now produce compiler warnings and will be removed in future releases.

Feature Descriptions

FPP dictionary Specifiers

FPP now supports the dictionary specifier, allowing developers to annotate model elements for inclusion in generated JSON dictionaries. This feature allows developers to extend flight/ground tooling.

Shared Flight/Ground Configuration

F´ introduces unified configuration between flight and ground (fprime-gds). This significantly reduces duplication, improves consistency, and centralizes configuration.

Aligned Memory Support in Fw::MemAllocator

Fw::MemAllocator now supports aligned allocation, allowing components and platform adapters to request memory with specific alignment boundaries.

Time-Limited Event Throttling

A new throttling policy allows events to be rate-limited over a configurable time window. Rather than suppressing events indefinitely, the system now restores visibility after the throttle period elapses.

Little-Endian Serialization Interfaces

F´ adds explicit support for little-endian serialization paths. This allows users to leverage F Prime serialization for external interfaces.

Upgrade to C++14

The framework, libraries, and autocoders now require and fully support C++14. This enables safer and more expressive language features for more reliable software.

Secondary-File Loading for the Parameter Database

Svc::PrmDb now supports loading parameters from a secondary file.

Commits

New Contributors

Full Changelog: v4.0.0...v4.1.0