libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout
include
osmscout
navigation
RouteStateAgent.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_NAVIGATION_ROUTE_STATE_AGENT_H
2
#define OSMSCOUT_NAVIGATION_ROUTE_STATE_AGENT_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2018 Tim Teulings
7
Copyright (C) 2019 Lukas Karas
8
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Lesser General Public
11
License as published by the Free Software Foundation; either
12
version 2.1 of the License, or (at your option) any later version.
13
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Lesser General Public License for more details.
18
19
You should have received a copy of the GNU Lesser General Public
20
License along with this library; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
*/
23
24
#include <
osmscout/navigation/Engine.h
>
25
#include <
osmscout/navigation/Agents.h
>
26
#include <
osmscout/navigation/PositionAgent.h
>
27
28
#include <optional>
29
30
namespace
osmscout
{
31
35
struct
OSMSCOUT_API
RerouteRequestMessage
CLASS_FINAL
:
public
NavigationMessage
36
{
37
const
GeoCoord
from
;
38
const
std::optional<Bearing>
initialBearing
;
39
const
GeoCoord
to
;
40
41
RerouteRequestMessage
(
const
Timestamp
&
timestamp
,
42
const
GeoCoord
&
from
,
43
const
std::optional<Bearing> &
initialBearing
,
44
const
GeoCoord
&
to
);
45
};
46
47
struct
OSMSCOUT_API
TargetReachedMessage
CLASS_FINAL
:
public
NavigationMessage
48
{
49
const
GeoCoord
coord
;
50
const
GeoCoord
target
;
51
const
Bearing
targetBearing
;
52
const
Distance
targetDistance
;
53
54
TargetReachedMessage
(
const
Timestamp
&
timestamp
,
55
const
GeoCoord
&
coord
,
56
const
GeoCoord
&
target
,
57
const
Bearing &
targetBearing
,
58
const
Distance &
targetDistance
);
59
};
60
61
class
OSMSCOUT_API
RouteStateAgent
CLASS_FINAL
:
public
NavigationAgent
62
{
63
private
:
64
Timestamp
lastUpdate;
65
PositionAgent::PositionState state;
66
std::optional<Bearing> bearing;
67
GeoCoord target;
68
bool
targetSetup{
false
};
69
70
public
:
71
explicit
RouteStateAgent
();
72
std::list<NavigationMessageRef>
Process
(
const
NavigationMessageRef
&
message
)
override
;
73
};
74
}
75
#endif
Agents.h
OSMSCOUT_API
#define OSMSCOUT_API
Definition
CoreImportExport.h:45
Engine.h
PositionAgent.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::coord
const GeoCoord coord
Definition
RouteStateAgent.h:49
osmscout::CLASS_FINAL::initialBearing
const std::optional< Bearing > initialBearing
Definition
RouteStateAgent.h:38
osmscout::CLASS_FINAL::targetBearing
const Bearing targetBearing
Definition
RouteStateAgent.h:51
osmscout::CLASS_FINAL::from
const GeoCoord from
Definition
RouteStateAgent.h:37
osmscout::CLASS_FINAL::TargetReachedMessage
TargetReachedMessage(const Timestamp ×tamp, const GeoCoord &coord, const GeoCoord &target, const Bearing &targetBearing, const Distance &targetDistance)
osmscout::CLASS_FINAL::to
const GeoCoord to
Definition
RouteStateAgent.h:39
osmscout::CLASS_FINAL::Process
std::list< NavigationMessageRef > Process(const NavigationMessageRef &message) override
osmscout::CLASS_FINAL::GeoCoord
GeoCoord()=default
osmscout::CLASS_FINAL::targetDistance
const Distance targetDistance
Definition
RouteStateAgent.h:52
osmscout::CLASS_FINAL::RouteStateAgent
RouteStateAgent()
osmscout::CLASS_FINAL::target
const GeoCoord target
Definition
RouteStateAgent.h:50
osmscout::CLASS_FINAL::message
std::vector< VoiceSample > message
Definition
VoiceInstructionAgent.h:99
osmscout::CLASS_FINAL::RerouteRequestMessage
RerouteRequestMessage(const Timestamp ×tamp, const GeoCoord &from, const std::optional< Bearing > &initialBearing, const GeoCoord &to)
osmscout::NavigationAgent
Definition
Engine.h:79
osmscout
Definition
Area.h:39
osmscout::Timestamp
std::chrono::system_clock::time_point Timestamp
Definition
Time.h:27
osmscout::NavigationMessageRef
std::shared_ptr< NavigationMessage > NavigationMessageRef
Definition
Engine.h:56
osmscout::NavigationMessage
Definition
Engine.h:49
osmscout::NavigationMessage::timestamp
const Timestamp timestamp
Definition
Engine.h:50
Generated by
1.17.0