blob: 73643242547a6b6023886d2a979149982dd7a409 (
plain)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
#include "XEndOfCallVqmSummariesImp.h"
const std::string XEnumEndOfCallVqmSummariesEndpointDescriptionMapping[] = {
"Caller",
"Callee"
};
XEndOfCallVqmSummariesImp::XEndOfCallVqmSummariesImp(const XString& adjacencyName,
XEnumEndOfCallVqmSummariesEndpointDescription endpointDescription):
adjacencyName_(adjacencyName),
endpointDescription_(endpointDescription)
{
}
void XEndOfCallVqmSummariesImp::setLocalRtpPacketsDiscarded(XNumber localRtpPacketsDiscarded)
{
comVals_["localRtpPacketsDiscarded"] = localRtpPacketsDiscarded;
}
void XEndOfCallVqmSummariesImp::setLocalMaxJitter(XNumber localMaxJitter)
{
comVals_["localMaxJitter"] = localMaxJitter;
}
void XEndOfCallVqmSummariesImp::setRoundTripDelay(XNumber roundTripDelay)
{
comVals_["roundTripDelay"] = roundTripDelay;
}
void XEndOfCallVqmSummariesImp::setLocalRtpOctetsSent(XNumber localRtpOctetsSent)
{
comVals_["localRtpOctetsSent"] = localRtpOctetsSent;
}
void XEndOfCallVqmSummariesImp::setLocalAverageJitterBufferDelay(XNumber localAverageJitterBufferDelay)
{
comVals_["localAverageJitterBufferDelay"] = localAverageJitterBufferDelay;
}
void XEndOfCallVqmSummariesImp::setLocalRtpPacketsLost(XNumber localRtpPacketsLost)
{
comVals_["localRtpPacketsLost"] = localRtpPacketsLost;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpOctetsReceived(XNumber endpointRtpOctetsReceived)
{
comVals_["endpointRtpOctetsReceived"] = endpointRtpOctetsReceived;
}
void XEndOfCallVqmSummariesImp::setRFactor(XNumber rFactor)
{
comVals_["rFactor"] = rFactor;
}
void XEndOfCallVqmSummariesImp::setLocalRtpPacketsReceived(XNumber localRtpPacketsReceived)
{
comVals_["localRtpPacketsReceived"] = localRtpPacketsReceived;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpPacketsLost(XNumber endpointRtpPacketsLost)
{
comVals_["endpointRtpPacketsLost"] = endpointRtpPacketsLost;
}
void XEndOfCallVqmSummariesImp::setLocalAverageJitter(XNumber localAverageJitter)
{
comVals_["localAverageJitter"] = localAverageJitter;
}
void XEndOfCallVqmSummariesImp::setMosCqe(XNumber mosCqe)
{
comVals_["mosCqe"] = mosCqe;
}
void XEndOfCallVqmSummariesImp::setOneWayDelay(XNumber oneWayDelay)
{
comVals_["oneWayDelay"] = oneWayDelay;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpOctetsLost(XNumber endpointRtpOctetsLost)
{
comVals_["endpointRtpOctetsLost"] = endpointRtpOctetsLost;
}
void XEndOfCallVqmSummariesImp::setAdjacencyName(const XString& adjacencyName)
{
comVals_["adjacencyName"] = adjacencyName;
}
void XEndOfCallVqmSummariesImp::setPacketLossPercent(XNumber packetLossPercent)
{
comVals_["packetLossPercent"] = packetLossPercent;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpOctetsDiscarded(XNumber endpointRtpOctetsDiscarded)
{
comVals_["endpointRtpOctetsDiscarded"] = endpointRtpOctetsDiscarded;
}
void XEndOfCallVqmSummariesImp::setLocalRtpPacketsSent(XNumber localRtpPacketsSent)
{
comVals_["localRtpPacketsSent"] = localRtpPacketsSent;
}
void XEndOfCallVqmSummariesImp::setEndpointAverageJitter(XNumber endpointAverageJitter)
{
comVals_["endpointAverageJitter"] = endpointAverageJitter;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpOctetsSent(XNumber endpointRtpOctetsSent)
{
comVals_["endpointRtpOctetsSent"] = endpointRtpOctetsSent;
}
void XEndOfCallVqmSummariesImp::setEndpointMaxJitter(XNumber endpointMaxJitter)
{
comVals_["endpointMaxJitter"] = endpointMaxJitter;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpPacketsReceived(XNumber endpointRtpPacketsReceived)
{
comVals_["endpointRtpPacketsReceived"] = endpointRtpPacketsReceived;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpPacketsSent(XNumber endpointRtpPacketsSent)
{
comVals_["endpointRtpPacketsSent"] = endpointRtpPacketsSent;
}
void XEndOfCallVqmSummariesImp::setLocalMaxJitterBufferDelay(XNumber localMaxJitterBufferDelay)
{
comVals_["localMaxJitterBufferDelay"] = localMaxJitterBufferDelay;
}
void XEndOfCallVqmSummariesImp::setLocalRtpOctetsLost(XNumber localRtpOctetsLost)
{
comVals_["localRtpOctetsLost"] = localRtpOctetsLost;
}
void XEndOfCallVqmSummariesImp::setLocalRtpOctetsReceived(XNumber localRtpOctetsReceived)
{
comVals_["localRtpOctetsReceived"] = localRtpOctetsReceived;
}
void XEndOfCallVqmSummariesImp::setEndpointRtpPacketsDiscarded(XNumber endpointRtpPacketsDiscarded)
{
comVals_["endpointRtpPacketsDiscarded"] = endpointRtpPacketsDiscarded;
}
void XEndOfCallVqmSummariesImp::setEndpointDescription(XEnumEndOfCallVqmSummariesEndpointDescription endpointDescription)
{
auto val = XEnumEndOfCallVqmSummariesEndpointDescriptionMapping[endpointDescription];
comVals_["endpointDescription"] = val;
}
void XEndOfCallVqmSummariesImp::setLocalRtpOctetsDiscarded(XNumber localRtpOctetsDiscarded)
{
comVals_["localRtpOctetsDiscarded"] = localRtpOctetsDiscarded;
}
json XEndOfCallVqmSummariesImp::toJson()
{
try
{
if (adjacencyName_.empty())
{
return json();
}
json field = {
{"adjacencyName", adjacencyName_},
{"endpointDescription", XEnumEndOfCallVqmSummariesEndpointDescriptionMapping[endpointDescription_]}
};
//optional val
field = mergeCommonValues(field, comVals_);
return field;
}
catch (json::exception& e)
{
SPDLOG_ERROR("Fail to build XEndOfCallVqmSummaries to json object:{}.", e.what());
return json();
}
}
|