@Test public void testConnect() { portOutData = new ArrayList<>(); SpiFrameHandler handler = new SpiFrameHandler(Mockito.mock(EzspFrameHandler.class)); handler.start(new TestPort(Mockito.mock(InputStream.class), Mockito.mock(OutputStream.class))); handler.connect(); assertEquals(2, portOutData.size()); assertEquals(Integer.valueOf(0x0A), portOutData.get(0)); assertEquals(Integer.valueOf(0xA7), portOutData.get(1)); }
@Override public void connect() { logger.debug("SPI: connect"); stateConnected = false; sendQueue.clear(); outputFrame(requestSpiVersion); }
SpiFrameHandler implements EzspProtocolHandler { @Override public void connect() { logger.debug("SPI: connect"); stateConnected = false; sendQueue.clear(); outputFrame(requestSpiVersion); } }
SpiFrameHandler implements EzspProtocolHandler { @Override public void connect() { logger.debug("SPI: connect"); stateConnected = false; sendQueue.clear(); outputFrame(requestSpiVersion); } SpiFrameHandler(final EzspFrameHandler frameHandler); }
SpiFrameHandler implements EzspProtocolHandler { @Override public void connect() { logger.debug("SPI: connect"); stateConnected = false; sendQueue.clear(); outputFrame(requestSpiVersion); } SpiFrameHandler(final EzspFrameHandler frameHandler); void setPollRate(int pollRate); @Override void start(final ZigBeePort port); @Override void setClosing(); @Override void close(); @Override boolean isAlive(); @Override void queueFrame(EzspFrameRequest request); @Override void connect(); @Override Future<EzspFrame> sendEzspRequestAsync(final EzspTransaction ezspTransaction); @Override EzspTransaction sendEzspTransaction(EzspTransaction ezspTransaction); int getSpiErrors(); @Override Future<EzspFrameResponse> eventWaitAsync(final Class<?> eventClass); @Override EzspFrameResponse eventWait(final Class<?> eventClass, int timeout); @Override Map<String, Long> getCounters(); }
SpiFrameHandler implements EzspProtocolHandler { @Override public void connect() { logger.debug("SPI: connect"); stateConnected = false; sendQueue.clear(); outputFrame(requestSpiVersion); } SpiFrameHandler(final EzspFrameHandler frameHandler); void setPollRate(int pollRate); @Override void start(final ZigBeePort port); @Override void setClosing(); @Override void close(); @Override boolean isAlive(); @Override void queueFrame(EzspFrameRequest request); @Override void connect(); @Override Future<EzspFrame> sendEzspRequestAsync(final EzspTransaction ezspTransaction); @Override EzspTransaction sendEzspTransaction(EzspTransaction ezspTransaction); int getSpiErrors(); @Override Future<EzspFrameResponse> eventWaitAsync(final Class<?> eventClass); @Override EzspFrameResponse eventWait(final Class<?> eventClass, int timeout); @Override Map<String, Long> getCounters();  }