Public Member Functions | Private Member Functions | Private Attributes | List of all members
swarmio::simulator::LinearPathTelemetrySimulator Class Referencefinal

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...
 

Detailed Description

Simulates linear back-and-forth movement between two points.

Definition at line 16 of file LinearPathTelemetrySimulator.h.

Constructor & Destructor Documentation

LinearPathTelemetrySimulator::LinearPathTelemetrySimulator ( services::telemetry::Service telemetryService,
const std::string &  name,
SimulatedLocation  firstPoint,
SimulatedLocation  secondPoint,
std::chrono::seconds  duration 
)

Constructor.

Parameters
telemetryServiceTelemetry service
nameTelemetry key
firstPointFirst point
secondPointSecond point
durationTime it takes to complete one trip

Definition at line 9 of file LinearPathTelemetrySimulator.cpp.

swarmio::simulator::LinearPathTelemetrySimulator::~LinearPathTelemetrySimulator ( )
inline

Destructor.

Definition at line 99 of file LinearPathTelemetrySimulator.h.

Member Function Documentation

void swarmio::simulator::LinearPathTelemetrySimulator::Stop ( )
inline

Stops updating.

Definition at line 85 of file LinearPathTelemetrySimulator.h.

void LinearPathTelemetrySimulator::Worker ( )
private

Worker thread.

Definition at line 24 of file LinearPathTelemetrySimulator.cpp.

Member Data Documentation

std::chrono::seconds swarmio::simulator::LinearPathTelemetrySimulator::_duration
private

Time it takes to complete one trip.

Definition at line 60 of file LinearPathTelemetrySimulator.h.

SimulatedLocation swarmio::simulator::LinearPathTelemetrySimulator::_firstPoint
private

First point.

Definition at line 48 of file LinearPathTelemetrySimulator.h.

std::string swarmio::simulator::LinearPathTelemetrySimulator::_name
private

Telemetry key.

Definition at line 42 of file LinearPathTelemetrySimulator.h.

SimulatedLocation swarmio::simulator::LinearPathTelemetrySimulator::_secondPoint
private

Second point.

Definition at line 54 of file LinearPathTelemetrySimulator.h.

std::atomic<bool> swarmio::simulator::LinearPathTelemetrySimulator::_shouldStop
private

Stop marker.

Definition at line 30 of file LinearPathTelemetrySimulator.h.

services::telemetry::Service& swarmio::simulator::LinearPathTelemetrySimulator::_telemetryService
private

Telemetry service.

Definition at line 36 of file LinearPathTelemetrySimulator.h.

std::unique_ptr<std::thread> swarmio::simulator::LinearPathTelemetrySimulator::_thread
private

Worker thread.

Definition at line 24 of file LinearPathTelemetrySimulator.h.


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


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48