Compare commits

..

16 Commits

Author SHA1 Message Date
Thomas-Leung2021
c307f59e8a [WIFI-3358] remove more unused attributes in ClientMetrics 2021-08-10 17:35:38 -04:00
Thomas-Leung2021
34da98b9a8 [WIFI-3358] remove unused methods in ClientRadioUtils.java 2021-08-09 17:20:21 -04:00
Thomas-Leung2021
65aeadeaa7 [WIFI-3358] remove WmmQueueStats.java 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
148a6762dc [WIFI-3358] remove McsType.java 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
178378f8b6 [WIFI-3358] remove McsStats.java 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
d0e6866345 [WIFI-3358] remove unused attributes in McsStats 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
a2b3e711ea [WIFI-3358] remove ClientQoEMetrics.java 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
b5f5c6d19f [WIFI-3358] remove unused attributes for SsidStatistics 2021-08-09 17:06:15 -04:00
Thomas-Leung2021
a5079d04a7 [WIFI-3358] remove unused attributes in ClientMetrics 2021-08-09 17:06:15 -04:00
Mike Hansen
35d89a1cf0 Merge pull request #143 from Telecominfraproject/WIFI-3358-id
[WIFI-3358] remove sessionId in ClientMetrics
2021-08-09 15:56:07 -04:00
Thomas-Leung2021
534ed3e9c0 [WIFI-3358] remove sessionId in ClientMetrics 2021-08-09 14:42:14 -04:00
Mike Hansen
a6ec1d6e7f Merge pull request #142 from Telecominfraproject/WIFI-3344
[WIFI-3344] remove ClientSessionMetricDetails
2021-08-04 19:35:16 -04:00
Thomas-Leung2021
a19fc425c2 [WIFI-3344] remove ClientSessionMetricDetails 2021-08-04 16:57:40 -04:00
Mike Hansen
fc8cab6a50 Merge pull request #141 from Telecominfraproject/NETEXP-2677
[NETEXP-2677] set clients disconnected in current client list when moving AP to another SP
2021-08-04 10:27:58 -04:00
Thomas-Leung2021
daabf38510 [NETEXP-2677] set clients disconnected in current client list when moving AP to another SP 2021-08-03 18:05:31 -04:00
Mike Hansen
78c4d3a862 Merge pull request #140 from Telecominfraproject/WIFI-3285
WIFI-3285 Use base channel as default value on 5G for backupChannelNu…
2021-08-03 18:04:42 -04:00
13 changed files with 67 additions and 6747 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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();

View File

@@ -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);
}
}

View File

@@ -15,6 +15,9 @@ import org.springframework.stereotype.Component;
import com.telecominfraproject.wlan.alarm.AlarmServiceInterface;
import com.telecominfraproject.wlan.alarm.models.Alarm;
import com.telecominfraproject.wlan.client.ClientServiceInterface;
import com.telecominfraproject.wlan.client.session.models.AssociationState;
import com.telecominfraproject.wlan.client.session.models.ClientSession;
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
import com.telecominfraproject.wlan.core.model.pagination.PaginationContext;
import com.telecominfraproject.wlan.core.model.pagination.PaginationResponse;
@@ -75,6 +78,8 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
private StatusServiceInterface statusServiceInterface;
@Autowired
private AlarmServiceInterface alarmServiceInterface;
@Autowired
private ClientServiceInterface clientServiceInterface;
@Override
protected boolean acceptMessage(QueuedStreamMessage message) {
@@ -275,10 +280,49 @@ public class EquipmentConfigPushTrigger extends StreamProcessor {
});
}
alarmServiceInterface.delete(existingEquipment.getCustomerId(), existingEquipment.getId());
// Disconnect all associated client devices from existing equipment
disconnectClients(existingEquipment);
}
private void process(BaseJsonModel model) {
LOG.warn("Unprocessed model: {}", model);
}
private void disconnectClients(Equipment ce) {
LOG.info("EquipmentConfigPushTrigger::disconnectClients for Equipment {}", ce);
PaginationResponse<ClientSession> clientSessions = clientServiceInterface.getSessionsForCustomer(
ce.getCustomerId(), Set.of(ce.getId()), Set.of(ce.getLocationId()), null, null,
new PaginationContext<ClientSession>(100));
if (clientSessions == null) {
LOG.info("There are no existing client sessions to disconnect.");
return;
}
List<ClientSession> toBeDisconnected = new ArrayList<>();
clientSessions.getItems().stream().forEach(c -> {
if (c.getDetails().getAssociationState() != null
&& !c.getDetails().getAssociationState().equals(AssociationState.Disconnected)) {
LOG.info("Change association state for client {} from {} to {}", c.getMacAddress(),
c.getDetails().getAssociationState(), AssociationState.Disconnected);
c.getDetails().setAssociationState(AssociationState.Disconnected);
toBeDisconnected.add(c);
}
});
if (!toBeDisconnected.isEmpty()) {
LOG.info("Sending disconnect for client sessions {}", toBeDisconnected);
List<ClientSession> disconnectedSessions = clientServiceInterface.updateSessions(toBeDisconnected);
LOG.info("Result of client disconnect {}", disconnectedSessions);
} else {
LOG.info("There are no existing client sessions that are not already in Disconnected state.");
}
}
}

