use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetCurrentSecurityStateRequest in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNcp method getCurrentSecurityState.
/**
* Gets the current security state that is being used by a device that is joined in the network.
*
* @return the {@link EmberNetworkParameters} or null on error
*/
public EmberCurrentSecurityState getCurrentSecurityState() {
EzspGetCurrentSecurityStateRequest request = new EzspGetCurrentSecurityStateRequest();
EzspSingleResponseTransaction transaction = new EzspSingleResponseTransaction(request, EzspGetCurrentSecurityStateResponse.class);
ashHandler.sendEzspTransaction(transaction);
EzspGetCurrentSecurityStateResponse response = (EzspGetCurrentSecurityStateResponse) transaction.getResponse();
logger.debug(response.toString());
lastStatus = response.getStatus();
if (response.getStatus() != EmberStatus.EMBER_SUCCESS) {
logger.debug("Error during retrieval of security parameters: {}", response);
return null;
}
return response.getState();
}
Aggregations