@Test public void setZigBeeInstallKey() throws Exception { TestUtilities.outputTestHeader(); ZigBeeNetworkManager manager = mockZigBeeNetworkManager(); ZigBeeKey key = new ZigBeeKey(); assertEquals(ZigBeeStatus.INVALID_ARGUMENTS, manager.setZigBeeInstallKey(key)); key.setAddress(new IeeeAddress()); manager.setZigBeeInstallKey(key); }
public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) { if (!key.hasAddress()) { return ZigBeeStatus.INVALID_ARGUMENTS; } TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key); transport.updateTransportConfig(config); return config.getResult(TransportConfigOption.INSTALL_KEY); }
ZigBeeNetworkManager implements ZigBeeTransportReceive { public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) { if (!key.hasAddress()) { return ZigBeeStatus.INVALID_ARGUMENTS; } TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key); transport.updateTransportConfig(config); return config.getResult(TransportConfigOption.INSTALL_KEY); } }
ZigBeeNetworkManager implements ZigBeeTransportReceive { public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) { if (!key.hasAddress()) { return ZigBeeStatus.INVALID_ARGUMENTS; } TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key); transport.updateTransportConfig(config); return config.getResult(TransportConfigOption.INSTALL_KEY); } ZigBeeNetworkManager(final ZigBeeTransportTransmit transport); }
ZigBeeNetworkManager implements ZigBeeTransportReceive { public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) { if (!key.hasAddress()) { return ZigBeeStatus.INVALID_ARGUMENTS; } TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key); transport.updateTransportConfig(config); return config.getResult(TransportConfigOption.INSTALL_KEY); } ZigBeeNetworkManager(final ZigBeeTransportTransmit transport); void setNetworkDataStore(ZigBeeNetworkDataStore dataStore); void serializeNetworkDataStore(IeeeAddress nodeAddress); @SuppressWarnings("unchecked") void setSerializer(Class<?> serializer, Class<?> deserializer); void setLocalEndpointId(int localEndpointId); ZigBeeStatus initialize(); ZigBeeTransportTransmit getZigBeeTransport(); ZigBeeChannel getZigBeeChannel(); ZigBeeStatus setZigBeeChannel(ZigBeeChannel channel); int getZigBeePanId(); ZigBeeStatus setZigBeePanId(int panId); ExtendedPanId getZigBeeExtendedPanId(); ZigBeeStatus setZigBeeExtendedPanId(ExtendedPanId panId); ZigBeeStatus setDefaultProfileId(int defaultProfileId); ZigBeeStatus setDefaultDeviceId(int defaultDeviceId); ZigBeeStatus setZigBeeNetworkKey(final ZigBeeKey key); ZigBeeKey getZigBeeNetworkKey(); ZigBeeStatus setZigBeeLinkKey(final ZigBeeKey key); ZigBeeKey getZigBeeLinkKey(); ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key); ZigBeeStatus startup(boolean reinitialize); ZigBeeStatus reinitialize(); void shutdown(); void executeTask(Runnable runnableTask); ScheduledFuture<?> scheduleTask(Runnable runnableTask, long delay); ScheduledFuture<?> rescheduleTask(ScheduledFuture<?> futureTask, Runnable runnableTask, long delay); ScheduledFuture<?> scheduleTask(Runnable runnableTask, long initialDelay, long period); String getTransportVersionString(); boolean sendCommand(ZigBeeCommand command); void addCommandListener(ZigBeeCommandListener commandListener); void removeCommandListener(ZigBeeCommandListener commandListener); @Override void receiveCommand(final ZigBeeApsFrame incomingApsFrame); void createDefaultResponse(ZigBeeApsFrame apsFrame, ZclHeader zclHeader, ZclStatus status); void addAnnounceListener(ZigBeeAnnounceListener announceListener); void removeAnnounceListener(ZigBeeAnnounceListener announceListener); @Override void nodeStatusUpdate(final ZigBeeNodeStatus deviceStatus, final Integer networkAddress,
            final IeeeAddress ieeeAddress); void addNetworkStateListener(ZigBeeNetworkStateListener stateListener); void removeNetworkStateListener(ZigBeeNetworkStateListener stateListener); @Override synchronized void setTransportState(final ZigBeeTransportState state); ZigBeeStatus permitJoin(final int duration); ZigBeeStatus permitJoin(final ZigBeeEndpointAddress destination, final int duration); void leave(final Integer destinationAddress, final IeeeAddress leaveAddress); void leave(final Integer destinationAddress, final IeeeAddress leaveAddress, boolean forceNodeRemoval); void addGroup(final ZigBeeGroupAddress group); void updateGroup(ZigBeeGroupAddress group); ZigBeeGroupAddress getGroup(final int groupId); void removeGroup(final int groupId); List<ZigBeeGroupAddress> getGroups(); void addNetworkNodeListener(final ZigBeeNetworkNodeListener networkNodeListener); void removeNetworkNodeListener(final ZigBeeNetworkNodeListener networkNodeListener); void rediscoverNode(IeeeAddress address); Set<ZigBeeNode> getNodes(); ZigBeeNode getNode(final Integer networkAddress); ZigBeeNode getNode(final IeeeAddress ieeeAddress); void removeNode(final ZigBeeNode node); void updateNode(final ZigBeeNode node); @Deprecated void addSupportedCluster(int cluster); ZigBeeStatus addSupportedClientCluster(int cluster); ZigBeeStatus addSupportedServerCluster(int cluster); boolean isClientClusterSupported(int cluster); boolean isServerClusterSupported(int cluster); ZigBeeStatus addExtension(ZigBeeNetworkExtension extension); ZigBeeNetworkExtension getExtension(Class<T> requestedExtension); ZigBeeNetworkState getNetworkState(); IeeeAddress getLocalIeeeAddress(); Integer getLocalNwkAddress(); NotificationService getNotificationService(); void sendTransaction(ZigBeeCommand command); Future<CommandResult> sendTransaction(ZigBeeCommand command, ZigBeeTransactionMatcher responseMatcher); @Override void receiveCommandState(int msgTag, ZigBeeTransportProgressState state); }