View File

@@ -15,11 +15,8 @@ import org.springframework.util.CollectionUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.telecominfraproject.wlan.core.model.equipment.MacAddress;
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
import com.telecominfraproject.wlan.servicemetric.models.McsStats;
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDetails;
import com.telecominfraproject.wlan.servicemetric.models.WmmQueueStats;
import com.telecominfraproject.wlan.servicemetric.models.WmmQueueStats.WmmQueueType;
/**
* Node-level metric data from the Access Point.
@@ -79,14 +76,8 @@ public class ApNodeMetrics extends ServiceMetricDetails
private Map<RadioType, List<RadioUtilization>> radioUtilizationPerRadio = new EnumMap<>(RadioType.class);
private Map<RadioType, RadioStatistics> radioStatsPerRadio = new EnumMap<>(RadioType.class);
private Map<RadioType, List<McsStats>> mcsStatsPerRadio = new EnumMap<>(RadioType.class);
private Map<RadioType, Map<WmmQueueType, WmmQueueStats>> wmmQueuesPerRadio = new EnumMap<>(RadioType.class);
public Integer getPeriodLengthSec() {
return periodLengthSec;
}
@@ -262,25 +253,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
this.radioStatsPerRadio.put(radioType, radioStats);
}
public List<McsStats> getMcsStats(RadioType radioType) {
return mcsStatsPerRadio.get(radioType);
}
public void setMcsStats(RadioType radioType, List<McsStats> mcsStats) {
this.mcsStatsPerRadio.put(radioType, mcsStats);
}
public Map<WmmQueueType, WmmQueueStats> getWmmQueue(RadioType radioType) {
return wmmQueuesPerRadio.get(radioType);
}
public void setWmmQueue(RadioType radioType, Map<WmmQueueType, WmmQueueStats> wmmQueue) {
this.wmmQueuesPerRadio.put(radioType, wmmQueue);
}
//
// Utility Functions
//
@@ -404,31 +376,14 @@ public class ApNodeMetrics extends ServiceMetricDetails
this.radioStatsPerRadio = radioStatsPerRadio;
}
public Map<RadioType, List<McsStats>> getMcsStatsPerRadio() {
return mcsStatsPerRadio;
}
public void setMcsStatsPerRadio(Map<RadioType, List<McsStats>> mcsStatsPerRadio) {
this.mcsStatsPerRadio = mcsStatsPerRadio;
}
public Map<RadioType, Map<WmmQueueType, WmmQueueStats>> getWmmQueuesPerRadio() {
return wmmQueuesPerRadio;
}
public void setWmmQueuesPerRadio(Map<RadioType, Map<WmmQueueType, WmmQueueStats>> wmmQueuesPerRadio) {
this.wmmQueuesPerRadio = wmmQueuesPerRadio;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(apPerformance, channelUtilizationPerRadio, clientMacAddressesPerRadio,
cloudLinkAvailability, cloudLinkLatencyInMs, mcsStatsPerRadio, networkProbeMetrics, noiseFloorPerRadio,
cloudLinkAvailability, cloudLinkLatencyInMs, networkProbeMetrics, noiseFloorPerRadio,
periodLengthSec, radioStatsPerRadio, radioUtilizationPerRadio, radiusMetrics, rxBytesPerRadio,
tunnelMetrics, txBytesPerRadio, vlanSubnet, wmmQueuesPerRadio);
tunnelMetrics, txBytesPerRadio, vlanSubnet);
return result;
}
@@ -449,7 +404,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
&& Objects.equals(clientMacAddressesPerRadio, other.clientMacAddressesPerRadio)
&& Objects.equals(cloudLinkAvailability, other.cloudLinkAvailability)
&& Objects.equals(cloudLinkLatencyInMs, other.cloudLinkLatencyInMs)
&& Objects.equals(mcsStatsPerRadio, other.mcsStatsPerRadio)
&& Objects.equals(networkProbeMetrics, other.networkProbeMetrics)
&& Objects.equals(noiseFloorPerRadio, other.noiseFloorPerRadio)
&& Objects.equals(periodLengthSec, other.periodLengthSec)
@@ -459,8 +413,7 @@ public class ApNodeMetrics extends ServiceMetricDetails
&& Objects.equals(rxBytesPerRadio, other.rxBytesPerRadio)
&& Objects.equals(tunnelMetrics, other.tunnelMetrics)
&& Objects.equals(txBytesPerRadio, other.txBytesPerRadio)
&& Objects.equals(vlanSubnet, other.vlanSubnet)
&& Objects.equals(wmmQueuesPerRadio, other.wmmQueuesPerRadio);
&& Objects.equals(vlanSubnet, other.vlanSubnet);
}
@Override
@@ -484,14 +437,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
radioStatsPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
}
if(mcsStatsPerRadio!=null) {
mcsStatsPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
}
if(wmmQueuesPerRadio!=null) {
wmmQueuesPerRadio.values().forEach(c -> { if (hasUnsupportedValue(c)) { ai.incrementAndGet();} });
}
if(ai.get()>0) {
return true;
}
@@ -518,25 +463,6 @@ public class ApNodeMetrics extends ServiceMetricDetails
}
if(this.wmmQueuesPerRadio!=null) {
ret.wmmQueuesPerRadio = new EnumMap<>(RadioType.class);
this.wmmQueuesPerRadio.forEach((rt, wq) -> {
Map<WmmQueueStats.WmmQueueType, WmmQueueStats> newWm = new EnumMap<>(WmmQueueType.class);
ret.wmmQueuesPerRadio.put(rt, newWm);
wq.forEach((k, v) -> newWm.put(k, v.clone()));
});
}
if(this.mcsStatsPerRadio !=null) {
ret.mcsStatsPerRadio = new EnumMap<>(RadioType.class);
this.mcsStatsPerRadio.forEach((k, listV) -> {
List<McsStats> newList = new ArrayList<>();
ret.mcsStatsPerRadio.put(k, newList);
listV.forEach(mcs -> newList.add(mcs.clone()));
});
}
if(this.networkProbeMetrics !=null) {
ret.networkProbeMetrics = new ArrayList<>();
for(NetworkProbeMetrics npm: this.networkProbeMetrics){

View File

@@ -1,160 +0,0 @@
package com.telecominfraproject.wlan.servicemetric.client.qoe.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType;
import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDetails;
/**
* QoE related metrics which is independent of RadioType
*
* @author yongli
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ClientQoEMetrics extends ServiceMetricDetails {
private static final long serialVersionUID = 5242617221447159480L;
/**
* How many seconds the AP measured for the metric
*/
private Integer periodLengthSec = 5;
private Integer secondsSinceLastRecv;
// Connectivity QoE stats.
private Long qoeEventualSuccessTimeTaken;
private Long qoeNumOfAttempts;
private Long qoeNumOfSuccess;
private Long qoeAttemptDuration;
private Long qoeAssociatedDuration;
private Long qoeDeltaDuration;
private Long qoeNumRepeatedAttempts;
private Long qoeUserError;
@Override
public ServiceMetricDataType getDataType() {
return ServiceMetricDataType.ClientQoE;
}
@Override
public ClientQoEMetrics clone() {
return (ClientQoEMetrics) super.clone();
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + Objects.hash(periodLengthSec, qoeAssociatedDuration, qoeAttemptDuration,
qoeDeltaDuration, qoeEventualSuccessTimeTaken, qoeNumOfAttempts, qoeNumOfSuccess,
qoeNumRepeatedAttempts, qoeUserError, secondsSinceLastRecv);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ClientQoEMetrics)) {
return false;
}
ClientQoEMetrics other = (ClientQoEMetrics) obj;
return Objects.equals(periodLengthSec, other.periodLengthSec)
&& Objects.equals(qoeAssociatedDuration, other.qoeAssociatedDuration)
&& Objects.equals(qoeAttemptDuration, other.qoeAttemptDuration)
&& Objects.equals(qoeDeltaDuration, other.qoeDeltaDuration)
&& Objects.equals(qoeEventualSuccessTimeTaken, other.qoeEventualSuccessTimeTaken)
&& Objects.equals(qoeNumOfAttempts, other.qoeNumOfAttempts)
&& Objects.equals(qoeNumOfSuccess, other.qoeNumOfSuccess)
&& Objects.equals(qoeNumRepeatedAttempts, other.qoeNumRepeatedAttempts)
&& Objects.equals(qoeUserError, other.qoeUserError)
&& Objects.equals(secondsSinceLastRecv, other.secondsSinceLastRecv);
}
public Long getQoeAssociatedDuration() {
return qoeAssociatedDuration;
}
public Long getQoeAttemptDuration() {
return qoeAttemptDuration;
}
public Long getQoeDeltaDuration() {
return qoeDeltaDuration;
}
public Long getQoeEventualSuccessTimeTaken() {
return qoeEventualSuccessTimeTaken;
}
public Long getQoeNumOfAttempts() {
return qoeNumOfAttempts;
}
public Long getQoeNumOfSuccess() {
return qoeNumOfSuccess;
}
public Long getQoeNumRepeatedAttempts() {
return qoeNumRepeatedAttempts;
}
public Long getQoeUserError() {
return qoeUserError;
}
public void setQoeAssociatedDuration(Long qoeAssociatedDuration) {
this.qoeAssociatedDuration = qoeAssociatedDuration;
}
public void setQoeAttemptDuration(Long qoeAttemptDuration) {
this.qoeAttemptDuration = qoeAttemptDuration;
}
public void setQoeDeltaDuration(Long qoeDeltaDuration) {
this.qoeDeltaDuration = qoeDeltaDuration;
}
public void setQoeEventualSuccessTimeTaken(Long qoeEventualSuccessTimeTaken) {
this.qoeEventualSuccessTimeTaken = qoeEventualSuccessTimeTaken;
}
public void setQoeNumOfAttempts(Long qoeNumOfAttempts) {
this.qoeNumOfAttempts = qoeNumOfAttempts;
}
public void setQoeNumOfSuccess(Long qoeNumOfSuccess) {
this.qoeNumOfSuccess = qoeNumOfSuccess;
}
public void setQoeNumRepeatedAttempts(Long qoeNumRepeatedAttempts) {
this.qoeNumRepeatedAttempts = qoeNumRepeatedAttempts;
}
public void setQoeUserError(Long qoeUserError) {
this.qoeUserError = qoeUserError;
}
public Integer getPeriodLengthSec() {
return periodLengthSec;
}
public void setPeriodLengthSec(Integer periodLengthSec) {
this.periodLengthSec = periodLengthSec;
}
public Integer getSecondsSinceLastRecv() {
return secondsSinceLastRecv;
}
public void setSecondsSinceLastRecv(Integer secondsSinceLastRecv) {
this.secondsSinceLastRecv = secondsSinceLastRecv;
}
}

