Skip to content

Release v3.4.0: FPP v2.0.0 Support!

Compare
Choose a tag to compare
@LeStarch LeStarch released this 29 Nov 00:58
· 104 commits to devel since this release
0e66d8d

Description

This release of F´, v3.4.0,  introduces several major features:

  1. Interfaces: interfaces are .fppi files that break out standard bits of functionality. This allows others to use that functionality in a new component by including that file. The new component may then drop-in for any other component implementing the interface. This means that the days of multiple components using the same model are over!
  2. FPP v2.0: FPP is updated to the v2.0.x line. The old autocoder for C++ files is no longer used, which reduces a significant amount of technical debt. Note: the older autocoder package still remains for use in dictionary generation.
  3. Documentation: much work has been done on the documentation to ensure that it links correctly, builds correctly, and is more navigable. Enjoy!
  4. CMake Restructuring: CMake's "prescan" has now been formalized into subbuilds allowing users to use this feature (and enabling the associated UTs to check that it works).

Upgrading to v3.4.0 (Breaking Changes)

This section will designate the breaking changes for this release. Users should study each subsection when upgrading to v3.4.0.

For a full example of all changes described, see: fprime-community/fprime-tutorial-math-component@5ffca10...4b89b9d

Python 3.7 Support Discontinued

Python 3.7 has reached end-of-life and as such our support of Python 3.7 has been discontinued. Users must upgrade their python installations to use Python 3.8 - Python 3.11. Python 3.12 support is being worked on but is unavailable for this release due to significant changes to the python packaging setup.

googletest is a Submodule

The Google Test framework has been made into a submodule. Users of existing projects now need to initialize sub repositories recursively.

git submodule update --init --recursive

Users who have not initialized the repository with the above command will see an error similar to the following during unit test generation. The above command will fix the problem.

-- Configuring incomplete, errors occurred!
 The source directory

   .../fprime/googletest

 does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
 .../fprime/cmake/FPrime-Code.cmake:15 (fprime_setup_included_code)
 CMakeLists.txt:12 (include)

Svc.LinuxTime Replaced By Svc.PosixTime

Svc.LinuxTime was always implementing time services for posix operating systems despite the misnomer. It has been renamed Svc.PosixTime and implements the new Svc.Time interface! To upgrade, replace the following in your topology instance definitions:

  instance linuxTime: Svc.Time base id 0x4500 \
    type "Svc::LinuxTime" \
    at "../../Svc/LinuxTime/LinuxTime.hpp"

With the new more streamlined definition:

instance posixTime: Svc.PosixTime base id 0x4500

Usages of linuxTime in your C++ code will also need to be renamed to posixTime.

Implementers of the Svc.Time model must switch to using the Svc.Time interface. This is done by:

  1. Creating a new FPP model
  2. Including the Svc.Time fppi file
  3. Ensuring the port interfaces are implemented in C++

FPP v2.0: Unit Test Changes

With the upgrade to FPP v2.0 and the new C++ generation back-end, users must update their unit tests include statements as all files are now fully named (no longer generic names like "GTestBase.hpp").

Here is a sample update. The old include names:

#include "GTestBase.hpp"

Must be replaced with the new names:

#include "SignalGenGTestBase.hpp"

Additionally, useages of the Tester class must be renamed to the qualified class. i.e. Tester -> SignalGenTester.

Users may choose to update the filenames as well, although this is not strictly required.

TcpServer Startup and Shutdown Methods Optional

Drv.TcpServer startup and shutdown methods are now optional, and will be called automatically within the read thread. Users are encouraged to remove explicit calls to these methods, but are not required to do so.

Drv.ByteStreamDriverModel Has Been Made Into an Interface

The byte stream driver model has been refined into an interface. This means that users need not instantiate it with a "type" defined somewhere else, but instead instantiate a real type that "drops in" to support a byte steam driver.

To upgrade, replace the following in your topology instance definitions:

  instance comm: Drv.ByteStreamDriverModel base id 0x4000 \
    type "Drv::TcpClient" \ # type specified to select implementor of ByteStreamDriverModel
    at "../../Drv/TcpClient/TcpClient.hpp" # location of above implementor must also be specified

With the new more streamlined definition:

instance comm: Drv.TcpClient base id 0x4500

This applies to the TcpServer as well.

Implementers of the Drv.ByteStreamDriverModel model must switch to using the Drv.ByteStreamDriverModel interface. This is done by:

  1. Creating a new FPP model
  2. Including the Drv.ByteStreamDriverModel fppi file
  3. Ensuring the port interfaces are implemented in C++

Svc.RateGroupDriver Now Accepts Offsets

The rate group driver component had a flaw where all rate groups would be invoked on the same cycle. This causes spikes in system load when all rate groups lined up. We added the ability to specify an offset such that these may be mitigated if a user chooses. However, this means the configuration block for the component has changed.

Replace the older configuration:

NATIVE_INT_TYPE rateGroupDivisors[Svc::RateGroupDriver::DIVIDER_SIZE] = {1, 2, 4};
...
    rateGroupDriverComp.configure(rateGroupDivisors, FW_NUM_ARRAY_ELEMENTS(rateGroupDivisors));

With the new configuration:

Svc::RateGroupDriver::DividerSet rateGroupDivisorsSet{{{1, 0}, {2, 0}, {4, 0}}};
...
rateGroupDriverComp.configure(rateGroupDivisorsSet);

In the above example all offsets are set to 0 to maintain the old behavior only with the new configuration interface.

What's Changed

New Contributors

Full Changelog: v3.3.2...v3.4.0