protected void sendHandshakeDescriptionStatsRequest() { final OFStatisticsRequest req = new OFStatisticsRequest(); req.setStatisticType(OFStatisticsType.DESC); req.setXid(this.handshakeTransactionIds--); this.channel.write(Collections.singletonList(req)); }
OFStatisticsRequest req = new OFStatisticsRequest(); req.setStatisticType(statsType); int requestLength = req.getLengthU(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setPortNumber(OFPort.OFPP_ALL.getValue()); specificReq.setQueueId(0xffffffff); req.setStatistics(Collections
@Override public OFMessage instantiate() { return new OFStatisticsRequest(); } }), STATS_REPLY(17, OFStatisticsReply.class,
@Override public Object getStatistics(OFStatisticsRequest req) { int xid = getNextXid(); StatisticsCollector worker = new StatisticsCollector(this, xid, req); messageWaitingDone.put(xid, worker); Future<Object> submit; Object result = null; try { submit = executor.submit(worker); } catch (RejectedExecutionException re) { messageWaitingDone.remove(xid); return result; } try { result = submit.get(responseTimerValue, TimeUnit.MILLISECONDS); return result; } catch (Exception e) { logger.warn("Timeout while waiting for {} replies from {}", req.getType(), (isOperational() ? HexString.toHexString(sid) : "unknown")); result = null; // to indicate timeout has occurred worker.wakeup(); return result; } }
OFStatisticsRequest req = new OFStatisticsRequest(); req.setStatisticType(statsType); int requestLength = req.getLengthU(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); specificReq.setTableId((byte) 0xff); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); req.setStatistics(Collections .singletonList((OFStatistics) specificReq)); requestLength += specificReq.getLength(); specificReq.setPortNumber((short) OFPort.OFPP_ALL.getValue()); specificReq.setQueueId(0xffffffff); req.setStatistics(Collections