View File

@@ -1,91 +0,0 @@
package com.telecominfraproject.wlan.servicemetric.models;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class McsStats extends BaseJsonModel
{
private static final long serialVersionUID = 2366899901343104028L;
/**
* The MCS number. This is table index.
*/
private McsType mcsNum;
/**
* The number of successfully transmitted frames at this rate. Do not count failed transmission.
*/
private Integer txFrames;
/**
* The number of received frames at this rate.
*/
private Integer rxFrames;
private Long rate;
public McsStats()
{
// for serialization
}
public McsType getMcsNum() {
return mcsNum;
}
public void setMcsNum(McsType mcsNum) {
this.mcsNum = mcsNum;
}
public Integer getTxFrames() {
return txFrames;
}
public void setTxFrames(Integer txFrames) {
this.txFrames = txFrames;
}
public Integer getRxFrames() {
return rxFrames;
}
public void setRxFrames(Integer rxFrames) {
this.rxFrames = rxFrames;
}
public Long getRate() {
return rate;
}
public void setRate(Long rate) {
this.rate = rate;
}
@Override
public McsStats clone() {
McsStats ret = (McsStats) super.clone();
return ret;
}
@Override
public boolean hasUnsupportedValue() {
if (super.hasUnsupportedValue()) {
return true;
}
if (McsType.isUnsupported(mcsNum)) {
return true;
}
return false;
}
}

