@Test public void testGetCounters() { System.out.println("--- " + Thread.currentThread().getStackTrace()[1].getMethodName()); AshFrameHandler frameHandler = new AshFrameHandler(null); assertNotNull(frameHandler.getCounters()); Map<String, Long> counters = frameHandler.getCounters(); assertEquals(Long.valueOf(0), counters.get("ASH_RX_DAT")); assertEquals(Long.valueOf(0), counters.get("ASH_TX_DAT")); assertEquals(Long.valueOf(0), counters.get("ASH_RX_ACK")); assertEquals(Long.valueOf(0), counters.get("ASH_TX_ACK")); assertEquals(Long.valueOf(0), counters.get("ASH_RX_NAK")); assertEquals(Long.valueOf(0), counters.get("ASH_TX_NAK")); assertEquals(Long.valueOf(0), counters.get("ASH_RX_ERR")); }
@Override public synchronized Map<String, Long> getCounters() { Map<String, Long> counters = new ConcurrentHashMap<String, Long>(); counters.put("ASH_TX_DAT", statsTxData); counters.put("ASH_TX_NAK", statsTxNaks); counters.put("ASH_TX_ACK", statsTxAcks); counters.put("ASH_RX_DAT", statsRxData); counters.put("ASH_RX_NAK", statsRxNaks); counters.put("ASH_RX_ACK", statsRxAcks); counters.put("ASH_RX_ERR", statsRxErrs); return counters; }
AshFrameHandler implements EzspProtocolHandler { @Override public synchronized Map<String, Long> getCounters() { Map<String, Long> counters = new ConcurrentHashMap<String, Long>(); counters.put("ASH_TX_DAT", statsTxData); counters.put("ASH_TX_NAK", statsTxNaks); counters.put("ASH_TX_ACK", statsTxAcks); counters.put("ASH_RX_DAT", statsRxData); counters.put("ASH_RX_NAK", statsRxNaks); counters.put("ASH_RX_ACK", statsRxAcks); counters.put("ASH_RX_ERR", statsRxErrs); return counters; } }
AshFrameHandler implements EzspProtocolHandler { @Override public synchronized Map<String, Long> getCounters() { Map<String, Long> counters = new ConcurrentHashMap<String, Long>(); counters.put("ASH_TX_DAT", statsTxData); counters.put("ASH_TX_NAK", statsTxNaks); counters.put("ASH_TX_ACK", statsTxAcks); counters.put("ASH_RX_DAT", statsRxData); counters.put("ASH_RX_NAK", statsRxNaks); counters.put("ASH_RX_ACK", statsRxAcks); counters.put("ASH_RX_ERR", statsRxErrs); return counters; } AshFrameHandler(final EzspFrameHandler frameHandler); }
AshFrameHandler implements EzspProtocolHandler { @Override public synchronized Map<String, Long> getCounters() { Map<String, Long> counters = new ConcurrentHashMap<String, Long>(); counters.put("ASH_TX_DAT", statsTxData); counters.put("ASH_TX_NAK", statsTxNaks); counters.put("ASH_TX_ACK", statsTxAcks); counters.put("ASH_RX_DAT", statsRxData); counters.put("ASH_RX_NAK", statsRxNaks); counters.put("ASH_RX_ACK", statsRxAcks); counters.put("ASH_RX_ERR", statsRxErrs); return counters; } AshFrameHandler(final EzspFrameHandler frameHandler); @Override void start(final ZigBeePort port); @Override void setClosing(); @Override void close(); @Override boolean isAlive(); @Override void queueFrame(EzspFrameRequest request); @Override synchronized void connect(); synchronized void reconnect(); @Override Future<EzspFrame> sendEzspRequestAsync(final EzspTransaction ezspTransaction); @Override EzspTransaction sendEzspTransaction(EzspTransaction ezspTransaction); @Override Future<EzspFrameResponse> eventWaitAsync(final Class<?> eventClass); @Override EzspFrameResponse eventWait(final Class<?> eventClass, int timeout); @Override synchronized Map<String, Long> getCounters(); }
AshFrameHandler implements EzspProtocolHandler { @Override public synchronized Map<String, Long> getCounters() { Map<String, Long> counters = new ConcurrentHashMap<String, Long>(); counters.put("ASH_TX_DAT", statsTxData); counters.put("ASH_TX_NAK", statsTxNaks); counters.put("ASH_TX_ACK", statsTxAcks); counters.put("ASH_RX_DAT", statsRxData); counters.put("ASH_RX_NAK", statsRxNaks); counters.put("ASH_RX_ACK", statsRxAcks); counters.put("ASH_RX_ERR", statsRxErrs); return counters; } AshFrameHandler(final EzspFrameHandler frameHandler); @Override void start(final ZigBeePort port); @Override void setClosing(); @Override void close(); @Override boolean isAlive(); @Override void queueFrame(EzspFrameRequest request); @Override synchronized void connect(); synchronized void reconnect(); @Override Future<EzspFrame> sendEzspRequestAsync(final EzspTransaction ezspTransaction); @Override EzspTransaction sendEzspTransaction(EzspTransaction ezspTransaction); @Override Future<EzspFrameResponse> eventWaitAsync(final Class<?> eventClass); @Override EzspFrameResponse eventWait(final Class<?> eventClass, int timeout); @Override synchronized Map<String, Long> getCounters();  }