18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_ENGINE_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_ENGINE_H_
28 #include <core/property.h>
40 class ProviderSelectionPolicy;
48 typedef std::shared_ptr<Engine>
Ptr;
95 Engine(
const std::shared_ptr<ProviderSelectionPolicy>& provider_selection_policy);
138 struct ProviderConnections
140 core::ScopedConnection reference_location_updates;
141 core::ScopedConnection reference_velocity_updates;
142 core::ScopedConnection reference_heading_updates;
143 core::ScopedConnection wifi_and_cell_id_reporting_state_updates;
144 core::ScopedConnection space_vehicle_visibility_updates;
145 core::ScopedConnection provider_position_updates;
148 mutable std::mutex guard;
149 std::map<Provider::Ptr, ProviderConnections> providers;
150 std::shared_ptr<ProviderSelectionPolicy> provider_selection_policy;
156 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_ENGINE_H_
Status
The State enum models the current state of the engine.
The Engine class encapsulates a positioning engine, relying on a set of providers and reporters to ac...
virtual void for_each_provider(const std::function< void(const Provider::Ptr &)> &enumerator) const noexcept
Iterates all known providers and invokes the provided enumerator for each of them.
core::Property< Update< Position > > reference_location
core::Property< Update< Heading > > reference_heading
Engine(const std::shared_ptr< ProviderSelectionPolicy > &provider_selection_policy)
The engine and providers are powered on but not navigating.
core::Property< Update< Velocity > > reference_velocity
core::Property< SatelliteBasedPositioningState > satellite_based_positioning_state
core::Property< WifiAndCellIdReportingState > wifi_and_cell_id_reporting_state
core::Property< std::map< SpaceVehicle::Key, SpaceVehicle > > visible_space_vehicles
The Configuration struct summarizes the state of the engine.
virtual bool has_provider(const Provider::Ptr &provider) noexcept
Checks if the engine knows about a specific provider.
core::Property< Engine::Status > engine_state
Engine & operator=(const Engine &)=delete
std::shared_ptr< Provider > Ptr
Configuration configuration
The engine's configuration.
Wifi and Cell Ids are not reported. This is the default value.
The engine and providers are powered on and navigating.
The engine is currently offline.
Updates updates
All updates distributed via the engine.
Satellite assisted positioning is on.
virtual void remove_provider(const Provider::Ptr &provider) noexcept
Removes a provider from the engine.
Summarizes criteria of a client session with respect to functionality and accuracy for position...
std::shared_ptr< Engine > Ptr
virtual void add_provider(const Provider::Ptr &provider)
Makes a provider known to the engine.
virtual ProviderSelection determine_provider_selection_for_criteria(const Criteria &criteria)
Calculates a set of providers that satisfies the given criteria.
Summarizes all updates delivered via the engine.