Search in sources :

Example 1 with EzspGetChildDataRequest

use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetChildDataRequest in project com.zsmartsystems.zigbee by zsmartsystems.

the class EmberNcp method getChildInformation.

/**
 * Returns information about a child of the local node.
 *
 * @param childId the ID of the child to get information on
 * @return the {@link EzspGetChildDataResponse} of the requested childId or null on error
 */
public EzspGetChildDataResponse getChildInformation(int childId) {
    EzspGetChildDataRequest request = new EzspGetChildDataRequest();
    request.setIndex(childId);
    EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspGetChildDataResponse.class));
    EzspGetChildDataResponse response = (EzspGetChildDataResponse) transaction.getResponse();
    logger.debug(response.toString());
    lastStatus = response.getStatus();
    if (lastStatus != EmberStatus.EMBER_SUCCESS) {
        return null;
    }
    return response;
}
Also used : EzspGetChildDataResponse(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetChildDataResponse) EzspTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction) EzspGetChildDataRequest(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetChildDataRequest) EzspSingleResponseTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction)

Aggregations

EzspGetChildDataRequest (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetChildDataRequest)1 EzspGetChildDataResponse (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspGetChildDataResponse)1 EzspSingleResponseTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction)1 EzspTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction)1