Search in sources :

Example 1 with EzspSetConfigurationValueResponse

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

the class EmberNcp method setConfiguration.

/**
 * Set a configuration value
 *
 * @param configId the {@link EzspConfigId} to set
 * @param value the value to set
 * @return true if the configuration returns success
 */
public boolean setConfiguration(EzspConfigId configId, Integer value) {
    EzspSetConfigurationValueRequest request = new EzspSetConfigurationValueRequest();
    request.setConfigId(configId);
    request.setValue(value);
    logger.debug(request.toString());
    EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetConfigurationValueResponse.class));
    EzspSetConfigurationValueResponse response = (EzspSetConfigurationValueResponse) transaction.getResponse();
    lastStatus = null;
    logger.debug(response.toString());
    return response.getStatus() == EzspStatus.EZSP_SUCCESS;
}
Also used : EzspSetConfigurationValueResponse(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspSetConfigurationValueResponse) EzspTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction) EzspSingleResponseTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction) EzspSetConfigurationValueRequest(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspSetConfigurationValueRequest)

Aggregations

EzspSetConfigurationValueRequest (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspSetConfigurationValueRequest)1 EzspSetConfigurationValueResponse (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspSetConfigurationValueResponse)1 EzspSingleResponseTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction)1 EzspTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction)1