ZigBeeNetworkManager implements ZigBeeTransportReceive { public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) { if (!key.hasAddress()) { return ZigBeeStatus.INVALID_ARGUMENTS; } TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key); transport.updateTransportConfig(config); return config.getResult(TransportConfigOption.INSTALL_KEY); } ZigBeeNetworkManager(final ZigBeeTransportTransmit transport); void setNetworkDataStore(ZigBeeNetworkDataStore dataStore); void serializeNetworkDataStore(IeeeAddress nodeAddress); @SuppressWarnings("unchecked") void setSerializer(Class<?> serializer, Class<?> deserializer); void setLocalEndpointId(int localEndpointId); ZigBeeStatus initialize(); ZigBeeTransportTransmit getZigBeeTransport(); ZigBeeChannel getZigBeeChannel(); ZigBeeStatus setZigBeeChannel(ZigBeeChannel channel); int getZigBeePanId(); ZigBeeStatus setZigBeePanId(int panId); ExtendedPanId getZigBeeExtendedPanId(); ZigBeeStatus setZigBeeExtendedPanId(ExtendedPanId panId); ZigBeeStatus setDefaultProfileId(int defaultProfileId); ZigBeeStatus setDefaultDeviceId(int defaultDeviceId); ZigBeeStatus setZigBeeNetworkKey(final ZigBeeKey key); ZigBeeKey getZigBeeNetworkKey(); ZigBeeStatus setZigBeeLinkKey(final ZigBeeKey key); ZigBeeKey getZigBeeLinkKey(); ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key); ZigBeeStatus startup(boolean reinitialize); ZigBeeStatus reinitialize(); void shutdown(); void executeTask(Runnable runnableTask); ScheduledFuture<?> scheduleTask(Runnable runnableTask, long delay); ScheduledFuture<?> rescheduleTask(ScheduledFuture<?> futureTask, Runnable runnableTask, long delay); ScheduledFuture<?> scheduleTask(Runnable runnableTask, long initialDelay, long period); String getTransportVersionString(); boolean sendCommand(ZigBeeCommand command); void addCommandListener(ZigBeeCommandListener commandListener); void removeCommandListener(ZigBeeCommandListener commandListener); @Override void receiveCommand(final ZigBeeApsFrame incomingApsFrame); void createDefaultResponse(ZigBeeApsFrame apsFrame, ZclHeader zclHeader, ZclStatus status); void addAnnounceListener(ZigBeeAnnounceListener announceListener); void removeAnnounceListener(ZigBeeAnnounceListener announceListener); @Override void nodeStatusUpdate(final ZigBeeNodeStatus deviceStatus, final Integer networkAddress,
            final IeeeAddress ieeeAddress); void addNetworkStateListener(ZigBeeNetworkStateListener stateListener); void removeNetworkStateListener(ZigBeeNetworkStateListener stateListener); @Override synchronized void setTransportState(final ZigBeeTransportState state); ZigBeeStatus permitJoin(final int duration); ZigBeeStatus permitJoin(final ZigBeeEndpointAddress destination, final int duration); void leave(final Integer destinationAddress, final IeeeAddress leaveAddress); void leave(final Integer destinationAddress, final IeeeAddress leaveAddress, boolean forceNodeRemoval); void addGroup(final ZigBeeGroupAddress group); void updateGroup(ZigBeeGroupAddress group); ZigBeeGroupAddress getGroup(final int groupId); void removeGroup(final int groupId); List<ZigBeeGroupAddress> getGroups(); void addNetworkNodeListener(final ZigBeeNetworkNodeListener networkNodeListener); void removeNetworkNodeListener(final ZigBeeNetworkNodeListener networkNodeListener); void rediscoverNode(IeeeAddress address); Set<ZigBeeNode> getNodes(); ZigBeeNode getNode(final Integer networkAddress); ZigBeeNode getNode(final IeeeAddress ieeeAddress); void removeNode(final ZigBeeNode node); void updateNode(final ZigBeeNode node); @Deprecated void addSupportedCluster(int cluster); ZigBeeStatus addSupportedClientCluster(int cluster); ZigBeeStatus addSupportedServerCluster(int cluster); boolean isClientClusterSupported(int cluster); boolean isServerClusterSupported(int cluster); ZigBeeStatus addExtension(ZigBeeNetworkExtension extension); ZigBeeNetworkExtension getExtension(Class<T> requestedExtension); ZigBeeNetworkState getNetworkState(); IeeeAddress getLocalIeeeAddress(); Integer getLocalNwkAddress(); NotificationService getNotificationService(); void sendTransaction(ZigBeeCommand command); Future<CommandResult> sendTransaction(ZigBeeCommand command, ZigBeeTransactionMatcher responseMatcher); @Override void receiveCommandState(int msgTag, ZigBeeTransportProgressState state);  }