use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetKeyTableEntryResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNcp method getKeyTableEntry.
/**
* Gets a Security Key based on the passed key type.
*
* @param index the index of the key to get
* @return the {@link EmberKeyStruct} of the requested key or null on error
*/
public EmberKeyStruct getKeyTableEntry(int index) {
EzspGetKeyTableEntryRequest request = new EzspGetKeyTableEntryRequest();
request.setIndex(index);
EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspGetKeyTableEntryResponse.class));
EzspGetKeyTableEntryResponse response = (EzspGetKeyTableEntryResponse) transaction.getResponse();
logger.debug(response.toString());
lastStatus = response.getStatus();
if (lastStatus != EmberStatus.EMBER_SUCCESS) {
return null;
}
return response.getKeyStruct();
}
Aggregations