com::lomiri::location::Provider Class Reference

The Provider class is the abstract base of all positioning providers. More...

`#include <provider.h>`

Inheritance diagram for com::lomiri::location::Provider:
Collaboration diagram for com::lomiri::location::Provider:

## Classes

class | Controller
| Facade for controlling the state of position/heading/velocity updates. More...
struct | Updates
| Wraps all updates that can be delivered by a provider. More...

## Public Types

enum class | Features : std::size_t { none = 0 , position = 1 << 0 , velocity = 1 << 1 , heading = 1 << 2 }
| Enumerates the known features that can be supported by providers. More...
enum class | Requirements : std::size_t { none = 0 , satellites = 1 << 0 , cell_network = 1 << 1 , data_network = 1 << 2 , monetary_spending = 1 << 3 }
| Enumerates the requirements of a provider implementation. More...
typedef std::shared_ptr< Provider > | Ptr

## Public Member Functions

virtual | ~Provider ()=default
| Provider (const Provider &)=delete
Provider & | operator= (const Provider &)=delete
virtual const Updates & | updates () const
| Provides non-mutable access to this provider's updates.
virtual const Controller::Ptr & | state_controller () const
| Access to the controller facade of this provider instance.
virtual bool | supports (const Features &f) const
| Checks if the provider supports a specific feature.
virtual bool | matches_criteria (const Criteria &criteria)
| Checks if a provider satisfies a set of accuracy criteria.
virtual void | on_wifi_and_cell_reporting_state_changed (WifiAndCellIdReportingState state)
| Called by the engine whenever the wifi and cell ID reporting state changes.
virtual void | on_reference_location_updated (const Update< Position > &position)
| Called by the engine whenever the reference location changed.
virtual void | on_reference_velocity_updated (const Update< Velocity > &velocity)
| Called by the engine whenever the reference velocity changed.
virtual void | on_reference_heading_updated (const Update< Heading > &heading)
| Called by the engine whenever the reference heading changed.

## Public Attributes

virtual bool | const
| Checks if the provider has got a specific requirement.

## Protected Member Functions

| Provider (const Features &features=Features::none, const Requirements &requirements=Requirements::none)
virtual Updates & | mutable_updates ()
virtual void | start_position_updates ()
| Implementation-specific, empty by default.
virtual void | stop_position_updates ()
| Implementation-specific, empty by default.
virtual void | start_heading_updates ()
| Implementation-specific, empty by default.
virtual void | stop_heading_updates ()
| Implementation-specific, empty by default.
virtual void | start_velocity_updates ()
| Implementation-specific, empty by default.
virtual void | stop_velocity_updates ()
| Implementation-specific, empty by default.

## Detailed Description

The Provider class is the abstract base of all positioning providers.

Definition at line 45 of file provider.h.

## Member Typedef Documentation

## Ptr

typedef std::shared_ptr<Provider> com::lomiri::location::Provider::Ptr

Definition at line 48 of file provider.h.

## Member Enumeration Documentation

## Features

enum class com::lomiri::location::Provider::Features : std::size_t

strong

Enumerates the known features that can be supported by providers.

Enumerator
none | The provider does not support any feature.
position | The provider features position updates.
velocity | The provider features velocity updates.
heading | The provider features heading updates.

Definition at line 53 of file provider.h.

## Requirements

enum class com::lomiri::location::Provider::Requirements : std::size_t

strong

Enumerates the requirements of a provider implementation.

Enumerator
none | The provider does not require anything.
satellites | The provider requires satellites to be visible.
cell_network | The provider requires a cell-network to work correctly.
data_network | The provider requires a data-network to work correctly.
monetary_spending | Using the provider results in monetary cost.

Definition at line 64 of file provider.h.

## Constructor & Destructor Documentation

## ~Provider()

virtual com::lomiri::location::Provider::~Provider | ( |  | ) |

virtual default

## Provider() [1/2]

com::lomiri::location::Provider::Provider | ( | const Provider & |  | ) |

delete

References Provider().

Referenced by operator=(), and Provider().

Here is the call graph for this function:

## Provider() [2/2]

com::lomiri::location::Provider::Provider | ( | const Features & | features = Features::none,
|  | const Requirements & | requirements = Requirements::none )

