HardwareLoadout
HardwareLoadout is the value-typed record that represents one named
set of member profiles and the FTMW operating points associated with
it. A loadout records each member profile’s identity
("<Type>.<label>" — for example, "FtmwDigitizer.default" or
"AWG.frontPanel") together with the driver key the profile
carried at the time the loadout was last saved, and owns a collection
of named FtmwPreset records that capture full FTMW
configurations against that hardware selection. Loadouts are created,
stored, and switched by LoadoutManager; the user-facing
model is described in the Loadouts
chapter.
A loadout’s hardwareMap field has the same shape as the active
selection table held by RuntimeHardwareConfig: switching
loadouts replaces the active set with the loadout’s stored member
identities (after the drift-detection prompt in
RuntimeHardwareConfigDialog). The driver half of each
hardwareMap entry is denormalized — the canonical driver
lives on the profile in HardwareProfileManager — and is
used by the dialog to detect when a previously-saved member profile
has been removed or recreated under a different driver. The
ftmwPresets collection is
keyed by user-visible preset name; the reserved name __LastUsed__
identifies the per-loadout sentinel preset described under
LoadoutManager. The currentFtmwPresetName field points
at whichever preset most recently drove the FTMW configuration widget;
the active preset cannot be deleted without first switching away from
it.
FtmwPreset
FtmwPreset is the named FTMW operating point owned by a
loadout. It aggregates the four pieces of state that fully describe an
FTMW measurement:
an
RfConfigSnapshotfor the RF chain and clock frequencies,a
ChirpConfigfor the chirp waveform,an
FtmwDigitizerConfigfor the digitizer settings, andthe digitizer’s hardware key (
digiHwKey), which is used to validate that a preset is being applied against the digitizer it was captured from.
Presets cannot exist outside a loadout; their lifetime is managed
entirely by LoadoutManager. AWG sample rate is a
hardware-derived value and is reconstructed from the active AWG profile
on read rather than being stored in the preset. The user-facing model
for naming, switching, and editing presets is described in the
FTMW Presets chapter.
Persistence helpers
The BC::Loadout namespace declares the free-function helpers that
LoadoutManager uses to flatten loadout and preset structs into
SettingsStorage::SettingsMap records and to reconstruct them on
read. Two groups are exposed:
RfConfigSnapshot conversions —
rfConfigScalarsMap,rfConfigClocksArray, andrfConfigSnapshotFromMapstranslate between anRfConfigSnapshotand the scalar/array records persisted under each preset’srfScalarsandrfClockssub-groups.Hardware-map conversions —
hardwareMapArrayandhardwareMapFromArraytranslate between a loadout’shardwareMapand the array record persisted under itshardwareMapsub-group.
copyClocksMatching and copyRfScalars support the per-component
copy operations exposed by the FTMW configuration dialog tabs: they
move a subset of fields between two snapshots without touching the
remaining state. Chirp- and digitizer-side conversions are declared in
chirpconfigloadout.h and ftmwdigitizerloadout.h respectively;
they follow the same pattern but are omitted from this reference page
because their surface area is purely persistence plumbing.
The keys used by these helpers are declared in two namespaces:
extensions to BC::Store::RFC for the RF-side fields appear in the
header below, and the loadout-level key vocabulary lives in
BC::Store::LM (documented on LoadoutManager).
API Reference
-
struct HardwareLoadout
Named set of member profiles plus the FTMW presets it owns.
A
HardwareLoadoutrecords the profile identities ("<Type>.<label>") that make up a complete hardware configuration, alongside the implementation key each member profile carried at the time the loadout was last saved (a denormalized field, used for validation and drift detection — the canonical implementation lives on the profile inHardwareProfileManager). It also holds the namedFtmwPresetoperating points associated with that configuration.LoadoutManagerowns the persistent collection of loadouts; instances are passed around by value and serialized into a QSettings subtree on write.Public Members
-
QString name
User-visible loadout name (also the QSettings subgroup key).
-
std::map<QString, QString, std::less<>> hardwareMap
Member profile identities (
"<Type>.<label>") and the implementation each profile carried at save time.
-
std::map<QString, FtmwPreset, std::less<>> ftmwPresets
Named FTMW presets owned by this loadout, including the
__LastUsed__sentinel when present.
-
QString currentFtmwPresetName
Name of the preset that drives initial widget population for this loadout.
-
QDateTime lastModified
Timestamp of the most recent write to this loadout.
-
QString name
-
struct FtmwPreset
Named FTMW operating point owned by a
HardwareLoadout.An
FtmwPresetaggregates the four pieces of state that fully describe an FTMW measurement configuration: the RF chain (RfConfigSnapshot), the chirp waveform (ChirpConfig), the digitizer settings (FtmwDigitizerConfig), and the hardware key of the digitizer the settings were captured from. Presets cannot exist outside a loadout; their lifetime is managed entirely byLoadoutManager.Public Members
-
RfConfigSnapshot rfConfig
Persistable RF-chain state for the preset.
-
ChirpConfig chirpConfig
Chirp waveform definition.
-
FtmwDigitizerConfig digitizer = {""}
Digitizer configuration captured from the digitizer named by
digiHwKey.
-
QString digiHwKey
Hardware key of the digitizer profile this preset was captured from.
-
QDateTime lastModified
Timestamp of the most recent write to this preset.
-
RfConfigSnapshot rfConfig
-
namespace Loadout
Free-function helpers that convert loadout structs to and from
SettingsStorage::SettingsMaprecords.LoadoutManageruses these helpers to flattenHardwareLoadoutandFtmwPresetinstances into the scalar/array QSettings layout described in :doc:/user_guide/hardware_config/loadoutsand to reconstruct them on read. ThecopyClocksMatchingandcopyRfScalarshelpers support the per-component copy operations exposed by the FTMW configuration dialog tabs.Typedefs
-
typedef SettingsStorage::SettingsMap Map
-
using Maps = std::vector<SettingsStorage::SettingsMap>
Functions
-
SettingsStorage::SettingsMap chirpConfigScalarsMap(const ChirpConfig &cc)
-
std::vector<SettingsStorage::SettingsMap> chirpConfigSegmentsArray(const ChirpConfig &cc)
-
std::vector<SettingsStorage::SettingsMap> chirpConfigMarkersArray(const ChirpConfig &cc)
-
ChirpConfig chirpConfigFromMaps(const SettingsStorage::SettingsMap &scalars, const std::vector<SettingsStorage::SettingsMap> &segments, const std::vector<SettingsStorage::SettingsMap> &markers, double awgSampleRateSps)
-
SettingsStorage::SettingsMap digitizerScalarsMap(const FtmwDigitizerConfig &cfg)
-
std::vector<SettingsStorage::SettingsMap> digitizerAnalogArray(const FtmwDigitizerConfig &cfg)
-
std::vector<SettingsStorage::SettingsMap> digitizerDigitalArray(const FtmwDigitizerConfig &cfg)
-
FtmwDigitizerConfig ftmwDigitizerFromMaps(const QString &hwKey, const SettingsStorage::SettingsMap &scalars, const std::vector<SettingsStorage::SettingsMap> &analog, const std::vector<SettingsStorage::SettingsMap> &digital)
-
Map rfConfigScalarsMap(const RfConfigSnapshot &snap)
Flatten an
RfConfigSnapshotinto the scalar fields persisted under a preset’srfScalarsgroup.
-
Maps rfConfigClocksArray(const RfConfigSnapshot &snap)
Flatten an
RfConfigSnapshot’s clock table into the array persisted under a preset’srfClocksgroup.
-
RfConfigSnapshot rfConfigSnapshotFromMaps(const Map &scalars, const Maps &clocks)
Reconstruct an
RfConfigSnapshotfrom thescalarsmap andclocksarray read out of QSettings.
-
void copyClocksMatching(const RfConfigSnapshot &source, RfConfigSnapshot &dest, const std::set<QString> &allowedHwKeys)
Copy clock entries from
sourcetodestwhose hardware key is inallowedHwKeys.
-
void copyRfScalars(const RfConfigSnapshot &source, RfConfigSnapshot &dest)
Copy the scalar (non-clock) RF-chain fields from
sourcetodest.
-
typedef SettingsStorage::SettingsMap Map