mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 21:39:21 +00:00
Compare commits
6 Commits
NETEXP-267
...
WIFI-3358-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
534ed3e9c0 | ||
|
|
a6ec1d6e7f | ||
|
|
a19fc425c2 | ||
|
|
fc8cab6a50 | ||
|
|
78c4d3a862 | ||
|
|
3f3e40d2dd |
@@ -31,7 +31,6 @@ import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionMetricDetails;
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
import com.telecominfraproject.wlan.core.model.entity.MinMaxAvgValueInt;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
@@ -829,16 +828,6 @@ public class AllInOneWithGatewayStartListener implements ApplicationRunner {
|
||||
|
||||
sessionDetails.setDhcpDetails(dhcpDetails );
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
metricDetails.setRssi(getRandomInt(-60, -40));
|
||||
metricDetails.setRxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setTxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setRxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setTxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setSnr(getRandomInt(-90, -50));
|
||||
|
||||
sessionDetails.setMetricDetails(metricDetails);
|
||||
|
||||
clientSession.setDetails(sessionDetails);
|
||||
|
||||
this.clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
@@ -38,7 +38,6 @@ import com.telecominfraproject.wlan.client.models.Client;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientDhcpDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSession;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionDetails;
|
||||
import com.telecominfraproject.wlan.client.session.models.ClientSessionMetricDetails;
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
import com.telecominfraproject.wlan.core.model.entity.MinMaxAvgValueInt;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.EquipmentType;
|
||||
@@ -1238,8 +1237,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1265,8 +1262,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1292,8 +1287,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
clientMetrics.setNumRxBytes(getRandomLong(3000000, 7000000));
|
||||
clientMetrics.setNumTxBytes(getRandomLong(3000000, 7000000));
|
||||
|
||||
clientMetrics.setSessionId(Long.toUnsignedString(getRandomLong(3000000, 7000000)));
|
||||
|
||||
clientMetrics.setTxRetries(getRandomInt(30, 70));
|
||||
clientMetrics.setRxDuplicatePackets(getRandomInt(30, 70));
|
||||
clientMetrics.setSnr(getRandomInt(-70, -30));
|
||||
@@ -1380,16 +1373,6 @@ public class AllInOneStartListener implements ApplicationRunner {
|
||||
|
||||
sessionDetails.setDhcpDetails(dhcpDetails);
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
metricDetails.setRssi(getRandomInt(-60, -40));
|
||||
metricDetails.setRxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setTxBytes(getRandomLong(10000, 10000000));
|
||||
metricDetails.setRxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setTxMbps(getRandomFloat(50, 100));
|
||||
metricDetails.setSnr(getRandomInt(-90, -50));
|
||||
|
||||
sessionDetails.setMetricDetails(metricDetails);
|
||||
|
||||
clientSession.setDetails(sessionDetails);
|
||||
|
||||
this.clientServiceInterface.updateSession(clientSession);
|
||||
|
||||
@@ -42,7 +42,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
private String cpUsername;
|
||||
private ClientDhcpDetails dhcpDetails;
|
||||
private ClientEapDetails eapDetails;
|
||||
private ClientSessionMetricDetails metricDetails;
|
||||
private Boolean isReassociation;
|
||||
private Integer disconnectByApReasonCode;
|
||||
private Integer disconnectByClientReasonCode;
|
||||
@@ -154,12 +153,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastEventTimestamp() {
|
||||
if (getMetricDetails() != null) {
|
||||
if (lastEventTimestamp != null) {
|
||||
return Math.max(getMetricDetails().getLastMetricTimestamp(), lastEventTimestamp);
|
||||
}
|
||||
return getMetricDetails().getLastMetricTimestamp();
|
||||
}
|
||||
return lastEventTimestamp;
|
||||
}
|
||||
|
||||
@@ -192,13 +185,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastRxTimestamp() {
|
||||
if (lastRxTimestamp != null && getMetricDetails() != null && getMetricDetails().getLastRxTimestamp() != null) {
|
||||
return Math.max(lastRxTimestamp, getMetricDetails().getLastRxTimestamp());
|
||||
} else if (lastRxTimestamp != null) {
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
|
||||
return getMetricDetails() == null ? null : getMetricDetails().getLastRxTimestamp();
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
|
||||
public void setLastRxTimestamp(Long lastRxTimestamp) {
|
||||
@@ -206,12 +193,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
}
|
||||
|
||||
public Long getLastTxTimestamp() {
|
||||
if (lastTxTimestamp != null && getMetricDetails() != null && getMetricDetails().getLastTxTimestamp() != null) {
|
||||
return Math.max(lastTxTimestamp, getMetricDetails().getLastTxTimestamp());
|
||||
} else if (lastTxTimestamp != null) {
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
return getMetricDetails() == null ? null : getMetricDetails().getLastTxTimestamp();
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
|
||||
public void setLastTxTimestamp(Long lastTxTimestamp) {
|
||||
@@ -257,14 +239,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
this.eapDetails = eapDetails;
|
||||
}
|
||||
|
||||
public ClientSessionMetricDetails getMetricDetails() {
|
||||
return metricDetails;
|
||||
}
|
||||
|
||||
public void setMetricDetails(ClientSessionMetricDetails metricDetails) {
|
||||
this.metricDetails = metricDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* RADIUS 802.1x EAP_Success timestamp
|
||||
*
|
||||
@@ -514,9 +488,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
return AssociationState.Cloud_Timeout;
|
||||
|
||||
}
|
||||
if (firstDataRcvdTimestamp != null || firstDataSentTimestamp != null
|
||||
|| (getMetricDetails() != null && (getMetricDetails().getLastRxTimestamp() != null
|
||||
|| getMetricDetails().getLastTxTimestamp() != null))) {
|
||||
if (firstDataRcvdTimestamp != null || firstDataSentTimestamp != null) {
|
||||
return AssociationState.Active_Data;
|
||||
}
|
||||
if (assocTimestamp != null) {
|
||||
@@ -535,9 +507,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
if (this.eapDetails != null) {
|
||||
ret.setEapDetails(this.eapDetails.clone());
|
||||
}
|
||||
if (this.metricDetails != null) {
|
||||
ret.setMetricDetails(this.metricDetails.clone());
|
||||
}
|
||||
if (this.lastFailureDetails != null) {
|
||||
ret.setLastFailureDetails(this.lastFailureDetails.clone());
|
||||
}
|
||||
@@ -554,7 +523,7 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
disconnectByApTimestamp, disconnectByClientInternalReasonCode, disconnectByClientReasonCode,
|
||||
disconnectByClientTimestamp, dynamicVlan, eapDetails, firstDataRcvdTimestamp, firstDataSentTimestamp,
|
||||
firstFailureDetails, hostname, ipAddress, ipTimestamp, is11KUsed, is11RUsed, is11VUsed, isReassociation,
|
||||
lastEventTimestamp, lastFailureDetails, lastRxTimestamp, lastTxTimestamp, metricDetails,
|
||||
lastEventTimestamp, lastFailureDetails, lastRxTimestamp, lastTxTimestamp,
|
||||
portEnabledTimestamp, previousValidSessionId, priorEquipmentId, priorSessionId, radioType,
|
||||
radiusUsername, securityType, sessionId, ssid, steerType, timeoutTimestamp, userAgentStr,
|
||||
associationState);
|
||||
@@ -594,7 +563,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
&& Objects.equals(lastFailureDetails, other.lastFailureDetails)
|
||||
&& Objects.equals(lastRxTimestamp, other.lastRxTimestamp)
|
||||
&& Objects.equals(lastTxTimestamp, other.lastTxTimestamp)
|
||||
&& Objects.equals(metricDetails, other.metricDetails)
|
||||
&& Objects.equals(portEnabledTimestamp, other.portEnabledTimestamp)
|
||||
&& Objects.equals(previousValidSessionId, other.previousValidSessionId)
|
||||
&& Objects.equals(priorEquipmentId, other.priorEquipmentId)
|
||||
@@ -677,9 +645,6 @@ public class ClientSessionDetails extends BaseJsonModel {
|
||||
} else if (latest.eapDetails != null) {
|
||||
this.eapDetails.mergeDetails(latest.eapDetails);
|
||||
}
|
||||
if (null != latest.metricDetails) {
|
||||
this.metricDetails = latest.metricDetails;
|
||||
}
|
||||
|
||||
if (null != latest.getIsReassociation()) {
|
||||
this.isReassociation = latest.getIsReassociation();
|
||||
|
||||
@@ -1,365 +0,0 @@
|
||||
package com.telecominfraproject.wlan.client.session.models;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
|
||||
/**
|
||||
* @author ekeddy
|
||||
*
|
||||
*/
|
||||
public class ClientSessionMetricDetails extends BaseJsonModel
|
||||
{
|
||||
private static final long serialVersionUID = -6626815155700131150L;
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClientSessionMetricDetails.class);
|
||||
|
||||
private Long rxBytes;
|
||||
private Long txBytes;
|
||||
private Long totalRxPackets;
|
||||
private Long totalTxPackets;
|
||||
private Float rxMbps;
|
||||
private Float txMbps;
|
||||
private Integer rssi;
|
||||
private Integer snr;
|
||||
private Long rxRateKbps; // from MCS
|
||||
private Long txRateKbps; // from MCS
|
||||
private long lastMetricTimestamp;
|
||||
private Long lastRxTimestamp;
|
||||
private Long lastTxTimestamp;
|
||||
private String classification;
|
||||
|
||||
/**
|
||||
* The number of dataframes transmitted TO the client from the AP.
|
||||
*/
|
||||
private Integer txDataFrames;
|
||||
|
||||
/**
|
||||
* The number of data frames transmitted TO the client that were retried.
|
||||
* Note this is not the same as the number of retries.
|
||||
*/
|
||||
private Integer txDataFramesRetried;
|
||||
|
||||
/**
|
||||
* The number of dataframes transmitted FROM the client TO the AP.
|
||||
*/
|
||||
private Integer rxDataFrames;
|
||||
|
||||
|
||||
public Long getRxBytes() {
|
||||
return rxBytes;
|
||||
}
|
||||
public void setRxBytes(Long rxBytes) {
|
||||
this.rxBytes = rxBytes;
|
||||
}
|
||||
public Long getTxBytes() {
|
||||
return txBytes;
|
||||
}
|
||||
public void setTxBytes(Long txBytes) {
|
||||
this.txBytes = txBytes;
|
||||
}
|
||||
public Long getTotalRxPackets() {
|
||||
return totalRxPackets;
|
||||
}
|
||||
public void setTotalRxPackets(Long totalRxPackets) {
|
||||
this.totalRxPackets = totalRxPackets;
|
||||
}
|
||||
public Long getTotalTxPackets() {
|
||||
return totalTxPackets;
|
||||
}
|
||||
public void setTotalTxPackets(Long totalTxPackets) {
|
||||
this.totalTxPackets = totalTxPackets;
|
||||
}
|
||||
public Float getRxMbps() {
|
||||
return rxMbps;
|
||||
}
|
||||
public void setRxMbps(Float rxMbps) {
|
||||
this.rxMbps = rxMbps;
|
||||
}
|
||||
public Float getTxMbps() {
|
||||
return txMbps;
|
||||
}
|
||||
public void setTxMbps(Float txMbps) {
|
||||
this.txMbps = txMbps;
|
||||
}
|
||||
public Integer getRssi() {
|
||||
return rssi;
|
||||
}
|
||||
public void setRssi(Integer rssi) {
|
||||
this.rssi = rssi;
|
||||
}
|
||||
public Integer getSnr() {
|
||||
return snr;
|
||||
}
|
||||
public void setSnr(Integer snr) {
|
||||
this.snr = snr;
|
||||
}
|
||||
public Long getRxRateKbps() {
|
||||
return rxRateKbps;
|
||||
}
|
||||
public void setRxRateKbps(Long rxRateKbps) {
|
||||
this.rxRateKbps = rxRateKbps;
|
||||
}
|
||||
public Long getTxRateKbps() {
|
||||
return txRateKbps;
|
||||
}
|
||||
public void setTxRateKbps(Long txRateKbps) {
|
||||
this.txRateKbps = txRateKbps;
|
||||
}
|
||||
|
||||
|
||||
public Integer getTxDataFrames() {
|
||||
return txDataFrames;
|
||||
}
|
||||
public void setTxDataFrames(Integer txDataFrames) {
|
||||
this.txDataFrames = txDataFrames;
|
||||
}
|
||||
public Integer getTxDataFramesRetried() {
|
||||
return txDataFramesRetried;
|
||||
}
|
||||
public void setTxDataFramesRetried(Integer txDataFramesRetried) {
|
||||
this.txDataFramesRetried = txDataFramesRetried;
|
||||
}
|
||||
|
||||
public long getLastMetricTimestamp() {
|
||||
return lastMetricTimestamp;
|
||||
}
|
||||
public void setLastMetricTimestamp(long lastMetricTimestamp) {
|
||||
this.lastMetricTimestamp = lastMetricTimestamp;
|
||||
}
|
||||
|
||||
public Long getLastRxTimestamp() {
|
||||
return lastRxTimestamp;
|
||||
}
|
||||
public void setLastRxTimestamp(Long lastRxTimestamp) {
|
||||
this.lastRxTimestamp = lastRxTimestamp;
|
||||
}
|
||||
public Long getLastTxTimestamp() {
|
||||
return lastTxTimestamp;
|
||||
}
|
||||
public void setLastTxTimestamp(Long lastTxTimestamp) {
|
||||
this.lastTxTimestamp = lastTxTimestamp;
|
||||
}
|
||||
|
||||
|
||||
public Integer getRxDataFrames() {
|
||||
return rxDataFrames;
|
||||
}
|
||||
public void setRxDataFrames(Integer rxDataFrames) {
|
||||
this.rxDataFrames = rxDataFrames;
|
||||
}
|
||||
public String getClassification() {
|
||||
return classification;
|
||||
}
|
||||
public void setClassification(String classification) {
|
||||
this.classification = classification;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((classification == null) ? 0 : classification.hashCode());
|
||||
result = prime * result + (int) (lastMetricTimestamp ^ (lastMetricTimestamp >>> 32));
|
||||
result = prime * result + ((lastRxTimestamp == null) ? 0 : lastRxTimestamp.hashCode());
|
||||
result = prime * result + ((lastTxTimestamp == null) ? 0 : lastTxTimestamp.hashCode());
|
||||
result = prime * result + ((rssi == null) ? 0 : rssi.hashCode());
|
||||
result = prime * result + ((rxBytes == null) ? 0 : rxBytes.hashCode());
|
||||
result = prime * result + ((rxDataFrames == null) ? 0 : rxDataFrames.hashCode());
|
||||
result = prime * result + ((rxMbps == null) ? 0 : rxMbps.hashCode());
|
||||
result = prime * result + ((rxRateKbps == null) ? 0 : rxRateKbps.hashCode());
|
||||
result = prime * result + ((snr == null) ? 0 : snr.hashCode());
|
||||
result = prime * result + ((totalRxPackets == null) ? 0 : totalRxPackets.hashCode());
|
||||
result = prime * result + ((totalTxPackets == null) ? 0 : totalTxPackets.hashCode());
|
||||
result = prime * result + ((txBytes == null) ? 0 : txBytes.hashCode());
|
||||
result = prime * result + ((txDataFrames == null) ? 0 : txDataFrames.hashCode());
|
||||
result = prime * result + ((txDataFramesRetried == null) ? 0 : txDataFramesRetried.hashCode());
|
||||
result = prime * result + ((txMbps == null) ? 0 : txMbps.hashCode());
|
||||
result = prime * result + ((txRateKbps == null) ? 0 : txRateKbps.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ClientSessionMetricDetails other = (ClientSessionMetricDetails) obj;
|
||||
if (classification == null) {
|
||||
if (other.classification != null)
|
||||
return false;
|
||||
} else if (!classification.equals(other.classification))
|
||||
return false;
|
||||
if (lastMetricTimestamp != other.lastMetricTimestamp)
|
||||
return false;
|
||||
if (lastRxTimestamp == null) {
|
||||
if (other.lastRxTimestamp != null)
|
||||
return false;
|
||||
} else if (!lastRxTimestamp.equals(other.lastRxTimestamp))
|
||||
return false;
|
||||
if (lastTxTimestamp == null) {
|
||||
if (other.lastTxTimestamp != null)
|
||||
return false;
|
||||
} else if (!lastTxTimestamp.equals(other.lastTxTimestamp))
|
||||
return false;
|
||||
if (rssi == null) {
|
||||
if (other.rssi != null)
|
||||
return false;
|
||||
} else if (!rssi.equals(other.rssi))
|
||||
return false;
|
||||
if (rxBytes == null) {
|
||||
if (other.rxBytes != null)
|
||||
return false;
|
||||
} else if (!rxBytes.equals(other.rxBytes))
|
||||
return false;
|
||||
if (rxDataFrames == null) {
|
||||
if (other.rxDataFrames != null)
|
||||
return false;
|
||||
} else if (!rxDataFrames.equals(other.rxDataFrames))
|
||||
return false;
|
||||
if (rxMbps == null) {
|
||||
if (other.rxMbps != null)
|
||||
return false;
|
||||
} else if (!rxMbps.equals(other.rxMbps))
|
||||
return false;
|
||||
if (rxRateKbps == null) {
|
||||
if (other.rxRateKbps != null)
|
||||
return false;
|
||||
} else if (!rxRateKbps.equals(other.rxRateKbps))
|
||||
return false;
|
||||
if (snr == null) {
|
||||
if (other.snr != null)
|
||||
return false;
|
||||
} else if (!snr.equals(other.snr))
|
||||
return false;
|
||||
if (totalRxPackets == null) {
|
||||
if (other.totalRxPackets != null)
|
||||
return false;
|
||||
} else if (!totalRxPackets.equals(other.totalRxPackets))
|
||||
return false;
|
||||
if (totalTxPackets == null) {
|
||||
if (other.totalTxPackets != null)
|
||||
return false;
|
||||
} else if (!totalTxPackets.equals(other.totalTxPackets))
|
||||
return false;
|
||||
if (txBytes == null) {
|
||||
if (other.txBytes != null)
|
||||
return false;
|
||||
} else if (!txBytes.equals(other.txBytes))
|
||||
return false;
|
||||
if (txDataFrames == null) {
|
||||
if (other.txDataFrames != null)
|
||||
return false;
|
||||
} else if (!txDataFrames.equals(other.txDataFrames))
|
||||
return false;
|
||||
if (txDataFramesRetried == null) {
|
||||
if (other.txDataFramesRetried != null)
|
||||
return false;
|
||||
} else if (!txDataFramesRetried.equals(other.txDataFramesRetried))
|
||||
return false;
|
||||
if (txMbps == null) {
|
||||
if (other.txMbps != null)
|
||||
return false;
|
||||
} else if (!txMbps.equals(other.txMbps))
|
||||
return false;
|
||||
if (txRateKbps == null) {
|
||||
if (other.txRateKbps != null)
|
||||
return false;
|
||||
} else if (!txRateKbps.equals(other.txRateKbps))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ClientSessionMetricDetails clone() {
|
||||
ClientSessionMetricDetails ret = (ClientSessionMetricDetails) super.clone();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void merge(ClientSessionMetricDetails other) {
|
||||
boolean isLatestMetric = false;
|
||||
if(lastMetricTimestamp<other.lastMetricTimestamp) {
|
||||
this.setLastMetricTimestamp(other.lastMetricTimestamp);
|
||||
isLatestMetric = true;
|
||||
}
|
||||
|
||||
// These properties just take the latest value
|
||||
if(isLatestMetric) {
|
||||
if(other.rssi != null) {
|
||||
this.rssi = other.rssi;
|
||||
}
|
||||
if(other.rxMbps != null) {
|
||||
this.rxMbps = other.rxMbps;
|
||||
}
|
||||
if(other.txMbps != null) {
|
||||
this.txMbps = other.txMbps;
|
||||
}
|
||||
if(other.rxRateKbps != null) {
|
||||
this.rxRateKbps = other.rxRateKbps;
|
||||
}
|
||||
if(other.txRateKbps != null) {
|
||||
this.txRateKbps = other.txRateKbps;
|
||||
}
|
||||
if(other.totalRxPackets != null) {
|
||||
this.totalRxPackets = other.totalRxPackets;
|
||||
}
|
||||
if(other.totalTxPackets != null) {
|
||||
this.totalTxPackets = other.totalTxPackets;
|
||||
}
|
||||
if(other.lastRxTimestamp != null) {
|
||||
this.lastRxTimestamp = other.lastRxTimestamp;
|
||||
}
|
||||
if(other.lastTxTimestamp != null) {
|
||||
this.lastTxTimestamp = other.lastTxTimestamp;
|
||||
}
|
||||
}
|
||||
if(other.txDataFrames != null) {
|
||||
// this is a delta
|
||||
this.setTxDataFrames(sum(this.txDataFrames,other.txDataFrames));
|
||||
}
|
||||
if(other.txDataFramesRetried != null) {
|
||||
// this is a delta
|
||||
this.setTxDataFramesRetried(sum(this.txDataFramesRetried,other.txDataFramesRetried));
|
||||
}
|
||||
if(other.rxDataFrames != null) {
|
||||
// this is a delta
|
||||
this.setRxDataFrames(sum(this.rxDataFrames,other.rxDataFrames));
|
||||
}
|
||||
if(other.rxBytes != null)
|
||||
{
|
||||
// We keep the sum going
|
||||
LOG.trace("RxBytes: adding {} to {}", this.rxBytes, other.rxBytes);
|
||||
this.setRxBytes(sum(this.rxBytes, other.rxBytes));
|
||||
}
|
||||
if(other.txBytes != null)
|
||||
{
|
||||
// We keep the sum going
|
||||
LOG.trace("TxBytes: adding {} to {}", this.txBytes, other.txBytes);
|
||||
this.setTxBytes(sum(this.txBytes, other.txBytes));
|
||||
}
|
||||
|
||||
if(other.classification != null)
|
||||
{
|
||||
this.classification = other.classification;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static Integer sum(Integer v1, Integer v2) {
|
||||
if(v1 == null) return v2;
|
||||
if(v2 == null) return v1;
|
||||
return Integer.sum(v1, v2);
|
||||
}
|
||||
|
||||
|
||||
private static Long sum(Long v1, Long v2) {
|
||||
if(v1 == null) return v2;
|
||||
if(v2 == null) return v1;
|
||||
return Long.sum(v1, v2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class ElementRadioConfiguration extends BaseJsonModel
|
||||
|
||||
if (radioType == RadioType.is5GHz) {
|
||||
returnValue.setChannelNumber(36);
|
||||
returnValue.setBackupChannelNumber(153);
|
||||
returnValue.setBackupChannelNumber(149);
|
||||
} else if (radioType == RadioType.is5GHzL) {
|
||||
returnValue.setChannelNumber(36);
|
||||
returnValue.setBackupChannelNumber(44);
|
||||
|
||||
@@ -932,9 +932,9 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
assertEquals(11, radioMap.get(RadioType.is2dot4GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getManualChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
Map<RadioType, Integer> primaryChannels = new EnumMap<>(RadioType.class);
|
||||
Map<RadioType, Integer> backupChannels = new EnumMap<>(RadioType.class);
|
||||
@@ -970,7 +970,7 @@ public class EquipmentServiceRemoteTest extends BaseRemoteTest {
|
||||
assertEquals(6, radioMap.get(RadioType.is2dot4GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
assertEquals(36, radioMap.get(RadioType.is5GHz).getChannelNumber().intValue());
|
||||
assertEquals(153, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(149, radioMap.get(RadioType.is5GHz).getBackupChannelNumber().intValue());
|
||||
assertEquals(40, radioMap.get(RadioType.is5GHz).getManualChannelNumber().intValue());
|
||||
assertEquals(48, radioMap.get(RadioType.is5GHz).getManualBackupChannelNumber().intValue());
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
private Integer vhtMcs;
|
||||
private Integer snr;
|
||||
private Integer rssi;
|
||||
private String sessionId;
|
||||
private String classificationName;
|
||||
ChannelBandwidth channelBandWidth;
|
||||
GuardInterval guardInterval;
|
||||
@@ -953,7 +952,7 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
&& Arrays.equals(rates, other.rates) && Objects.equals(rssi, other.rssi)
|
||||
&& Objects.equals(rxBytes, other.rxBytes) && Objects.equals(rxDataBytes, other.rxDataBytes)
|
||||
&& Objects.equals(rxDuplicatePackets, other.rxDuplicatePackets)
|
||||
&& Objects.equals(rxLastRssi, other.rxLastRssi) && Objects.equals(sessionId, other.sessionId)
|
||||
&& Objects.equals(rxLastRssi, other.rxLastRssi)
|
||||
&& Objects.equals(snr, other.snr) && Objects.equals(txRetries, other.txRetries)
|
||||
&& Objects.equals(vhtMcs, other.vhtMcs) && Objects.equals(wmmQueueStats, other.wmmQueueStats);
|
||||
}
|
||||
@@ -1191,10 +1190,6 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
return rxLastRssi;
|
||||
}
|
||||
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public Integer getSnr() {
|
||||
return snr;
|
||||
}
|
||||
@@ -1288,7 +1283,7 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
numTxVHT_702_Mbps, numTxVHT_720_Mbps, numTxVHT_780_Mbps, numTxVHT_800_Mbps, numTxVHT_866_7_Mbps,
|
||||
numTxVHT_877_5_Mbps, numTxVHT_936_Mbps, numTxVHT_975_Mbps, numTx_12_Mbps, numTx_18_Mbps, numTx_1_Mbps,
|
||||
numTx_24_Mbps, numTx_36_Mbps, numTx_48_Mbps, numTx_54_Mbps, numTx_6_Mbps, numTx_9_Mbps, radioType,
|
||||
rateCount, rssi, rxBytes, rxDataBytes, rxDuplicatePackets, rxLastRssi, sessionId, snr, txRetries,
|
||||
rateCount, rssi, rxBytes, rxDataBytes, rxDuplicatePackets, rxLastRssi, snr, txRetries,
|
||||
vhtMcs, wmmQueueStats);
|
||||
return result;
|
||||
}
|
||||
@@ -1537,10 +1532,6 @@ public class ClientMetrics extends ServiceMetricDetails {
|
||||
this.rxLastRssi = rxLastRssi;
|
||||
}
|
||||
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public void setSnr(Integer snr) {
|
||||
this.snr = snr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user