blob: 7d2b37432dcb3f69d697682a9b71a1d3a9735a1f [file] [log] [blame]
slowr13fa5b02017-08-08 16:32:31 -07001/*
2 * Copyright 2015-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.xran.entities;
18
slowrc153ad92017-08-16 19:47:52 -070019import com.fasterxml.jackson.annotation.*;
slowr8ddc2b12017-08-14 14:13:38 -070020import com.fasterxml.jackson.databind.JsonNode;
slowr89c2ac12017-08-15 16:20:06 -070021import com.google.common.collect.Lists;
slowrc153ad92017-08-16 19:47:52 -070022import org.onosproject.store.service.WallClockTimestamp;
slowr13fa5b02017-08-08 16:32:31 -070023import org.onosproject.xran.codecs.api.*;
slowr73b4eae2017-08-17 16:09:09 -070024import org.onosproject.xran.codecs.ber.types.BerBitString;
slowrc153ad92017-08-16 19:47:52 -070025import org.onosproject.xran.codecs.ber.types.BerInteger;
slowr13fa5b02017-08-08 16:32:31 -070026import org.onosproject.xran.codecs.pdu.PDCPMeasReportPerUe;
27import org.onosproject.xran.codecs.pdu.RRMConfig;
28import org.onosproject.xran.identifiers.LinkId;
slowr73b4eae2017-08-17 16:09:09 -070029import org.slf4j.Logger;
30import org.slf4j.LoggerFactory;
slowr13fa5b02017-08-08 16:32:31 -070031
slowr73b4eae2017-08-17 16:09:09 -070032import javax.xml.bind.DatatypeConverter;
slowr67d05e42017-08-11 20:37:22 -070033import java.util.Arrays;
slowr8ddc2b12017-08-14 14:13:38 -070034import java.util.List;
slowr67d05e42017-08-11 20:37:22 -070035import java.util.Optional;
slowr13fa5b02017-08-08 16:32:31 -070036import java.util.Timer;
37
38/**
39 * Created by dimitris on 7/22/17.
40 */
slowr60d4d102017-08-16 18:33:58 -070041@JsonPropertyOrder({
42 "Link-ID",
43 "Type",
44 "RRMConfiguration",
45 "TrafficPercent",
46 "BearerParameters",
47 "Quality",
48 "PDCP-Throughput",
49 "PDCP-Packet-Delay",
50 "Resource-Usage"
51})
52@JsonIgnoreProperties(ignoreUnknown = true)
slowr13fa5b02017-08-08 16:32:31 -070053public class RnibLink {
slowr73b4eae2017-08-17 16:09:09 -070054 @JsonIgnore
55 private static final Logger log =
56 LoggerFactory.getLogger(RnibLink.class);
57
slowr60d4d102017-08-16 18:33:58 -070058 @JsonProperty("Link-ID")
slowr13fa5b02017-08-08 16:32:31 -070059 private LinkId linkId;
slowr60d4d102017-08-16 18:33:58 -070060 @JsonProperty("RRMConfiguration")
slowr13fa5b02017-08-08 16:32:31 -070061 private RRMConfig rrmParameters;
slowr60d4d102017-08-16 18:33:58 -070062 @JsonProperty("TrafficPercent")
slowr13fa5b02017-08-08 16:32:31 -070063 private TrafficSplitPercentage trafficPercent;
slowr60d4d102017-08-16 18:33:58 -070064 @JsonProperty("BearerParameters")
slowr13fa5b02017-08-08 16:32:31 -070065 private ERABParams bearerParameters;
slowr60d4d102017-08-16 18:33:58 -070066 @JsonProperty("Quality")
slowr13fa5b02017-08-08 16:32:31 -070067 private LinkQuality quality;
slowr60d4d102017-08-16 18:33:58 -070068 @JsonProperty("PDCP-Throughput")
slowr13fa5b02017-08-08 16:32:31 -070069 private PDCPThroughput pdcpThroughput;
slowr60d4d102017-08-16 18:33:58 -070070 @JsonProperty("PDCP-Packet-Delay")
slowr13fa5b02017-08-08 16:32:31 -070071 private PDCPPacketDelay pdcpPackDelay;
slowr60d4d102017-08-16 18:33:58 -070072 @JsonProperty("Resource-Usage")
slowr13fa5b02017-08-08 16:32:31 -070073 private ResourceUsage resourceUsage;
slowr60d4d102017-08-16 18:33:58 -070074 @JsonProperty("Type")
slowr13fa5b02017-08-08 16:32:31 -070075 private Type type;
slowr60d4d102017-08-16 18:33:58 -070076 @JsonIgnore
slowr13fa5b02017-08-08 16:32:31 -070077 private Timer timer;
78
slowr67d05e42017-08-11 20:37:22 -070079 public RnibLink(RnibCell cell, RnibUe ue) {
slowr13fa5b02017-08-08 16:32:31 -070080 trafficPercent = new TrafficSplitPercentage();
slowr67d05e42017-08-11 20:37:22 -070081 trafficPercent.setEcgi(cell.getEcgi());
slowr13fa5b02017-08-08 16:32:31 -070082 trafficPercent.setTrafficPercentDl(new BerInteger(100));
83 trafficPercent.setTrafficPercentUl(new BerInteger(100));
84
slowr13fa5b02017-08-08 16:32:31 -070085 timer = new Timer();
slowr67d05e42017-08-11 20:37:22 -070086
87 type = Type.NON_SERVING;
88
89 linkId = LinkId.valueOf(cell, ue);
slowr8ddc2b12017-08-14 14:13:38 -070090
slowrc153ad92017-08-16 19:47:52 -070091 quality = new LinkQuality();
92
slowr89c2ac12017-08-15 16:20:06 -070093 rrmParameters = new RRMConfig();
94 RRMConfig.Crnti crnti = new RRMConfig.Crnti();
95 crnti.addCRNTI(linkId.getUe().getRanId());
96 rrmParameters.setCrnti(crnti);
97 rrmParameters.setEcgi(linkId.getEcgi());
slowr13fa5b02017-08-08 16:32:31 -070098 }
99
100 public Timer getTimer() {
101 return timer;
102 }
103
104 public void setTimer(Timer timer) {
105 this.timer.cancel();
106 this.timer.purge();
107 this.timer = timer;
108 }
109
slowr60d4d102017-08-16 18:33:58 -0700110 @JsonProperty("Link-ID")
slowr13fa5b02017-08-08 16:32:31 -0700111 public LinkId getLinkId() {
112 return linkId;
113 }
114
slowr60d4d102017-08-16 18:33:58 -0700115 @JsonProperty("Link-ID")
slowr13fa5b02017-08-08 16:32:31 -0700116 public void setLinkId(LinkId linkId) {
117 this.linkId = linkId;
118 }
119
120 public void setLinkId(RnibCell cell, RnibUe ue) {
slowr67d05e42017-08-11 20:37:22 -0700121 this.linkId = LinkId.valueOf(cell, ue);
slowr13fa5b02017-08-08 16:32:31 -0700122 trafficPercent.setEcgi(cell.getEcgi());
123 }
124
slowr60d4d102017-08-16 18:33:58 -0700125 @JsonProperty("Type")
slowr13fa5b02017-08-08 16:32:31 -0700126 public Type getType() {
127 return type;
128 }
129
slowr60d4d102017-08-16 18:33:58 -0700130 @JsonProperty("Type")
slowr13fa5b02017-08-08 16:32:31 -0700131 public void setType(Type type) {
132 this.type = type;
133 }
134
slowr60d4d102017-08-16 18:33:58 -0700135 @JsonProperty("TrafficPercent")
slowr13fa5b02017-08-08 16:32:31 -0700136 public TrafficSplitPercentage getTrafficPercent() {
137 return trafficPercent;
138 }
139
slowr60d4d102017-08-16 18:33:58 -0700140 @JsonProperty("TrafficPercent")
slowr13fa5b02017-08-08 16:32:31 -0700141 public void setTrafficPercent(TrafficSplitPercentage trafficPercent) {
142 this.trafficPercent = trafficPercent;
143 }
144
slowr60d4d102017-08-16 18:33:58 -0700145 @JsonProperty("BearerParameters")
slowr13fa5b02017-08-08 16:32:31 -0700146 public ERABParams getBearerParameters() {
147 return bearerParameters;
148 }
149
slowr60d4d102017-08-16 18:33:58 -0700150 @JsonProperty("BearerParameters")
slowr13fa5b02017-08-08 16:32:31 -0700151 public void setBearerParameters(ERABParams bearerParameters) {
152 this.bearerParameters = bearerParameters;
153 }
154
slowr60d4d102017-08-16 18:33:58 -0700155 @JsonProperty("Quality")
slowr13fa5b02017-08-08 16:32:31 -0700156 public LinkQuality getQuality() {
157 return quality;
158 }
159
slowr60d4d102017-08-16 18:33:58 -0700160 @JsonProperty("Quality")
slowr13fa5b02017-08-08 16:32:31 -0700161 public void setQuality(LinkQuality quality) {
162 this.quality = quality;
163 }
164
slowr60d4d102017-08-16 18:33:58 -0700165 @JsonProperty("RRMConfiguration")
slowr13fa5b02017-08-08 16:32:31 -0700166 public RRMConfig getRrmParameters() {
167 return rrmParameters;
168 }
169
slowr60d4d102017-08-16 18:33:58 -0700170 @JsonProperty("RRMConfiguration")
slowr13fa5b02017-08-08 16:32:31 -0700171 public void setRrmParameters(RRMConfig rrmParameters) {
172 this.rrmParameters = rrmParameters;
173 }
174
slowr8ddc2b12017-08-14 14:13:38 -0700175 public void modifyRrmParameters(JsonNode rrmConfigNode) {
176 {
slowr73b4eae2017-08-17 16:09:09 -0700177 JsonNode p_a = rrmConfigNode.path("p_a");
178 if (!p_a.isMissingNode()) {
179 RRMConfig.Pa pa = new RRMConfig.Pa();
180
181 List<XICICPA> collect = Lists.newArrayList();
182 collect.add(new XICICPA(p_a.asInt()));
183 pa.setXICICPA(collect);
184 rrmParameters.setPa(pa);
185 }
186 }
187
188 {
slowr89c2ac12017-08-15 16:20:06 -0700189 JsonNode start_prb_dl = rrmConfigNode.path("start_prb_dl");
190 if (!start_prb_dl.isMissingNode()) {
slowr8ddc2b12017-08-14 14:13:38 -0700191 RRMConfig.StartPrbDl startPrbDl = new RRMConfig.StartPrbDl();
slowr89c2ac12017-08-15 16:20:06 -0700192
193 List<BerInteger> collect = Lists.newArrayList();
194 collect.add(new BerInteger(start_prb_dl.asInt()));
195 startPrbDl.setSeqOf(collect);
196
slowr8ddc2b12017-08-14 14:13:38 -0700197 rrmParameters.setStartPrbDl(startPrbDl);
198 }
199 }
200
201 {
slowr60d4d102017-08-16 18:33:58 -0700202 JsonNode end_prb_dl = rrmConfigNode.path("end_prb_dl");
slowr89c2ac12017-08-15 16:20:06 -0700203 if (!end_prb_dl.isMissingNode()) {
slowr8ddc2b12017-08-14 14:13:38 -0700204 RRMConfig.EndPrbDl endPrbDl = new RRMConfig.EndPrbDl();
slowr89c2ac12017-08-15 16:20:06 -0700205
206 List<BerInteger> collect = Lists.newArrayList();
207 collect.add(new BerInteger(end_prb_dl.asInt()));
208 endPrbDl.setSeqOf(collect);
209
slowr8ddc2b12017-08-14 14:13:38 -0700210 rrmParameters.setEndPrbDl(endPrbDl);
211 }
212 }
213
214 {
slowr73b4eae2017-08-17 16:09:09 -0700215 JsonNode sub_frame_bitmask_dl = rrmConfigNode.path("sub_frame_bitmask_dl");
216 if (!sub_frame_bitmask_dl.isMissingNode()) {
217 RRMConfig.SubframeBitmaskDl subframeBitmaskDl = new RRMConfig.SubframeBitmaskDl();
218 List<BerBitString> collect = Lists.newArrayList();
219
220 byte[] hexString = DatatypeConverter.parseHexBinary(sub_frame_bitmask_dl.asText());
221 collect.add(new BerBitString(hexString, 10));
222 subframeBitmaskDl.setSeqOf(collect);
223 rrmParameters.setSubframeBitmaskDl(subframeBitmaskDl);
224 }
225 }
226
227 {
slowr60d4d102017-08-16 18:33:58 -0700228 JsonNode start_prb_ul = rrmConfigNode.path("start_prb_ul");
slowr89c2ac12017-08-15 16:20:06 -0700229 if (!start_prb_ul.isMissingNode()) {
slowr8ddc2b12017-08-14 14:13:38 -0700230 RRMConfig.StartPrbUl startPrbUl = new RRMConfig.StartPrbUl();
slowr89c2ac12017-08-15 16:20:06 -0700231
232 List<BerInteger> collect = Lists.newArrayList();
233 collect.add(new BerInteger(start_prb_ul.asInt()));
234 startPrbUl.setSeqOf(collect);
235
slowr8ddc2b12017-08-14 14:13:38 -0700236 rrmParameters.setStartPrbUl(startPrbUl);
237 }
238 }
239
240 {
slowr60d4d102017-08-16 18:33:58 -0700241 JsonNode end_prb_ul = rrmConfigNode.path("end_prb_ul");
slowr89c2ac12017-08-15 16:20:06 -0700242 if (!end_prb_ul.isMissingNode()) {
slowr8ddc2b12017-08-14 14:13:38 -0700243 RRMConfig.EndPrbUl endPrbUl = new RRMConfig.EndPrbUl();
slowr89c2ac12017-08-15 16:20:06 -0700244
245 List<BerInteger> collect = Lists.newArrayList();
246 collect.add(new BerInteger(end_prb_ul.asInt()));
247 endPrbUl.setSeqOf(collect);
248
slowr8ddc2b12017-08-14 14:13:38 -0700249 rrmParameters.setEndPrbUl(endPrbUl);
250 }
251 }
slowr73b4eae2017-08-17 16:09:09 -0700252
253 {
254 JsonNode p0_ue_pusch = rrmConfigNode.path("p0_ue_pusch");
255 if (!p0_ue_pusch.isMissingNode()) {
256 RRMConfig.P0UePusch p0UePusch = new RRMConfig.P0UePusch();
257
258 List<BerInteger> collect = Lists.newArrayList();
259 collect.add(new BerInteger(p0_ue_pusch.asInt()));
260 p0UePusch.setSeqOf(collect);
261
262 rrmParameters.setP0UePusch(p0UePusch);
263 }
264 }
265
266 {
267 JsonNode sub_frame_bitmask_ul = rrmConfigNode.path("sub_frame_bitmask_ul");
268 if (!sub_frame_bitmask_ul.isMissingNode()) {
269 RRMConfig.SubframeBitmaskUl subframeBitmaskUl = new RRMConfig.SubframeBitmaskUl();
270 List<BerBitString> collect = Lists.newArrayList();
271
272 byte[] hexString = DatatypeConverter.parseHexBinary(sub_frame_bitmask_ul.asText());
273 collect.add(new BerBitString(hexString, 10));
274 subframeBitmaskUl.setSeqOf(collect);
275 rrmParameters.setSubframeBitmaskUl(subframeBitmaskUl);
276 }
277 }
slowr8ddc2b12017-08-14 14:13:38 -0700278 }
279
slowr60d4d102017-08-16 18:33:58 -0700280 @JsonProperty("PDCP-Throughput")
slowr13fa5b02017-08-08 16:32:31 -0700281 public PDCPThroughput getPdcpThroughput() {
282 return pdcpThroughput;
283 }
284
slowr60d4d102017-08-16 18:33:58 -0700285 @JsonProperty("PDCP-Throughput")
slowr13fa5b02017-08-08 16:32:31 -0700286 public void setPdcpThroughput(PDCPThroughput pdcpThroughput) {
287 this.pdcpThroughput = pdcpThroughput;
288 }
289
slowr60d4d102017-08-16 18:33:58 -0700290 @JsonProperty("PDCP-Packet-Delay")
slowr13fa5b02017-08-08 16:32:31 -0700291 public PDCPPacketDelay getPdcpPackDelay() {
292 return pdcpPackDelay;
293 }
294
slowr60d4d102017-08-16 18:33:58 -0700295 @JsonProperty("PDCP-Packet-Delay")
slowr13fa5b02017-08-08 16:32:31 -0700296 public void setPdcpPackDelay(PDCPPacketDelay pdcpPackDelay) {
297 this.pdcpPackDelay = pdcpPackDelay;
298 }
299
slowr60d4d102017-08-16 18:33:58 -0700300 @JsonProperty("Resource-Usage")
slowr13fa5b02017-08-08 16:32:31 -0700301 public ResourceUsage getResourceUsage() {
302 return resourceUsage;
303 }
304
slowr60d4d102017-08-16 18:33:58 -0700305 @JsonProperty("Resource-Usage")
slowr13fa5b02017-08-08 16:32:31 -0700306 public void setResourceUsage(ResourceUsage resourceUsage) {
307 this.resourceUsage = resourceUsage;
308 }
309
310 @Override
311 public String toString() {
slowr60d4d102017-08-16 18:33:58 -0700312 return "RnibLink{" +
313 "linkId=" + linkId +
314 ", rrmParameters=" + rrmParameters +
315 ", trafficPercent=" + trafficPercent +
316 ", bearerParameters=" + bearerParameters +
317 ", quality=" + quality +
318 ", pdcpThroughput=" + pdcpThroughput +
319 ", pdcpPackDelay=" + pdcpPackDelay +
320 ", resourceUsage=" + resourceUsage +
321 ", type=" + type +
322 ", timer=" + timer +
323 '}';
slowr13fa5b02017-08-08 16:32:31 -0700324 }
325
326 @Override
327 public boolean equals(Object o) {
328 if (this == o) return true;
329 if (o == null || getClass() != o.getClass()) return false;
330
331 RnibLink link = (RnibLink) o;
332
333 return linkId.equals(link.linkId);
334 }
335
336 @Override
337 public int hashCode() {
338 return linkId.hashCode();
339 }
340
341 public enum Type {
slowr67d05e42017-08-11 20:37:22 -0700342 SERVING_PRIMARY("serving/primary") {
slowr13fa5b02017-08-08 16:32:31 -0700343 @Override
344 public String toString() {
345 return "\"serving/primary\"";
346 }
347 },
348 // TODO: Add CA/DC
slowr89c2ac12017-08-15 16:20:06 -0700349 SERVING_SECONDARY_CA("serving/secondary/ca") {
slowr13fa5b02017-08-08 16:32:31 -0700350 @Override
351 public String toString() {
slowr89c2ac12017-08-15 16:20:06 -0700352 return "\"serving/secondary/ca\"";
353 }
354 },
355 SERVING_SECONDARY_DC("serving/secondary/dc") {
356 @Override
357 public String toString() {
358 return "\"serving/secondary/dc\"";
slowr13fa5b02017-08-08 16:32:31 -0700359 }
360 },
slowr67d05e42017-08-11 20:37:22 -0700361 NON_SERVING("non-serving") {
slowr13fa5b02017-08-08 16:32:31 -0700362 @Override
363 public String toString() {
364 return "\"non-serving\"";
365 }
slowr67d05e42017-08-11 20:37:22 -0700366 };
367
368 private String name;
369
370 Type(String name) {
371 this.name = name;
372 }
373
374 public static Type getEnum(String name) {
375 Optional<Type> any = Arrays.stream(Type.values()).filter(typeStr -> typeStr.name.equals(name)).findAny();
376 if (any.isPresent()) {
377 return any.get();
378 }
379 throw new IllegalArgumentException("No enum defined for string: " + name);
slowr13fa5b02017-08-08 16:32:31 -0700380 }
381 }
382
slowr60d4d102017-08-16 18:33:58 -0700383 @JsonPropertyOrder({
slowrc153ad92017-08-16 19:47:52 -0700384 "RX",
385 "CQI",
386 "MCS"
387 })
388 @JsonIgnoreProperties(ignoreUnknown = true)
389 public static class LinkQuality {
390 RX RX = null;
391 CQI CQI = null;
392 MCS MCS = null;
393
394 public LinkQuality.RX getRX() {
395 return RX;
396 }
397
398 public void setRX(LinkQuality.RX RX) {
399 this.RX = RX;
400 }
401
402 public LinkQuality.CQI getCQI() {
403 return CQI;
404 }
405
406 public void setCQI(LinkQuality.CQI CQI) {
407 this.CQI = CQI;
408 }
409
410 public LinkQuality.MCS getMCS() {
411 return MCS;
412 }
413
414 public void setMCS(LinkQuality.MCS MCS) {
415 this.MCS = MCS;
416 }
417
418 @JsonPropertyOrder({
419 "RSRP",
420 "RSRQ",
421 "timesincelastupdate"
422 })
423 @JsonIgnoreProperties(ignoreUnknown = true)
424 public static class RX {
425 double RSRP;
426 double RSRQ;
427 WallClockTimestamp timesincelastupdate;
428
429 @JsonCreator
430 public RX(@JsonProperty("RSRP") double RSRP, @JsonProperty("RSRQ") double RSRQ) {
431 this.RSRP = RSRP;
432 this.RSRQ = RSRQ;
433 this.timesincelastupdate = new WallClockTimestamp();
434 }
435
436 public double getRSRP() {
437 return RSRP;
438 }
439
440 public void setRSRP(double RSRP) {
441 this.RSRP = RSRP;
442 }
443
444 public double getRSRQ() {
445 return RSRQ;
446 }
447
448 public void setRSRQ(double RSRQ) {
449 this.RSRQ = RSRQ;
450 }
451
452 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700453 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700454 }
455
456 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
457 this.timesincelastupdate = timesincelastupdate;
458 }
459
460 @Override
461 public String toString() {
462 return "RX{" +
463 "RSRP=" + RSRP +
464 ", RSRQ=" + RSRQ +
slowr7bebd7b2017-08-17 11:46:11 -0700465 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowrc153ad92017-08-16 19:47:52 -0700466 '}';
467 }
468 }
469
470 @JsonPropertyOrder({
471 "Hist",
472 "Mode",
473 "Mean",
474 "timesincelastupdate"
475 })
476 @JsonIgnoreProperties(ignoreUnknown = true)
477 public static class CQI {
478 RadioRepPerServCell.CqiHist Hist;
479 double Mode;
480 double Mean;
481 WallClockTimestamp timesincelastupdate;
482
483 @JsonCreator
484 public CQI(@JsonProperty("Hist") RadioRepPerServCell.CqiHist hist, @JsonProperty("Mode") double mode, @JsonProperty("Mean") double mean) {
485 Hist = hist;
486 Mode = mode;
487 Mean = mean;
488 this.timesincelastupdate = new WallClockTimestamp();
489 }
490
491 public RadioRepPerServCell.CqiHist getHist() {
492 return Hist;
493 }
494
495 public void setHist(RadioRepPerServCell.CqiHist hist) {
496 Hist = hist;
497 }
498
499 public double getMode() {
500 return Mode;
501 }
502
503 public void setMode(double mode) {
504 Mode = mode;
505 }
506
507 public double getMean() {
508 return Mean;
509 }
510
511 public void setMean(double mean) {
512 Mean = mean;
513 }
514
515 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700516 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700517 }
518
519 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
520 this.timesincelastupdate = timesincelastupdate;
521 }
522
523 @Override
524 public String toString() {
525 return "CQI{" +
526 "Hist=" + Hist +
527 ", Mode=" + Mode +
528 ", Mean=" + Mean +
slowr7bebd7b2017-08-17 11:46:11 -0700529 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowrc153ad92017-08-16 19:47:52 -0700530 '}';
531 }
532 }
533
534 @JsonPropertyOrder({
535 "dl",
536 "ul",
537 "timesincelastupdate"
538 })
539 @JsonIgnoreProperties(ignoreUnknown = true)
540 public static class MCS {
541 SchedMeasRepPerServCell.McsDl dl;
542 SchedMeasRepPerServCell.McsUl ul;
543 WallClockTimestamp timesincelastupdate;
544
545 @JsonCreator
546 public MCS(@JsonProperty("dl") SchedMeasRepPerServCell.McsDl dl, @JsonProperty("ul") SchedMeasRepPerServCell.McsUl ul) {
547 this.dl = dl;
548 this.ul = ul;
549 this.timesincelastupdate = new WallClockTimestamp();
550 }
551
552 public SchedMeasRepPerServCell.McsDl getDl() {
553 return dl;
554 }
555
556 public void setDl(SchedMeasRepPerServCell.McsDl dl) {
557 this.dl = dl;
558 }
559
560 public SchedMeasRepPerServCell.McsUl getUl() {
561 return ul;
562 }
563
564 public void setUl(SchedMeasRepPerServCell.McsUl ul) {
565 this.ul = ul;
566 }
567
568 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700569 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700570 }
571
572 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
573 this.timesincelastupdate = timesincelastupdate;
574 }
575
576 @Override
577 public String toString() {
578 return "MCS{" +
579 "dl=" + dl +
580 ", ul=" + ul +
slowr7bebd7b2017-08-17 11:46:11 -0700581 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowrc153ad92017-08-16 19:47:52 -0700582 '}';
583 }
584 }
585
586 }
587
588 @JsonPropertyOrder({
slowr60d4d102017-08-16 18:33:58 -0700589 "dl",
590 "ul"
591 })
592 @JsonIgnoreProperties(ignoreUnknown = true)
slowrc153ad92017-08-16 19:47:52 -0700593 public static class PDCPThroughput {
594 WallClockTimestamp timesincelastupdate;
slowr13fa5b02017-08-08 16:32:31 -0700595 private PDCPMeasReportPerUe.ThroughputDl dl;
596 private PDCPMeasReportPerUe.ThroughputUl ul;
597
slowrc153ad92017-08-16 19:47:52 -0700598 @JsonCreator
599 public PDCPThroughput(@JsonProperty("dl") PDCPMeasReportPerUe.ThroughputDl dl, @JsonProperty("ul") PDCPMeasReportPerUe.ThroughputUl ul) {
600 this.dl = dl;
601 this.ul = ul;
602 this.timesincelastupdate = new WallClockTimestamp();
603 }
604
slowr13fa5b02017-08-08 16:32:31 -0700605 public PDCPMeasReportPerUe.ThroughputDl getDl() {
606 return dl;
607 }
608
609 public void setDl(PDCPMeasReportPerUe.ThroughputDl dl) {
610 this.dl = dl;
611 }
612
613 public PDCPMeasReportPerUe.ThroughputUl getUl() {
614 return ul;
615 }
616
617 public void setUl(PDCPMeasReportPerUe.ThroughputUl ul) {
618 this.ul = ul;
619 }
620
slowrc153ad92017-08-16 19:47:52 -0700621 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700622 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700623 }
624
625 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
626 this.timesincelastupdate = timesincelastupdate;
627 }
628
slowr13fa5b02017-08-08 16:32:31 -0700629 @Override
slowrc153ad92017-08-16 19:47:52 -0700630 public String
631 toString() {
slowr60d4d102017-08-16 18:33:58 -0700632 return "PDCPThroughput{" +
633 "dl=" + dl +
634 ", ul=" + ul +
slowr7bebd7b2017-08-17 11:46:11 -0700635 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowr60d4d102017-08-16 18:33:58 -0700636 '}';
slowr13fa5b02017-08-08 16:32:31 -0700637 }
638 }
639
slowr60d4d102017-08-16 18:33:58 -0700640 @JsonPropertyOrder({
641 "dl",
642 "ul"
643 })
644 @JsonIgnoreProperties(ignoreUnknown = true)
slowrc153ad92017-08-16 19:47:52 -0700645 public static class PDCPPacketDelay {
slowr13fa5b02017-08-08 16:32:31 -0700646 PDCPMeasReportPerUe.PktDelayDl dl;
647 PDCPMeasReportPerUe.PktDelayUl ul;
slowrc153ad92017-08-16 19:47:52 -0700648 WallClockTimestamp timesincelastupdate;
649
650 @JsonCreator
651 public PDCPPacketDelay(@JsonProperty("dl") PDCPMeasReportPerUe.PktDelayDl dl, @JsonProperty("ul") PDCPMeasReportPerUe.PktDelayUl ul) {
652 this.dl = dl;
653 this.ul = ul;
654 this.timesincelastupdate = new WallClockTimestamp();
655 }
slowr13fa5b02017-08-08 16:32:31 -0700656
657 public PDCPMeasReportPerUe.PktDelayDl getDl() {
658 return dl;
659 }
660
661 public void setDl(PDCPMeasReportPerUe.PktDelayDl dl) {
662 this.dl = dl;
663 }
664
665 public PDCPMeasReportPerUe.PktDelayUl getUl() {
666 return ul;
667 }
668
669 public void setUl(PDCPMeasReportPerUe.PktDelayUl ul) {
670 this.ul = ul;
671 }
672
slowrc153ad92017-08-16 19:47:52 -0700673 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700674 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700675 }
676
677 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
678 this.timesincelastupdate = timesincelastupdate;
679 }
680
slowr13fa5b02017-08-08 16:32:31 -0700681 @Override
682 public String toString() {
slowr60d4d102017-08-16 18:33:58 -0700683 return "PDCPPacketDelay{" +
684 "dl=" + dl +
685 ", ul=" + ul +
slowr7bebd7b2017-08-17 11:46:11 -0700686 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowr60d4d102017-08-16 18:33:58 -0700687 '}';
slowr13fa5b02017-08-08 16:32:31 -0700688 }
689 }
690
slowr60d4d102017-08-16 18:33:58 -0700691 @JsonPropertyOrder({
692 "dl",
693 "ul"
694 })
695 @JsonIgnoreProperties(ignoreUnknown = true)
slowrc153ad92017-08-16 19:47:52 -0700696 public static class ResourceUsage {
slowr13fa5b02017-08-08 16:32:31 -0700697 PRBUsage.PrbUsageDl dl;
698 PRBUsage.PrbUsageUl ul;
slowrc153ad92017-08-16 19:47:52 -0700699 WallClockTimestamp timesincelastupdate;
700
701 @JsonCreator
702 public ResourceUsage(@JsonProperty("dl") PRBUsage.PrbUsageDl dl, @JsonProperty("ul") PRBUsage.PrbUsageUl ul) {
703 this.dl = dl;
704 this.ul = ul;
705 this.timesincelastupdate = new WallClockTimestamp();
706 }
slowr13fa5b02017-08-08 16:32:31 -0700707
708 public PRBUsage.PrbUsageDl getDl() {
709 return dl;
710 }
711
712 public void setDl(PRBUsage.PrbUsageDl dl) {
713 this.dl = dl;
714 }
715
716 public PRBUsage.PrbUsageUl getUl() {
717 return ul;
718 }
719
720 public void setUl(PRBUsage.PrbUsageUl ul) {
721 this.ul = ul;
722 }
723
slowrc153ad92017-08-16 19:47:52 -0700724 public long getTimesincelastupdate() {
slowr7bebd7b2017-08-17 11:46:11 -0700725 return new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp();
slowrc153ad92017-08-16 19:47:52 -0700726 }
727
728 public void setTimesincelastupdate(WallClockTimestamp timesincelastupdate) {
729 this.timesincelastupdate = timesincelastupdate;
730 }
731
slowr13fa5b02017-08-08 16:32:31 -0700732 @Override
733 public String toString() {
slowr60d4d102017-08-16 18:33:58 -0700734 return "ResourceUsage{" +
735 "dl=" + dl +
736 ", ul=" + ul +
slowr7bebd7b2017-08-17 11:46:11 -0700737 ", timesincelastupdate=" + (new WallClockTimestamp().unixTimestamp() - timesincelastupdate.unixTimestamp()) +
slowr60d4d102017-08-16 18:33:58 -0700738 '}';
slowr13fa5b02017-08-08 16:32:31 -0700739 }
740 }
741}