lomiri-location-service
..
An aggregating location service providing positioning and geocoding capabilities to applications.
|
Go to the documentation of this file.
18 #ifndef LOCATION_SERVICE_COM_LOMIRI_LOCATION_PROVIDER_H_
19 #define LOCATION_SERVICE_COM_LOMIRI_LOCATION_PROVIDER_H_
29 #include <core/property.h>
30 #include <core/signal.h>
48 typedef std::shared_ptr<Provider>
Ptr;
83 typedef std::shared_ptr<Controller>
Ptr;
155 std::atomic<int> position_updates_counter;
156 std::atomic<int> heading_updates_counter;
157 std::atomic<int> velocity_updates_counter;
172 core::Signal<Update<std::set<SpaceVehicle>>>
svs;
292 #endif // LOCATION_SERVICE_COM_LOMIRI_LOCATION_PROVIDER_H_
virtual void stop_heading_updates()
Request to stop heading updates. Only stops the provider when the last observer calls this function.
@ satellites
The provider requires satellites to be visible.
virtual void start_position_updates()
Implementation-specific, empty by default.
core::Signal< Update< std::set< SpaceVehicle > > > svs
@ data_network
The provider requires a data-network to work correctly.
Provider & operator=(const Provider &)=delete
@ heading
The provider features heading updates.
std::shared_ptr< Provider > Ptr
virtual void on_reference_location_updated(const Update< Position > &position)
Called by the engine whenever the reference location changed.
WifiAndCellIdReportingState
virtual void on_reference_velocity_updated(const Update< Velocity > &velocity)
Called by the engine whenever the reference velocity changed.
Controller(const Controller &)=delete
Provider::Features operator&(Provider::Features lhs, Provider::Features rhs)
bool are_position_updates_running() const
Checks if position updates are currently running.
@ none
The provider does not support any feature.
Requirements
Enumerates the requirements of a provider implementation.
virtual void on_reference_heading_updated(const Update< Heading > &heading)
Called by the engine whenever the reference heading changed.
bool are_heading_updates_running() const
Checks if position updates are currently running.
@ velocity
The provider features velocity updates.
virtual void start_heading_updates()
Request to start heading updates if not already running.
Wraps all updates that can be delivered by a provider.
virtual Updates & mutable_updates()
@ monetary_spending
Using the provider results in monetary cost.
virtual bool matches_criteria(const Criteria &criteria)
Checks if a provider satisfies a set of accuracy criteria.
virtual void stop_heading_updates()
Implementation-specific, empty by default.
@ none
The provider does not require anything.
core::Signal< Update< Position > > position
virtual void start_velocity_updates()
Request to start velocity updates if not already running.
virtual bool requires(const Requirements &r) const
Checks if the provider has got a specific requirement.
virtual ~Controller()=default
Requirements requirements
virtual void start_position_updates()
Request to start position updates if not already running.
void disable()
disable switches the provider to a disabled state, such that subsequent calls to start* methods fail.
virtual void stop_velocity_updates()
Request to stop velocity updates. Only stops the provider when the last observer calls this function.
@ cell_network
The provider requires a cell-network to work correctly.
core::Signal< Update< Heading > > heading
virtual void stop_position_updates()
Implementation-specific, empty by default.
Facade for controlling the state of position/heading/velocity updates.
Provider::Features operator|(Provider::Features lhs, Provider::Features rhs)
virtual void start_heading_updates()
Implementation-specific, empty by default.
virtual void stop_velocity_updates()
Implementation-specific, empty by default.
core::Signal< Update< Velocity > > velocity
Summarizes criteria of a client session with respect to functionality and accuracy for position,...
bool are_velocity_updates_running() const
Checks if velocity updates are currently running.
virtual ~Provider()=default
Controller::Ptr controller
virtual void stop_position_updates()
Request to stop position updates. Only stops the provider when the last observer calls this function.
The Provider class is the abstract base of all positioning providers.
virtual const Controller::Ptr & state_controller() const
Access to the controller facade of this provider instance.
Controller & operator=(const Controller &)=delete
@ position
The provider features position updates.
virtual void start_velocity_updates()
Implementation-specific, empty by default.
std::shared_ptr< Controller > Ptr
Features
Enumerates the known features that can be supported by providers.
Templated class that wraps a value and timestamp.
virtual bool supports(const Features &f) const
Checks if the provider supports a specific feature.
Provider(const Provider &)=delete
virtual void on_wifi_and_cell_reporting_state_changed(WifiAndCellIdReportingState state)
Called by the engine whenever the wifi and cell ID reporting state changes.
void enable()
enable switches the provider to an enabled state, such that subsequent calls to start* methods succee...