mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 22:39:22 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e23a691d7 | ||
|
|
015e662e68 | ||
|
|
9f3af6773b | ||
|
|
b7eedf6b8c | ||
|
|
468e7bcddb | ||
|
|
9b712d6fb5 | ||
|
|
99475d3f2f | ||
|
|
7216b08ac7 | ||
|
|
34da98b9a8 | ||
|
|
65aeadeaa7 | ||
|
|
148a6762dc | ||
|
|
178378f8b6 | ||
|
|
d0e6866345 | ||
|
|
a2b3e711ea | ||
|
|
b5f5c6d19f | ||
|
|
a5079d04a7 | ||
|
|
35d89a1cf0 | ||
|
|
534ed3e9c0 | ||
|
|
a6ec1d6e7f |
@@ -1237,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));
|
||||
@@ -1264,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));
|
||||
@@ -1291,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));
|
||||
|
||||
@@ -232,7 +232,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
socketInputStreamReaderThread.setDaemon(true);
|
||||
forwarderSession.setSocketStreamReaderThread(socketInputStreamReaderThread);
|
||||
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
LOG.error("[{}] error accepting conection on port {} - closing forwarding session {}", inventoryId, listenOnLocalPort, forwarderSession.getSessionId());
|
||||
try {
|
||||
serverSocket.close();
|
||||
@@ -259,6 +259,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
|
||||
public void stopForwarderSession(String sessionId){
|
||||
LOG.debug("Received stop forwarding Session request for sessionId {}", sessionId);
|
||||
ForwarderSession forwarderSession = sessionIdToForwarderSessionMap.get(sessionId);
|
||||
if(forwarderSession==null){
|
||||
LOG.info("Could not find session {}", sessionId);
|
||||
@@ -266,6 +267,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
|
||||
try {
|
||||
LOG.debug("Found forwarderSession {} for sessionId {}", forwarderSession, sessionId);
|
||||
//find websocket session by inventoryId and send control messages to disconnect from target port on the client side of the port forwarder
|
||||
WebSocketSession webSocketSession = webSocketSessionMap.get(forwarderSession.getInventoryId());
|
||||
TextMessage message = new TextMessage(DISCONNECT_FROM_CE_PORT_COMMAND + forwarderSession.getConnectToPortOnEquipment());
|
||||
@@ -274,22 +276,24 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
LOG.debug("[{}] Session {} sent command {}", forwarderSession.getInventoryId(), forwarderSession.getSessionId(), message.getPayload());
|
||||
}
|
||||
|
||||
if(forwarderSession.getServerSocket()!=null){
|
||||
if(forwarderSession.getServerSocket() != null){
|
||||
forwarderSession.getServerSocket().close();
|
||||
LOG.debug("Closed forwarderSession server socket for sessionId {}", sessionId);
|
||||
}
|
||||
|
||||
if(forwarderSession.getLocalSocket()!=null){
|
||||
if(forwarderSession.getLocalSocket() != null){
|
||||
forwarderSession.getLocalSocket().close();
|
||||
LOG.debug("Closed forwarderSession local socket for sessionId {}", sessionId);
|
||||
}
|
||||
//stream reader will stop in a separate thread by themselves
|
||||
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
// do nothing here
|
||||
LOG.error("Encountered exception when closing connection for forwarder session {}", forwarderSession, e);
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
}
|
||||
|
||||
sessionIdToForwarderSessionMap.remove(forwarderSession.getSessionId());
|
||||
|
||||
LOG.info("[{}] Stopped forwarder session {}", forwarderSession.getInventoryId(), sessionId);
|
||||
}
|
||||
@@ -322,7 +326,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
if(payload.indexOf(':')>0){
|
||||
port = Integer.parseInt(payload.substring(payload.indexOf(':')+1));
|
||||
}
|
||||
|
||||
LOG.debug("handleTextMessage: Port {} is used on Equipment {}", port, webSocketSessionKey);
|
||||
//find forwarderSession by inventoryId and CEPort
|
||||
ForwarderSession forwarderSession = null;
|
||||
for(ForwarderSession fs: sessionIdToForwarderSessionMap.values()){
|
||||
@@ -332,7 +336,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
LOG.debug("[{}] Session {} got message {}", webSocketSessionKey, session, payload);
|
||||
LOG.debug("[{}] Session {} got message {} with forwarderSession {}", webSocketSessionKey, session, payload, forwarderSession);
|
||||
|
||||
if(payload.startsWith(CONNECTED_TO_CE_PORT_MSG)){
|
||||
//start reader thread to forward packets from local socket to websocket
|
||||
@@ -381,6 +385,7 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
int msgPayloadLength = message.getPayloadLength();
|
||||
|
||||
int port = payload.getInt();
|
||||
LOG.debug("handleBinaryMessage: Port {} is used on Equipment {}", port, webSocketSessionKey);
|
||||
|
||||
//find forwarderSession by inventoryId and CEPort
|
||||
ForwarderSession forwarderSession = null;
|
||||
@@ -419,6 +424,15 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
}
|
||||
} else {
|
||||
LOG.debug("[{}] Session {} received message that cannot be delivered because local socket is inoperable {}", webSocketSessionKey, session, message);
|
||||
if (forwarderSession == null) {
|
||||
LOG.debug("forwarderSession not found fpr webSocketSessionKey {}", webSocketSessionKey);
|
||||
} else if (forwarderSession.getLocalSocket() == null) {
|
||||
LOG.debug("forwarderSession local socket is null for webSocketSessionKey {}", webSocketSessionKey);
|
||||
} else {
|
||||
LOG.debug("forwarderSession local socket for webSocketSessionKey {} is closed = {} and connected = {} ",
|
||||
webSocketSessionKey, forwarderSession.getLocalSocket().isClosed(), forwarderSession.getLocalSocket().isConnected());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -443,22 +457,26 @@ public class PortForwarderWebSocketHandler extends AbstractWebSocketHandler {
|
||||
|
||||
@Override
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception {
|
||||
LOG.info("[{}] Closed portForwarder websocket connection {} : {}", getWebSocketSessionKey(session), session, closeStatus);
|
||||
|
||||
String webSocketSessionKey = getWebSocketSessionKey(session);
|
||||
LOG.info("[{}] Closed portForwarder websocket connection {} : {}", webSocketSessionKey, session, closeStatus);
|
||||
|
||||
webSocketSessionMap.remove(webSocketSessionKey);
|
||||
|
||||
|
||||
LOG.debug(" Removed key {} from webSocketSessionMap", webSocketSessionKey);
|
||||
//close and remove all forwarder sessions for that CE
|
||||
|
||||
Iterator<ForwarderSession> iter = sessionIdToForwarderSessionMap.values().iterator();
|
||||
while(iter.hasNext()){
|
||||
ForwarderSession fs = iter.next();
|
||||
if(fs.getInventoryId().equals(webSocketSessionKey) ){
|
||||
if (fs.getInventoryId().equals(webSocketSessionKey)) {
|
||||
LOG.debug("Closing webSocketSession for forwarderSession: {} ", fs);
|
||||
if(fs.getLocalSocket()!=null && !fs.getLocalSocket().isClosed()){
|
||||
fs.getLocalSocket().close();
|
||||
LOG.debug("Closing local Socket for fs {}", fs);
|
||||
}
|
||||
if(fs.getServerSocket()!=null && !fs.getServerSocket().isClosed()){
|
||||
fs.getServerSocket().close();
|
||||
LOG.debug("Closing Server Socket for fs {}", fs);
|
||||
}
|
||||
}
|
||||
iter.remove();
|
||||
|
||||
@@ -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){
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user