use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNetworkInitialisation method doLeaveNetwork.
private boolean doLeaveNetwork() {
EzspLeaveNetworkRequest leaveNetworkRequest = new EzspLeaveNetworkRequest();
EzspTransaction leaveNetworkTransaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(leaveNetworkRequest, EzspLeaveNetworkResponse.class));
EzspLeaveNetworkResponse leaveNetworkResponse = (EzspLeaveNetworkResponse) leaveNetworkTransaction.getResponse();
logger.debug(leaveNetworkResponse.toString());
return leaveNetworkResponse.getStatus() == EmberStatus.EMBER_SUCCESS;
}
use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNetworkInitialisation method getNetworkParameters.
/**
* Get the current network parameters
*
* @return the {@link EmberNetworkParameters} or null on error
*/
private EmberNetworkParameters getNetworkParameters() {
EzspGetNetworkParametersRequest networkParms = new EzspGetNetworkParametersRequest();
EzspSingleResponseTransaction transaction = new EzspSingleResponseTransaction(networkParms, EzspGetNetworkParametersResponse.class);
ashHandler.sendEzspTransaction(transaction);
EzspGetNetworkParametersResponse getNetworkParametersResponse = (EzspGetNetworkParametersResponse) transaction.getResponse();
logger.debug(getNetworkParametersResponse.toString());
if (getNetworkParametersResponse.getStatus() != EmberStatus.EMBER_SUCCESS) {
logger.debug("Error during retrieval of network parameters: {}", getNetworkParametersResponse);
return null;
}
return getNetworkParametersResponse.getParameters();
}
use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction in project com.zsmartsystems.zigbee by zsmartsystems.
the class EzspNeighborTable method getRoute.
private void getRoute(int route) {
EzspGetRouteTableEntryRequest routeRequest = new EzspGetRouteTableEntryRequest();
routeRequest.setIndex(route);
EzspTransaction neighborTransaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(routeRequest, EzspGetRouteTableEntryResponse.class));
EzspGetRouteTableEntryResponse routeResponse = (EzspGetRouteTableEntryResponse) neighborTransaction.getResponse();
logger.debug(routeResponse.toString());
logger.debug("EZSP getRouteTableEntry {}", routeResponse);
}
Aggregations