![]() |
NDEVR
API Documentation
|
The central manager for GPS sensors in the application, handling sensor lifecycle, connection management, quality settings, and INI persistence. More...
Public Member Functions | |
| MainGPSManager () | |
| Constructs the main GPS manager. | |
| void | activeGNSSSensorChangedSignal (UUID active_id) |
| Emitted when the active GNSS sensor changes for a role. | |
| ActiveGPSSensor * | activeSensor (UUID active_id) const |
| Returns the active sensor descriptor for the given role UUID. | |
| virtual Buffer< PositionSensor * > | availableGNSSDevices () const override |
| Returns all available GNSS devices. | |
| TranslatedString | connectionName (GPSSensor *sensor) const |
| Returns the display name of the connection for the given sensor. | |
| String | connectionString (GPSSensor *sensor) const |
| Returns the connection string for the given sensor. | |
| ActiveGPSSensor * | createActiveGPSSensor (ConnectionInfo connection_info) |
| Creates an active GPS sensor from a connection. | |
| ActiveGPSSensor * | createActiveGPSSensor (const File &file) |
| Creates an active GPS sensor from a file source. | |
| void | finishReadingINI (INIFactory &factory) override |
| Completes reading settings from an INI factory. | |
| PositionSensor * | getGNSSDevice (const UUID &id) override |
| Returns the GNSS device with the given UUID. | |
| virtual void | getINI (INIFactory &factory) override |
| Serializes settings to an INI factory. | |
| bool | hasActiveSensor (UUID active_id) const |
| Checks whether a sensor with the given role UUID is active. | |
| InfoPipe * | log () const |
| Returns the log info pipe. | |
| const GNSSQualitySettings & | orientationQualitySettings (GNSSQuality quality) const |
| Returns orientation quality settings for the given quality level. | |
| const GNSSQualitySettings & | positionQualitySettings (GNSSQuality quality) const |
| Returns position quality settings for the given quality level. | |
| void | setActiveSensor (UUID active_id, const ConnectionInfo &connection) |
| Registers an active sensor by UUID and connection info. | |
| void | setActiveSensor (UUID active_id, QPointer< GPSSensor > gps) |
| Registers an active sensor by UUID and sensor pointer. | |
| void | setInfoPipe (InfoPipe *info) |
| Sets the info pipe for log output. | |
| void | setOrientationQualitySettings (GNSSQuality quality, const GNSSQualitySettings &settings) |
| Sets orientation quality settings for the given quality level. | |
| void | setPositionQualitySettings (GNSSQuality quality, const GNSSQualitySettings &settings) |
| Sets position quality settings for the given quality level. | |
| void | settingsModifiedSignal () |
| Emitted when GNSS settings are modified. | |
| void | setToDefaults () |
| Resets all quality settings to their defaults. | |
| bool | shouldAutoConnect (GPSSensor *gps) const |
| Returns whether the given sensor should auto-connect. | |
| UUID | uuid () const override |
| Returns the unique identifier for this manager. | |
| Public Member Functions inherited from INIInterface | |
| INIInterface () | |
| Constructs an INIInterface with no default INI file. | |
| INIInterface (const File &default_ini) | |
| Constructs an INIInterface with the specified default INI file. | |
| virtual | ~INIInterface () |
| Virtual destructor for safe polymorphic cleanup. | |
| virtual void | prepareForINI (INIFactory &) |
| Called before reading or writing an INI file. | |
| virtual bool | readINIOptions () |
| Reads INI options from the default INI file. | |
| virtual bool | readINIOptions (File &ini_file) |
| Reads INI options from the specified INI file. | |
| virtual bool | saveINIOptions (bool multithead=false) |
| Saves INI options to the default INI file. | |
| virtual bool | saveINIOptions (File &ini_file, bool multithead=false) |
| Saves INI options to the specified INI file. | |
| void | setDefaultINIFile (const File &file) |
| Sets the default INI file path used for reading and writing options. | |
| virtual void | writeToLog (const StringView &title, LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log with a title. | |
| virtual void | writeToLog (LogPtr log, uint01 log_level=2U) |
| Writes the current INI options to the specified log. | |
Static Public Member Functions | |
| static RGBColor | ConstellationToColor (GNSSConstellation constellation_type) |
| Returns the display color for a given satellite constellation type. | |
| static MainGPSManager & | DefaultInstance () |
| Returns the global singleton instance. | |
| static RGBColor | SNRToColor (fltp08 srn) |
| Converts a signal-to-noise ratio to a display color. | |
Static Public Attributes | |
| static ApplicationOption< bool > | autoconnect_gnss_device |
| Whether to auto-connect GNSS on startup. | |
| static ApplicationOption< bool > | log_raw_nmea_streams |
| Whether to log raw NMEA data streams. | |
| static ApplicationOption< bool > | use_single_gnss_device |
| Whether to enforce a single GNSS device. | |
Protected Attributes | |
| Dictionary< UUID, ActiveGPSSensor * > | m_gps_definitions |
| Maps role UUIDs to active sensor descriptors. | |
| Dictionary< String, ActiveGPSSensor * > | m_gps_sensors |
| Maps connection strings to active sensor descriptors. | |
| UUID | m_id |
| This manager's unique identifier. | |
| InfoPipe * | m_log = nullptr |
| The log info pipe. | |
| GNSSQualitySettings | m_orientation_quality_settings [cast< uint04 >(GNSSQuality::e_size)] |
| Orientation quality settings array indexed by GNSSQuality. | |
| GNSSQualitySettings | m_position_quality_settings [cast< uint04 >(GNSSQuality::e_size)] |
| Position quality settings array indexed by GNSSQuality. | |
| Protected Attributes inherited from INIInterface | |
| File | m_default_ini |
| The default file path used for reading and writing INI options. | |
The central manager for GPS sensors in the application, handling sensor lifecycle, connection management, quality settings, and INI persistence.
Definition at line 35 of file MainGPSManager.h.
| void MainGPSManager::activeGNSSSensorChangedSignal | ( | UUID | active_id | ) |
Emitted when the active GNSS sensor changes for a role.
| [in] | active_id | The role UUID that changed. |
| ActiveGPSSensor * MainGPSManager::activeSensor | ( | UUID | active_id | ) | const |
|
overridevirtual |
Returns all available GNSS devices.
Implements GNSSInterface.
| TranslatedString MainGPSManager::connectionName | ( | GPSSensor * | sensor | ) | const |
Returns the display name of the connection for the given sensor.
| [in] | sensor | The GPS sensor. |
Returns the connection string for the given sensor.
| [in] | sensor | The GPS sensor. |
|
static |
Returns the display color for a given satellite constellation type.
| [in] | constellation_type | The constellation type. |
| ActiveGPSSensor * MainGPSManager::createActiveGPSSensor | ( | ConnectionInfo | connection_info | ) |
Creates an active GPS sensor from a connection.
| [in] | connection_info | The connection parameters. |
| ActiveGPSSensor * MainGPSManager::createActiveGPSSensor | ( | const File & | file | ) |
Creates an active GPS sensor from a file source.
| [in] | file | The GPS data file. |
|
static |
Returns the global singleton instance.
References MainGPSManager().
|
overridevirtual |
Completes reading settings from an INI factory.
| [in] | factory | The INI factory to read from. |
Reimplemented from INIInterface.
|
overridevirtual |
Returns the GNSS device with the given UUID.
| [in] | id | The device UUID. |
Implements GNSSInterface.
|
overridevirtual |
Serializes settings to an INI factory.
| [in] | factory | The INI factory to write to. |
Implements INIInterface.
| bool MainGPSManager::hasActiveSensor | ( | UUID | active_id | ) | const |
| InfoPipe * MainGPSManager::log | ( | ) | const |
Returns the log info pipe.
| const GNSSQualitySettings & MainGPSManager::orientationQualitySettings | ( | GNSSQuality | quality | ) | const |
Returns orientation quality settings for the given quality level.
| [in] | quality | The GNSS quality level. |
| const GNSSQualitySettings & MainGPSManager::positionQualitySettings | ( | GNSSQuality | quality | ) | const |
Returns position quality settings for the given quality level.
| [in] | quality | The GNSS quality level. |
| void MainGPSManager::setActiveSensor | ( | UUID | active_id, |
| const ConnectionInfo & | connection ) |
| void MainGPSManager::setInfoPipe | ( | InfoPipe * | info | ) |
Sets the info pipe for log output.
| [in] | info | The info pipe to use. |
| void MainGPSManager::setOrientationQualitySettings | ( | GNSSQuality | quality, |
| const GNSSQualitySettings & | settings ) |
Sets orientation quality settings for the given quality level.
| [in] | quality | The GNSS quality level. |
| [in] | settings | The quality settings to apply. |
| void MainGPSManager::setPositionQualitySettings | ( | GNSSQuality | quality, |
| const GNSSQualitySettings & | settings ) |
Sets position quality settings for the given quality level.
| [in] | quality | The GNSS quality level. |
| [in] | settings | The quality settings to apply. |
| bool MainGPSManager::shouldAutoConnect | ( | GPSSensor * | gps | ) | const |
Returns whether the given sensor should auto-connect.
| [in] | gps | The GPS sensor. |
Converts a signal-to-noise ratio to a display color.
| [in] | srn | The signal-to-noise ratio. |
|
inlineoverridevirtual |
Returns the unique identifier for this manager.
Implements GNSSInterface.
Definition at line 43 of file MainGPSManager.h.
References m_id.