public static JSONArray toTableStat(List<OFStatistics> ofs){
JSONArray jsonArray = new JSONArray();
for (OFStatistics ofst : ofs) {
OFTableStatistics st = (OFTableStatistics) ofst;
// st.getPortNumber() st.getReceiveBytes();
FlowscaleController.logger.debug(
"Maximum Entries {} and and Table id {}",
st.getMaximumEntries(), st.getTableId());
FlowscaleController.logger.debug(
"Name {} and and Table length {}", st.getName(),
st.getLength());
JSONObject jsonObject = new JSONObject();
jsonObject.put("match_count", st.getMatchedCount());
jsonObject.put("maximum_entries", st.getMaximumEntries());
jsonObject.put("name", st.getName());
jsonObject.put("table_id", st.getTableId());
jsonObject.put("active_count", st.getActiveCount());
jsonArray.add(jsonObject);
}