1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.6.v20140519.
* Used org.franca.core 0.8.11.201401091023.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
/**
* EnhancedPosition = This interface offers functionalities to retrieve the
* enhanced position of the vehicle
*/
#ifndef ORG_GENIVI_ENHANCEDPOSITIONSERVICE_Enhanced_Position_STUB_DEFAULT_H_
#define ORG_GENIVI_ENHANCEDPOSITIONSERVICE_Enhanced_Position_STUB_DEFAULT_H_
#include <org/genivi/EnhancedPositionService/EnhancedPositionStub.h>
#include <sstream>
namespace org {
namespace genivi {
namespace EnhancedPositionService {
/**
* Provides a default implementation for EnhancedPositionStubRemoteEvent and
* EnhancedPositionStub. Method callbacks have an empty implementation,
* remote set calls on attributes will always change the value of the attribute
* to the one received.
*
* Override this stub if you only want to provide a subset of the functionality
* that would be defined for this service, and/or if you do not need any non-default
* behaviour.
*/
class EnhancedPositionStubDefault : public virtual EnhancedPositionStub {
public:
EnhancedPositionStubDefault();
EnhancedPositionStubRemoteEvent* initStubAdapter(const std::shared_ptr<EnhancedPositionStubAdapter>& stubAdapter);
const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);
/**
* GetVersion = This method returns the API version implemented by the server
* application
*/
virtual void GetVersion(const std::shared_ptr<CommonAPI::ClientId> clientId, EnhancedPositionServiceTypes::Version& version);
virtual void GetVersion(EnhancedPositionServiceTypes::Version& version);
/**
* GetPositionInfo = This method returns a given set of positioning data (e.g.
* Position, Course, Accuracy, Status, ... )
Note: If a requested
* value is invalid, it's not returned to the client application
*/
virtual void GetPositionInfo(const std::shared_ptr<CommonAPI::ClientId> clientId, EnhancedPositionServiceTypes::Bitmask valuesToReturn, EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::PositionInfo& data);
virtual void GetPositionInfo(EnhancedPositionServiceTypes::Bitmask valuesToReturn, EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::PositionInfo& data);
/**
* GetSatelliteInfo = This method returns information about the current satellite
* constellation
Note: If a requested value is invalid, it's not
* returned to the client application
*/
virtual void GetSatelliteInfo(const std::shared_ptr<CommonAPI::ClientId> clientId, EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::SatelliteInfo& satelliteInfo);
virtual void GetSatelliteInfo(EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::SatelliteInfo& satelliteInfo);
/**
* GetTime = This method returns UTC time and date.
Note: If a
* requested value is invalid, it's not returned to the client application
*/
virtual void GetTime(const std::shared_ptr<CommonAPI::ClientId> clientId, EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::TimeInfo& time);
virtual void GetTime(EnhancedPositionServiceTypes::Timestamp& timestamp, EnhancedPositionServiceTypes::TimeInfo& time);
/**
* PositionUpdate = This signal is called to notify a client application of a
* position change. The update frequency is implementation specific. The maximal
* allowed frequency is 10Hz
*/
virtual void firePositionUpdateEvent(const EnhancedPositionServiceTypes::Bitmask& changedValues);
protected:
class RemoteEventHandler: public virtual EnhancedPositionStubRemoteEvent {
public:
RemoteEventHandler(EnhancedPositionStubDefault* defaultStub);
private:
EnhancedPositionStubDefault* defaultStub_;
};
private:
EnhancedPositionStubDefault::RemoteEventHandler remoteEventHandler_;
CommonAPI::Version interfaceVersion_;
};
} // namespace EnhancedPositionService
} // namespace genivi
} // namespace org
#endif // ORG_GENIVI_ENHANCEDPOSITIONSERVICE_Enhanced_Position_STUB_DEFAULT_H_
|