@Test public void setNodeState() { System.out.println("--- " + Thread.currentThread().getStackTrace()[1].getMethodName()); ZigBeeNode node = new ZigBeeNode(getMocketNetworkManager(), new IeeeAddress("1234567890")); assertFalse(node.setNodeState(ZigBeeNodeState.UNKNOWN)); assertTrue(node.setNodeState(ZigBeeNodeState.ONLINE)); assertEquals(ZigBeeNodeState.ONLINE, node.getNodeState()); assertTrue(node.setNodeState(ZigBeeNodeState.OFFLINE)); assertFalse(node.setNodeState(ZigBeeNodeState.OFFLINE)); assertEquals(ZigBeeNodeState.OFFLINE, node.getNodeState()); }
public boolean setNodeState(ZigBeeNodeState state) { if (nodeState.equals(state)) { return false; } logger.debug("{}: Node state updated from {} to {}", ieeeAddress, nodeState, state); nodeState = state; return true; }
ZigBeeNode { public boolean setNodeState(ZigBeeNodeState state) { if (nodeState.equals(state)) { return false; } logger.debug("{}: Node state updated from {} to {}", ieeeAddress, nodeState, state); nodeState = state; return true; } }
ZigBeeNode { public boolean setNodeState(ZigBeeNodeState state) { if (nodeState.equals(state)) { return false; } logger.debug("{}: Node state updated from {} to {}", ieeeAddress, nodeState, state); nodeState = state; return true; } ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress);  ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress, Integer networkAddress); }
ZigBeeNode { public boolean setNodeState(ZigBeeNodeState state) { if (nodeState.equals(state)) { return false; } logger.debug("{}: Node state updated from {} to {}", ieeeAddress, nodeState, state); nodeState = state; return true; } ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress);  ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress, Integer networkAddress); void shutdown(); IeeeAddress getIeeeAddress(); boolean setNetworkAddress(Integer networkAddress); Integer getNetworkAddress(); void setNodeDescriptor(NodeDescriptor nodeDescriptor); NodeDescriptor getNodeDescriptor(); void setPowerDescriptor(PowerDescriptor powerDescriptor); PowerDescriptor getPowerDescriptor(); void permitJoin(final int duration); void permitJoin(final boolean enable); @Deprecated boolean isFullFuntionDevice(); boolean isFullFunctionDevice(); @Deprecated boolean isReducedFuntionDevice(); boolean isReducedFunctionDevice(); boolean isSecurityCapable(); boolean isPrimaryTrustCenter(); LogicalType getLogicalType(); Set<BindingTable> getBindingTable(); Future<ZigBeeStatus> updateBindingTable(); Collection<ZigBeeEndpoint> getEndpoints(); ZigBeeEndpoint getEndpoint(final int endpointId); void addEndpoint(final ZigBeeEndpoint endpoint); void updateEndpoint(final ZigBeeEndpoint endpoint); void removeEndpoint(final int endpointId); void addNetworkEndpointListener(final ZigBeeNetworkEndpointListener networkDeviceListener); void removeNetworkEndpointListener(final ZigBeeNetworkEndpointListener networkDeviceListener); Set<NeighborTable> getNeighbors(); boolean setNeighbors(Set<NeighborTable> neighbors); Set<Integer> getAssociatedDevices(); boolean setAssociatedDevices(Set<Integer> associatedDevices); Collection<RoutingTable> getRoutes(); boolean setRoutes(Set<RoutingTable> routes); void setLastUpdateTime(); Date getLastUpdateTime(); void commandReceived(ZigBeeCommand command, Integer rssi, Integer lqi); boolean isDiscovered(); ZigBeeNodeDao getDao(); void setDao(ZigBeeNodeDao dao); void sendTransaction(ZigBeeCommand command); Future<CommandResult> sendTransaction(ZigBeeCommand command, ZigBeeTransactionMatcher responseMatcher); boolean setNodeState(ZigBeeNodeState state); ZigBeeNodeState getNodeState(); NotificationService getNotificationService(); ZigBeeLinkQualityStatistics getLinkQualityStatistics(); @Override String toString(); }
ZigBeeNode { public boolean setNodeState(ZigBeeNodeState state) { if (nodeState.equals(state)) { return false; } logger.debug("{}: Node state updated from {} to {}", ieeeAddress, nodeState, state); nodeState = state; return true; } ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress);  ZigBeeNode(ZigBeeNetworkManager networkManager, IeeeAddress ieeeAddress, Integer networkAddress); void shutdown(); IeeeAddress getIeeeAddress(); boolean setNetworkAddress(Integer networkAddress); Integer getNetworkAddress(); void setNodeDescriptor(NodeDescriptor nodeDescriptor); NodeDescriptor getNodeDescriptor(); void setPowerDescriptor(PowerDescriptor powerDescriptor); PowerDescriptor getPowerDescriptor(); void permitJoin(final int duration); void permitJoin(final boolean enable); @Deprecated boolean isFullFuntionDevice(); boolean isFullFunctionDevice(); @Deprecated boolean isReducedFuntionDevice(); boolean isReducedFunctionDevice(); boolean isSecurityCapable(); boolean isPrimaryTrustCenter(); LogicalType getLogicalType(); Set<BindingTable> getBindingTable(); Future<ZigBeeStatus> updateBindingTable(); Collection<ZigBeeEndpoint> getEndpoints(); ZigBeeEndpoint getEndpoint(final int endpointId); void addEndpoint(final ZigBeeEndpoint endpoint); void updateEndpoint(final ZigBeeEndpoint endpoint); void removeEndpoint(final int endpointId); void addNetworkEndpointListener(final ZigBeeNetworkEndpointListener networkDeviceListener); void removeNetworkEndpointListener(final ZigBeeNetworkEndpointListener networkDeviceListener); Set<NeighborTable> getNeighbors(); boolean setNeighbors(Set<NeighborTable> neighbors); Set<Integer> getAssociatedDevices(); boolean setAssociatedDevices(Set<Integer> associatedDevices); Collection<RoutingTable> getRoutes(); boolean setRoutes(Set<RoutingTable> routes); void setLastUpdateTime(); Date getLastUpdateTime(); void commandReceived(ZigBeeCommand command, Integer rssi, Integer lqi); boolean isDiscovered(); ZigBeeNodeDao getDao(); void setDao(ZigBeeNodeDao dao); void sendTransaction(ZigBeeCommand command); Future<CommandResult> sendTransaction(ZigBeeCommand command, ZigBeeTransactionMatcher responseMatcher); boolean setNodeState(ZigBeeNodeState state); ZigBeeNodeState getNodeState(); NotificationService getNotificationService(); ZigBeeLinkQualityStatistics getLinkQualityStatistics(); @Override String toString();  }