use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspNetworkStateResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNcp method getNetworkState.
/**
* Returns a value indicating whether the node is joining, joined to, or leaving a network.
*
* @return the {@link EmberNetworkStatus}
*/
public EmberNetworkStatus getNetworkState() {
EzspNetworkStateRequest request = new EzspNetworkStateRequest();
EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspNetworkStateResponse.class));
EzspNetworkStateResponse response = (EzspNetworkStateResponse) transaction.getResponse();
logger.debug(response.toString());
lastStatus = null;
return response.getStatus();
}
use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspNetworkStateResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNetworkInitialisation method checkNetworkJoined.
private boolean checkNetworkJoined() {
// Check if the network is initialised
EzspNetworkStateRequest networkStateRequest = new EzspNetworkStateRequest();
EzspTransaction networkStateTransaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(networkStateRequest, EzspNetworkStateResponse.class));
EzspNetworkStateResponse networkStateResponse = (EzspNetworkStateResponse) networkStateTransaction.getResponse();
logger.debug(networkStateResponse.toString());
logger.debug("EZSP networkStateResponse {}", networkStateResponse.getStatus());
return networkStateResponse.getStatus() == EmberNetworkStatus.EMBER_JOINED_NETWORK;
}
Aggregations