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
107
108
109
110
|
/*
* 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/.
*/
#include "EnhancedPositionServiceTypes.h"
namespace org {
namespace genivi {
namespace EnhancedPositionService {
namespace EnhancedPositionServiceTypes {
Version::Version(const uint16_t& majValue, const uint16_t& minValue, const uint16_t& micValue, const std::string& dateValue):
maj(majValue),
min(minValue),
mic(micValue),
date(dateValue)
{
}
bool operator==(const Version& lhs, const Version& rhs) {
if (&lhs == &rhs)
return true;
return
lhs.maj == rhs.maj &&
lhs.min == rhs.min &&
lhs.mic == rhs.mic &&
lhs.date == rhs.date
;
}
void Version::readFromInputStream(CommonAPI::InputStream& inputStream) {
inputStream >> maj;
inputStream >> min;
inputStream >> mic;
inputStream >> date;
}
void Version::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
outputStream << maj;
outputStream << min;
outputStream << mic;
outputStream << date;
}
SatelliteInfo::SatelliteInfo(const SatelliteSystem& systemValue, const uint32_t& satellitIdValue, const uint32_t& azimuthValue, const uint32_t& elevationValue, const uint32_t& snrValue, const bool& inUseValue):
system(systemValue),
satellitId(satellitIdValue),
azimuth(azimuthValue),
elevation(elevationValue),
snr(snrValue),
inUse(inUseValue)
{
}
bool operator==(const SatelliteInfo& lhs, const SatelliteInfo& rhs) {
if (&lhs == &rhs)
return true;
return
lhs.system == rhs.system &&
lhs.satellitId == rhs.satellitId &&
lhs.azimuth == rhs.azimuth &&
lhs.elevation == rhs.elevation &&
lhs.snr == rhs.snr &&
lhs.inUse == rhs.inUse
;
}
void SatelliteInfo::readFromInputStream(CommonAPI::InputStream& inputStream) {
inputStream >> system;
inputStream >> satellitId;
inputStream >> azimuth;
inputStream >> elevation;
inputStream >> snr;
inputStream >> inUse;
}
void SatelliteInfo::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
outputStream << system;
outputStream << satellitId;
outputStream << azimuth;
outputStream << elevation;
outputStream << snr;
outputStream << inUse;
}
} // namespace EnhancedPositionServiceTypes
} // namespace EnhancedPositionService
} // namespace genivi
} // namespace org
|