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

Facade for controlling the state of position/heading/velocity updates. More...

`#include <provider.h>`

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

## Public Types

typedef std::shared_ptr< Controller > | Ptr

## Public Member Functions

virtual | ~Controller ()=default
| Controller (const Controller &)=delete
Controller & | operator= (const Controller &)=delete
void | disable ()
| disable switches the provider to a disabled state, such that subsequent calls to start* methods fail.
void | enable ()
| enable switches the provider to an enabled state, such that subsequent calls to start* methods succeed.
virtual void | start_position_updates ()
| Request to start position updates if not already running.
virtual void | stop_position_updates ()
| Request to stop position updates. Only stops the provider when the last observer calls this function.
bool | are_position_updates_running () const
| Checks if position updates are currently running.
virtual void | start_heading_updates ()
| Request to start heading updates if not already running.
virtual void | stop_heading_updates ()
| Request to stop heading updates. Only stops the provider when the last observer calls this function.
bool | are_heading_updates_running () const
| Checks if position updates are currently running.
virtual void | start_velocity_updates ()
| Request to start velocity updates if not already running.
virtual void | stop_velocity_updates ()
| Request to stop velocity updates. Only stops the provider when the last observer calls this function.
bool | are_velocity_updates_running () const
| Checks if velocity updates are currently running.

## Protected Member Functions

| Controller (Provider &instance)

## Detailed Description

Facade for controlling the state of position/heading/velocity updates.

Multiple observers can request state changes for updates. This class ensures that the specific updates are started and stopped if at least one observer requests them and stopped when the last observer issues a stop request.

Definition at line 80 of file provider.h.

## Member Typedef Documentation

## Ptr

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

Definition at line 83 of file provider.h.

## Constructor & Destructor Documentation

## ~Controller()

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

virtual default

## Controller() [1/2]

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

delete

References Controller().

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

Here is the call graph for this function:

## Controller() [2/2]

com::lomiri::location::Provider::Controller::Controller | ( | Provider & | instance | ) |

explicit protected

References Provider.

Here is the call graph for this function:

## Member Function Documentation

## are_heading_updates_running()

bool com::lomiri::location::Provider::Controller::are_heading_updates_running | ( |  | ) | const

Checks if position updates are currently running.

Returns
  true iff position updates are currently running.

## are_position_updates_running()

bool com::lomiri::location::Provider::Controller::are_position_updates_running | ( |  | ) | const

Checks if position updates are currently running.

Returns
  true iff position updates are currently running.

## are_velocity_updates_running()

bool com::lomiri::location::Provider::Controller::are_velocity_updates_running | ( |  | ) | const

Checks if velocity updates are currently running.

Returns
  true iff velocity updates are currently running.

## disable()

void com::lomiri::location::Provider::Controller::disable | ( |  | ) |

disable switches the provider to a disabled state, such that subsequent calls to start* methods fail.

## enable()

void com::lomiri::location::Provider::Controller::enable | ( |  | ) |

enable switches the provider to an enabled state, such that subsequent calls to start* methods succeed.

## operator=()

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

delete

References Controller().

Here is the call graph for this function:

## start_heading_updates()

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

virtual

Request to start heading updates if not already running.

## start_position_updates()

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

virtual

Request to start position updates if not already running.

## start_velocity_updates()

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

virtual

Request to start velocity updates if not already running.

## stop_heading_updates()

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

virtual

Request to stop heading updates. Only stops the provider when the last observer calls this function.

## stop_position_updates()

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

virtual

Request to stop position updates. Only stops the provider when the last observer calls this function.

## stop_velocity_updates()

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

virtual

Request to stop velocity updates. Only stops the provider when the last observer calls this function.

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

- provider.h