View File

@@ -1,161 +0,0 @@
package com.telecominfraproject.wlan.servicemetric.models;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
/**
* MCS index values
* @author ekeddy
*
*/
public enum McsType {
//McsType(int id, boolean isHt, boolean isVht, int numSpacialStreams, int mcsIndex)
MCS_1 (0, false, false, 1, 1), // 2.4GHz only
MCS_2 (1, false, false, 1, 2), // 2.4GHz only
MCS_5dot5(2, false, false, 1, 5), // 2.4GHz only
MCS_11 (3, false, false, 1, 11), // 2.4GHz only
MCS_6 (4, false, false, 1, 13),
MCS_9 (5, false, false, 1, 16),
MCS_12 (6, false, false, 1, 5),
MCS_18 (7, false, false, 1, 7),
MCS_24 (8, false, false, 1, 9),
MCS_36 (9, false, false, 1, 11),
MCS_48 (10, false, false, 1, 1),
MCS_54 (11, false, false, 1, 3),
MCS_N_0 (12, true, false, 1, 0),
MCS_N_1 (13, true, false, 1, 1),
MCS_N_2 (14, true, false, 1, 2),
MCS_N_3 (15, true, false, 1, 3),
MCS_N_4 (16, true, false, 1, 4),
MCS_N_5 (17, true, false, 1, 5),
MCS_N_6 (18, true, false, 1, 6),
MCS_N_7 (19, true, false, 1, 7),
MCS_N_8 (20, true, false, 2, 8),
MCS_N_9 (21, true, false, 2, 9),
MCS_N_10(22, true, false, 2, 10),
MCS_N_11(23, true, false, 2, 11),
MCS_N_12(24, true, false, 2, 12),
MCS_N_13(25, true, false, 2, 13),
MCS_N_14(26, true, false, 2, 14),
MCS_N_15(27, true, false, 2, 15),
MCS_AC_1x1_0(28, false, true, 1, 0),
MCS_AC_1x1_1(29, false, true, 1, 1),
MCS_AC_1x1_2(30, false, true, 1, 2),
MCS_AC_1x1_3(31, false, true, 1, 3),
MCS_AC_1x1_4(32, false, true, 1, 4),
MCS_AC_1x1_5(33, false, true, 1, 5),
MCS_AC_1x1_6(34, false, true, 1, 6),
MCS_AC_1x1_7(35, false, true, 1, 7),
MCS_AC_1x1_8(36, false, true, 1, 8),
MCS_AC_1x1_9(37, false, true, 1, 9),
MCS_AC_2x2_0(38, false, true, 2, 0),
MCS_AC_2x2_1(39, false, true, 2, 1),
MCS_AC_2x2_2(40, false, true, 2, 2),
MCS_AC_2x2_3(41, false, true, 2, 3),
MCS_AC_2x2_4(42, false, true, 2, 4),
MCS_AC_2x2_5(43, false, true, 2, 5),
MCS_AC_2x2_6(44, false, true, 2, 6),
MCS_AC_2x2_7(45, false, true, 2, 7),
MCS_AC_2x2_8(46, false, true, 2, 8),
MCS_AC_2x2_9(47, false, true, 2, 9),
MCS_AC_3x3_0(48, false, true, 3, 0),
MCS_AC_3x3_1(49, false, true, 3, 1),
MCS_AC_3x3_2(50, false, true, 3, 2),
MCS_AC_3x3_3(51, false, true, 3, 3),
MCS_AC_3x3_4(52, false, true, 3, 4),
MCS_AC_3x3_5(53, false, true, 3, 5),
MCS_AC_3x3_6(54, false, true, 3, 6),
MCS_AC_3x3_7(55, false, true, 3, 7),
MCS_AC_3x3_8(56, false, true, 3, 8),
MCS_AC_3x3_9(57, false, true, 3, 9),
MCS_N_16(58, true, false, 3, 16),
MCS_N_17(59, true, false, 3, 17),
MCS_N_18(60, true, false, 3, 18),
MCS_N_19(61, true, false, 3, 19),
MCS_N_20(62, true, false, 3, 20),
MCS_N_21(63, true, false, 3, 21),
MCS_N_22(64, true, false, 3, 22),
MCS_N_23(65, true, false, 3, 23),
MCS_N_24(66, true, false, 4, 24),
MCS_N_25(67, true, false, 4, 25),
MCS_N_26(68, true, false, 4, 26),
MCS_N_27(69, true, false, 4, 27),
MCS_N_28(70, true, false, 4, 28),
MCS_N_29(71, true, false, 4, 29),
MCS_N_30(72, true, false, 4, 30),
MCS_N_31(73, true, false, 4, 31),
MCS_AC_4x4_0(74, false, true, 4, 0),
MCS_AC_4x4_1(75, false, true, 4, 1),
MCS_AC_4x4_2(76, false, true, 4, 2),
MCS_AC_4x4_3(77, false, true, 4, 3),
MCS_AC_4x4_4(78, false, true, 4, 4),
MCS_AC_4x4_5(79, false, true, 4, 5),
MCS_AC_4x4_6(80, false, true, 4, 6),
MCS_AC_4x4_7(81, false, true, 4, 7),
MCS_AC_4x4_8(82, false, true, 4, 8),
MCS_AC_4x4_9(83, false, true, 4, 9),
//last used index 83
UNSUPPORTED(-1, false, false, 0, -1);
private final int id;
private final boolean isHt;
private final boolean isVht;
private final int numSpacialStreams;
private final int mcsIndex;
private static final Map<Integer, McsType> ELEMENTS = new HashMap<>();
private McsType(int id, boolean isHt, boolean isVht, int numSpacialStreams, int mcsIndex){
this.id = id;
this.isHt = isHt;
this.isVht = isVht;
this.numSpacialStreams = numSpacialStreams;
this.mcsIndex = mcsIndex;
}
public int getId(){
return this.id;
}
public int getMcsIndex() {
return mcsIndex;
}
public int getNumSpacialStreams() {
return numSpacialStreams;
}
public boolean isHt() {
return isHt;
}
public boolean isVht() {
return isVht;
}
public static McsType getById(int enumId){
if(ELEMENTS.isEmpty()){
//initialize elements map
for(McsType met : McsType.values()){
ELEMENTS.put(met.getId(), met);
}
}
return ELEMENTS.get(enumId);
}
@JsonCreator
public static McsType getByName(String value) {
return JsonDeserializationUtils.deserializEnum(value, McsType.class, UNSUPPORTED);
}
public static boolean isUnsupported(McsType value) {
return UNSUPPORTED.equals(value);
}
}