explicit protected

References features, none, and requirements.

## Member Function Documentation

## matches_criteria()

virtual bool com::lomiri::location::Provider::matches_criteria | ( | const Criteria & | criteria | ) |

virtual

Checks if a provider satisfies a set of accuracy criteria.

Parameters

  [in] | criteria | The criteria to check.

Returns
  true iff the provider satisfies the given criteria.

Reimplemented in com::lomiri::location::FusionProvider.

## mutable_updates()

virtual Updates & com::lomiri::location::Provider::mutable_updates | ( |  | ) |

protected virtual

## on_reference_heading_updated()

virtual void com::lomiri::location::Provider::on_reference_heading_updated | ( | const Update< Heading > & | heading | ) |

virtual

Called by the engine whenever the reference heading changed.

Parameters

  heading | The new reference heading.

Reimplemented in com::lomiri::location::FusionProvider.

## on_reference_location_updated()

virtual void com::lomiri::location::Provider::on_reference_location_updated | ( | const Update< Position > & | position | ) |

virtual

Called by the engine whenever the reference location changed.

Parameters

  position | The new reference location.

Reimplemented in com::lomiri::location::FusionProvider.

## on_reference_velocity_updated()

virtual void com::lomiri::location::Provider::on_reference_velocity_updated | ( | const Update< Velocity > & | velocity | ) |

virtual

Called by the engine whenever the reference velocity changed.

Parameters

  velocity | The new reference velocity.

Reimplemented in com::lomiri::location::FusionProvider.

## on_wifi_and_cell_reporting_state_changed()

virtual void com::lomiri::location::Provider::on_wifi_and_cell_reporting_state_changed | ( | WifiAndCellIdReportingState | state | ) |

virtual

Called by the engine whenever the wifi and cell ID reporting state changes.

Parameters

  state | The new state.

Reimplemented in com::lomiri::location::FusionProvider.

## operator=()

Provider & com::lomiri::location::Provider::operator= | ( | const Provider & |  | ) |

delete

References Provider().

Here is the call graph for this function:

## start_heading_updates()

virtual void com::lomiri::location::Provider::start_heading_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## start_position_updates()

virtual void com::lomiri::location::Provider::start_position_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## start_velocity_updates()

virtual void com::lomiri::location::Provider::start_velocity_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## state_controller()

virtual const Controller::Ptr & com::lomiri::location::Provider::state_controller | ( |  | ) | const

virtual

Access to the controller facade of this provider instance.

## stop_heading_updates()

virtual void com::lomiri::location::Provider::stop_heading_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## stop_position_updates()

virtual void com::lomiri::location::Provider::stop_position_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## stop_velocity_updates()

virtual void com::lomiri::location::Provider::stop_velocity_updates | ( |  | ) |

protected virtual

Implementation-specific, empty by default.

Reimplemented in com::lomiri::location::FusionProvider, and com::lomiri::location::ProxyProvider.

## supports()

virtual bool com::lomiri::location::Provider::supports | ( | const Features & | f | ) | const

virtual

Checks if the provider supports a specific feature.

Parameters

  f | Feature to test for

Returns
  true iff the provider supports the feature.

## updates()

virtual const Updates & com::lomiri::location::Provider::updates | ( |  | ) | const

virtual

Provides non-mutable access to this provider's updates.

Returns
  A non-mutable reference to the updates.

## Member Data Documentation

## const

virtual bool com::lomiri::location::Provider::const

Checks if the provider has got a specific requirement.

Parameters

  r | Requirement to test for.

Returns
  true iff the provider has the specific requirement.

Definition at line 203 of file provider.h.

## controller

Controller::Ptr com::lomiri::location::Provider::controller = Controller::Ptr{}

Definition at line 279 of file provider.h.

## features

Features com::lomiri::location::Provider::features = Features::none

Definition at line 276 of file provider.h.

Referenced by Provider().

## requirements

Requirements com::lomiri::location::Provider::requirements = Requirements::none

Definition at line 277 of file provider.h.

Referenced by Provider().

## updates

Updates com::lomiri::location::Provider::updates

Definition at line 278 of file provider.h.

The documentation for this class was generated from the following file:

- provider.h