@Override public OFStatistics instantiate() { return new OFFlowStatisticsReply(); } }), AGGREGATE(2, OFAggregateStatisticsRequest.class,
if (ofStat instanceof OFFlowStatisticsReply) { ofFlowStat = (OFFlowStatisticsReply) ofStat; flowConverter = new FlowConverter(ofFlowStat.getMatch(), ofFlowStat.getActions()); Flow flow = flowConverter.getFlow(node); flow.setPriority(ofFlowStat.getPriority()); flow.setIdleTimeout(ofFlowStat.getIdleTimeout()); flow.setHardTimeout(ofFlowStat.getHardTimeout()); flow.setId(ofFlowStat.getCookie()); flowOnNode = new FlowOnNode(flow); flowOnNode.setByteCount(ofFlowStat.getByteCount()); flowOnNode.setPacketCount(ofFlowStat.getPacketCount()); flowOnNode.setDurationSeconds(ofFlowStat .getDurationSeconds()); flowOnNode.setDurationNanoseconds(ofFlowStat .getDurationNanoseconds()); } else if (ofStat instanceof V6StatsReply) { v6StatsReply = (V6StatsReply) ofStat;
for (OFStatistics stats : statsList) { OFFlowStatisticsReply flowStats = (OFFlowStatisticsReply) stats; if (flowStats.getPriority() == priority && ofMatch.equals(flowStats.getMatch())) { List<OFStatistics> list = new ArrayList<OFStatistics>(); list.add(stats);
for (OFStatistics stats : statsList) { OFFlowStatisticsReply flowStats = (OFFlowStatisticsReply) stats; if (flowStats.getMatch().equals(ofMatch)) { List<OFStatistics> list = new ArrayList<OFStatistics>(); list.add(stats);
@Override public void readFrom(final ChannelBuffer data) { this.length = data.readShort(); this.tableId = data.readByte(); data.readByte(); // pad if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.durationSeconds = data.readInt(); this.durationNanoseconds = data.readInt(); this.priority = data.readShort(); this.idleTimeout = data.readShort(); this.hardTimeout = data.readShort(); data.readInt(); // pad data.readShort(); // pad this.cookie = data.readLong(); this.packetCount = data.readLong(); this.byteCount = data.readLong(); if (this.actionFactory == null) { throw new RuntimeException("OFActionFactory not set"); } this.actions = this.actionFactory.parseActions(data, this.getLength() - OFFlowStatisticsReply.MINIMUM_LENGTH); }