View File

@@ -1,245 +0,0 @@
package com.telecominfraproject.wlan.servicemetric.models;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WmmQueueStats extends BaseJsonModel {
private static final long serialVersionUID = 1784481171729854130L;
public static enum WmmQueueType {
BE, BK, VI, VO, UNSUPPORTED;
@JsonCreator
public static WmmQueueType getByName(String value) {
return JsonDeserializationUtils.deserializEnum(value, WmmQueueType.class, UNSUPPORTED);
}
public static boolean isUnsupported(WmmQueueType queueType) {
return UNSUPPORTED.equals(queueType);
}
}
private WmmQueueType queueType;
private long txFrames;
private long txBytes;
private long txFailedFrames;
private long txFailedBytes;
private long rxFrames;
private long rxBytes;
private long rxFailedFrames;
private long rxFailedBytes;
private long forwardFrames;
private long forwardBytes;
private long txExpiredFrames;
private long txExpiredBytes;
public WmmQueueStats() {
// for serialization
}
public WmmQueueStats(WmmQueueType queueType, long txFrames, long txBytes, long txFailedFrames, long txFailedBytes,
long rxFrames, long rxBytes, long rxFailedFrames, long rxFailedBytes, long forwardFrames, long forwardBytes,
long txExpiredFrames, long txExpiredBytes) {
super();
this.queueType = queueType;
this.txFrames = txFrames;
this.txBytes = txBytes;
this.txFailedFrames = txFailedFrames;
this.txFailedBytes = txFailedBytes;
this.rxFrames = rxFrames;
this.rxBytes = rxBytes;
this.rxFailedFrames = rxFailedFrames;
this.rxFailedBytes = rxFailedBytes;
this.forwardFrames = forwardFrames;
this.forwardBytes = forwardBytes;
this.txExpiredFrames = txExpiredFrames;
this.txExpiredBytes = txExpiredBytes;
}
public WmmQueueType getQueueType() {
return queueType;
}
public void setQueueType(WmmQueueType queueType) {
this.queueType = queueType;
}
public long getTxFrames() {
return txFrames;
}
public void setTxFrames(long txFrames) {
this.txFrames = txFrames;
}
public long getTxBytes() {
return txBytes;
}
public void setTxBytes(long txBytes) {
this.txBytes = txBytes;
}
public long getTxFailedFrames() {
return txFailedFrames;
}
public void setTxFailedFrames(long txFailedFrames) {
this.txFailedFrames = txFailedFrames;
}
public long getTxFailedBytes() {
return txFailedBytes;
}
public void setTxFailedBytes(long txFailedBytes) {
this.txFailedBytes = txFailedBytes;
}
public long getRxFrames() {
return rxFrames;
}
public void setRxFrames(long rxFrames) {
this.rxFrames = rxFrames;
}
public long getRxBytes() {
return rxBytes;
}
public void setRxBytes(long rxBytes) {
this.rxBytes = rxBytes;
}
public long getRxFailedFrames() {
return rxFailedFrames;
}
public void setRxFailedFrames(long rxFailedFrames) {
this.rxFailedFrames = rxFailedFrames;
}
public long getRxFailedBytes() {
return rxFailedBytes;
}
public void setRxFailedBytes(long rxFailedBytes) {
this.rxFailedBytes = rxFailedBytes;
}
public long getForwardFrames() {
return forwardFrames;
}
public void setForwardFrames(long forwardFrames) {
this.forwardFrames = forwardFrames;
}
public long getForwardBytes() {
return forwardBytes;
}
public void setForwardBytes(long forwardBytes) {
this.forwardBytes = forwardBytes;
}
public long getTxExpiredFrames() {
return txExpiredFrames;
}
public void setTxExpiredFrames(long txExpiredFrames) {
this.txExpiredFrames = txExpiredFrames;
}
public long getTxExpiredBytes() {
return txExpiredBytes;
}
public void setTxExpiredBytes(long txExpiredBytes) {
this.txExpiredBytes = txExpiredBytes;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (forwardBytes ^ (forwardBytes >>> 32));
result = prime * result + (int) (forwardFrames ^ (forwardFrames >>> 32));
result = prime * result + ((queueType == null) ? 0 : queueType.hashCode());
result = prime * result + (int) (rxBytes ^ (rxBytes >>> 32));
result = prime * result + (int) (rxFailedBytes ^ (rxFailedBytes >>> 32));
result = prime * result + (int) (rxFailedFrames ^ (rxFailedFrames >>> 32));
result = prime * result + (int) (rxFrames ^ (rxFrames >>> 32));
result = prime * result + (int) (txBytes ^ (txBytes >>> 32));
result = prime * result + (int) (txExpiredBytes ^ (txExpiredBytes >>> 32));
result = prime * result + (int) (txExpiredFrames ^ (txExpiredFrames >>> 32));
result = prime * result + (int) (txFailedBytes ^ (txFailedBytes >>> 32));
result = prime * result + (int) (txFailedFrames ^ (txFailedFrames >>> 32));
result = prime * result + (int) (txFrames ^ (txFrames >>> 32));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
WmmQueueStats other = (WmmQueueStats) obj;
if (forwardBytes != other.forwardBytes)
return false;
if (forwardFrames != other.forwardFrames)
return false;
if (queueType != other.queueType)
return false;
if (rxBytes != other.rxBytes)
return false;
if (rxFailedBytes != other.rxFailedBytes)
return false;
if (rxFailedFrames != other.rxFailedFrames)
return false;
if (rxFrames != other.rxFrames)
return false;
if (txBytes != other.txBytes)
return false;
if (txExpiredBytes != other.txExpiredBytes)
return false;
if (txExpiredFrames != other.txExpiredFrames)
return false;
if (txFailedBytes != other.txFailedBytes)
return false;
if (txFailedFrames != other.txFailedFrames)
return false;
if (txFrames != other.txFrames)
return false;
return true;
}
@Override
public boolean hasUnsupportedValue() {
if (super.hasUnsupportedValue()) {
return true;
}
if (WmmQueueType.isUnsupported(queueType)) {
return true;
}
return false;
}
@Override
public WmmQueueStats clone() {
return (WmmQueueStats) super.clone();
}
}