70
72
// Updates are delivered every update_period milliseconds.
71
std::chrono::milliseconds update_period{500};
73
std::chrono::milliseconds update_period{10};
73
75
// The reference position that is delivered in every upate cycle.
74
76
Position reference_position
115
117
// Cleans up all resources and stops the updates.
116
118
~Provider() noexcept;
118
// Always returns true.
119
bool matches_criteria(const Criteria&);
121
// Starts up the updater thread and delivers position updates
122
void start_position_updates();
123
// Stops the updater thread.
124
void stop_position_updates();
120
void on_new_event(const Event& event) override;
122
void enable() override;
123
void disable() override;
124
void activate() override;
125
void deactivate() override;
127
Requirements requirements() const override;
128
bool satisfies(const Criteria& criteria) override;
129
const core::Signal<Update<Position>>& position_updates() const override;
130
const core::Signal<Update<Heading>>& heading_updates() const override;
131
const core::Signal<Update<Velocity>>& velocity_updates() const override;
132
void on_wifi_and_cell_reporting_state_changed(WifiAndCellIdReportingState state);
133
void on_reference_location_updated(const Update<Position>& position);
134
void on_reference_velocity_updated(const Update<Velocity>& velocity);
135
void on_reference_heading_updated(const Update<Heading>& heading);
128
std::unique_ptr<Private> d;
138
dummy::Configuration configuration;
139
std::atomic<bool> stop_requested{false};
140
std::thread worker{};
144
core::Signal<Update<Position>> position;
145
core::Signal<Update<Heading>> heading;
146
core::Signal<Update<Velocity>> velocity;