Simulates linear back-and-forth movement between two points. More...
#include <LinearPathTelemetrySimulator.h>
Public Member Functions | |
LinearPathTelemetrySimulator (services::telemetry::Service &telemetryService, const std::string &name, SimulatedLocation firstPoint, SimulatedLocation secondPoint, std::chrono::seconds duration) | |
Constructor. More... | |
void | Stop () |
Stops updating. More... | |
~LinearPathTelemetrySimulator () | |
Destructor. More... | |
Private Member Functions | |
void | Worker () |
Worker thread. More... | |
Private Attributes | |
std::chrono::seconds | _duration |
Time it takes to complete one trip. More... | |
SimulatedLocation | _firstPoint |
First point. More... | |
std::string | _name |
Telemetry key. More... | |
SimulatedLocation | _secondPoint |
Second point. More... | |
std::atomic< bool > | _shouldStop |
Stop marker. More... | |
services::telemetry::Service & | _telemetryService |
Telemetry service. More... | |
std::unique_ptr< std::thread > | _thread |
Worker thread. More... | |
Simulates linear back-and-forth movement between two points.
Definition at line 16 of file LinearPathTelemetrySimulator.h.
LinearPathTelemetrySimulator::LinearPathTelemetrySimulator | ( | services::telemetry::Service & | telemetryService, |
const std::string & | name, | ||
SimulatedLocation | firstPoint, | ||
SimulatedLocation | secondPoint, | ||
std::chrono::seconds | duration | ||
) |
Constructor.
telemetryService | Telemetry service |
name | Telemetry key |
firstPoint | First point |
secondPoint | Second point |
duration | Time it takes to complete one trip |
Definition at line 9 of file LinearPathTelemetrySimulator.cpp.
|
inline |
Destructor.
Definition at line 99 of file LinearPathTelemetrySimulator.h.
|
inline |
Stops updating.
Definition at line 85 of file LinearPathTelemetrySimulator.h.
|
private |
Worker thread.
Definition at line 24 of file LinearPathTelemetrySimulator.cpp.
|
private |
Time it takes to complete one trip.
Definition at line 60 of file LinearPathTelemetrySimulator.h.
|
private |
First point.
Definition at line 48 of file LinearPathTelemetrySimulator.h.
|
private |
Telemetry key.
Definition at line 42 of file LinearPathTelemetrySimulator.h.
|
private |
Second point.
Definition at line 54 of file LinearPathTelemetrySimulator.h.
|
private |
Stop marker.
Definition at line 30 of file LinearPathTelemetrySimulator.h.
|
private |
Telemetry service.
Definition at line 36 of file LinearPathTelemetrySimulator.h.
|
private |
Worker thread.
Definition at line 24 of file LinearPathTelemetrySimulator.h.