Package org.openflow.protocol.statistics

Examples of org.openflow.protocol.statistics.OFPortStatisticsReply


  public static JSONArray toPortStat(List<OFStatistics> ofs){
    JSONArray jsonArray = new JSONArray();
   
    for (OFStatistics ofst : ofs) {

      OFPortStatisticsReply st = (OFPortStatisticsReply) ofst;
     
     
     

      JSONObject jsonObject = new JSONObject();
      if (st.getPortNumber() < -2) {
        continue;
      }
      jsonObject.put("port_id", st.getPortNumber());
      jsonObject.put("receive_packets", st.getreceivePackets());
      jsonObject.put("transmit_packets", st.getTransmitPackets());
      jsonObject.put("receive_bytes", st.getReceiveBytes());
      jsonObject.put("transmit_bytes", st.getTransmitBytes());

      jsonArray.add(jsonObject);

    }
View Full Code Here

TOP

Related Classes of org.openflow.protocol.statistics.OFPortStatisticsReply

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.